@nuxt/devtools 0.8.4 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/chunks/module-main.mjs +65 -21
  2. package/dist/chunks/vscode.mjs +2 -3
  3. package/dist/client/200.html +17 -17
  4. package/dist/client/404.html +17 -17
  5. package/dist/client/_nuxt/{Badge.a4bd58d4.js → Badge.15b76164.js} +1 -1
  6. package/dist/client/_nuxt/{CodeDiff.vue.a8c9e639.js → CodeDiff.vue.0e58df1f.js} +2 -2
  7. package/dist/client/_nuxt/ComposableItem.vue.e263b9a9.js +1 -0
  8. package/dist/client/_nuxt/{DataSchemaButton.vue.fbb61806.js → DataSchemaButton.vue.41ad6158.js} +1 -1
  9. package/dist/client/_nuxt/{DataSchemaDrawer.f84a2081.js → DataSchemaDrawer.6de1f238.js} +1 -1
  10. package/dist/client/_nuxt/{DrawerRight.vue.b9dc765f.js → DrawerRight.vue.5bde5a0b.js} +1 -1
  11. package/dist/client/_nuxt/{DurationDisplay.vue.1f34b658.js → DurationDisplay.vue.8da73fd3.js} +1 -1
  12. package/dist/client/_nuxt/{FilepathItem.vue.a4d269b8.js → FilepathItem.vue.7bd675c6.js} +1 -1
  13. package/dist/client/_nuxt/{HelpFab.vue.c0c3f8e6.js → HelpFab.vue.f082102a.js} +1 -1
  14. package/dist/client/_nuxt/LaunchPage.vue.f8df9e2a.js +1 -0
  15. package/dist/client/_nuxt/{NCheckbox.vue.0e359f85.js → NCheckbox.vue.fcd1d971.js} +1 -1
  16. package/dist/client/_nuxt/{NCodeBlock.vue.01eb6d1c.js → NCodeBlock.vue.84865d5b.js} +2 -2
  17. package/dist/client/_nuxt/{NDropdown.vue.b3117df4.js → NDropdown.vue.d756d40c.js} +1 -1
  18. package/dist/client/_nuxt/{NIconTitle.vue.79485c3a.js → NIconTitle.vue.b6d28480.js} +1 -1
  19. package/dist/client/_nuxt/NLink.vue.e0a3a39a.js +1 -0
  20. package/dist/client/_nuxt/{NMarkdown.vue.7a10e6e6.js → NMarkdown.vue.d2063d22.js} +1 -1
  21. package/dist/client/_nuxt/NSectionBlock.0d0061ef.css +1 -0
  22. package/dist/client/_nuxt/NSectionBlock.42a3cefc.js +1 -0
  23. package/dist/client/_nuxt/{NSelect.vue.9cac29ef.js → NSelect.vue.e3495019.js} +1 -1
  24. package/dist/client/_nuxt/{NSelectTabs.vue.72adf277.js → NSelectTabs.vue.4a83d611.js} +1 -1
  25. package/dist/client/_nuxt/{NSwitch.vue.67a4fdb0.js → NSwitch.vue.21018268.js} +1 -1
  26. package/dist/client/_nuxt/{NTip.vue.d505e897.js → NTip.vue.d193bf96.js} +1 -1
  27. package/dist/client/_nuxt/{Navbar.vue.8dc15d25.js → Navbar.vue.bacddf14.js} +1 -1
  28. package/dist/client/_nuxt/{StateEditor.vue.2463efc9.js → StateEditor.vue.5fea57d7.js} +1 -1
  29. package/dist/client/_nuxt/{analyze-build.423f57eb.js → analyze-build.7513704d.js} +1 -1
  30. package/dist/client/_nuxt/{assets.dc245910.js → assets.35017b46.js} +3 -3
  31. package/dist/client/_nuxt/{client.c59e50d6.js → client.d926285a.js} +1 -1
  32. package/dist/client/_nuxt/{components.31c6fd6f.js → components.fc36eeef.js} +1 -1
  33. package/dist/client/_nuxt/custom-_name_.50e8c68f.js +1 -0
  34. package/dist/client/_nuxt/{default.30ac8af4.js → default.c4c43b40.js} +1 -1
  35. package/dist/client/_nuxt/entry.38bf3bdf.css +1 -0
  36. package/dist/client/_nuxt/entry.54b63325.js +27 -0
  37. package/dist/client/_nuxt/{error-404.5c6d1cc1.js → error-404.087131b3.js} +1 -1
  38. package/dist/client/_nuxt/{error-500.b5b10475.js → error-500.d1c41037.js} +1 -1
  39. package/dist/client/_nuxt/{full.03097bfb.js → full.478da439.js} +1 -1
  40. package/dist/client/_nuxt/{hooks.d674696d.js → hooks.d9e8fd29.js} +1 -1
  41. package/dist/client/_nuxt/{imports.b827859f.js → imports.79d88ab3.js} +1 -1
  42. package/dist/client/_nuxt/{index.b5454355.js → index.5e3c6999.js} +1 -1
  43. package/dist/client/_nuxt/index.86b1fd88.js +1 -0
  44. package/dist/client/_nuxt/{json-editor-vue.1bc58c26.js → json-editor-vue.ce96762e.js} +1 -1
  45. package/dist/client/_nuxt/{middleware.434dc02a.js → middleware.87876377.js} +1 -1
  46. package/dist/client/_nuxt/{modules.7dc02a95.js → modules.caf682af.js} +2 -2
  47. package/dist/client/_nuxt/{none.2b3e8ddc.js → none.cfaeed76.js} +1 -1
  48. package/dist/client/_nuxt/{open-graph.693bd031.js → open-graph.cd0bdf97.js} +2 -2
  49. package/dist/client/_nuxt/overview.14a73720.js +1 -0
  50. package/dist/client/_nuxt/pages.746eb038.js +1 -0
  51. package/dist/client/_nuxt/payload.913d1fd8.js +1 -0
  52. package/dist/client/_nuxt/{plugins.cd2e64ba.js → plugins.5342d060.js} +1 -1
  53. package/dist/client/_nuxt/{runtime-configs.1f844468.js → runtime-configs.bf4f2459.js} +1 -1
  54. package/dist/client/_nuxt/server-routes.8c094c9d.js +9 -0
  55. package/dist/client/_nuxt/settings.59f50baa.js +1 -0
  56. package/dist/client/_nuxt/{state-components.a223a28c.js → state-components.c2201640.js} +1 -1
  57. package/dist/client/_nuxt/{state-modules.c0927595.js → state-modules.8816f603.js} +1 -1
  58. package/dist/client/_nuxt/{storage-options.8fdc9b2a.js → storage-options.b1a5fc25.js} +1 -1
  59. package/dist/client/_nuxt/storage.713a7e46.js +1 -0
  60. package/dist/client/_nuxt/{terminals.cb4eb909.js → terminals.a1c82952.js} +1 -1
  61. package/dist/client/_nuxt/{timeline.60d410a7.js → timeline.9cfa88d9.js} +2 -2
  62. package/dist/client/_nuxt/{unocss-runtime.68d64d4a.js → unocss-runtime.dedd4a37.js} +1 -1
  63. package/dist/client/_nuxt/virtual-files.7dc060d0.js +1 -0
  64. package/dist/client/index.html +17 -17
  65. package/dist/client/modules/analyze-build/index.html +17 -17
  66. package/dist/client/modules/assets/index.html +17 -17
  67. package/dist/client/modules/components/index.html +17 -17
  68. package/dist/client/modules/hooks/index.html +17 -17
  69. package/dist/client/modules/imports/index.html +17 -17
  70. package/dist/client/modules/middleware/index.html +17 -17
  71. package/dist/client/modules/modules/index.html +17 -17
  72. package/dist/client/modules/open-graph/index.html +17 -17
  73. package/dist/client/modules/overview/index.html +17 -17
  74. package/dist/client/modules/pages/index.html +17 -17
  75. package/dist/client/modules/payload/index.html +17 -17
  76. package/dist/client/modules/plugins/index.html +17 -17
  77. package/dist/client/modules/runtime-configs/index.html +17 -17
  78. package/dist/client/modules/server-routes/index.html +17 -17
  79. package/dist/client/modules/storage/index.html +17 -17
  80. package/dist/client/modules/terminals/index.html +17 -17
  81. package/dist/client/modules/timeline/index.html +17 -17
  82. package/dist/client/modules/virtual-files/index.html +17 -17
  83. package/dist/client/settings/index.html +17 -17
  84. package/dist/module.json +1 -1
  85. package/dist/module.mjs +1 -1
  86. package/dist/runtime/plugins/devtools.client.mjs +7 -0
  87. package/dist/shared/{devtools.4169e037.mjs → devtools.18eefaee.mjs} +3 -0
  88. package/package.json +7 -9
  89. package/dist/client/__blank/index.html +0 -42
  90. package/dist/client/_nuxt/ComposableItem.vue.bd112256.js +0 -1
  91. package/dist/client/_nuxt/LaunchPage.vue.012ddba7.js +0 -1
  92. package/dist/client/_nuxt/NLink.vue.6dc3b4af.js +0 -1
  93. package/dist/client/_nuxt/NSectionBlock.012f83f1.css +0 -1
  94. package/dist/client/_nuxt/NSectionBlock.2d8e1431.js +0 -1
  95. package/dist/client/_nuxt/__blank.20eb2cab.js +0 -1
  96. package/dist/client/_nuxt/custom-_name_.9b02fa14.js +0 -1
  97. package/dist/client/_nuxt/entry.05b33d7f.js +0 -27
  98. package/dist/client/_nuxt/entry.79095383.css +0 -1
  99. package/dist/client/_nuxt/index.b2055c8f.js +0 -1
  100. package/dist/client/_nuxt/overview.f2e48477.js +0 -1
  101. package/dist/client/_nuxt/pages.745a0630.js +0 -1
  102. package/dist/client/_nuxt/payload.897ca8fa.js +0 -1
  103. package/dist/client/_nuxt/server-routes.91c861d0.js +0 -9
  104. package/dist/client/_nuxt/settings.367ae337.js +0 -1
  105. package/dist/client/_nuxt/storage.76034502.js +0 -1
  106. package/dist/client/_nuxt/virtual-files.829bd209.js +0 -1
@@ -1 +1 @@
1
- import{d as j,a as V,r as F,o,m as i,k as e,F as c,n as E,E as S,f as n,t as m,p as b,G,i as r,j as a,v as _,H as A,I as D,J as P,K as L,C as U,L as X,M as ee,N as te,O as ne,P as oe,Q as le,R as ie,S as k,h as w,l as R,U as se,V as ae,A as re}from"./entry.05b33d7f.js";import{_ as ue}from"./FilepathItem.vue.a4d269b8.js";import{_ as de}from"./NTip.vue.d505e897.js";import{_ as ce}from"./NCodeBlock.vue.01eb6d1c.js";import{_ as me}from"./NCheckbox.vue.0e359f85.js";import{_ as _e}from"./HelpFab.vue.c0c3f8e6.js";import"./client.c59e50d6.js";const pe={"h-full":"",grid:"~ rows-[max-content_1fr]"},fe={flex:"~ wrap","w-full":""},ve=["onClick"],he=e("div",{border:"b base","flex-auto":""},null,-1),ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be=e("div",{"flex-auto":""},null,-1),$e={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),ge=e("div",{"text-sm":"",op50:""}," Name ",-1),we=e("div",{"i-carbon-time":"","text-xl":""},null,-1),ze=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Be=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ce=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Ne=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Te=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),Ae=e("div",{"text-sm":"",op50:""}," Built ",-1),De=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ie=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Ve=e("div",{"flex-auto":""},null,-1),I="/__nuxt_devtools__/analyze/",Fe=j({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const t=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=F(f.value[0]);function $(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)}MB`:`${(t/1024/1024/1024).toFixed(1)}GB`}function g(t){return`${((t.endTime-t.startTime)/1e3).toFixed(1)}s`}async function x(t){return P.clearAnalyzeBuilds(await L(),[t])}return(t,u)=>{const z=ue,N=U;return o(),i("div",pe,[e("div",fe,[(o(!0),i(c,null,E(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:S(v.id===n(l).id?"":"op30")},m(v.name),3)],10,ve))),128)),he]),n(l).id==="overview"?(o(),i("div",ye,[be,e("div",$e,[xe,e("div",null,[ge,e("div",null,m(t.current.name),1)]),we,e("div",null,[ze,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[Be,e("div",null,[ke,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ce,e("div",null,[Ne,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Te,e("div",null,[Ae,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),De,e("div",null,[Ie,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Ve,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(t.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||n(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||n(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||n(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Se={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),Re=e("p",null,[_("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),je=[Pe,Re],Ee={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Se,je))}},Ge={flex:"~ col"},Le=["onClick"],Ue={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},Oe=e("div",{"i-carbon-time":""},null,-1),He=e("div",{"flex-auto":""},null,-1),Ke=e("div",{"x-divider":""},null,-1),Me={flex:"~ items-center justify-center wrap",p4:""},Je={flex:"~ col gap-1","w-250":"",p4:""},Qe=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),We=e("p",{op50:""}," Enter the name of the build: ",-1),Ye=e("div",{my3:"","x-divider":""},null,-1),Ze=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},st=j({__name:"analyze-build",setup(C){const p=X(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=F(!1),t=F(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await P.generateAnalyzeBuildName(),await p.start()&&(k.value={name:t.value,processId:await P.startAnalyzeBuild(await L(),t.value)},x.value&&v())}const N=oe();function v(){k.value?.processId&&(N.value=k.value.processId,l.push("/modules/terminals"))}function T(d){return`${((d.endTime-d.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(d,h)=>{const B=U,O=Fe,H=re,K=ie,M=se,J=de,Q=ce,W=me,Y=ae,Z=Ee,q=_e;return o(),i(c,null,[r(K,{"left-size":30},{left:a(()=>[e("div",Ge,[(o(!0),i(c,null,E(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Ue,[Oe,e("span",null,m(T(s)),1),He,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Ke],64))),128)),e("div",Me,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:n(k))?(o(),w(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:h[1]||(h[1]=s=>v())},{default:a(()=>[_(" Building... ")]),_:1})):(o(),w(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:h[0]||(h[0]=s=>z())},{default:a(()=>[_(" Start a new build ")]),_:1}))])])]),right:a(()=>[n(g)?(o(),w(O,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",Je,[Qe,We,r(M,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>R(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(J,{key:0,"n-orange":""},{default:a(()=>[_(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Ye,Ze,r(Q,{code:`npx nuxi analyze --no-serve --name=${n(t)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),r(W,{modelValue:n(x),"onUpdate:modelValue":h[3]||(h[3]=y=>R(x)?x.value=y:null),mt2:"",n:"primary"},{default:a(()=>[_(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[r(B,{onClick:y=>s(!1)},{default:a(()=>[_(" Cancel ")]),_:2},1032,["onClick"]),r(B,{n:"solid primary",onClick:y=>s(!0)},{default:a(()=>[_(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),r(q,null,{default:a(()=>[r(Z)]),_:1})],64)}}});export{st as default};
1
+ import{d as j,a as V,r as F,o,m as i,k as e,F as c,n as E,G as S,f as n,t as m,p as b,H as G,i as r,j as a,v as _,I as A,J as D,K as P,L,E as U,M as X,N as ee,O as te,P as ne,Q as oe,R as le,S as ie,U as k,h as w,l as R,V as se,W as ae,A as re}from"./entry.54b63325.js";import{_ as ue}from"./FilepathItem.vue.7bd675c6.js";import{_ as de}from"./NTip.vue.d193bf96.js";import{_ as ce}from"./NCodeBlock.vue.84865d5b.js";import{_ as me}from"./NCheckbox.vue.fcd1d971.js";import{_ as _e}from"./HelpFab.vue.f082102a.js";import"./client.d926285a.js";const pe={"h-full":"",grid:"~ rows-[max-content_1fr]"},fe={flex:"~ wrap","w-full":""},ve=["onClick"],he=e("div",{border:"b base","flex-auto":""},null,-1),ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be=e("div",{"flex-auto":""},null,-1),$e={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),ge=e("div",{"text-sm":"",op50:""}," Name ",-1),we=e("div",{"i-carbon-time":"","text-xl":""},null,-1),ze=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Be=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ce=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Ne=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Te=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),Ae=e("div",{"text-sm":"",op50:""}," Built ",-1),De=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ie=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Ve=e("div",{"flex-auto":""},null,-1),I="/__nuxt_devtools__/analyze/",Fe=j({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const t=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=F(f.value[0]);function $(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)}MB`:`${(t/1024/1024/1024).toFixed(1)}GB`}function g(t){return`${((t.endTime-t.startTime)/1e3).toFixed(1)}s`}async function x(t){return P.clearAnalyzeBuilds(await L(),[t])}return(t,u)=>{const z=ue,N=U;return o(),i("div",pe,[e("div",fe,[(o(!0),i(c,null,E(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:S(v.id===n(l).id?"":"op30")},m(v.name),3)],10,ve))),128)),he]),n(l).id==="overview"?(o(),i("div",ye,[be,e("div",$e,[xe,e("div",null,[ge,e("div",null,m(t.current.name),1)]),we,e("div",null,[ze,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[Be,e("div",null,[ke,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ce,e("div",null,[Ne,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Te,e("div",null,[Ae,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),De,e("div",null,[Ie,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Ve,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(t.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||n(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||n(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||n(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Se={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),Re=e("p",null,[_("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),je=[Pe,Re],Ee={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Se,je))}},Ge={flex:"~ col"},Le=["onClick"],Ue={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},Oe=e("div",{"i-carbon-time":""},null,-1),He=e("div",{"flex-auto":""},null,-1),Ke=e("div",{"x-divider":""},null,-1),Me={flex:"~ items-center justify-center wrap",p4:""},We={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Qe=e("p",{op50:""}," Enter the name of the build: ",-1),Ye=e("div",{my3:"","x-divider":""},null,-1),Ze=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},st=j({__name:"analyze-build",setup(C){const p=X(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=F(!1),t=F(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await P.generateAnalyzeBuildName(),await p.start()&&(k.value={name:t.value,processId:await P.startAnalyzeBuild(await L(),t.value)},x.value&&v())}const N=oe();function v(){k.value?.processId&&(N.value=k.value.processId,l.push("/modules/terminals"))}function T(d){return`${((d.endTime-d.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(d,h)=>{const B=U,O=Fe,H=re,K=ie,M=se,W=de,J=ce,Q=me,Y=ae,Z=Ee,q=_e;return o(),i(c,null,[r(K,{"left-size":30},{left:a(()=>[e("div",Ge,[(o(!0),i(c,null,E(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Ue,[Oe,e("span",null,m(T(s)),1),He,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Ke],64))),128)),e("div",Me,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:n(k))?(o(),w(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:h[1]||(h[1]=s=>v())},{default:a(()=>[_(" Building... ")]),_:1})):(o(),w(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:h[0]||(h[0]=s=>z())},{default:a(()=>[_(" Start a new build ")]),_:1}))])])]),right:a(()=>[n(g)?(o(),w(O,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",We,[Je,Qe,r(M,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>R(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(W,{key:0,"n-orange":""},{default:a(()=>[_(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Ye,Ze,r(J,{code:`npx nuxi analyze --no-serve --name=${n(t)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),r(Q,{modelValue:n(x),"onUpdate:modelValue":h[3]||(h[3]=y=>R(x)?x.value=y:null),mt2:"",n:"primary"},{default:a(()=>[_(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[r(B,{onClick:y=>s(!1)},{default:a(()=>[_(" Cancel ")]),_:2},1032,["onClick"]),r(B,{n:"solid primary",onClick:y=>s(!0)},{default:a(()=>[_(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),r(q,null,{default:a(()=>[r(Z)]),_:1})],64)}}});export{st as default};
@@ -1,9 +1,9 @@
1
- import{d as X,r as N,W as q,o as s,m as c,i as d,f as t,k as e,v as k,F as L,n as G,h as F,j as x,p as S,E as H,X as U,Y as me,Z as fe,J as Z,K as J,_ as te,a0 as oe,U as se,C as ae,a as A,a1 as ve,a2 as he,a3 as le,t as V,a4 as ie,a5 as _e,l as R,a6 as ge,b as ne,a7 as xe,e as be,a8 as we,a9 as re,H as W,aa as ye,ab as $e,V as ke,ac as Ce,ad as Pe,ae as Ae}from"./entry.05b33d7f.js";import{_ as De}from"./Navbar.vue.8dc15d25.js";import{_ as Ve}from"./NSectionBlock.2d8e1431.js";import{_ as Ne}from"./FilepathItem.vue.a4d269b8.js";import{_ as Fe,u as Ie}from"./storage-options.8fdc9b2a.js";import{_ as Se}from"./DrawerRight.vue.b9dc765f.js";import{D as Te}from"./constants.4e5eba24.js";import"./NIconTitle.vue.79485c3a.js";import"./NCodeBlock.vue.01eb6d1c.js";import"./client.c59e50d6.js";const je={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ee={for:"drop-zone-input","text-3xl":""},Ue={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Be=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Le={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},ze={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Oe={flex:"~ gap1","items-center":""},Re={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ke=X({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(T){const a=T,p=N(!1),n=N(),m=N([]),v=["image","video"];function D(i){n.value=i.target,p.value=!0}function u(i){i.target===n.value&&(p.value=!1)}function C(i){i.preventDefault()}function K(i){i.preventDefault(),B(i.dataTransfer.files)}function B(i){const g=Array.from(i||[]);if(g.length){const _=[],P=m.value.map(f=>f.name);for(const f of g)if(P.includes(f.name)){let r=1;const[y,l]=f.name.split(".");for(;P.includes(`${y} (${r}).${l}`);)r++;const o=`${y}-${r}.${l}`,M=new Blob([f],{type:f.type}),O=new File([M],o,{lastModified:Date.now()});_.push(O),P.push(o)}else f.type===""?U({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):v.some(r=>f.type.includes(r))?_.push(f):U({message:`"${f.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});m.value=[...m.value,..._]}}async function b(){if(me.value||fe.value)return;const i=[];for(const g of m.value){const _=new FileReader;_.readAsDataURL(g);const f=(await new Promise(r=>{_.onload=()=>r(_.result)})).split(";base64,").pop();i.push({path:g.name,encoding:"base64",content:f})}await Z.writeStaticAssets(await J(),[...i],a.folder).then(()=>{j(),U({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(g=>{console.error(g),j(),U({message:`Error uploading files: ${g}`,icon:"i-carbon-warning",classes:"text-red"})}),p.value=!1}function h(i){m.value?.splice(i,1)}function w(i){return URL.createObjectURL(i)}function z(i,g){const[_,P]=i.name.split("."),f=g.replace(/\.\w+$/,""),r=`${f}.${P}`;return f.length===0?(alert("File name must be at least 1 characters long"),_):(Object.defineProperty(i,"name",{value:r,writable:!1}),m.value.splice(m.value.indexOf(i),1,i),i)}function I(){m.value=[]}function j(){p.value=!1,I()}return q("dragenter",D),q("dragleave",u),q("dragover",C),q("drop",K),(i,g)=>{const _=te,P=oe,f=se,r=ae;return s(),c("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:H(t(p)?"opacity-100 visible":"opacity-0 invisible")},[d(_,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:j}),t(m)?.length?(s(),c("div",Ue,[Be,e("div",Le,[(s(!0),c(L,null,G(t(m),(y,l)=>(s(),c("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",ze,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:w(y)},null,8,Me)]),e("div",Oe,[d(f,{n:"xs","flex-auto":"","model-value":y.name,"onUpdate:modelValue":o=>z(y,o.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(_,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:o=>h(l)},null,8,["onClick"])])]))),128))]),e("div",Re,[t(m).length?(s(),F(r,{key:0,n:"red",onClick:I},{default:x(()=>[d(P,{icon:"carbon-clean"}),k(" Clear ")]),_:1})):S("",!0),d(r,{disabled:!t(m).length,n:"primary solid",onClick:b},{default:x(()=>[d(P,{icon:"carbon-cloud-upload"}),k(" Upload ")]),_:1},8,["disabled"])])])):(s(),c("div",je,[e("label",Ee,[d(P,{icon:"carbon-cloud-upload","mr-2":""}),k(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:g[0]||(g[0]=y=>B(y.target.files))},null,32)]))],2)}}}),Xe=X({__name:"AssetFontPreview",props:{asset:{}},setup(T){const a=T,p=A(()=>`devtools-assets-${ve(a.asset)}`);return he(A(()=>`
1
+ import{d as X,r as I,X as q,o as s,m as c,i as d,f as t,k as e,v as k,F as B,n as Z,h as N,j as x,p as S,G as Y,Y as U,Z as me,a0 as fe,K as G,L as H,_ as te,a1 as oe,V as se,E as ae,a as A,a2 as ve,a3 as he,a4 as le,t as V,a5 as ie,a6 as _e,l as R,a7 as ge,b as ne,a8 as xe,e as be,a9 as we,aa as re,I as W,ab as ye,ac as $e,W as ke,ad as Ce,ae as Pe,af as Ae}from"./entry.54b63325.js";import{_ as De}from"./Navbar.vue.bacddf14.js";import{_ as Ve}from"./NSectionBlock.42a3cefc.js";import{_ as Ie}from"./FilepathItem.vue.7bd675c6.js";import{_ as Ne,u as Fe}from"./storage-options.b1a5fc25.js";import{_ as Se}from"./DrawerRight.vue.5bde5a0b.js";import{D as Te}from"./constants.4e5eba24.js";import"./NIconTitle.vue.b6d28480.js";import"./NCodeBlock.vue.84865d5b.js";import"./client.d926285a.js";const je={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ee={for:"drop-zone-input","text-3xl":""},Ue={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Le=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Be={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},ze={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Oe={flex:"~ gap1","items-center":""},Re={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ke=X({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(T){const a=T,p=I(!1),n=I(),m=I([]),v=["image","video"];function D(i){n.value=i.target,p.value=!0}function u(i){i.target===n.value&&(p.value=!1)}function C(i){i.preventDefault()}function K(i){i.preventDefault(),L(i.dataTransfer.files)}function L(i){const g=Array.from(i||[]);if(g.length){const _=[],P=m.value.map(f=>f.name);for(const f of g)if(P.includes(f.name)){let r=1;const[y,l]=f.name.split(".");for(;P.includes(`${y} (${r}).${l}`);)r++;const o=`${y}-${r}.${l}`,M=new Blob([f],{type:f.type}),O=new File([M],o,{lastModified:Date.now()});_.push(O),P.push(o)}else f.type===""?U({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):v.some(r=>f.type.includes(r))?_.push(f):U({message:`"${f.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});m.value=[...m.value,..._]}}async function b(){if(me.value||fe.value)return;const i=[];for(const g of m.value){const _=new FileReader;_.readAsDataURL(g);const f=(await new Promise(r=>{_.onload=()=>r(_.result)})).split(";base64,").pop();i.push({path:g.name,encoding:"base64",content:f})}await G.writeStaticAssets(await H(),[...i],a.folder).then(()=>{j(),U({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(g=>{console.error(g),j(),U({message:`Error uploading files: ${g}`,icon:"i-carbon-warning",classes:"text-red"})}),p.value=!1}function h(i){m.value?.splice(i,1)}function w(i){return URL.createObjectURL(i)}function z(i,g){const[_,P]=i.name.split("."),f=g.replace(/\.\w+$/,""),r=`${f}.${P}`;return f.length===0?(alert("File name must be at least 1 characters long"),_):(Object.defineProperty(i,"name",{value:r,writable:!1}),m.value.splice(m.value.indexOf(i),1,i),i)}function F(){m.value=[]}function j(){p.value=!1,F()}return q("dragenter",D),q("dragleave",u),q("dragover",C),q("drop",K),(i,g)=>{const _=te,P=oe,f=se,r=ae;return s(),c("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:Y(t(p)?"opacity-100 visible":"opacity-0 invisible")},[d(_,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:j}),t(m)?.length?(s(),c("div",Ue,[Le,e("div",Be,[(s(!0),c(B,null,Z(t(m),(y,l)=>(s(),c("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",ze,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:w(y)},null,8,Me)]),e("div",Oe,[d(f,{n:"xs","flex-auto":"","model-value":y.name,"onUpdate:modelValue":o=>z(y,o.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(_,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:o=>h(l)},null,8,["onClick"])])]))),128))]),e("div",Re,[t(m).length?(s(),N(r,{key:0,n:"red",onClick:F},{default:x(()=>[d(P,{icon:"carbon-clean"}),k(" Clear ")]),_:1})):S("",!0),d(r,{disabled:!t(m).length,n:"primary solid",onClick:b},{default:x(()=>[d(P,{icon:"carbon-cloud-upload"}),k(" Upload ")]),_:1},8,["disabled"])])])):(s(),c("div",je,[e("label",Ee,[d(P,{icon:"carbon-cloud-upload","mr-2":""}),k(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:g[0]||(g[0]=y=>L(y.target.files))},null,32)]))],2)}}}),Xe=X({__name:"AssetFontPreview",props:{asset:{}},setup(T){const a=T,p=A(()=>`devtools-assets-${ve(a.asset)}`);return he(A(()=>`
2
2
  @font-face {
3
3
  font-family: '${p.value}';
4
4
  src: url('${a.asset.publicPath}');
5
5
  }
6
- `)),(n,m)=>(s(),c("div",{"of-hidden":"",style:le({fontFamily:`'${t(p)}'`})}," Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ",4))}}),Ze={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ge=["src"],We={key:2,"i-carbon-document":"","text-3xl":"",op20:""},qe={key:3,"w-full":"","self-start":"",p4:""},He=["textContent"],Je={key:4},Ye=["src","autoplay","controls"],Qe={key:5},et={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},tt=["src"],nt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ce=X({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(T){return(a,p)=>{const n=Xe;return s(),c("div",Ze,[a.asset.type==="image"?(s(),c("img",{key:0,src:a.asset.publicPath},null,8,Ge)):a.asset.type==="font"?(s(),F(n,{key:a.asset.publicPath,asset:a.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):a.asset.type==="text"&&!a.textContent?(s(),c("div",We)):a.asset.type==="text"&&a.textContent?(s(),c("div",qe,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:V(a.textContent)},null,8,He)])):a.asset.type==="video"?(s(),c("div",Je,[e("video",{src:a.asset.publicPath,autoplay:a.detail,controls:a.detail},null,8,Ye)])):a.asset.type==="audio"?(s(),c("div",Qe,[a.detail?(s(),c("audio",{key:1,src:a.asset.publicPath,controls:""},null,8,tt)):(s(),c("div",et))])):(s(),c("div",nt))])}}}),ot={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},st={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},at=X({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(T){const a=T,p=A(()=>a.folder&&a.asset.path.startsWith(a.folder)?a.asset.path.slice(a.folder.length):a.asset.path);return(n,m)=>{const v=ce;return s(),c("button",ot,[d(v,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:n.asset},null,8,["asset"]),e("div",st,V(t(p)),1)])}}}),ue=X({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(T,{emit:a}){const p=T,n=ie(p,"modelValue",a,{passive:!0}),m=A(()=>p.item?.children?.length),v=N(!0),D=A(()=>m.value?"i-carbon-folder":p.item.type==="image"?"i-carbon-image":p.item.type==="video"?"i-carbon-video":p.item.type==="audio"?"i-carbon-volume-up":p.item.type==="font"?"i-carbon-text-small-caps":p.item.type==="text"?"i-carbon-document":p.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(u,C)=>{const K=oe,B=ue;return s(),c("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:le({paddingLeft:`calc(1rem + ${u.index*1.5}em)`}),class:H({"bg-active":!t(m)&&t(n)?.filePath===u.item?.filePath}),border:"b base",onClick:C[0]||(C[0]=b=>t(m)?v.value=!t(v):n.value=u.item)},[e("div",{class:H(t(D))},null,2),e("span",{class:H({"flex items-center":t(m)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},V(u.item.path),3),t(m)?(s(),F(K,{key:0,icon:"carbon:chevron-right","transform-rotate":t(v)?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),t(v)?_e(u.$slots,"default",{key:0},()=>[(s(!0),c(L,null,G(u.item?.children,b=>(s(),F(B,{key:b.filepath,modelValue:t(n),"onUpdate:modelValue":C[1]||(C[1]=h=>R(n)?n.value=h:null),item:b,index:u.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),lt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},it=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),rt={flex:"~","items-center":"","justify-center":""},ct=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),ut={"max-w-full":"","w-full":"","table-fixed":""},dt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),pt={flex:"~ gap-1","w-full":"","items-center":""},mt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),ft={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},vt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},ht=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),_t={capitalize:""},gt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),xt={key:0},bt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),wt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),yt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),$t={op70:""},kt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),Ct={flex:"~ gap2 wrap"},Pt=e("div",{"flex-auto":""},null,-1),At={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Dt=e("span",null," Are you sure you want to delete this asset? ",-1),Vt={flex:"~ gap2 wrap justify-center"},Nt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Ft={flex:"~ gap2 wrap justify-center"},It={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},St=["onKeydown"],Tt={flex:"","justify-end":"","gap-4":""},jt=X({__name:"AssetDetails",props:{modelValue:{}},setup(T,{emit:a}){const n=ie(T,"modelValue",a,{passive:!0}),m=ge(),v=ne(()=>{if(n.value.type==="image")return Z.getImageMeta(n.value.filePath)}),D=N(!1),u=N(),C=N(0),K=ne(async()=>{if(n.value.type!=="text")return;C.value;const l=await Z.getTextAssetContent(n.value.filePath);return u.value=l,l});async function B(){if(K.value!==u.value)try{await Z.writeStaticAssets(await J(),[{path:n.value.path,content:u.value,override:!0}],""),D.value=!1,C.value++,U({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const b=xe(),h=A(()=>(b.value?._installedModules||[]).some(o=>o.meta?.name==="@nuxt/image"||o.meta?.name==="@nuxt/image-edge")),w=A(()=>{const l=[];if(n.value.type==="image"){const o=v.value?.width?`
6
+ `)),(n,m)=>(s(),c("div",{"of-hidden":"",style:le({fontFamily:`'${t(p)}'`})}," Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ",4))}}),Ge={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ze=["src"],We={key:2,"i-carbon-document":"","text-3xl":"",op20:""},qe={key:3,"w-full":"","self-start":"",p4:""},Ye=["textContent"],He={key:4},Je=["src","autoplay","controls"],Qe={key:5},et={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},tt=["src"],nt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ce=X({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(T){return(a,p)=>{const n=Xe;return s(),c("div",Ge,[a.asset.type==="image"?(s(),c("img",{key:0,src:a.asset.publicPath},null,8,Ze)):a.asset.type==="font"?(s(),N(n,{key:a.asset.publicPath,asset:a.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):a.asset.type==="text"&&!a.textContent?(s(),c("div",We)):a.asset.type==="text"&&a.textContent?(s(),c("div",qe,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:V(a.textContent)},null,8,Ye)])):a.asset.type==="video"?(s(),c("div",He,[e("video",{src:a.asset.publicPath,autoplay:a.detail,controls:a.detail},null,8,Je)])):a.asset.type==="audio"?(s(),c("div",Qe,[a.detail?(s(),c("audio",{key:1,src:a.asset.publicPath,controls:""},null,8,tt)):(s(),c("div",et))])):(s(),c("div",nt))])}}}),ot={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},st={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},at=X({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(T){const a=T,p=A(()=>a.folder&&a.asset.path.startsWith(a.folder)?a.asset.path.slice(a.folder.length):a.asset.path);return(n,m)=>{const v=ce;return s(),c("button",ot,[d(v,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:n.asset},null,8,["asset"]),e("div",st,V(t(p)),1)])}}}),ue=X({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(T,{emit:a}){const p=T,n=ie(p,"modelValue",a,{passive:!0}),m=A(()=>p.item?.children?.length),v=I(!0),D=A(()=>m.value?"i-carbon-folder":p.item.type==="image"?"i-carbon-image":p.item.type==="video"?"i-carbon-video":p.item.type==="audio"?"i-carbon-volume-up":p.item.type==="font"?"i-carbon-text-small-caps":p.item.type==="text"?"i-carbon-document":p.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(u,C)=>{const K=oe,L=ue;return s(),c("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:le({paddingLeft:`calc(1rem + ${u.index*1.5}em)`}),class:Y({"bg-active":!t(m)&&t(n)?.filePath===u.item?.filePath}),border:"b base",onClick:C[0]||(C[0]=b=>t(m)?v.value=!t(v):n.value=u.item)},[e("div",{class:Y(t(D))},null,2),e("span",{class:Y({"flex items-center":t(m)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},V(u.item.path),3),t(m)?(s(),N(K,{key:0,icon:"carbon:chevron-right","transform-rotate":t(v)?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),t(v)?_e(u.$slots,"default",{key:0},()=>[(s(!0),c(B,null,Z(u.item?.children,b=>(s(),N(L,{key:b.filepath,modelValue:t(n),"onUpdate:modelValue":C[1]||(C[1]=h=>R(n)?n.value=h:null),item:b,index:u.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),lt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},it=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),rt={flex:"~","items-center":"","justify-center":""},ct=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),ut={"max-w-full":"","w-full":"","table-fixed":""},dt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),pt={flex:"~ gap-1","w-full":"","items-center":""},mt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),ft={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},vt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},ht=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),_t={capitalize:""},gt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),xt={key:0},bt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),wt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),yt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),$t={op70:""},kt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),Ct={flex:"~ gap2 wrap"},Pt=e("div",{"flex-auto":""},null,-1),At={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Dt=e("span",null," Are you sure you want to delete this asset? ",-1),Vt={flex:"~ gap2 wrap justify-center"},It={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Nt={flex:"~ gap2 wrap justify-center"},Ft={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},St=["onKeydown"],Tt={flex:"","justify-end":"","gap-4":""},jt=X({__name:"AssetDetails",props:{modelValue:{}},setup(T,{emit:a}){const n=ie(T,"modelValue",a,{passive:!0}),m=ge(),v=ne(()=>{if(n.value.type==="image")return G.getImageMeta(n.value.filePath)}),D=I(!1),u=I(),C=I(0),K=ne(async()=>{if(n.value.type!=="text")return;C.value;const l=await G.getTextAssetContent(n.value.filePath);return u.value=l,l});async function L(){if(K.value!==u.value)try{await G.writeStaticAssets(await H(),[{path:n.value.path,content:u.value,override:!0}],""),D.value=!1,C.value++,U({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const b=xe(),h=A(()=>(b.value?._installedModules||[]).some(o=>o.meta?.name==="@nuxt/image"||o.meta?.name==="@nuxt/image-edge")),w=A(()=>{const l=[];if(n.value.type==="image"){const o=v.value?.width?`
7
7
  width="${v.value.width}"
8
8
  height="${v.value.height}" `:" ";return l.push({lang:"vue-html",code:`<img${o}
9
9
  src="${n.value.publicPath}"
@@ -13,4 +13,4 @@ import{d as X,r as N,W as q,o as s,m as c,i as d,f as t,k as e,v as k,F as L,n a
13
13
  src="${n.value.publicPath}"
14
14
  />`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),l}return l.push({lang:"html",code:`<a download href="${n.value.publicPath}">
15
15
  Download ${n.value.path.split("/").slice(-1)[0]}
16
- </a>`,name:"Download link"}),l}),z=be(),I=we(()=>n.value.mtime),j=A(()=>{const l=n.value.size;return l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(2)} KB`:`${(l/1024/1024).toFixed(2)} MB`}),i=A(()=>{if(!v.value?.width||!v.value?.height)return"";const l=(M,O)=>O?l(O,M%O):M,o=l(v.value.width,v.value.height);return o>3?`${v.value.width/o}:${v.value.height/o}`:""}),g=A(()=>["image","text","video","audio","font"].includes(n.value.type)),_=N(!1);async function P(){try{await Z.deleteStaticAsset(await J(),n.value.filePath),n.value=void 0,_.value=!1,U({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const f=N(!1),r=N("");async function y(){const l=n.value.filePath.split("/"),o=l.slice(-1)[0].split(".").slice(0,-1).join(".");if(!r.value||r.value===o)return U({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const M=l.slice(-1)[0].split(".").slice(-1)[0],O=`${l.slice(0,-1).join("/")}/${r.value}.${M}`;await Z.renameStaticAsset(await J(),n.value.filePath,O),n.value=void 0,f.value=!1,U({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(l,o)=>{const M=ce,O=Ne,Y=te,E=ae,de=Fe,Q=ke,pe=se,ee=re("tooltip");return s(),c(L,null,[e("div",lt,[t(g)?(s(),c(L,{key:0},[it,e("div",rt,[d(M,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(n),"text-content":t(K)},null,8,["asset","text-content"])])],64)):S("",!0),ct,e("table",ut,[e("tbody",null,[e("tr",null,[dt,e("td",null,[e("div",pt,[d(O,{filepath:t(n).filePath,"text-left":""},null,8,["filepath"]),W(d(Y,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:o[0]||(o[0]=$=>t(m)(t(n).filePath))},null,512),[[ee,"Open in Editor"]])])])]),e("tr",null,[mt,e("td",null,[e("div",ft,[e("div",vt,V(t(n).publicPath),1),W(d(Y,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:o[1]||(o[1]=$=>t(z)(t(n).publicPath))},null,512),[[ee,"Copy public path"]]),W(d(Y,{"flex-none":"",to:t(n).publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"]),[[ee,"Open in browser"]])])])]),e("tr",null,[ht,e("td",_t,V(t(n).type),1)]),t(v)?.width?(s(),c(L,{key:0},[e("tr",null,[gt,e("td",null,V(t(v).width)+" x "+V(t(v).height),1)]),t(i)?(s(),c("tr",xt,[bt,e("td",null,V(t(i)),1)])):S("",!0)],64)):S("",!0),e("tr",null,[wt,e("td",null,V(t(j)),1)]),e("tr",null,[yt,e("td",null,[k(V(new Date(t(n).mtime).toLocaleString())+" ",1),e("span",$t,"("+V(t(I))+")",1)])])])]),kt,e("div",Ct,[d(E,{to:t(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:x(()=>[k(" Download ")]),_:1},8,["to"]),t(n).type==="text"?(s(),F(E,{key:0,icon:"carbon-edit",n:"cyan",onClick:o[2]||(o[2]=$=>D.value=!t(D))},{default:x(()=>[k(" Edit ")]),_:1})):S("",!0),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:o[3]||(o[3]=$=>f.value=!t(f))},{default:x(()=>[k(" Rename ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:o[4]||(o[4]=$=>_.value=!t(_))},{default:x(()=>[k(" Delete ")]),_:1}),t(n).type==="image"?(s(),F(E,{key:1,disabled:"",icon:"carbon-image-service"},{default:x(()=>[k(" Optimize image (Coming soon) ")]),_:1})):S("",!0)]),Pt,t(w).length?(s(),F(de,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(w)},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:t(_),"onUpdate:modelValue":o[6]||(o[6]=$=>R(_)?_.value=$:null)},{default:x(()=>[e("div",At,[Dt,e("div",Vt,[d(E,{icon:"carbon-close",onClick:o[5]||(o[5]=$=>_.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:P},{default:x(()=>[k(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:t(f),"onUpdate:modelValue":o[9]||(o[9]=$=>R(f)?f.value=$:null)},{default:x(()=>[e("div",Nt,[d(pe,{modelValue:t(r),"onUpdate:modelValue":o[7]||(o[7]=$=>R(r)?r.value=$:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",Ft,[d(E,{icon:"carbon-close",onClick:o[8]||(o[8]=$=>f.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:y},{default:x(()=>[k(" Rename ")]),_:1})])])]),_:1},8,["modelValue"]),t(n).type==="text"?(s(),F(Q,{key:0,modelValue:t(D),"onUpdate:modelValue":o[12]||(o[12]=$=>R(D)?D.value=$:null)},{default:x(()=>[e("div",It,[W(e("textarea",{"onUpdate:modelValue":o[10]||(o[10]=$=>R(u)?u.value=$:null),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:ye(B,["enter"])},null,40,St),[[$e,t(u)]]),e("div",Tt,[d(E,{icon:"carbon-close",onClick:o[11]||(o[11]=$=>D.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon:save",n:"primary",onClick:B},{default:x(()=>[k(" save ")]),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Et={"h-full":"","of-auto":""},Ut={"flex-none":"",flex:"~ gap2 items-center"},Bt={op50:""},Lt={key:0},zt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Mt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Ot={key:1},Qt=X({__name:"assets",setup(T){const a=Ce(),p=N(""),n=A(()=>new Pe(a.value||[],{keys:["path"]})),m=A(()=>p.value?n.value.search(p.value).map(h=>h.item):a.value||[]),v=A(()=>{const b={};for(const h of m.value){const w=`${h.path.split("/").slice(0,-1).join("/")}/`;b[w]||(b[w]=[]),b[w].push(h)}return Object.entries(b).sort(([h],[w])=>h.localeCompare(w))}),D=A(()=>{const b={path:"public",children:[]},h=(w,z,I)=>{const[j,...i]=z;let g=w.children.find(_=>_.path===j);g||(g={...I,path:j,children:[]},w.children.push(g)),i.length>1?h(g,i,I):i.length===1&&g.children.push({...I,path:i[0]})};return m.value.forEach(w=>{const z=w.path.split("/").filter(I=>I!=="");h(b,z,w)}),b.children}),u=N(),{view:C}=Ie("assets");function K(){C.value=C.value==="list"?"grid":"list"}Ae("Escape",()=>{u.value=void 0});const B=N();return(b,h)=>{const w=te,z=De,I=Ke,j=at,i=Ve,g=ue,_=jt,P=Se,f=re("tooltip");return s(),c("div",Et,[d(z,{ref_key:"navbar",ref:B,search:t(p),"onUpdate:search":h[0]||(h[0]=r=>R(p)?p.value=r:null),pb2:""},{actions:x(()=>[e("div",Ut,[W(d(w,{"text-lg":"",icon:t(C)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:K},null,8,["icon"]),[[f,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:x(()=>[e("div",Bt,[t(p)?(s(),c("span",Lt,V(t(m).length)+" matched · ",1)):S("",!0),e("span",null,V(t(a)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(I,{folder:"/"}),t(C)==="grid"?(s(),c(L,{key:0},[t(v).length>1?(s(!0),c(L,{key:0},G(t(v),([r,y])=>(s(),F(i,{key:r,text:r,description:`${y.length} items`,open:y.length<=("DETAILS_MAX_ITEMS"in b?b.DETAILS_MAX_ITEMS:t(Te)),padding:!1},{default:x(()=>[e("div",zt,[(s(!0),c(L,null,G(y,l=>(s(),F(j,{key:l.path,asset:l,folder:r,onClick:o=>u.value=l},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(s(),c("div",Mt,[(s(!0),c(L,null,G(t(m),r=>(s(),F(j,{key:r.path,asset:r,onClick:y=>u.value=r},null,8,["asset","onClick"]))),128))]))],64)):(s(),c("div",Ot,[(s(!0),c(L,null,G(t(D),(r,y)=>(s(),F(g,{key:y,modelValue:t(u),"onUpdate:modelValue":h[1]||(h[1]=l=>R(u)?u.value=l:null),item:r},null,8,["modelValue","item"]))),128))])),d(P,{"model-value":!!t(u),"auto-close":"","w-120":"",navbar:t(B),onClose:h[3]||(h[3]=r=>u.value=void 0)},{default:x(()=>[t(u)?(s(),F(_,{key:0,modelValue:t(u),"onUpdate:modelValue":h[2]||(h[2]=r=>R(u)?u.value=r:null)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Qt as default};
16
+ </a>`,name:"Download link"}),l}),z=be(),F=we(()=>n.value.mtime),j=A(()=>{const l=n.value.size;return l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(2)} KB`:`${(l/1024/1024).toFixed(2)} MB`}),i=A(()=>{if(!v.value?.width||!v.value?.height)return"";const l=(M,O)=>O?l(O,M%O):M,o=l(v.value.width,v.value.height);return o>3?`${v.value.width/o}:${v.value.height/o}`:""}),g=A(()=>["image","text","video","audio","font"].includes(n.value.type)),_=I(!1);async function P(){try{await G.deleteStaticAsset(await H(),n.value.filePath),n.value=void 0,_.value=!1,U({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const f=I(!1),r=I("");async function y(){const l=n.value.filePath.split("/"),o=l.slice(-1)[0].split(".").slice(0,-1).join(".");if(!r.value||r.value===o)return U({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const M=l.slice(-1)[0].split(".").slice(-1)[0],O=`${l.slice(0,-1).join("/")}/${r.value}.${M}`;await G.renameStaticAsset(await H(),n.value.filePath,O),n.value=void 0,f.value=!1,U({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(l,o)=>{const M=ce,O=Ie,J=te,E=ae,de=Ne,Q=ke,pe=se,ee=re("tooltip");return s(),c(B,null,[e("div",lt,[t(g)?(s(),c(B,{key:0},[it,e("div",rt,[d(M,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(n),"text-content":t(K)},null,8,["asset","text-content"])])],64)):S("",!0),ct,e("table",ut,[e("tbody",null,[e("tr",null,[dt,e("td",null,[e("div",pt,[d(O,{filepath:t(n).filePath,"text-left":""},null,8,["filepath"]),W(d(J,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:o[0]||(o[0]=$=>t(m)(t(n).filePath))},null,512),[[ee,"Open in Editor"]])])])]),e("tr",null,[mt,e("td",null,[e("div",ft,[e("div",vt,V(t(n).publicPath),1),W(d(J,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:o[1]||(o[1]=$=>t(z)(t(n).publicPath))},null,512),[[ee,"Copy public path"]]),W(d(J,{"flex-none":"",to:t(n).publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"]),[[ee,"Open in browser"]])])])]),e("tr",null,[ht,e("td",_t,V(t(n).type),1)]),t(v)?.width?(s(),c(B,{key:0},[e("tr",null,[gt,e("td",null,V(t(v).width)+" x "+V(t(v).height),1)]),t(i)?(s(),c("tr",xt,[bt,e("td",null,V(t(i)),1)])):S("",!0)],64)):S("",!0),e("tr",null,[wt,e("td",null,V(t(j)),1)]),e("tr",null,[yt,e("td",null,[k(V(new Date(t(n).mtime).toLocaleString())+" ",1),e("span",$t,"("+V(t(F))+")",1)])])])]),kt,e("div",Ct,[d(E,{to:t(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:x(()=>[k(" Download ")]),_:1},8,["to"]),t(n).type==="text"?(s(),N(E,{key:0,icon:"carbon-edit",n:"cyan",onClick:o[2]||(o[2]=$=>D.value=!t(D))},{default:x(()=>[k(" Edit ")]),_:1})):S("",!0),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:o[3]||(o[3]=$=>f.value=!t(f))},{default:x(()=>[k(" Rename ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:o[4]||(o[4]=$=>_.value=!t(_))},{default:x(()=>[k(" Delete ")]),_:1}),t(n).type==="image"?(s(),N(E,{key:1,disabled:"",icon:"carbon-image-service"},{default:x(()=>[k(" Optimize image (Coming soon) ")]),_:1})):S("",!0)]),Pt,t(w).length?(s(),N(de,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(w)},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:t(_),"onUpdate:modelValue":o[6]||(o[6]=$=>R(_)?_.value=$:null)},{default:x(()=>[e("div",At,[Dt,e("div",Vt,[d(E,{icon:"carbon-close",onClick:o[5]||(o[5]=$=>_.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:P},{default:x(()=>[k(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:t(f),"onUpdate:modelValue":o[9]||(o[9]=$=>R(f)?f.value=$:null)},{default:x(()=>[e("div",It,[d(pe,{modelValue:t(r),"onUpdate:modelValue":o[7]||(o[7]=$=>R(r)?r.value=$:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",Nt,[d(E,{icon:"carbon-close",onClick:o[8]||(o[8]=$=>f.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:y},{default:x(()=>[k(" Rename ")]),_:1})])])]),_:1},8,["modelValue"]),t(n).type==="text"?(s(),N(Q,{key:0,modelValue:t(D),"onUpdate:modelValue":o[12]||(o[12]=$=>R(D)?D.value=$:null)},{default:x(()=>[e("div",Ft,[W(e("textarea",{"onUpdate:modelValue":o[10]||(o[10]=$=>R(u)?u.value=$:null),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:ye(L,["enter"])},null,40,St),[[$e,t(u)]]),e("div",Tt,[d(E,{icon:"carbon-close",onClick:o[11]||(o[11]=$=>D.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon:save",n:"primary",onClick:L},{default:x(()=>[k(" save ")]),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Et={"h-full":"","of-auto":""},Ut={"flex-none":"",flex:"~ gap2 items-center"},Lt={op50:""},Bt={key:0},zt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Mt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Ot={key:1},Qt=X({__name:"assets",setup(T){const a=Ce(),p=I(""),n=A(()=>new Pe(a.value||[],{keys:["path"]})),m=A(()=>p.value?n.value.search(p.value).map(h=>h.item):a.value||[]),v=A(()=>{const b={};for(const h of m.value){const w=`${h.path.split("/").slice(0,-1).join("/")}/`;b[w]||(b[w]=[]),b[w].push(h)}return Object.entries(b).sort(([h],[w])=>h.localeCompare(w))}),D=A(()=>{const b={path:"public",children:[]},h=(w,z,F)=>{const[j,...i]=z;let g=w.children.find(_=>_.path===j);g||(g={...F,path:j,children:[]},w.children.push(g)),i.length>1?h(g,i,F):i.length===1&&g.children.push({...F,path:i[0]})};return m.value.forEach(w=>{const z=w.path.split("/").filter(F=>F!=="");h(b,z,w)}),b.children}),u=I(),{view:C}=Fe("assets");function K(){C.value=C.value==="list"?"grid":"list"}Ae("Escape",()=>{u.value=void 0});const L=I();return(b,h)=>{const w=te,z=De,F=Ke,j=at,i=Ve,g=ue,_=jt,P=Se,f=re("tooltip");return s(),c("div",Et,[d(z,{ref_key:"navbar",ref:L,search:t(p),"onUpdate:search":h[0]||(h[0]=r=>R(p)?p.value=r:null),pb2:""},{actions:x(()=>[e("div",Ut,[W(d(w,{"text-lg":"",icon:t(C)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:K},null,8,["icon"]),[[f,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:x(()=>[e("div",Lt,[t(p)?(s(),c("span",Bt,V(t(m).length)+" matched · ",1)):S("",!0),e("span",null,V(t(a)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(F,{folder:"/"}),t(C)==="grid"?(s(),c(B,{key:0},[t(v).length>1?(s(!0),c(B,{key:0},Z(t(v),([r,y])=>(s(),N(i,{key:r,text:r,description:`${y.length} items`,open:y.length<=("DETAILS_MAX_ITEMS"in b?b.DETAILS_MAX_ITEMS:t(Te)),padding:!1},{default:x(()=>[e("div",zt,[(s(!0),c(B,null,Z(y,l=>(s(),N(j,{key:l.path,asset:l,folder:r,onClick:o=>u.value=l},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(s(),c("div",Mt,[(s(!0),c(B,null,Z(t(m),r=>(s(),N(j,{key:r.path,asset:r,onClick:y=>u.value=r},null,8,["asset","onClick"]))),128))]))],64)):(s(),c("div",Ot,[(s(!0),c(B,null,Z(t(D),(r,y)=>(s(),N(g,{key:y,modelValue:t(u),"onUpdate:modelValue":h[1]||(h[1]=l=>R(u)?u.value=l:null),item:r},null,8,["modelValue","item"]))),128))])),d(P,{"model-value":!!t(u),"auto-close":"","w-120":"",navbar:t(L),onClose:h[3]||(h[3]=r=>u.value=void 0)},{default:x(()=>[t(u)?(s(),N(_,{key:0,modelValue:t(u),"onUpdate:modelValue":h[2]||(h[2]=r=>R(u)?u.value=r:null)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Qt as default};
@@ -1 +1 @@
1
- import{bk as f,bz as r}from"./entry.05b33d7f.js";let o;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&n.forEach(t=>t(e))},get(){return o.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){o||(o=f(),s(e));function i(){r(o)}function e(t){o.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return o}const c=u();export{c as d};
1
+ import{bl as f,bA as r}from"./entry.54b63325.js";let o;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&n.forEach(t=>t(e))},get(){return o.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){o||(o=f(),s(e));function i(){r(o)}function e(t){o.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return o}const c=u();export{c as d};
@@ -1,4 +1,4 @@
1
- import{o as te,m as Te,k as Z,v as La,d as Kn,a as Jt,t as au,f as Y,e as _k,i as Se,h as ut,p as lt,F as lr,n as bi,a5 as Au,_ as Sw,r as yn,af as Ek,ag as Sk,a7 as Ok,ah as Tk,ai as kk,w as Pk,j as Ve,aj as Ow,ak as Ik,l as $i,C as Ck,al as xk,E as Ak,am as Rk,ad as Dk,an as Mk,ao as Nk,ap as ts,a0 as Fk,aq as Bk,a9 as Lk,ar as jk,H as ng}from"./entry.05b33d7f.js";import{_ as zk}from"./HelpFab.vue.c0c3f8e6.js";import{u as Hk,a as Wk}from"./state-components.a223a28c.js";import{_ as Vk}from"./NCheckbox.vue.0e359f85.js";import{_ as Tw}from"./Navbar.vue.8dc15d25.js";import{_ as kw}from"./Badge.a4bd58d4.js";import{_ as Pw}from"./FilepathItem.vue.a4d269b8.js";import{_ as Uk}from"./DrawerRight.vue.b9dc765f.js";import{_ as Gk}from"./NSelectTabs.vue.72adf277.js";import{_ as Kk}from"./NSectionBlock.2d8e1431.js";import{_ as qk}from"./NIconTitle.vue.79485c3a.js";import{D as Al}from"./constants.4e5eba24.js";const Yk={class:"markdown-body"},Xk=Z("h1",null,"Components",-1),Qk=Z("p",null,[La("Vue components under the "),Z("code",null,"components/"),La(" directory are automatically registered and can be used in your templates without importing them.")],-1),Jk=Z("p",null,[Z("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Zk=[Xk,Qk,Jk],eP={__name:"components",setup(t,{expose:n}){return n({frontmatter:{}}),(r,i)=>(te(),Te("div",Yk,Zk))}},tP=/\d/,rP=["-","_","/","."];function iP(t=""){if(!tP.test(t))return t.toUpperCase()===t}function nP(t,n){const e=n??rP,r=[];if(!t||typeof t!="string")return r;let i="",a,o;for(const s of t){const u=e.includes(s);if(u===!0){r.push(i),i="",a=void 0;continue}const l=iP(s);if(o===!1){if(a===!1&&l===!0){r.push(i),i=s,a=l;continue}if(a===!0&&l===!1&&i.length>1){const h=i[i.length-1];r.push(i.slice(0,Math.max(0,i.length-1))),i=h+s,a=l;continue}}i+=s,a=l,o=u}return r.push(i),r}function aP(t){return t?t[0].toUpperCase()+t.slice(1):""}function Iw(t){return t?(Array.isArray(t)?t:nP(t)).map(n=>aP(n)).join(""):""}const oP={"text-sm":"","font-mono":""},sP=Z("span",{mr1:"",op20:""},"<",-1),uP=Z("span",{ml1:"",op20:""},"/>",-1),Cw=Kn({__name:"ComponentName",props:{component:{}},setup(t){const n=t,e=Jt(()=>n.component.pascalName||Iw(n.component.name||n.component.__name||n.component.kebabName||""));return(r,i)=>(te(),Te("code",oP,[sP,La(au(Y(e)),1),uP]))}}),lP={flex:"~ col gap1","items-start":"","of-hidden":""},hP={flex:"~ gap2",px3:""},dP={px3:"",pb2:""},cP={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},fP={"text-sm":""},vP={"text-primary":""},pP=Z("span",{op50:""}," references",-1),gP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},yP={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},mP={"text-sm":""},bP={"text-primary":""},$P=Z("span",{op50:""}," dependencies",-1),wP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},xw=Kn({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(t){const n=t,e=Jt(()=>n.component.pascalName||Iw(n.component.name||n.component.__name||n.component.kebabName||"")),r=Jt(()=>n.component.filePath||n.component.file||n.component.__file||""),i=_k();return(a,o)=>{const s=Cw,u=Sw,l=kw,h=Pw;return te(),Te("div",lP,[Z("div",hP,[Se(s,{component:a.component},null,8,["component"]),Se(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=d=>Y(i)(`<${Y(e)}></${Y(e)}>`))}),a.component.global?(te(),ut(l,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0)]),Z("div",dP,[Y(r)?(te(),ut(h,{key:0,filepath:Y(r),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)]),a.dependents?(te(),Te("div",cP,[Z("div",fP,[Z("strong",vP,au(a.dependents.length),1),pP]),a.dependents.length?(te(),Te("div",gP,[(te(!0),Te(lr,null,bi(a.dependents,d=>(te(),ut(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),a.dependencies?(te(),Te("div",yP,[Z("div",mP,[Z("strong",bP,au(a.dependencies.length),1),$P]),a.dependencies.length?(te(),Te("div",wP,[(te(!0),Te(lr,null,bi(a.dependencies,d=>(te(),ut(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),Au(a.$slots,"default")])}}});/**
1
+ import{o as te,m as Te,k as Z,v as La,d as Kn,a as Jt,t as au,f as Y,e as _k,i as Se,h as ut,p as lt,F as lr,n as bi,a6 as Au,_ as Sw,r as yn,ag as Ek,ah as Sk,a8 as Ok,ai as Tk,aj as kk,w as Pk,j as Ve,ak as Ow,al as Ik,l as $i,E as Ck,am as xk,G as Ak,an as Rk,ae as Dk,ao as Mk,ap as Nk,aq as ts,a1 as Fk,ar as Bk,aa as Lk,as as jk,I as ng}from"./entry.54b63325.js";import{_ as zk}from"./HelpFab.vue.f082102a.js";import{u as Hk,a as Wk}from"./state-components.c2201640.js";import{_ as Vk}from"./NCheckbox.vue.fcd1d971.js";import{_ as Tw}from"./Navbar.vue.bacddf14.js";import{_ as kw}from"./Badge.15b76164.js";import{_ as Pw}from"./FilepathItem.vue.7bd675c6.js";import{_ as Uk}from"./DrawerRight.vue.5bde5a0b.js";import{_ as Gk}from"./NSelectTabs.vue.4a83d611.js";import{_ as Kk}from"./NSectionBlock.42a3cefc.js";import{_ as qk}from"./NIconTitle.vue.b6d28480.js";import{D as Al}from"./constants.4e5eba24.js";const Yk={class:"markdown-body"},Xk=Z("h1",null,"Components",-1),Qk=Z("p",null,[La("Vue components under the "),Z("code",null,"components/"),La(" directory are automatically registered and can be used in your templates without importing them.")],-1),Jk=Z("p",null,[Z("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Zk=[Xk,Qk,Jk],eP={__name:"components",setup(t,{expose:n}){return n({frontmatter:{}}),(r,i)=>(te(),Te("div",Yk,Zk))}},tP=/\d/,rP=["-","_","/","."];function iP(t=""){if(!tP.test(t))return t.toUpperCase()===t}function nP(t,n){const e=n??rP,r=[];if(!t||typeof t!="string")return r;let i="",a,o;for(const s of t){const u=e.includes(s);if(u===!0){r.push(i),i="",a=void 0;continue}const l=iP(s);if(o===!1){if(a===!1&&l===!0){r.push(i),i=s,a=l;continue}if(a===!0&&l===!1&&i.length>1){const h=i[i.length-1];r.push(i.slice(0,Math.max(0,i.length-1))),i=h+s,a=l;continue}}i+=s,a=l,o=u}return r.push(i),r}function aP(t){return t?t[0].toUpperCase()+t.slice(1):""}function Iw(t){return t?(Array.isArray(t)?t:nP(t)).map(n=>aP(n)).join(""):""}const oP={"text-sm":"","font-mono":""},sP=Z("span",{mr1:"",op20:""},"<",-1),uP=Z("span",{ml1:"",op20:""},"/>",-1),Cw=Kn({__name:"ComponentName",props:{component:{}},setup(t){const n=t,e=Jt(()=>n.component.pascalName||Iw(n.component.name||n.component.__name||n.component.kebabName||""));return(r,i)=>(te(),Te("code",oP,[sP,La(au(Y(e)),1),uP]))}}),lP={flex:"~ col gap1","items-start":"","of-hidden":""},hP={flex:"~ gap2",px3:""},dP={px3:"",pb2:""},cP={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},fP={"text-sm":""},vP={"text-primary":""},pP=Z("span",{op50:""}," references",-1),gP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},yP={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},mP={"text-sm":""},bP={"text-primary":""},$P=Z("span",{op50:""}," dependencies",-1),wP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},xw=Kn({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(t){const n=t,e=Jt(()=>n.component.pascalName||Iw(n.component.name||n.component.__name||n.component.kebabName||"")),r=Jt(()=>n.component.filePath||n.component.file||n.component.__file||""),i=_k();return(a,o)=>{const s=Cw,u=Sw,l=kw,h=Pw;return te(),Te("div",lP,[Z("div",hP,[Se(s,{component:a.component},null,8,["component"]),Se(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=d=>Y(i)(`<${Y(e)}></${Y(e)}>`))}),a.component.global?(te(),ut(l,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0)]),Z("div",dP,[Y(r)?(te(),ut(h,{key:0,filepath:Y(r),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)]),a.dependents?(te(),Te("div",cP,[Z("div",fP,[Z("strong",vP,au(a.dependents.length),1),pP]),a.dependents.length?(te(),Te("div",gP,[(te(!0),Te(lr,null,bi(a.dependents,d=>(te(),ut(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),a.dependencies?(te(),Te("div",yP,[Z("div",mP,[Z("strong",bP,au(a.dependencies.length),1),$P]),a.dependencies.length?(te(),Te("div",wP,[(te(!0),Te(lr,null,bi(a.dependencies,d=>(te(),ut(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),Au(a.$slots,"default")])}}});/**
2
2
  * vis-data
3
3
  * http://visjs.org/
4
4
  *
@@ -0,0 +1 @@
1
+ import{d as q,ag as N,r as A,a as x,at as V,au as $,aj as B,av as D,aw as y,ax as E,ay as I,m as M,o as s,az as L,O,aA as P,aB as C,K as T,f as a,h as c,j as b,p as W,as as F,F as R,A as S,k as u,v as w,t as j,i as U,al as z,aC as G}from"./entry.54b63325.js";import{_ as K}from"./LaunchPage.vue.f8df9e2a.js";import"./NMarkdown.vue.d2063d22.js";import"./client.d926285a.js";const g=new Map,X=q({__name:"IframeView",props:{tab:{}},setup(f){const m=f,r=N(),v=A(),i=x(()=>m.tab.name),e=A(),t=V($(v));B(()=>{const n=m.tab.view,l=n.persistent!==!1,h=["clipboard-write","clipboard-read"];if(g.get(i.value)&&l)e.value=g.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",h.join("; ")),l&&g.set(i.value,e.value),e.value.src=n.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{d(),o(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),D(_)}setTimeout(o,100)}),y(_),y(o),y(d),E(()=>{e.value&&(e.value.style.visibility="hidden")});function o(){if(!(!e.value||!e.value.contentWindow))try{const n=e.value.contentWindow.document.querySelector("html");n?.classList.toggle("dark",r.value==="dark"),n?.classList.toggle("light",r.value==="dark"),new MutationObserver(()=>{r.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(n,{attributes:!0,attributeFilter:["class"]})}catch{}}const p=I();function d(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=p.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(n,l)=>(s(),M("div",{ref_key:"anchor",ref:v,"h-full":"","w-full":""},null,512))}}),H={flex:"~ col gap2",mxa:"","items-center":""},J=u("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),Q={"text-xl":""},Y={"text-rose":""},Z=u("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),ee=u("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),se=q({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,r=L(),v=O(),i=x(()=>m.name??r.params.name),e=P(),t=x(()=>e.value.find(o=>o.name===i.value));return B(()=>{t.value?t.value.requireAuth&&!C.value&&T.requestForAuth():setTimeout(()=>{t.value||v.push("/modules/overview")},2e3)}),(o,p)=>{const d=S,_=G,n=X,l=K,h=z;return s(),M(R,null,[a(t)?W("",!0):(s(),c(d,{key:0},{default:b(()=>[u("div",H,[J,u("p",Q,[w(" Tab "),u("code",Y,j(a(i)),1),w(" not found ")]),Z,ee])]),_:1})),a(t).requireAuth&&!("isDevAuthed"in o?o.isDevAuthed:a(C))?(s(),c(_,{key:1})):a(t).view.type==="iframe"?(s(),c(n,{key:2,tab:a(t)},null,8,["tab"])):a(t).view.type==="vnode"?(s(),c(F(a(t).view.vnode),{key:3})):a(t).view.type==="launch"?(s(),c(l,{key:4,icon:a(t).view.icon||a(t).icon,title:a(t).view.title||a(t).title,description:a(t).view.description,actions:a(t).view.actions,onAction:p[0]||(p[0]=k=>("rpc"in o?o.rpc:a(T)).customTabAction(a(t).name,k))},null,8,["icon","title","description","actions"])):(s(),c(d,{key:5},{default:b(()=>[U(h,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:b(()=>[w(" Unknown tab type "+j(a(t).view),1)]),_:1})]),_:1}))],64)}}});export{se as default};
@@ -1 +1 @@
1
- import{q as o,m as s,k as t,a5 as a,o as n}from"./entry.05b33d7f.js";const r={},c={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function d(e,_){return n(),s("div",c,[t("div",l,[a(e.$slots,"default")])])}const i=o(r,[["render",d]]);export{i as default};
1
+ import{q as o,m as s,k as t,a6 as a,o as n}from"./entry.54b63325.js";const r={},c={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function d(e,_){return n(),s("div",c,[t("div",l,[a(e.$slots,"default")])])}const i=o(r,[["render",d]]);export{i as default};