@nuxt/devtools
Advanced tools
| import{b6 as Y,b7 as j,_ as P,r as S,E as R,aj as X,b8 as h,a6 as ee,a7 as ne,Z as te,a1 as le,i as ie,b9 as k,a8 as oe,Q as re,v as ue,q as se,M as ae}from"./mihtqtxa.js";import{_ as de}from"./filepath-item.vue-f9nq4lw8.js";import{p as U,q as V,k as F,J as u,a3 as i,S as e,U as x,F as p,ag as L,a5 as d,aa as v,u as y,a4 as a,ab as f,ac as D,ad as I,Z as E,V as B}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as me}from"./ncode-block.vue-ctkw4rc7.js";import{_ as pe}from"./ncheckbox.vue-de0732k3.js";import{_ as ve}from"./help-fab.vue-d36s6htl.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},_e={flex:"~ wrap","w-full":""},ce=["onClick"],ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe="/__nuxt_devtools__/client",ge=U({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(N){const _=N,w=`${Y().app.baseURL.replace(xe,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),c=V(()=>{const l=[{name:"Overview",id:"overview"}];return _.current.features.bundleClient&&l.push({name:"Client Bundle",id:"bundle-client"}),_.current.features.bundleNitro&&l.push({name:"Nitro Bundle",id:"bundle-nitro"}),_.current.features.viteInspect&&l.push({name:"Vite Inspect",id:"vite-inspect"}),l}),o=F(c.value[0]);function $(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}function m(l){return l<1024?`${l}B`:l<1024*1024?`${(l/1024).toFixed(1)}KB`:l<1024*1024*1024?`${(l/1024/1024).toFixed(1)}MB`:`${(l/1024/1024/1024).toFixed(1)}GB`}async function T(l){return S.clearAnalyzeBuilds(await R(),[l])}return(l,n)=>{const A=de,C=P;return i(),u("div",fe,[e("div",_e,[(i(!0),u(p,null,L(c.value,(r,t)=>(i(),u("button",{key:t,px4:"",py2:"",border:"r base",hover:"bg-active",class:E(r.id===o.value?.id?"":"border-b"),onClick:z=>o.value=r},[e("div",{class:E(r.id===o.value?.id?"":"op30")},v(r.name),3)],10,ce))),128)),n[1]||(n[1]=e("div",{border:"b base","flex-auto":""},null,-1))]),o.value?.id==="overview"?(i(),u("div",ye,[n[15]||(n[15]=e("div",{"flex-auto":""},null,-1)),e("div",be,[n[10]||(n[10]=e("div",{"i-carbon-commit":"","text-xl":""},null,-1)),e("div",null,[n[2]||(n[2]=e("div",{"text-sm":"",op50:""}," Name ",-1)),e("div",null,v(l.current.name),1)]),n[11]||(n[11]=e("div",{"i-carbon-time":"","text-xl":""},null,-1)),e("div",null,[n[3]||(n[3]=e("div",{"text-sm":"",op50:""}," Build duration ",-1)),e("div",null,v($(l.current)),1)]),l.current.size?.clientBundle?(i(),u(p,{key:0},[n[5]||(n[5]=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1)),e("div",null,[n[4]||(n[4]=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1)),e("div",null,v(m(l.current.size.clientBundle)),1)])],64)):x("",!0),l.current.size?.nitroBundle?(i(),u(p,{key:1},[n[7]||(n[7]=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1)),e("div",null,[n[6]||(n[6]=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1)),e("div",null,v(m(l.current.size.nitroBundle)),1)])],64)):x("",!0),n[12]||(n[12]=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1)),e("div",null,[n[8]||(n[8]=e("div",{"text-sm":"",op50:""}," Built ",-1)),e("div",null,v(y(j)(new Date(l.current.endTime))),1)]),n[13]||(n[13]=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1)),e("div",null,[n[9]||(n[9]=e("div",{"text-sm":"",op50:""}," Report Path ",-1)),d(A,{filepath:l.current.analyzeDir},null,8,["filepath"])])]),n[16]||(n[16]=e("div",{"flex-auto":""},null,-1)),d(C,{n:"rose",icon:"carbon-delete",onClick:n[0]||(n[0]=r=>T(l.current.name))},{default:a(()=>n[14]||(n[14]=[f(" Delete this report ")])),_:1,__:[14]})])):x("",!0),n._lazyshow1||o.value?.id==="bundle-client"?(n._lazyshow1=!0,i(),u(p,null,[D(e("iframe",{src:`${y(w)}${l.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-client"]])],64)):x("v-show-if",!0),n._lazyshow2||o.value?.id==="bundle-nitro"?(n._lazyshow2=!0,i(),u(p,null,[D(e("iframe",{src:`${y(w)}${l.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-nitro"]])],64)):x("v-show-if",!0),n._lazyshow3||o.value?.id==="vite-inspect"?(n._lazyshow3=!0,i(),u(p,null,[D(e("iframe",{src:`${y(w)}${l.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="vite-inspect"]])],64)):x("v-show-if",!0)])}}}),we={class:"markdown-body"},$e={__name:"analyze-build",setup(N,{expose:_}){return _({frontmatter:{}}),(w,c)=>(i(),u("div",we,c[0]||(c[0]=[e("h1",null,"Build Analyze",-1),e("p",null,[f("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"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1)])))}},ze={flex:"~ col"},Be=["onClick"],Ce={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},ke={flex:"~ items-center justify-center wrap",p4:""},Ne={flex:"~ col gap-1","w-250":"",p4:""},Te={flex:"~ gap-3",mt2:"","justify-end":""},Re=U({__name:"analyze-build",setup(N){const _=X(),g=h(),w=ee(),c=ne("analyze-build:slug",""),o=V(()=>g.value?.builds.find(r=>r.slug===c.value)??g.value?.builds[0]),$=F(!1),m=F(""),T=V(()=>g.value?.builds.some(r=>r.name===m.value.trim()));async function l(){m.value=await S.generateAnalyzeBuildName(),await _.start()&&(ae("analyze-build:start"),k.value={name:m.value,processId:await S.startAnalyzeBuild(await R(),m.value)},$.value&&C())}const n=te();function A(r){return`${((r.endTime-r.startTime)/1e3).toFixed(1)}s`}function C(){k.value?.processId&&(n.value=k.value.processId,w.push("/modules/terminals"))}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const z=P,G=ge,Z=ie,q=oe,M=ue,O=se,H=me,J=pe,K=re,Q=$e,W=ve;return i(),u(p,null,[d(q,{"left-size":30},{left:a(()=>[e("div",ze,[(i(!0),u(p,null,L(y(g)?.builds,s=>(i(),u(p,{key:s.slug},[e("button",{flex:"~ col gap1",p3:"","hover:bg-active":"",class:E(s.slug===o.value?.slug?"text-primary bg-active":""),onClick:b=>c.value=s.slug},[e("code",null,v(s.name),1),e("div",Ce,[t[4]||(t[4]=e("div",{"i-carbon-time":""},null,-1)),e("span",null,v(A(s)),1),t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("span",null,v(y(j)(new Date(s.endTime))),1)])],10,Be),t[6]||(t[6]=e("div",{"x-divider":""},null,-1))],64))),128)),e("div",ke,[y(k)?(i(),B(z,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:t[1]||(t[1]=s=>C())},{default:a(()=>t[8]||(t[8]=[f(" Building... ")])),_:1,__:[8]})):(i(),B(z,{key:0,n:"primary",icon:"carbon-edge-node",onClick:t[0]||(t[0]=s=>l())},{default:a(()=>t[7]||(t[7]=[f(" Start a new build ")])),_:1,__:[7]}))])])]),right:a(()=>[o.value?(i(),B(G,{key:0,current:o.value},null,8,["current"])):(i(),B(Z,{key:1}))]),_:1}),d(y(_),null,{default:a(({resolve:s})=>[d(K,{"model-value":!0,onClose:b=>s(!1)},{default:a(()=>[e("div",Ne,[t[13]||(t[13]=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1)),t[14]||(t[14]=e("p",{op50:""}," Enter the name of the build: ",-1)),d(M,{modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=b=>m.value=b),placeholder:"Build name"},null,8,["modelValue"]),T.value?(i(),B(O,{key:0,"n-orange":""},{default:a(()=>t[9]||(t[9]=[f(" A build with the same name already exists, continue would overrides the previous build result. ")])),_:1,__:[9]})):x("",!0),t[15]||(t[15]=e("div",{my3:"","x-divider":""},null,-1)),t[16]||(t[16]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),d(H,{code:`npx nuxi analyze --no-serve --name=${m.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d(J,{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=b=>$.value=b),mt2:"",n:"primary"},{default:a(()=>t[10]||(t[10]=[f(" Navigate to terminal ")])),_:1,__:[10]},8,["modelValue"]),e("div",Te,[d(z,{onClick:b=>s(!1)},{default:a(()=>t[11]||(t[11]=[f(" Cancel ")])),_:2,__:[11]},1032,["onClick"]),d(z,{n:"solid primary",onClick:b=>s(!0)},{default:a(()=>t[12]||(t[12]=[f(" Start ")])),_:2,__:[12]},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),d(W,null,{default:a(()=>[d(Q)]),_:1})],64)}}});export{Re as default}; |
| import{G as ee,H as X,_ as te,I as ne,J as R,K as ce,L as pe,M as me,r as J,E as W,v as se,N as ve,O as fe,c as le,A as ge,a as he,w as _e,P as xe,Q as be,R as we,S as ye,T as $e,g as ke,U as Ce}from"./mihtqtxa.js";import{_ as Ve}from"./ncheckbox.vue-de0732k3.js";import{_ as Pe}from"./ndropdown.vue-fqgjhyuy.js";import{_ as Ae}from"./nnavbar.vue-chg3j9po.js";import{p as Z,k as T,ai as oe,J as i,a3 as o,Z as H,u as m,ac as K,a5 as d,S as t,ab as D,F as z,ag as G,V,U as S,a4 as h,q as U,X as ae,aa as N,W as De,j as Ne,at as Fe,Y as Se}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as Ue}from"./nsection-block-d2034e4h.js";import{_ as Ie}from"./filepath-item.vue-f9nq4lw8.js";import{_ as Te}from"./code-snippets.vue-jst45uux.js";import{_ as je}from"./ndrawer.vue-gsquq1a1.js";import{D as Ee}from"./constants-b32h69zq.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";import"./ncode-block.vue-ctkw4rc7.js";import"./client-oeqdl4pb.js";const Be={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Le={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},ze={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Oe={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Ke={flex:"~ gap1","items-center":""},qe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ge=Z({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,f=ee(l,"modelValue"),C=T(),n=T([]);function v(s){C.value=s.target,f.value=!0}function x(s){s.target===C.value&&(f.value=!1)}function j(s){s.preventDefault()}function P(s){s.preventDefault(),_(s.dataTransfer.files)}function _(s){const c=Array.from(s||[]);if(c.length){const g=[],w=n.value.map(u=>u.name);for(const u of c)if(w.includes(u.name)){let A=1;const[y,B]=u.name.split(".");for(;w.includes(`${y} (${A}).${B}`);)A++;const M=`${y}-${A}.${B}`,a=new Blob([u],{type:u.type}),e=new File([a],M,{lastModified:Date.now()});g.push(e),w.push(M)}else u.type===""&&R({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),g.push(u);n.value=[...n.value,...g]}}async function E(){if(ce.value||pe.value)return;me("assets:upload");const s=[];for(const c of n.value){const g=new FileReader;g.readAsDataURL(c);const u=(await new Promise(A=>{g.onload=()=>A(g.result)})).split(";base64,").pop();s.push({path:c.name,encoding:"base64",content:u})}await J.writeStaticAssets(await W(),[...s],l.folder).then(()=>{p(),R({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{p(),R({message:`Error uploading files: ${c?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),f.value=!1}function q(s){n.value?.splice(s,1)}function O(s){return URL.createObjectURL(s)}function b(s,c){const[g,w]=s.name.split("."),u=c.replace(/\.\w+$/,""),A=`${u}.${w}`;return u.length===0?(alert("File name must be at least 1 characters long"),g):(Object.defineProperty(s,"name",{value:A,writable:!1}),n.value.splice(n.value.indexOf(s),1,s),s)}function r(){n.value=[]}function p(){f.value=!1,r()}return X("dragenter",v),X("dragleave",x),X("dragover",j),X("drop",P),(s,c)=>{const g=te,w=ne,u=se,A=oe("tooltip");return o(),i("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:H(m(f)?"opacity-100 visible":"opacity-0 invisible")},[K(d(g,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[A,"Close",void 0,{"bottom-end":!0}]]),n.value?.length?(o(),i("div",ze,[c[4]||(c[4]=t("div",{px6:"",py6:""},[t("h1",{"text-2xl":""}," Upload "),t("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1)),t("div",Oe,[(o(!0),i(z,null,G(n.value,(y,B)=>(o(),i("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[t("div",Re,[t("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:O(y)},null,8,Me)]),t("div",Ke,[d(u,{n:"xs","h-full":"","flex-auto":"","model-value":y.name,"onUpdate:modelValue":M=>b(y,M.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(g,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:M=>q(B)},null,8,["onClick"])])]))),128))]),t("div",qe,[n.value.length?(o(),V(g,{key:0,n:"red",onClick:r},{default:h(()=>[d(w,{icon:"carbon-clean"}),c[2]||(c[2]=D(" Clear "))]),_:1,__:[2]})):S("",!0),d(g,{disabled:!n.value.length,n:"primary solid",onClick:E},{default:h(()=>[d(w,{icon:"carbon-cloud-upload"}),c[3]||(c[3]=D(" Upload "))]),_:1,__:[3]},8,["disabled"])])])):(o(),i("div",Be,[t("label",Le,[d(w,{icon:"carbon-cloud-upload","mr-2":""}),c[1]||(c[1]=D(" Drop files here or click to select "))]),t("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=y=>_(y.target.files))},null,32)]))],2)}}}),Ze=Z({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,f=U(()=>`devtools-assets-${ve(l.asset)}`);return fe(U(()=>` | ||
| @font-face { | ||
| font-family: '${f.value}'; | ||
| src: url('${l.asset.publicPath}'); | ||
| } | ||
| `)),(C,n)=>(o(),i("div",{"of-hidden":"",style:ae({fontFamily:`'${f.value}'`})}," 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))}}),Je={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},We=["src"],Xe={key:2,"i-carbon-document":"","text-3xl":"",op20:""},He={key:3,"w-full":"","self-start":"",p4:""},Qe=["textContent"],Ye={key:4},et=["src","autoplay","controls"],tt={key:5},nt={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},ot=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=Z({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,f)=>{const C=Ze;return o(),i("div",Je,[l.asset.type==="image"?(o(),i("img",{key:0,src:l.asset.publicPath},null,8,We)):l.asset.type==="font"?(o(),V(C,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(o(),i("div",Xe)):l.asset.type==="text"&&l.textContent?(o(),i("div",He,[t("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:N(l.textContent)},null,8,Qe)])):l.asset.type==="video"?(o(),i("div",Ye,[t("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,et)])):l.asset.type==="audio"?(o(),i("div",tt,[l.detail?(o(),i("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,ot)):(o(),i("div",nt))])):(o(),i("div",lt))])}}}),st={relative:"",flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},at={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},it=Z({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,f=U(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(C,n)=>{const v=ne,x=ie;return o(),i("button",st,[C.asset.layer?(o(),V(v,{key:0,icon:"i-carbon-layers",absolute:"","right-4":"","top-4":"","bg-primary":""})):S("",!0),d(x,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),t("div",at,N(f.value),1)])}}}),re=Z({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const f=L,n=ee(f,"modelValue",l,{passive:!0}),v=U(()=>f.item?.children?.length),x=T(!0),j=U(()=>v.value?"i-carbon-folder":f.item.type==="image"?"i-carbon-image":f.item.type==="video"?"i-carbon-video":f.item.type==="audio"?"i-carbon-volume-up":f.item.type==="font"?"i-carbon-text-small-caps":f.item.type==="text"?"i-carbon-document":f.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(P,_)=>{const E=ne,q=re;return o(),i("div",null,[t("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:ae({paddingLeft:`calc(1rem + ${P.index*1.5}em)`}),class:H({"bg-active":!v.value&&m(n)?.filePath===P.item?.filePath}),border:"b base",onClick:_[0]||(_[0]=O=>v.value?x.value=!x.value:n.value=P.item)},[t("div",{class:H(j.value)},null,2),t("span",{class:H({"flex items-center":v.value}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},[D(N(P.item.path)+" ",1),P.item.layer?(o(),V(E,{key:0,icon:"i-carbon-layers","bg-primary":""})):S("",!0)],2),v.value?(o(),V(E,{key:0,icon:"carbon:chevron-right","transform-rotate":x.value?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),x.value?De(P.$slots,"default",{key:0},()=>[(o(!0),i(z,null,G(P.item?.children,O=>(o(),V(q,{key:O.filepath,modelValue:m(n),"onUpdate:modelValue":_[1]||(_[1]=b=>Ne(n)?n.value=b:null),item:O,index:P.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),rt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},ut={flex:"~","items-center":"","justify-center":""},dt={"max-w-full":"","w-full":"","table-fixed":""},ct={flex:"~ gap-1","w-full":"","items-center":""},pt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},mt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt={capitalize:""},ft={key:0},gt={op70:""},ht={flex:"~ gap2 wrap"},_t={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},xt={flex:"~ gap2 wrap justify-center"},bt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},wt={flex:"~ gap2 wrap justify-center"},yt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},$t={flex:"","justify-end":"","gap-4":""},kt=Z({__name:"AssetDetails",props:{modelValue:{}},setup(L,{emit:l}){const n=ee(L,"modelValue",l,{passive:!0}),v=le(async()=>{if(n.value.type==="image")return J.getImageMeta(await W(),n.value.filePath)}),x=T(!1),j=T(),P=T(0),_=le(async()=>{if(n.value.type!=="text")return;P.value;const a=await J.getTextAssetContent(await W(),n.value.filePath);return j.value=a,a});async function E(){if(_.value!==j.value)try{await J.writeStaticAssets(await W(),[{path:n.value.path,content:j.value,override:!0}],""),x.value=!1,P.value++,R({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const q=ge(),O=U(()=>(q.value?._installedModules||[]).some(e=>e.meta?.name==="@nuxt/image"||e.meta?.name==="@nuxt/image-edge"||e.meta?.name==="@nuxt/image-nightly")),b=U(()=>{const a=[];if(n.value.type==="image"){const e=v.value?.width?` | ||
| width="${v.value.width}" | ||
| height="${v.value.height}" `:" ";return a.push({lang:"vue-html",code:`<img${e} | ||
| src="${n.value.publicPath}" | ||
| />`,name:"Plain Image"}),O.value&&a.push({lang:"vue-html",code:`<NuxtImg${e} | ||
| src="${n.value.publicPath}" | ||
| />`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${e} | ||
| src="${n.value.publicPath}" | ||
| />`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),a}return a.push({lang:"html",code:`<a download href="${n.value.publicPath}"> | ||
| Download ${n.value.path.split("/").slice(-1)[0]} | ||
| </a>`,name:"Download link"}),a}),r=he(),p=_e(),s=xe(()=>n.value.mtime),c=U(()=>{const a=n.value.size;return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(2)} KB`:`${(a/1024/1024).toFixed(2)} MB`}),g=U(()=>{if(!v.value?.width||!v.value?.height)return"";const a=($,I)=>I?a(I,$%I):$,e=a(v.value.width,v.value.height);return e>3?`${v.value.width/e}:${v.value.height/e}`:""}),w=U(()=>["image","text","video","audio","font"].includes(n.value.type)),u=T(!1);async function A(){try{await J.deleteStaticAsset(await W(),n.value.filePath),n.value=void 0,u.value=!1,R({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const y=T(!1),B=T("");async function M(){const a=n.value.filePath.split("/"),e=a.slice(-1)[0].split(".").slice(0,-1).join(".");if(!B.value||B.value===e)return R({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=a.slice(-1)[0].split(".").slice(-1)[0],I=`${a.slice(0,-1).join("/")}/${B.value}.${$}`;await J.renameStaticAsset(await W(),n.value.filePath,I),n.value=void 0,y.value=!1,R({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch($){console.error($),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(a,e)=>{const $=ie,I=Ie,F=te,ue=Te,Q=be,de=se,Y=oe("tooltip");return o(),i(z,null,[t("div",rt,[w.value?(o(),i(z,{key:0},[e[13]||(e[13]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Preview "),t("div",{"x-divider":""})],-1)),t("div",ut,[d($,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:m(n),"text-content":m(_)},null,8,["asset","text-content"])])],64)):S("",!0),e[25]||(e[25]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Details "),t("div",{"x-divider":""})],-1)),t("table",dt,[t("tbody",null,[t("tr",null,[e[14]||(e[14]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),t("td",null,[t("div",ct,[d(I,{filepath:m(n).filePath,"text-left":""},null,8,["filepath"]),K(d(F,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:e[0]||(e[0]=k=>m(p)(m(n).filePath))},null,512),[[Y,"Open in Editor"]])])])]),t("tr",null,[e[15]||(e[15]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),t("td",null,[t("div",pt,[t("div",mt,N(m(n).publicPath),1),K(d(F,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:e[1]||(e[1]=k=>m(r)(m(n).publicPath,"assets-public-path"))},null,512),[[Y,"Copy public path"]]),K(d(F,{"flex-none":"",to:m(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Y,"Open in browser"]])])])]),t("tr",null,[e[16]||(e[16]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),t("td",vt,N(m(n).type),1)]),m(v)?.width?(o(),i(z,{key:0},[t("tr",null,[e[17]||(e[17]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),t("td",null,N(m(v).width)+" x "+N(m(v).height),1)]),g.value?(o(),i("tr",ft,[e[18]||(e[18]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),t("td",null,N(g.value),1)])):S("",!0)],64)):S("",!0),t("tr",null,[e[19]||(e[19]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),t("td",null,N(c.value),1)]),t("tr",null,[e[20]||(e[20]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),t("td",null,[D(N(new Date(m(n).mtime).toLocaleString())+" ",1),t("span",gt,"("+N(m(s))+")",1)])])])]),e[26]||(e[26]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Actions "),t("div",{"x-divider":""})],-1)),t("div",ht,[d(F,{to:m(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:h(()=>e[21]||(e[21]=[D(" Download ")])),_:1,__:[21]},8,["to"]),m(n).type==="text"?(o(),V(F,{key:0,icon:"carbon-edit",n:"cyan",onClick:e[2]||(e[2]=k=>x.value=!x.value)},{default:h(()=>e[22]||(e[22]=[D(" Edit ")])),_:1,__:[22]})):S("",!0),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:e[3]||(e[3]=k=>y.value=!y.value)},{default:h(()=>e[23]||(e[23]=[D(" Rename ")])),_:1,__:[23]}),d(F,{icon:"carbon-delete",n:"red",onClick:e[4]||(e[4]=k=>u.value=!u.value)},{default:h(()=>e[24]||(e[24]=[D(" Delete ")])),_:1,__:[24]})]),e[27]||(e[27]=t("div",{"flex-auto":""},null,-1)),b.value.length?(o(),V(ue,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":b.value},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=k=>u.value=k)},{default:h(()=>[t("div",_t,[e[30]||(e[30]=t("span",null," Are you sure you want to delete this asset? ",-1)),t("div",xt,[d(F,{icon:"carbon-close",onClick:e[5]||(e[5]=k=>u.value=!1)},{default:h(()=>e[28]||(e[28]=[D(" Cancel ")])),_:1,__:[28]}),d(F,{icon:"carbon-delete",n:"red",onClick:A},{default:h(()=>e[29]||(e[29]=[D(" Delete ")])),_:1,__:[29]})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:y.value,"onUpdate:modelValue":e[9]||(e[9]=k=>y.value=k)},{default:h(()=>[t("div",bt,[d(de,{modelValue:B.value,"onUpdate:modelValue":e[7]||(e[7]=k=>B.value=k),placeholder:"New name",n:"blue"},null,8,["modelValue"]),t("div",wt,[d(F,{icon:"carbon-close",onClick:e[8]||(e[8]=k=>y.value=!1)},{default:h(()=>e[31]||(e[31]=[D(" Cancel ")])),_:1,__:[31]}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:M},{default:h(()=>e[32]||(e[32]=[D(" Rename ")])),_:1,__:[32]})])])]),_:1},8,["modelValue"]),m(n).type==="text"?(o(),V(Q,{key:0,modelValue:x.value,"onUpdate:modelValue":e[12]||(e[12]=k=>x.value=k)},{default:h(()=>[t("div",yt,[K(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=k=>j.value=k),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(E,["enter"])},null,544),[[Fe,j.value]]),t("div",$t,[d(F,{icon:"carbon-close",onClick:e[11]||(e[11]=k=>x.value=!1)},{default:h(()=>e[33]||(e[33]=[D(" Cancel ")])),_:1,__:[33]}),d(F,{icon:"carbon:save",n:"primary",onClick:E},{default:h(()=>e[34]||(e[34]=[D(" save ")])),_:1,__:[34]})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Ct={"h-full":"","of-auto":""},Vt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Pt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},At={flex:"~ col","w-30":"","of-auto":""},Dt={"text-xs":"",op75:""},Nt={op50:""},Ft={key:0},St={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Ut={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Xt=Z({__name:"assets",setup(L){const l=we(),f=T(!1),C=T(""),n=U(()=>new ye(l.value||[],{keys:["path"]})),v=$e(()=>{const b=[];for(const r of l.value||[]){const p=r.path.split(".").pop();p&&!b.find(s=>s.name===p)&&b.push({name:p,value:!0})}return b}),x=U(()=>(C.value?n.value.search(C.value).map(r=>r.item):l.value||[]).filter(r=>{const p=r.path.split(".").pop();return!p||v.some(s=>s.name===p&&s.value)})),j=U(()=>{const b={};for(const r of x.value){const p=`${r.path.split("/").slice(0,-1).join("/")}/`;b[p]||(b[p]=[]),b[p].push(r)}return Object.entries(b).sort(([r],[p])=>r.localeCompare(p))}),P=U(()=>{const b={children:[]},r=(p,s,c)=>{const[g,...w]=s;let u=p.children.find(A=>A.path===g);u||(u={...c,path:g,children:[]},p.children.push(u)),w.length>1?r(u,w,c):w.length===1&&u.children.push({...c,path:w[0]})};return x.value.forEach(p=>{const s=p.path.split("/").filter(c=>c!=="");r(b,s,p)}),b.children}),_=T(),{view:E}=ke("assets");function q(){E.value=E.value==="list"?"grid":"list"}Ce("Escape",()=>{_.value=void 0});const O=T();return(b,r)=>{const p=te,s=Ve,c=Pe,g=Ae,w=Ge,u=it,A=Ue,y=re,B=kt,M=je,a=oe("tooltip");return o(),i("div",Ct,[d(g,{ref_key:"navbar",ref:O,search:C.value,"onUpdate:search":r[1]||(r[1]=e=>C.value=e),pb2:""},{actions:h(()=>[t("div",Vt,[K(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:r[0]||(r[0]=e=>f.value=!f.value)},null,512),[[a,"File Upload",void 0,{"bottom-end":!0}]]),m(v).length?(o(),V(c,{key:0,direction:"end",n:"sm primary"},{trigger:h(({click:e})=>[K(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:$=>e()},null,8,["onClick"]),[[a,"Filter",void 0,{"bottom-end":!0}]]),t("span",Pt,N(m(v).length),1)]),default:h(()=>[t("div",At,[(o(!0),i(z,null,G(m(v),e=>(o(),V(s,{key:e.name,modelValue:e.value,"onUpdate:modelValue":$=>e.value=$,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:h(()=>[t("span",Dt,N(e.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):S("",!0),K(d(p,{"text-lg":"",border:!1,icon:m(E)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:q},null,8,["icon"]),[[a,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:h(()=>[t("div",Nt,[C.value?(o(),i("span",Ft,N(x.value.length)+" matched · ",1)):S("",!0),t("span",null,N(m(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(w,{modelValue:f.value,"onUpdate:modelValue":r[2]||(r[2]=e=>f.value=e),folder:"/"},null,8,["modelValue"]),m(E)==="grid"?(o(),i(z,{key:0},[j.value.length>1?(o(!0),i(z,{key:0},G(j.value,([e,$])=>(o(),V(A,{key:e,text:e,description:`${$.length} items`,open:$.length<=m(Ee),padding:!1},{default:h(()=>[t("div",St,[(o(!0),i(z,null,G($,I=>(o(),V(u,{key:I.path,asset:I,folder:e,onClick:F=>_.value=I},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),i("div",Ut,[(o(!0),i(z,null,G(x.value,e=>(o(),V(u,{key:e.path,asset:e,onClick:$=>_.value=e},null,8,["asset","onClick"]))),128))]))],64)):(o(),i("div",It,[(o(!0),i(z,null,G(P.value,(e,$)=>(o(),V(y,{key:$,modelValue:_.value,"onUpdate:modelValue":r[3]||(r[3]=I=>_.value=I),item:e},null,8,["modelValue","item"]))),128))])),d(M,{"model-value":!!_.value,"auto-close":"","w-120":"",top:O.value,onClose:r[5]||(r[5]=e=>_.value=void 0)},{default:h(()=>[_.value?(o(),V(B,{key:0,modelValue:_.value,"onUpdate:modelValue":r[4]||(r[4]=e=>_.value=e)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","top"])])}}});export{Xt as default}; |
| {"id":"41596d10-5c26-42ef-abf5-f8fc005365de","timestamp":1751413653078,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]} |
| import{_ as k}from"./ncode-block.vue-ctkw4rc7.js";import{ao as D}from"./mihtqtxa.js";import{p as I,q as T,k as j,E as y,V as q,a3 as M}from"./vendor/json-editor-vue-m9gzt21j.js";class V{diff(e,t,n={}){let o;typeof n=="function"?(o=n,n={}):"callback"in n&&(o=n.callback);const u=this.castInput(e,n),c=this.castInput(t,n),r=this.removeEmpty(this.tokenize(u,n)),s=this.removeEmpty(this.tokenize(c,n));return this.diffWithOptionsObj(r,s,n,o)}diffWithOptionsObj(e,t,n,o){var u;const c=d=>{if(d=this.postProcess(d,n),o){setTimeout(function(){o(d)},0);return}else return d},r=t.length,s=e.length;let l=1,i=r+s;n.maxEditLength!=null&&(i=Math.min(i,n.maxEditLength));const p=(u=n.timeout)!==null&&u!==void 0?u:1/0,f=Date.now()+p,a=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(a[0],t,e,0,n);if(a[0].oldPos+1>=s&&h+1>=r)return c(this.buildValues(a[0].lastComponent,t,e));let g=-1/0,w=1/0;const x=()=>{for(let d=Math.max(g,-l);d<=Math.min(w,l);d+=2){let C;const P=a[d-1],v=a[d+1];P&&(a[d-1]=void 0);let L=!1;if(v){const E=v.oldPos-d;L=v&&0<=E&&E<r}const _=P&&P.oldPos+1<s;if(!L&&!_){a[d]=void 0;continue}if(!_||L&&P.oldPos<v.oldPos?C=this.addToPath(v,!0,!1,0,n):C=this.addToPath(P,!1,!0,1,n),h=this.extractCommon(C,t,e,d,n),C.oldPos+1>=s&&h+1>=r)return c(this.buildValues(C.lastComponent,t,e))||!0;a[d]=C,C.oldPos+1>=s&&(w=Math.min(w,d-1)),h+1>=r&&(g=Math.max(g,d+1))}l++};if(o)(function d(){setTimeout(function(){if(l>i||Date.now()>f)return o(void 0);x()||d()},0)})();else for(;l<=i&&Date.now()<=f;){const d=x();if(d)return d}}addToPath(e,t,n,o,u){const c=e.lastComponent;return c&&!u.oneChangePerToken&&c.added===t&&c.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:c.count+1,added:t,removed:n,previousComponent:c.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:n,previousComponent:c}}}extractCommon(e,t,n,o,u){const c=t.length,r=n.length;let s=e.oldPos,l=s-o,i=0;for(;l+1<c&&s+1<r&&this.equals(n[s+1],t[l+1],u);)l++,s++,i++,u.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return i&&!u.oneChangePerToken&&(e.lastComponent={count:i,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const o=[];let u;for(;e;)o.push(e),u=e.previousComponent,delete e.previousComponent,e=u;o.reverse();const c=o.length;let r=0,s=0,l=0;for(;r<c;r++){const i=o[r];if(i.removed)i.value=this.join(n.slice(l,l+i.count)),l+=i.count;else{if(!i.added&&this.useLongestToken){let p=t.slice(s,s+i.count);p=p.map(function(f,a){const h=n[l+a];return h.length>f.length?h:f}),i.value=this.join(p)}else i.value=this.join(t.slice(s,s+i.count));s+=i.count,i.added||(l+=i.count)}}return o}}class z extends V{constructor(){super(...arguments),this.tokenize=N}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(` | ||
| `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(` | ||
| `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(` | ||
| `)&&(e=e.slice(0,-1)),t.endsWith(` | ||
| `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}}const A=new z;function W(m,e,t){return A.diff(m,e,t)}function N(m,e){e.stripTrailingCr&&(m=m.replace(/\r\n/g,` | ||
| `));const t=[],n=m.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let o=0;o<n.length;o++){const u=n[o];o%2&&!e.newlineIsToken?t[t.length-1]+=u:t.push(u)}return t}const B=I({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(m){const e=m;function t(r,s){const l=W(r.trim(),s.trim()),i=[],p=[],f=[];for(const a of l){const h=a.value.trimEnd().split(` | ||
| `);for(const g of h)a.added?(i.push(f.length),f.push(g)):(a.removed&&p.push(f.length),f.push(g))}return{added:i,removed:p,result:f.join(` | ||
| `)}}const n=T(()=>t(e.from,e.to));function o(r){let s=0;return r.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,l=>(s++,n.value.added.includes(s-1)?'class="line line-added"':n.value.removed.includes(s-1)?'class="line line-removed"':l))}const u=j();y(c);function c(){const r=D(u);r&&r.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(r,s)=>{const l=k;return M(),q(l,{ref_key:"elRef",ref:u,code:n.value.result,lang:r.lang,"transform-rendered":o,onLoaded:c},null,8,["code","lang"])}}});export{B as _}; |
| import{_ as g}from"./ncode-block.vue-ctkw4rc7.js";import{a as C,_ as S}from"./mihtqtxa.js";import{p as x,n as w,q as B,w as N,J as n,U as r,a3 as a,S as s,F as d,ag as V,a5 as i,V as $,u as T,a4 as u,ab as v,Z as m,aa as h}from"./vendor/json-editor-vue-m9gzt21j.js";const D={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},U=x({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(_){const l=_,e=w(l.codeSnippets[0]),f=C(),b=B(()=>e.value?.lang||"text");return N(()=>{l.codeSnippets.includes(e.value)||(e.value=l.codeSnippets[0])}),(p,o)=>{const k=g,c=S;return p.codeSnippets.length?(a(),n("div",D,[s("div",E,[(a(!0),n(d,null,V(p.codeSnippets,(t,y)=>(a(),n("button",{key:y,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(t===e.value?"":"border-b"),onClick:q=>e.value=t},[s("div",{class:m(t===e.value?"":"op30"),"font-mono":""},h(t.name),3)],10,F))),128)),o[1]||(o[1]=s("div",{border:"b base","flex-auto":""},null,-1))]),e.value?(a(),n(d,{key:0},[i(k,{code:e.value.code,lang:b.value,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),s("div",L,[i(c,{icon:"carbon-copy",onClick:o[0]||(o[0]=t=>T(f)(e.value.code,p.eventType||`code-snippet-${e.value.name}`))},{default:u(()=>o[2]||(o[2]=[v(" Copy ")])),_:1,__:[2]}),e.value?.docs?(a(),$(c,{key:0,to:e.value.docs,target:"_blank",icon:"carbon-catalog"},{default:u(()=>o[3]||(o[3]=[v(" Docs ")])),_:1,__:[3]},8,["to"])):r("",!0)])],64)):r("",!0)])):r("",!0)}}});export{U as _}; |
| import{a as ie,_ as J,a4 as re,aq as ue,A as me,B as ce,g as Y,ar as de,n as fe,as as ve,S as _e,Y as he,W as be,I as ge,f as xe}from"./mihtqtxa.js";import{J as m,a3 as o,S as n,p as G,q as P,ab as E,aa as O,U as g,W as j,a5 as u,V as b,a4 as c,u as $,F as B,ag as M,k as F,n as ye,E as we,x as ke,j as z,$ as Ce,Z as Ne,a6 as W,ai as $e,ac as X,af as Ve}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as De}from"./help-fab.vue-d36s6htl.js";import{_ as Pe}from"./ncheckbox.vue-de0732k3.js";import{_ as Z}from"./nnavbar.vue-chg3j9po.js";import{p as K}from"./index-jc4yj4to.js";import{_ as Q}from"./nbadge-e9vkbxgo.js";import{_ as ee}from"./filepath-item.vue-f9nq4lw8.js";import{_ as Se}from"./ndrawer.vue-gsquq1a1.js";import{D as Le,N as Be}from"./vendor/vis-n7jjo36l.js";import{_ as Ie}from"./nselect-tabs.vue-7oit640i.js";import{_ as Te}from"./nsection-block-d2034e4h.js";import{_ as Me}from"./nicon-title.vue-ejocqf9t.js";import{D as H}from"./constants-b32h69zq.js";import{u as Ue,a as Fe}from"./state-components-kha5xa3m.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const Ge={class:"markdown-body"},Ae={__name:"components",setup(D,{expose:l}){return l({frontmatter:{}}),(p,d)=>(o(),m("div",Ge,d[0]||(d[0]=[n("h1",null,"Components",-1),n("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),n("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Re={"text-sm":"","font-mono":""},ne=G({__name:"ComponentName",props:{component:{}},setup(D){const l=D,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||""));return(p,d)=>(o(),m("code",Re,[d[0]||(d[0]=n("span",{mr1:"",op20:""},"<",-1)),E(O(v.value),1),d[1]||(d[1]=n("span",{ml1:"",op20:""},"/>",-1))]))}}),ze={flex:"~ col gap1","items-start":"","of-hidden":""},Ee={flex:"~ gap2 items-center",px3:""},We={px3:"",pb2:""},Oe={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},je={"text-sm":""},qe={"text-primary":""},He={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Je={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Xe={"text-sm":""},Ye={"text-primary":""},Ze={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},oe=G({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(D){const l=D,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||"")),p=P(()=>l.component.filePath||l.component.file||l.component.__file||""),d=ie();return(s,_)=>{const i=ne,x=J,a=Q,w=ee;return o(),m("div",ze,[n("div",Ee,[u(i,{component:s.component},null,8,["component"]),s.component.meta?.docs&&typeof s.component.meta.docs=="string"?(o(),b(x,{key:0,title:"Open docs","flex-none":"",n:"xs",to:s.component.meta.docs,target:"_blank",icon:"carbon-catalog"},{default:c(()=>_[1]||(_[1]=[E(" Docs ")])),_:1,__:[1]},8,["to"])):g("",!0),u(x,{title:"Copy name","flex-none":"",n:"xs",icon:"carbon-copy",onClick:_[0]||(_[0]=h=>$(d)(`<${v.value}></${v.value}>`,"component-name"))},{default:c(()=>_[2]||(_[2]=[E(" Copy ")])),_:1,__:[2]}),s.component.global?(o(),b(a,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):g("",!0)]),n("div",We,[p.value?(o(),b(w,{key:0,filepath:p.value,"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):g("",!0)]),s.dependents?(o(),m("div",Oe,[n("div",je,[n("strong",qe,O(s.dependents.length),1),_[3]||(_[3]=n("span",{op50:""}," references",-1))]),s.dependents.length?(o(),m("div",He,[(o(!0),m(B,null,M(s.dependents,h=>(o(),b(w,{key:h,filepath:h},null,8,["filepath"]))),128))])):g("",!0)])):g("",!0),s.dependencies?(o(),m("div",Je,[n("div",Xe,[n("strong",Ye,O(s.dependencies.length),1),_[4]||(_[4]=n("span",{op50:""}," dependencies",-1))]),s.dependencies.length?(o(),m("div",Ze,[(o(!0),m(B,null,M(s.dependencies,h=>(o(),b(w,{key:h,filepath:h},null,8,["filepath"]))),128))])):g("",!0)])):g("",!0),j(s.$slots,"default")])}}}),Ke={flex:"~ gap-x-3 gap-y-1 wrap","w-full":""},Qe={relative:"","h-full":"","w-full":""},en={key:0,py4:"",pt3:"",flex:"~ col"},nn={border:"t base",p4:""},on=G({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(D){const l=D,v=F(),p=F(),d=re(),s=ye(),_=ue(),i=me(),x=ce(),{componentsGraphShowNodeModules:a,componentsGraphShowGlobalComponents:w,componentsGraphShowPages:h,componentsGraphShowLayouts:k,componentsGraphShowWorkspace:S}=Y("ui"),f=F(),C=F(""),r=de(C,300),A=P(()=>{const V=l.relationships||[];if(f.value){let e=function(N){!N||t.has(N)||(t.add(N),N.deps.forEach(I=>{e(V.find(U=>U.id===I))}))};const t=new Set;return e(f.value),Array.from(t)}return V}),T=P(()=>{const V=A.value.map(t=>{const N=l.components.find(R=>R.filePath===t.id),I=_.value?.find(R=>R.file===t.id),U=x.value?.find(R=>R.file===t.id),L=t.id.includes("/node_modules/")?"lib":N?N.global?"global":"user":U?"layout":I?"page":"unknown";if(!a.value&&L==="lib"||!h.value&&L==="page"||!k.value&&L==="layout"||!S.value&&L==="user"&&i.value&&!t.id.startsWith(i.value.rootDir)||!w.value&&L==="global")return null;const q=L==="layout"?"hexagon":L==="page"?"square":"dot",y=r.value&&!t.id.toLowerCase().includes(r.value.toLowerCase());return{id:t.id,label:ae(t.id),group:L,shape:q,size:15+Math.min(t.deps.length/2,8),font:{color:y?"#8885":d.value==="dark"?"white":"black"},color:y?"#8885":f.value?.id===t.id?"#82c742":void 0,extra:{id:t.id,component:N,page:I,layout:U,relationship:t}}}).filter(t=>!!t),e=A.value.flatMap(t=>t.deps.map(N=>({from:t.id,to:N,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new Le(V),edges:e}}),te=P(()=>s.value?.component?l.relationships?.find(e=>e.id===s.value?.component?.filePath)?.deps?.map(e=>l.relationships?.find(t=>t.id===e)?.id).filter(Boolean):[]),se=P(()=>s.value?.component?l.relationships?.filter(e=>e.deps.includes(s.value.component.filePath))?.map(e=>l.relationships?.find(t=>t.id===e.id)?.id).filter(Boolean):[]);we(()=>{const V={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},e=new Be(v.value,T.value,V);e.on("click",t=>{const N=t.nodes?.[0],I=T.value.nodes.get(N).extra;s.value=I}),ke(T,()=>{e.setData(T.value)})});function le(){s.value=void 0}function ae(V){const e=l.components.find(t=>t.filePath===V);return e?e.pascalName:V.replace(/.*\/components\//,"").replace(/\.vue$/,"").replace(/\/index$/,"").split("/").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function pe(){f.value=s.value?.relationship,s.value=void 0}return(V,e)=>{const t=Pe,N=Z,I=fe,U=oe,L=J,q=Se;return o(),m(B,null,[u(N,{ref_key:"navbar",ref:p,search:C.value,"onUpdate:search":e[6]||(e[6]=y=>C.value=y),absolute:"","left-0":"","right-0":"","top-0":""},{actions:c(()=>[n("div",Ke,[u(t,{modelValue:$(h),"onUpdate:modelValue":e[0]||(e[0]=y=>z(h)?h.value=y:null),n:"primary sm"},{default:c(()=>e[8]||(e[8]=[n("span",{op75:""},"Show pages",-1)])),_:1,__:[8]},8,["modelValue"]),u(t,{modelValue:$(k),"onUpdate:modelValue":e[1]||(e[1]=y=>z(k)?k.value=y:null),n:"primary sm"},{default:c(()=>e[9]||(e[9]=[n("span",{op75:""},"Show layouts",-1)])),_:1,__:[9]},8,["modelValue"]),u(t,{modelValue:$(S),"onUpdate:modelValue":e[2]||(e[2]=y=>z(S)?S.value=y:null),n:"primary sm"},{default:c(()=>e[10]||(e[10]=[n("span",{op75:""},"Show workspace",-1)])),_:1,__:[10]},8,["modelValue"]),u(t,{modelValue:$(a),"onUpdate:modelValue":e[3]||(e[3]=y=>z(a)?a.value=y:null),n:"primary sm"},{default:c(()=>e[11]||(e[11]=[n("span",{op75:""},"Show node_modules",-1)])),_:1,__:[11]},8,["modelValue"]),u(t,{modelValue:$(w),"onUpdate:modelValue":e[4]||(e[4]=y=>z(w)?w.value=y:null),n:"primary sm"},{default:c(()=>e[12]||(e[12]=[n("span",{op75:""},"Show global components",-1)])),_:1,__:[12]},8,["modelValue"])]),f.value?(o(),m("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:e[5]||(e[5]=y=>f.value=void 0)},e[13]||(e[13]=[E(" Clear filter "),n("div",{"i-carbon-close":""},null,-1)]))):g("",!0),e[14]||(e[14]=n("div",{"flex-auto":""},null,-1)),j(V.$slots,"default")]),_:3},8,["search"]),n("div",Qe,[n("div",{ref_key:"container",ref:v,"h-full":"","w-full":""},null,512),u(I,{absolute:"","bottom-3":"","left-3":"","border-0":"","n-glass-effect":"",p2:"",px3:"","text-sm":""},{default:c(()=>e[15]||(e[15]=[n("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),n("div",{op50:""}," Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),n("div",{op50:""}," Global Component "),n("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),n("div",{op50:""}," Page "),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[n("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),n("div",{op50:""}," Layout "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),n("div",{op50:""}," Library Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),n("div",{op50:""}," Unknown ")],-1)])),_:1,__:[15]}),u(q,{"model-value":!!(s.value&&s.value.component),top:p.value,border:"t l base","w-80":"",onClose:le},{default:c(()=>[s.value&&s.value.component?(o(),m("div",en,[u(U,{component:s.value.component,dependencies:te.value,dependents:se.value},null,8,["component","dependencies","dependents"]),n("div",nn,[u(L,{n:"primary solid",onClick:e[7]||(e[7]=y=>pe())},{default:c(()=>e[16]||(e[16]=[E(" Filter to this component ")])),_:1,__:[16]})])])):g("",!0)]),_:1},8,["model-value","top"])])],64)}}}),tn={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},sn={key:0,"ml--1":"","text-primary":""},ln=G({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(D){const l=D,v=P(()=>l.component.filePath||l.component.file||l.component.__file||"");return(p,d)=>{const s=ne,_=oe,i=Ce("VDropdown"),x=Q,a=ee;return o(),m("div",tn,[u(i,null,{popper:c(()=>[u(_,{component:p.component,dependencies:p.dependencies,dependents:p.dependents,"w-100":"",pt3:""},null,8,["component","dependencies","dependents"])]),default:c(()=>[n("button",{"hover:text-primary":"",class:Ne(p.dependents&&p.dependents.length===0?"op50":"")},[u(s,{component:p.component},null,8,["component"])],2)]),_:1}),p.dependents?.length?(o(),m("sup",sn," x"+O(p.dependents?.length),1)):g("",!0),p.component.global?(o(),b(x,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):g("",!0),j(p.$slots,"default"),v.value?(o(),b(a,{key:2,filepath:v.value,"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):g("",!0)])}}}),an={flex:"~ gap-2 items-center"},pn={pl4:""},rn=G({__name:"ComponentsList",props:{components:{},relationships:{}},setup(D){const l=D,v=F(""),p=F("all"),d=P(()=>{const x=l.components.map(a=>ve(a,l.relationships));return p.value==="using"?x.filter(a=>a.dependents?.length):p.value==="not-used"?x.filter(a=>!a.dependents?.length):x}),s={ClientOnly:"https://nuxt.com/docs/api/components/client-only",DevOnly:"https://nuxt.com/docs/api/components/dev-only",NuxtClientFallback:"https://nuxt.com/docs/api/components/nuxt-client-fallback",NuxtPicture:"https://nuxt.com/docs/api/components/nuxt-picture",NuxtRouteAnnouncer:"https://nuxt.com/docs/api/components/nuxt-route-announcer",NuxtTime:"https://nuxt.com/docs/api/components/nuxt-time",NuxtPage:"https://nuxt.com/docs/api/components/nuxt-page",NuxtLayout:"https://nuxt.com/docs/api/components/nuxt-layout",NuxtLink:"https://nuxt.com/docs/api/components/nuxt-link",NuxtLoadingIndicator:"https://nuxt.com/docs/api/components/nuxt-loading-indicator",NuxtErrorBoundary:"https://nuxt.com/docs/api/components/nuxt-error-boundary",NuxtWelcome:"https://nuxt.com/docs/api/components/nuxt-welcome",NuxtIsland:"https://nuxt.com/docs/api/components/nuxt-island",NuxtImg:"https://nuxt.com/docs/api/components/nuxt-img"},_=P(()=>new _e(d.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),i=P(()=>{const x=[],a=new Map,w=[],h=[],k={user:0,lib:0,builtin:0,runtime:0};return(v.value?_.value.search(v.value).map(f=>f.item):d.value).forEach(f=>{const C=f.component;if(C.filePath&&he(C.filePath)){const r=be(C.filePath);if(!r)return;r==="nuxt"?(C.meta??={},C.meta.docs??=s?.[C.pascalName],w.push(f),k.builtin++):(a.has(r)||a.set(r,[]),a.get(r).push(f),k.lib++)}else C.global&&!C.filePath?(h.push(f),k.runtime++):(x.push(f),k.user++)}),{count:k,user:x,builtin:w,lib:a,runtime:h}});return(x,a)=>{const w=ge,h=Ie,k=Z,S=ln,f=Te,C=Me;return o(),m(B,null,[u(k,{search:v.value,"onUpdate:search":a[1]||(a[1]=r=>v.value=r),pb3:""},{actions:c(()=>[j(x.$slots,"default")]),default:c(()=>[n("div",an,[u(w,{icon:"carbon-filter",op50:""}),u(h,{modelValue:p.value,"onUpdate:modelValue":a[0]||(a[0]=r=>p.value=r),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),i.value.user.length?(o(),b(f,{key:0,icon:"carbon-nominal",text:"User components",open:i.value.user.length<=$(H),description:`Total components: ${i.value.count.user}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.user,r=>(o(),b(S,W({key:r.component.filePath},{ref_for:!0},r),null,16))),128))]),_:1},8,["open","description"])):g("",!0),i.value.runtime.length?(o(),b(f,{key:1,icon:"carbon-load-balancer-global",open:i.value.runtime.length<=$(H),text:"Runtime components",description:`Total components: ${i.value.count.runtime}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.runtime,r=>(o(),b(S,W({key:r.component.filePath},{ref_for:!0},r),null,16))),128))]),_:1},8,["open","description"])):g("",!0),i.value.builtin.length?(o(),b(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${i.value.count.builtin}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.builtin,r=>(o(),b(S,W({key:r.component.filePath},{ref_for:!0},r),null,16))),128))]),_:1},8,["description"])):g("",!0),i.value.lib.size?(o(),b(f,{key:3,open:i.value.count.lib<=$(H),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${i.value.count.lib} components from ${i.value.lib.size} packages`},{default:c(()=>[(o(!0),m(B,null,M(i.value.lib.entries(),([r,A])=>(o(),m("div",{key:r,"ml-2":""},[u(C,{text:`${r} (${A.length})`,py1:"",op50:""},null,8,["text"]),n("div",pn,[(o(!0),m(B,null,M(A,T=>(o(),b(S,W({key:T.component.filePath},{ref_for:!0},T),null,16))),128))])]))),128))]),_:1},8,["open","description"])):g("",!0)],64)}}}),un={relative:"","h-full":"","of-auto":""},mn={"flex-none":"",flex:"~ gap3"},Pn=G({__name:"components",setup(D){const l=xe(),v=Ue(),p=Fe(),{componentsView:d}=Y("ui");function s(){l.value?.inspector?.enable()}function _(){d.value=d.value==="list"?"graph":"list"}return(i,x)=>{const a=J,w=Ae,h=De,k=$e("tooltip");return o(),m(B,null,[n("div",un,[(o(),b(Ve($(d)==="list"?rn:on),{components:$(v),relationships:$(p)},{default:c(()=>[n("div",mn,[X(u(a,{"text-lg":"",border:!1,icon:$(d)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:_},null,8,["icon"]),[[k,"Toggle View",void 0,{"bottom-end":!0}]]),$(l)?.inspector?.isAvailable?X((o(),b(a,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:s},null,512)),[[k,"Inspect Vue components",void 0,{"bottom-end":!0}]]):g("",!0)])]),_:1},8,["components","relationships"]))]),u(h,null,{default:c(()=>[u(w)]),_:1})],64)}}});export{Pn as default}; |
| import{a as $,w as U,I as E,_ as F}from"./mihtqtxa.js";import{_ as S}from"./nmarkdown.vue-mk2gi3ky.js";import{_ as j}from"./filepath-item.vue-f9nq4lw8.js";import{k as q}from"./index-jc4yj4to.js";import{C as y}from"./constants-b32h69zq.js";import{p as z,q as r,$ as J,V as i,a3 as s,a4 as m,S as a,Z as L,J as p,U as l,ab as c,aa as f,a5 as b,u as k,F as x,ag as M}from"./vendor/json-editor-vue-m9gzt21j.js";const O={rounded:"","font-mono":""},T={key:0,"text-primary":""},W={key:0},Z={title:"Vue Directive"},A={"max-w-100":""},G={px4:"",py3:"","text-sm":""},H={flex:"~ gap2",n:"primary xs"},K={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},P={"text-sm":""},Q={"text-primary":""},R={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},X={key:1,"text-sm":"",op50:""},ne=z({__name:"ComposableItem",props:{item:{},isDirective:{type:Boolean,default:!1},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(g){const o=g,C=$(),h=U(),u=r(()=>o.item.as||o.item.name),D=r(()=>{let e=u.value;return o.isDirective&&(e[0]!=="v"&&(e=`v${e}`),e=q(e)),e}),n=r(()=>o.metadata?.injectionUsage?.[u.value]?.count||0),N=r(()=>(o.metadata?.injectionUsage?.[u.value]?.moduleIds||[]).filter(e=>!e.endsWith("?macro=true"))),v=r(()=>o.item.meta?.docsUrl?o.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(o.item.from)?y.nuxt[o.item.name]:o.item.from==="vue"?y.vue[o.item.name]:null);return(e,t)=>{const w=E,I=S,_=F,V=j,B=J("VDropdown");return s(),i(B,{disabled:!o.metadata},{popper:m(()=>[a("div",A,[a("div",G,[e.item.meta?.description?(s(),i(I,{key:0,tag:"div",pb3:"","text-sm":"",markdown:e.item.meta.description},null,8,["markdown"])):l("",!0),a("div",H,[b(_,{icon:"carbon-copy",onClick:t[0]||(t[0]=d=>k(C)(D.value,"imports-name"))},{default:m(()=>t[2]||(t[2]=[c(" Copy ")])),_:1,__:[2]}),e.filepath?(s(),i(_,{key:0,icon:"carbon-code",onClick:t[1]||(t[1]=d=>e.filepath&&k(h)(e.filepath))},{default:m(()=>t[3]||(t[3]=[c(" Source ")])),_:1,__:[3]})):l("",!0),v.value?(s(),i(_,{key:1,icon:"carbon-catalog",to:v.value,target:"_blank"},{default:m(()=>t[4]||(t[4]=[c(" Docs ")])),_:1,__:[4]},8,["to"])):l("",!0)])]),a("div",K,[n.value?(s(),p(x,{key:0},[a("div",P,[t[5]||(t[5]=a("span",{op50:""},"It has been referenced ",-1)),a("strong",Q,f(n.value),1),t[6]||(t[6]=a("span",{op50:""}," times by:",-1))]),a("div",R,[(s(!0),p(x,null,M(N.value,d=>(s(),i(V,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),p("div",X," Not in use via auto import. "))])])]),default:m(()=>[a("button",{"hover:text-primary":"",class:L([e.metadata&&!n.value?"op30 hover:op100":"",e.classes])},[a("code",O,[c(f(u.value)+" ",1),n.value&&e.counter?(s(),p("sup",T,"x"+f(n.value),1)):l("",!0)]),e.isDirective?(s(),p("sup",W,[a("abbr",Z,[b(w,{icon:"tabler:hexagon-letter-d"})])])):l("",!0)],2)]),_:1},8,["disabled"])}}});export{ne as _}; |
| import{a4 as $,ba as E,bb as N,bc as V,a6 as j,l as B,ag as k,bd as D,i as I,aa as L,r as P,n as S}from"./mihtqtxa.js";import{p as q,k as C,q as x,r as W,E as M,z as O,w as _,M as R,J as U,a3 as n,V as u,a4 as y,S as r,ab as w,aa as A,u as T,af as F,a5 as z}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as G}from"./launch-page.vue-b53bqs6b.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";const h=new Map,J=q({__name:"IframeView",props:{tab:{}},setup(f){const m=f,c=$(),d=C(),i=x(()=>m.tab.name),e=C(),t=W(E(d));M(()=>{const o=m.tab.view,l=o.persistent!==!1,b=["clipboard-write","clipboard-read"];if(h.get(i.value)&&l)e.value=h.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",b.join("; ")),e.value.setAttribute("aria-label","Nuxt Devtools"),l&&h.set(i.value,e.value),e.value.src=o.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),s(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),O(p)}setTimeout(s,100)}),_(p),_(s),_(v),R(()=>{e.value&&(e.value.style.visibility="hidden")});function s(){if(!(!e.value||!e.value.contentWindow))try{const o=e.value.contentWindow.document.querySelector("html");o?.classList.toggle("dark",c.value==="dark"),o?.classList.toggle("light",c.value==="dark"),new MutationObserver(()=>{c.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(o,{attributes:!0,attributeFilter:["class"]})}catch{}}const a=N();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=a.value}catch{}}function p(){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(o,l)=>(n(),U("div",{ref_key:"anchor",ref:d,"h-full":"","w-full":""},null,512))}}),X={flex:"~ col gap2",mxa:"","items-center":""},H={"text-xl":""},K={"text-rose":""},ne=q({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,c=V(),d=j(),i=x(()=>m.name??c.params.name),e=B(),t=x(()=>e.value.find(s=>s.name===i.value));return M(()=>{t.value?t.value.requireAuth&&!k.value&&D():setTimeout(()=>{t.value||d.push("/modules/overview")},2e3)}),(s,a)=>{const v=I,p=L,o=J,l=G,b=S;return t.value?t.value.requireAuth&&!T(k)?(n(),u(p,{key:1})):t.value.view.type==="iframe"?(n(),u(o,{key:2,tab:t.value},null,8,["tab"])):t.value.view.type==="vnode"?(n(),u(F(t.value.view.vnode),{key:3})):t.value.view.type==="launch"?(n(),u(l,{key:4,name:`custom-${t.value.name}`,icon:t.value.view.icon||t.value.icon,title:t.value.view.title||t.value.title,description:t.value.view.description,actions:t.value.view.actions,onAction:a[0]||(a[0]=g=>T(P).customTabAction(t.value.name,g))},null,8,["name","icon","title","description","actions"])):(n(),u(v,{key:5},{default:y(()=>[z(b,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+A(t.value.view),1)]),_:1})]),_:1})):(n(),u(v,{key:0},{default:y(()=>[r("div",X,[a[3]||(a[3]=r("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1)),r("p",H,[a[1]||(a[1]=w(" Tab ")),r("code",K,A(i.value),1),a[2]||(a[2]=w(" not found "))]),a[4]||(a[4]=r("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1)),a[5]||(a[5]=r("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1))])]),_:1}))}}});export{ne as default}; |
| import{u as r,_ as c}from"./mihtqtxa.js";import{p as s,ai as i,ac as p,a3 as _,V as m}from"./vendor/json-editor-vue-m9gzt21j.js";const D=s({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(u){const t=r();return(o,e)=>{const n=c,a=i("tooltip");return p((_(),m(n,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=l=>t.value=o.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{D as _}; |
| import{_ as A}from"./nselect.vue-gbkqq9mb.js";import{u as E,c as F,a as W,_ as q}from"./mihtqtxa.js";import{_ as z}from"./nswitch.vue-bpoo3j7g.js";import{_ as J}from"./ndropdown.vue-fqgjhyuy.js";import{_ as O}from"./ncode-block.vue-ctkw4rc7.js";import{_ as G}from"./ndrawer.vue-gsquq1a1.js";import{A as h,d as x}from"./vendor/quicktype-core-dsrweb93.js";import{p as H,k,q as N,x as C,V as c,U as m,a3 as n,a5 as d,a4 as r,S as i,J as f,F as D,ag as S,u as _,aa as V,ae as K}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const M={border:"b base",flex:"~ items-center gap-2",sticky:"","left-0":"","right-0":"","top-0":"","z-1":"","bg-base":"",p3:""},P={key:0,flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--2":"","h-4":"","w-4":"","rounded-full":"","bg-lime:30":"","text-8px":""},Q={flex:"~ col","w-100":"","of-auto":"",py2:""},R={"text-xs":"",capitalize:"",op75:""},ie=H({__name:"DataSchemaDrawer",setup(X){const s=E(),b=k(0),l=k("TypeScript"),v=N(()=>h.all.find(e=>e.displayName===l.value)),o=k(v.value?.optionDefinitions.filter(e=>typeof e.defaultValue=="boolean")),y=F(async()=>{if(b.value,!s.value)return"";const e=x.jsonInputForTargetLanguage(l.value);await e.addSource({name:s.value.name??"Data",samples:[s.value.input]});const t=new x.InputData;return t.addInput(e),(await x.quicktype({inputData:t,lang:l.value,rendererOptions:o.value?.reduce((u,p)=>(u[p.name]=p.defaultValue,u),{})})).lines.join(` | ||
| `)}),j=N(()=>{const e=l.value.toLocaleLowerCase();return e.startsWith("javascript")?"javascript":e.startsWith("json")?"json":e.startsWith("typescript")?"typescript":e});C(o,()=>{b.value++},{deep:!0}),C(l,()=>{o.value=v.value?.optionDefinitions.filter(e=>typeof e.defaultValue=="boolean")});const $=W();function B(){$(y.value||"")}return(e,t)=>{const w=A,u=q,p=z,L=J,I=O,T=G;return v.value?(n(),c(K,{key:0,to:"body"},[d(T,{"model-value":!!_(s)?.input,"auto-close":"","max-w-screen":"","w-2xl":"","n-code-block":"",onClose:t[2]||(t[2]=a=>s.value=null)},{default:r(()=>[i("div",M,[t[3]||(t[3]=i("p",{"mr-2":""}," Schema ",-1)),d(w,{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=a=>l.value=a),n:"xs primary"},{default:r(()=>[(n(!0),f(D,null,S(_(h.all),a=>(n(),f("option",{key:a.displayName},V(a.displayName),1))),128))]),_:1},8,["modelValue"]),o.value?.length?(n(),c(L,{key:0,n:"sm lime"},{trigger:r(({click:a})=>[d(u,{icon:"carbon-settings","h-full":"",onClick:g=>a()},null,8,["onClick"]),o.value?(n(),f("span",P,V(o.value.length),1)):m("",!0)]),default:r(()=>[i("div",Q,[(n(!0),f(D,null,S(o.value,(a,g)=>(n(),c(p,{key:a.name,modelValue:o.value[g].defaultValue,"onUpdate:modelValue":U=>o.value[g].defaultValue=U,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:r(()=>[i("span",R,V(a.description),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):m("",!0),t[4]||(t[4]=i("div",{"flex-auto":""},null,-1)),d(u,{icon:"carbon-copy","mr-6":"","h-full":"",onClick:t[1]||(t[1]=a=>B())})]),_(y)?(n(),c(I,{key:0,lang:j.value,code:_(y)},null,8,["lang","code"])):m("",!0)]),_:1},8,["model-value"])])):m("",!0)}}});export{ie as default}; |
| import{_ as D}from"./nsection-block-d2034e4h.js";import{_ as H}from"./ncheckbox.vue-de0732k3.js";import{g as M}from"./color-mt9xuhgy.js";import{_ as I}from"./nbadge-e9vkbxgo.js";import{p as V,q as S,V as y,a3 as l,a4 as d,ab as P,W as j,aa as k,X as z,k as p,J as u,F as x,S as t,a5 as s,U as B,ag as N,Z as E,u as $}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as W,p as O}from"./mihtqtxa.js";import{_ as q}from"./filepath-item.vue-f9nq4lw8.js";import{_ as J}from"./ncode-block.vue-ctkw4rc7.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const K=V({__name:"NBadgeHashed",props:{text:{}},setup(_){const i=_,c=S(()=>{const a=M(i.text,50,60),r=M(i.text,50,60,.05);return{color:a,background:r}});return(a,r)=>(l(),y(I,{style:z(c.value)},{default:d(()=>[P(k(a.text),1),j(a.$slots,"default")]),_:3},8,["style"]))}}),L={flex:"~ gap-2 col",mb4:""},X={flex:"~ gap-3 items-center"},Z={key:0,flex:"~ gap-1","items-center":"",p1:"",border:"~ base rounded"},A={"max-w-full":"","of-auto":""},G={"text-center":"",op50:""},Q={flex:"~",px4:""},Y={key:0,op50:""},ee={px2:"","text-center":""},te={"of-auto":""},oe=V({__name:"DebugModuleMutationRecords",props:{moduleMutationRecords:{}},setup(_){const i=_;function c(n){return n.startsWith("/")||n.match(/^[a-z]:[\\/]/i)}const a=p(!1),r=p(!1),v=p(!1),b=p(!1),w=p(!1),m=p(""),R=S(()=>{let n=i.moduleMutationRecords;return a.value||(n=n.filter(e=>!e.name.startsWith("nuxt:")&&e.name!=="@nuxt/devtools")),r.value||(n=n.filter(e=>e.keys.join(".")!=="build.templates")),v.value||(n=n.filter(e=>e.keys.join(".")!=="build.transpile")),b.value||(n=n.filter(e=>e.keys.join(".")!=="plugins")),w.value||(n=n.filter(e=>e.method||e.value!=="[]"&&e.value!=="{}")),m.value&&(n=n.filter(e=>e.name===m.value)),n});return(n,e)=>{const f=H,g=K,F=W,U=q,T=J;return l(),u(x,null,[t("div",L,[t("div",X,[s(f,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value=o),n:"primary"},{default:d(()=>e[6]||(e[6]=[t("span",{"ws-nowrap":"",op75:""},"Builtin Modules",-1)])),_:1,__:[6]},8,["modelValue"]),s(f,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=o=>r.value=o),n:"primary"},{default:d(()=>e[7]||(e[7]=[t("span",{"ws-nowrap":"",op75:""},"Templates",-1)])),_:1,__:[7]},8,["modelValue"]),s(f,{modelValue:v.value,"onUpdate:modelValue":e[2]||(e[2]=o=>v.value=o),n:"primary"},{default:d(()=>e[8]||(e[8]=[t("span",{"ws-nowrap":"",op75:""},"Transpile",-1)])),_:1,__:[8]},8,["modelValue"]),s(f,{modelValue:b.value,"onUpdate:modelValue":e[3]||(e[3]=o=>b.value=o),n:"primary"},{default:d(()=>e[9]||(e[9]=[t("span",{"ws-nowrap":"",op75:""},"Plugins",-1)])),_:1,__:[9]},8,["modelValue"]),s(f,{modelValue:w.value,"onUpdate:modelValue":e[4]||(e[4]=o=>w.value=o),n:"primary"},{default:d(()=>e[10]||(e[10]=[t("span",{"ws-nowrap":"",op75:""},"Empty Initial",-1)])),_:1,__:[10]},8,["modelValue"]),m.value?(l(),u("div",Z,[s(g,{"font-mono":"",text:m.value},null,8,["text"]),s(F,{icon:"carbon-close",border:!1,onClick:e[5]||(e[5]=o=>m.value="")})])):B("",!0)])]),t("table",A,[e[11]||(e[11]=t("thead",{border:"b base"},[t("tr",null,[t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Index "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Module "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Key Path "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Method "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Value ")])],-1)),t("tbody",null,[(l(!0),u(x,null,N(R.value,o=>(l(),u("tr",{key:n.moduleMutationRecords.indexOf(o),border:"b dashed transparent hover:base"},[t("td",G,[t("div",null,k(n.moduleMutationRecords.indexOf(o)+1),1)]),t("td",null,[o.name&&c(o.name)?(l(),y(U,{key:0,filepath:o.name},null,8,["filepath"])):(l(),y(g,{key:1,role:"button","font-mono":"",text:o.name,onClick:h=>m.value=o.name},null,8,["text","onClick"]))]),t("td",null,[t("code",Q,[(l(!0),u(x,null,N(o.keys,(h,C)=>(l(),u(x,{key:C},[t("span",null,k(h),1),C<o.keys.length-1?(l(),u("span",Y," . ")):B("",!0)],64))),128))])]),t("td",ee,[s(g,{"font-mono":"",text:o.method||"=",class:E(o.method?"":"saturate-0")},null,8,["text","class"])]),t("td",te,[s(T,{code:String(o.value),lang:"ts","grammar-context-code":"let a = ","ws-normal":"","break-all":"",py1:"",lines:!1,inline:!0},null,8,["code"])])]))),128))])])],64)}}}),ne={key:0,p6:""},le={key:1},ve=V({__name:"debug",setup(_){const i=O();return(c,a)=>{const r=D;return $(i)?(l(),u("div",le,[s(r,{icon:"carbon-container-image-push-pull",text:"Module Mutation Records",description:"Records of module mutations to nuxt options"},{default:d(()=>[s(oe,{"module-mutation-records":$(i).moduleMutationRecords||[]},null,8,["module-mutation-records"])]),_:1})])):(l(),u("div",ne,a[0]||(a[0]=[t("div",null,"No Debug Context Found",-1),t("div",null,"Set `debug: true` in your nuxt.config.ts to enable this panel",-1)])))}}});export{ve as default}; |
| import{b as o}from"./mihtqtxa.js";import{J as t,a3 as s,S as r,W as a}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const n={},c={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function d(e,f){return s(),t("div",c,[r("div",l,[a(e.$slots,"default")])])}const u=o(n,[["render",d]]);export{u as default}; |
| import{b as a,d as i,e as u}from"./mihtqtxa.js";import{J as c,a3 as l,S as e,aa as r,a5 as d,a4 as p,ab as f}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const m={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},g={class:"max-w-520px text-center z-20"},b=["textContent"],h=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return i({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,o)=>{const s=u;return l(),c("div",m,[o[0]||(o[0]=e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),e("div",g,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:r(t.statusCode)},null,8,b),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:r(t.description)},null,8,h),e("div",x,[d(s,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:p(()=>[f(r(t.backHome),1)]),_:1})])])])}}},N=a(y,[["__scopeId","data-v-86dada6d"]]);export{N as default}; |
| .spotlight[data-v-86dada6d]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-86dada6d]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-86dada6d]{background-color:#ffffff4d}.gradient-border[data-v-86dada6d]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-86dada6d]{background-color:#1414144d}.gradient-border[data-v-86dada6d]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-86dada6d]:before{background-size:400% auto;border-radius:.5rem;content:"";inset:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-86dada6d]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-86dada6d]{position:fixed}.left-0[data-v-86dada6d]{left:0}.right-0[data-v-86dada6d]{right:0}.z-10[data-v-86dada6d]{z-index:10}.z-20[data-v-86dada6d]{z-index:20}.grid[data-v-86dada6d]{display:grid}.mb-16[data-v-86dada6d]{margin-bottom:4rem}.mb-8[data-v-86dada6d]{margin-bottom:2rem}.max-w-520px[data-v-86dada6d]{max-width:520px}.min-h-screen[data-v-86dada6d]{min-height:100vh}.w-full[data-v-86dada6d]{width:100%}.flex[data-v-86dada6d]{display:flex}.cursor-pointer[data-v-86dada6d]{cursor:pointer}.place-content-center[data-v-86dada6d]{place-content:center}.items-center[data-v-86dada6d]{align-items:center}.justify-center[data-v-86dada6d]{justify-content:center}.overflow-hidden[data-v-86dada6d]{overflow:hidden}.bg-white[data-v-86dada6d]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-86dada6d]{padding-left:1rem;padding-right:1rem}.px-8[data-v-86dada6d]{padding-left:2rem;padding-right:2rem}.py-2[data-v-86dada6d]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-86dada6d]{text-align:center}.text-8xl[data-v-86dada6d]{font-size:6rem;line-height:1}.text-xl[data-v-86dada6d]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-86dada6d]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-86dada6d]{font-weight:300}.font-medium[data-v-86dada6d]{font-weight:500}.leading-tight[data-v-86dada6d]{line-height:1.25}.font-sans[data-v-86dada6d]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-86dada6d]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-86dada6d]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-86dada6d]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-86dada6d]{padding-left:0;padding-right:0}.sm\:px-6[data-v-86dada6d]{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3[data-v-86dada6d]{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-4xl[data-v-86dada6d]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-86dada6d]{font-size:1.25rem;line-height:1.75rem}} |
| import{b as s,d as a}from"./mihtqtxa.js";import{J as i,a3 as u,S as e,aa as o}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return a({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,n)=>(u(),i("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.statusCode)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},y=s(f,[["__scopeId","data-v-657efa3c"]]);export{y as default}; |
| .spotlight[data-v-657efa3c]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-657efa3c]{position:fixed}.-bottom-1\/2[data-v-657efa3c]{bottom:-50%}.left-0[data-v-657efa3c]{left:0}.right-0[data-v-657efa3c]{right:0}.grid[data-v-657efa3c]{display:grid}.mb-16[data-v-657efa3c]{margin-bottom:4rem}.mb-8[data-v-657efa3c]{margin-bottom:2rem}.h-1\/2[data-v-657efa3c]{height:50%}.max-w-520px[data-v-657efa3c]{max-width:520px}.min-h-screen[data-v-657efa3c]{min-height:100vh}.place-content-center[data-v-657efa3c]{place-content:center}.overflow-hidden[data-v-657efa3c]{overflow:hidden}.bg-white[data-v-657efa3c]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-657efa3c]{padding-left:2rem;padding-right:2rem}.text-center[data-v-657efa3c]{text-align:center}.text-8xl[data-v-657efa3c]{font-size:6rem;line-height:1}.text-xl[data-v-657efa3c]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-657efa3c]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-657efa3c]{font-weight:300}.font-medium[data-v-657efa3c]{font-weight:500}.leading-tight[data-v-657efa3c]{line-height:1.25}.font-sans[data-v-657efa3c]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-657efa3c]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-657efa3c]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-657efa3c]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-657efa3c]{padding-left:0;padding-right:0}.sm\:text-4xl[data-v-657efa3c]{font-size:2.25rem;line-height:2.5rem}} |
| import{f as E,q as x}from"./mihtqtxa.js";import{_ as N}from"./stacktrace-list.vue-h9snzu77.js";import{p as y,q as _,J as l,a3 as i,a5 as C,S as f,U as v,a4 as S,ab as w,aa as p,V as $}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./filepath-item.vue-f9nq4lw8.js";const O=/(^|@)\S+:\d+/,h=/^\s*at .*(\S+:\d+|\(native\))/m,R=/^(eval@)?(\[native code\])?$/;function b(e,a){if(typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u")return T(e);if(e.stack&&e.stack.match(h))return F(e);if(e.stack)return V(e);throw new Error("Cannot parse given Error object")}function m(e){if(!e.includes(":"))return[e,void 0,void 0];const o=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[o[1],o[2]||void 0,o[3]||void 0]}function d(e,a){return e}function F(e,a){return I(e.stack)}function I(e,a){return d(e.split(` | ||
| `).filter(t=>!!t.match(h))).map(t=>{t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let r=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;const c=m(n?n[1]:r),s=n&&r||void 0,u=["eval","<anonymous>"].includes(c[0])?void 0:c[0];return{function:s,file:u,line:c[1]?+c[1]:void 0,col:c[2]?+c[2]:void 0,raw:t}})}function V(e,a){return A(e.stack)}function A(e,a){return d(e.split(` | ||
| `).filter(t=>!t.match(R))).map(t=>{if(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":"))return{function:t};{const r=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,n=t.match(r),c=n&&n[1]?n[1]:void 0,s=m(t.replace(r,""));return{function:c,file:s[0],line:s[1]?+s[1]:void 0,col:s[2]?+s[2]:void 0,raw:t}}})}function T(e,a){return!e.stacktrace||e.message.includes(` | ||
| `)&&e.message.split(` | ||
| `).length>e.stacktrace.split(` | ||
| `).length?P(e):e.stack?L(e):B(e)}function P(e,a){const o=/Line (\d+).*script (?:in )?(\S+)/i,t=e.message.split(` | ||
| `),r=[];for(let n=2,c=t.length;n<c;n+=2){const s=o.exec(t[n]);s&&r.push({file:s[2],line:+s[1],raw:t[n]})}return d(r)}function B(e,a){const o=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,t=e.stacktrace.split(` | ||
| `),r=[];for(let n=0,c=t.length;n<c;n+=2){const s=o.exec(t[n]);s&&r.push({function:s[3]||void 0,file:s[2],line:s[1]?+s[1]:void 0,raw:t[n]})}return d(r)}function L(e,a){return d(e.stack.split(` | ||
| `).filter(t=>!!t.match(O)&&!t.match(/^Error created at/))).map(t=>{const r=t.split("@"),n=m(r.pop()),c=r.shift()||"",s=c.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;let u;c.match(/\(([^)]*)\)/)&&(u=c.replace(/^[^(]+\(([^)]*)\)$/,"$1"));const k=u===void 0||u==="[arguments not available]"?void 0:u.split(",");return{function:s,args:k,file:n[0],line:n[1]?+n[1]:void 0,col:n[2]?+n[2]:void 0,raw:t}})}function X(e){return e.map(a=>({functionName:a.function,args:a.args,fileName:a.file,lineNumber:a.line,columnNumber:a.col,source:a.raw}))}function g(e,a){return X(b(e))}const D={p6:""},G={key:0},M={"text-6xl":""},q={key:0,op75:""},K={my4:"","text-xl":"","text-red":""},U={key:1,"of-auto":"",rounded:"","bg-active":"",p2:""},j=["textContent"],z={key:1,op50:""},ee=y({__name:"error",setup(e){const a=E(),o=_(()=>{const r=a.value?.nuxt?.payload?.error;return r&&(console.error("[Nuxt DevTools] Error in payload:"),console.error(r),console.error({...r})),r}),t=_(()=>{if(!o.value?.stack)return[];try{return o.value.stack.startsWith("<pre>")?g({stack:o.value.stack.replace(/<.*?>/g,"")}):g(o.value)}catch(r){return console.error(r),[]}});return(r,n)=>{const c=x,s=N;return i(),l("div",D,[o.value?(i(),l("div",G,[C(c,{n:"red",icon:"i-carbon-warning-alt-filled",mb5:""},{default:S(()=>n[0]||(n[0]=[w(" Error occurred in this page ")])),_:1,__:[0]}),f("div",M,p(o.value.statusCode||"Client Error"),1),o.value.statusMessage?(i(),l("div",q,p(o.value.statusMessage),1)):v("",!0),f("div",K,p(o.value.message||o.value.description||"Unknown error"),1),t.value.length||o.value.stack?(i(),l("div",U,[n[1]||(n[1]=f("div",{px1:"",op50:""}," Stacktrace ",-1)),t.value.length?(i(),$(s,{key:0,px2:"",stacktrace:t.value},null,8,["stacktrace"])):(i(),l("pre",{key:1,textContent:p(o.value.stack)},null,8,j))])):v("",!0)])):(i(),l("div",z," No error "))])}}});export{ee as default}; |
| import{w as k,a as c,A as g,a3 as b}from"./mihtqtxa.js";import{p as C,q as B,J as t,a3 as a,S as s,W as N,U as u,F as l,ab as d,aa as r,Z as S,u as m}from"./vendor/json-editor-vue-m9gzt21j.js";const w={flex:"~ gap-2 items-center",class:"group"},E=["title"],F={key:0,op50:""},I={key:0,flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},D=C({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(f){const p=f,v=k(),h=c(),i=g(),n=B(()=>p.filepath&&i.value?b(p.filepath,i.value.rootDir):{path:p.filepath||""});return(e,o)=>(a(),t("span",w,[s("span",{class:S([e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath},[e.override?(a(),t(l,{key:0},[d(r(e.override),1)],64)):n.value.moduleName?(a(),t(l,{key:1},[s("span",null,r(n.value.moduleName),1),e.subpath?(a(),t("span",F,r(n.value.path.slice(n.value.moduleName.length)),1)):u("",!0)],64)):(a(),t(l,{key:2},[d(r(n.value.path),1)],64))],10,E),N(e.$slots,"default"),e.filepath?(a(),t("div",I,[s("button",{"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:o[0]||(o[0]=y=>m(v)(e.filepath))},o[2]||(o[2]=[s("div",{"i-carbon-script-reference":""},null,-1)])),s("button",{"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:o[1]||(o[1]=y=>m(h)(e.filepath))},o[3]||(o[3]=[s("div",{"i-carbon-copy":""},null,-1)]))])):u("",!0)]))}});export{D as _}; |
| import{b as t}from"./mihtqtxa.js";import{J as e,a3 as r,W as s}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const a={},c={"h-full":"","of-auto":""};function n(o,f){return r(),e("div",c,[s(o.$slots,"default")])}const d=t(a,[["render",n]]);export{d as default}; |
| import{g as f,_ as m}from"./mihtqtxa.js";import{p as v,k as c,J as o,U as s,u as k,a3 as a,F as g,S as r,a5 as l,H as u,a4 as i,W as _}from"./vendor/json-editor-vue-m9gzt21j.js";const x={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","h-full":"","w-150":"","overflow-auto":"","bg-base":"",px8:"",py4:""},y=v({__name:"HelpFab",setup(w){const t=c(!1),{showHelpButtons:p}=f("ui");return(d,e)=>{const b=m;return k(p)?(a(),o(g,{key:0},[r("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:e[0]||(e[0]=n=>t.value=!t.value)},e[3]||(e[3]=[r("div",{"i-ri:question-mark":""},null,-1)])),l(u,{name:"fade-in"},{default:i(()=>[t.value?(a(),o("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:e[1]||(e[1]=n=>t.value=!1)})):s("",!0)]),_:1}),l(u,{name:"slide-in"},{default:i(()=>[t.value?(a(),o("div",x,[_(d.$slots,"default"),l(b,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",border:!1,onClick:e[2]||(e[2]=n=>t.value=!1)})])):s("",!0)]),_:3})],64)):s("",!0)}}});export{y as _}; |
| import{_ as S}from"./duration-display.vue-mr4ha0rw.js";import{g as T}from"./color-mt9xuhgy.js";import{p as $,k as H,q as w,J as h,a3 as u,S as o,ab as l,Z as p,F as y,ag as F,aa as m,X as V,u as k,a5 as _,V as C,U as N,a4 as f}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as B}from"./nsection-block-d2034e4h.js";import{_ as D}from"./help-fab.vue-d36s6htl.js";import{s as P,f as E}from"./mihtqtxa.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const O={"w-full":""},j={border:"b base"},L={"select-none":"","ws-nowrap":"",p1:"","text-right":"","font-bold":""},z={colspan:"2",p1:"",pl5:"","text-left":"","font-bold":""},A={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},U={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},Y={"ws-nowrap":"",p1:"","text-right":"","font-bold":""},q={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"",op25:""},J={"text-sm":""},R={"ws-nowrap":""},X={"text-sm":""},Z={"w-0":"","text-center":"","text-sm":""},G={"w-0":"","text-center":"","text-sm":""},K={"w-0":"","text-right":"","text-sm":""},M=$({__name:"HooksTable",props:{hooks:{}},setup(x){const a=x,r=H("duration"),n=H("asc"),d={duration:(e,t)=>(t.duration??Number.POSITIVE_INFINITY)-(e.duration??Number.POSITIVE_INFINITY),name:(e,t)=>e.name.localeCompare(t.name),listener:(e,t)=>t.listeners-e.listeners,start:(e,t)=>t.start-e.start,executions:(e,t)=>t.executions.length-e.executions.length},g=w(()=>a.hooks.map(e=>e.start).sort((e,t)=>e-t)),b=w(()=>{const e=d[r.value],t=[...a.hooks].sort(e);return n.value==="desc"&&t.reverse(),t});function c(e){const t=e.split(":");return t.length===1?"":`${t[0]}:`}function v(e){const t=e.split(":");return t.length===1?e:t.slice(1).join(":")}function i(e){r.value===e?n.value=n.value==="asc"?"desc":"asc":r.value=e}return(e,t)=>{const I=S;return u(),h("table",O,[o("thead",j,[o("tr",null,[o("th",L,[o("button",{onClick:t[0]||(t[0]=s=>i("start"))},[t[5]||(t[5]=l(" Order ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="start"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",z,[o("button",{onClick:t[1]||(t[1]=s=>i("name"))},[t[6]||(t[6]=l(" Hook name ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="name"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",A,[o("button",{onClick:t[2]||(t[2]=s=>i("listener"))},[t[7]||(t[7]=l(" Listeners ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="listener"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",U,[o("button",{onClick:t[3]||(t[3]=s=>i("executions"))},[t[8]||(t[8]=l(" Executions ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="executions"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",Y,[o("button",{onClick:t[4]||(t[4]=s=>i("duration"))},[t[9]||(t[9]=l(" Duration ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="duration"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])])])]),o("tbody",null,[(u(!0),h(y,null,F(b.value,s=>(u(),h("tr",{key:s.name,border:"b dashed transparent hover:base"},[o("td",q,m(g.value.indexOf(s.start)),1),o("td",{"w-0":"","ws-nowrap":"","text-right":"",style:V({color:("getHslColorFromStringHash"in e?e.getHslColorFromStringHash:k(T))(c(s.name))})},[o("code",J,m(c(s.name)),1)],4),o("td",R,[o("code",X,m(v(s.name)),1)]),o("td",Z,m(s.listeners),1),o("td",G,m(s.executions.length+1),1),o("td",K,[_(I,{duration:s.duration},null,8,["duration"])])]))),128))])])}}}),Q={class:"markdown-body"},W={__name:"hooks",setup(x,{expose:a}){return a({frontmatter:{}}),(n,d)=>(u(),h("div",Q,d[0]||(d[0]=[o("h1",null,"Hooks",-1),o("p",null,[l("Hooks are an advanced API which can be used for module development or other advanced use cases. The hooking API can be used to expand almost every aspect of Nuxt. Under the hood it is powered by "),o("a",{href:"https://github.com/unjs/hookable",target:"_blank",rel:"noopener"},"unjs/hookable"),l(".")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/hooks",target:"_blank",rel:"noopener"},"Learn more about hooks"),l(".")],-1)])))}},ut=$({__name:"hooks",setup(x){const a=P(),r=E(),n=w(()=>r.value?.metrics.clientHooks());return(d,g)=>{const b=M,c=B,v=W,i=D;return u(),h(y,null,[o("div",null,[n.value?.length?(u(),C(c,{key:0,icon:"carbon-ibm-cloud-direct-link-1-dedicated-hosting",text:"Client Hooks",description:`Total hooks: ${n.value.length}`,padding:"pl4 pr6"},{default:f(()=>[_(b,{hooks:n.value},null,8,["hooks"])]),_:1},8,["description"])):N("",!0),k(a)?.length?(u(),C(c,{key:1,icon:"carbon-ibm-cloud-direct-link-2-dedicated",text:"Server Hooks",description:`Total hooks: ${k(a)?.length}`,padding:"pl4 pr6"},{default:f(()=>[_(b,{hooks:k(a)},null,8,["hooks"])]),_:1},8,["description"])):N("",!0)]),_(i,null,{default:f(()=>[_(v)]),_:1})],64)}}});export{ut as default}; |
| import{V as A,W as S,X as T,A as j,S as P,Y as X,I as Y}from"./mihtqtxa.js";import{_ as q}from"./nselect-tabs.vue-7oit640i.js";import{_ as J}from"./nnavbar.vue-chg3j9po.js";import{_ as U}from"./filepath-item.vue-f9nq4lw8.js";import{_ as W}from"./composable-item.vue-ohpuhwbn.js";import{p as C,J as u,a3 as a,F as k,ag as M,a5 as c,S as i,V as w,U as x,u as f,q as _,aa as G,k as V,a4 as $}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as K}from"./nsection-block-d2034e4h.js";import{_ as O}from"./help-fab.vue-d36s6htl.js";import{D as B}from"./constants-b32h69zq.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";import"./index-jc4yj4to.js";import"./nicon-title.vue-ejocqf9t.js";const Q={flex:"~ wrap gap2",p2:"",pl4:""},R=C({__name:"ComposableTree",props:{map:{},root:{},metadata:{}},setup(D){return(r,v)=>{const o=U,e=W;return a(),u("div",null,[(a(!0),u(k,null,M(r.map.entries(),([l,m])=>(a(),u("div",{key:l},[c(o,{filepath:l,op50:"","hover:underline":""},null,8,["filepath"]),i("div",Q,[(a(!0),u(k,null,M(m,g=>(a(),w(e,{key:g.as,item:g,metadata:r.metadata,"is-directive":g.meta?.vueDirective===!0,filepath:l.match(/^[\w@]/)?void 0:l},null,8,["item","metadata","is-directive","filepath"]))),128))])]))),128))])}}}),Z={key:0,flex:"~ col gap-2 items-start"},ee=C({__name:"HelpImportsDirs",setup(D){const r=A();return(v,o)=>{const e=U;return f(r)?.dirs?(a(),u("div",Z,[(a(!0),u(k,null,M(f(r).dirs,l=>(a(),w(e,{key:l,filepath:l,"text-primary":""},null,8,["filepath"]))),128))])):x("",!0)}}}),te={flex:"~ gap-2 wrap",mb6:""},oe=C({__name:"HelpImportsModules",setup(D){const r=A(),v=_(()=>[...new Set(r.value?.imports.map(o=>S(o.from)).filter(o=>!!o&&!T(o)))]);return(o,e)=>(a(),u("div",te,[(a(!0),u(k,null,M(v.value,l=>(a(),u("code",{key:l,rounded:"","bg-primary:5":"",p:"x2 y0.5","text-primary":""},G(l),1))),128))]))}}),se={class:"markdown-body"},ae={__name:"imports",setup(D,{expose:r}){return r({frontmatter:{}}),(o,e)=>{const l=ee,m=oe;return a(),u("div",se,[e[0]||(e[0]=i("h1",null,"Auto imports",-1)),e[1]||(e[1]=i("p",null,"Nuxt auto-imports helper functions, composables and Vue APIs to be used across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions.",-1)),e[2]||(e[2]=i("hr",null,null,-1)),e[3]||(e[3]=i("p",null,"According to your config, exports of files under the following folders will be registed as auto-imports entry:",-1)),c(l),e[4]||(e[4]=i("p",null,"Meanwhile, modules could also provide auto-imports for their own components. You have auto-imports from the following modules as well:",-1)),c(m),e[5]||(e[5]=i("hr",null,null,-1)),e[6]||(e[6]=i("p",null,[i("a",{href:"https://nuxt.com/docs/guide/concepts/auto-imports",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)),e[7]||(e[7]=i("h2",null,"Directives",-1)),e[8]||(e[8]=i("p",null,"Directives placed in the directives/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1)),e[9]||(e[9]=i("p",null,[i("a",{href:"https://nuxt.com/docs/guide/directory-structure/directives",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])}}},le={key:0,relative:"","h-full":"","of-auto":""},re={key:0,flex:"~ gap-2 items-center lt-sm:col lt-sm:items-start"},$e=C({__name:"imports",setup(D){const r=j(),v=V("all"),o=V("all"),e=V(""),l=A(),m=_(()=>l.value?.metadata),g=_(()=>l.value?.imports.filter(d=>d.as||d.name).sort((d,n)=>(d.as||d.name).localeCompare(n.as||n.name))||[]),z=_(()=>new P(g.value,{keys:["from","as","name"]})),s=_(()=>{const d=new Map,n=new Map,I=new Map;let p=e.value?z.value.search(e.value).map(t=>t.item):g.value;const N=o.value;N==="composables"?p=p.filter(t=>t.meta?.vueDirective!==!0):N==="directives"&&(p=p.filter(t=>t.meta?.vueDirective===!0)),v.value==="using"&&m.value?p=p.filter(t=>(t.as||t.name)in m.value.injectionUsage):v.value==="not-used"&&m.value&&(p=p.filter(t=>!((t.as||t.name)in m.value.injectionUsage)));const h={user:0,lib:0,builtin:0};return p.forEach(t=>{const b=X(t.from)?T(S(t.from))?I:n:d;b.has(t.from)||b.set(t.from,[]),b.get(t.from).push(t),h[b===d?"user":b===n?"lib":"builtin"]++}),{user:d,lib:n,builtin:I,count:h}}),F=_(()=>o.value==="directives"?`${s.value.count.user} directives from ${s.value.user.size} modules`:`${s.value.count.user} composables from ${s.value.user.size} modules`),E=_(()=>o.value==="directives"?`${s.value.count.builtin} directives`:`${s.value.count.builtin} composables`),H=_(()=>o.value==="directives"?`${s.value.count.lib} directives from ${s.value.lib.size} packages`:`${s.value.count.lib} composables from ${s.value.lib.size} packages`);return(d,n)=>{const I=Y,p=q,N=J,h=R,t=K,b=ae,L=O;return a(),u(k,null,[f(r)?(a(),u("div",le,[c(N,{search:e.value,"onUpdate:search":n[2]||(n[2]=y=>e.value=y),pb3:""},{default:$(()=>[m.value?(a(),u("div",re,[c(I,{icon:"carbon-filter",op50:""}),c(p,{modelValue:v.value,"onUpdate:modelValue":n[0]||(n[0]=y=>v.value=y),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"]),c(p,{modelValue:o.value,"onUpdate:modelValue":n[1]||(n[1]=y=>o.value=y),n:"primary sm",options:[{label:"All",value:"all"},{label:"Composables",value:"composables"},{label:"Directives",value:"directives"}]},null,8,["modelValue"])])):x("",!0)]),_:1},8,["search"]),s.value.user.size?(a(),w(t,{key:0,open:s.value.count.user<=f(B),icon:o.value==="directives"?"tabler:hexagon-letter-d":"carbon-function",text:`User ${o.value==="directives"?"directives":"composables"}`,description:F.value},{default:$(()=>[c(h,{map:s.value.user,root:f(r).rootDir,metadata:m.value},null,8,["map","root","metadata"])]),_:1},8,["open","icon","text","description"])):x("",!0),s.value.builtin.size?(a(),w(t,{key:1,open:s.value.count.builtin<=f(B),icon:"simple-icons-nuxtdotjs",text:`Built-in ${o.value==="directives"?"directives":"composables"}`,description:E.value},{default:$(()=>[c(h,{map:s.value.builtin,root:f(r).rootDir,metadata:m.value},null,8,["map","root","metadata"])]),_:1},8,["open","text","description"])):x("",!0),s.value.lib.size?(a(),w(t,{key:2,open:s.value.count.lib<=f(B),icon:"carbon-3d-mpr-toggle",text:`${o.value==="directives"?"Directives":"Composables"} from libraries`,description:H.value},{default:$(()=>[c(h,{map:s.value.lib,root:f(r).rootDir,metadata:m.value},null,8,["map","root","metadata"])]),_:1},8,["open","text","description"])):x("",!0)])):x("",!0),c(L,null,{default:$(()=>[c(b)]),_:1})],64)}}});export{$e as default}; |
| import{f as y,g,h as b,_ as k,i as N,t as h,j as w}from"./mihtqtxa.js";import{_ as V}from"./nlink.vue-k5yoz8g1.js";import{_ as C}from"./ncheckbox.vue-de0732k3.js";import{p as B,k as L,V as u,a3 as m,a4 as o,S as t,a5 as n,U as T,ab as l,u as j}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const D={flex:"~ auto col gap3","items-center":"","justify-center":"","text-center":""},P={"max-w-190":"","text-lg":""},S={mb6:"",op50:""},E={p4:""},F={flex:"~ col gap-2",mxa:""},z=B({__name:"index",setup(G){const p=y(),s=L(!0),{showPanel:a}=g("ui");function _(){h.value=s.value,w.value=!1}function d(){a.value=!1,p.value.devtools.close()}return(U,e)=>{const f=b,r=V,i=k,x=C,v=N;return m(),u(v,{flex:"~ col",relative:"","h-screen":"","w-full":""},{default:o(()=>[t("div",D,[e[7]||(e[7]=t("p",{my2:"","text-3em":"","text-primary":"","font-bold":"","font-stylish":""}," 👋 Hi there, welcome to Nuxt DevTools! ",-1)),t("p",P,[n(f,{"mr-0.5":"","inline-block":"","h-5":"","translate-y--1.1":"","align-mid":""}),e[1]||(e[1]=l(" is a set of visual tools that help you to know your Nuxt app better, and enhance your development experience with Nuxt. Enjoy!")),e[2]||(e[2]=t("br",null,null,-1))]),t("p",S,[e[4]||(e[4]=l(" Learn more at ")),n(r,{href:"https://devtools.nuxt.com/",target:"_blank",rel:"noopener noreferrer",n:"primary"},{default:o(()=>e[3]||(e[3]=[l(" devtools.nuxt.com ")])),_:1,__:[3]})]),n(i,{to:"/modules/overview",n:"lg primary",onClick:_},{default:o(()=>e[5]||(e[5]=[t("span",null,"Get Started",-1)])),_:1,__:[5]}),j(a)!==!1?(m(),u(i,{key:0,n:"borderless orange",onClick:d},{default:o(()=>e[6]||(e[6]=[t("span",null,"Always hide the floating panel",-1)])),_:1,__:[6]})):T("",!0)]),t("div",E,[t("div",F,[n(x,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=c=>s.value=c),n:"green6"},{default:o(()=>[e[8]||(e[8]=t("span",{op50:""},"Send anonymous statistics, help us improving DevTools",-1)),n(r,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op35:"",textContent:"Learn more"})]),_:1,__:[8]},8,["modelValue"])])])]),_:1})}}});export{z as default}; |
| import{i as w,n as y,o as C,_ as B,I as V,M as $}from"./mihtqtxa.js";import{_ as v}from"./nmarkdown.vue-mk2gi3ky.js";import{p as I,V as a,a3 as t,a4 as o,a5 as c,S as i,U as m,aa as _,J as P,F,ag as L,a6 as M,ab as S}from"./vendor/json-editor-vue-m9gzt21j.js";const T={"text-xl":""},D={flex:"~ gap2 wrap"},j=I({__name:"LaunchPage",props:{name:{},icon:{},title:{},description:{},actions:{}},emits:["action"],setup(l,{emit:p}){const d=l,u=p;function f(e,s){$("launch-page",{pageName:d.name}),e.handle?.(),u("action",s)}return(e,s)=>{const g=C,k=v,b=V,h=B,N=y,x=w;return t(),a(x,null,{default:o(()=>[c(N,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:o(()=>[c(g,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),i("h1",T,_(e.title),1),e.description?(t(),a(k,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):m("",!0),i("div",D,[(t(!0),P(F,null,L(e.actions,(n,r)=>(t(),a(h,M({key:r,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},{ref_for:!0},n.attrs,{onClick:E=>f(n,r)}),{default:o(()=>[n.pending?(t(),a(b,{key:0,icon:"carbon-circle-dash","animate-spin":""})):m("",!0),S(" "+_(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{j as _}; |
Sorry, the diff of this file is too big to display
| import{_ as oe}from"./filepath-item.vue-f9nq4lw8.js";import{w as Y,n as Z,e as L,I as G,Z as J,_ as F,r as q,E,M as ne,$ as Q,a0 as W,S as se,A as le,Q as ae,q as ie,a1 as re}from"./mihtqtxa.js";import{_ as ue,u as O,a as de}from"./state-modules-l9tloo2i.js";import{_ as me}from"./duration-display.vue-mr4ha0rw.js";import{p as D,q as I,V as C,a3 as t,a4 as u,S as e,W as T,J as m,U as g,ab as k,aa as b,u as j,Z as S,a5 as s,F as B,ag as A,an as pe,k as P,H}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as ce}from"./nsection-block-d2034e4h.js";import{_ as _e}from"./nicon-title.vue-ejocqf9t.js";import{_ as K}from"./ndropdown.vue-fqgjhyuy.js";import{_ as fe}from"./ncheckbox.vue-de0732k3.js";import{_ as ve}from"./nnavbar.vue-chg3j9po.js";import{_ as ge}from"./nbadge-e9vkbxgo.js";import{s as xe}from"./vue-virtual-scroller.esm-k5helfir.js";import{_ as be}from"./ncode-block.vue-ctkw4rc7.js";import{_ as ke}from"./nlink.vue-k5yoz8g1.js";import{_ as he}from"./code-diff.vue-faqqiiv0.js";import{_ as ye}from"./help-fab.vue-d36s6htl.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const $e={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},we={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},Ce={key:2},Ie={key:1,flex:"~ gap-2",title:"Documentation"},Me={key:2,flex:"~ gap-2"},Ne={key:0,flex:"~ gap-4 items-center"},Be={key:0,flex:"~ gap-2 items-center",op50:""},je={key:1,flex:"~ gap-2 items-center",op50:""},De={key:1},Pe={flex:"~ col","items-end":""},Ae={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},Te=["src","alt"],Se={key:1,"i-carbon-cube":"",ma:"","flex-none":"","text-4xl":"",op30:""},Fe={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},Ue=["src"],ze={flex:"","justify-end":""},Le="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Oe="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Ve="https://github.com/",qe="https://www.npmjs.com/package/",V=D({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(N){const v=N,a=I(()=>({...v.mod?.meta,...v.mod,...v.info})),{format:x}=Intl.NumberFormat(navigator.language||"en",{notation:"compact",maximumFractionDigits:1}),y=I(()=>x(a.value.stats?.stars||0)),l=I(()=>x(a.value.stats?.downloads||0)),r=Y();return(o,c)=>{const h=L,_=G,d=me,$=Z;return t(),C($,{p4:"",flex:"~ gap2"},{default:u(()=>[e("div",$e,[T(o.$slots,"main",{},()=>[e("div",we,[o.mod.isPackageModule?(t(),C(h,{key:0,to:qe+(a.value.npm||a.value.name),target:"_blank",hover:"underline text-primary"},{default:u(()=>[k(b(a.value.name),1)]),_:1},8,["to"])):o.mod.entryPath?(t(),m("button",{key:1,role:"button",hover:"underline text-primary",onClick:c[0]||(c[0]=f=>j(r)(o.mod.entryPath))},b(a.value.name),1)):(t(),m("span",Ce,b(a.value.name),1)),T(o.$slots,"badge")]),a.value.description?(t(),m("div",{key:0,class:S(o.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},b(a.value.description),3)):g("",!0),c[3]||(c[3]=e("div",{"flex-auto":""},null,-1)),a.value.website?(t(),m("div",Ie,[c[1]||(c[1]=e("span",{"i-carbon-link":"","flex-none":"","text-lg":"",op50:""},null,-1)),s(h,{to:a.value.website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:u(()=>[k(b(a.value.website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):g("",!0),a.value.github?(t(),m("div",Me,[c[2]||(c[2]=e("span",{"i-carbon-logo-github":"","flex-none":"","text-lg":"",op50:""},null,-1)),s(h,{to:a.value.github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:u(()=>[k(b(a.value.github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):g("",!0)]),T(o.$slots,"items"),a.value.stats?(t(),m("div",Ne,[a.value.stats.stars?(t(),m("div",Be,[s(_,{icon:"carbon-star","flex-none":"","text-lg":""}),e("span",null,b(y.value),1)])):g("",!0),a.value.stats.downloads?(t(),m("div",je,[s(_,{icon:"carbon-download","flex-none":"","text-lg":""}),e("span",null,b(l.value),1)])):g("",!0)])):g("",!0),o.mod.timings?.setup?(t(),m("div",De,[s(d,{title:"Module Setup Time",flex:"~ items-center",duration:o.mod.timings.setup,factor:.5},{before:u(()=>[s(_,{icon:"carbon-time",mr2:"","flex-none":"","text-lg":"",op50:""})]),_:1},8,["duration"])])):g("",!0)]),e("div",Pe,[a.value.icon||o.mod.isPackageModule?(t(),m("div",Ae,[a.value.icon?(t(),m("img",{key:0,src:Le+a.value.icon,alt:o.mod.name,ma:""},null,8,Te)):(t(),m("div",Se))])):g("",!0),a.value.maintainers?.length&&o.maintainers?(t(),m("div",Fe,[(t(!0),m(B,null,A(a.value.maintainers,f=>(t(),C(h,{key:f.name,target:"_blank",to:Ve+f.github,title:f.name},{default:u(()=>[e("img",{src:Oe+f.github,"h-6":"","w-6":"","rounded-full":""},null,8,Ue)]),_:2},1032,["to","title"]))),128))])):g("",!0),o.$slots.actions?(t(),m(B,{key:2},[c[4]||(c[4]=e("div",{"flex-auto":""},null,-1)),e("div",ze,[T(o.$slots,"actions")])],64)):g("",!0)])]),_:3})}}}),Ee={key:0,flex:"~ gap-2",title:"Open on filesystem"},He={key:1,"mx--2":""},Ye=["onClick"],Ze={key:2,"mx--2":""},Ge=["onClick"],Je={op50:""},Qe={"text-green":""},We={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ke={"text-sm":"",op50:""},Re=D({__name:"ModuleItem",props:{mod:{}},setup(N){const v=N,a=I(()=>v.mod.info),x=I(()=>({...v.mod?.meta,...v.mod,...a.value})),y=J();return(l,r)=>{const o=oe,c=L,h=ue,_=V;return t(),C(_,{mod:l.mod,info:a.value},{items:u(()=>[l.mod.entryPath?(t(),m("div",Ee,[r[0]||(r[0]=e("span",{"i-carbon-folder-move-to":"","flex-none":"","text-lg":"",op50:""},null,-1)),s(o,{filepath:l.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):g("",!0),x.value.npm?(t(),C(h,{key:x.value.npm,"package-name":x.value.npm,options:{dev:!0}},{default:u(({info:d,update:$,state:f,id:i,restart:n})=>[f==="running"?(t(),C(c,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:i?"/modules/terminals":void 0,onClick:w=>i?y.value=i:void 0},{default:u(()=>r[1]||(r[1]=[e("span",{"i-carbon-circle-dash":"","flex-none":"","animate-spin":"","text-lg":"",op50:""},null,-1),e("code",{"text-sm":"",op50:""},"Upgrading...",-1)])),_:2,__:[1]},1032,["to","onClick"])):f==="updated"?(t(),m("div",He,[e("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:n},r[2]||(r[2]=[e("span",{"i-carbon-intent-request-active":"","flex-none":"","text-lg":"","text-primary":""},null,-1),e("code",{"text-xs":""},"Update installed, click to restart",-1)]),8,Ye)])):d?.needsUpdate?(t(),m("div",Ze,[e("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:w=>$()},[r[3]||(r[3]=e("span",{"i-carbon-intent-request-upgrade":"","flex-none":"","text-lg":"",op50:""},null,-1)),e("code",Je,"v"+b(d.current),1),r[4]||(r[4]=e("div",{"i-carbon-arrow-right":"",op50:""},null,-1)),e("code",Qe,"v"+b(d.latest),1)],8,Ge)])):d?.latest?(t(),m("div",We,[r[5]||(r[5]=e("span",{"i-carbon-cube":"","flex-none":"","text-lg":"",op50:""},null,-1)),e("code",Ke,"v"+b(d.current),1)])):g("",!0)]),_:1},8,["package-name"])):g("",!0)]),_:1},8,["mod","info"])}}}),Xe=D({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(N,{emit:v}){const a=N,x=v,y=O(),l=I(()=>y.value.find(_=>_.name===a.item.npm)),r=I(()=>l.value&&l.value.isPackageModule),o=I(()=>l.value&&l.value.isPackageModule&&l.value.isUninstallable);async function c(_,d){const $=d==="install"?q.installNuxtModule:q.uninstallNuxtModule,f=await $(await E(),_.npm,!0);ne(`modules:${d}`,{moduleName:_.npm}),f.commands&&await Q.start(_,f,d)&&(W.value.push({name:_.npm,info:_,processId:f.processId}),x("start"),await $(await E(),_.npm,!1))}const h={};return(_,d)=>{const $=ge,f=F,i=K,n=V;return t(),C(n,{mod:h,role:r.value?"":"button",info:_.item,mb2:"","h-full":"",class:S(r.value?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:d[1]||(d[1]=w=>r.value?null:c(_.item,"install"))},pe({_:2},[r.value?{name:"badge",fn:u(()=>[s($,{n:"green",textContent:"Installed"}),o.value?(t(),C(i,{key:0,n:"sm green"},{trigger:u(({click:w})=>[s(f,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:p=>w()},null,8,["onClick"])]),default:u(()=>[s(f,{icon:"carbon-trash-can",n:"red",onClick:d[0]||(d[0]=w=>c(_.item,"uninstall"))},{default:u(()=>d[2]||(d[2]=[k(" Uninstall ")])),_:1,__:[2]})]),_:1})):g("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}}),et={"h-full":"",flex:"~ col gap-4"},tt={flex:"~ items-center"},ot={flex:"~ col","w-30":"","of-auto":""},nt={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},st={flex:"~ items-center gap-2"},lt={flex:"~ gap1","text-sm":"",op50:""},at={key:0},it={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},rt=D({__name:"ModuleInstallList",emits:["close"],setup(N,{emit:v}){const a=v,x=de(),y=O(),l=["downloads","stars","updated","created"],r=P(!1),o=P(l[0]),c=P(!0),h={downloads:(i,n)=>i.stats.downloads-n.stats.downloads,stars:(i,n)=>i.stats.stars-n.stats.stars,created:(i,n)=>i.stats.createdAt-n.stats.createdAt,updated:(i,n)=>i.stats.publishedAt-n.stats.publishedAt},_=I(()=>x.value?.toSorted((i,n)=>h[o.value](i,n)*(r.value?1:-1))),d=P(""),$=I(()=>new se(x.value||[],{keys:["name","description","npm","category"],sortFn:(i,n)=>{const w=x.value?.[i.idx],p=x.value?.[n.idx];return w&&p?h[o.value](w,p)*(r.value?1:-1):i.score-n.score},threshold:.2})),f=I(()=>{let i=_.value;return c.value&&(i=(i||[]).filter(n=>!y.value.some(w=>w.name===n.name))),d.value?$.value.search(d.value).map(n=>n.item).filter(n=>i?.includes(n)):i});return(i,n)=>{const w=_e,p=F,U=G,R=K,X=fe,ee=ve,te=Xe;return t(),m("div",et,[s(w,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),s(ee,{search:d.value,"onUpdate:search":n[2]||(n[2]=M=>d.value=M),"no-padding":"","px-6":"","pb-3":"","pt-2":""},{actions:u(()=>[s(R,{direction:"end",n:"sm primary"},{trigger:u(({click:M})=>[e("div",tt,[s(p,{icon:r.value?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:n[0]||(n[0]=z=>r.value=!r.value)},null,8,["icon"]),s(p,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:z=>M()},{default:u(()=>[k(b(o.value)+" ",1),s(U,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:u(()=>[e("div",ot,[(t(),m(B,null,A(l,M=>s(p,{key:M,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:z=>o.value=M},{default:u(()=>[e("span",nt,[k(b(M)+" ",1),o.value===M?(t(),C(U,{key:0,icon:"carbon:checkmark"})):g("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),default:u(()=>[e("div",st,[s(X,{modelValue:c.value,"onUpdate:modelValue":n[1]||(n[1]=M=>c.value=M),n:"primary md"},{default:u(()=>n[4]||(n[4]=[e("span",{op75:""},"Exclude installed modules",-1)])),_:1,__:[4]},8,["modelValue"]),e("div",lt,[d.value||c.value?(t(),m("span",at,b(f.value?.length)+" matched · ",1)):g("",!0),e("span",null,b(j(x)?.length)+" modules in total",1)])])]),_:1},8,["search"]),e("div",it,[s(j(xe),{class:"scroller",items:f.value,"item-size":200,"key-field":"name"},{default:u(({item:M})=>[s(te,{item:M,onStart:n[3]||(n[3]=z=>a("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),ut={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},dt={capitalize:""},mt={op50:""},pt={flex:"~ gap-3",mt2:"","justify-end":""},ct=D({__name:"ModuleActionDialog",setup(N){const v=le(),a=Y(),x={};return(y,l)=>{const r=V,o=be,c=ke,h=he,_=ie,d=F,$=ae;return t(),C(j(Q),null,{default:u(({resolve:f,args:i})=>[s($,{"model-value":!0,onClose:n=>f(!1)},{default:u(()=>[s(r,{mod:x,info:i[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),e("div",ut,[e("h2",{"text-xl":"",class:S(i[2]==="install"?"text-primary":"text-red")},[e("span",dt,b(i[2]),1),l[1]||(l[1]=k()),e("code",null,b(i[0].name),1),l[2]||(l[2]=k("? "))],2),l[7]||(l[7]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),s(o,{code:i[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),e("p",mt,[l[3]||(l[3]=k(" Then your ")),s(c,{role:"button",n:"primary",underline:"",onClick:l[0]||(l[0]=n=>j(a)(j(v)?._nuxtConfigFile)),textContent:"Nuxt config"}),l[4]||(l[4]=k(" will be updated as: "))]),s(h,{from:i[1].configOriginal,to:i[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),l[8]||(l[8]=e("p",null,[e("span",{op50:""},"After that, Nuxt will "),e("span",{"text-orange":""},"restart automatically"),k(". ")],-1)),e("div",pt,[s(_,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>l[5]||(l[5]=[k(" Please make sure to backup your project first. ")])),_:1,__:[5]}),s(d,{onClick:n=>f(!1)},{default:u(()=>l[6]||(l[6]=[k(" Cancel ")])),_:2,__:[6]},1032,["onClick"]),s(d,{n:"solid",capitalize:"",class:S(i[2]==="install"?"n-primary":"n-red"),onClick:n=>f(!0)},{default:u(()=>[k(b(i[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),_t={class:"markdown-body"},ft={__name:"modules",setup(N,{expose:v}){return v({frontmatter:{}}),(x,y)=>(t(),m("div",_t,y[0]||(y[0]=[e("h1",null,"Modules",-1),e("p",null,[k("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),e("code",null,"nuxt.config"),k(".")],-1),e("p",null,[k("You can explore the list of modules on "),e("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),k(" or install them directly inside the DevTools.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},vt={"h-full":"","w-full":"","of-auto":""},gt={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},xt=["src","alt"],bt={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},kt={op75:""},ht={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},yt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",qt=D({__name:"modules",setup(N){const v=P(!1),a=O(),x=J(),y=I(()=>a.value.filter(r=>r.isPackageModule)),l=I(()=>a.value.filter(r=>!r.isPackageModule));return re(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{v.value=!0}}]),(r,o)=>{const c=Re,h=Z,_=L,d=ce,$=F,f=rt,i=ct,n=ft,w=ye;return t(),m(B,null,[e("div",vt,[s(d,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${y.value.length}`},{default:u(()=>[(t(!0),m(B,null,A(y.value,p=>(t(),C(c,{key:p.name,mod:p},null,8,["mod"]))),128)),(t(!0),m(B,null,A("processInstallingModules"in r?r.processInstallingModules:j(W),p=>(t(),C(_,{key:p.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:U=>x.value=p.processId},{default:u(()=>[s(h,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:u(()=>[e("div",gt,[e("img",{src:yt+p.info.icon,alt:p.info.name,ma:""},null,8,xt),o[4]||(o[4]=e("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1))]),e("div",bt,[o[5]||(o[5]=e("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1)),e("span",kt,"Installing "+b(p.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),s(h,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:o[0]||(o[0]=p=>v.value=!0)},{default:u(()=>o[6]||(o[6]=[e("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),e("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1)])),_:1,__:[6]})]),_:1},8,["description"]),l.value.length?(t(),C(d,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${l.value.length}`},{default:u(()=>[(t(!0),m(B,null,A(l.value,p=>(t(),m(B,{key:p.meta?.name||p.entryPath},[p.meta?.name||p.entryPath?(t(),C(c,{key:0,mod:p},null,8,["mod"])):g("",!0)],64))),128))]),_:1},8,["description"])):g("",!0),s(H,{name:"fade-in"},{default:u(()=>[v.value?(t(),m("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:o[1]||(o[1]=p=>v.value=!1)})):g("",!0)]),_:1}),s(H,{name:"slide-in"},{default:u(()=>[v.value?(t(),m("div",ht,[s($,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:o[2]||(o[2]=p=>v.value=!1)}),s(f,{onClose:o[3]||(o[3]=p=>v.value=!1)})])):g("",!0)]),_:1}),s(i)]),s(w,null,{default:u(()=>[s(n)]),_:1})],64)}}});export{qt as default}; |
| import{b as o}from"./mihtqtxa.js";import{J as n,a3 as s,W as t}from"./vendor/json-editor-vue-m9gzt21j.js";const r={},c={class:"n-badge"};function _(e,a){return s(),n("span",c,[t(e.$slots,"default")])}const m=o(r,[["render",_]]);export{m as _}; |
| import{G as i,I as r}from"./mihtqtxa.js";import{p,J as b,a3 as u,ac as h,S as n,as as m,u as o,Y as k,j as f,a5 as v,W as _,Z as x}from"./vendor/json-editor-vue-m9gzt21j.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-transition n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base"},I=p({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=i(c,"modelValue",t,{passive:!0});return(a,s)=>{const d=r;return u(),b("label",{class:"n-checkbox select-none items-center hover:n-checkbox-hover n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[h(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>f(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=k(l=>e.value=!o(e),["enter"]))},null,40,y),[[m,o(e)]]),n("span",B,[v(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:x([o(e)?"":"op50","n-transition"])},[_(a.$slots,"default")],2)],8,V)}}});export{I as _}; |
| import{bh as n,a2 as b,_ as h}from"./mihtqtxa.js";import{p as g,k as y,V as v,a3 as l,a4 as k,J as B,U as C,a6 as i,u as o,a5 as V,S as _,W as $,H as w}from"./vendor/json-editor-vue-m9gzt21j.js";const x=["border"],N={relative:"","h-full":"","w-full":"","of-auto":""},T=g({__name:"NDrawer",props:{modelValue:{type:Boolean},top:{},left:{},autoClose:{type:Boolean},transition:{default:"right"}},emits:["close"],setup(m,{emit:c}){const e=m,f=c,a=y(),{height:u}=n(()=>e.top,void 0,{box:"border-box"}),s=typeof e.left=="string"&&e.left.startsWith("#")?document.querySelector(e.left)?.getBoundingClientRect().width:n(()=>e.left,void 0,{box:"border-box"}).width;b(a,()=>{e.modelValue&&e.autoClose&&f("close")},{ignore:["a","button","summary",'[role="dialog"]']});const d={right:{"enter-from-class":"transform translate-x-1/1","leave-to-class":"transform translate-x-1/1"},top:{"enter-from-class":"transform translate-y--1/1","leave-to-class":"transform translate-y--1/1"},bottom:{"enter-from-class":"transform translate-y-1/1","leave-to-class":"transform translate-y-1/1"}};return(t,r)=>{const p=h;return l(),v(w,i(d[t.transition],{"enter-active-class":"duration-200 ease-in","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100"}),{default:k(()=>[t.modelValue?(l(),B("div",i({key:0,ref_key:"el",ref:a,border:`${t.transition==="right"?"l":t.transition==="bottom"?"t":"b"} base`,flex:"~ col gap-1",class:{"right-0":t.transition==="right"||t.transition==="bottom"},absolute:"","bottom-0":"","z-10":"","z-20":"","of-auto":"","n-glass-effect":"","text-sm":"",style:{top:t.transition==="bottom"?"auto":`${o(u)}px`,left:t.transition==="right"&&!o(s)?"auto":`${o(s)}px`}},t.$attrs),[V(p,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",border:!1,onClick:r[0]||(r[0]=z=>t.$emit("close"))}),_("div",N,[$(t.$slots,"default")])],16,x)):C("",!0)]),_:3},16)}}});export{T as _}; |
| import{G as i,a2 as p,_ as u}from"./mihtqtxa.js";import{p as m,k as c,J as f,a3 as _,W as n,S as b,a5 as v,u as t,a4 as k,ab as V,Z as B}from"./vendor/json-editor-vue-m9gzt21j.js";const $=m({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=i(r,"modelValue",l,{passive:!0}),s=c();return p(s,()=>{e.value=!1}),(a,o)=>{const d=u;return _(),f("div",{ref_key:"el",ref:s,class:"relative"},[n(a.$slots,"trigger",{enabled:t(e),click:()=>e.value=!t(e)},()=>[v(d,{onClick:o[0]||(o[0]=g=>e.value=!t(e))},{default:k(()=>o[1]||(o[1]=[V(" Dropdown ")])),_:1,__:[1]})]),b("div",{class:B(["absolute z-10 border n-border-base rounded n-bg-base shadow n-transition",[t(e)?"op-100":"op0 pointer-events-none -translate-y-1",a.direction==="end"?"right-0":"left-0"]])},[n(a.$slots,"default")],2)],512)}}});export{$ as _}; |
| import{e as s}from"./mihtqtxa.js";import{p as l,q as i,V as p,a3 as r,a6 as u,a4 as c,W as m,J as _,U as k}from"./vendor/json-editor-vue-m9gzt21j.js";const d={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},v=l({__name:"NLink",props:{to:{},href:{},target:{},underline:{type:Boolean}},setup(a){const t=a,n=i(()=>t.href||t.to);return(e,f)=>{const o=s;return r(),p(o,u(n.value?{href:n.value,target:e.target,rel:e.target==="_blank"?"noopener noreferrer":null}:{},{class:{"n-link n-transition hover:n-link-hover n-link-base":n.value||e.underline}}),{default:c(()=>[m(e.$slots,"default"),n.value&&e.target==="_blank"?(r(),_("div",d)):k("",!0)]),_:3},16,["class"])}}});export{v as _}; |
| import{v as l}from"./mihtqtxa.js";import{p,J as i,a3 as s,Z as o,S as d,W as a,V as m,U as u}from"./vendor/json-editor-vue-m9gzt21j.js";const f={flex:"~ gap4 wrap","items-center":""},b=p({__name:"NNavbar",props:{search:{},noPadding:{type:Boolean}},emits:["update:search"],setup(h,{emit:n}){const r=n;function t(e){r("update:search",e.target.value)}return(e,v)=>{const c=l;return s(),i("div",{flex:"~ col gap2 wrap",border:"b base","n-navbar-glass":"","flex-1":"",class:o([{p4:!e.noPadding}])},[d("div",f,[a(e.$slots,"search",{},()=>[e.search!==void 0?(s(),m(c,{key:0,placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:o({"px-3 py-2":!e.noPadding}),value:e.search,onInput:t},null,8,["class","value"])):u("",!0)]),a(e.$slots,"actions")]),a(e.$slots,"default")],2)}}});export{b as _}; |
| import{b as o}from"./mihtqtxa.js";import{J as t,a3 as r,W as n}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.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}; |
| import{G as $,I as B,b as C}from"./mihtqtxa.js";import{_}from"./nicon-title.vue-ejocqf9t.js";import{p as b,J as l,a3 as n,F as u,S as s,U as p,Z as r,a5 as h,u as i,a4 as w,W as t,V as N,ab as c,aa as f,ac as k,ad as S}from"./vendor/json-editor-vue-m9gzt21j.js";const V=["open"],x={"text-base":""},I={key:0,"text-sm":"",op50:""},T=b({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(v){const a=$(v,"open",void 0,{passive:!0});function d(e){a.value=e.target.open}return(e,o)=>{const m=B,g=_;return n(),l(u,null,[s("details",{open:i(a),onToggle:o[0]||(o[0]=(...y)=>d&&d(...y))},[s("summary",{class:r(["cursor-pointer select-none p4 hover:bg-active",e.collapse?"":"pointer-events-none"])},[h(g,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:r([i(a)?"op100":"op60",e.headerClass])},{default:w(()=>[s("div",null,[s("div",x,[t(e.$slots,"text",{},()=>[c(f(e.text),1)],!0)]),e.description||e.$slots.description?(n(),l("div",I,[t(e.$slots,"description",{},()=>[c(f(e.description),1)],!0)])):p("",!0)]),o[1]||(o[1]=s("div",{class:"flex-auto"},null,-1)),t(e.$slots,"actions",{},void 0,!0),e.collapse?(n(),N(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):p("",!0)]),_:3,__:[1]},8,["icon","text","class"])],2),o._lazyshow1||i(a)?(o._lazyshow1=!0,n(),l(u,null,[k(s("div",{class:r(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[t(e.$slots,"details",{},void 0,!0),s("div",{class:r([e.containerClass,"mt1"])},[t(e.$slots,"default",{},void 0,!0)],2),t(e.$slots,"footer",{},void 0,!0)],2),[[S,i(a)]])],64)):p("v-show-if",!0)],40,V),o[2]||(o[2]=s("div",{class:"x-divider"},null,-1))],64)}}}),G=C(T,[["__scopeId","data-v-95ac5573"]]);export{G as _}; |
| import{p as m,J as l,a3 as t,F as c,ag as v,Z as r,u as o,S as d,ac as f,aa as _,aw as g,j as y}from"./vendor/json-editor-vue-m9gzt21j.js";import{G as V}from"./mihtqtxa.js";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},x=["disabled","title"],B=["disabled","value","title"],D=m({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(i,{emit:p}){const a=V(i,"modelValue",p,{passive:!0});return(s,n)=>(t(),l("fieldset",h,[(t(!0),l(c,null,v(s.options,(e,b)=>(t(),l("label",{key:e.label,disabled:s.disabled,class:r(["relative n-border-base px-0.5em py-0.1em hover:n-bg-active",[b?"border-l n-border-base ml--1px":"",e.value===o(a)?"n-bg-active":""]]),title:e.label},[d("div",{class:r([e.value===o(a)?"":"op35"])},_(e.label),3),f(d("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>y(a)?a.value=u:null),type:"radio",disabled:s.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,B),[[g,o(a)]])],10,x))),128))]))}});export{D as _}; |
| import{G as p,I as m}from"./mihtqtxa.js";import{p as f,J as l,a3 as s,Z as n,W as t,ac as b,V as h,U as d,aC as v,u as V,S as y,j as k,aa as B}from"./vendor/json-editor-vue-m9gzt21j.js";const S=["disabled"],g={key:0,value:"",disabled:"",hidden:""},$=f({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const o=p(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=m;return s(),l("div",{class:n(["n-select flex flex items-center border rounded n-bg-base px-2 py-1 focus-within:border-context focus-within:n-focus-base",e.disabled?"border-gray:10":"n-border-base"])},[t(e.$slots,"icon",{},()=>[e.icon?(s(),h(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):d("",!0)]),b(y("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>k(o)?o.value=u:null),disabled:e.disabled,class:n(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(s(),l("option",g,B(e.placeholder),1)):d("",!0),t(e.$slots,"default")],10,S),[[v,V(o)]])],2)}}});export{$ as _}; |
| import{at as oe,a as ae,w as H,n as J,_ as U,au as G,av as ne,aw as se,ax as re,b as ie,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"./mihtqtxa.js";import{_ as he}from"./nnavbar.vue-chg3j9po.js";import{_ as P}from"./nlink.vue-k5yoz8g1.js";import{_ as q}from"./nsection-block-d2034e4h.js";import{_ as _e}from"./ncode-block.vue-ctkw4rc7.js";import{p as N,q as C,k as I,V as A,U as y,a3 as t,a4 as h,S as e,J as n,F as S,ag as B,Z as O,aa as u,a5 as p,ab as $,u as g,X as L,am as fe,z as ve,ai as be,ac as D,Y as we}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as xe}from"./help-fab.vue-d36s6htl.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";import"./client-oeqdl4pb.js";const K=[{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."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e={key:0,"x-divider":""},Te={key:1,"x-divider":""},Se={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ce={"w-full":"",p2:"",op75:""},Ne={key:1,m4:"",flex:"~ col gap-2"},Me={flex:"~ gap-1 wrap items-center"},Oe={key:1},Ae={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Ie=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(v){const s=v,l=C(()=>K.filter(d=>!s.tags?.some(o=>o.name===d.name))),a=C(()=>{let d={};const o={};l.value.forEach(m=>{m.seoMeta?Object.assign(o,m.seoMeta):d=oe(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(` | ||
| `)}),c=ae(),k=H(),b=["Missing Tags","Code Snippet"],_=I(b[0]);return(d,o)=>{const w=P,m=J,T=U,M=_e,R=q;return l.value.length?(t(),A(R,{key:0,text:"Missing Tags",description:`${l.value.length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:h(()=>[e("div",ye,[(t(),n(S,null,B(b,(r,i)=>e("button",{key:i,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(r===_.value?"":"border-b"),onClick:f=>_.value=r},[e("div",{class:O(r===_.value?"":"op30"),capitalize:""},u(r),3)],10,ke)),64)),o[3]||(o[3]=e("div",{border:"b base","flex-auto":""},null,-1))]),_.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,B(l.value,(r,i)=>(t(),n(S,{key:i},[i?(t(),n("div",$e)):y("",!0),i?(t(),n("div",Te)):y("",!0),e("div",Se,[o[4]||(o[4]=e("div",{"i-carbon-warning":"","text-orange":""},null,-1)),p(w,{"op-50":"",href:r.docs,target:"_blank",n:"orange"},{default:h(()=>[$(u(r.name),1)]),_:2},1032,["href"])]),e("div",Ce,u(r.description),1)],64))),128))]),_:1})):(t(),n("div",Ne,[e("p",Me,[p(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:o[0]||(o[0]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[5]||(o[5]=[$(" Copy ")])),_:1,__:[5]}),o[7]||(o[7]=$(" the following code snippet and paste it into your ")),d.matchedRouteFilepath?(t(),A(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:o[1]||(o[1]=r=>g(k)(d.matchedRouteFilepath))},{default:h(()=>o[6]||(o[6]=[$(" page component ")])),_:1,__:[6]})):(t(),n("span",Oe,"page component")),o[8]||(o[8]=$(" to full fill the missing tags. "))]),p(m,{relative:"","n-code-block":""},{default:h(()=>[p(M,{code:a.value,lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",Ae,[p(T,{icon:"carbon-copy",onClick:o[2]||(o[2]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[9]||(o[9]=[$(" Copy ")])),_:1,__:[9]})])]),_:1})]))]),_:1},8,["description"])):y("",!0)}}}),Be={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Le={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Re={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},ze={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]"},je={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=N({__name:"SocialFacebook",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Be,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Le,[e("div",Re,u(s.card.url),1),e("div",ze,[e("div",Fe,u(s.card.title),1),e("div",je,u(s.card.description),1)])])]))}}),Ve={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"}},Ee={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},He={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Je={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"},Ge=N({__name:"SocialTwitter",props:{tags:{}},setup(v){const s=v,l=C(()=>G(s.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"}]})),a=C(()=>l.value.image?s.tags.find(c=>c.tag==="meta"&&c.name==="twitter:card")?.value||"summary_large_image":"summary");return(c,k)=>(t(),n("div",Ve,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",a.value==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[a.value==="summary_large_image"?(t(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(l.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:L({backgroundImage:`url(${JSON.stringify(l.value.image)})`})},null,4)),e("div",Ee,[e("div",He,u(l.value.url),1),e("div",Je,u(l.value.title),1),e("div",Ue,u(l.value.description),1)])],2)]))}}),Pe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] bg-base shadow-md"},qe={class:"break-words p-[10px] antialiased"},Ke={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Ye={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},We={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Xe=N({__name:"SocialLinkedin",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Pe,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",qe,[e("div",Ke,[e("div",Ye,u(s.card.title),1),e("div",We,u(s.card.url),1)])])]))}}),Ze={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]"},Qe={class:"pl-[10px] pr-[8px]"},et={class:"text-[#3390ec] leading-normal underline"},tt={class:"quote w-full flex"},ot={class:"flex flex-col gap-1"},at={key:0,class:"my-[3px] overflow-hidden rounded"},nt=["src"],st={class:"cursor-pointer text-sm text-[#3390ec]"},rt={class:"cursor-pointer text-sm"},it={class:"cursor-pointer text-sm"},lt={class:"flex justify-end text-xs text-[#707579]"},ct=N({__name:"SocialTelegram",props:{card:{}},setup(v){const s=ne(),l=se(re(),"HH:mm");return(a,c)=>(t(),n("div",Ze,[e("div",Qe,[e("div",et,u(a.card.url),1),e("div",tt,[e("div",ot,[a.card.image?(t(),n("div",at,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,nt)])):y("",!0),e("div",st,[e("strong",null,u(g(s).hostname),1)]),e("div",rt,[e("strong",null,u(a.card.title),1)]),e("div",it,u(a.card.description),1)])]),e("div",lt,[e("span",null,u(g(l)),1)])]),c[0]||(c[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))]))}}),dt=ie(ct,[["__scopeId","data-v-4566448e"]]),pt={flex:"~ col","w-full":""},ut={flex:"~ wrap","w-full":"","flex-none":""},mt=["onClick"],gt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ht={key:0},_t={key:1},ft={key:2},vt={key:3},bt=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(v){const s=v,l=["twitter","facebook","linkedin","telegram"],a=le("nuxt-devtools-social-preview-tab",l[0]),c=C(()=>G(s.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(k,b)=>{const _=De,d=Ge,o=Xe,w=dt;return t(),n("div",pt,[e("div",ut,[(t(),n(S,null,B(l,(m,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(m===g(a)?"":"border-b"),onClick:M=>a.value=m},[e("div",{class:O(m===g(a)?"":"op30"),capitalize:""},u(m),3)],10,mt)),64)),b[0]||(b[0]=e("div",{border:"b base","flex-auto":""},null,-1))]),e("div",gt,[g(a)==="facebook"?(t(),n("div",ht,[p(_,{card:c.value},null,8,["card"])])):g(a)==="twitter"?(t(),n("div",_t,[p(d,{tags:k.tags},null,8,["tags"])])):g(a)==="linkedin"?(t(),n("div",ft,[p(o,{card:c.value},null,8,["card"])])):g(a)==="telegram"?(t(),n("div",vt,[p(w,{card:c.value},null,8,["card"])])):y("",!0)])])}}}),wt={class:"markdown-body"},xt={__name:"open-graph",setup(v,{expose:s}){return s({frontmatter:{}}),(a,c)=>(t(),n("div",wt,c[0]||(c[0]=[fe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6)])))}},yt={grid:"~ lg:cols-2","h-full":"","w-full":"","of-hidden":""},kt={"flex-auto":"","of-auto":""},$t={"flex-none":"",flex:"~ gap2 items-center"},Tt={flex:"~ col"},St={key:0,"x-divider":""},Ct={key:1,"x-divider":""},Nt={mr2:"",px4:"",py2:""},Vt=N({__name:"open-graph",setup(v){const s=I(0),l=ce(),a=de(async()=>(s.value,(await l.value?.resolveTags()).map(i=>{const f=i.props||{};return i.tag==="htmlAttrs"&&f.lang?{tag:"html",name:"lang",value:f.lang}:f.charset?{tag:"meta",name:"charset",value:f.charset}:{tag:i.tag,name:f.property??f.name??f.rel??i.tag,value:f.content??f.href??i.textContent??JSON.stringify(f)}})),[]),c=I(!0);function k(){s.value+=1}const b=pe(),_=ue(),d=I(""),o=me(),w=H();async function m(){d.value!==_.value.path&&b.value.push(d.value||"/")}const T=C(()=>d.value===_.value.path?[]:b.value.resolve(d.value||"/").matched),M=C(()=>{const r=o.value.find(i=>i.path===_.value?.matched?.[0]?.path);return r?.file||r?.meta?.file});function R(r){return K.find(i=>i.name===r.name)?.docs}return E(_).toBeTruthy().then(r=>{d.value=r.path}),E(b).toBeTruthy().then(r=>{r.afterEach(()=>{ve(()=>{d.value=_.value.path,setTimeout(k,200),setTimeout(k,800)})})}),(r,i)=>{const f=ge,z=U,Y=he,V=P,W=J,X=q,Z=Ie,Q=bt,ee=xt,te=xe,F=be("tooltip");return t(),n(S,null,[e("div",yt,[e("div",kt,[p(Y,null,{search:h(()=>[p(f,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=x=>d.value=x),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",g(_)?.path===d.value?"":T.value.length?"text-green":"text-orange"]),onKeydown:we(m,["enter"])},null,8,["modelValue","class"])]),actions:h(()=>[e("div",$t,[M.value?D((t(),A(z,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:i[1]||(i[1]=x=>g(w)(M.value))},null,512)),[[F,"Open file in editor"]]):y("",!0),D(p(z,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:k},null,512),[[F,"Refresh Data"]]),D(p(z,{"text-lg":"",border:!1,icon:c.value?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:i[2]||(i[2]=x=>c.value=!c.value)},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Tt,[p(X,{text:"Tags",icon:"carbon:tag-group"},{default:h(()=>[p(W,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,B(g(a),(x,j)=>(t(),n(S,{key:j},[j?(t(),n("div",St)):y("",!0),j?(t(),n("div",Ct)):y("",!0),e("div",Nt,[p(V,{op50:"",href:R(x),target:"_blank",n:"primary"},{default:h(()=>[$(u(x.name),1)]),_:2},1032,["href"])]),p(V,{href:String(x.value).match(/^https?:\/\//)?x.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:h(()=>[$(u(x.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),p(Z,{tags:g(a),"matched-route-filepath":M.value},null,8,["tags","matched-route-filepath"])])]),c.value&&g(a)?.length?(t(),A(Q,{key:0,tags:g(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):y("",!0)]),p(te,null,{default:h(()=>[p(ee)]),_:1})],64)}}});export{Vt as default}; |
| import{f as M,A as z,V as E,ab as O,ac as P,a6 as F,e as $,h as q,ad as g,ae as _,af as G,q as H,ag as K,_ as U,i as J,j as W,E as Q}from"./mihtqtxa.js";import{u as X,_ as Y}from"./state-modules-l9tloo2i.js";import{u as Z}from"./state-components-kha5xa3m.js";import{p as h,q as A,V as v,a3 as s,a4 as n,J as p,u as o,S as e,a5 as i,aa as a,U as u,F as f,ab as l}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nbadge-e9vkbxgo.js";import"./ncode-block.vue-ctkw4rc7.js";import"./client-oeqdl4pb.js";import"./ncheckbox.vue-de0732k3.js";const c="2.6.1",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":""},Vt=h({__name:"overview",setup(gt){const k=M(),m=z(),D=Z(),b=E(),V=X(),j=O(),y=P(),B=F();function I(){W.value=!0,B.push("/")}const w=A(()=>k.value?.nuxt.vueApp.version),r=A(()=>k.value?.metrics.loading());function L(){Q()}return(S,t)=>{const R=q,x=$,C=Y,N=H,d=U,T=J;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,__:[1]}),w.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(w.value),1)]),_:1,__:[2]})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(k)?(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(j).length,"page")),1)]),_:1,__:[3]})):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,__:[4]})):u("",!0),o(m)&&o(b)?(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(b).imports.length,"import")),1)]),_:1,__:[5]})):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(V).length,"module")),1)]),_:1,__:[6]})):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,__:[7]})):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(_)(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(_)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(_)(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(_)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(G)?(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,__:[13]})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in S?S.isDevAuthed:o(K))?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,__:[14]}))])]),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,__:[15]})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[20]||(t[20]=[l(" ⌘ Cmd ")])),_:1,__:[20]}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[21]||(t[21]=[l(" K ")])),_:1,__:[21]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[23]||(t[23]=[l(" Ctrl ")])),_:1,__:[23]}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[24]||(t[24]=[l(" K ")])),_:1,__:[24]})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette "))]),e("div",ft,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[28]||(t[28]=[l(" ⇧ Shift ")])),_:1,__:[28]}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[29]||(t[29]=[l(" ⌥ Option ")])),_:1,__:[29]}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[30]||(t[30]=[l(" D ")])),_:1,__:[30]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[33]||(t[33]=[l(" Shift ")])),_:1,__:[33]}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[34]||(t[34]=[l(" Alt ")])),_:1,__:[34]}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[35]||(t[35]=[l(" D ")])),_:1,__:[35]})],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{Vt as default}; |
| import{v as S,_ as H,w as J,x as F,a as Y,y as Z,z as G,A as Q,B as X,C as ee,D as te,r as oe,E as ne}from"./mihtqtxa.js";import{_ as j}from"./nbadge-e9vkbxgo.js";import{p as L,k as A,q as x,$ as ae,J as a,V as k,a3 as t,S as e,aa as C,a4 as $,F as g,ag as I,Z as M,al as se,U as N,a5 as _,ab as E,u as c,E as re,Y as le}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as z}from"./filepath-item.vue-f9nq4lw8.js";import{_ as ue}from"./nsection-block-d2034e4h.js";import{_ as ie}from"./launch-page.vue-b53bqs6b.js";import{_ as pe}from"./help-fab.vue-d36s6htl.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";const de={block:"","cursor-pointer":""},ce={p2:""},me=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},_e=L({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(P,{emit:i}){const v=P,R=i,m=A([]),f=x(()=>{const r=w(v.route.path);return m.value=Array.from({length:r.length},()=>""),r});function w(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const y=x(()=>f.value.map((r,d)=>r[0]===":"?m.value[d]:r).join("").replace(/\/+/g,"/")),o=x(()=>v.route.path.includes(":"));function s(){R("navigate",y.value)}return(r,d)=>{const h=S,n=H,l=ae("VDropdown");return o.value?(t(),k(l,{key:1},{popper:$(({hide:b})=>[e("div",ce,[e("form",{flex:"~ col",onSubmit:se(()=>{s(),b()},["prevent"])},[o.value?(t(),a(g,{key:0},[d[0]||(d[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),a(g,null,I(f.value,(u,p)=>(t(),a(g,{key:p},[u[0]===":"?(t(),k(h,{key:0,modelValue:m.value[p],"onUpdate:modelValue":B=>m.value[p]=B,"w-20":"","n-sm":"",placeholder:u.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),a("span",he,C(u),1))],64))),128))])],64)):N("",!0),_(n,{type:"submit",block:"",n:"primary"},{default:$(()=>d[1]||(d[1]=[E(" Navigate ")])),_:1,__:[1]})],40,me)])]),default:$(()=>[e("code",de,[(t(!0),a(g,null,I(f.value,(b,u)=>(t(),a("span",{key:u,class:M(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},C(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),a("button",{key:0,onClick:s},[e("code",null,C(r.route.path),1)]))}}}),fe={"max-w-full":"","of-auto":""},ge={"w-full":""},ye={"w-20":"","pr-1":""},be={flex:"","items-center":"","justify-end":""},xe={"text-sm":""},ke={flex:"inline gap3","items-center":""},we={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},$e=["onClick"],Ce=["onClick"],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ee=["onClick"],Ie=L({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(P){const i=P,v=J(),R=F(),m=Y(),f=x(()=>[...i.pages].sort((o,s)=>o.path.localeCompare(s.path)));function w(o){const s=i.layouts.find(r=>r.name===o);s&&v(s.file)}function y(o){if(typeof o=="string")return R.value?.middleware.find(s=>s.name===o)?.path}return(o,s)=>{const r=j,d=_e,h=z;return t(),a("div",fe,[e("table",ge,[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),a(g,null,I(f.value,n=>(t(),a("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ye,[e("div",be,[o.matched.find(l=>l.name===n.name)?(t(),k(r,{key:0,n:"green",title:"active",textContent:"active"})):o.matchedPending.find(l=>l.name===n.name)?(t(),k(r,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",xe,[e("div",ke,[_(d,{route:n,class:M(o.matched.find(l=>l.name===n.name)?"text-primary":o.matchedPending.find(l=>l.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=l=>o.$emit("navigate",l))},null,8,["route","class"]),e("div",we,[n.file||n.meta?.file?(t(),a("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>c(v)(n.file||n.meta?.file)},s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)]),8,$e)):N("",!0),n.file||n.meta?.file?(t(),a("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:l=>c(m)(n.file||n.meta?.file)},s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)]),8,Ce)):N("",!0)])])]),e("td",Ne,C(n.name),1),e("td",Re,[_(h,{filepath:y(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ve,[n.meta.layout===!1?(t(),a("span",Pe,"-")):n.meta.layout?(t(),a("button",{key:1,onClick:l=>w(n.meta.layout)},C(n.meta.layout),9,Ee)):(t(),a("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=l=>w("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te={__name:"pages",setup(P,{expose:i}){return i({frontmatter:{}}),(R,m)=>(t(),a("div",Be,m[0]||(m[0]=[e("h1",null,"Pages",-1),e("p",null,[E("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",null,"~/pages/"),E(" directory.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),e("hr",null,null,-1),e("h1",null,"Middlewares",-1),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.",-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Ae={key:0,"h-full":"","of-auto":""},Le={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},Me={"font-mono":""},De={key:1,op50:""},Se={key:0,"text-orange":"",op75:""},Fe={key:1,op50:""},je={"min-h-14":""},ze={key:1,class:"py-4 text-center"},Ue={"w-full":""},Ke={mr1:""},ot=L({__name:"pages",setup(P){const i=Z(),v=G(),R=Q(),m=F(),f=X(),w=ee(),y=x(()=>m.value?.middleware||[]),o=A(""),s=A(0),r=x(()=>(y.value,o.value,f.value,s.value,i.value?.currentRoute?.value?.path));re(()=>{v.value&&(o.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(u=>{o.value=u.fullPath}),i.value?.afterEach(u=>{o.value=u.fullPath})});async function d(){o.value!==i.value?.currentRoute?.value?.path&&i.value.push(o.value||"/")}const h=x(()=>i.value.resolve(o.value||"/").matched);function n(u){i.value.push(u),o.value=u}const l=te(),b=x(()=>`./${l===4?"app/":""}pages/index.vue`);return(u,p)=>{const B=S,D=Ie,T=ue,U=j,K=z,O=ie,W=Te,q=pe;return t(),a(g,null,[c(R)?.pages&&c(i)?(t(),a("div",Ae,[e("div",Le,[e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[1]||(p[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",Me,C(r.value),1),p[2]||(p[2]=e("span",{op50:""}," to ",-1))],64)):(t(),a("span",De,"Current route"))]),_(B,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=V=>o.value=V),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(r.value===o.value?"":h.value.length?"text-green":"text-orange"),onKeydown:le(d,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[3]||(p[3]=e("span",null,[E("Press "),e("b",{"font-bold":""},"Enter"),E(" to navigate")],-1)),h.value.length?N("",!0):(t(),a("span",Se," (no match)"))],64)):(t(),a("span",Fe,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:$(()=>[e("div",je,[h.value.length?(t(),k(D,{key:0,pages:h.value,layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),a("div",ze,p[4]||(p[4]=[e("span",{op50:""},"No routes matched",-1)])))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c(w).length} routes registered in your application`,padding:"pr5"},{default:$(()=>[_(D,{pages:c(w),layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),y.value.length?(t(),k(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${y.value.length} middleware registered in your application`,padding:"px13"},{default:$(()=>[e("table",Ue,[p[5]||(p[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),a(g,null,I(y.value,V=>(t(),a("tr",{key:V.path,"h-7":""},[e("td",null,[e("span",Ke,C(V.name),1),V.global?(t(),k(U,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(K,{filepath:V.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(t(),k(O,{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 u?u.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in u?u.ensureDevAuthToken:c(ne))(),"enablePages")}}]},null,8,["description","actions"])),_(q,null,{default:$(()=>[_(W)]),_:1})],64)}}});export{ot as default}; |
| import{_ as k}from"./state-editor.vue-wk1rth22.js";import{p as x,J as i,a3 as e,F as $,ag as N,V as d,a4 as a,W as B,a6 as V,S as b,q as h,ai as w,U as _,a5 as o,u as F,ac as O,ab as E}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as P}from"./nsection-block-d2034e4h.js";import{f as R,_ as j}from"./mihtqtxa.js";import{_ as A}from"./help-fab.vue-d36s6htl.js";import"./data-schema-button.vue-kuz5pkek.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=x({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(f){return(t,n)=>{const c=k;return e(),i("div",null,[t.state&&Object.keys(t.state).length>0?(e(),i("div",G,[(e(!0),i($,null,N(t.state,(s,r)=>(e(),d(c,{key:r,revision:t.revision,state:s,name:r.startsWith(t.prefix)?r.slice(t.prefix.length):r},{actions:a(l=>[B(t.$slots,"actions",V({ref_for:!0},l))]),_:2},1032,["revision","state","name"]))),128))])):(e(),i("div",H," No data "))])}}}),T={class:"markdown-body"},W={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(c,s)=>(e(),i("div",T,s[0]||(s[0]=[b("h1",null,"State & Async Data",-1),b("p",null,"// TODO",-1)])))}},q={key:0},tt=x({__name:"payload",setup(f){const t=R(),n=h(()=>t.value?.nuxt.payload),c=h(()=>t.value?.revision.value);async function s(r){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",r)}return(r,l)=>{const m=K,p=P,v=j,S=k,g=W,D=A,C=w("tooltip");return e(),i($,null,[F(t)?(e(),i("div",q,[o(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(m,{state:n.value.state,revision:c.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),o(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(v,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:l[0]||(l[0]=y=>s())},{default:a(()=>l[1]||(l[1]=[E(" Re-fetch all data ")])),_:1,__:[1]})]),default:a(()=>[o(m,{state:n.value.data,revision:c.value},{actions:a(({isOpen:y,name:u})=>[y&&u?O((e(),d(v,{key:0,title:`Re-fetch '${u}'`,icon:"carbon-recycle",border:!1,onClick:J=>s([u])},null,8,["title","onClick"])),[[C,`Re-fetch '${u}'`,void 0,{bottom:!0}]]):_("",!0)]),_:1},8,["state","revision"])]),_:1}),n.value.functions&&Object.keys(n.value.functions).length?(e(),d(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o(S,{"ml--6":"",state:n.value.functions,revision:c.value},null,8,["state","revision"])]),_:1})):_("",!0)])):_("",!0),o(D,null,{default:a(()=>[o(g)]),_:1})],64)}}});export{tt as default}; |
| import{F as r}from"./mihtqtxa.js";import{u as m,m as _}from"./vue-devtools-fvy4oij0.js";import{p as c,J as p,a3 as e,V as o,u as n,a4 as i,ab as u}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./vue-virtual-scroller.esm-k5helfir.js";const l={class:"h-full w-full"},h=c({__name:"pinia",setup(f){const{connected:a}=m();return(d,t)=>{const s=r;return e(),p("div",l,[n(a)?(e(),o(n(_),{key:0})):(e(),o(s,{key:1},{default:i(()=>t[0]||(t[0]=[u(" Connecting.... ")])),_:1,__:[0]}))])}}});export{h as default}; |
| import{_ as T}from"./nbadge-e9vkbxgo.js";import{_ as w}from"./filepath-item.vue-f9nq4lw8.js";import{_ as k}from"./duration-display.vue-mr4ha0rw.js";import{A as D,a3 as B,I as V,b as I,x as F,f as H}from"./mihtqtxa.js";import{p as v,q as h,J as _,a3 as s,S as n,a5 as c,U as d,aa as C,a4 as f,V as p,$ as W,W as P,ab as x,F as b,ag as E,Z as A}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as L}from"./nsection-block-d2034e4h.js";import{_ as M}from"./help-fab.vue-d36s6htl.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";const j={flex:"~ gap2","items-center":""},q={w8:"","text-right":"","text-sm":"",op25:""},z={key:0,"flex-auto":"","text-right":""},J=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(m){const e=m,r=D(),a=h(()=>B(e.plugin.src,r.value?.rootDir||"").path);return(t,l)=>{const o=T,u=w,i=k;return s(),_("div",j,[n("div",q,C(t.index),1),c(u,{filepath:e.plugin.src,subpath:!0},{default:f(()=>[n("div",null,[a.value.startsWith("#")?(s(),p(o,{key:0,n:"rose",textContent:"virtual"})):a.value.startsWith(".")?d("",!0):(s(),p(o,{key:1,n:"gray",textContent:"module"})),t.plugin.mode==="server"?(s(),p(o,{key:2,n:"teal",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(s(),p(o,{key:3,n:"orange",textContent:"client"})):d("",!0)])]),_:1},8,["filepath"]),t.plugin.metric?.duration!=null?(s(),_("div",z,[c(i,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),R={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},U={flex:"~ items-center gap-1","font-bold":""},Y=v({__name:"HelpTip",props:{title:{},icon:{}},setup(m){return(e,r)=>{const a=V,t=W("ContentSlot");return s(),_("div",R,[n("div",U,[e.icon?(s(),p(a,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),n("div",null,C(e.title),1)]),n("div",null,[P(e.$slots,"default",{},()=>[c(t,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Z={};function G(m,e){const r=Y;return s(),p(r,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:f(()=>[P(m.$slots,"default")]),_:3})}const K=I(Z,[["render",G]]),O={class:"markdown-body"},Q={__name:"plugins",setup(m,{expose:e}){return e({frontmatter:{}}),(a,t)=>{const l=K;return s(),_("div",O,[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",null,"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),c(l,null,{default:f(()=>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,__:[0]}),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))])}}},X={pt4:""},tt={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},pt=v({__name:"plugins",setup(m){const e=F(),r=H(),a=h(()=>{const l=e.value?.plugins||[],o=r.value?.metrics.clientPlugins()||[];return l.map(u=>{const i=typeof u=="string"?{src:u}:u;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),t=h(()=>{const l=r.value?.metrics.clientPlugins()||[],o=Math.min(...l.map(i=>i.start));return Math.max(...l.map(i=>i.end))-o});return(l,o)=>{const u=J,i=k,g=L,N=Q,S=M;return s(),_(b,null,[c(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${a.value.length}`},{default:f(()=>[n("div",X,[(s(!0),_(b,null,E(a.value,(y,$)=>(s(),p(u,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:A($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",tt,[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)),c(i,{duration:t.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),c(S,null,{default:f(()=>[c(N)]),_:1})],64)}}});export{pt as default}; |
| import{f as m,w as d,F as f}from"./mihtqtxa.js";import{u as c,f as _}from"./vue-devtools-fvy4oij0.js";import{p as v,J as C,a3 as n,V as a,u as o,a4 as E,ab as I}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./vue-virtual-scroller.esm-k5helfir.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:l}=c(),t=m(),p=d();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return n(),C("div",k,[o(l)?(n(),a(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(),a(i,{key:1},{default:E(()=>e[2]||(e[2]=[I(" Connecting.... ")])),_:1,__:[2]}))])}}});export{N as default}; |
| import{_ as x}from"./state-editor.vue-wk1rth22.js";import{_ as b}from"./nsection-block-d2034e4h.js";import{J as u,a3 as l,S as o,ab as d,p as y,q as c,U as C,a5 as e,u as f,a4 as a,F as k}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as w}from"./help-fab.vue-d36s6htl.js";import{f as N,bk as R}from"./mihtqtxa.js";import"./data-schema-button.vue-kuz5pkek.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const T={class:"markdown-body"},B={__name:"runtime-configs",setup(_,{expose:t}){return t({frontmatter:{}}),(m,n)=>(l(),u("div",T,n[0]||(n[0]=[o("h1",null,"Runtime Configs",-1),o("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.",-1),o("p",null,[d("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 "),o("code",null,"nuxt.config.js"),d(" file, or check more details in the documentation.")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},S={key:0},H=y({__name:"runtime-configs",setup(_){const t=N(),p=R(),m=c(()=>t.value?.nuxt.payload),n=c(()=>t.value?.revision.value),g=c(()=>{const i={...p.value};return delete i.public,delete i.app,i});return(i,V)=>{const s=x,r=b,v=B,h=w;return l(),u(k,null,[f(t)?(l(),u("div",S,[e(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[e(s,{state:f(t).app.appConfig,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[e(s,{state:m.value.config?.public,revision:n.value},null,8,["state","revision"])]),_:1}),e(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:a(()=>[e(s,{state:g.value,revision:n.value,readonly:""},null,8,["state","revision"])]),_:1})])):C("",!0),e(h,null,{default:a(()=>[e(v)]),_:1})],64)}}});export{H as default}; |
| import{b6 as S,r as k,E as M,bl as P}from"./mihtqtxa.js";import{p as A,aD as R,E as L,M as C,J as U,a3 as T,u as x}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.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 Z=["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,Z))}});export{ee as default}; |
| import{_ as j}from"./ncheckbox.vue-de0732k3.js";import{G as O,_ as R,v as T,I as A}from"./mihtqtxa.js";import{_ as E}from"./nselect.vue-gbkqq9mb.js";import{p as L,q as N,x as q,J as u,a3 as s,U as b,W as m,F as c,ag as h,u as r,a5 as y,S as C,V as p,a4 as V,ab as S,Z as v,aa as z}from"./vendor/json-editor-vue-m9gzt21j.js";const G={p4:"",flex:"~ col gap-4"},J={key:1,ml2:"",flex:""},K=["value"],M={key:0,flex:"","gap-4":""},X=L({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(U,{emit:w}){const g=U,d=O(g,"modelValue",w,{passive:!0}),$=N(()=>[...g.keys,"active","key","value","type"]),B=N(()=>{const l={};for(const e of $.value)l[e]=g.default[e]||"";return l}),I=["string","number","boolean","file","date","time","datetime-local"];function D(l,e){const t=e.target;if(t.files&&t.files[0]){const i=t.files[0],f=new FileReader;f.readAsDataURL(i),f.onload=()=>{d.value[l].value=f.result}}}return q(()=>d,l=>{l.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type==="boolean"&&typeof e.value!="boolean"?e.value=!0:e.type==="file"&&typeof e.value!="object"?e.value="":e.type==="date"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(l,e)=>{const t=j,i=T,f=E,F=A,_=R;return s(),u("div",G,[(s(!0),u(c,null,h(r(d),(a,k)=>(s(),u("div",{key:k,flex:"~ gap-2","justify-around":""},[m(l.$slots,"input",{item:a}),(s(!0),u(c,null,h($.value,n=>(s(),u(c,{key:n},[a.type!==null&&n==="active"?(s(),p(t,{key:0,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,n:"sm primary",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):b("",!0),a.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),u(c,{key:2},[a.type==="file"?(s(),p(i,{key:0,type:"file",disabled:l.disabled,class:v(l.disabled?"op75":""),onChange:o=>D(k,o)},null,8,["disabled","class","onChange"])):a.type==="boolean"?(s(),u("div",J,[y(t,{modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,placeholder:"Value",n:"green lg",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,type:a.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(f,{key:3,modelValue:a.type,"onUpdate:modelValue":o=>a.type=o,n:"sm green",class:v(l.disabled?"op75":""),disabled:l.disabled},{default:V(()=>[(s(),u(c,null,h(I,o=>C("option",{key:o,value:o},z(o),9,K)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):b("",!0)],64))),128)),m(l.$slots,"input-actions",{},()=>[y(_,{n:"red",disabled:l.disabled,class:v(l.disabled?"op0!":""),onClick:n=>r(d).splice(k,1)},{default:V(()=>[y(F,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),l.disabled?b("",!0):(s(),u("div",M,[m(l.$slots,"actions",{params:r(d)},()=>[y(_,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=a=>r(d).push({...B.value}))},{default:V(()=>e[2]||(e[2]=[S(" Add ")])),_:1,__:[2]}),e[4]||(e[4]=C("div",{"flex-auto":""},null,-1)),r(d).length?(s(),p(_,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=a=>r(d).splice(0,r(d).length))},{default:V(()=>e[3]||(e[3]=[S(" Remove All ")])),_:1,__:[3]})):b("",!0)])])),m(l.$slots,"default")])}}});export{X as _}; |
| import{be as $e,I as De,b4 as se,bf as Ke,b2 as Qe,a4 as Xe,A as Ye,f as Ze,w as et,g as Ee,ay as tt,b3 as ot,a as nt,_ as Re,v as at,i as Ve,F as lt,M as st,bg as rt,S as it,n as ut,a8 as dt}from"./mihtqtxa.js";import{_ as ct}from"./nnavbar.vue-chg3j9po.js";import{_ as je}from"./nbadge-e9vkbxgo.js";import{p as ye,k as P,J as k,a3 as r,S as u,W as pt,U as N,Z as M,V as D,aa as O,u as b,ab as K,X as ft,F as L,ag as H,D as me,x as Ie,b as Ue,C as vt,z as mt,r as ve,q as V,w as yt,ai as Oe,a5 as v,a4 as T,ac as Z,a6 as ht,av as gt,K as bt}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as _t}from"./nselect.vue-gbkqq9mb.js";import{_ as Ne}from"./server-route-inputs.vue-j0srlwil.js";import{_ as kt}from"./code-snippets.vue-jst45uux.js";import{_ as wt}from"./data-schema-button.vue-kuz5pkek.js";import{_ as xt}from"./ncode-block.vue-ctkw4rc7.js";import{d as Ct}from"./vendor/unocss-oyl7opas.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-d2034e4h.js";import{_ as Tt}from"./ndrawer.vue-gsquq1a1.js";import"./vendor/shiki-imfwxqoq.js";import"./ncheckbox.vue-de0732k3.js";import"./client-oeqdl4pb.js";import"./nicon-title.vue-ejocqf9t.js";const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),n=$e();return(o,m)=>{const f=De,d=je,_=Pe;return r(),k("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:ft({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),D(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),D(d,{key:1,class:M(b(se)(o.item.method||"*")),textContent:O((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),D(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+O(o.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,H(o.item.routes,h=>(r(),D(_,{key:h.filepath,item:h,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function $t(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=s||{},m=o.decode||Dt;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let _=e.indexOf(";",f);if(_===-1)_=e.length;else if(_<d){f=e.lastIndexOf(";",d-1)+1;continue}const h=e.slice(f,d).trim();if(o?.filter&&!o?.filter(h)){f=_+1;continue}if(n[h]===void 0){let i=e.slice(d+1,_).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[h]=Et(i,m)}f=_+1}return n}function Dt(e){return e.includes("%")?decodeURIComponent(e):e}function Et(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,n){const o=n||{},m=o.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 d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const _=o.maxAge-0;if(Number.isNaN(_)||!Number.isFinite(_))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(_)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Rt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}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,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(s in e)e.hasOwnProperty(s)&&n[s]!==e[s]&&(n[s]=A(e[s]))}else{n={};for(s in e)s==="__proto__"?Object.defineProperty(n,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):n[s]=A(e[s])}return n}if(o==="[object Array]"){for(s=e.length,n=Array(s);s--;)n[s]=A(e[s]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(m){n.add(A(m))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(m,f){n.set(A(f),A(m))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(A(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ct(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=window.cookieStore;function jt(e,s){const n={...Vt,...s};n.filter??=i=>i===e;const o=Se(n)||{};let m;n.maxAge!==void 0?m=n.maxAge*1e3:n.expires&&(m=n.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,d=f||o[e]===void 0||o[e]===null,_=A(f?void 0:o[e]??n.default?.()),h=m&&!f?Ot(_,m,n.watch&&n.watch!=="shallow"):P(_);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const E=(w=!1)=>{!w&&(n.readonly||Ke(h.value,o[e]))||(Ut(e,h.value,n),o[e]=A(h.value),i?.postMessage({value:n.encode(h.value)}))},I=w=>{const y=w.refresh?Se(n)?.[e]:n.decode(w.value);B=!0,h.value=y,o[e]=A(y),mt(()=>{B=!1})};let B=!1;const J=!!Ue();if(J&&me(()=>{B=!0,E(),i?.close()}),le){const w=y=>{const U=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);U&&I({value:U.value}),g&&I({value:null})};le.addEventListener("change",w),J&&me(()=>le.removeEventListener("change",w))}else i&&(i.onmessage=({data:w})=>I(w));n.watch&&Ie(h,()=>{B||E()},{deep:n.watch!=="shallow"}),d&&E(d)}return h}function Se(e={}){return $t(document.cookie,e)}function It(e,s,n={}){return s==null?Ce(e,s,{...n,maxAge:-1}):Ce(e,s,n)}function Ut(e,s,n={}){document.cookie=It(e,s,n)}const Te=2147483647;function Ot(e,s,n){let o,m,f=0;const d=n?P(e):{value:e};return Ue()&&me(()=>{m?.(),clearTimeout(o)}),vt((_,h)=>{n&&(m=Ie(d,h));function i(){f=0,clearTimeout(o);const E=s-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<s)return i();d.value=void 0,h()},I)}return{get(){return _(),d.value},set(E){i(),d.value=E,h()}}})}const Nt={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},Pt={flex:"~ gap2 items-center"},At={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt={class:"hidden md:block"},Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Gt={key:2},Kt={key:3,border:"b base",relative:"","n-code-block":""},Qt={flex:"~ wrap","w-full":""},Xt=["onClick"],Yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Zt={key:1,"text-xs":"",op50:""},eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},ao={border:"~ base",rounded:""},lo=["src"],so={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const n=e,o=s,[m,f]=Qe(),d=Xe(),_=Ye(),h=Ze(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=V(()=>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=V(()=>{if(E.value==="json")return JSON.stringify(i.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),w=et(),y=V(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),U=V(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(n.route.method||"GET"),C=P({}),x=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"}]}),j=P({}),{inputDefaults:S,sendFrom:F}=Ee("serverRoutes"),Q=V(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=V(()=>ie.includes(g.value.toUpperCase())),c=P(),te=["input","json"],W=P(te[0]),ue=V({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=V(()=>({...G(S.value.query),...G(x.query)})),ge=V(()=>({...G(S.value.headers),...G(x.headers)})),de=V(()=>ee.value?W.value==="json"?{...G(S.value.body),...j.value}:{...G(S.value.body),...G(x.body)}:void 0),Ae=V(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=V(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&C.value[R]||R).join("")||"")+a;let p=_.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=V(()=>Ae.value+oe.value);function G(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:$})=>p&&R&&$!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;st("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:de.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 ke=V(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`, | ||
| `);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),p&&t.push(`headers: { | ||
| ${p} | ||
| }`),de.value&&t.push(`body: ${JSON.stringify(de.value,null,2)}`);const R=t.length?`, { | ||
| ${t.join(`, | ||
| `).split(` | ||
| `).map($=>` ${$}`).join(` | ||
| `)} | ||
| }`:"";return a.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${R})`}),a.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${R})`}),a}),X=P(qe()),z=ve({key:"",value:""}),Be=V(()=>{const a=[];return U.value.length&&a.push({name:"Params",slug:"params",length:U.value.length}),a.push({name:"Query",slug:"query",length:x.query.length}),ee.value&&a.push({name:"Body",slug:"body",length:x.body.length}),a.push({name:"Headers",slug:"headers",length:x.headers.length}),a.push({name:"Cookies",slug:"cookies",length:X.value.length}),a.push({name:"Snippets",slug:"snippet"}),a});function qe(){return document.cookie.split("; ").map(a=>{const[t,p]=a.split("=");return{key:t,value:p}}).filter(a=>a.key)}function ce(a,t){if(!a)return;const p=X.value.find($=>$.key===a),R=jt(a);p!==void 0?t===void 0&&(X.value=X.value.filter($=>$.key!==a)):(X.value.push({key:a,value:t}),z.key="",z.value=""),R.value=t}yt(()=>{W.value==="json"&&typeof j.value=="string"&&(j.value=JSON.parse(j.value))});const pe=tt("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});ot([x,c],()=>{const a=pe.value?.find(t=>t.path===n.route.filepath);if(a){c.value||(c.value=a.tab),a.tab!==c.value&&(a.tab=c.value);const{body:t,query:p,headers:R,params:$}=a.inputs;Object.assign(x,{body:t,query:p,headers:R}),C.value=$}else{const t={path:n.route.filepath,tab:U.value.length?"params":"query",inputs:{...x,...U.value.length?{params:C.value}:{}}};pe.value.push(t),c.value||(c.value=t.tab)}},{immediate:!0,deep:!0,debounce:500});function Me(){pe.value=[],x.body=[],x.query=[],x.headers=[],C.value={},c.value=U.value.length?"params":"query"}const Fe=nt();return(a,t)=>{const p=Re,R=_t,$=at,q=De,we=Ne,ze=kt,He=Ve,Je=lt,fe=je,We=wt,Ge=xt,ne=Oe("tooltip");return r(),k("div",Nt,[u("div",Lt,[u("div",Pt,[a.route.method?(r(),D(p,{key:0,class:M(["n-badge-base n-sm",b(se)(g.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:T(()=>[K(O(g.value.toUpperCase()),1)]),_:1},8,["class"])):(r(),D(R,{key:1,modelValue:g.value,"onUpdate:modelValue":t[0]||(t[0]=l=>g.value=l),class:M(["n-badge-base n-sm",b(se)(g.value)])},{default:T(()=>[(r(),k(L,null,H(re,l=>u("option",{key:l,class:M(b(se)(l))},O(l.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),u("div",At,[v($,{"model-value":oe.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),u("div",Bt,[Z(v(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:t[1]||(t[1]=l=>b(Fe)(be.value,"server-route-url"))},null,512),[[ne,"Copy URL"]]),Z(v(p,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:t[2]||(t[2]=l=>b(w)(a.route.filepath))},null,512),[[ne,"Open in Editor"]])])]),v(p,{"h-full":"",n:"primary solid",onClick:_e},{default:T(()=>[v(q,{icon:"carbon:send"})]),_:1})])]),u("div",qt,[(r(!0),k(L,null,H(Be.value,l=>Z((r(),D(p,{key:l.slug,class:M(c.value===l.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>c.value=l.slug},{default:T(()=>[v(q,{icon:b(Le)[l.slug]},null,8,["icon"]),u("div",Mt,[K(O(l.name)+" "+O(l?.length?`(${l.length})`:"")+" ",1),u("span",null,O(b(S)[l.slug]?.length?`(${b(S)[l.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ne,l.name]])),128)),t[12]||(t[12]=u("div",{"flex-auto":""},null,-1)),t[13]||(t[13]=u("div",{"text-xs":"",op50:""}," Send from ",-1)),v(R,{modelValue:Q.value,"onUpdate:modelValue":t[3]||(t[3]=l=>Q.value=l),class:"n-xs",disabled:!b(h)?.app?.$fetch},{default:T(()=>t[11]||(t[11]=[u("option",{value:"app"}," App ",-1),u("option",{value:"devtools"}," DevTools ",-1)])),_:1,__:[11]},8,["modelValue","disabled"]),Z(v(p,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Me},null,512),[[ne,"Clear Inputs Saved Cache"]])]),c.value==="params"?(r(),k("div",Ft,[(r(!0),k(L,null,H(U.value,l=>(r(),k(L,{key:l},[u("div",zt,O(l),1),v($,{modelValue:C.value[l],"onUpdate:modelValue":Y=>C.value[l]=Y,placeholder:l,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),c.value==="cookies"?(r(),k("div",Ht,[(r(!0),k(L,null,H(X.value,l=>(r(),k("div",{key:l.key,flex:"~ gap-4 items-center"},[v($,{placeholder:"Key...","model-value":l.key,disabled:"","op-70":""},null,8,["model-value"]),v($,{placeholder:"Value...","model-value":l.value,"flex-1":"",n:"primary",onInput:Y=>ce(l.key,Y.target?.value)},null,8,["model-value","onInput"]),v(p,{title:"Delete",n:"red",onClick:Y=>ce(l.key,void 0)},{default:T(()=>[v(q,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),u("div",Jt,[v($,{modelValue:z.key,"onUpdate:modelValue":t[4]||(t[4]=l=>z.key=l),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v($,{modelValue:z.value,"onUpdate:modelValue":t[5]||(t[5]=l=>z.value=l),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(p,{title:"Add",n:"primary",onClick:t[6]||(t[6]=l=>ce(z.key,z.value))},{default:T(()=>[v(q,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),v(b(m),null,{default:T(()=>[v(we,{modelValue:ue.value,"onUpdate:modelValue":t[9]||(t[9]=l=>ue.value=l),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:T(()=>[b(S)[c.value]?.length?(r(),k(L,{key:0},[u("div",Wt,[t[14]||(t[14]=u("div",{"w-5":"","x-divider":""},null,-1)),t[15]||(t[15]=u("div",{"flex-none":""}," Default Inputs ",-1)),v(p,{icon:"i-carbon-edit",border:!1,onClick:t[7]||(t[7]=l=>o("openDefaultInput"))}),t[16]||(t[16]=u("div",{"x-divider":""},null,-1))]),v(we,{modelValue:b(S)[c.value],"onUpdate:modelValue":t[8]||(t[8]=l=>b(S)[c.value]=l),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),c.value==="snippet"?(r(),k("div",Gt,[ke.value.length?(r(),D(ze,{key:0,"code-snippets":ke.value},null,8,["code-snippets"])):N("",!0)])):ue.value?(r(),k("div",Kt,[c.value==="body"?(r(),k(L,{key:0},[u("div",Qt,[(r(),k(L,null,H(te,l=>u("button",{key:l,px4:"",py2:"",border:"r base",hover:"bg-active",class:M({"border-b":l!==W.value}),onClick:Y=>W.value=l},[u("div",{class:M({op30:l!==W.value}),"font-mono":""},O(l),3)],10,Xt)),64)),t[17]||(t[17]=u("div",{border:"b base","flex-auto":""},null,-1))]),W.value==="input"?(r(),D(b(f),{key:0})):W.value==="json"?(r(),D(b(gt),ht({key:1,modelValue:j.value,"onUpdate:modelValue":t[10]||(t[10]=l=>j.value=l),class:[b(d)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},a.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(r(),D(b(f),{key:1}))])):N("",!0),J.value?B.value?(r(),D(Je,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:T(()=>t[19]||(t[19]=[K(" Fetching... ")])),_:1,__:[19]})):(r(),k(L,{key:6},[u("div",Yt,[t[21]||(t[21]=u("div",null,"Response",-1)),i.error?(r(),D(fe,{key:0,n:"red"},{default:T(()=>t[20]||(t[20]=[K(" Error ")])),_:1,__:[20]})):N("",!0),v(fe,{n:i.error?"orange":"green",textContent:O(i.statusCode)},null,8,["n","textContent"]),i.contentType?(r(),k("code",Zt,O(i.contentType),1)):N("",!0),i.contentType==="application/json"?(r(),D(We,{key:2,getter:()=>({input:I.value})},null,8,["getter"])):N("",!0),t[22]||(t[22]=u("div",{"flex-auto":""},null,-1)),t[23]||(t[23]=u("div",{op50:""}," Request finished in ",-1)),v(fe,{n:"green"},{default:T(()=>[K(O(i.fetchTime)+" ms ",1)]),_:1})]),E.value==="pdf"?(r(),k("div",eo,[u("div",to,[u("object",{data:I.value,type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,oo)])])):E.value!=="media"?(r(),D(Ge,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:I.value,lang:E.value},null,8,["code","lang"])):(r(),k("div",no,[u("div",ao,[i.contentType.includes("image")?(r(),k("img",{key:0,rounded:"",src:I.value},null,8,lo)):(r(),k("video",so,[u("source",{src:I.value,type:"video/mp4"},null,8,ro)]))])]))],64)):(r(),D(He,{key:4},{default:T(()=>[v(p,{n:"primary",onClick:_e},{default:T(()=>[v(q,{icon:"carbon:send"}),t[18]||(t[18]=K(" Send request "))]),_:1,__:[18]})]),_:1}))])}}}),uo={flex:"~ gap1","text-sm":""},co={key:0,op50:""},po={op50:""},Ro=ye({__name:"server-routes",setup(e){const s=P(!1),n=rt(),o=$e(),{selectedRoute:m,view:f,inputDefaults:d}=Ee("serverRoutes"),_=V(()=>{!o.value&&m.value&&(o.value=m.value.filepath);const w=n.value?.find(y=>y.filepath===o.value);return o.value!==m.value?.filepath&&w&&(m.value=w),w}),h=P(""),i=V(()=>new it(n.value||[],{keys:["method","route"],shouldSort:!0})),E=V(()=>n.value?h.value?i.value.search(h.value).map(y=>y.item):n.value:[]),I=V(()=>{const w=[],y=(g,C)=>{g.routes=g.routes||[],g.routes.push(C)},U=(g,C)=>{const x=C?C.routes?.find(S=>S.route===g):w.find(S=>S.route===g);if(x)return x;const j={route:g,filepath:g.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return C?y(C,j):w.push(j),j};return E.value.forEach(g=>{let C,x;const j=g.filepath.split("/"),S=j.slice(j.indexOf("server")+1);if(g.type==="runtime"){S[0]="runtime";const F=j.indexOf("dist");F!==-1&&(C=j[F-1],C&&S.splice(1,0,C))}S.length>0&&S[S.length-1].includes(".")&&S.pop(),S.forEach(F=>{x=U(F,x)}),x?y(x,g):w.push(g)}),w});function B(){f.value=f.value==="tree"?"list":"tree"}function J(w){return w.charAt(0).toUpperCase()+w.slice(1)}return(w,y)=>{const U=Re,g=ct,C=Pe,x=io,j=ut,S=Ve,F=dt,Q=Ne,re=St,ie=Tt,ee=Oe("tooltip");return r(),k(L,null,[v(F,{"storage-key":"tab-server-routes"},{left:T(()=>[v(g,{search:h.value,"onUpdate:search":y[1]||(y[1]=c=>h.value=c),pb2:""},{actions:T(()=>[Z(v(U,{"text-lg":"",icon:b(f)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:B},null,8,["icon"]),[[ee,"Toggle View"]]),Z(v(U,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:y[0]||(y[0]=c=>s.value=!s.value)},null,512),[[ee,"Default Inputs"]])]),default:T(()=>[u("div",uo,[h.value?(r(),k("span",co,O(E.value.length)+" matched · ",1)):N("",!0),u("span",po,O(b(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(r(!0),k(L,null,H(b(f)==="tree"?I.value:E.value,c=>(r(),D(C,{key:c.filepath,item:c},null,8,["item"]))),128))]),right:T(()=>[(r(),D(bt,{max:10},[_.value?(r(),D(x,{key:_.value.filepath,route:_.value,onOpenDefaultInput:y[2]||(y[2]=c=>s.value=!0)},null,8,["route"])):N("",!0)],1024)),_.value?N("",!0):(r(),D(S,{key:0},{default:T(()=>[v(j,{px6:"",py2:""},{default:T(()=>y[5]||(y[5]=[u("span",{op75:""},"Select a route to start",-1)])),_:1,__:[5]})]),_:1}))]),_:1}),v(ie,{modelValue:s.value,"onUpdate:modelValue":y[3]||(y[3]=c=>s.value=c),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:y[4]||(y[4]=c=>s.value=!1)},{default:T(()=>[u("div",null,[y[6]||(y[6]=u("div",{p4:"",border:"b base"},[u("span",{"text-lg":""},"Default Inputs"),u("br"),u("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1)),(r(!0),k(L,null,H(Object.keys(b(d)),c=>(r(),D(re,{key:c,text:`${J(c)} ${b(d)[c].length?`(${b(d)[c].length})`:""}`,padding:!1,icon:b(Le)[c]},{default:T(()=>[v(Q,{modelValue:b(d)[c],"onUpdate:modelValue":te=>b(d)[c]=te,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Ro as default}; |
| import{b1 as ne,I as re,g as ue,b2 as xe,a4 as Oe,A as Te,w as Se,ay as we,b3 as Xe,a as Ee,_ as le,b4 as De,v as Ce,i as ce,F as Me,M as Ie,b5 as $e,S as Re,n as Ue,a8 as Le}from"./mihtqtxa.js";import{_ as Ne}from"./nnavbar.vue-chg3j9po.js";import{_ as fe}from"./nbadge-e9vkbxgo.js";import{a as Ae,p as K,k as B,q as R,J as I,a3 as g,S as m,U as j,a5 as x,aa as N,F as H,ag as G,Z,u as E,r as ie,w as Ve,ai as pe,V as A,ac as z,a4 as M,ab as P,a6 as je,av as He,W as We,X as Be,K as Fe}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as de}from"./server-route-inputs.vue-j0srlwil.js";import{_ as qe}from"./ncode-block.vue-ctkw4rc7.js";import{S as ve}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-d2034e4h.js";import{_ as Ye}from"./ndrawer.vue-gsquq1a1.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./ncheckbox.vue-de0732k3.js";import"./nselect.vue-gbkqq9mb.js";import"./client-oeqdl4pb.js";import"./nicon-title.vue-ejocqf9t.js";var te={exports:{}},se;function Ze(){return se||(se=1,function(F,U){(function(O,S){F.exports=S()})(globalThis,()=>(()=>{var L={949:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),v=function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a==="@reboot")return e=["@reboot","","","","","",""],e;if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(u){return u.trim()}).filter(function(u){return u!==""}).map(function(u){return isNaN(Number(u))?u:Number(u)}).filter(function(u){return u!==null&&u!==""});r.length===0&&r.push("*"),r.sort(function(u,i){return u!==null&&i!==null?u-i:0}),e[a]=r.map(function(u){return u!==null?u.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(l){var h=l.replace(/\D/,""),d=h;return e.dayOfWeekStartIndexZero?h=="7"&&(d="0"):d=(parseInt(h)-1).toString(),l.replace(h,d)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(l){var h=l.replace(/\D/,""),d=h;return e.monthStartIndexZero&&(d=(parseInt(h)+1).toString()),l.replace(h,d)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var u in n)t[4]=t[4].replace(new RegExp(u,"gi"),n[u].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(l){return l!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var s=null;switch(i){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(s!==null){var f=t[i].split("/");t[i]="".concat(f[0],"-").concat(s,"/").concat(f[1])}}},y.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},y.prototype.validateAnyRanges=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.validateOnlyExpectedCharactersFound=function(t,e){var a=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(a&&a.length)throw new Error("Expression contains invalid values: '".concat(a.toString(),"'"))},y}();p.CronParser=v},333:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),v=_(949),y=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,u=n===void 0?!0:n,i=r.verbose,s=i===void 0?!1:i,f=r.dayOfWeekStartIndexZero,l=f===void 0?!0:f,h=r.monthStartIndexZero,d=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,W=C===void 0?null:C,V={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:$,locale:W};V.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var X=new t(e,V);return X.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e,a,r="";try{var n=new v.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]==="@reboot")return((a=(e=this.i18n).atReboot)===null||a===void 0?void 0:a.call(e))||"Run once, at startup";var u=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),f=this.getDayOfWeekDescription(),l=this.getYearDescription();r+=u+i+f+s+l,r=this.transformVerbosity(r,!!this.options.verbose),r=r.charAt(0).toLocaleUpperCase()+r.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)r=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return r},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var u=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,u[0],""),this.formatTime(r,u[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var s=0;s<i.length;s++)n+=" ",n+=this.formatTime(i[s],a,""),s<i.length-2&&(n+=","),s==i.length-2&&(n+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),l=this.getMinutesDescription(),h=this.getHoursDescription();if(n+=f,n&&l&&(n+=", "),n+=l,l===h)return n;n&&h&&(n+=", "),n+=h}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(u){return u},function(u){return o.StringUtilities.format(e.i18n.everyX0Minutes(u),u)},function(u){return e.i18n.minutesX0ThroughX1PastTheHour()},function(u){try{return u=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(u)<20?e.i18n.atX0MinutesPastTheHour(u):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(u)}catch{return e.i18n.atX0MinutesPastTheHour(u)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=0,n=[];a.split("/")[0].split(",").forEach(function(s){var f=s.split("-");f.length===2&&n.push({value:f[1],index:r+1}),r+=f.length});var u=0,i=this.getSegmentDescription(a,this.i18n.everyHour(),function(s){var f=n.find(function(h){return h.value===s&&h.index===u}),l=f&&e.expressionParts[1]!=="0";return u++,l?e.formatTime(s,"59",""):e.formatTime(s,"0","")},function(s){return o.StringUtilities.format(e.i18n.everyX0Hours(s),s)},function(s){return e.i18n.betweenX0AndX1()},function(s){return e.i18n.atX0()});return i},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,u){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var s=parseInt(i),f=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(u)[s]:a[s];if(n.indexOf("#")>-1){var l=null,h=n.substring(n.indexOf("#")+1),d=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(d);break;case"2":l=e.i18n.second(d);break;case"3":l=e.i18n.third(d);break;case"4":l=e.i18n.fourth(d);break;case"5":l=e.i18n.fifth(d);break}f=l+" "+f}return f},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var u=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(u):e.i18n.commaX0ThroughX1(u)},function(n){var u=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),s=n.substring(0,n.indexOf("#"));u=e.i18n.commaOnThe(i,s).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)u=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var f=e.expressionParts[3]!="*";u=f?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return u}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,u){return u&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(u)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var u=parseInt(n[0].replace("W","")),i=u==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),u.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var s=r.match(/L-(\d{1,2})/);if(s){var f=s[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(l){return l=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),l):l},function(l){return l=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(l)},function(l){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(l)},function(l){return e.i18n.commaOnDayX0OfTheMonth(l)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,u,i){var s=null,f=e.indexOf("/")>-1,l=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)s="";else if(e==="*")s=a;else if(!f&&!l&&!h)s=o.StringUtilities.format(i(e),r(e));else if(h){for(var d=e.split(","),$="",C=0;C<d.length;C++)if(C>0&&d.length>2&&($+=",",C<d.length-1&&($+=" ")),C>0&&d.length>1&&(C==d.length-1||d.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),d[C].indexOf("/")>-1||d[C].indexOf("-")>-1){var W=d[C].indexOf("-")>-1&&d[C].indexOf("/")==-1,V=this.getSegmentDescription(d[C],a,r,n,W?this.i18n.commaX0ThroughX1:u,i);W&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(d[C],a,r,n,u,i):$+=r(d[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var d=e.split("/");if(s=o.StringUtilities.format(n(d[1]),d[1]),d[0].indexOf("-")>-1){var X=this.generateRangeSegmentDescription(d[0],u,r);X.indexOf(", ")!=0&&(s+=", "),s+=X}else if(d[0].indexOf("*")==-1){var Y=o.StringUtilities.format(i(d[0]),r(d[0]));Y=Y.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),Y)}}else l&&(s=this.generateRangeSegmentDescription(e,u,r));return s},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",u=e.split("-"),i=r(u[0],1),s=r(u[1],2),f=a(e);return n+=o.StringUtilities.format(f,i,s),n},t.prototype.formatTime=function(e,a,r){var n=0,u=0,i=parseInt(e)+n,s=parseInt(a)+u;s>=60?(s-=60,i+=1):s<0&&(s+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var f="",l=!1;this.options.use24HourTimeFormat||(l=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=l?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return r&&(h=":".concat(("00"+r).substring(r.length))),"".concat(l?f:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(h).concat(l?"":f)},t.prototype.transformVerbosity=function(e,a){if(!a&&(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var r=0,n=Object.entries(this.i18n.conciseVerbosityReplacements());r<n.length;r++){var u=n[r],i=u[0],s=u[1];e=e.replace(new RegExp(i,"g"),s)}return e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();p.ExpressionDescriptor=y},747:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=_(486),v=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=v},486:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o.prototype.atReboot=function(){return"Run once, at startup"},o}();p.en=_},515:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(v,y){if(!v)throw new Error(y)}var o=function(){function v(){}return v.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},v.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},v.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},v.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},v.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},v.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},v}();p.default=o},823:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function o(){}return o.format=function(v){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return v.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(v,y){return y.some(function(t){return v.indexOf(t)>-1})},o}();p.StringUtilities=_}},O={};function S(b){var p=O[b];if(p!==void 0)return p.exports;var _=O[b]={exports:{}};return L[b](_,_.exports,S),_.exports}var w={};return(()=>{var b=w;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=S(333),_=S(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),w})())}(te)),te.exports}var ze=Ze();const Ge=Ae(ze),Je=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(F){const U=F,L=ne(),O=B(!0),S=R(()=>Ge.toString(U.collection.cron));return(w,b)=>{const p=re,_=fe;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",p2:"","hover-bg-active":"",title:S.value,onClick:b[0]||(b[0]=o=>O.value=!O.value)},[m("div",Qe,[x(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":O.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[x(_,{class:"font-mono n-primary",textContent:N(w.collection.cron)},null,8,["textContent"]),m("span",et,N(S.value),1),m("span",tt,"("+N(w.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),O.value?(g(),I("ul",nt,[(g(!0),I(H,null,G(w.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","pl-9":"","font-mono":"","hover-bg-active":"",class:Z([{"bg-active":E(L)===o}]),onClick:v=>L.value=o},N(o),11,rt),b[1]||(b[1]=m("div",{"x-divider":""},null,-1))]))),128))])):j("",!0)])}}}),at={"h-full":"","w-full":"",flex:"~ col"},it={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},st={flex:"~ gap2 items-center"},ut={relative:"","w-full":""},lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ct={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ft={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},dt={key:0,border:"b base",relative:"","n-code-block":""},vt={flex:"~ wrap","w-full":""},ht=["onClick"],mt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},yt={key:1,"text-xs":"",op50:""},gt=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(F,{emit:U}){const L=F,O=U,S=B({payload:{}}),{inputDefaults:w}=ue("serverRoutes"),[b,p]=xe(),_=Oe(),o=Te(),v=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>JSON.stringify(v.data,null,2)),t=R(()=>v.contentType.includes("application/json")?"json":"text"),e=B(!1),a=B(!1),r=Se(),n=B(),u=["json"],i=B(u[0]),s=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=R({get:()=>s[n.value],set:k=>{s[n.value]=k}}),l=R(()=>({...X(w.value.query),...X(s.query)})),h=R(()=>({...X(w.value.headers)})),d=R(()=>Object.keys(S.value?.payload??{}).length?{...S.value}:void 0),$=R(()=>d.value?"POST":"GET"),C=R(()=>{let k=window?.location.origin;return k.charAt(k.length-1)==="/"&&(k=k.slice(0,-1)),k}),W=R(()=>{let k=new URLSearchParams(l.value).toString();k&&(k=`?${k}`);const c=`/_nitro/tasks/${L.task.name}${k}`;let D=o.value?.app.baseURL||"";return(D==="./"||D===".")&&(D=""),D.endsWith("/")&&(D=D.slice(0,-1)),D+c}),V=R(()=>C.value+W.value);function X(k){const c=Object.fromEntries(k.filter(({active:D,key:q,value:J})=>D&&q&&J!==void 0).map(({key:D,value:q})=>[D,q]));return Object.entries(c).length?c:void 0}async function Y(){a.value=!0,e.value=!0;const k=Date.now();Ie("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:d.value,onResponse({response:c}){v.contentType=(c.headers.get("content-type")||"").toString().toLowerCase().trim(),v.statusCode=c.status,v.error=void 0},onResponseError(c){v.error=c.response._data,v.data=c.response._data}})}catch{}e.value=!1,v.fetchTime=Date.now()-k}const me=R(()=>{const k=[];return k.push({name:"Query",slug:"query",length:s.query.length}),k.push({name:"Body",slug:"body",length:s.body.length}),k});Ve(()=>{if(i.value==="json"&&typeof S.value=="string")try{S.value=JSON.parse(S.value)}catch{}});const oe=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const k=oe.value?.find(c=>c.task===L.task.name);if(k){n.value||(n.value=k.tab),k.tab!==n.value&&(k.tab=n.value);const{body:c,query:D,headers:q}=k.inputs;Object.assign(s,{body:c,query:D,headers:q})}else{const c={task:L.task.name,tab:"query",inputs:s};oe.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(k,c)=>{const D=le,q=Ce,J=re,ae=de,ge=ce,_e=Me,ee=fe,be=qe,Q=pe("tooltip");return g(),I("div",at,[m("div",it,[m("div",st,[z((g(),I("div",null,[x(D,{class:Z(["n-badge-base n-sm",E(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[P(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",ut,[x(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",lt,[z(x(D,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=T=>E(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),z(x(D,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=T=>E(r)(k.task.handler))},null,512),[[Q,"Open in Editor"]])])]),x(D,{"h-full":"",n:"primary solid",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"})]),_:1})])]),m("div",ct,[(g(!0),I(H,null,G(me.value,T=>z((g(),A(D,{key:T.slug,class:Z(n.value===T.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=T.slug},{default:M(()=>[x(J,{icon:E(ve)[T.slug]},null,8,["icon"]),m("div",ft,[P(N(T.name)+" "+N(T?.length?`(${T.length})`:"")+" ",1),m("span",null,N(E(w)[T.slug]?.length?`(${E(w)[T.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,T.name]])),128))]),x(E(b),null,{default:M(()=>[x(ae,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=T=>f.value=T),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[E(w)[n.value]?.length?(g(),I(H,{key:0},[m("div",pt,[c[6]||(c[6]=m("div",{"w-5":"","x-divider":""},null,-1)),c[7]||(c[7]=m("div",{"flex-none":""}," Default Inputs ",-1)),x(D,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=T=>O("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),x(ae,{modelValue:E(w)[n.value],"onUpdate:modelValue":c[3]||(c[3]=T=>E(w)[n.value]=T),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",dt,[n.value==="body"?(g(),I(H,{key:0},[m("div",vt,[(g(),I(H,null,G(u,T=>m("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:Z({"border-b":T!==i.value}),onClick:ke=>i.value=T},[m("div",{class:Z({op30:T!==i.value}),"font-mono":""},N(T),3)],10,ht)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(E(p),{key:0})):i.value==="json"?(g(),A(E(He),je({key:1,modelValue:S.value,"onUpdate:modelValue":c[5]||(c[5]=T=>S.value=T),class:[E(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},k.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(E(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>c[11]||(c[11]=[P(" Running... ")])),_:1,__:[11]})):(g(),I(H,{key:3},[m("div",mt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),A(ee,{key:0,n:"red"},{default:M(()=>c[12]||(c[12]=[P(" Error ")])),_:1,__:[12]})):j("",!0),x(ee,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",yt,N(v.contentType),1)):j("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),x(ee,{n:"green"},{default:M(()=>[P(N(v.fetchTime)+" ms ",1)]),_:1})]),x(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:M(()=>[x(D,{n:"primary",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"}),c[10]||(c[10]=P(" Run task "))]),_:1,__:[10]})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},he=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const U=B(!0),L=ne();return(O,S)=>{const w=re,b=he;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:Z([{"bg-active":E(L)===O.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${O.index*1.5}em)`}),onClick:S[0]||(S[0]=p=>{U.value=!U.value,L.value=O.item.name})},[m("div",_t,[O.item.type==="collection"?(g(),A(w,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),m("span",bt,[O.item.type==="collection"?(g(),A(w,{key:0,title:`${O.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(w,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+N(O.item.name),1)])],6),S[1]||(S[1]=m("div",{"x-divider":""},null,-1)),U.value?We(O.$slots,"default",{key:0},()=>[(g(!0),I(H,null,G(O.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:O.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),kt={flex:"~ gap1","text-sm":""},xt={key:0,op50:""},Ot={op50:""},Vt=K({__name:"server-tasks",setup(F){const U=B(!1),L=$e(),O=R(()=>Object.keys(L.value?.tasks??{}).map(r=>({name:r,...L.value.tasks[r],type:"task"}))),S=R(()=>Object.entries(L.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),w=ne(),{view:b,selectedTask:p,inputDefaults:_}=ue("serverTasks"),o=R(()=>{!w.value&&p.value&&(w.value=p.value.name);const r=O.value.find(n=>n.name===w.value);return w.value!==p.value?.name&&r&&(p.value=r),r}),v=B(""),y=R(()=>new Re(O.value,{keys:["key","description"],shouldSort:!0})),t=R(()=>v.value?y.value.search(v.value).map(n=>n.item):O.value),e=R(()=>{const r=[],n=(i,s)=>{i.tasks||=[],i.tasks.push(s)},u=(i,s)=>{const f=s?s.tasks?.find(h=>h.name===i):r.find(h=>h.name===i);if(f)return{...f,type:"collection"};const l={name:i,handler:i,description:"",type:"collection",tasks:[]};return s?n(s,l):r.push(l),l};return t.value.forEach(i=>{let s;const f={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(d=>{s=u(d,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=le,i=Ne,s=ot,f=Le,l=gt,h=Ue,d=ce,$=de,C=Pe,W=Ye,V=pe("tooltip");return g(),I(H,null,[x(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[x(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[x(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=X=>v.value=X),pb2:""},{actions:M(()=>[z(x(u,{"text-lg":"",icon:E(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),z(x(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=X=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",kt,[v.value?(g(),I("span",xt,N(t.value.length)+" matched · ",1)):j("",!0),m("span",Ot,N(O.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(H,null,G(E(b)==="tree"?e.value:t.value,X=>(g(),A(he,{key:X.name,item:X},null,8,["item"]))),128))]),right:M(()=>[n[6]||(n[6]=m("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),m("div",null,[m("ul",null,[(g(!0),I(H,null,G(S.value,X=>(g(),I("li",{key:X.cron},[x(s,{collection:X},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),A(Fe,{max:10},[o.value?(g(),A(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=X=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(d,{key:0},{default:M(()=>[x(h,{px6:"",py2:""},{default:M(()=>n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])),_:1,__:[7]})]),_:1}))]),_:1}),x(W,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=X=>U.value=X),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=X=>U.value=!1)},{default:M(()=>[m("div",null,[n[8]||(n[8]=m("div",{p4:"",border:"b base"},[m("span",{"text-lg":""},"Default Inputs"),m("br"),m("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),x(C,{text:`Query ${E(_).query.length?`(${E(_).query.length})`:""}`,padding:!1,icon:E(ve).query},{default:M(()=>[x($,{modelValue:E(_).query,"onUpdate:modelValue":n[3]||(n[3]=X=>E(_).query=X),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default}; |
| import{_ as h}from"./nicon-title.vue-ejocqf9t.js";import{_ as ee}from"./nswitch.vue-bpoo3j7g.js";import{g as j,f as le,k as oe,l as ne,m as te,_ as ae,n as se,t as A,r as ie,o as ue}from"./mihtqtxa.js";import{_ as de}from"./nselect.vue-gbkqq9mb.js";import{_ as re}from"./ncheckbox.vue-de0732k3.js";import{_ as pe}from"./nlink.vue-k5yoz8g1.js";import{p as me,w as P,J as m,a3 as d,a5 as n,S as o,F as v,ag as k,u as t,a4 as a,ab as N,aa as _,j as p,V as F,U as M,Z as R}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const fe={px8:"",py6:""},ve={grid:"~ lg:cols-2 gap-x-10 gap-y-3","max-w-300":""},ge={flex:"~ col gap-2"},be={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},_e={capitalize:"",op75:""},xe={"flex-auto":"","overflow-hidden":"","text-ellipsis":"","ws-nowrap":""},ye={flex:"~ col gap-2"},ce=["value"],Ve=["value"],ke=["value"],Ce={flex:"~ gap-2"},we={flex:"~ gap-2"},Be=me({__name:"settings",setup(Se){const{interactionCloseOnOutsideClick:C,showPanel:I,showHelpButtons:$,scale:z,hiddenTabs:x,pinnedTabs:u,hiddenTabCategories:y,minimizePanelInactive:w,sidebarExpanded:S,sidebarScrollable:D}=j("ui"),{openInEditor:E}=j("behavior"),c=le(),W=[["Auto",void 0],["VS Code","vscode"],["VS Code Insider","vscode-insider"],["Cursor","cursor"],["Zed","zed"],["WebStorm","webstorm"],["Sublime Text","sublime"],["Atom","atom"],["Windsurf","windsurf"]],H=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],Z=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],J=oe(ne());function q(s,e){e?x.value=x.value.filter(r=>r!==s):x.value.push(s)}function G(s,e){e?y.value=y.value.filter(r=>r!==s):y.value.push(s)}function K(s){u.value.includes(s)?u.value=u.value.filter(e=>e!==s):u.value.push(s)}function L(s,e){const r=u.value.indexOf(s);if(r===-1)return;const g=r+e;if(g<0||g>=u.value.length)return;const V=[...u.value];V.splice(r,1),V.splice(g,0,s),u.value=V}async function Q(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await ie.clearOptions(),c.value?.app?.reload?.(),window.location.reload())}return P(()=>{c.value&&(c.value.app.frameState.value.closeOnOutsideClick=C.value)}),P(()=>{c.value&&(c.value.app.frameState.value.minimizePanelInactive=w.value)}),(s,e)=>{const r=h,g=ee,V=ue,f=ae,T=se,X=te,B=de,b=re,Y=pe;return d(),m("div",fe,[n(r,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),o("div",ve,[o("div",ge,[e[10]||(e[10]=o("h3",{"text-lg":""}," Tabs ",-1)),(d(!0),m(v,null,k(t(J),([l,O])=>(d(),m(v,{key:l},[O.length?(d(),F(T,{key:0,p3:"",flex:"~ col gap-1",class:R(t(y).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(g,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(y).includes(l),"onUpdate:modelValue":i=>G(l,i)},{default:a(()=>[o("div",be,[o("span",_e,_(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e[9]||(e[9]=o("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),(d(!0),m(v,null,k(O,i=>(d(),F(g,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(x).includes(i.name),"onUpdate:modelValue":U=>q(i.name,U)},{default:a(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","of-hidden":"","pr-4":"",class:R(t(x).includes(i.name)?"op25":"")},[n(V,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),o("span",xe,_(i.title),1),t(u).includes(i.name)?(d(),m(v,{key:0},[n(f,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:U=>L(i.name,-1)},null,8,["disabled","onClick"]),n(f,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:U=>L(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(f,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:U=>K(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2,__:[9]},1032,["class"])):M("",!0)],64))),128))]),o("div",ye,[e[29]||(e[29]=o("h3",{"text-lg":""}," Appearance ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[o("div",null,[n(X,null,{default:a(({toggle:l,isDark:O})=>[n(f,{n:"primary",onClick:l},{default:a(()=>[e[11]||(e[11]=o("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1)),N(" "+_(O.value?"Dark":"Light"),1)]),_:2,__:[11]},1032,["onClick"])]),_:1})]),e[14]||(e[14]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[15]||(e[15]=o("p",null,"UI Scale",-1)),n(B,{modelValue:t(z),"onUpdate:modelValue":e[0]||(e[0]=l=>p(z)?z.value=l:null),n:"primary"},{default:a(()=>[(d(),m(v,null,k(H,l=>o("option",{key:l[0],value:l[1]},_(l[0]),9,ce)),64))]),_:1},8,["modelValue"]),e[16]||(e[16]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),n(b,{modelValue:t(S),"onUpdate:modelValue":e[1]||(e[1]=l=>p(S)?S.value=l:null),"n-primary":""},{default:a(()=>e[12]||(e[12]=[o("span",null," Expand Sidebar ",-1)])),_:1,__:[12]},8,["modelValue"]),n(b,{modelValue:t(D),"onUpdate:modelValue":e[2]||(e[2]=l=>p(D)?D.value=l:null),disabled:t(S),"n-primary":""},{default:a(()=>e[13]||(e[13]=[o("span",null," Scrollable Sidebar ",-1)])),_:1,__:[13]},8,["modelValue","disabled"])]),_:1,__:[14,15,16]}),e[30]||(e[30]=o("h3",{mt2:"","text-lg":""}," Features ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(C),"onUpdate:modelValue":e[3]||(e[3]=l=>p(C)?C.value=l:null),"n-primary":""},{default:a(()=>e[17]||(e[17]=[o("span",null,"Close DevTools when clicking outside",-1)])),_:1,__:[17]},8,["modelValue"]),n(b,{modelValue:t($),"onUpdate:modelValue":e[4]||(e[4]=l=>p($)?$.value=l:null),"n-primary":""},{default:a(()=>e[18]||(e[18]=[o("span",null,"Show help buttons",-1)])),_:1,__:[18]},8,["modelValue"]),n(b,{modelValue:t(I),"onUpdate:modelValue":e[5]||(e[5]=l=>p(I)?I.value=l:null),"n-primary":""},{default:a(()=>e[19]||(e[19]=[o("span",null,"Show the floating panel",-1)])),_:1,__:[19]},8,["modelValue"]),e[20]||(e[20]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[21]||(e[21]=o("p",null,"Minimize floating panel on inactive",-1)),n(B,{modelValue:t(w),"onUpdate:modelValue":e[6]||(e[6]=l=>p(w)?w.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(d(),m(v,null,k(Z,l=>o("option",{key:l[0],value:l[1]},_(l[0]),9,Ve)),64))]),_:1},8,["modelValue"]),e[22]||(e[22]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[23]||(e[23]=o("p",null,"Open In Editor",-1)),n(B,{modelValue:t(E),"onUpdate:modelValue":e[7]||(e[7]=l=>p(E)?E.value=l:null),"n-primary":""},{default:a(()=>[(d(),m(v,null,k(W,l=>o("option",{key:l[0],value:l[1]},_(l[0]),9,ke)),64))]),_:1},8,["modelValue"])]),_:1,__:[20,21,22,23]}),e[31]||(e[31]=o("h3",{mt2:"","text-lg":""}," Feedback ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(A),"onUpdate:modelValue":e[8]||(e[8]=l=>p(A)?A.value=l:null),"n-primary":""},{default:a(()=>[e[24]||(e[24]=o("span",null,"Send anonymous statistics, help us improving DevTools",-1)),n(Y,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1,__:[24]},8,["modelValue"]),e[27]||(e[27]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),o("div",Ce,[n(f,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>e[25]||(e[25]=[o("div",{"i-carbon-data-enrichment":""},null,-1),N(" Ideas & Suggestions ")])),_:1,__:[25]}),n(f,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>e[26]||(e[26]=[o("div",{"i-carbon-debug":""},null,-1),N(" Bug Reports ")])),_:1,__:[26]})])]),_:1,__:[27]}),e[32]||(e[32]=o("h3",{mt2:"","text-lg":""}," Debug ",-1)),o("div",we,[n(f,{n:"orange",onClick:Q},{default:a(()=>e[28]||(e[28]=[o("div",{"i-carbon-breaking-change":""},null,-1),N(" Reset Local Settings & State ")])),_:1,__:[28]})])])])])}}});export{Be as default}; |
| import{_ as p}from"./filepath-item.vue-f9nq4lw8.js";import{A as m}from"./mihtqtxa.js";import{p as f,J as r,a3 as n,F as s,ag as _,S as o,aa as h,V as d,U as g}from"./vendor/json-editor-vue-m9gzt21j.js";const k={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},x={"text-right":""},N={"ws-nowrap":""},B=f({__name:"StacktraceList",props:{stacktrace:{}},setup($){const i=m();function c(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const l=p;return n(),r("div",k,[(n(!0),r(s,null,_(a.stacktrace,(e,u)=>(n(),r(s,{key:u},[o("div",x,h(e.functionName||"(anonymous)"),1),o("div",N,[e.fileName?(n(),d(l,{key:0,filepath:`${c(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):g("",!0)])],64))),128))])}}});export{B as _}; |
| import{f as m,al as o,r as n}from"./mihtqtxa.js";import{q as s}from"./vendor/json-editor-vue-m9gzt21j.js";function u(){const p=m(),a=o("getComponents",()=>n.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(a.value||[]).find(t=>t.pascalName===e.pascalName)));return s(()=>[...l.value,...a.value||[]].sort((e,t)=>e.pascalName.localeCompare(t.pascalName)))}function i(){return o("getComponentsRelationships",()=>n.getComponentsRelationships())}export{i as a,u}; |
| import{G as C,a4 as O,_ as z}from"./mihtqtxa.js";import{_ as D}from"./data-schema-button.vue-kuz5pkek.js";import{p as E,n as g,E as J,x as M,ai as P,J as c,a3 as r,u as o,S as p,U as u,W as R,Z as d,aa as b,a7 as $,a8 as j,F as k,ac as x,V as _,a5 as A,av as F,a6 as U,z as G}from"./vendor/json-editor-vue-m9gzt21j.js";const T=["open"],W={flex:"~ gap2","select-none":"","items-center":"",px4:""},Z={key:0,class:"bg-red:10 px5 py3 text-red"},L=E({__name:"StateEditor",props:{name:{},open:{type:Boolean},revision:{},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(h,{emit:V}){const n=h,s=C(n,"open",V,{passive:!0}),S=O(),i=g(),l=g();function m(e){return["number","bigint","string","boolean"].includes(typeof e)}function v(){l.value=void 0;try{i.value=m(n.state)?n.state:JSON.parse(JSON.stringify(n.state||{}))}catch(e){console.error(e),l.value=e}}J(()=>{v(),M(()=>[n.revision,n.state],([e,t])=>{m(t)?i.value=n.state:y(t,n.state)},{deep:!0})});function y(e,t){for(const a in e)Array.isArray(e[a])?t[a]=e[a].slice():typeof e[a]=="object"&&e[a]!==null?y(e[a],t[a]):t[a]=e[a]}async function B(){v(),await G()}return(e,t)=>{const a=z,w=D,N=P("tooltip");return r(),c("div",{class:"state-editor-details",open:e.name?o(s):!0},[p("div",W,[e.name?(r(),c("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(o(s)?"":"op50"),onClick:t[0]||(t[0]=f=>s.value=!o(s))},[p("div",{"i-carbon-chevron-right":"",transition:"",class:d(o(s)?"rotate-90 op0":"")},null,2),p("code",{px3:"",py1:"","font-mono":"",class:d(o(s)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},b(e.name),3)],2)):u("",!0),R(e.$slots,"actions",$(j({isOpen:o(s),name:e.name,state:e.state}))),o(s)?(r(),c(k,{key:1},[x(A(a,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:B},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),i.value&&!l.value?(r(),_(w,{key:0,getter:()=>({name:e.name,input:JSON.stringify(i.value)})},null,8,["getter"])):u("",!0)],64)):u("",!0)]),o(s)||!e.name?(r(),c(k,{key:0},[l.value?(r(),c("div",Z," Error: "+b(l.value),1)):(r(),_(o(F),U({key:1,modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=f=>i.value=f)},e.$attrs,{class:["json-editor-vue",[o(S)==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":n.readonly,indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"]))],64)):u("",!0)],8,T)}}});export{L as _}; |
| import{_ as j}from"./nbadge-e9vkbxgo.js";import{_ as F}from"./ncode-block.vue-ctkw4rc7.js";import{_ as W}from"./ncheckbox.vue-de0732k3.js";import{a6 as q,ah as A,ai as L,aj as E,Z as G,Q as J,q as Q,_ as Y,M as Z,ak as z,A as H,Y as K,W as O,a3 as X,al as ee}from"./mihtqtxa.js";import{p as te,k as P,J as _,a3 as p,F as $,W as ae,a5 as o,U as w,u as s,aa as M,V as ne,a4 as u,S as v,ab as c,q as oe}from"./vendor/json-editor-vue-m9gzt21j.js";const se={key:0},le={p4:"",flex:"~ col gap-1"},re={class:"text-lg font-medium leading-6"},ue={flex:"~ gap-3",mt2:"","justify-end":""},_e=te({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const a=l,t=q(),{info:n,update:i,state:g,processId:y,restart:m}=A(a.packageName,a.options),k=P(!0),N=P(!0),U=L(),x=E(),D=G();async function C(){const r=await i(async e=>x.start(e));Z("npm:update",{packageName:a.packageName,oldVersion:n.value?.current}),r&&N.value&&U.value.push({id:r,message:`${a.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&k.value&&(D.value=r,t.push("/modules/terminals"))}return(r,e)=>{const b=j,S=F,h=W,T=Q,V=Y,I=J;return p(),_($,null,[ae(r.$slots,"default",{id:s(y),info:s(n),update:C,state:s(g),restart:s(m)},()=>[s(n)&&r.showVersion?(p(),_("code",se,M(`v${s(n).current}`),1)):w("",!0),s(n)?.latest?(p(),_($,{key:1},[s(n).needsUpdate?(p(),_("button",{key:0,onClick:e[0]||(e[0]=f=>C())},[o(b,{n:"green",title:"updates available",textContent:"updates available"})])):(p(),ne(b,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),o(s(x),null,{default:u(({resolve:f,args:R})=>[o(I,{"model-value":!0,onClose:d=>f(!1)},{default:u(()=>[v("div",le,[v("h3",re," Update "+M(a.packageName)+"? ",1),e[8]||(e[8]=v("p",{op50:""}," The following command will be executed in your terminal: ",-1)),o(S,{code:R[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),o(h,{modelValue:k.value,"onUpdate:modelValue":e[1]||(e[1]=d=>k.value=d),n:"primary"},{default:u(()=>e[3]||(e[3]=[c(" Navigate to terminal ")])),_:1,__:[3]},8,["modelValue"]),o(h,{modelValue:N.value,"onUpdate:modelValue":e[2]||(e[2]=d=>N.value=d),n:"primary"},{default:u(()=>e[4]||(e[4]=[c(" Restart Nuxt server after update ")])),_:1,__:[4]},8,["modelValue"]),v("div",ue,[o(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>e[5]||(e[5]=[c(" Please make sure to backup your project first. ")])),_:1,__:[5]}),o(V,{onClick:d=>f(!1)},{default:u(()=>e[6]||(e[6]=[c(" Cancel ")])),_:2,__:[6]},1032,["onClick"]),o(V,{n:"solid primary",onClick:d=>f(!0)},{default:u(()=>e[7]||(e[7]=[c(" Update ")])),_:2,__:[7]},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),B=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function ie(){return ee("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(a=>!B.includes(a.npm)&&a.compatibility.nuxt.includes(">=3")))}function ve(){return z("installed-modules",()=>{const l=H(),a=ie();return oe(()=>(l.value?._installedModules||[]).map(t=>{if(!t.entryPath)return;const n=!!(t.entryPath&&K(t.entryPath)),i=t.meta?.name?t.meta?.name:t.entryPath?n?O(t.entryPath):l.value?.rootDir?X(t.entryPath,l.value?.rootDir).path:void 0:void 0,g=!!l.value?.modules?.includes(i),y=a.value?.find(m=>m.npm===i)||a.value?.find(m=>m.name===i);return{name:i,isPackageModule:n,isUninstallable:g,info:y,...t}}).filter(t=>t&&(!t.name||!B.includes(t.name))))})}export{_e as _,ie as a,ve as u}; |
| import{a4 as ae,a5 as ne,a6 as oe,a7 as P,H as se,r as f,E as k,a8 as le,v as re,I as ue,_ as ie,i as de,n as pe,a9 as T,aa as me}from"./mihtqtxa.js";import{_ as ve}from"./nselect.vue-gbkqq9mb.js";import{_ as fe}from"./nlink.vue-k5yoz8g1.js";import{_ as ce}from"./filepath-item.vue-f9nq4lw8.js";import{p as G,k as M,au as F,M as _e,x as ye,w as ge,q as ke,V as m,u as c,a3 as s,a4 as r,J as u,S as l,ac as xe,U as R,Y as U,ab as i,a5 as d,aa as x,Z as z,av as be,a6 as we,at as Ce,al as Ke,ag as A,F as b,j as Se}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const Ve={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ne={class:"w-full text-sm"},$e=["value"],Ie=["onClick"],he={key:0,"h-full":"","of-hidden":"",flex:"~ col"},je={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},De={class:"flex items-center gap-4"},Me={key:1},Ue=["onKeyup"],Ae={key:0,op50:""},qe={key:1},Be={"font-bold":""},Le={"text-sm":""},Ee=G({__name:"StorageDetails",async setup(H){let p,y;const w=ae(),C=ne(),K=oe(),S=M(""),g=M(""),o=P("storage:current",""),t=M(),_=P("storage:file:state",""),{data:V}=([p,y]=F(()=>T("storageMounts",()=>f.getStorageMounts())),p=await p,y(),p),{data:N,refresh:q}=([p,y]=F(async()=>T("storageKeys",async()=>o.value?await f.getStorageKeys(o.value):[])),p=await p,y(),p),J=C.hook("storage:key:update",async(a,e)=>{if(!(!o.value||a.split(":")[0]!==o.value)&&(await q(),_.value===a)){if(e==="remove")return K.replace({query:{storage:o.value}});await I(_.value)}});_e(J),ye(o,()=>{q(),_.value=""}),ge(async()=>{if(!_.value){t.value=null;return}I(_.value)}),se("keydown",a=>{a.key==="s"&&(a.ctrlKey||a.metaKey)&&(h(),a.preventDefault())});function $(a){return a.replace(`${o.value}:`,"")}const O=ke(()=>N.value?N.value.filter(a=>a.includes(S.value)):[]);async function I(a){const e=await f.getStorageItem(await k(),a);t.value={key:a,updatedKey:$(a),editingKey:!1,content:e,updatedContent:e}}async function W(){if(!g.value||!o.value)return;const a=`${o.value}:${g.value}`;N.value?.includes(a)||await f.setStorageItem(await k(),a,""),K.replace({query:{storage:o.value,key:a}}),g.value=""}async function h(){t.value&&(await f.setStorageItem(await k(),t.value.key,t.value.updatedContent),await I(t.value.key))}async function Y(){!t.value||!o.value||(await f.removeStorageItem(await k(),t.value.key),t.value=null)}async function Z(){if(!t.value||!o.value)return;const a=`${o.value}:${t.value.updatedKey}`,e=await k();await f.setStorageItem(e,a,t.value.updatedContent),await f.removeStorageItem(e,t.value.key),K.replace({query:{storage:o.value,key:a}})}return(a,e)=>{const j=ie,Q=ve,D=re,X=ue,B=fe,L=pe,E=de,ee=le,te=ce;return c(o)?(s(),m(ee,{key:0,"storage-key":"tab-storage"},{left:r(()=>[l("div",Ve,[d(j,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:e[0]||(e[0]=n=>o.value="")}),l("div",Ne,[d(Q,{modelValue:c(o),"onUpdate:modelValue":e[1]||(e[1]=n=>Se(o)?o.value=n:null),n:"primary",icon:"carbon-data-base"},{default:r(()=>[(s(!0),u(b,null,A(c(V),(n,v)=>(s(),u("option",{key:v,value:v},x(v),9,$e))),128))]),_:1},8,["modelValue"])])]),d(D,{modelValue:S.value,"onUpdate:modelValue":e[2]||(e[2]=n=>S.value=n),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(s(!0),u(b,null,A(O.value,n=>(s(),u(b,{key:n},[l("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:z(n===t.value?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:v=>_.value=n},x($(n)),11,Ie),e[8]||(e[8]=l("div",{"x-divider":""},null,-1))],64))),128)),d(D,{modelValue:g.value,"onUpdate:modelValue":e[3]||(e[3]=n=>g.value=n),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:U(W,["enter"])},null,8,["modelValue"])]),right:r(()=>[t.value?.key?(s(),u("div",he,[l("div",je,[l("div",De,[t.value.editingKey?(s(),m(D,{key:0,modelValue:t.value.updatedKey,"onUpdate:modelValue":e[4]||(e[4]=n=>t.value.updatedKey=n),onKeyup:U(Z,["enter"])},null,8,["modelValue"])):(s(),u("code",Me,[i(x($(t.value.key))+" ",1),d(X,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:e[5]||(e[5]=n=>t.value.editingKey=!0)})])),t.value.editingKey?R("",!0):(s(),m(j,{key:2,n:"green xs",disabled:t.value.content===t.value.updatedContent,class:z({"border-green":t.value.content!==t.value.updatedContent}),onClick:h},{default:r(()=>e[9]||(e[9]=[i(" Save ")])),_:1,__:[9]},8,["disabled","class"]))]),l("div",null,[d(j,{n:"red xs",onClick:Y},{default:r(()=>e[10]||(e[10]=[i(" Delete ")])),_:1,__:[10]})])]),typeof t.value.content=="object"?(s(),m(c(be),we({key:0,modelValue:t.value.updatedContent,"onUpdate:modelValue":e[6]||(e[6]=n=>t.value.updatedContent=n),class:[[c(w)==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},a.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):xe((s(),u("textarea",{key:1,"onUpdate:modelValue":e[7]||(e[7]=n=>t.value.updatedContent=n),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:U(Ke(h,["ctrl"]),["enter"])},null,40,Ue)),[[Ce,t.value.updatedContent]])])):(s(),m(E,{key:1},{default:r(()=>[d(L,{px6:"",py4:""},{default:r(()=>[e[12]||(e[12]=i(" Select one key to start.")),e[13]||(e[13]=l("br",null,null,-1)),e[14]||(e[14]=i("Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[11]||(e[11]=[i(" Nitro storage ")])),_:1,__:[11]})]),_:1,__:[12,13,14]})]),_:1}))]),_:1})):(s(),m(E,{key:1},{default:r(()=>[Object.keys(c(V)).length?(s(),u("p",Ae," Select one storage to start: ")):(s(),u("p",qe,[e[16]||(e[16]=i(" No custom storage defined in ")),e[17]||(e[17]=l("code",null,"nitro.storage",-1)),e[18]||(e[18]=i(".")),e[19]||(e[19]=l("br",null,null,-1)),e[20]||(e[20]=i(" Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[15]||(e[15]=[i(" Nitro storage ")])),_:1,__:[15]})])),(s(!0),u(b,null,A(c(V),(n,v)=>(s(),m(L,{key:v,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Pe=>o.value=v},{default:r(()=>[l("span",Be,x(v),1),e[21]||(e[21]=l("br",null,null,-1)),l("span",Le,x(n.driver)+" driver",1),e[22]||(e[22]=l("br",null,null,-1)),n.base?(s(),m(te,{key:0,"text-xs":"",filepath:n.base},null,8,["filepath"])):R("",!0)]),_:2,__:[21,22]},1032,["onClick"]))),128))]),_:1}))}}}),Oe=G({__name:"storage",setup(H){return(p,y)=>{const w=Ee,C=me;return s(),m(C,null,{default:r(()=>[d(w)]),_:1})}}});export{Oe as default}; |
| import{a5 as E,H as V,r as f,E as p,_ as $,ap as B,Z as F,I,aa as D}from"./mihtqtxa.js";import{x as M,a as P}from"./vendor/xterm-dbpzgj7s.js";import{p as y,k as g,E as R,J as d,a3 as t,F as A,S as c,a5 as N,V as m,U as v,aa as _,q,w as z,u as w,ag as L,ab as C,Z as h,al as S,a4 as Z}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const j={border:"t base",flex:"~ gap-2","items-center":"",p2:""},H={"text-sm":"",op50:""},J=y({__name:"TerminalView",props:{id:{}},setup(b){const n=b,r=g(),i=E(),o=g();let a;R(async()=>{a=new M.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const u=new P.FitAddon;a.loadAddon(u),a.open(r.value),u.fit(),V(window,"resize",()=>{u.fit()}),o.value=await f.getTerminalDetail(await p(),n.id),o.value?.buffer&&a.write(o.value.buffer),i.hook("devtools:terminal:data",({id:e,data:l})=>{e===n.id&&a.write(l)})});async function s(){f.runTerminalAction(await p(),n.id,"clear"),a?.clear()}async function k(){f.runTerminalAction(await p(),n.id,"restart")}async function x(){f.runTerminalAction(await p(),n.id,"terminate")}return(u,e)=>{const l=$;return t(),d(A,null,[c("div",{ref_key:"container",ref:r,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",j,[N(l,{title:"Clear",icon:"i-carbon-clean",border:!1,onClick:e[0]||(e[0]=T=>s())}),o.value?.restartable?(t(),m(l,{key:0,title:"Restart",icon:"carbon-renew",border:!1,onClick:e[1]||(e[1]=T=>k())})):v("",!0),o.value?.terminatable?(t(),m(l,{key:1,title:"Terminate",icon:"carbon-delete",border:!1,onClick:e[2]||(e[2]=T=>x())})):v("",!0),c("span",H,_(o.value?.description),1)])],64)}}}),U={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},G={flex:"~",border:"b base","n-navbar-glass":"","flex-1":"","items-center":""},K=["onClick"],O={key:1,p10:""},Q={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},W=y({__name:"TerminalPage",setup(b){const n=B(),r=F(),i=q(()=>n.value?.find(a=>a.id===r.value));async function o(a){f.runTerminalAction(await p(),a,"remove")}return z(()=>{!r.value&&n.value?.length&&(r.value=n.value[0].id)}),(a,s)=>{const k=I,x=$,u=J;return w(n)?.length?(t(),d("div",U,[c("div",G,[(t(!0),d(A,null,L(w(n),e=>(t(),d("button",{key:e.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:h(e.id===i.value?.id?"bg-active":""),onClick:l=>r.value=e.id},[e.icon?(t(),m(k,{key:0,icon:e.icon},null,8,["icon"])):v("",!0),c("span",{class:h(e.id===i.value?.id?"":"op50")},_(e.name)+_(e.isTerminated?" (terminated)":""),3),e.isTerminated?(t(),m(x,{key:1,icon:"carbon-close","mx--2":"",border:!1,onClick:S(l=>o(e.id),["stop"])},null,8,["onClick"])):v("",!0)],10,K))),128))]),i.value?(t(),m(u,{id:i.value.id,key:i.value.id},null,8,["id"])):(t(),d("div",O,[s[0]||(s[0]=C(" Terminal ")),c("code",null,_(w(r)),1),s[1]||(s[1]=C(" not found "))]))])):(t(),d("div",Q,s[2]||(s[2]=[c("em",{op50:""},"No terminal attached",-1)])))}}}),ae=y({__name:"terminals",setup(b){return(n,r)=>{const i=W,o=D;return t(),m(o,null,{default:Z(()=>[N(i)]),_:1})}}});export{ae as default}; |
| import{P as j,H,am as Y,b as U,a4 as q,a as X,_ as z,V as Z,f as K,an as Q,A as ee,aj as se,w as ne,i as oe,Q as te,r as R,J as ae}from"./mihtqtxa.js";import{_ as W}from"./duration-display.vue-mr4ha0rw.js";import{g as M}from"./color-mt9xuhgy.js";import{p as B,q as w,J as i,a3 as t,X as T,S as o,aa as m,u as g,F as f,ag as E,V as v,k as C,x as le,z as re,U as x,a5 as u,Z as O,$ as G,a4 as h,av as ie,a6 as pe,ab as F,am as ce}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as P}from"./nbadge-e9vkbxgo.js";import{_ as de}from"./composable-item.vue-ohpuhwbn.js";import{_ as ue}from"./stacktrace-list.vue-h9snzu77.js";import{_ as me}from"./ndrawer.vue-gsquq1a1.js";import{_ as ke}from"./launch-page.vue-b53bqs6b.js";import{_ as ye}from"./nlink.vue-k5yoz8g1.js";import{_ as fe}from"./code-diff.vue-faqqiiv0.js";import{_ as ve}from"./help-fab.vue-d36s6htl.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";import"./filepath-item.vue-f9nq4lw8.js";import"./index-jc4yj4to.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-ctkw4rc7.js";const he=B({__name:"TimelineItemFunction",props:{item:{}},setup(y){const d=y,p=w(()=>M(d.item.name,50,60,"_op_")),n=w(()=>p.value.replace(/_op_/,"1")),e=w(()=>M(d.item.name,50,40)),l=w(()=>p.value.replace(/_op_/,"0.2"));return(a,r)=>(t(),i("button",{class:"group",style:T({color:n.value,borderLeft:`2px solid ${n.value}`}),relative:"","bg-base":"","text-sm":"",transition:"","hover:z-1000":""},[o("div",{style:T({backgroundColor:l.value}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),o("div",{style:T({color:e.value,"--c":n.value}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},m(a.item.name),5)],4))}}),_e={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(y,{emit:d}){const p=y,n=d,e=j(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:l=>l,future:l=>l,invalid:"-",second:l=>l?`${l}s`:"",minute:l=>`${l}m`,hour:l=>`${l}h`,week:l=>`${l}w`,day:l=>`${l}d`,month:l=>`${l}mo`,year:l=>`${l}y`}});return(l,a)=>{const r=he;return t(),i("div",_e,[o("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:a[0]||(a[0]=s=>l.segment.route?n("select",l.segment.route):void 0)},m(l.segment.route?.event.to),1),o("div",be,m(g(e))+" ago ",1),o("div",null,[(t(!0),i(f,null,E(l.segment.functions,(s,c)=>(t(),v(r,{key:c,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:k=>n("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,De=50;function Ae(y){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const n of y){const e=n.end||n.start;(n.start-p.end>xe||n.type==="route")&&(p={start:n.start,end:e,events:[],functions:[],duration:0},d.push(p)),p.events.push(n),p.end=e+De}return d.forEach((n,e)=>{const l=n.end-n.start,a=[];n.duration=l,n.previousGap=e>0?n.start-d[e-1].end:0,n.events.forEach(r=>{const s=r.end||r.start;let c=0;r.type!=="route"&&(c=a.findIndex(D=>D<=r.start),c===-1?(c=a.length,a.push(s+1e3)):a[c]=s+1e3);const k={event:r,segment:n,relativeStart:(r.start-n.start)/l,relativeWidth:(s-r.start)/l,layer:c};r.type==="function"?n.functions.push(k):n.route=k})}),d}const $e={relative:""},Ce={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=y,n=d,e=C(),l=C(),a=C(),r=C(),s=C(!0),c=C(1.5),k=w(()=>Ae(p.data.events)),D=w(()=>(p.data.events.length,e.value?.scrollWidth||window.innerWidth));function A(){r.value&&(r.value.style.width=`${D.value}px`)}function S(){s.value&&e.value&&(e.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}),a.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}))}return le(()=>p.data.events.length,async()=>{await re(),A(),S()},{flush:"post"}),H(e,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),a.value.scrollLeft=e.value.scrollLeft,s.value=e.value.scrollLeft>=e.value.scrollWidth-e.value.clientWidth)}),H(a,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),e.value.scrollLeft=a.value.scrollLeft)}),H(e,"wheel",_=>{_.altKey?(c.value=Y(c.value+_.deltaY/200,.5,3),A()):e.value.scrollLeft+=_.deltaY}),(_,L)=>{const $=W,V=ge;return t(),i(f,null,[o("div",$e,[o("div",{ref_key:"minimap",ref:l,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,b.duration/10)/D.value*100}%`})},[(t(!0),i(f,null,E(b.functions,(I,J)=>(t(),i("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHslColorFromStringHash"in _?_.getHslColorFromStringHash:g(M))(I.event.name,50,60)})},null,4))),128)),b.route?(t(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${b.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),o("div",{ref_key:"minimapScroller",ref:a,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[o("div",{ref_key:"minimapScrollerInner",ref:r,"h-1px":""},null,512)],512)]),o("div",{ref_key:"scroller",ref:e,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i(f,{key:N},[b.previousGap&&b.previousGap>=200?(t(),i("div",Ce,[u($,{op50:"",duration:b.previousGap,color:!1},null,8,["duration"])])):x("",!0),u(V,{"flex-inline":"","of-x-hidden":"","bg-base":"","hover:of-x-visible":"",class:O(N===k.value.length-1?"border-r border-base":""),segment:b,style:T({width:`${Math.max(50,b.duration/10)*c.value}px`}),onSelect:L[0]||(L[0]=I=>n("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=U(Be,[["__scopeId","data-v-da163089"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne={flex:"~","ml--1":"","font-mono":""},Fe={key:0,mr2:"",op30:""},Ee={op75:""},Le={flex:"~ col items-start"},Ie={"text-xs":"","font-mono":"",op30:""},Ve={"text-green":"","font-bold":"","font-mono":""},Me=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=d;return(n,e)=>{const l=W;return t(),i("div",Te,[(t(!0),i(f,null,E(n.data.events,(a,r)=>(t(),i("button",{key:r,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>p("select",a)},[a.type==="function"?(t(),i(f,{key:0},[e[2]||(e[2]=o("div",{"i-carbon-function":"",op50:""},null,-1)),o("div",{"font-mono":"",style:T({color:a.type==="function"?("getHslColorFromStringHash"in n?n.getHslColorFromStringHash:g(M))(a.name,50,60):""})},m(a.name),5),o("div",Ne,[e[0]||(e[0]=o("div",{op30:""}," ( ",-1)),(t(!0),i(f,null,E(a.args,(s,c)=>(t(),i(f,{key:c},[c?(t(),i("div",Fe," , ")):x("",!0),o("div",Ee,m(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),e[1]||(e[1]=o("div",{op30:""}," ) ",-1))])],64)):(t(),i(f,{key:1},[e[3]||(e[3]=o("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[o("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1)),o("div",Le,[o("div",Ie,m(a.from),1),o("div",Ve,m(a.to),1)])],64)),e[4]||(e[4]=o("div",{"flex-auto":""},null,-1)),a.end?(t(),v(l,{key:2,duration:a.end-a.start,color:a.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),e[5]||(e[5]=o("div",{"min-h-100":""},null,-1))])}}}),We={key:0,"text-blue":""},He={key:1,"text-purple":""},je={key:2,"text-green":""},ze={key:3,"text-gray":""},Oe={key:4,"text-gray":""},Re={key:5,"text-gray":""},Ge={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Pe={key:1},Je={p2:"","text-sm":"",border:"t base"},Ye=B({__name:"TimelineArgumentView",props:{value:{}},setup(y){const d=y,p=C(),n=C();function e(){try{p.value=JSON.parse(JSON.stringify(d.value))}catch(s){console.error(s),n.value=s}}const l=B({emits:["setup"],setup(s,{emit:c}){return c("setup"),()=>null}}),a=q(),r=X();return(s,c)=>{const k=z,D=G("VMenu");return typeof s.value=="string"?(t(),i("div",We,m(JSON.stringify(s.value)),1)):typeof s.value=="number"?(t(),i("div",He,m(s.value),1)):typeof s.value=="boolean"?(t(),i("div",je,m(s.value),1)):typeof s.value>"u"?(t(),i("div",ze," undefined ")):typeof s.value=="function"?(t(),i("div",Oe," [Function"+m(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(t(),i("div",Re," null ")):(t(),v(D,{key:6,placement:"top"},{popper:h(()=>[u(g(l),{onSetup:e}),n.value?(t(),i("div",Ge," Failed to display object: "+m(n.value),1)):p.value?(t(),i("div",Pe,[u(g(ie),pe({"model-value":p.value},s.$attrs,{class:["json-editor-vue",[g(a)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),o("div",Je,[u(k,{title:"Copy to clipboard",icon:"carbon-copy",onClick:c[0]||(c[0]=A=>g(r)(JSON.stringify(p.value,null,2),"timeline-argument"))},{default:h(()=>c[1]||(c[1]=[F(" Copy ")])),_:1,__:[1]})])])):x("",!0)]),default:h(()=>[o("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:O([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},m(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),Ue={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},qe={"mx--1":""},Xe={flex:"~ gap-1","font-mono":""},Ze={key:1},Ke={key:0,op30:""},Qe={flex:"~ gap-1","text-sm":""},es={class:"text-sm text-gray-400"},ss=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(y){const d=y,p=j(()=>d.record.start,{showSecond:!0}),n=Z(),e=w(()=>n.value?.metadata),l=w(()=>n.value?.imports.find(a=>a.as===d.record.name));return(a,r)=>{const s=P,c=de,k=Ye,D=W,A=ue;return a.record?(t(),i("div",Ue,[o("div",qe,[u(s,{n:"yellow",textContent:"Function call"})]),o("div",Xe,[l.value?(t(),v(c,{key:0,item:l.value,metadata:e.value,counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),i("span",Ze,m(a.record.name),1)),r[0]||(r[0]=o("span",{ml1:"",op30:""},"(",-1)),(t(!0),i(f,null,E(a.record.args,(S,_)=>(t(),i(f,{key:_},[_?(t(),i("span",Ke,", ")):x("",!0),u(k,{value:S},null,8,["value"])],64))),128)),r[1]||(r[1]=o("span",{op30:""},")",-1))]),o("div",Qe,[a.record.end?(t(),v(D,{key:0,duration:a.record.end-a.record.start},null,8,["duration"])):x("",!0),r[2]||(r[2]=o("span",{mx1:"",op50:""},"·",-1)),o("div",es,m(g(p)),1)]),a.record.stacktrace?(t(),v(A,{key:0,stacktrace:a.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ns={key:0,"p-4":"",flex:"~ col gap-2"},os={"mx--1":""},ts={flex:"~ gap-1 items-center","font-mono":""},as={op50:""},ls={flex:"~ gap-1","text-sm":""},rs={class:"text-sm text-gray-400"},is=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(y){const d=y,p=j(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=P,a=W;return n.record?(t(),i("div",ns,[o("div",os,[u(l,{n:"green",textContent:"Route Change"})]),o("div",ts,[o("span",as,m(n.record.from),1),e[0]||(e[0]=o("span",{"i-carbon-arrow-right":"",op50:""},null,-1)),o("span",null,m(n.record.to),1)]),o("div",ls,[n.record.end?(t(),v(a,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),e[1]||(e[1]=o("span",{mx1:"",op50:""},"·",-1)),o("div",rs,m(g(p)),1)])])):x("",!0)}}}),ps={key:0,"h-screen":"","of-hidden":""},cs={"h-screen":"","w-full":"",flex:"","flex-col":""},ds={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},us={"text-sm":""},ms={"min-h-50":"",px3:"",py2:""},ks=B({__name:"TimelineView",setup(y){const d=K(),p=C("table"),n=C(),e=w(()=>d.value?.metrics.clientTimeline());function l(){e.value&&(e.value.events=[])}function a(){p.value=p.value==="table"?"list":"table"}return(r,s)=>{const c=G("VTooltip"),k=z,D=we,A=Me,S=ss,_=is,L=me;return e.value?(t(),i("div",ps,[o("div",cs,[o("div",ds,[u(c,{flex:""},{popper:h(()=>[o("div",us,m(e.value.options.enabled?"Recording...":"Paused"),1)]),default:h(()=>[o("div",{"text-lg":"",class:O(e.value.options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),e.value.options.enabled?(t(),v(k,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=$=>e.value.options.enabled=!1)},{default:h(()=>s[6]||(s[6]=[F(" Stop Tracking ")])),_:1,__:[6]})):(t(),v(k,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=$=>e.value.options.enabled=!0)},{default:h(()=>s[5]||(s[5]=[F(" Start Tracking ")])),_:1,__:[5]})),s[7]||(s[7]=o("div",{"flex-auto":""},null,-1)),u(k,{icon:p.value==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:a},null,8,["icon"]),u(k,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:l})]),p.value==="table"?(t(),v(D,{key:0,data:{...e.value},onSelect:s[2]||(s[2]=$=>n.value=$.event)},null,8,["data"])):(t(),v(A,{key:1,data:{...e.value},onSelect:s[3]||(s[3]=$=>n.value=$)},null,8,["data"]))]),u(L,{"model-value":!!n.value,"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=$=>n.value=void 0)},{default:h(()=>[o("div",ms,[n.value?.type==="function"?(t(),v(S,{key:0,record:n.value},null,8,["record"])):n.value?.type==="route"?(t(),v(_,{key:1,record:n.value},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),ys={class:"markdown-body"},fs={__name:"timeline",setup(y,{expose:d}){return d({frontmatter:{}}),(n,e)=>(t(),i("div",ys,e[0]||(e[0]=[o("h1",null,"Timeline",-1),o("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ",-1),ce(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span> | ||
| <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#app/composables/router</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"></span> | ||
| <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span> | ||
| <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span> | ||
| <span class="line"></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span> | ||
| <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"></</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#999999;--shiki-dark:#666666;">></span></span> | ||
| <span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span> | ||
| <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span> | ||
| <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span> | ||
| <span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span> | ||
| <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span> | ||
| <span class="line"></span></code></pre>`,6)])))}},vs={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},hs={op50:""},_s={flex:"~ gap-3",mt2:"","justify-end":""},js=B({__name:"timeline",setup(y){const d=Q(),p=ee(),n=se(),e=ne();async function l(){try{const[a,r]=await R.enableTimeline(!0);if(!await n.start(a,r))return;await R.enableTimeline(!1)}catch{ae({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(a,r)=>{const s=ks,c=ke,k=oe,D=ye,A=fe,S=z,_=te,L=fs,$=ve;return t(),i(f,null,[g(d)?.timeline?.enabled?(t(),v(s,{key:0})):(t(),i(f,{key:1},[u(k,null,{default:h(()=>[u(c,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:l})]),_:1}),u(g(n),null,{default:h(({resolve:V,args:b})=>[u(_,{"model-value":!0,onClose:N=>V(!1)},{default:h(()=>[o("div",vs,[r[5]||(r[5]=o("h2",{"text-xl":""},[o("span",{capitalize:""},"Enable Timeline?")],-1)),o("p",hs,[r[1]||(r[1]=F(" Your ")),u(D,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=N=>g(e)(g(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),r[2]||(r[2]=F(" will be updated as: "))]),u(A,{from:b[0],to:b[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),r[6]||(r[6]=o("p",null,[o("span",{op50:""},"Then Nuxt will "),o("span",{"text-orange":""},"restart automatically"),F(". ")],-1)),o("div",_s,[u(S,{onClick:N=>V(!1)},{default:h(()=>r[3]||(r[3]=[F(" Cancel ")])),_:2,__:[3]},1032,["onClick"]),u(S,{n:"solid primary",capitalize:"",onClick:N=>V(!0)},{default:h(()=>r[4]||(r[4]=[F(" Enable ")])),_:2,__:[4]},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),u($,null,{default:h(()=>[u(L)]),_:1})],64)}}});export{js as default}; |
| import{_ as w}from"./nnavbar.vue-chg3j9po.js";import{_ as S}from"./ncode-block.vue-ctkw4rc7.js";import{bi as D,bj as B,S as j,i as P,n as E,a8 as I}from"./mihtqtxa.js";import{J as c,a3 as i,S as a,p as U,k as m,w as W,q as _,a5 as l,a4 as u,V as q,aa as v,F as d,ag as z,Z as G}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as H}from"./help-fab.vue-d36s6htl.js";import"./client-oeqdl4pb.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const J={class:"markdown-body"},L={__name:"virtual-files",setup(h,{expose:r}){return r({frontmatter:{}}),(p,o)=>(i(),c("div",J,o[0]||(o[0]=[a("h1",null,"Virtual Files",-1),a("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1)])))}},R=["onClick"],Z={key:0,"h-full":"","of-hidden":"",flex:"~ col"},A={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},oe=U({__name:"virtual-files",setup(h){const r=m(""),n=D(),p=B(),o=m();W(()=>{if(!p.value)return;const e=`/_vfs.json/${encodeURIComponent(p.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>o.value=t.current)});function x(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const f=_(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=_(()=>new j(f.value,{keys:["id","path"]})),b=_(()=>r.value?k.value.search(r.value).map(e=>e.item):f.value);return(e,t)=>{const y=w,g=S,C=E,F=P,$=I,N=L,V=H;return i(),c(d,null,[l($,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(y,{search:r.value,"onUpdate:search":t[0]||(t[0]=s=>r.value=s),"no-padding":"",p3:""},null,8,["search"]),(i(!0),c(d,null,z(b.value,s=>(i(),c(d,{key:s.id},[a("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:G(s.id===o.value?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:K=>p.value=s.id},v(x(s.id)),11,R),t[1]||(t[1]=a("div",{"x-divider":""},null,-1))],64))),128))]),right:u(()=>[o.value?.content?(i(),c("div",Z,[a("div",A,[a("code",null,v(o.value.id),1)]),l(g,{"h-full":"","of-auto":"","text-sm":"",code:o.value.content,lang:"typescript"},null,8,["code"])])):(i(),q(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>t[2]||(t[2]=[a("span",{op75:""},"Select a file to start",-1)])),_:1,__:[2]})]),_:1}))]),_:1}),l(V,null,{default:u(()=>[l(N)]),_:1})],64)}}});export{oe as default}; |
Sorry, the diff of this file is too big to display
@@ -1,1 +0,1 @@ | ||
| {"id":"5f34a053-c557-46cc-bac5-9588618d1725","timestamp":1751190606639} | ||
| {"id":"41596d10-5c26-42ef-abf5-f8fc005365de","timestamp":1751413653078} |
+14
-14
@@ -6,3 +6,3 @@ <!DOCTYPE html><html><head><meta charset="utf-8"> | ||
| <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/gk0e56xz.js"> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/mihtqtxa.js"> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-m9gzt21j.js"> | ||
@@ -12,20 +12,20 @@ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-oyl7opas.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-hbcc1r1x.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-hpm5l7ue.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-ci3axu1p.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-f5v1rjia.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-o52oqsg9.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-dzzbxolm.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-okuf5n2q.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-mubgmzer.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-eu0b8eyz.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-gbkqq9mb.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-bpoo3j7g.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-pel467mt.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-fqgjhyuy.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-ctkw4rc7.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-oeqdl4pb.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-jkaykvna.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-gsquq1a1.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-dsrweb93.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-cdytntxi.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-nshsg2y9.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-iltittqd.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-oevnk76c.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-m77cjql7.js"> | ||
| <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/gk0e56xz.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1751190640904,false]</script> | ||
| <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"5f34a053-c557-46cc-bac5-9588618d1725",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-kgnrxm6x.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-pdqa4my4.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-bay4acf7.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-c5xs7f38.js"> | ||
| <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/mihtqtxa.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1751413687187,false]</script> | ||
| <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"41596d10-5c26-42ef-abf5-f8fc005365de",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html> |
+14
-14
@@ -6,3 +6,3 @@ <!DOCTYPE html><html><head><meta charset="utf-8"> | ||
| <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/gk0e56xz.js"> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/mihtqtxa.js"> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-m9gzt21j.js"> | ||
@@ -12,20 +12,20 @@ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-oyl7opas.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-hbcc1r1x.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-hpm5l7ue.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-ci3axu1p.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-f5v1rjia.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-o52oqsg9.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-dzzbxolm.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-okuf5n2q.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-mubgmzer.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-eu0b8eyz.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-gbkqq9mb.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-bpoo3j7g.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-pel467mt.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-fqgjhyuy.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-ctkw4rc7.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-oeqdl4pb.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-jkaykvna.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-gsquq1a1.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-dsrweb93.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-cdytntxi.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-nshsg2y9.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-iltittqd.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-oevnk76c.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-m77cjql7.js"> | ||
| <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/gk0e56xz.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1751190640905,false]</script> | ||
| <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"5f34a053-c557-46cc-bac5-9588618d1725",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-kgnrxm6x.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-pdqa4my4.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-bay4acf7.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-c5xs7f38.js"> | ||
| <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/mihtqtxa.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1751413687188,false]</script> | ||
| <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"41596d10-5c26-42ef-abf5-f8fc005365de",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html> |
+14
-14
@@ -6,3 +6,3 @@ <!DOCTYPE html><html><head><meta charset="utf-8"> | ||
| <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/gk0e56xz.js"> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/mihtqtxa.js"> | ||
| <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-m9gzt21j.js"> | ||
@@ -12,20 +12,20 @@ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-oyl7opas.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-hbcc1r1x.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-hpm5l7ue.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-ci3axu1p.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-f5v1rjia.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-o52oqsg9.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-dzzbxolm.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-okuf5n2q.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-mubgmzer.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-eu0b8eyz.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-gbkqq9mb.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-bpoo3j7g.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-pel467mt.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-fqgjhyuy.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-ctkw4rc7.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-oeqdl4pb.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-jkaykvna.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-gsquq1a1.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-dsrweb93.js"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-cdytntxi.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-nshsg2y9.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-iltittqd.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-oevnk76c.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-m77cjql7.js"> | ||
| <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/gk0e56xz.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1751190640905,false]</script> | ||
| <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"5f34a053-c557-46cc-bac5-9588618d1725",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-kgnrxm6x.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-pdqa4my4.js"> | ||
| <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-bay4acf7.css"> | ||
| <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-c5xs7f38.js"> | ||
| <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/mihtqtxa.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1751413687188,false]</script> | ||
| <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"41596d10-5c26-42ef-abf5-f8fc005365de",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html> |
+1
-1
| { | ||
| "name": "@nuxt/devtools", | ||
| "configKey": "devtools", | ||
| "version": "2.6.0", | ||
| "version": "2.6.1", | ||
| "builder": { | ||
@@ -6,0 +6,0 @@ "@nuxt/module-builder": "1.0.1", |
+10
-10
| { | ||
| "name": "@nuxt/devtools", | ||
| "type": "module", | ||
| "version": "2.6.0", | ||
| "version": "2.6.1", | ||
| "description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.", | ||
@@ -39,3 +39,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@nuxt/kit": "^3.17.5", | ||
| "@nuxt/kit": "^3.17.6", | ||
| "@vue/devtools-core": "^7.7.7", | ||
@@ -60,3 +60,3 @@ "@vue/devtools-kit": "^7.7.7", | ||
| "perfect-debounce": "^1.0.0", | ||
| "pkg-types": "^2.1.1", | ||
| "pkg-types": "^2.2.0", | ||
| "semver": "^7.7.2", | ||
@@ -71,4 +71,4 @@ "simple-git": "^3.28.0", | ||
| "ws": "^8.18.3", | ||
| "@nuxt/devtools-kit": "2.6.0", | ||
| "@nuxt/devtools-wizard": "2.6.0" | ||
| "@nuxt/devtools-kit": "2.6.1", | ||
| "@nuxt/devtools-wizard": "2.6.1" | ||
| }, | ||
@@ -84,5 +84,5 @@ "devDependencies": { | ||
| "@iconify-json/ri": "^1.2.5", | ||
| "@iconify-json/simple-icons": "^1.2.40", | ||
| "@iconify-json/simple-icons": "^1.2.41", | ||
| "@iconify-json/tabler": "^1.2.19", | ||
| "@nuxt/test-utils": "^3.19.1", | ||
| "@nuxt/test-utils": "^3.19.2", | ||
| "@parcel/watcher": "^2.5.1", | ||
@@ -110,3 +110,3 @@ "@types/markdown-it-link-attributes": "^3.0.5", | ||
| "nitropack": "^2.11.13", | ||
| "nuxt": "^3.17.5", | ||
| "nuxt": "^3.17.6", | ||
| "ofetch": "^1.4.1", | ||
@@ -122,3 +122,3 @@ "quicktype-core": "22.0.0", | ||
| "unplugin-vue": "^6.2.0", | ||
| "unplugin-vue-markdown": "^29.0.0", | ||
| "unplugin-vue-markdown": "^29.1.0", | ||
| "vanilla-jsoneditor": "^3.6.1", | ||
@@ -129,3 +129,3 @@ "vis-data": "^7.1.9", | ||
| "vue-virtual-scroller": "^2.0.0-beta.8", | ||
| "@nuxt/devtools": "2.6.0" | ||
| "@nuxt/devtools": "2.6.1" | ||
| }, | ||
@@ -132,0 +132,0 @@ "scripts": { |
| import{b6 as Y,b7 as j,_ as P,r as S,E as R,aj as X,b8 as h,a6 as ee,a7 as ne,Z as te,a1 as le,i as ie,b9 as k,a8 as oe,Q as re,v as ue,q as se,M as ae}from"./gk0e56xz.js";import{_ as de}from"./filepath-item.vue-gwnp998z.js";import{p as U,q as V,k as F,J as u,a3 as i,S as e,U as x,F as p,ag as L,a5 as d,aa as v,u as y,a4 as a,ab as f,ac as D,ad as I,Z as E,V as B}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as me}from"./ncode-block.vue-ctkw4rc7.js";import{_ as pe}from"./ncheckbox.vue-fi8jhway.js";import{_ as ve}from"./help-fab.vue-cws4yr5r.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},_e={flex:"~ wrap","w-full":""},ce=["onClick"],ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe="/__nuxt_devtools__/client",ge=U({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(N){const _=N,w=`${Y().app.baseURL.replace(xe,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),c=V(()=>{const l=[{name:"Overview",id:"overview"}];return _.current.features.bundleClient&&l.push({name:"Client Bundle",id:"bundle-client"}),_.current.features.bundleNitro&&l.push({name:"Nitro Bundle",id:"bundle-nitro"}),_.current.features.viteInspect&&l.push({name:"Vite Inspect",id:"vite-inspect"}),l}),o=F(c.value[0]);function $(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}function m(l){return l<1024?`${l}B`:l<1024*1024?`${(l/1024).toFixed(1)}KB`:l<1024*1024*1024?`${(l/1024/1024).toFixed(1)}MB`:`${(l/1024/1024/1024).toFixed(1)}GB`}async function T(l){return S.clearAnalyzeBuilds(await R(),[l])}return(l,n)=>{const A=de,C=P;return i(),u("div",fe,[e("div",_e,[(i(!0),u(p,null,L(c.value,(r,t)=>(i(),u("button",{key:t,px4:"",py2:"",border:"r base",hover:"bg-active",class:E(r.id===o.value?.id?"":"border-b"),onClick:z=>o.value=r},[e("div",{class:E(r.id===o.value?.id?"":"op30")},v(r.name),3)],10,ce))),128)),n[1]||(n[1]=e("div",{border:"b base","flex-auto":""},null,-1))]),o.value?.id==="overview"?(i(),u("div",ye,[n[15]||(n[15]=e("div",{"flex-auto":""},null,-1)),e("div",be,[n[10]||(n[10]=e("div",{"i-carbon-commit":"","text-xl":""},null,-1)),e("div",null,[n[2]||(n[2]=e("div",{"text-sm":"",op50:""}," Name ",-1)),e("div",null,v(l.current.name),1)]),n[11]||(n[11]=e("div",{"i-carbon-time":"","text-xl":""},null,-1)),e("div",null,[n[3]||(n[3]=e("div",{"text-sm":"",op50:""}," Build duration ",-1)),e("div",null,v($(l.current)),1)]),l.current.size?.clientBundle?(i(),u(p,{key:0},[n[5]||(n[5]=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1)),e("div",null,[n[4]||(n[4]=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1)),e("div",null,v(m(l.current.size.clientBundle)),1)])],64)):x("",!0),l.current.size?.nitroBundle?(i(),u(p,{key:1},[n[7]||(n[7]=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1)),e("div",null,[n[6]||(n[6]=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1)),e("div",null,v(m(l.current.size.nitroBundle)),1)])],64)):x("",!0),n[12]||(n[12]=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1)),e("div",null,[n[8]||(n[8]=e("div",{"text-sm":"",op50:""}," Built ",-1)),e("div",null,v(y(j)(new Date(l.current.endTime))),1)]),n[13]||(n[13]=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1)),e("div",null,[n[9]||(n[9]=e("div",{"text-sm":"",op50:""}," Report Path ",-1)),d(A,{filepath:l.current.analyzeDir},null,8,["filepath"])])]),n[16]||(n[16]=e("div",{"flex-auto":""},null,-1)),d(C,{n:"rose",icon:"carbon-delete",onClick:n[0]||(n[0]=r=>T(l.current.name))},{default:a(()=>n[14]||(n[14]=[f(" Delete this report ")])),_:1,__:[14]})])):x("",!0),n._lazyshow1||o.value?.id==="bundle-client"?(n._lazyshow1=!0,i(),u(p,null,[D(e("iframe",{src:`${y(w)}${l.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-client"]])],64)):x("v-show-if",!0),n._lazyshow2||o.value?.id==="bundle-nitro"?(n._lazyshow2=!0,i(),u(p,null,[D(e("iframe",{src:`${y(w)}${l.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-nitro"]])],64)):x("v-show-if",!0),n._lazyshow3||o.value?.id==="vite-inspect"?(n._lazyshow3=!0,i(),u(p,null,[D(e("iframe",{src:`${y(w)}${l.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="vite-inspect"]])],64)):x("v-show-if",!0)])}}}),we={class:"markdown-body"},$e={__name:"analyze-build",setup(N,{expose:_}){return _({frontmatter:{}}),(w,c)=>(i(),u("div",we,c[0]||(c[0]=[e("h1",null,"Build Analyze",-1),e("p",null,[f("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"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1)])))}},ze={flex:"~ col"},Be=["onClick"],Ce={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},ke={flex:"~ items-center justify-center wrap",p4:""},Ne={flex:"~ col gap-1","w-250":"",p4:""},Te={flex:"~ gap-3",mt2:"","justify-end":""},Re=U({__name:"analyze-build",setup(N){const _=X(),g=h(),w=ee(),c=ne("analyze-build:slug",""),o=V(()=>g.value?.builds.find(r=>r.slug===c.value)??g.value?.builds[0]),$=F(!1),m=F(""),T=V(()=>g.value?.builds.some(r=>r.name===m.value.trim()));async function l(){m.value=await S.generateAnalyzeBuildName(),await _.start()&&(ae("analyze-build:start"),k.value={name:m.value,processId:await S.startAnalyzeBuild(await R(),m.value)},$.value&&C())}const n=te();function A(r){return`${((r.endTime-r.startTime)/1e3).toFixed(1)}s`}function C(){k.value?.processId&&(n.value=k.value.processId,w.push("/modules/terminals"))}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const z=P,G=ge,Z=ie,q=oe,M=ue,O=se,H=me,J=pe,K=re,Q=$e,W=ve;return i(),u(p,null,[d(q,{"left-size":30},{left:a(()=>[e("div",ze,[(i(!0),u(p,null,L(y(g)?.builds,s=>(i(),u(p,{key:s.slug},[e("button",{flex:"~ col gap1",p3:"","hover:bg-active":"",class:E(s.slug===o.value?.slug?"text-primary bg-active":""),onClick:b=>c.value=s.slug},[e("code",null,v(s.name),1),e("div",Ce,[t[4]||(t[4]=e("div",{"i-carbon-time":""},null,-1)),e("span",null,v(A(s)),1),t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("span",null,v(y(j)(new Date(s.endTime))),1)])],10,Be),t[6]||(t[6]=e("div",{"x-divider":""},null,-1))],64))),128)),e("div",ke,[y(k)?(i(),B(z,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:t[1]||(t[1]=s=>C())},{default:a(()=>t[8]||(t[8]=[f(" Building... ")])),_:1,__:[8]})):(i(),B(z,{key:0,n:"primary",icon:"carbon-edge-node",onClick:t[0]||(t[0]=s=>l())},{default:a(()=>t[7]||(t[7]=[f(" Start a new build ")])),_:1,__:[7]}))])])]),right:a(()=>[o.value?(i(),B(G,{key:0,current:o.value},null,8,["current"])):(i(),B(Z,{key:1}))]),_:1}),d(y(_),null,{default:a(({resolve:s})=>[d(K,{"model-value":!0,onClose:b=>s(!1)},{default:a(()=>[e("div",Ne,[t[13]||(t[13]=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1)),t[14]||(t[14]=e("p",{op50:""}," Enter the name of the build: ",-1)),d(M,{modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=b=>m.value=b),placeholder:"Build name"},null,8,["modelValue"]),T.value?(i(),B(O,{key:0,"n-orange":""},{default:a(()=>t[9]||(t[9]=[f(" A build with the same name already exists, continue would overrides the previous build result. ")])),_:1,__:[9]})):x("",!0),t[15]||(t[15]=e("div",{my3:"","x-divider":""},null,-1)),t[16]||(t[16]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),d(H,{code:`npx nuxi analyze --no-serve --name=${m.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d(J,{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=b=>$.value=b),mt2:"",n:"primary"},{default:a(()=>t[10]||(t[10]=[f(" Navigate to terminal ")])),_:1,__:[10]},8,["modelValue"]),e("div",Te,[d(z,{onClick:b=>s(!1)},{default:a(()=>t[11]||(t[11]=[f(" Cancel ")])),_:2,__:[11]},1032,["onClick"]),d(z,{n:"solid primary",onClick:b=>s(!0)},{default:a(()=>t[12]||(t[12]=[f(" Start ")])),_:2,__:[12]},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),d(W,null,{default:a(()=>[d(Q)]),_:1})],64)}}});export{Re as default}; |
| import{G as ee,H as X,_ as te,I as ne,J as R,K as ce,L as pe,M as me,r as J,E as W,v as se,N as ve,O as fe,c as le,A as ge,a as he,w as _e,P as xe,Q as be,R as we,S as ye,T as $e,g as ke,U as Ce}from"./gk0e56xz.js";import{_ as Ve}from"./ncheckbox.vue-fi8jhway.js";import{_ as Pe}from"./ndropdown.vue-pel467mt.js";import{_ as Ae}from"./nnavbar.vue-bqgn7lkr.js";import{p as Z,k as T,ai as oe,J as i,a3 as o,Z as H,u as m,ac as K,a5 as d,S as t,ab as D,F as z,ag as G,V,U as S,a4 as h,q as U,X as ae,aa as N,W as De,j as Ne,at as Fe,Y as Se}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as Ue}from"./nsection-block-msli0p3p.js";import{_ as Ie}from"./filepath-item.vue-gwnp998z.js";import{_ as Te}from"./code-snippets.vue-cxswwkh8.js";import{_ as je}from"./ndrawer.vue-jkaykvna.js";import{D as Ee}from"./constants-b32h69zq.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";import"./ncode-block.vue-ctkw4rc7.js";import"./client-oeqdl4pb.js";const Be={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Le={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},ze={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Oe={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Ke={flex:"~ gap1","items-center":""},qe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ge=Z({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,f=ee(l,"modelValue"),C=T(),n=T([]);function v(s){C.value=s.target,f.value=!0}function x(s){s.target===C.value&&(f.value=!1)}function j(s){s.preventDefault()}function P(s){s.preventDefault(),_(s.dataTransfer.files)}function _(s){const c=Array.from(s||[]);if(c.length){const g=[],w=n.value.map(u=>u.name);for(const u of c)if(w.includes(u.name)){let A=1;const[y,B]=u.name.split(".");for(;w.includes(`${y} (${A}).${B}`);)A++;const M=`${y}-${A}.${B}`,a=new Blob([u],{type:u.type}),e=new File([a],M,{lastModified:Date.now()});g.push(e),w.push(M)}else u.type===""&&R({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),g.push(u);n.value=[...n.value,...g]}}async function E(){if(ce.value||pe.value)return;me("assets:upload");const s=[];for(const c of n.value){const g=new FileReader;g.readAsDataURL(c);const u=(await new Promise(A=>{g.onload=()=>A(g.result)})).split(";base64,").pop();s.push({path:c.name,encoding:"base64",content:u})}await J.writeStaticAssets(await W(),[...s],l.folder).then(()=>{p(),R({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{p(),R({message:`Error uploading files: ${c?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),f.value=!1}function q(s){n.value?.splice(s,1)}function O(s){return URL.createObjectURL(s)}function b(s,c){const[g,w]=s.name.split("."),u=c.replace(/\.\w+$/,""),A=`${u}.${w}`;return u.length===0?(alert("File name must be at least 1 characters long"),g):(Object.defineProperty(s,"name",{value:A,writable:!1}),n.value.splice(n.value.indexOf(s),1,s),s)}function r(){n.value=[]}function p(){f.value=!1,r()}return X("dragenter",v),X("dragleave",x),X("dragover",j),X("drop",P),(s,c)=>{const g=te,w=ne,u=se,A=oe("tooltip");return o(),i("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:H(m(f)?"opacity-100 visible":"opacity-0 invisible")},[K(d(g,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[A,"Close",void 0,{"bottom-end":!0}]]),n.value?.length?(o(),i("div",ze,[c[4]||(c[4]=t("div",{px6:"",py6:""},[t("h1",{"text-2xl":""}," Upload "),t("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1)),t("div",Oe,[(o(!0),i(z,null,G(n.value,(y,B)=>(o(),i("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[t("div",Re,[t("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:O(y)},null,8,Me)]),t("div",Ke,[d(u,{n:"xs","h-full":"","flex-auto":"","model-value":y.name,"onUpdate:modelValue":M=>b(y,M.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(g,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:M=>q(B)},null,8,["onClick"])])]))),128))]),t("div",qe,[n.value.length?(o(),V(g,{key:0,n:"red",onClick:r},{default:h(()=>[d(w,{icon:"carbon-clean"}),c[2]||(c[2]=D(" Clear "))]),_:1,__:[2]})):S("",!0),d(g,{disabled:!n.value.length,n:"primary solid",onClick:E},{default:h(()=>[d(w,{icon:"carbon-cloud-upload"}),c[3]||(c[3]=D(" Upload "))]),_:1,__:[3]},8,["disabled"])])])):(o(),i("div",Be,[t("label",Le,[d(w,{icon:"carbon-cloud-upload","mr-2":""}),c[1]||(c[1]=D(" Drop files here or click to select "))]),t("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=y=>_(y.target.files))},null,32)]))],2)}}}),Ze=Z({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,f=U(()=>`devtools-assets-${ve(l.asset)}`);return fe(U(()=>` | ||
| @font-face { | ||
| font-family: '${f.value}'; | ||
| src: url('${l.asset.publicPath}'); | ||
| } | ||
| `)),(C,n)=>(o(),i("div",{"of-hidden":"",style:ae({fontFamily:`'${f.value}'`})}," 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))}}),Je={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},We=["src"],Xe={key:2,"i-carbon-document":"","text-3xl":"",op20:""},He={key:3,"w-full":"","self-start":"",p4:""},Qe=["textContent"],Ye={key:4},et=["src","autoplay","controls"],tt={key:5},nt={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},ot=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=Z({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,f)=>{const C=Ze;return o(),i("div",Je,[l.asset.type==="image"?(o(),i("img",{key:0,src:l.asset.publicPath},null,8,We)):l.asset.type==="font"?(o(),V(C,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(o(),i("div",Xe)):l.asset.type==="text"&&l.textContent?(o(),i("div",He,[t("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:N(l.textContent)},null,8,Qe)])):l.asset.type==="video"?(o(),i("div",Ye,[t("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,et)])):l.asset.type==="audio"?(o(),i("div",tt,[l.detail?(o(),i("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,ot)):(o(),i("div",nt))])):(o(),i("div",lt))])}}}),st={relative:"",flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},at={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},it=Z({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,f=U(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(C,n)=>{const v=ne,x=ie;return o(),i("button",st,[C.asset.layer?(o(),V(v,{key:0,icon:"i-carbon-layers",absolute:"","right-4":"","top-4":"","bg-primary":""})):S("",!0),d(x,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),t("div",at,N(f.value),1)])}}}),re=Z({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const f=L,n=ee(f,"modelValue",l,{passive:!0}),v=U(()=>f.item?.children?.length),x=T(!0),j=U(()=>v.value?"i-carbon-folder":f.item.type==="image"?"i-carbon-image":f.item.type==="video"?"i-carbon-video":f.item.type==="audio"?"i-carbon-volume-up":f.item.type==="font"?"i-carbon-text-small-caps":f.item.type==="text"?"i-carbon-document":f.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(P,_)=>{const E=ne,q=re;return o(),i("div",null,[t("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:ae({paddingLeft:`calc(1rem + ${P.index*1.5}em)`}),class:H({"bg-active":!v.value&&m(n)?.filePath===P.item?.filePath}),border:"b base",onClick:_[0]||(_[0]=O=>v.value?x.value=!x.value:n.value=P.item)},[t("div",{class:H(j.value)},null,2),t("span",{class:H({"flex items-center":v.value}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},[D(N(P.item.path)+" ",1),P.item.layer?(o(),V(E,{key:0,icon:"i-carbon-layers","bg-primary":""})):S("",!0)],2),v.value?(o(),V(E,{key:0,icon:"carbon:chevron-right","transform-rotate":x.value?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),x.value?De(P.$slots,"default",{key:0},()=>[(o(!0),i(z,null,G(P.item?.children,O=>(o(),V(q,{key:O.filepath,modelValue:m(n),"onUpdate:modelValue":_[1]||(_[1]=b=>Ne(n)?n.value=b:null),item:O,index:P.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),rt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},ut={flex:"~","items-center":"","justify-center":""},dt={"max-w-full":"","w-full":"","table-fixed":""},ct={flex:"~ gap-1","w-full":"","items-center":""},pt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},mt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt={capitalize:""},ft={key:0},gt={op70:""},ht={flex:"~ gap2 wrap"},_t={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},xt={flex:"~ gap2 wrap justify-center"},bt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},wt={flex:"~ gap2 wrap justify-center"},yt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},$t={flex:"","justify-end":"","gap-4":""},kt=Z({__name:"AssetDetails",props:{modelValue:{}},setup(L,{emit:l}){const n=ee(L,"modelValue",l,{passive:!0}),v=le(async()=>{if(n.value.type==="image")return J.getImageMeta(await W(),n.value.filePath)}),x=T(!1),j=T(),P=T(0),_=le(async()=>{if(n.value.type!=="text")return;P.value;const a=await J.getTextAssetContent(await W(),n.value.filePath);return j.value=a,a});async function E(){if(_.value!==j.value)try{await J.writeStaticAssets(await W(),[{path:n.value.path,content:j.value,override:!0}],""),x.value=!1,P.value++,R({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const q=ge(),O=U(()=>(q.value?._installedModules||[]).some(e=>e.meta?.name==="@nuxt/image"||e.meta?.name==="@nuxt/image-edge"||e.meta?.name==="@nuxt/image-nightly")),b=U(()=>{const a=[];if(n.value.type==="image"){const e=v.value?.width?` | ||
| width="${v.value.width}" | ||
| height="${v.value.height}" `:" ";return a.push({lang:"vue-html",code:`<img${e} | ||
| src="${n.value.publicPath}" | ||
| />`,name:"Plain Image"}),O.value&&a.push({lang:"vue-html",code:`<NuxtImg${e} | ||
| src="${n.value.publicPath}" | ||
| />`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${e} | ||
| src="${n.value.publicPath}" | ||
| />`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),a}return a.push({lang:"html",code:`<a download href="${n.value.publicPath}"> | ||
| Download ${n.value.path.split("/").slice(-1)[0]} | ||
| </a>`,name:"Download link"}),a}),r=he(),p=_e(),s=xe(()=>n.value.mtime),c=U(()=>{const a=n.value.size;return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(2)} KB`:`${(a/1024/1024).toFixed(2)} MB`}),g=U(()=>{if(!v.value?.width||!v.value?.height)return"";const a=($,I)=>I?a(I,$%I):$,e=a(v.value.width,v.value.height);return e>3?`${v.value.width/e}:${v.value.height/e}`:""}),w=U(()=>["image","text","video","audio","font"].includes(n.value.type)),u=T(!1);async function A(){try{await J.deleteStaticAsset(await W(),n.value.filePath),n.value=void 0,u.value=!1,R({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const y=T(!1),B=T("");async function M(){const a=n.value.filePath.split("/"),e=a.slice(-1)[0].split(".").slice(0,-1).join(".");if(!B.value||B.value===e)return R({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=a.slice(-1)[0].split(".").slice(-1)[0],I=`${a.slice(0,-1).join("/")}/${B.value}.${$}`;await J.renameStaticAsset(await W(),n.value.filePath,I),n.value=void 0,y.value=!1,R({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch($){console.error($),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(a,e)=>{const $=ie,I=Ie,F=te,ue=Te,Q=be,de=se,Y=oe("tooltip");return o(),i(z,null,[t("div",rt,[w.value?(o(),i(z,{key:0},[e[13]||(e[13]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Preview "),t("div",{"x-divider":""})],-1)),t("div",ut,[d($,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:m(n),"text-content":m(_)},null,8,["asset","text-content"])])],64)):S("",!0),e[25]||(e[25]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Details "),t("div",{"x-divider":""})],-1)),t("table",dt,[t("tbody",null,[t("tr",null,[e[14]||(e[14]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),t("td",null,[t("div",ct,[d(I,{filepath:m(n).filePath,"text-left":""},null,8,["filepath"]),K(d(F,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:e[0]||(e[0]=k=>m(p)(m(n).filePath))},null,512),[[Y,"Open in Editor"]])])])]),t("tr",null,[e[15]||(e[15]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),t("td",null,[t("div",pt,[t("div",mt,N(m(n).publicPath),1),K(d(F,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:e[1]||(e[1]=k=>m(r)(m(n).publicPath,"assets-public-path"))},null,512),[[Y,"Copy public path"]]),K(d(F,{"flex-none":"",to:m(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Y,"Open in browser"]])])])]),t("tr",null,[e[16]||(e[16]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),t("td",vt,N(m(n).type),1)]),m(v)?.width?(o(),i(z,{key:0},[t("tr",null,[e[17]||(e[17]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),t("td",null,N(m(v).width)+" x "+N(m(v).height),1)]),g.value?(o(),i("tr",ft,[e[18]||(e[18]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),t("td",null,N(g.value),1)])):S("",!0)],64)):S("",!0),t("tr",null,[e[19]||(e[19]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),t("td",null,N(c.value),1)]),t("tr",null,[e[20]||(e[20]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),t("td",null,[D(N(new Date(m(n).mtime).toLocaleString())+" ",1),t("span",gt,"("+N(m(s))+")",1)])])])]),e[26]||(e[26]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Actions "),t("div",{"x-divider":""})],-1)),t("div",ht,[d(F,{to:m(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:h(()=>e[21]||(e[21]=[D(" Download ")])),_:1,__:[21]},8,["to"]),m(n).type==="text"?(o(),V(F,{key:0,icon:"carbon-edit",n:"cyan",onClick:e[2]||(e[2]=k=>x.value=!x.value)},{default:h(()=>e[22]||(e[22]=[D(" Edit ")])),_:1,__:[22]})):S("",!0),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:e[3]||(e[3]=k=>y.value=!y.value)},{default:h(()=>e[23]||(e[23]=[D(" Rename ")])),_:1,__:[23]}),d(F,{icon:"carbon-delete",n:"red",onClick:e[4]||(e[4]=k=>u.value=!u.value)},{default:h(()=>e[24]||(e[24]=[D(" Delete ")])),_:1,__:[24]})]),e[27]||(e[27]=t("div",{"flex-auto":""},null,-1)),b.value.length?(o(),V(ue,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":b.value},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=k=>u.value=k)},{default:h(()=>[t("div",_t,[e[30]||(e[30]=t("span",null," Are you sure you want to delete this asset? ",-1)),t("div",xt,[d(F,{icon:"carbon-close",onClick:e[5]||(e[5]=k=>u.value=!1)},{default:h(()=>e[28]||(e[28]=[D(" Cancel ")])),_:1,__:[28]}),d(F,{icon:"carbon-delete",n:"red",onClick:A},{default:h(()=>e[29]||(e[29]=[D(" Delete ")])),_:1,__:[29]})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:y.value,"onUpdate:modelValue":e[9]||(e[9]=k=>y.value=k)},{default:h(()=>[t("div",bt,[d(de,{modelValue:B.value,"onUpdate:modelValue":e[7]||(e[7]=k=>B.value=k),placeholder:"New name",n:"blue"},null,8,["modelValue"]),t("div",wt,[d(F,{icon:"carbon-close",onClick:e[8]||(e[8]=k=>y.value=!1)},{default:h(()=>e[31]||(e[31]=[D(" Cancel ")])),_:1,__:[31]}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:M},{default:h(()=>e[32]||(e[32]=[D(" Rename ")])),_:1,__:[32]})])])]),_:1},8,["modelValue"]),m(n).type==="text"?(o(),V(Q,{key:0,modelValue:x.value,"onUpdate:modelValue":e[12]||(e[12]=k=>x.value=k)},{default:h(()=>[t("div",yt,[K(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=k=>j.value=k),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(E,["enter"])},null,544),[[Fe,j.value]]),t("div",$t,[d(F,{icon:"carbon-close",onClick:e[11]||(e[11]=k=>x.value=!1)},{default:h(()=>e[33]||(e[33]=[D(" Cancel ")])),_:1,__:[33]}),d(F,{icon:"carbon:save",n:"primary",onClick:E},{default:h(()=>e[34]||(e[34]=[D(" save ")])),_:1,__:[34]})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Ct={"h-full":"","of-auto":""},Vt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Pt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},At={flex:"~ col","w-30":"","of-auto":""},Dt={"text-xs":"",op75:""},Nt={op50:""},Ft={key:0},St={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Ut={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Xt=Z({__name:"assets",setup(L){const l=we(),f=T(!1),C=T(""),n=U(()=>new ye(l.value||[],{keys:["path"]})),v=$e(()=>{const b=[];for(const r of l.value||[]){const p=r.path.split(".").pop();p&&!b.find(s=>s.name===p)&&b.push({name:p,value:!0})}return b}),x=U(()=>(C.value?n.value.search(C.value).map(r=>r.item):l.value||[]).filter(r=>{const p=r.path.split(".").pop();return!p||v.some(s=>s.name===p&&s.value)})),j=U(()=>{const b={};for(const r of x.value){const p=`${r.path.split("/").slice(0,-1).join("/")}/`;b[p]||(b[p]=[]),b[p].push(r)}return Object.entries(b).sort(([r],[p])=>r.localeCompare(p))}),P=U(()=>{const b={children:[]},r=(p,s,c)=>{const[g,...w]=s;let u=p.children.find(A=>A.path===g);u||(u={...c,path:g,children:[]},p.children.push(u)),w.length>1?r(u,w,c):w.length===1&&u.children.push({...c,path:w[0]})};return x.value.forEach(p=>{const s=p.path.split("/").filter(c=>c!=="");r(b,s,p)}),b.children}),_=T(),{view:E}=ke("assets");function q(){E.value=E.value==="list"?"grid":"list"}Ce("Escape",()=>{_.value=void 0});const O=T();return(b,r)=>{const p=te,s=Ve,c=Pe,g=Ae,w=Ge,u=it,A=Ue,y=re,B=kt,M=je,a=oe("tooltip");return o(),i("div",Ct,[d(g,{ref_key:"navbar",ref:O,search:C.value,"onUpdate:search":r[1]||(r[1]=e=>C.value=e),pb2:""},{actions:h(()=>[t("div",Vt,[K(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:r[0]||(r[0]=e=>f.value=!f.value)},null,512),[[a,"File Upload",void 0,{"bottom-end":!0}]]),m(v).length?(o(),V(c,{key:0,direction:"end",n:"sm primary"},{trigger:h(({click:e})=>[K(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:$=>e()},null,8,["onClick"]),[[a,"Filter",void 0,{"bottom-end":!0}]]),t("span",Pt,N(m(v).length),1)]),default:h(()=>[t("div",At,[(o(!0),i(z,null,G(m(v),e=>(o(),V(s,{key:e.name,modelValue:e.value,"onUpdate:modelValue":$=>e.value=$,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:h(()=>[t("span",Dt,N(e.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):S("",!0),K(d(p,{"text-lg":"",border:!1,icon:m(E)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:q},null,8,["icon"]),[[a,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:h(()=>[t("div",Nt,[C.value?(o(),i("span",Ft,N(x.value.length)+" matched · ",1)):S("",!0),t("span",null,N(m(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(w,{modelValue:f.value,"onUpdate:modelValue":r[2]||(r[2]=e=>f.value=e),folder:"/"},null,8,["modelValue"]),m(E)==="grid"?(o(),i(z,{key:0},[j.value.length>1?(o(!0),i(z,{key:0},G(j.value,([e,$])=>(o(),V(A,{key:e,text:e,description:`${$.length} items`,open:$.length<=m(Ee),padding:!1},{default:h(()=>[t("div",St,[(o(!0),i(z,null,G($,I=>(o(),V(u,{key:I.path,asset:I,folder:e,onClick:F=>_.value=I},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),i("div",Ut,[(o(!0),i(z,null,G(x.value,e=>(o(),V(u,{key:e.path,asset:e,onClick:$=>_.value=e},null,8,["asset","onClick"]))),128))]))],64)):(o(),i("div",It,[(o(!0),i(z,null,G(P.value,(e,$)=>(o(),V(y,{key:$,modelValue:_.value,"onUpdate:modelValue":r[3]||(r[3]=I=>_.value=I),item:e},null,8,["modelValue","item"]))),128))])),d(M,{"model-value":!!_.value,"auto-close":"","w-120":"",top:O.value,onClose:r[5]||(r[5]=e=>_.value=void 0)},{default:h(()=>[_.value?(o(),V(B,{key:0,modelValue:_.value,"onUpdate:modelValue":r[4]||(r[4]=e=>_.value=e)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","top"])])}}});export{Xt as default}; |
| {"id":"5f34a053-c557-46cc-bac5-9588618d1725","timestamp":1751190606639,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]} |
| import{_ as k}from"./ncode-block.vue-ctkw4rc7.js";import{ao as D}from"./gk0e56xz.js";import{p as I,q as T,k as j,E as y,V as q,a3 as M}from"./vendor/json-editor-vue-m9gzt21j.js";class V{diff(e,t,n={}){let o;typeof n=="function"?(o=n,n={}):"callback"in n&&(o=n.callback);const u=this.castInput(e,n),c=this.castInput(t,n),r=this.removeEmpty(this.tokenize(u,n)),s=this.removeEmpty(this.tokenize(c,n));return this.diffWithOptionsObj(r,s,n,o)}diffWithOptionsObj(e,t,n,o){var u;const c=d=>{if(d=this.postProcess(d,n),o){setTimeout(function(){o(d)},0);return}else return d},r=t.length,s=e.length;let l=1,i=r+s;n.maxEditLength!=null&&(i=Math.min(i,n.maxEditLength));const p=(u=n.timeout)!==null&&u!==void 0?u:1/0,f=Date.now()+p,a=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(a[0],t,e,0,n);if(a[0].oldPos+1>=s&&h+1>=r)return c(this.buildValues(a[0].lastComponent,t,e));let g=-1/0,w=1/0;const x=()=>{for(let d=Math.max(g,-l);d<=Math.min(w,l);d+=2){let C;const P=a[d-1],v=a[d+1];P&&(a[d-1]=void 0);let L=!1;if(v){const E=v.oldPos-d;L=v&&0<=E&&E<r}const _=P&&P.oldPos+1<s;if(!L&&!_){a[d]=void 0;continue}if(!_||L&&P.oldPos<v.oldPos?C=this.addToPath(v,!0,!1,0,n):C=this.addToPath(P,!1,!0,1,n),h=this.extractCommon(C,t,e,d,n),C.oldPos+1>=s&&h+1>=r)return c(this.buildValues(C.lastComponent,t,e))||!0;a[d]=C,C.oldPos+1>=s&&(w=Math.min(w,d-1)),h+1>=r&&(g=Math.max(g,d+1))}l++};if(o)(function d(){setTimeout(function(){if(l>i||Date.now()>f)return o(void 0);x()||d()},0)})();else for(;l<=i&&Date.now()<=f;){const d=x();if(d)return d}}addToPath(e,t,n,o,u){const c=e.lastComponent;return c&&!u.oneChangePerToken&&c.added===t&&c.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:c.count+1,added:t,removed:n,previousComponent:c.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:n,previousComponent:c}}}extractCommon(e,t,n,o,u){const c=t.length,r=n.length;let s=e.oldPos,l=s-o,i=0;for(;l+1<c&&s+1<r&&this.equals(n[s+1],t[l+1],u);)l++,s++,i++,u.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return i&&!u.oneChangePerToken&&(e.lastComponent={count:i,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const o=[];let u;for(;e;)o.push(e),u=e.previousComponent,delete e.previousComponent,e=u;o.reverse();const c=o.length;let r=0,s=0,l=0;for(;r<c;r++){const i=o[r];if(i.removed)i.value=this.join(n.slice(l,l+i.count)),l+=i.count;else{if(!i.added&&this.useLongestToken){let p=t.slice(s,s+i.count);p=p.map(function(f,a){const h=n[l+a];return h.length>f.length?h:f}),i.value=this.join(p)}else i.value=this.join(t.slice(s,s+i.count));s+=i.count,i.added||(l+=i.count)}}return o}}class z extends V{constructor(){super(...arguments),this.tokenize=N}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(` | ||
| `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(` | ||
| `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(` | ||
| `)&&(e=e.slice(0,-1)),t.endsWith(` | ||
| `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}}const A=new z;function W(m,e,t){return A.diff(m,e,t)}function N(m,e){e.stripTrailingCr&&(m=m.replace(/\r\n/g,` | ||
| `));const t=[],n=m.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let o=0;o<n.length;o++){const u=n[o];o%2&&!e.newlineIsToken?t[t.length-1]+=u:t.push(u)}return t}const B=I({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(m){const e=m;function t(r,s){const l=W(r.trim(),s.trim()),i=[],p=[],f=[];for(const a of l){const h=a.value.trimEnd().split(` | ||
| `);for(const g of h)a.added?(i.push(f.length),f.push(g)):(a.removed&&p.push(f.length),f.push(g))}return{added:i,removed:p,result:f.join(` | ||
| `)}}const n=T(()=>t(e.from,e.to));function o(r){let s=0;return r.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,l=>(s++,n.value.added.includes(s-1)?'class="line line-added"':n.value.removed.includes(s-1)?'class="line line-removed"':l))}const u=j();y(c);function c(){const r=D(u);r&&r.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(r,s)=>{const l=k;return M(),q(l,{ref_key:"elRef",ref:u,code:n.value.result,lang:r.lang,"transform-rendered":o,onLoaded:c},null,8,["code","lang"])}}});export{B as _}; |
| import{_ as g}from"./ncode-block.vue-ctkw4rc7.js";import{a as C,_ as S}from"./gk0e56xz.js";import{p as x,n as w,q as B,w as N,J as n,U as r,a3 as a,S as s,F as d,ag as V,a5 as i,V as $,u as T,a4 as u,ab as v,Z as m,aa as h}from"./vendor/json-editor-vue-m9gzt21j.js";const D={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},U=x({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(_){const l=_,e=w(l.codeSnippets[0]),f=C(),b=B(()=>e.value?.lang||"text");return N(()=>{l.codeSnippets.includes(e.value)||(e.value=l.codeSnippets[0])}),(p,o)=>{const k=g,c=S;return p.codeSnippets.length?(a(),n("div",D,[s("div",E,[(a(!0),n(d,null,V(p.codeSnippets,(t,y)=>(a(),n("button",{key:y,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(t===e.value?"":"border-b"),onClick:q=>e.value=t},[s("div",{class:m(t===e.value?"":"op30"),"font-mono":""},h(t.name),3)],10,F))),128)),o[1]||(o[1]=s("div",{border:"b base","flex-auto":""},null,-1))]),e.value?(a(),n(d,{key:0},[i(k,{code:e.value.code,lang:b.value,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),s("div",L,[i(c,{icon:"carbon-copy",onClick:o[0]||(o[0]=t=>T(f)(e.value.code,p.eventType||`code-snippet-${e.value.name}`))},{default:u(()=>o[2]||(o[2]=[v(" Copy ")])),_:1,__:[2]}),e.value?.docs?(a(),$(c,{key:0,to:e.value.docs,target:"_blank",icon:"carbon-catalog"},{default:u(()=>o[3]||(o[3]=[v(" Docs ")])),_:1,__:[3]},8,["to"])):r("",!0)])],64)):r("",!0)])):r("",!0)}}});export{U as _}; |
| import{a as ie,_ as J,a4 as re,aq as ue,A as me,B as ce,g as Y,ar as de,n as fe,as as ve,S as _e,Y as he,W as be,I as ge,f as xe}from"./gk0e56xz.js";import{J as m,a3 as o,S as n,p as G,q as P,ab as E,aa as O,U as g,W as j,a5 as u,V as b,a4 as c,u as $,F as B,ag as M,k as F,n as ye,E as we,x as ke,j as z,$ as Ce,Z as Ne,a6 as W,ai as $e,ac as X,af as Ve}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as De}from"./help-fab.vue-cws4yr5r.js";import{_ as Pe}from"./ncheckbox.vue-fi8jhway.js";import{_ as Z}from"./nnavbar.vue-bqgn7lkr.js";import{p as K}from"./index-jc4yj4to.js";import{_ as Q}from"./nbadge-k88iypqm.js";import{_ as ee}from"./filepath-item.vue-gwnp998z.js";import{_ as Se}from"./ndrawer.vue-jkaykvna.js";import{D as Le,N as Be}from"./vendor/vis-n7jjo36l.js";import{_ as Ie}from"./nselect-tabs.vue-lhto3nxq.js";import{_ as Te}from"./nsection-block-msli0p3p.js";import{_ as Me}from"./nicon-title.vue-ejocqf9t.js";import{D as H}from"./constants-b32h69zq.js";import{u as Ue,a as Fe}from"./state-components-n8bsanko.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const Ge={class:"markdown-body"},Ae={__name:"components",setup(D,{expose:l}){return l({frontmatter:{}}),(p,d)=>(o(),m("div",Ge,d[0]||(d[0]=[n("h1",null,"Components",-1),n("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),n("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Re={"text-sm":"","font-mono":""},ne=G({__name:"ComponentName",props:{component:{}},setup(D){const l=D,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||""));return(p,d)=>(o(),m("code",Re,[d[0]||(d[0]=n("span",{mr1:"",op20:""},"<",-1)),E(O(v.value),1),d[1]||(d[1]=n("span",{ml1:"",op20:""},"/>",-1))]))}}),ze={flex:"~ col gap1","items-start":"","of-hidden":""},Ee={flex:"~ gap2 items-center",px3:""},We={px3:"",pb2:""},Oe={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},je={"text-sm":""},qe={"text-primary":""},He={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Je={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Xe={"text-sm":""},Ye={"text-primary":""},Ze={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},oe=G({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(D){const l=D,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||"")),p=P(()=>l.component.filePath||l.component.file||l.component.__file||""),d=ie();return(s,_)=>{const i=ne,x=J,a=Q,w=ee;return o(),m("div",ze,[n("div",Ee,[u(i,{component:s.component},null,8,["component"]),s.component.meta?.docs&&typeof s.component.meta.docs=="string"?(o(),b(x,{key:0,title:"Open docs","flex-none":"",n:"xs",to:s.component.meta.docs,target:"_blank",icon:"carbon-catalog"},{default:c(()=>_[1]||(_[1]=[E(" Docs ")])),_:1,__:[1]},8,["to"])):g("",!0),u(x,{title:"Copy name","flex-none":"",n:"xs",icon:"carbon-copy",onClick:_[0]||(_[0]=h=>$(d)(`<${v.value}></${v.value}>`,"component-name"))},{default:c(()=>_[2]||(_[2]=[E(" Copy ")])),_:1,__:[2]}),s.component.global?(o(),b(a,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):g("",!0)]),n("div",We,[p.value?(o(),b(w,{key:0,filepath:p.value,"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):g("",!0)]),s.dependents?(o(),m("div",Oe,[n("div",je,[n("strong",qe,O(s.dependents.length),1),_[3]||(_[3]=n("span",{op50:""}," references",-1))]),s.dependents.length?(o(),m("div",He,[(o(!0),m(B,null,M(s.dependents,h=>(o(),b(w,{key:h,filepath:h},null,8,["filepath"]))),128))])):g("",!0)])):g("",!0),s.dependencies?(o(),m("div",Je,[n("div",Xe,[n("strong",Ye,O(s.dependencies.length),1),_[4]||(_[4]=n("span",{op50:""}," dependencies",-1))]),s.dependencies.length?(o(),m("div",Ze,[(o(!0),m(B,null,M(s.dependencies,h=>(o(),b(w,{key:h,filepath:h},null,8,["filepath"]))),128))])):g("",!0)])):g("",!0),j(s.$slots,"default")])}}}),Ke={flex:"~ gap-x-3 gap-y-1 wrap","w-full":""},Qe={relative:"","h-full":"","w-full":""},en={key:0,py4:"",pt3:"",flex:"~ col"},nn={border:"t base",p4:""},on=G({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(D){const l=D,v=F(),p=F(),d=re(),s=ye(),_=ue(),i=me(),x=ce(),{componentsGraphShowNodeModules:a,componentsGraphShowGlobalComponents:w,componentsGraphShowPages:h,componentsGraphShowLayouts:k,componentsGraphShowWorkspace:S}=Y("ui"),f=F(),C=F(""),r=de(C,300),A=P(()=>{const V=l.relationships||[];if(f.value){let e=function(N){!N||t.has(N)||(t.add(N),N.deps.forEach(I=>{e(V.find(U=>U.id===I))}))};const t=new Set;return e(f.value),Array.from(t)}return V}),T=P(()=>{const V=A.value.map(t=>{const N=l.components.find(R=>R.filePath===t.id),I=_.value?.find(R=>R.file===t.id),U=x.value?.find(R=>R.file===t.id),L=t.id.includes("/node_modules/")?"lib":N?N.global?"global":"user":U?"layout":I?"page":"unknown";if(!a.value&&L==="lib"||!h.value&&L==="page"||!k.value&&L==="layout"||!S.value&&L==="user"&&i.value&&!t.id.startsWith(i.value.rootDir)||!w.value&&L==="global")return null;const q=L==="layout"?"hexagon":L==="page"?"square":"dot",y=r.value&&!t.id.toLowerCase().includes(r.value.toLowerCase());return{id:t.id,label:ae(t.id),group:L,shape:q,size:15+Math.min(t.deps.length/2,8),font:{color:y?"#8885":d.value==="dark"?"white":"black"},color:y?"#8885":f.value?.id===t.id?"#82c742":void 0,extra:{id:t.id,component:N,page:I,layout:U,relationship:t}}}).filter(t=>!!t),e=A.value.flatMap(t=>t.deps.map(N=>({from:t.id,to:N,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new Le(V),edges:e}}),te=P(()=>s.value?.component?l.relationships?.find(e=>e.id===s.value?.component?.filePath)?.deps?.map(e=>l.relationships?.find(t=>t.id===e)?.id).filter(Boolean):[]),se=P(()=>s.value?.component?l.relationships?.filter(e=>e.deps.includes(s.value.component.filePath))?.map(e=>l.relationships?.find(t=>t.id===e.id)?.id).filter(Boolean):[]);we(()=>{const V={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},e=new Be(v.value,T.value,V);e.on("click",t=>{const N=t.nodes?.[0],I=T.value.nodes.get(N).extra;s.value=I}),ke(T,()=>{e.setData(T.value)})});function le(){s.value=void 0}function ae(V){const e=l.components.find(t=>t.filePath===V);return e?e.pascalName:V.replace(/.*\/components\//,"").replace(/\.vue$/,"").replace(/\/index$/,"").split("/").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function pe(){f.value=s.value?.relationship,s.value=void 0}return(V,e)=>{const t=Pe,N=Z,I=fe,U=oe,L=J,q=Se;return o(),m(B,null,[u(N,{ref_key:"navbar",ref:p,search:C.value,"onUpdate:search":e[6]||(e[6]=y=>C.value=y),absolute:"","left-0":"","right-0":"","top-0":""},{actions:c(()=>[n("div",Ke,[u(t,{modelValue:$(h),"onUpdate:modelValue":e[0]||(e[0]=y=>z(h)?h.value=y:null),n:"primary sm"},{default:c(()=>e[8]||(e[8]=[n("span",{op75:""},"Show pages",-1)])),_:1,__:[8]},8,["modelValue"]),u(t,{modelValue:$(k),"onUpdate:modelValue":e[1]||(e[1]=y=>z(k)?k.value=y:null),n:"primary sm"},{default:c(()=>e[9]||(e[9]=[n("span",{op75:""},"Show layouts",-1)])),_:1,__:[9]},8,["modelValue"]),u(t,{modelValue:$(S),"onUpdate:modelValue":e[2]||(e[2]=y=>z(S)?S.value=y:null),n:"primary sm"},{default:c(()=>e[10]||(e[10]=[n("span",{op75:""},"Show workspace",-1)])),_:1,__:[10]},8,["modelValue"]),u(t,{modelValue:$(a),"onUpdate:modelValue":e[3]||(e[3]=y=>z(a)?a.value=y:null),n:"primary sm"},{default:c(()=>e[11]||(e[11]=[n("span",{op75:""},"Show node_modules",-1)])),_:1,__:[11]},8,["modelValue"]),u(t,{modelValue:$(w),"onUpdate:modelValue":e[4]||(e[4]=y=>z(w)?w.value=y:null),n:"primary sm"},{default:c(()=>e[12]||(e[12]=[n("span",{op75:""},"Show global components",-1)])),_:1,__:[12]},8,["modelValue"])]),f.value?(o(),m("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:e[5]||(e[5]=y=>f.value=void 0)},e[13]||(e[13]=[E(" Clear filter "),n("div",{"i-carbon-close":""},null,-1)]))):g("",!0),e[14]||(e[14]=n("div",{"flex-auto":""},null,-1)),j(V.$slots,"default")]),_:3},8,["search"]),n("div",Qe,[n("div",{ref_key:"container",ref:v,"h-full":"","w-full":""},null,512),u(I,{absolute:"","bottom-3":"","left-3":"","border-0":"","n-glass-effect":"",p2:"",px3:"","text-sm":""},{default:c(()=>e[15]||(e[15]=[n("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),n("div",{op50:""}," Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),n("div",{op50:""}," Global Component "),n("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),n("div",{op50:""}," Page "),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[n("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),n("div",{op50:""}," Layout "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),n("div",{op50:""}," Library Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),n("div",{op50:""}," Unknown ")],-1)])),_:1,__:[15]}),u(q,{"model-value":!!(s.value&&s.value.component),top:p.value,border:"t l base","w-80":"",onClose:le},{default:c(()=>[s.value&&s.value.component?(o(),m("div",en,[u(U,{component:s.value.component,dependencies:te.value,dependents:se.value},null,8,["component","dependencies","dependents"]),n("div",nn,[u(L,{n:"primary solid",onClick:e[7]||(e[7]=y=>pe())},{default:c(()=>e[16]||(e[16]=[E(" Filter to this component ")])),_:1,__:[16]})])])):g("",!0)]),_:1},8,["model-value","top"])])],64)}}}),tn={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},sn={key:0,"ml--1":"","text-primary":""},ln=G({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(D){const l=D,v=P(()=>l.component.filePath||l.component.file||l.component.__file||"");return(p,d)=>{const s=ne,_=oe,i=Ce("VDropdown"),x=Q,a=ee;return o(),m("div",tn,[u(i,null,{popper:c(()=>[u(_,{component:p.component,dependencies:p.dependencies,dependents:p.dependents,"w-100":"",pt3:""},null,8,["component","dependencies","dependents"])]),default:c(()=>[n("button",{"hover:text-primary":"",class:Ne(p.dependents&&p.dependents.length===0?"op50":"")},[u(s,{component:p.component},null,8,["component"])],2)]),_:1}),p.dependents?.length?(o(),m("sup",sn," x"+O(p.dependents?.length),1)):g("",!0),p.component.global?(o(),b(x,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):g("",!0),j(p.$slots,"default"),v.value?(o(),b(a,{key:2,filepath:v.value,"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):g("",!0)])}}}),an={flex:"~ gap-2 items-center"},pn={pl4:""},rn=G({__name:"ComponentsList",props:{components:{},relationships:{}},setup(D){const l=D,v=F(""),p=F("all"),d=P(()=>{const x=l.components.map(a=>ve(a,l.relationships));return p.value==="using"?x.filter(a=>a.dependents?.length):p.value==="not-used"?x.filter(a=>!a.dependents?.length):x}),s={ClientOnly:"https://nuxt.com/docs/api/components/client-only",DevOnly:"https://nuxt.com/docs/api/components/dev-only",NuxtClientFallback:"https://nuxt.com/docs/api/components/nuxt-client-fallback",NuxtPicture:"https://nuxt.com/docs/api/components/nuxt-picture",NuxtRouteAnnouncer:"https://nuxt.com/docs/api/components/nuxt-route-announcer",NuxtTime:"https://nuxt.com/docs/api/components/nuxt-time",NuxtPage:"https://nuxt.com/docs/api/components/nuxt-page",NuxtLayout:"https://nuxt.com/docs/api/components/nuxt-layout",NuxtLink:"https://nuxt.com/docs/api/components/nuxt-link",NuxtLoadingIndicator:"https://nuxt.com/docs/api/components/nuxt-loading-indicator",NuxtErrorBoundary:"https://nuxt.com/docs/api/components/nuxt-error-boundary",NuxtWelcome:"https://nuxt.com/docs/api/components/nuxt-welcome",NuxtIsland:"https://nuxt.com/docs/api/components/nuxt-island",NuxtImg:"https://nuxt.com/docs/api/components/nuxt-img"},_=P(()=>new _e(d.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),i=P(()=>{const x=[],a=new Map,w=[],h=[],k={user:0,lib:0,builtin:0,runtime:0};return(v.value?_.value.search(v.value).map(f=>f.item):d.value).forEach(f=>{const C=f.component;if(C.filePath&&he(C.filePath)){const r=be(C.filePath);if(!r)return;r==="nuxt"?(C.meta??={},C.meta.docs??=s?.[C.pascalName],w.push(f),k.builtin++):(a.has(r)||a.set(r,[]),a.get(r).push(f),k.lib++)}else C.global&&!C.filePath?(h.push(f),k.runtime++):(x.push(f),k.user++)}),{count:k,user:x,builtin:w,lib:a,runtime:h}});return(x,a)=>{const w=ge,h=Ie,k=Z,S=ln,f=Te,C=Me;return o(),m(B,null,[u(k,{search:v.value,"onUpdate:search":a[1]||(a[1]=r=>v.value=r),pb3:""},{actions:c(()=>[j(x.$slots,"default")]),default:c(()=>[n("div",an,[u(w,{icon:"carbon-filter",op50:""}),u(h,{modelValue:p.value,"onUpdate:modelValue":a[0]||(a[0]=r=>p.value=r),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),i.value.user.length?(o(),b(f,{key:0,icon:"carbon-nominal",text:"User components",open:i.value.user.length<=$(H),description:`Total components: ${i.value.count.user}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.user,r=>(o(),b(S,W({key:r.component.filePath},{ref_for:!0},r),null,16))),128))]),_:1},8,["open","description"])):g("",!0),i.value.runtime.length?(o(),b(f,{key:1,icon:"carbon-load-balancer-global",open:i.value.runtime.length<=$(H),text:"Runtime components",description:`Total components: ${i.value.count.runtime}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.runtime,r=>(o(),b(S,W({key:r.component.filePath},{ref_for:!0},r),null,16))),128))]),_:1},8,["open","description"])):g("",!0),i.value.builtin.length?(o(),b(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${i.value.count.builtin}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.builtin,r=>(o(),b(S,W({key:r.component.filePath},{ref_for:!0},r),null,16))),128))]),_:1},8,["description"])):g("",!0),i.value.lib.size?(o(),b(f,{key:3,open:i.value.count.lib<=$(H),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${i.value.count.lib} components from ${i.value.lib.size} packages`},{default:c(()=>[(o(!0),m(B,null,M(i.value.lib.entries(),([r,A])=>(o(),m("div",{key:r,"ml-2":""},[u(C,{text:`${r} (${A.length})`,py1:"",op50:""},null,8,["text"]),n("div",pn,[(o(!0),m(B,null,M(A,T=>(o(),b(S,W({key:T.component.filePath},{ref_for:!0},T),null,16))),128))])]))),128))]),_:1},8,["open","description"])):g("",!0)],64)}}}),un={relative:"","h-full":"","of-auto":""},mn={"flex-none":"",flex:"~ gap3"},Pn=G({__name:"components",setup(D){const l=xe(),v=Ue(),p=Fe(),{componentsView:d}=Y("ui");function s(){l.value?.inspector?.enable()}function _(){d.value=d.value==="list"?"graph":"list"}return(i,x)=>{const a=J,w=Ae,h=De,k=$e("tooltip");return o(),m(B,null,[n("div",un,[(o(),b(Ve($(d)==="list"?rn:on),{components:$(v),relationships:$(p)},{default:c(()=>[n("div",mn,[X(u(a,{"text-lg":"",border:!1,icon:$(d)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:_},null,8,["icon"]),[[k,"Toggle View",void 0,{"bottom-end":!0}]]),$(l)?.inspector?.isAvailable?X((o(),b(a,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:s},null,512)),[[k,"Inspect Vue components",void 0,{"bottom-end":!0}]]):g("",!0)])]),_:1},8,["components","relationships"]))]),u(h,null,{default:c(()=>[u(w)]),_:1})],64)}}});export{Pn as default}; |
| import{a as $,w as U,I as E,_ as F}from"./gk0e56xz.js";import{_ as S}from"./nmarkdown.vue-mk2gi3ky.js";import{_ as j}from"./filepath-item.vue-gwnp998z.js";import{k as q}from"./index-jc4yj4to.js";import{C as y}from"./constants-b32h69zq.js";import{p as z,q as r,$ as J,V as i,a3 as s,a4 as m,S as a,Z as L,J as p,U as l,ab as c,aa as f,a5 as b,u as k,F as x,ag as M}from"./vendor/json-editor-vue-m9gzt21j.js";const O={rounded:"","font-mono":""},T={key:0,"text-primary":""},W={key:0},Z={title:"Vue Directive"},A={"max-w-100":""},G={px4:"",py3:"","text-sm":""},H={flex:"~ gap2",n:"primary xs"},K={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},P={"text-sm":""},Q={"text-primary":""},R={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},X={key:1,"text-sm":"",op50:""},ne=z({__name:"ComposableItem",props:{item:{},isDirective:{type:Boolean,default:!1},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(g){const o=g,C=$(),h=U(),u=r(()=>o.item.as||o.item.name),D=r(()=>{let e=u.value;return o.isDirective&&(e[0]!=="v"&&(e=`v${e}`),e=q(e)),e}),n=r(()=>o.metadata?.injectionUsage?.[u.value]?.count||0),N=r(()=>(o.metadata?.injectionUsage?.[u.value]?.moduleIds||[]).filter(e=>!e.endsWith("?macro=true"))),v=r(()=>o.item.meta?.docsUrl?o.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(o.item.from)?y.nuxt[o.item.name]:o.item.from==="vue"?y.vue[o.item.name]:null);return(e,t)=>{const w=E,I=S,_=F,V=j,B=J("VDropdown");return s(),i(B,{disabled:!o.metadata},{popper:m(()=>[a("div",A,[a("div",G,[e.item.meta?.description?(s(),i(I,{key:0,tag:"div",pb3:"","text-sm":"",markdown:e.item.meta.description},null,8,["markdown"])):l("",!0),a("div",H,[b(_,{icon:"carbon-copy",onClick:t[0]||(t[0]=d=>k(C)(D.value,"imports-name"))},{default:m(()=>t[2]||(t[2]=[c(" Copy ")])),_:1,__:[2]}),e.filepath?(s(),i(_,{key:0,icon:"carbon-code",onClick:t[1]||(t[1]=d=>e.filepath&&k(h)(e.filepath))},{default:m(()=>t[3]||(t[3]=[c(" Source ")])),_:1,__:[3]})):l("",!0),v.value?(s(),i(_,{key:1,icon:"carbon-catalog",to:v.value,target:"_blank"},{default:m(()=>t[4]||(t[4]=[c(" Docs ")])),_:1,__:[4]},8,["to"])):l("",!0)])]),a("div",K,[n.value?(s(),p(x,{key:0},[a("div",P,[t[5]||(t[5]=a("span",{op50:""},"It has been referenced ",-1)),a("strong",Q,f(n.value),1),t[6]||(t[6]=a("span",{op50:""}," times by:",-1))]),a("div",R,[(s(!0),p(x,null,M(N.value,d=>(s(),i(V,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),p("div",X," Not in use via auto import. "))])])]),default:m(()=>[a("button",{"hover:text-primary":"",class:L([e.metadata&&!n.value?"op30 hover:op100":"",e.classes])},[a("code",O,[c(f(u.value)+" ",1),n.value&&e.counter?(s(),p("sup",T,"x"+f(n.value),1)):l("",!0)]),e.isDirective?(s(),p("sup",W,[a("abbr",Z,[b(w,{icon:"tabler:hexagon-letter-d"})])])):l("",!0)],2)]),_:1},8,["disabled"])}}});export{ne as _}; |
| import{a4 as $,ba as E,bb as N,bc as V,a6 as j,l as B,ag as k,bd as D,i as I,aa as L,r as P,n as S}from"./gk0e56xz.js";import{p as q,k as C,q as x,r as W,E as M,z as O,w as _,M as R,J as U,a3 as n,V as u,a4 as y,S as r,ab as w,aa as A,u as T,af as F,a5 as z}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as G}from"./launch-page.vue-ibwpr0ng.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";const h=new Map,J=q({__name:"IframeView",props:{tab:{}},setup(f){const m=f,c=$(),d=C(),i=x(()=>m.tab.name),e=C(),t=W(E(d));M(()=>{const o=m.tab.view,l=o.persistent!==!1,b=["clipboard-write","clipboard-read"];if(h.get(i.value)&&l)e.value=h.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",b.join("; ")),e.value.setAttribute("aria-label","Nuxt Devtools"),l&&h.set(i.value,e.value),e.value.src=o.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),s(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),O(p)}setTimeout(s,100)}),_(p),_(s),_(v),R(()=>{e.value&&(e.value.style.visibility="hidden")});function s(){if(!(!e.value||!e.value.contentWindow))try{const o=e.value.contentWindow.document.querySelector("html");o?.classList.toggle("dark",c.value==="dark"),o?.classList.toggle("light",c.value==="dark"),new MutationObserver(()=>{c.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(o,{attributes:!0,attributeFilter:["class"]})}catch{}}const a=N();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=a.value}catch{}}function p(){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(o,l)=>(n(),U("div",{ref_key:"anchor",ref:d,"h-full":"","w-full":""},null,512))}}),X={flex:"~ col gap2",mxa:"","items-center":""},H={"text-xl":""},K={"text-rose":""},ne=q({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,c=V(),d=j(),i=x(()=>m.name??c.params.name),e=B(),t=x(()=>e.value.find(s=>s.name===i.value));return M(()=>{t.value?t.value.requireAuth&&!k.value&&D():setTimeout(()=>{t.value||d.push("/modules/overview")},2e3)}),(s,a)=>{const v=I,p=L,o=J,l=G,b=S;return t.value?t.value.requireAuth&&!T(k)?(n(),u(p,{key:1})):t.value.view.type==="iframe"?(n(),u(o,{key:2,tab:t.value},null,8,["tab"])):t.value.view.type==="vnode"?(n(),u(F(t.value.view.vnode),{key:3})):t.value.view.type==="launch"?(n(),u(l,{key:4,name:`custom-${t.value.name}`,icon:t.value.view.icon||t.value.icon,title:t.value.view.title||t.value.title,description:t.value.view.description,actions:t.value.view.actions,onAction:a[0]||(a[0]=g=>T(P).customTabAction(t.value.name,g))},null,8,["name","icon","title","description","actions"])):(n(),u(v,{key:5},{default:y(()=>[z(b,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+A(t.value.view),1)]),_:1})]),_:1})):(n(),u(v,{key:0},{default:y(()=>[r("div",X,[a[3]||(a[3]=r("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1)),r("p",H,[a[1]||(a[1]=w(" Tab ")),r("code",K,A(i.value),1),a[2]||(a[2]=w(" not found "))]),a[4]||(a[4]=r("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1)),a[5]||(a[5]=r("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1))])]),_:1}))}}});export{ne as default}; |
| import{u as r,_ as c}from"./gk0e56xz.js";import{p as s,ai as i,ac as p,a3 as _,V as m}from"./vendor/json-editor-vue-m9gzt21j.js";const D=s({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(u){const t=r();return(o,e)=>{const n=c,a=i("tooltip");return p((_(),m(n,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=l=>t.value=o.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{D as _}; |
| import{_ as A}from"./nselect.vue-mubgmzer.js";import{u as E,c as F,a as W,_ as q}from"./gk0e56xz.js";import{_ as z}from"./nswitch.vue-bpoo3j7g.js";import{_ as J}from"./ndropdown.vue-pel467mt.js";import{_ as O}from"./ncode-block.vue-ctkw4rc7.js";import{_ as G}from"./ndrawer.vue-jkaykvna.js";import{A as h,d as x}from"./vendor/quicktype-core-dsrweb93.js";import{p as H,k,q as N,x as C,V as c,U as m,a3 as n,a5 as d,a4 as r,S as i,J as f,F as D,ag as S,u as _,aa as V,ae as K}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const M={border:"b base",flex:"~ items-center gap-2",sticky:"","left-0":"","right-0":"","top-0":"","z-1":"","bg-base":"",p3:""},P={key:0,flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--2":"","h-4":"","w-4":"","rounded-full":"","bg-lime:30":"","text-8px":""},Q={flex:"~ col","w-100":"","of-auto":"",py2:""},R={"text-xs":"",capitalize:"",op75:""},ie=H({__name:"DataSchemaDrawer",setup(X){const s=E(),b=k(0),l=k("TypeScript"),v=N(()=>h.all.find(e=>e.displayName===l.value)),o=k(v.value?.optionDefinitions.filter(e=>typeof e.defaultValue=="boolean")),y=F(async()=>{if(b.value,!s.value)return"";const e=x.jsonInputForTargetLanguage(l.value);await e.addSource({name:s.value.name??"Data",samples:[s.value.input]});const t=new x.InputData;return t.addInput(e),(await x.quicktype({inputData:t,lang:l.value,rendererOptions:o.value?.reduce((u,p)=>(u[p.name]=p.defaultValue,u),{})})).lines.join(` | ||
| `)}),j=N(()=>{const e=l.value.toLocaleLowerCase();return e.startsWith("javascript")?"javascript":e.startsWith("json")?"json":e.startsWith("typescript")?"typescript":e});C(o,()=>{b.value++},{deep:!0}),C(l,()=>{o.value=v.value?.optionDefinitions.filter(e=>typeof e.defaultValue=="boolean")});const $=W();function B(){$(y.value||"")}return(e,t)=>{const w=A,u=q,p=z,L=J,I=O,T=G;return v.value?(n(),c(K,{key:0,to:"body"},[d(T,{"model-value":!!_(s)?.input,"auto-close":"","max-w-screen":"","w-2xl":"","n-code-block":"",onClose:t[2]||(t[2]=a=>s.value=null)},{default:r(()=>[i("div",M,[t[3]||(t[3]=i("p",{"mr-2":""}," Schema ",-1)),d(w,{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=a=>l.value=a),n:"xs primary"},{default:r(()=>[(n(!0),f(D,null,S(_(h.all),a=>(n(),f("option",{key:a.displayName},V(a.displayName),1))),128))]),_:1},8,["modelValue"]),o.value?.length?(n(),c(L,{key:0,n:"sm lime"},{trigger:r(({click:a})=>[d(u,{icon:"carbon-settings","h-full":"",onClick:g=>a()},null,8,["onClick"]),o.value?(n(),f("span",P,V(o.value.length),1)):m("",!0)]),default:r(()=>[i("div",Q,[(n(!0),f(D,null,S(o.value,(a,g)=>(n(),c(p,{key:a.name,modelValue:o.value[g].defaultValue,"onUpdate:modelValue":U=>o.value[g].defaultValue=U,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:r(()=>[i("span",R,V(a.description),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):m("",!0),t[4]||(t[4]=i("div",{"flex-auto":""},null,-1)),d(u,{icon:"carbon-copy","mr-6":"","h-full":"",onClick:t[1]||(t[1]=a=>B())})]),_(y)?(n(),c(I,{key:0,lang:j.value,code:_(y)},null,8,["lang","code"])):m("",!0)]),_:1},8,["model-value"])])):m("",!0)}}});export{ie as default}; |
| import{_ as D}from"./nsection-block-msli0p3p.js";import{_ as H}from"./ncheckbox.vue-fi8jhway.js";import{g as M}from"./color-mt9xuhgy.js";import{_ as I}from"./nbadge-k88iypqm.js";import{p as V,q as S,V as y,a3 as l,a4 as d,ab as P,W as j,aa as k,X as z,k as p,J as u,F as x,S as t,a5 as s,U as B,ag as N,Z as E,u as $}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as W,p as O}from"./gk0e56xz.js";import{_ as q}from"./filepath-item.vue-gwnp998z.js";import{_ as J}from"./ncode-block.vue-ctkw4rc7.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const K=V({__name:"NBadgeHashed",props:{text:{}},setup(_){const i=_,c=S(()=>{const a=M(i.text,50,60),r=M(i.text,50,60,.05);return{color:a,background:r}});return(a,r)=>(l(),y(I,{style:z(c.value)},{default:d(()=>[P(k(a.text),1),j(a.$slots,"default")]),_:3},8,["style"]))}}),L={flex:"~ gap-2 col",mb4:""},X={flex:"~ gap-3 items-center"},Z={key:0,flex:"~ gap-1","items-center":"",p1:"",border:"~ base rounded"},A={"max-w-full":"","of-auto":""},G={"text-center":"",op50:""},Q={flex:"~",px4:""},Y={key:0,op50:""},ee={px2:"","text-center":""},te={"of-auto":""},oe=V({__name:"DebugModuleMutationRecords",props:{moduleMutationRecords:{}},setup(_){const i=_;function c(n){return n.startsWith("/")||n.match(/^[a-z]:[\\/]/i)}const a=p(!1),r=p(!1),v=p(!1),b=p(!1),w=p(!1),m=p(""),R=S(()=>{let n=i.moduleMutationRecords;return a.value||(n=n.filter(e=>!e.name.startsWith("nuxt:")&&e.name!=="@nuxt/devtools")),r.value||(n=n.filter(e=>e.keys.join(".")!=="build.templates")),v.value||(n=n.filter(e=>e.keys.join(".")!=="build.transpile")),b.value||(n=n.filter(e=>e.keys.join(".")!=="plugins")),w.value||(n=n.filter(e=>e.method||e.value!=="[]"&&e.value!=="{}")),m.value&&(n=n.filter(e=>e.name===m.value)),n});return(n,e)=>{const f=H,g=K,F=W,U=q,T=J;return l(),u(x,null,[t("div",L,[t("div",X,[s(f,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value=o),n:"primary"},{default:d(()=>e[6]||(e[6]=[t("span",{"ws-nowrap":"",op75:""},"Builtin Modules",-1)])),_:1,__:[6]},8,["modelValue"]),s(f,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=o=>r.value=o),n:"primary"},{default:d(()=>e[7]||(e[7]=[t("span",{"ws-nowrap":"",op75:""},"Templates",-1)])),_:1,__:[7]},8,["modelValue"]),s(f,{modelValue:v.value,"onUpdate:modelValue":e[2]||(e[2]=o=>v.value=o),n:"primary"},{default:d(()=>e[8]||(e[8]=[t("span",{"ws-nowrap":"",op75:""},"Transpile",-1)])),_:1,__:[8]},8,["modelValue"]),s(f,{modelValue:b.value,"onUpdate:modelValue":e[3]||(e[3]=o=>b.value=o),n:"primary"},{default:d(()=>e[9]||(e[9]=[t("span",{"ws-nowrap":"",op75:""},"Plugins",-1)])),_:1,__:[9]},8,["modelValue"]),s(f,{modelValue:w.value,"onUpdate:modelValue":e[4]||(e[4]=o=>w.value=o),n:"primary"},{default:d(()=>e[10]||(e[10]=[t("span",{"ws-nowrap":"",op75:""},"Empty Initial",-1)])),_:1,__:[10]},8,["modelValue"]),m.value?(l(),u("div",Z,[s(g,{"font-mono":"",text:m.value},null,8,["text"]),s(F,{icon:"carbon-close",border:!1,onClick:e[5]||(e[5]=o=>m.value="")})])):B("",!0)])]),t("table",A,[e[11]||(e[11]=t("thead",{border:"b base"},[t("tr",null,[t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Index "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Module "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Key Path "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Method "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Value ")])],-1)),t("tbody",null,[(l(!0),u(x,null,N(R.value,o=>(l(),u("tr",{key:n.moduleMutationRecords.indexOf(o),border:"b dashed transparent hover:base"},[t("td",G,[t("div",null,k(n.moduleMutationRecords.indexOf(o)+1),1)]),t("td",null,[o.name&&c(o.name)?(l(),y(U,{key:0,filepath:o.name},null,8,["filepath"])):(l(),y(g,{key:1,role:"button","font-mono":"",text:o.name,onClick:h=>m.value=o.name},null,8,["text","onClick"]))]),t("td",null,[t("code",Q,[(l(!0),u(x,null,N(o.keys,(h,C)=>(l(),u(x,{key:C},[t("span",null,k(h),1),C<o.keys.length-1?(l(),u("span",Y," . ")):B("",!0)],64))),128))])]),t("td",ee,[s(g,{"font-mono":"",text:o.method||"=",class:E(o.method?"":"saturate-0")},null,8,["text","class"])]),t("td",te,[s(T,{code:String(o.value),lang:"ts","grammar-context-code":"let a = ","ws-normal":"","break-all":"",py1:"",lines:!1,inline:!0},null,8,["code"])])]))),128))])])],64)}}}),ne={key:0,p6:""},le={key:1},ve=V({__name:"debug",setup(_){const i=O();return(c,a)=>{const r=D;return $(i)?(l(),u("div",le,[s(r,{icon:"carbon-container-image-push-pull",text:"Module Mutation Records",description:"Records of module mutations to nuxt options"},{default:d(()=>[s(oe,{"module-mutation-records":$(i).moduleMutationRecords||[]},null,8,["module-mutation-records"])]),_:1})])):(l(),u("div",ne,a[0]||(a[0]=[t("div",null,"No Debug Context Found",-1),t("div",null,"Set `debug: true` in your nuxt.config.ts to enable this panel",-1)])))}}});export{ve as default}; |
| import{b as o}from"./gk0e56xz.js";import{J as t,a3 as s,S as r,W as a}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const n={},c={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function d(e,f){return s(),t("div",c,[r("div",l,[a(e.$slots,"default")])])}const u=o(n,[["render",d]]);export{u as default}; |
| import{b as a,d as i,e as u}from"./gk0e56xz.js";import{J as c,a3 as l,S as e,aa as r,a5 as d,a4 as p,ab as f}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const m={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},g={class:"max-w-520px text-center z-20"},b=["textContent"],h=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return i({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,o)=>{const s=u;return l(),c("div",m,[o[0]||(o[0]=e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),e("div",g,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:r(t.statusCode)},null,8,b),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:r(t.description)},null,8,h),e("div",x,[d(s,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:p(()=>[f(r(t.backHome),1)]),_:1})])])])}}},N=a(y,[["__scopeId","data-v-13ebe6ca"]]);export{N as default}; |
| .spotlight[data-v-13ebe6ca]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-13ebe6ca]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-13ebe6ca]{background-color:#ffffff4d}.gradient-border[data-v-13ebe6ca]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-13ebe6ca]{background-color:#1414144d}.gradient-border[data-v-13ebe6ca]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-13ebe6ca]:before{background-size:400% auto;border-radius:.5rem;content:"";inset:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-13ebe6ca]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-13ebe6ca]{position:fixed}.left-0[data-v-13ebe6ca]{left:0}.right-0[data-v-13ebe6ca]{right:0}.z-10[data-v-13ebe6ca]{z-index:10}.z-20[data-v-13ebe6ca]{z-index:20}.grid[data-v-13ebe6ca]{display:grid}.mb-16[data-v-13ebe6ca]{margin-bottom:4rem}.mb-8[data-v-13ebe6ca]{margin-bottom:2rem}.max-w-520px[data-v-13ebe6ca]{max-width:520px}.min-h-screen[data-v-13ebe6ca]{min-height:100vh}.w-full[data-v-13ebe6ca]{width:100%}.flex[data-v-13ebe6ca]{display:flex}.cursor-pointer[data-v-13ebe6ca]{cursor:pointer}.place-content-center[data-v-13ebe6ca]{place-content:center}.items-center[data-v-13ebe6ca]{align-items:center}.justify-center[data-v-13ebe6ca]{justify-content:center}.overflow-hidden[data-v-13ebe6ca]{overflow:hidden}.bg-white[data-v-13ebe6ca]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-13ebe6ca]{padding-left:1rem;padding-right:1rem}.px-8[data-v-13ebe6ca]{padding-left:2rem;padding-right:2rem}.py-2[data-v-13ebe6ca]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-13ebe6ca]{text-align:center}.text-8xl[data-v-13ebe6ca]{font-size:6rem;line-height:1}.text-xl[data-v-13ebe6ca]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-13ebe6ca]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-13ebe6ca]{font-weight:300}.font-medium[data-v-13ebe6ca]{font-weight:500}.leading-tight[data-v-13ebe6ca]{line-height:1.25}.font-sans[data-v-13ebe6ca]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-13ebe6ca]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-13ebe6ca]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-13ebe6ca]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-13ebe6ca]{padding-left:0;padding-right:0}.sm\:px-6[data-v-13ebe6ca]{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3[data-v-13ebe6ca]{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-4xl[data-v-13ebe6ca]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-13ebe6ca]{font-size:1.25rem;line-height:1.75rem}} |
| import{b as s,d as a}from"./gk0e56xz.js";import{J as i,a3 as u,S as e,aa as o}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return a({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,n)=>(u(),i("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.statusCode)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},y=s(f,[["__scopeId","data-v-db6fcb7c"]]);export{y as default}; |
| .spotlight[data-v-db6fcb7c]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-db6fcb7c]{position:fixed}.-bottom-1\/2[data-v-db6fcb7c]{bottom:-50%}.left-0[data-v-db6fcb7c]{left:0}.right-0[data-v-db6fcb7c]{right:0}.grid[data-v-db6fcb7c]{display:grid}.mb-16[data-v-db6fcb7c]{margin-bottom:4rem}.mb-8[data-v-db6fcb7c]{margin-bottom:2rem}.h-1\/2[data-v-db6fcb7c]{height:50%}.max-w-520px[data-v-db6fcb7c]{max-width:520px}.min-h-screen[data-v-db6fcb7c]{min-height:100vh}.place-content-center[data-v-db6fcb7c]{place-content:center}.overflow-hidden[data-v-db6fcb7c]{overflow:hidden}.bg-white[data-v-db6fcb7c]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-db6fcb7c]{padding-left:2rem;padding-right:2rem}.text-center[data-v-db6fcb7c]{text-align:center}.text-8xl[data-v-db6fcb7c]{font-size:6rem;line-height:1}.text-xl[data-v-db6fcb7c]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-db6fcb7c]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-db6fcb7c]{font-weight:300}.font-medium[data-v-db6fcb7c]{font-weight:500}.leading-tight[data-v-db6fcb7c]{line-height:1.25}.font-sans[data-v-db6fcb7c]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-db6fcb7c]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-db6fcb7c]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-db6fcb7c]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-db6fcb7c]{padding-left:0;padding-right:0}.sm\:text-4xl[data-v-db6fcb7c]{font-size:2.25rem;line-height:2.5rem}} |
| import{f as E,q as x}from"./gk0e56xz.js";import{_ as N}from"./stacktrace-list.vue-msyjkhr0.js";import{p as y,q as _,J as l,a3 as i,a5 as C,S as f,U as v,a4 as S,ab as w,aa as p,V as $}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./filepath-item.vue-gwnp998z.js";const O=/(^|@)\S+:\d+/,h=/^\s*at .*(\S+:\d+|\(native\))/m,R=/^(eval@)?(\[native code\])?$/;function b(e,a){if(typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u")return T(e);if(e.stack&&e.stack.match(h))return F(e);if(e.stack)return V(e);throw new Error("Cannot parse given Error object")}function m(e){if(!e.includes(":"))return[e,void 0,void 0];const o=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[o[1],o[2]||void 0,o[3]||void 0]}function d(e,a){return e}function F(e,a){return I(e.stack)}function I(e,a){return d(e.split(` | ||
| `).filter(t=>!!t.match(h))).map(t=>{t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let r=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;const c=m(n?n[1]:r),s=n&&r||void 0,u=["eval","<anonymous>"].includes(c[0])?void 0:c[0];return{function:s,file:u,line:c[1]?+c[1]:void 0,col:c[2]?+c[2]:void 0,raw:t}})}function V(e,a){return A(e.stack)}function A(e,a){return d(e.split(` | ||
| `).filter(t=>!t.match(R))).map(t=>{if(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":"))return{function:t};{const r=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,n=t.match(r),c=n&&n[1]?n[1]:void 0,s=m(t.replace(r,""));return{function:c,file:s[0],line:s[1]?+s[1]:void 0,col:s[2]?+s[2]:void 0,raw:t}}})}function T(e,a){return!e.stacktrace||e.message.includes(` | ||
| `)&&e.message.split(` | ||
| `).length>e.stacktrace.split(` | ||
| `).length?P(e):e.stack?L(e):B(e)}function P(e,a){const o=/Line (\d+).*script (?:in )?(\S+)/i,t=e.message.split(` | ||
| `),r=[];for(let n=2,c=t.length;n<c;n+=2){const s=o.exec(t[n]);s&&r.push({file:s[2],line:+s[1],raw:t[n]})}return d(r)}function B(e,a){const o=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,t=e.stacktrace.split(` | ||
| `),r=[];for(let n=0,c=t.length;n<c;n+=2){const s=o.exec(t[n]);s&&r.push({function:s[3]||void 0,file:s[2],line:s[1]?+s[1]:void 0,raw:t[n]})}return d(r)}function L(e,a){return d(e.stack.split(` | ||
| `).filter(t=>!!t.match(O)&&!t.match(/^Error created at/))).map(t=>{const r=t.split("@"),n=m(r.pop()),c=r.shift()||"",s=c.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;let u;c.match(/\(([^)]*)\)/)&&(u=c.replace(/^[^(]+\(([^)]*)\)$/,"$1"));const k=u===void 0||u==="[arguments not available]"?void 0:u.split(",");return{function:s,args:k,file:n[0],line:n[1]?+n[1]:void 0,col:n[2]?+n[2]:void 0,raw:t}})}function X(e){return e.map(a=>({functionName:a.function,args:a.args,fileName:a.file,lineNumber:a.line,columnNumber:a.col,source:a.raw}))}function g(e,a){return X(b(e))}const D={p6:""},G={key:0},M={"text-6xl":""},q={key:0,op75:""},K={my4:"","text-xl":"","text-red":""},U={key:1,"of-auto":"",rounded:"","bg-active":"",p2:""},j=["textContent"],z={key:1,op50:""},ee=y({__name:"error",setup(e){const a=E(),o=_(()=>{const r=a.value?.nuxt?.payload?.error;return r&&(console.error("[Nuxt DevTools] Error in payload:"),console.error(r),console.error({...r})),r}),t=_(()=>{if(!o.value?.stack)return[];try{return o.value.stack.startsWith("<pre>")?g({stack:o.value.stack.replace(/<.*?>/g,"")}):g(o.value)}catch(r){return console.error(r),[]}});return(r,n)=>{const c=x,s=N;return i(),l("div",D,[o.value?(i(),l("div",G,[C(c,{n:"red",icon:"i-carbon-warning-alt-filled",mb5:""},{default:S(()=>n[0]||(n[0]=[w(" Error occurred in this page ")])),_:1,__:[0]}),f("div",M,p(o.value.statusCode||"Client Error"),1),o.value.statusMessage?(i(),l("div",q,p(o.value.statusMessage),1)):v("",!0),f("div",K,p(o.value.message||o.value.description||"Unknown error"),1),t.value.length||o.value.stack?(i(),l("div",U,[n[1]||(n[1]=f("div",{px1:"",op50:""}," Stacktrace ",-1)),t.value.length?(i(),$(s,{key:0,px2:"",stacktrace:t.value},null,8,["stacktrace"])):(i(),l("pre",{key:1,textContent:p(o.value.stack)},null,8,j))])):v("",!0)])):(i(),l("div",z," No error "))])}}});export{ee as default}; |
| import{w as k,a as c,A as g,a3 as b}from"./gk0e56xz.js";import{p as C,q as B,J as t,a3 as a,S as s,W as N,U as u,F as l,ab as d,aa as r,Z as S,u as m}from"./vendor/json-editor-vue-m9gzt21j.js";const w={flex:"~ gap-2 items-center",class:"group"},E=["title"],F={key:0,op50:""},I={key:0,flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},D=C({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(f){const p=f,v=k(),h=c(),i=g(),n=B(()=>p.filepath&&i.value?b(p.filepath,i.value.rootDir):{path:p.filepath||""});return(e,o)=>(a(),t("span",w,[s("span",{class:S([e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath},[e.override?(a(),t(l,{key:0},[d(r(e.override),1)],64)):n.value.moduleName?(a(),t(l,{key:1},[s("span",null,r(n.value.moduleName),1),e.subpath?(a(),t("span",F,r(n.value.path.slice(n.value.moduleName.length)),1)):u("",!0)],64)):(a(),t(l,{key:2},[d(r(n.value.path),1)],64))],10,E),N(e.$slots,"default"),e.filepath?(a(),t("div",I,[s("button",{"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:o[0]||(o[0]=y=>m(v)(e.filepath))},o[2]||(o[2]=[s("div",{"i-carbon-script-reference":""},null,-1)])),s("button",{"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:o[1]||(o[1]=y=>m(h)(e.filepath))},o[3]||(o[3]=[s("div",{"i-carbon-copy":""},null,-1)]))])):u("",!0)]))}});export{D as _}; |
| import{b as t}from"./gk0e56xz.js";import{J as e,a3 as r,W as s}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const a={},c={"h-full":"","of-auto":""};function n(o,f){return r(),e("div",c,[s(o.$slots,"default")])}const d=t(a,[["render",n]]);export{d as default}; |
Sorry, the diff of this file is too big to display
| import{g as f,_ as m}from"./gk0e56xz.js";import{p as v,k as c,J as o,U as s,u as k,a3 as a,F as g,S as r,a5 as l,H as u,a4 as i,W as _}from"./vendor/json-editor-vue-m9gzt21j.js";const x={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","h-full":"","w-150":"","overflow-auto":"","bg-base":"",px8:"",py4:""},y=v({__name:"HelpFab",setup(w){const t=c(!1),{showHelpButtons:p}=f("ui");return(d,e)=>{const b=m;return k(p)?(a(),o(g,{key:0},[r("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:e[0]||(e[0]=n=>t.value=!t.value)},e[3]||(e[3]=[r("div",{"i-ri:question-mark":""},null,-1)])),l(u,{name:"fade-in"},{default:i(()=>[t.value?(a(),o("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:e[1]||(e[1]=n=>t.value=!1)})):s("",!0)]),_:1}),l(u,{name:"slide-in"},{default:i(()=>[t.value?(a(),o("div",x,[_(d.$slots,"default"),l(b,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",border:!1,onClick:e[2]||(e[2]=n=>t.value=!1)})])):s("",!0)]),_:3})],64)):s("",!0)}}});export{y as _}; |
| import{_ as S}from"./duration-display.vue-mr4ha0rw.js";import{g as T}from"./color-mt9xuhgy.js";import{p as $,k as H,q as w,J as h,a3 as u,S as o,ab as l,Z as p,F as y,ag as F,aa as m,X as V,u as k,a5 as _,V as C,U as N,a4 as f}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as B}from"./nsection-block-msli0p3p.js";import{_ as D}from"./help-fab.vue-cws4yr5r.js";import{s as P,f as E}from"./gk0e56xz.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const O={"w-full":""},j={border:"b base"},L={"select-none":"","ws-nowrap":"",p1:"","text-right":"","font-bold":""},z={colspan:"2",p1:"",pl5:"","text-left":"","font-bold":""},A={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},U={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},Y={"ws-nowrap":"",p1:"","text-right":"","font-bold":""},q={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"",op25:""},J={"text-sm":""},R={"ws-nowrap":""},X={"text-sm":""},Z={"w-0":"","text-center":"","text-sm":""},G={"w-0":"","text-center":"","text-sm":""},K={"w-0":"","text-right":"","text-sm":""},M=$({__name:"HooksTable",props:{hooks:{}},setup(x){const a=x,r=H("duration"),n=H("asc"),d={duration:(e,t)=>(t.duration??Number.POSITIVE_INFINITY)-(e.duration??Number.POSITIVE_INFINITY),name:(e,t)=>e.name.localeCompare(t.name),listener:(e,t)=>t.listeners-e.listeners,start:(e,t)=>t.start-e.start,executions:(e,t)=>t.executions.length-e.executions.length},g=w(()=>a.hooks.map(e=>e.start).sort((e,t)=>e-t)),b=w(()=>{const e=d[r.value],t=[...a.hooks].sort(e);return n.value==="desc"&&t.reverse(),t});function c(e){const t=e.split(":");return t.length===1?"":`${t[0]}:`}function v(e){const t=e.split(":");return t.length===1?e:t.slice(1).join(":")}function i(e){r.value===e?n.value=n.value==="asc"?"desc":"asc":r.value=e}return(e,t)=>{const I=S;return u(),h("table",O,[o("thead",j,[o("tr",null,[o("th",L,[o("button",{onClick:t[0]||(t[0]=s=>i("start"))},[t[5]||(t[5]=l(" Order ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="start"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",z,[o("button",{onClick:t[1]||(t[1]=s=>i("name"))},[t[6]||(t[6]=l(" Hook name ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="name"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",A,[o("button",{onClick:t[2]||(t[2]=s=>i("listener"))},[t[7]||(t[7]=l(" Listeners ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="listener"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",U,[o("button",{onClick:t[3]||(t[3]=s=>i("executions"))},[t[8]||(t[8]=l(" Executions ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="executions"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",Y,[o("button",{onClick:t[4]||(t[4]=s=>i("duration"))},[t[9]||(t[9]=l(" Duration ")),o("div",{"ml--1":"","text-xs":"",class:p([r.value==="duration"?"op50":"op0",n.value==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])])])]),o("tbody",null,[(u(!0),h(y,null,F(b.value,s=>(u(),h("tr",{key:s.name,border:"b dashed transparent hover:base"},[o("td",q,m(g.value.indexOf(s.start)),1),o("td",{"w-0":"","ws-nowrap":"","text-right":"",style:V({color:("getHslColorFromStringHash"in e?e.getHslColorFromStringHash:k(T))(c(s.name))})},[o("code",J,m(c(s.name)),1)],4),o("td",R,[o("code",X,m(v(s.name)),1)]),o("td",Z,m(s.listeners),1),o("td",G,m(s.executions.length+1),1),o("td",K,[_(I,{duration:s.duration},null,8,["duration"])])]))),128))])])}}}),Q={class:"markdown-body"},W={__name:"hooks",setup(x,{expose:a}){return a({frontmatter:{}}),(n,d)=>(u(),h("div",Q,d[0]||(d[0]=[o("h1",null,"Hooks",-1),o("p",null,[l("Hooks are an advanced API which can be used for module development or other advanced use cases. The hooking API can be used to expand almost every aspect of Nuxt. Under the hood it is powered by "),o("a",{href:"https://github.com/unjs/hookable",target:"_blank",rel:"noopener"},"unjs/hookable"),l(".")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/hooks",target:"_blank",rel:"noopener"},"Learn more about hooks"),l(".")],-1)])))}},ut=$({__name:"hooks",setup(x){const a=P(),r=E(),n=w(()=>r.value?.metrics.clientHooks());return(d,g)=>{const b=M,c=B,v=W,i=D;return u(),h(y,null,[o("div",null,[n.value?.length?(u(),C(c,{key:0,icon:"carbon-ibm-cloud-direct-link-1-dedicated-hosting",text:"Client Hooks",description:`Total hooks: ${n.value.length}`,padding:"pl4 pr6"},{default:f(()=>[_(b,{hooks:n.value},null,8,["hooks"])]),_:1},8,["description"])):N("",!0),k(a)?.length?(u(),C(c,{key:1,icon:"carbon-ibm-cloud-direct-link-2-dedicated",text:"Server Hooks",description:`Total hooks: ${k(a)?.length}`,padding:"pl4 pr6"},{default:f(()=>[_(b,{hooks:k(a)},null,8,["hooks"])]),_:1},8,["description"])):N("",!0)]),_(i,null,{default:f(()=>[_(v)]),_:1})],64)}}});export{ut as default}; |
| import{V as A,W as S,X as T,A as j,S as P,Y as X,I as Y}from"./gk0e56xz.js";import{_ as q}from"./nselect-tabs.vue-lhto3nxq.js";import{_ as J}from"./nnavbar.vue-bqgn7lkr.js";import{_ as U}from"./filepath-item.vue-gwnp998z.js";import{_ as W}from"./composable-item.vue-cx3jl4ee.js";import{p as C,J as u,a3 as a,F as k,ag as M,a5 as c,S as i,V as w,U as x,u as f,q as _,aa as G,k as V,a4 as $}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as K}from"./nsection-block-msli0p3p.js";import{_ as O}from"./help-fab.vue-cws4yr5r.js";import{D as B}from"./constants-b32h69zq.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";import"./index-jc4yj4to.js";import"./nicon-title.vue-ejocqf9t.js";const Q={flex:"~ wrap gap2",p2:"",pl4:""},R=C({__name:"ComposableTree",props:{map:{},root:{},metadata:{}},setup(D){return(r,v)=>{const o=U,e=W;return a(),u("div",null,[(a(!0),u(k,null,M(r.map.entries(),([l,m])=>(a(),u("div",{key:l},[c(o,{filepath:l,op50:"","hover:underline":""},null,8,["filepath"]),i("div",Q,[(a(!0),u(k,null,M(m,g=>(a(),w(e,{key:g.as,item:g,metadata:r.metadata,"is-directive":g.meta?.vueDirective===!0,filepath:l.match(/^[\w@]/)?void 0:l},null,8,["item","metadata","is-directive","filepath"]))),128))])]))),128))])}}}),Z={key:0,flex:"~ col gap-2 items-start"},ee=C({__name:"HelpImportsDirs",setup(D){const r=A();return(v,o)=>{const e=U;return f(r)?.dirs?(a(),u("div",Z,[(a(!0),u(k,null,M(f(r).dirs,l=>(a(),w(e,{key:l,filepath:l,"text-primary":""},null,8,["filepath"]))),128))])):x("",!0)}}}),te={flex:"~ gap-2 wrap",mb6:""},oe=C({__name:"HelpImportsModules",setup(D){const r=A(),v=_(()=>[...new Set(r.value?.imports.map(o=>S(o.from)).filter(o=>!!o&&!T(o)))]);return(o,e)=>(a(),u("div",te,[(a(!0),u(k,null,M(v.value,l=>(a(),u("code",{key:l,rounded:"","bg-primary:5":"",p:"x2 y0.5","text-primary":""},G(l),1))),128))]))}}),se={class:"markdown-body"},ae={__name:"imports",setup(D,{expose:r}){return r({frontmatter:{}}),(o,e)=>{const l=ee,m=oe;return a(),u("div",se,[e[0]||(e[0]=i("h1",null,"Auto imports",-1)),e[1]||(e[1]=i("p",null,"Nuxt auto-imports helper functions, composables and Vue APIs to be used across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions.",-1)),e[2]||(e[2]=i("hr",null,null,-1)),e[3]||(e[3]=i("p",null,"According to your config, exports of files under the following folders will be registed as auto-imports entry:",-1)),c(l),e[4]||(e[4]=i("p",null,"Meanwhile, modules could also provide auto-imports for their own components. You have auto-imports from the following modules as well:",-1)),c(m),e[5]||(e[5]=i("hr",null,null,-1)),e[6]||(e[6]=i("p",null,[i("a",{href:"https://nuxt.com/docs/guide/concepts/auto-imports",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)),e[7]||(e[7]=i("h2",null,"Directives",-1)),e[8]||(e[8]=i("p",null,"Directives placed in the directives/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1)),e[9]||(e[9]=i("p",null,[i("a",{href:"https://nuxt.com/docs/guide/directory-structure/directives",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])}}},le={key:0,relative:"","h-full":"","of-auto":""},re={key:0,flex:"~ gap-2 items-center lt-sm:col lt-sm:items-start"},$e=C({__name:"imports",setup(D){const r=j(),v=V("all"),o=V("all"),e=V(""),l=A(),m=_(()=>l.value?.metadata),g=_(()=>l.value?.imports.filter(d=>d.as||d.name).sort((d,n)=>(d.as||d.name).localeCompare(n.as||n.name))||[]),z=_(()=>new P(g.value,{keys:["from","as","name"]})),s=_(()=>{const d=new Map,n=new Map,I=new Map;let p=e.value?z.value.search(e.value).map(t=>t.item):g.value;const N=o.value;N==="composables"?p=p.filter(t=>t.meta?.vueDirective!==!0):N==="directives"&&(p=p.filter(t=>t.meta?.vueDirective===!0)),v.value==="using"&&m.value?p=p.filter(t=>(t.as||t.name)in m.value.injectionUsage):v.value==="not-used"&&m.value&&(p=p.filter(t=>!((t.as||t.name)in m.value.injectionUsage)));const h={user:0,lib:0,builtin:0};return p.forEach(t=>{const b=X(t.from)?T(S(t.from))?I:n:d;b.has(t.from)||b.set(t.from,[]),b.get(t.from).push(t),h[b===d?"user":b===n?"lib":"builtin"]++}),{user:d,lib:n,builtin:I,count:h}}),F=_(()=>o.value==="directives"?`${s.value.count.user} directives from ${s.value.user.size} modules`:`${s.value.count.user} composables from ${s.value.user.size} modules`),E=_(()=>o.value==="directives"?`${s.value.count.builtin} directives`:`${s.value.count.builtin} composables`),H=_(()=>o.value==="directives"?`${s.value.count.lib} directives from ${s.value.lib.size} packages`:`${s.value.count.lib} composables from ${s.value.lib.size} packages`);return(d,n)=>{const I=Y,p=q,N=J,h=R,t=K,b=ae,L=O;return a(),u(k,null,[f(r)?(a(),u("div",le,[c(N,{search:e.value,"onUpdate:search":n[2]||(n[2]=y=>e.value=y),pb3:""},{default:$(()=>[m.value?(a(),u("div",re,[c(I,{icon:"carbon-filter",op50:""}),c(p,{modelValue:v.value,"onUpdate:modelValue":n[0]||(n[0]=y=>v.value=y),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"]),c(p,{modelValue:o.value,"onUpdate:modelValue":n[1]||(n[1]=y=>o.value=y),n:"primary sm",options:[{label:"All",value:"all"},{label:"Composables",value:"composables"},{label:"Directives",value:"directives"}]},null,8,["modelValue"])])):x("",!0)]),_:1},8,["search"]),s.value.user.size?(a(),w(t,{key:0,open:s.value.count.user<=f(B),icon:o.value==="directives"?"tabler:hexagon-letter-d":"carbon-function",text:`User ${o.value==="directives"?"directives":"composables"}`,description:F.value},{default:$(()=>[c(h,{map:s.value.user,root:f(r).rootDir,metadata:m.value},null,8,["map","root","metadata"])]),_:1},8,["open","icon","text","description"])):x("",!0),s.value.builtin.size?(a(),w(t,{key:1,open:s.value.count.builtin<=f(B),icon:"simple-icons-nuxtdotjs",text:`Built-in ${o.value==="directives"?"directives":"composables"}`,description:E.value},{default:$(()=>[c(h,{map:s.value.builtin,root:f(r).rootDir,metadata:m.value},null,8,["map","root","metadata"])]),_:1},8,["open","text","description"])):x("",!0),s.value.lib.size?(a(),w(t,{key:2,open:s.value.count.lib<=f(B),icon:"carbon-3d-mpr-toggle",text:`${o.value==="directives"?"Directives":"Composables"} from libraries`,description:H.value},{default:$(()=>[c(h,{map:s.value.lib,root:f(r).rootDir,metadata:m.value},null,8,["map","root","metadata"])]),_:1},8,["open","text","description"])):x("",!0)])):x("",!0),c(L,null,{default:$(()=>[c(b)]),_:1})],64)}}});export{$e as default}; |
| import{f as y,g,h as b,_ as k,i as N,t as h,j as w}from"./gk0e56xz.js";import{_ as V}from"./nlink.vue-gpbxgl1n.js";import{_ as C}from"./ncheckbox.vue-fi8jhway.js";import{p as B,k as L,V as u,a3 as m,a4 as o,S as t,a5 as n,U as T,ab as l,u as j}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const D={flex:"~ auto col gap3","items-center":"","justify-center":"","text-center":""},P={"max-w-190":"","text-lg":""},S={mb6:"",op50:""},E={p4:""},F={flex:"~ col gap-2",mxa:""},z=B({__name:"index",setup(G){const p=y(),s=L(!0),{showPanel:a}=g("ui");function _(){h.value=s.value,w.value=!1}function d(){a.value=!1,p.value.devtools.close()}return(U,e)=>{const f=b,r=V,i=k,x=C,v=N;return m(),u(v,{flex:"~ col",relative:"","h-screen":"","w-full":""},{default:o(()=>[t("div",D,[e[7]||(e[7]=t("p",{my2:"","text-3em":"","text-primary":"","font-bold":"","font-stylish":""}," 👋 Hi there, welcome to Nuxt DevTools! ",-1)),t("p",P,[n(f,{"mr-0.5":"","inline-block":"","h-5":"","translate-y--1.1":"","align-mid":""}),e[1]||(e[1]=l(" is a set of visual tools that help you to know your Nuxt app better, and enhance your development experience with Nuxt. Enjoy!")),e[2]||(e[2]=t("br",null,null,-1))]),t("p",S,[e[4]||(e[4]=l(" Learn more at ")),n(r,{href:"https://devtools.nuxt.com/",target:"_blank",rel:"noopener noreferrer",n:"primary"},{default:o(()=>e[3]||(e[3]=[l(" devtools.nuxt.com ")])),_:1,__:[3]})]),n(i,{to:"/modules/overview",n:"lg primary",onClick:_},{default:o(()=>e[5]||(e[5]=[t("span",null,"Get Started",-1)])),_:1,__:[5]}),j(a)!==!1?(m(),u(i,{key:0,n:"borderless orange",onClick:d},{default:o(()=>e[6]||(e[6]=[t("span",null,"Always hide the floating panel",-1)])),_:1,__:[6]})):T("",!0)]),t("div",E,[t("div",F,[n(x,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=c=>s.value=c),n:"green6"},{default:o(()=>[e[8]||(e[8]=t("span",{op50:""},"Send anonymous statistics, help us improving DevTools",-1)),n(r,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op35:"",textContent:"Learn more"})]),_:1,__:[8]},8,["modelValue"])])])]),_:1})}}});export{z as default}; |
| import{i as w,n as y,o as C,_ as B,I as V,M as $}from"./gk0e56xz.js";import{_ as v}from"./nmarkdown.vue-mk2gi3ky.js";import{p as I,V as a,a3 as t,a4 as o,a5 as c,S as i,U as m,aa as _,J as P,F,ag as L,a6 as M,ab as S}from"./vendor/json-editor-vue-m9gzt21j.js";const T={"text-xl":""},D={flex:"~ gap2 wrap"},j=I({__name:"LaunchPage",props:{name:{},icon:{},title:{},description:{},actions:{}},emits:["action"],setup(l,{emit:p}){const d=l,u=p;function f(e,s){$("launch-page",{pageName:d.name}),e.handle?.(),u("action",s)}return(e,s)=>{const g=C,k=v,b=V,h=B,N=y,x=w;return t(),a(x,null,{default:o(()=>[c(N,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:o(()=>[c(g,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),i("h1",T,_(e.title),1),e.description?(t(),a(k,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):m("",!0),i("div",D,[(t(!0),P(F,null,L(e.actions,(n,r)=>(t(),a(h,M({key:r,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},{ref_for:!0},n.attrs,{onClick:E=>f(n,r)}),{default:o(()=>[n.pending?(t(),a(b,{key:0,icon:"carbon-circle-dash","animate-spin":""})):m("",!0),S(" "+_(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{j as _}; |
| import{_ as oe}from"./filepath-item.vue-gwnp998z.js";import{w as Y,n as Z,e as L,I as G,Z as J,_ as F,r as q,E,M as ne,$ as Q,a0 as W,S as se,A as le,Q as ae,q as ie,a1 as re}from"./gk0e56xz.js";import{_ as ue,u as O,a as de}from"./state-modules-frp48q30.js";import{_ as me}from"./duration-display.vue-mr4ha0rw.js";import{p as D,q as I,V as C,a3 as t,a4 as u,S as e,W as T,J as m,U as g,ab as k,aa as b,u as j,Z as S,a5 as s,F as B,ag as A,an as pe,k as P,H}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as ce}from"./nsection-block-msli0p3p.js";import{_ as _e}from"./nicon-title.vue-ejocqf9t.js";import{_ as K}from"./ndropdown.vue-pel467mt.js";import{_ as fe}from"./ncheckbox.vue-fi8jhway.js";import{_ as ve}from"./nnavbar.vue-bqgn7lkr.js";import{_ as ge}from"./nbadge-k88iypqm.js";import{s as xe}from"./vue-virtual-scroller.esm-k5helfir.js";import{_ as be}from"./ncode-block.vue-ctkw4rc7.js";import{_ as ke}from"./nlink.vue-gpbxgl1n.js";import{_ as he}from"./code-diff.vue-e789bk3j.js";import{_ as ye}from"./help-fab.vue-cws4yr5r.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./client-oeqdl4pb.js";const $e={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},we={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},Ce={key:2},Ie={key:1,flex:"~ gap-2",title:"Documentation"},Me={key:2,flex:"~ gap-2"},Ne={key:0,flex:"~ gap-4 items-center"},Be={key:0,flex:"~ gap-2 items-center",op50:""},je={key:1,flex:"~ gap-2 items-center",op50:""},De={key:1},Pe={flex:"~ col","items-end":""},Ae={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},Te=["src","alt"],Se={key:1,"i-carbon-cube":"",ma:"","flex-none":"","text-4xl":"",op30:""},Fe={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},Ue=["src"],ze={flex:"","justify-end":""},Le="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Oe="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Ve="https://github.com/",qe="https://www.npmjs.com/package/",V=D({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(N){const v=N,a=I(()=>({...v.mod?.meta,...v.mod,...v.info})),{format:x}=Intl.NumberFormat(navigator.language||"en",{notation:"compact",maximumFractionDigits:1}),y=I(()=>x(a.value.stats?.stars||0)),l=I(()=>x(a.value.stats?.downloads||0)),r=Y();return(o,c)=>{const h=L,_=G,d=me,$=Z;return t(),C($,{p4:"",flex:"~ gap2"},{default:u(()=>[e("div",$e,[T(o.$slots,"main",{},()=>[e("div",we,[o.mod.isPackageModule?(t(),C(h,{key:0,to:qe+(a.value.npm||a.value.name),target:"_blank",hover:"underline text-primary"},{default:u(()=>[k(b(a.value.name),1)]),_:1},8,["to"])):o.mod.entryPath?(t(),m("button",{key:1,role:"button",hover:"underline text-primary",onClick:c[0]||(c[0]=f=>j(r)(o.mod.entryPath))},b(a.value.name),1)):(t(),m("span",Ce,b(a.value.name),1)),T(o.$slots,"badge")]),a.value.description?(t(),m("div",{key:0,class:S(o.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},b(a.value.description),3)):g("",!0),c[3]||(c[3]=e("div",{"flex-auto":""},null,-1)),a.value.website?(t(),m("div",Ie,[c[1]||(c[1]=e("span",{"i-carbon-link":"","flex-none":"","text-lg":"",op50:""},null,-1)),s(h,{to:a.value.website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:u(()=>[k(b(a.value.website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):g("",!0),a.value.github?(t(),m("div",Me,[c[2]||(c[2]=e("span",{"i-carbon-logo-github":"","flex-none":"","text-lg":"",op50:""},null,-1)),s(h,{to:a.value.github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:u(()=>[k(b(a.value.github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):g("",!0)]),T(o.$slots,"items"),a.value.stats?(t(),m("div",Ne,[a.value.stats.stars?(t(),m("div",Be,[s(_,{icon:"carbon-star","flex-none":"","text-lg":""}),e("span",null,b(y.value),1)])):g("",!0),a.value.stats.downloads?(t(),m("div",je,[s(_,{icon:"carbon-download","flex-none":"","text-lg":""}),e("span",null,b(l.value),1)])):g("",!0)])):g("",!0),o.mod.timings?.setup?(t(),m("div",De,[s(d,{title:"Module Setup Time",flex:"~ items-center",duration:o.mod.timings.setup,factor:.5},{before:u(()=>[s(_,{icon:"carbon-time",mr2:"","flex-none":"","text-lg":"",op50:""})]),_:1},8,["duration"])])):g("",!0)]),e("div",Pe,[a.value.icon||o.mod.isPackageModule?(t(),m("div",Ae,[a.value.icon?(t(),m("img",{key:0,src:Le+a.value.icon,alt:o.mod.name,ma:""},null,8,Te)):(t(),m("div",Se))])):g("",!0),a.value.maintainers?.length&&o.maintainers?(t(),m("div",Fe,[(t(!0),m(B,null,A(a.value.maintainers,f=>(t(),C(h,{key:f.name,target:"_blank",to:Ve+f.github,title:f.name},{default:u(()=>[e("img",{src:Oe+f.github,"h-6":"","w-6":"","rounded-full":""},null,8,Ue)]),_:2},1032,["to","title"]))),128))])):g("",!0),o.$slots.actions?(t(),m(B,{key:2},[c[4]||(c[4]=e("div",{"flex-auto":""},null,-1)),e("div",ze,[T(o.$slots,"actions")])],64)):g("",!0)])]),_:3})}}}),Ee={key:0,flex:"~ gap-2",title:"Open on filesystem"},He={key:1,"mx--2":""},Ye=["onClick"],Ze={key:2,"mx--2":""},Ge=["onClick"],Je={op50:""},Qe={"text-green":""},We={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ke={"text-sm":"",op50:""},Re=D({__name:"ModuleItem",props:{mod:{}},setup(N){const v=N,a=I(()=>v.mod.info),x=I(()=>({...v.mod?.meta,...v.mod,...a.value})),y=J();return(l,r)=>{const o=oe,c=L,h=ue,_=V;return t(),C(_,{mod:l.mod,info:a.value},{items:u(()=>[l.mod.entryPath?(t(),m("div",Ee,[r[0]||(r[0]=e("span",{"i-carbon-folder-move-to":"","flex-none":"","text-lg":"",op50:""},null,-1)),s(o,{filepath:l.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):g("",!0),x.value.npm?(t(),C(h,{key:x.value.npm,"package-name":x.value.npm,options:{dev:!0}},{default:u(({info:d,update:$,state:f,id:i,restart:n})=>[f==="running"?(t(),C(c,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:i?"/modules/terminals":void 0,onClick:w=>i?y.value=i:void 0},{default:u(()=>r[1]||(r[1]=[e("span",{"i-carbon-circle-dash":"","flex-none":"","animate-spin":"","text-lg":"",op50:""},null,-1),e("code",{"text-sm":"",op50:""},"Upgrading...",-1)])),_:2,__:[1]},1032,["to","onClick"])):f==="updated"?(t(),m("div",He,[e("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:n},r[2]||(r[2]=[e("span",{"i-carbon-intent-request-active":"","flex-none":"","text-lg":"","text-primary":""},null,-1),e("code",{"text-xs":""},"Update installed, click to restart",-1)]),8,Ye)])):d?.needsUpdate?(t(),m("div",Ze,[e("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:w=>$()},[r[3]||(r[3]=e("span",{"i-carbon-intent-request-upgrade":"","flex-none":"","text-lg":"",op50:""},null,-1)),e("code",Je,"v"+b(d.current),1),r[4]||(r[4]=e("div",{"i-carbon-arrow-right":"",op50:""},null,-1)),e("code",Qe,"v"+b(d.latest),1)],8,Ge)])):d?.latest?(t(),m("div",We,[r[5]||(r[5]=e("span",{"i-carbon-cube":"","flex-none":"","text-lg":"",op50:""},null,-1)),e("code",Ke,"v"+b(d.current),1)])):g("",!0)]),_:1},8,["package-name"])):g("",!0)]),_:1},8,["mod","info"])}}}),Xe=D({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(N,{emit:v}){const a=N,x=v,y=O(),l=I(()=>y.value.find(_=>_.name===a.item.npm)),r=I(()=>l.value&&l.value.isPackageModule),o=I(()=>l.value&&l.value.isPackageModule&&l.value.isUninstallable);async function c(_,d){const $=d==="install"?q.installNuxtModule:q.uninstallNuxtModule,f=await $(await E(),_.npm,!0);ne(`modules:${d}`,{moduleName:_.npm}),f.commands&&await Q.start(_,f,d)&&(W.value.push({name:_.npm,info:_,processId:f.processId}),x("start"),await $(await E(),_.npm,!1))}const h={};return(_,d)=>{const $=ge,f=F,i=K,n=V;return t(),C(n,{mod:h,role:r.value?"":"button",info:_.item,mb2:"","h-full":"",class:S(r.value?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:d[1]||(d[1]=w=>r.value?null:c(_.item,"install"))},pe({_:2},[r.value?{name:"badge",fn:u(()=>[s($,{n:"green",textContent:"Installed"}),o.value?(t(),C(i,{key:0,n:"sm green"},{trigger:u(({click:w})=>[s(f,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:p=>w()},null,8,["onClick"])]),default:u(()=>[s(f,{icon:"carbon-trash-can",n:"red",onClick:d[0]||(d[0]=w=>c(_.item,"uninstall"))},{default:u(()=>d[2]||(d[2]=[k(" Uninstall ")])),_:1,__:[2]})]),_:1})):g("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}}),et={"h-full":"",flex:"~ col gap-4"},tt={flex:"~ items-center"},ot={flex:"~ col","w-30":"","of-auto":""},nt={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},st={flex:"~ items-center gap-2"},lt={flex:"~ gap1","text-sm":"",op50:""},at={key:0},it={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},rt=D({__name:"ModuleInstallList",emits:["close"],setup(N,{emit:v}){const a=v,x=de(),y=O(),l=["downloads","stars","updated","created"],r=P(!1),o=P(l[0]),c=P(!0),h={downloads:(i,n)=>i.stats.downloads-n.stats.downloads,stars:(i,n)=>i.stats.stars-n.stats.stars,created:(i,n)=>i.stats.createdAt-n.stats.createdAt,updated:(i,n)=>i.stats.publishedAt-n.stats.publishedAt},_=I(()=>x.value?.toSorted((i,n)=>h[o.value](i,n)*(r.value?1:-1))),d=P(""),$=I(()=>new se(x.value||[],{keys:["name","description","npm","category"],sortFn:(i,n)=>{const w=x.value?.[i.idx],p=x.value?.[n.idx];return w&&p?h[o.value](w,p)*(r.value?1:-1):i.score-n.score},threshold:.2})),f=I(()=>{let i=_.value;return c.value&&(i=(i||[]).filter(n=>!y.value.some(w=>w.name===n.name))),d.value?$.value.search(d.value).map(n=>n.item).filter(n=>i?.includes(n)):i});return(i,n)=>{const w=_e,p=F,U=G,R=K,X=fe,ee=ve,te=Xe;return t(),m("div",et,[s(w,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),s(ee,{search:d.value,"onUpdate:search":n[2]||(n[2]=M=>d.value=M),"no-padding":"","px-6":"","pb-3":"","pt-2":""},{actions:u(()=>[s(R,{direction:"end",n:"sm primary"},{trigger:u(({click:M})=>[e("div",tt,[s(p,{icon:r.value?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:n[0]||(n[0]=z=>r.value=!r.value)},null,8,["icon"]),s(p,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:z=>M()},{default:u(()=>[k(b(o.value)+" ",1),s(U,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:u(()=>[e("div",ot,[(t(),m(B,null,A(l,M=>s(p,{key:M,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:z=>o.value=M},{default:u(()=>[e("span",nt,[k(b(M)+" ",1),o.value===M?(t(),C(U,{key:0,icon:"carbon:checkmark"})):g("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),default:u(()=>[e("div",st,[s(X,{modelValue:c.value,"onUpdate:modelValue":n[1]||(n[1]=M=>c.value=M),n:"primary md"},{default:u(()=>n[4]||(n[4]=[e("span",{op75:""},"Exclude installed modules",-1)])),_:1,__:[4]},8,["modelValue"]),e("div",lt,[d.value||c.value?(t(),m("span",at,b(f.value?.length)+" matched · ",1)):g("",!0),e("span",null,b(j(x)?.length)+" modules in total",1)])])]),_:1},8,["search"]),e("div",it,[s(j(xe),{class:"scroller",items:f.value,"item-size":200,"key-field":"name"},{default:u(({item:M})=>[s(te,{item:M,onStart:n[3]||(n[3]=z=>a("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),ut={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},dt={capitalize:""},mt={op50:""},pt={flex:"~ gap-3",mt2:"","justify-end":""},ct=D({__name:"ModuleActionDialog",setup(N){const v=le(),a=Y(),x={};return(y,l)=>{const r=V,o=be,c=ke,h=he,_=ie,d=F,$=ae;return t(),C(j(Q),null,{default:u(({resolve:f,args:i})=>[s($,{"model-value":!0,onClose:n=>f(!1)},{default:u(()=>[s(r,{mod:x,info:i[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),e("div",ut,[e("h2",{"text-xl":"",class:S(i[2]==="install"?"text-primary":"text-red")},[e("span",dt,b(i[2]),1),l[1]||(l[1]=k()),e("code",null,b(i[0].name),1),l[2]||(l[2]=k("? "))],2),l[7]||(l[7]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),s(o,{code:i[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),e("p",mt,[l[3]||(l[3]=k(" Then your ")),s(c,{role:"button",n:"primary",underline:"",onClick:l[0]||(l[0]=n=>j(a)(j(v)?._nuxtConfigFile)),textContent:"Nuxt config"}),l[4]||(l[4]=k(" will be updated as: "))]),s(h,{from:i[1].configOriginal,to:i[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),l[8]||(l[8]=e("p",null,[e("span",{op50:""},"After that, Nuxt will "),e("span",{"text-orange":""},"restart automatically"),k(". ")],-1)),e("div",pt,[s(_,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>l[5]||(l[5]=[k(" Please make sure to backup your project first. ")])),_:1,__:[5]}),s(d,{onClick:n=>f(!1)},{default:u(()=>l[6]||(l[6]=[k(" Cancel ")])),_:2,__:[6]},1032,["onClick"]),s(d,{n:"solid",capitalize:"",class:S(i[2]==="install"?"n-primary":"n-red"),onClick:n=>f(!0)},{default:u(()=>[k(b(i[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),_t={class:"markdown-body"},ft={__name:"modules",setup(N,{expose:v}){return v({frontmatter:{}}),(x,y)=>(t(),m("div",_t,y[0]||(y[0]=[e("h1",null,"Modules",-1),e("p",null,[k("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),e("code",null,"nuxt.config"),k(".")],-1),e("p",null,[k("You can explore the list of modules on "),e("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),k(" or install them directly inside the DevTools.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},vt={"h-full":"","w-full":"","of-auto":""},gt={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},xt=["src","alt"],bt={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},kt={op75:""},ht={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},yt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",qt=D({__name:"modules",setup(N){const v=P(!1),a=O(),x=J(),y=I(()=>a.value.filter(r=>r.isPackageModule)),l=I(()=>a.value.filter(r=>!r.isPackageModule));return re(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{v.value=!0}}]),(r,o)=>{const c=Re,h=Z,_=L,d=ce,$=F,f=rt,i=ct,n=ft,w=ye;return t(),m(B,null,[e("div",vt,[s(d,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${y.value.length}`},{default:u(()=>[(t(!0),m(B,null,A(y.value,p=>(t(),C(c,{key:p.name,mod:p},null,8,["mod"]))),128)),(t(!0),m(B,null,A("processInstallingModules"in r?r.processInstallingModules:j(W),p=>(t(),C(_,{key:p.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:U=>x.value=p.processId},{default:u(()=>[s(h,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:u(()=>[e("div",gt,[e("img",{src:yt+p.info.icon,alt:p.info.name,ma:""},null,8,xt),o[4]||(o[4]=e("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1))]),e("div",bt,[o[5]||(o[5]=e("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1)),e("span",kt,"Installing "+b(p.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),s(h,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:o[0]||(o[0]=p=>v.value=!0)},{default:u(()=>o[6]||(o[6]=[e("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),e("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1)])),_:1,__:[6]})]),_:1},8,["description"]),l.value.length?(t(),C(d,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${l.value.length}`},{default:u(()=>[(t(!0),m(B,null,A(l.value,p=>(t(),m(B,{key:p.meta?.name||p.entryPath},[p.meta?.name||p.entryPath?(t(),C(c,{key:0,mod:p},null,8,["mod"])):g("",!0)],64))),128))]),_:1},8,["description"])):g("",!0),s(H,{name:"fade-in"},{default:u(()=>[v.value?(t(),m("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:o[1]||(o[1]=p=>v.value=!1)})):g("",!0)]),_:1}),s(H,{name:"slide-in"},{default:u(()=>[v.value?(t(),m("div",ht,[s($,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:o[2]||(o[2]=p=>v.value=!1)}),s(f,{onClose:o[3]||(o[3]=p=>v.value=!1)})])):g("",!0)]),_:1}),s(i)]),s(w,null,{default:u(()=>[s(n)]),_:1})],64)}}});export{qt as default}; |
| import{b as o}from"./gk0e56xz.js";import{J as n,a3 as s,W as t}from"./vendor/json-editor-vue-m9gzt21j.js";const r={},c={class:"n-badge"};function _(e,a){return s(),n("span",c,[t(e.$slots,"default")])}const m=o(r,[["render",_]]);export{m as _}; |
| import{G as i,I as r}from"./gk0e56xz.js";import{p,J as b,a3 as u,ac as h,S as n,as as m,u as o,Y as k,j as f,a5 as v,W as _,Z as x}from"./vendor/json-editor-vue-m9gzt21j.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-transition n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base"},I=p({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=i(c,"modelValue",t,{passive:!0});return(a,s)=>{const d=r;return u(),b("label",{class:"n-checkbox select-none items-center hover:n-checkbox-hover n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[h(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>f(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=k(l=>e.value=!o(e),["enter"]))},null,40,y),[[m,o(e)]]),n("span",B,[v(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:x([o(e)?"":"op50","n-transition"])},[_(a.$slots,"default")],2)],8,V)}}});export{I as _}; |
| import{bh as n,a2 as b,_ as h}from"./gk0e56xz.js";import{p as g,k as y,V as v,a3 as l,a4 as k,J as B,U as C,a6 as i,u as o,a5 as V,S as _,W as $,H as w}from"./vendor/json-editor-vue-m9gzt21j.js";const x=["border"],N={relative:"","h-full":"","w-full":"","of-auto":""},T=g({__name:"NDrawer",props:{modelValue:{type:Boolean},top:{},left:{},autoClose:{type:Boolean},transition:{default:"right"}},emits:["close"],setup(m,{emit:c}){const e=m,f=c,a=y(),{height:u}=n(()=>e.top,void 0,{box:"border-box"}),s=typeof e.left=="string"&&e.left.startsWith("#")?document.querySelector(e.left)?.getBoundingClientRect().width:n(()=>e.left,void 0,{box:"border-box"}).width;b(a,()=>{e.modelValue&&e.autoClose&&f("close")},{ignore:["a","button","summary",'[role="dialog"]']});const d={right:{"enter-from-class":"transform translate-x-1/1","leave-to-class":"transform translate-x-1/1"},top:{"enter-from-class":"transform translate-y--1/1","leave-to-class":"transform translate-y--1/1"},bottom:{"enter-from-class":"transform translate-y-1/1","leave-to-class":"transform translate-y-1/1"}};return(t,r)=>{const p=h;return l(),v(w,i(d[t.transition],{"enter-active-class":"duration-200 ease-in","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100"}),{default:k(()=>[t.modelValue?(l(),B("div",i({key:0,ref_key:"el",ref:a,border:`${t.transition==="right"?"l":t.transition==="bottom"?"t":"b"} base`,flex:"~ col gap-1",class:{"right-0":t.transition==="right"||t.transition==="bottom"},absolute:"","bottom-0":"","z-10":"","z-20":"","of-auto":"","n-glass-effect":"","text-sm":"",style:{top:t.transition==="bottom"?"auto":`${o(u)}px`,left:t.transition==="right"&&!o(s)?"auto":`${o(s)}px`}},t.$attrs),[V(p,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",border:!1,onClick:r[0]||(r[0]=z=>t.$emit("close"))}),_("div",N,[$(t.$slots,"default")])],16,x)):C("",!0)]),_:3},16)}}});export{T as _}; |
| import{G as i,a2 as p,_ as u}from"./gk0e56xz.js";import{p as m,k as c,J as f,a3 as _,W as n,S as b,a5 as v,u as t,a4 as k,ab as V,Z as B}from"./vendor/json-editor-vue-m9gzt21j.js";const $=m({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=i(r,"modelValue",l,{passive:!0}),s=c();return p(s,()=>{e.value=!1}),(a,o)=>{const d=u;return _(),f("div",{ref_key:"el",ref:s,class:"relative"},[n(a.$slots,"trigger",{enabled:t(e),click:()=>e.value=!t(e)},()=>[v(d,{onClick:o[0]||(o[0]=g=>e.value=!t(e))},{default:k(()=>o[1]||(o[1]=[V(" Dropdown ")])),_:1,__:[1]})]),b("div",{class:B(["absolute z-10 border n-border-base rounded n-bg-base shadow n-transition",[t(e)?"op-100":"op0 pointer-events-none -translate-y-1",a.direction==="end"?"right-0":"left-0"]])},[n(a.$slots,"default")],2)],512)}}});export{$ as _}; |
| import{e as s}from"./gk0e56xz.js";import{p as l,q as i,V as p,a3 as r,a6 as u,a4 as c,W as m,J as _,U as k}from"./vendor/json-editor-vue-m9gzt21j.js";const d={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},v=l({__name:"NLink",props:{to:{},href:{},target:{},underline:{type:Boolean}},setup(a){const t=a,n=i(()=>t.href||t.to);return(e,f)=>{const o=s;return r(),p(o,u(n.value?{href:n.value,target:e.target,rel:e.target==="_blank"?"noopener noreferrer":null}:{},{class:{"n-link n-transition hover:n-link-hover n-link-base":n.value||e.underline}}),{default:c(()=>[m(e.$slots,"default"),n.value&&e.target==="_blank"?(r(),_("div",d)):k("",!0)]),_:3},16,["class"])}}});export{v as _}; |
| import{v as l}from"./gk0e56xz.js";import{p,J as i,a3 as s,Z as o,S as d,W as a,V as m,U as u}from"./vendor/json-editor-vue-m9gzt21j.js";const f={flex:"~ gap4 wrap","items-center":""},b=p({__name:"NNavbar",props:{search:{},noPadding:{type:Boolean}},emits:["update:search"],setup(h,{emit:n}){const r=n;function t(e){r("update:search",e.target.value)}return(e,v)=>{const c=l;return s(),i("div",{flex:"~ col gap2 wrap",border:"b base","n-navbar-glass":"","flex-1":"",class:o([{p4:!e.noPadding}])},[d("div",f,[a(e.$slots,"search",{},()=>[e.search!==void 0?(s(),m(c,{key:0,placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:o({"px-3 py-2":!e.noPadding}),value:e.search,onInput:t},null,8,["class","value"])):u("",!0)]),a(e.$slots,"actions")]),a(e.$slots,"default")],2)}}});export{b as _}; |
| import{b as o}from"./gk0e56xz.js";import{J as t,a3 as r,W as n}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.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}; |
| import{G as $,I as B,b as C}from"./gk0e56xz.js";import{_}from"./nicon-title.vue-ejocqf9t.js";import{p as b,J as l,a3 as n,F as u,S as s,U as p,Z as r,a5 as h,u as i,a4 as w,W as t,V as N,ab as c,aa as f,ac as k,ad as S}from"./vendor/json-editor-vue-m9gzt21j.js";const V=["open"],x={"text-base":""},I={key:0,"text-sm":"",op50:""},T=b({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(v){const a=$(v,"open",void 0,{passive:!0});function d(e){a.value=e.target.open}return(e,o)=>{const m=B,g=_;return n(),l(u,null,[s("details",{open:i(a),onToggle:o[0]||(o[0]=(...y)=>d&&d(...y))},[s("summary",{class:r(["cursor-pointer select-none p4 hover:bg-active",e.collapse?"":"pointer-events-none"])},[h(g,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:r([i(a)?"op100":"op60",e.headerClass])},{default:w(()=>[s("div",null,[s("div",x,[t(e.$slots,"text",{},()=>[c(f(e.text),1)],!0)]),e.description||e.$slots.description?(n(),l("div",I,[t(e.$slots,"description",{},()=>[c(f(e.description),1)],!0)])):p("",!0)]),o[1]||(o[1]=s("div",{class:"flex-auto"},null,-1)),t(e.$slots,"actions",{},void 0,!0),e.collapse?(n(),N(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):p("",!0)]),_:3,__:[1]},8,["icon","text","class"])],2),o._lazyshow1||i(a)?(o._lazyshow1=!0,n(),l(u,null,[k(s("div",{class:r(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[t(e.$slots,"details",{},void 0,!0),s("div",{class:r([e.containerClass,"mt1"])},[t(e.$slots,"default",{},void 0,!0)],2),t(e.$slots,"footer",{},void 0,!0)],2),[[S,i(a)]])],64)):p("v-show-if",!0)],40,V),o[2]||(o[2]=s("div",{class:"x-divider"},null,-1))],64)}}}),G=C(T,[["__scopeId","data-v-95ac5573"]]);export{G as _}; |
| import{p as m,J as l,a3 as t,F as c,ag as v,Z as r,u as o,S as d,ac as f,aa as _,aw as g,j as y}from"./vendor/json-editor-vue-m9gzt21j.js";import{G as V}from"./gk0e56xz.js";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},x=["disabled","title"],B=["disabled","value","title"],D=m({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(i,{emit:p}){const a=V(i,"modelValue",p,{passive:!0});return(s,n)=>(t(),l("fieldset",h,[(t(!0),l(c,null,v(s.options,(e,b)=>(t(),l("label",{key:e.label,disabled:s.disabled,class:r(["relative n-border-base px-0.5em py-0.1em hover:n-bg-active",[b?"border-l n-border-base ml--1px":"",e.value===o(a)?"n-bg-active":""]]),title:e.label},[d("div",{class:r([e.value===o(a)?"":"op35"])},_(e.label),3),f(d("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>y(a)?a.value=u:null),type:"radio",disabled:s.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,B),[[g,o(a)]])],10,x))),128))]))}});export{D as _}; |
| import{G as p,I as m}from"./gk0e56xz.js";import{p as f,J as l,a3 as s,Z as n,W as t,ac as b,V as h,U as d,aC as v,u as V,S as y,j as k,aa as B}from"./vendor/json-editor-vue-m9gzt21j.js";const S=["disabled"],g={key:0,value:"",disabled:"",hidden:""},$=f({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const o=p(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=m;return s(),l("div",{class:n(["n-select flex flex items-center border rounded n-bg-base px-2 py-1 focus-within:border-context focus-within:n-focus-base",e.disabled?"border-gray:10":"n-border-base"])},[t(e.$slots,"icon",{},()=>[e.icon?(s(),h(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):d("",!0)]),b(y("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>k(o)?o.value=u:null),disabled:e.disabled,class:n(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(s(),l("option",g,B(e.placeholder),1)):d("",!0),t(e.$slots,"default")],10,S),[[v,V(o)]])],2)}}});export{$ as _}; |
| import{at as oe,a as ae,w as H,n as J,_ as U,au as G,av as ne,aw as se,ax as re,b as ie,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"./gk0e56xz.js";import{_ as he}from"./nnavbar.vue-bqgn7lkr.js";import{_ as P}from"./nlink.vue-gpbxgl1n.js";import{_ as q}from"./nsection-block-msli0p3p.js";import{_ as _e}from"./ncode-block.vue-ctkw4rc7.js";import{p as N,q as C,k as I,V as A,U as y,a3 as t,a4 as h,S as e,J as n,F as S,ag as B,Z as O,aa as u,a5 as p,ab as $,u as g,X as L,am as fe,z as ve,ai as be,ac as D,Y as we}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as xe}from"./help-fab.vue-cws4yr5r.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";import"./client-oeqdl4pb.js";const K=[{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."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e={key:0,"x-divider":""},Te={key:1,"x-divider":""},Se={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ce={"w-full":"",p2:"",op75:""},Ne={key:1,m4:"",flex:"~ col gap-2"},Me={flex:"~ gap-1 wrap items-center"},Oe={key:1},Ae={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Ie=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(v){const s=v,l=C(()=>K.filter(d=>!s.tags?.some(o=>o.name===d.name))),a=C(()=>{let d={};const o={};l.value.forEach(m=>{m.seoMeta?Object.assign(o,m.seoMeta):d=oe(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(` | ||
| `)}),c=ae(),k=H(),b=["Missing Tags","Code Snippet"],_=I(b[0]);return(d,o)=>{const w=P,m=J,T=U,M=_e,R=q;return l.value.length?(t(),A(R,{key:0,text:"Missing Tags",description:`${l.value.length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:h(()=>[e("div",ye,[(t(),n(S,null,B(b,(r,i)=>e("button",{key:i,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(r===_.value?"":"border-b"),onClick:f=>_.value=r},[e("div",{class:O(r===_.value?"":"op30"),capitalize:""},u(r),3)],10,ke)),64)),o[3]||(o[3]=e("div",{border:"b base","flex-auto":""},null,-1))]),_.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,B(l.value,(r,i)=>(t(),n(S,{key:i},[i?(t(),n("div",$e)):y("",!0),i?(t(),n("div",Te)):y("",!0),e("div",Se,[o[4]||(o[4]=e("div",{"i-carbon-warning":"","text-orange":""},null,-1)),p(w,{"op-50":"",href:r.docs,target:"_blank",n:"orange"},{default:h(()=>[$(u(r.name),1)]),_:2},1032,["href"])]),e("div",Ce,u(r.description),1)],64))),128))]),_:1})):(t(),n("div",Ne,[e("p",Me,[p(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:o[0]||(o[0]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[5]||(o[5]=[$(" Copy ")])),_:1,__:[5]}),o[7]||(o[7]=$(" the following code snippet and paste it into your ")),d.matchedRouteFilepath?(t(),A(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:o[1]||(o[1]=r=>g(k)(d.matchedRouteFilepath))},{default:h(()=>o[6]||(o[6]=[$(" page component ")])),_:1,__:[6]})):(t(),n("span",Oe,"page component")),o[8]||(o[8]=$(" to full fill the missing tags. "))]),p(m,{relative:"","n-code-block":""},{default:h(()=>[p(M,{code:a.value,lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",Ae,[p(T,{icon:"carbon-copy",onClick:o[2]||(o[2]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[9]||(o[9]=[$(" Copy ")])),_:1,__:[9]})])]),_:1})]))]),_:1},8,["description"])):y("",!0)}}}),Be={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Le={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Re={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},ze={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]"},je={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=N({__name:"SocialFacebook",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Be,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Le,[e("div",Re,u(s.card.url),1),e("div",ze,[e("div",Fe,u(s.card.title),1),e("div",je,u(s.card.description),1)])])]))}}),Ve={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"}},Ee={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},He={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Je={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"},Ge=N({__name:"SocialTwitter",props:{tags:{}},setup(v){const s=v,l=C(()=>G(s.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"}]})),a=C(()=>l.value.image?s.tags.find(c=>c.tag==="meta"&&c.name==="twitter:card")?.value||"summary_large_image":"summary");return(c,k)=>(t(),n("div",Ve,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",a.value==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[a.value==="summary_large_image"?(t(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(l.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:L({backgroundImage:`url(${JSON.stringify(l.value.image)})`})},null,4)),e("div",Ee,[e("div",He,u(l.value.url),1),e("div",Je,u(l.value.title),1),e("div",Ue,u(l.value.description),1)])],2)]))}}),Pe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] bg-base shadow-md"},qe={class:"break-words p-[10px] antialiased"},Ke={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Ye={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},We={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Xe=N({__name:"SocialLinkedin",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Pe,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",qe,[e("div",Ke,[e("div",Ye,u(s.card.title),1),e("div",We,u(s.card.url),1)])])]))}}),Ze={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]"},Qe={class:"pl-[10px] pr-[8px]"},et={class:"text-[#3390ec] leading-normal underline"},tt={class:"quote w-full flex"},ot={class:"flex flex-col gap-1"},at={key:0,class:"my-[3px] overflow-hidden rounded"},nt=["src"],st={class:"cursor-pointer text-sm text-[#3390ec]"},rt={class:"cursor-pointer text-sm"},it={class:"cursor-pointer text-sm"},lt={class:"flex justify-end text-xs text-[#707579]"},ct=N({__name:"SocialTelegram",props:{card:{}},setup(v){const s=ne(),l=se(re(),"HH:mm");return(a,c)=>(t(),n("div",Ze,[e("div",Qe,[e("div",et,u(a.card.url),1),e("div",tt,[e("div",ot,[a.card.image?(t(),n("div",at,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,nt)])):y("",!0),e("div",st,[e("strong",null,u(g(s).hostname),1)]),e("div",rt,[e("strong",null,u(a.card.title),1)]),e("div",it,u(a.card.description),1)])]),e("div",lt,[e("span",null,u(g(l)),1)])]),c[0]||(c[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))]))}}),dt=ie(ct,[["__scopeId","data-v-4566448e"]]),pt={flex:"~ col","w-full":""},ut={flex:"~ wrap","w-full":"","flex-none":""},mt=["onClick"],gt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ht={key:0},_t={key:1},ft={key:2},vt={key:3},bt=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(v){const s=v,l=["twitter","facebook","linkedin","telegram"],a=le("nuxt-devtools-social-preview-tab",l[0]),c=C(()=>G(s.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(k,b)=>{const _=De,d=Ge,o=Xe,w=dt;return t(),n("div",pt,[e("div",ut,[(t(),n(S,null,B(l,(m,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(m===g(a)?"":"border-b"),onClick:M=>a.value=m},[e("div",{class:O(m===g(a)?"":"op30"),capitalize:""},u(m),3)],10,mt)),64)),b[0]||(b[0]=e("div",{border:"b base","flex-auto":""},null,-1))]),e("div",gt,[g(a)==="facebook"?(t(),n("div",ht,[p(_,{card:c.value},null,8,["card"])])):g(a)==="twitter"?(t(),n("div",_t,[p(d,{tags:k.tags},null,8,["tags"])])):g(a)==="linkedin"?(t(),n("div",ft,[p(o,{card:c.value},null,8,["card"])])):g(a)==="telegram"?(t(),n("div",vt,[p(w,{card:c.value},null,8,["card"])])):y("",!0)])])}}}),wt={class:"markdown-body"},xt={__name:"open-graph",setup(v,{expose:s}){return s({frontmatter:{}}),(a,c)=>(t(),n("div",wt,c[0]||(c[0]=[fe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6)])))}},yt={grid:"~ lg:cols-2","h-full":"","w-full":"","of-hidden":""},kt={"flex-auto":"","of-auto":""},$t={"flex-none":"",flex:"~ gap2 items-center"},Tt={flex:"~ col"},St={key:0,"x-divider":""},Ct={key:1,"x-divider":""},Nt={mr2:"",px4:"",py2:""},Vt=N({__name:"open-graph",setup(v){const s=I(0),l=ce(),a=de(async()=>(s.value,(await l.value?.resolveTags()).map(i=>{const f=i.props||{};return i.tag==="htmlAttrs"&&f.lang?{tag:"html",name:"lang",value:f.lang}:f.charset?{tag:"meta",name:"charset",value:f.charset}:{tag:i.tag,name:f.property??f.name??f.rel??i.tag,value:f.content??f.href??i.textContent??JSON.stringify(f)}})),[]),c=I(!0);function k(){s.value+=1}const b=pe(),_=ue(),d=I(""),o=me(),w=H();async function m(){d.value!==_.value.path&&b.value.push(d.value||"/")}const T=C(()=>d.value===_.value.path?[]:b.value.resolve(d.value||"/").matched),M=C(()=>{const r=o.value.find(i=>i.path===_.value?.matched?.[0]?.path);return r?.file||r?.meta?.file});function R(r){return K.find(i=>i.name===r.name)?.docs}return E(_).toBeTruthy().then(r=>{d.value=r.path}),E(b).toBeTruthy().then(r=>{r.afterEach(()=>{ve(()=>{d.value=_.value.path,setTimeout(k,200),setTimeout(k,800)})})}),(r,i)=>{const f=ge,z=U,Y=he,V=P,W=J,X=q,Z=Ie,Q=bt,ee=xt,te=xe,F=be("tooltip");return t(),n(S,null,[e("div",yt,[e("div",kt,[p(Y,null,{search:h(()=>[p(f,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=x=>d.value=x),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",g(_)?.path===d.value?"":T.value.length?"text-green":"text-orange"]),onKeydown:we(m,["enter"])},null,8,["modelValue","class"])]),actions:h(()=>[e("div",$t,[M.value?D((t(),A(z,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:i[1]||(i[1]=x=>g(w)(M.value))},null,512)),[[F,"Open file in editor"]]):y("",!0),D(p(z,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:k},null,512),[[F,"Refresh Data"]]),D(p(z,{"text-lg":"",border:!1,icon:c.value?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:i[2]||(i[2]=x=>c.value=!c.value)},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Tt,[p(X,{text:"Tags",icon:"carbon:tag-group"},{default:h(()=>[p(W,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,B(g(a),(x,j)=>(t(),n(S,{key:j},[j?(t(),n("div",St)):y("",!0),j?(t(),n("div",Ct)):y("",!0),e("div",Nt,[p(V,{op50:"",href:R(x),target:"_blank",n:"primary"},{default:h(()=>[$(u(x.name),1)]),_:2},1032,["href"])]),p(V,{href:String(x.value).match(/^https?:\/\//)?x.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:h(()=>[$(u(x.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),p(Z,{tags:g(a),"matched-route-filepath":M.value},null,8,["tags","matched-route-filepath"])])]),c.value&&g(a)?.length?(t(),A(Q,{key:0,tags:g(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):y("",!0)]),p(te,null,{default:h(()=>[p(ee)]),_:1})],64)}}});export{Vt as default}; |
| import{f as M,A as z,V as E,ab as O,ac as P,a6 as F,e as $,h as q,ad as g,ae as _,af as G,q as H,ag as K,_ as U,i as J,j as W,E as Q}from"./gk0e56xz.js";import{u as X,_ as Y}from"./state-modules-frp48q30.js";import{u as Z}from"./state-components-n8bsanko.js";import{p as h,q as A,V as v,a3 as s,a4 as n,J as p,u as o,S as e,a5 as i,aa as a,U as u,F as f,ab as l}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nbadge-k88iypqm.js";import"./ncode-block.vue-ctkw4rc7.js";import"./client-oeqdl4pb.js";import"./ncheckbox.vue-fi8jhway.js";const c="2.6.0",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":""},Vt=h({__name:"overview",setup(gt){const k=M(),m=z(),D=Z(),b=E(),V=X(),j=O(),y=P(),B=F();function I(){W.value=!0,B.push("/")}const w=A(()=>k.value?.nuxt.vueApp.version),r=A(()=>k.value?.metrics.loading());function L(){Q()}return(S,t)=>{const R=q,x=$,C=Y,N=H,d=U,T=J;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,__:[1]}),w.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(w.value),1)]),_:1,__:[2]})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(k)?(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(j).length,"page")),1)]),_:1,__:[3]})):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,__:[4]})):u("",!0),o(m)&&o(b)?(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(b).imports.length,"import")),1)]),_:1,__:[5]})):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(V).length,"module")),1)]),_:1,__:[6]})):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,__:[7]})):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(_)(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(_)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(_)(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(_)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(G)?(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,__:[13]})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in S?S.isDevAuthed:o(K))?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,__:[14]}))])]),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,__:[15]})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[20]||(t[20]=[l(" ⌘ Cmd ")])),_:1,__:[20]}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[21]||(t[21]=[l(" K ")])),_:1,__:[21]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[23]||(t[23]=[l(" Ctrl ")])),_:1,__:[23]}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[24]||(t[24]=[l(" K ")])),_:1,__:[24]})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette "))]),e("div",ft,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[28]||(t[28]=[l(" ⇧ Shift ")])),_:1,__:[28]}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[29]||(t[29]=[l(" ⌥ Option ")])),_:1,__:[29]}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[30]||(t[30]=[l(" D ")])),_:1,__:[30]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[33]||(t[33]=[l(" Shift ")])),_:1,__:[33]}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[34]||(t[34]=[l(" Alt ")])),_:1,__:[34]}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[35]||(t[35]=[l(" D ")])),_:1,__:[35]})],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{Vt as default}; |
| import{v as S,_ as H,w as J,x as F,a as Y,y as Z,z as G,A as Q,B as X,C as ee,D as te,r as oe,E as ne}from"./gk0e56xz.js";import{_ as j}from"./nbadge-k88iypqm.js";import{p as L,k as A,q as x,$ as ae,J as a,V as k,a3 as t,S as e,aa as C,a4 as $,F as g,ag as I,Z as M,al as se,U as N,a5 as _,ab as E,u as c,E as re,Y as le}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as z}from"./filepath-item.vue-gwnp998z.js";import{_ as ue}from"./nsection-block-msli0p3p.js";import{_ as ie}from"./launch-page.vue-ibwpr0ng.js";import{_ as pe}from"./help-fab.vue-cws4yr5r.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";const de={block:"","cursor-pointer":""},ce={p2:""},me=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},_e=L({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(P,{emit:i}){const v=P,R=i,m=A([]),f=x(()=>{const r=w(v.route.path);return m.value=Array.from({length:r.length},()=>""),r});function w(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const y=x(()=>f.value.map((r,d)=>r[0]===":"?m.value[d]:r).join("").replace(/\/+/g,"/")),o=x(()=>v.route.path.includes(":"));function s(){R("navigate",y.value)}return(r,d)=>{const h=S,n=H,l=ae("VDropdown");return o.value?(t(),k(l,{key:1},{popper:$(({hide:b})=>[e("div",ce,[e("form",{flex:"~ col",onSubmit:se(()=>{s(),b()},["prevent"])},[o.value?(t(),a(g,{key:0},[d[0]||(d[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),a(g,null,I(f.value,(u,p)=>(t(),a(g,{key:p},[u[0]===":"?(t(),k(h,{key:0,modelValue:m.value[p],"onUpdate:modelValue":B=>m.value[p]=B,"w-20":"","n-sm":"",placeholder:u.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),a("span",he,C(u),1))],64))),128))])],64)):N("",!0),_(n,{type:"submit",block:"",n:"primary"},{default:$(()=>d[1]||(d[1]=[E(" Navigate ")])),_:1,__:[1]})],40,me)])]),default:$(()=>[e("code",de,[(t(!0),a(g,null,I(f.value,(b,u)=>(t(),a("span",{key:u,class:M(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},C(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),a("button",{key:0,onClick:s},[e("code",null,C(r.route.path),1)]))}}}),fe={"max-w-full":"","of-auto":""},ge={"w-full":""},ye={"w-20":"","pr-1":""},be={flex:"","items-center":"","justify-end":""},xe={"text-sm":""},ke={flex:"inline gap3","items-center":""},we={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},$e=["onClick"],Ce=["onClick"],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ee=["onClick"],Ie=L({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(P){const i=P,v=J(),R=F(),m=Y(),f=x(()=>[...i.pages].sort((o,s)=>o.path.localeCompare(s.path)));function w(o){const s=i.layouts.find(r=>r.name===o);s&&v(s.file)}function y(o){if(typeof o=="string")return R.value?.middleware.find(s=>s.name===o)?.path}return(o,s)=>{const r=j,d=_e,h=z;return t(),a("div",fe,[e("table",ge,[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),a(g,null,I(f.value,n=>(t(),a("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ye,[e("div",be,[o.matched.find(l=>l.name===n.name)?(t(),k(r,{key:0,n:"green",title:"active",textContent:"active"})):o.matchedPending.find(l=>l.name===n.name)?(t(),k(r,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",xe,[e("div",ke,[_(d,{route:n,class:M(o.matched.find(l=>l.name===n.name)?"text-primary":o.matchedPending.find(l=>l.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=l=>o.$emit("navigate",l))},null,8,["route","class"]),e("div",we,[n.file||n.meta?.file?(t(),a("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>c(v)(n.file||n.meta?.file)},s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)]),8,$e)):N("",!0),n.file||n.meta?.file?(t(),a("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:l=>c(m)(n.file||n.meta?.file)},s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)]),8,Ce)):N("",!0)])])]),e("td",Ne,C(n.name),1),e("td",Re,[_(h,{filepath:y(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ve,[n.meta.layout===!1?(t(),a("span",Pe,"-")):n.meta.layout?(t(),a("button",{key:1,onClick:l=>w(n.meta.layout)},C(n.meta.layout),9,Ee)):(t(),a("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=l=>w("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te={__name:"pages",setup(P,{expose:i}){return i({frontmatter:{}}),(R,m)=>(t(),a("div",Be,m[0]||(m[0]=[e("h1",null,"Pages",-1),e("p",null,[E("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",null,"~/pages/"),E(" directory.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),e("hr",null,null,-1),e("h1",null,"Middlewares",-1),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.",-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Ae={key:0,"h-full":"","of-auto":""},Le={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},Me={"font-mono":""},De={key:1,op50:""},Se={key:0,"text-orange":"",op75:""},Fe={key:1,op50:""},je={"min-h-14":""},ze={key:1,class:"py-4 text-center"},Ue={"w-full":""},Ke={mr1:""},ot=L({__name:"pages",setup(P){const i=Z(),v=G(),R=Q(),m=F(),f=X(),w=ee(),y=x(()=>m.value?.middleware||[]),o=A(""),s=A(0),r=x(()=>(y.value,o.value,f.value,s.value,i.value?.currentRoute?.value?.path));re(()=>{v.value&&(o.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(u=>{o.value=u.fullPath}),i.value?.afterEach(u=>{o.value=u.fullPath})});async function d(){o.value!==i.value?.currentRoute?.value?.path&&i.value.push(o.value||"/")}const h=x(()=>i.value.resolve(o.value||"/").matched);function n(u){i.value.push(u),o.value=u}const l=te(),b=x(()=>`./${l===4?"app/":""}pages/index.vue`);return(u,p)=>{const B=S,D=Ie,T=ue,U=j,K=z,O=ie,W=Te,q=pe;return t(),a(g,null,[c(R)?.pages&&c(i)?(t(),a("div",Ae,[e("div",Le,[e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[1]||(p[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",Me,C(r.value),1),p[2]||(p[2]=e("span",{op50:""}," to ",-1))],64)):(t(),a("span",De,"Current route"))]),_(B,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=V=>o.value=V),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(r.value===o.value?"":h.value.length?"text-green":"text-orange"),onKeydown:le(d,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[3]||(p[3]=e("span",null,[E("Press "),e("b",{"font-bold":""},"Enter"),E(" to navigate")],-1)),h.value.length?N("",!0):(t(),a("span",Se," (no match)"))],64)):(t(),a("span",Fe,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:$(()=>[e("div",je,[h.value.length?(t(),k(D,{key:0,pages:h.value,layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),a("div",ze,p[4]||(p[4]=[e("span",{op50:""},"No routes matched",-1)])))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c(w).length} routes registered in your application`,padding:"pr5"},{default:$(()=>[_(D,{pages:c(w),layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),y.value.length?(t(),k(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${y.value.length} middleware registered in your application`,padding:"px13"},{default:$(()=>[e("table",Ue,[p[5]||(p[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),a(g,null,I(y.value,V=>(t(),a("tr",{key:V.path,"h-7":""},[e("td",null,[e("span",Ke,C(V.name),1),V.global?(t(),k(U,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(K,{filepath:V.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(t(),k(O,{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 u?u.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in u?u.ensureDevAuthToken:c(ne))(),"enablePages")}}]},null,8,["description","actions"])),_(q,null,{default:$(()=>[_(W)]),_:1})],64)}}});export{ot as default}; |
| import{_ as k}from"./state-editor.vue-mny7q3ds.js";import{p as x,J as i,a3 as e,F as $,ag as N,V as d,a4 as a,W as B,a6 as V,S as b,q as h,ai as w,U as _,a5 as o,u as F,ac as O,ab as E}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as P}from"./nsection-block-msli0p3p.js";import{f as R,_ as j}from"./gk0e56xz.js";import{_ as A}from"./help-fab.vue-cws4yr5r.js";import"./data-schema-button.vue-jylz9ayu.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=x({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(f){return(t,n)=>{const c=k;return e(),i("div",null,[t.state&&Object.keys(t.state).length>0?(e(),i("div",G,[(e(!0),i($,null,N(t.state,(s,r)=>(e(),d(c,{key:r,revision:t.revision,state:s,name:r.startsWith(t.prefix)?r.slice(t.prefix.length):r},{actions:a(l=>[B(t.$slots,"actions",V({ref_for:!0},l))]),_:2},1032,["revision","state","name"]))),128))])):(e(),i("div",H," No data "))])}}}),T={class:"markdown-body"},W={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(c,s)=>(e(),i("div",T,s[0]||(s[0]=[b("h1",null,"State & Async Data",-1),b("p",null,"// TODO",-1)])))}},q={key:0},tt=x({__name:"payload",setup(f){const t=R(),n=h(()=>t.value?.nuxt.payload),c=h(()=>t.value?.revision.value);async function s(r){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",r)}return(r,l)=>{const m=K,p=P,v=j,S=k,g=W,D=A,C=w("tooltip");return e(),i($,null,[F(t)?(e(),i("div",q,[o(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(m,{state:n.value.state,revision:c.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),o(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(v,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:l[0]||(l[0]=y=>s())},{default:a(()=>l[1]||(l[1]=[E(" Re-fetch all data ")])),_:1,__:[1]})]),default:a(()=>[o(m,{state:n.value.data,revision:c.value},{actions:a(({isOpen:y,name:u})=>[y&&u?O((e(),d(v,{key:0,title:`Re-fetch '${u}'`,icon:"carbon-recycle",border:!1,onClick:J=>s([u])},null,8,["title","onClick"])),[[C,`Re-fetch '${u}'`,void 0,{bottom:!0}]]):_("",!0)]),_:1},8,["state","revision"])]),_:1}),n.value.functions&&Object.keys(n.value.functions).length?(e(),d(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o(S,{"ml--6":"",state:n.value.functions,revision:c.value},null,8,["state","revision"])]),_:1})):_("",!0)])):_("",!0),o(D,null,{default:a(()=>[o(g)]),_:1})],64)}}});export{tt as default}; |
| import{F as r}from"./gk0e56xz.js";import{u as m,m as _}from"./vue-devtools-drxd0o75.js";import{p as c,J as p,a3 as e,V as o,u as n,a4 as i,ab as u}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./vue-virtual-scroller.esm-k5helfir.js";const l={class:"h-full w-full"},h=c({__name:"pinia",setup(f){const{connected:a}=m();return(d,t)=>{const s=r;return e(),p("div",l,[n(a)?(e(),o(n(_),{key:0})):(e(),o(s,{key:1},{default:i(()=>t[0]||(t[0]=[u(" Connecting.... ")])),_:1,__:[0]}))])}}});export{h as default}; |
| import{_ as T}from"./nbadge-k88iypqm.js";import{_ as w}from"./filepath-item.vue-gwnp998z.js";import{_ as k}from"./duration-display.vue-mr4ha0rw.js";import{A as D,a3 as B,I as V,b as I,x as F,f as H}from"./gk0e56xz.js";import{p as v,q as h,J as _,a3 as s,S as n,a5 as c,U as d,aa as C,a4 as f,V as p,$ as W,W as P,ab as x,F as b,ag as E,Z as A}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as L}from"./nsection-block-msli0p3p.js";import{_ as M}from"./help-fab.vue-cws4yr5r.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nicon-title.vue-ejocqf9t.js";const j={flex:"~ gap2","items-center":""},q={w8:"","text-right":"","text-sm":"",op25:""},z={key:0,"flex-auto":"","text-right":""},J=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(m){const e=m,r=D(),a=h(()=>B(e.plugin.src,r.value?.rootDir||"").path);return(t,l)=>{const o=T,u=w,i=k;return s(),_("div",j,[n("div",q,C(t.index),1),c(u,{filepath:e.plugin.src,subpath:!0},{default:f(()=>[n("div",null,[a.value.startsWith("#")?(s(),p(o,{key:0,n:"rose",textContent:"virtual"})):a.value.startsWith(".")?d("",!0):(s(),p(o,{key:1,n:"gray",textContent:"module"})),t.plugin.mode==="server"?(s(),p(o,{key:2,n:"teal",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(s(),p(o,{key:3,n:"orange",textContent:"client"})):d("",!0)])]),_:1},8,["filepath"]),t.plugin.metric?.duration!=null?(s(),_("div",z,[c(i,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),R={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},U={flex:"~ items-center gap-1","font-bold":""},Y=v({__name:"HelpTip",props:{title:{},icon:{}},setup(m){return(e,r)=>{const a=V,t=W("ContentSlot");return s(),_("div",R,[n("div",U,[e.icon?(s(),p(a,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),n("div",null,C(e.title),1)]),n("div",null,[P(e.$slots,"default",{},()=>[c(t,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Z={};function G(m,e){const r=Y;return s(),p(r,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:f(()=>[P(m.$slots,"default")]),_:3})}const K=I(Z,[["render",G]]),O={class:"markdown-body"},Q={__name:"plugins",setup(m,{expose:e}){return e({frontmatter:{}}),(a,t)=>{const l=K;return s(),_("div",O,[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",null,"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),c(l,null,{default:f(()=>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,__:[0]}),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))])}}},X={pt4:""},tt={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},pt=v({__name:"plugins",setup(m){const e=F(),r=H(),a=h(()=>{const l=e.value?.plugins||[],o=r.value?.metrics.clientPlugins()||[];return l.map(u=>{const i=typeof u=="string"?{src:u}:u;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),t=h(()=>{const l=r.value?.metrics.clientPlugins()||[],o=Math.min(...l.map(i=>i.start));return Math.max(...l.map(i=>i.end))-o});return(l,o)=>{const u=J,i=k,g=L,N=Q,S=M;return s(),_(b,null,[c(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${a.value.length}`},{default:f(()=>[n("div",X,[(s(!0),_(b,null,E(a.value,(y,$)=>(s(),p(u,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:A($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",tt,[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)),c(i,{duration:t.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),c(S,null,{default:f(()=>[c(N)]),_:1})],64)}}});export{pt as default}; |
| import{f as m,w as d,F as f}from"./gk0e56xz.js";import{u as c,f as _}from"./vue-devtools-drxd0o75.js";import{p as v,J as C,a3 as n,V as a,u as o,a4 as E,ab as I}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./vue-virtual-scroller.esm-k5helfir.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:l}=c(),t=m(),p=d();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return n(),C("div",k,[o(l)?(n(),a(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(),a(i,{key:1},{default:E(()=>e[2]||(e[2]=[I(" Connecting.... ")])),_:1,__:[2]}))])}}});export{N as default}; |
| import{_ as x}from"./state-editor.vue-mny7q3ds.js";import{_ as b}from"./nsection-block-msli0p3p.js";import{J as u,a3 as l,S as o,ab as d,p as y,q as c,U as C,a5 as e,u as f,a4 as a,F as k}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as w}from"./help-fab.vue-cws4yr5r.js";import{f as N,bk as R}from"./gk0e56xz.js";import"./data-schema-button.vue-jylz9ayu.js";import"./nicon-title.vue-ejocqf9t.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const T={class:"markdown-body"},B={__name:"runtime-configs",setup(_,{expose:t}){return t({frontmatter:{}}),(m,n)=>(l(),u("div",T,n[0]||(n[0]=[o("h1",null,"Runtime Configs",-1),o("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.",-1),o("p",null,[d("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 "),o("code",null,"nuxt.config.js"),d(" file, or check more details in the documentation.")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},S={key:0},H=y({__name:"runtime-configs",setup(_){const t=N(),p=R(),m=c(()=>t.value?.nuxt.payload),n=c(()=>t.value?.revision.value),g=c(()=>{const i={...p.value};return delete i.public,delete i.app,i});return(i,V)=>{const s=x,r=b,v=B,h=w;return l(),u(k,null,[f(t)?(l(),u("div",S,[e(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[e(s,{state:f(t).app.appConfig,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[e(s,{state:m.value.config?.public,revision:n.value},null,8,["state","revision"])]),_:1}),e(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:a(()=>[e(s,{state:g.value,revision:n.value,readonly:""},null,8,["state","revision"])]),_:1})])):C("",!0),e(h,null,{default:a(()=>[e(v)]),_:1})],64)}}});export{H as default}; |
| import{b6 as S,r as k,E as M,bl as P}from"./gk0e56xz.js";import{p as A,aD as R,E as L,M as C,J as U,a3 as T,u as x}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.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 Z=["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,Z))}});export{ee as default}; |
| import{_ as j}from"./ncheckbox.vue-fi8jhway.js";import{G as O,_ as R,v as T,I as A}from"./gk0e56xz.js";import{_ as E}from"./nselect.vue-mubgmzer.js";import{p as L,q as N,x as q,J as u,a3 as s,U as b,W as m,F as c,ag as h,u as r,a5 as y,S as C,V as p,a4 as V,ab as S,Z as v,aa as z}from"./vendor/json-editor-vue-m9gzt21j.js";const G={p4:"",flex:"~ col gap-4"},J={key:1,ml2:"",flex:""},K=["value"],M={key:0,flex:"","gap-4":""},X=L({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(U,{emit:w}){const g=U,d=O(g,"modelValue",w,{passive:!0}),$=N(()=>[...g.keys,"active","key","value","type"]),B=N(()=>{const l={};for(const e of $.value)l[e]=g.default[e]||"";return l}),I=["string","number","boolean","file","date","time","datetime-local"];function D(l,e){const t=e.target;if(t.files&&t.files[0]){const i=t.files[0],f=new FileReader;f.readAsDataURL(i),f.onload=()=>{d.value[l].value=f.result}}}return q(()=>d,l=>{l.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type==="boolean"&&typeof e.value!="boolean"?e.value=!0:e.type==="file"&&typeof e.value!="object"?e.value="":e.type==="date"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(l,e)=>{const t=j,i=T,f=E,F=A,_=R;return s(),u("div",G,[(s(!0),u(c,null,h(r(d),(a,k)=>(s(),u("div",{key:k,flex:"~ gap-2","justify-around":""},[m(l.$slots,"input",{item:a}),(s(!0),u(c,null,h($.value,n=>(s(),u(c,{key:n},[a.type!==null&&n==="active"?(s(),p(t,{key:0,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,n:"sm primary",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):b("",!0),a.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),u(c,{key:2},[a.type==="file"?(s(),p(i,{key:0,type:"file",disabled:l.disabled,class:v(l.disabled?"op75":""),onChange:o=>D(k,o)},null,8,["disabled","class","onChange"])):a.type==="boolean"?(s(),u("div",J,[y(t,{modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,placeholder:"Value",n:"green lg",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,type:a.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(f,{key:3,modelValue:a.type,"onUpdate:modelValue":o=>a.type=o,n:"sm green",class:v(l.disabled?"op75":""),disabled:l.disabled},{default:V(()=>[(s(),u(c,null,h(I,o=>C("option",{key:o,value:o},z(o),9,K)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):b("",!0)],64))),128)),m(l.$slots,"input-actions",{},()=>[y(_,{n:"red",disabled:l.disabled,class:v(l.disabled?"op0!":""),onClick:n=>r(d).splice(k,1)},{default:V(()=>[y(F,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),l.disabled?b("",!0):(s(),u("div",M,[m(l.$slots,"actions",{params:r(d)},()=>[y(_,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=a=>r(d).push({...B.value}))},{default:V(()=>e[2]||(e[2]=[S(" Add ")])),_:1,__:[2]}),e[4]||(e[4]=C("div",{"flex-auto":""},null,-1)),r(d).length?(s(),p(_,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=a=>r(d).splice(0,r(d).length))},{default:V(()=>e[3]||(e[3]=[S(" Remove All ")])),_:1,__:[3]})):b("",!0)])])),m(l.$slots,"default")])}}});export{X as _}; |
| import{be as $e,I as De,b4 as se,bf as Ke,b2 as Qe,a4 as Xe,A as Ye,f as Ze,w as et,g as Ee,ay as tt,b3 as ot,a as nt,_ as Re,v as at,i as Ve,F as lt,M as st,bg as rt,S as it,n as ut,a8 as dt}from"./gk0e56xz.js";import{_ as ct}from"./nnavbar.vue-bqgn7lkr.js";import{_ as je}from"./nbadge-k88iypqm.js";import{p as ye,k as P,J as k,a3 as r,S as u,W as pt,U as N,Z as M,V as D,aa as O,u as b,ab as K,X as ft,F as L,ag as H,D as me,x as Ie,b as Ue,C as vt,z as mt,r as ve,q as V,w as yt,ai as Oe,a5 as v,a4 as T,ac as Z,a6 as ht,av as gt,K as bt}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as _t}from"./nselect.vue-mubgmzer.js";import{_ as Ne}from"./server-route-inputs.vue-np6xo7ds.js";import{_ as kt}from"./code-snippets.vue-cxswwkh8.js";import{_ as wt}from"./data-schema-button.vue-jylz9ayu.js";import{_ as xt}from"./ncode-block.vue-ctkw4rc7.js";import{d as Ct}from"./vendor/unocss-oyl7opas.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-msli0p3p.js";import{_ as Tt}from"./ndrawer.vue-jkaykvna.js";import"./vendor/shiki-imfwxqoq.js";import"./ncheckbox.vue-fi8jhway.js";import"./client-oeqdl4pb.js";import"./nicon-title.vue-ejocqf9t.js";const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),n=$e();return(o,m)=>{const f=De,d=je,_=Pe;return r(),k("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:ft({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),D(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),D(d,{key:1,class:M(b(se)(o.item.method||"*")),textContent:O((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),D(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+O(o.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,H(o.item.routes,h=>(r(),D(_,{key:h.filepath,item:h,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function $t(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=s||{},m=o.decode||Dt;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let _=e.indexOf(";",f);if(_===-1)_=e.length;else if(_<d){f=e.lastIndexOf(";",d-1)+1;continue}const h=e.slice(f,d).trim();if(o?.filter&&!o?.filter(h)){f=_+1;continue}if(n[h]===void 0){let i=e.slice(d+1,_).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[h]=Et(i,m)}f=_+1}return n}function Dt(e){return e.includes("%")?decodeURIComponent(e):e}function Et(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,n){const o=n||{},m=o.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 d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const _=o.maxAge-0;if(Number.isNaN(_)||!Number.isFinite(_))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(_)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Rt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}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,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(s in e)e.hasOwnProperty(s)&&n[s]!==e[s]&&(n[s]=A(e[s]))}else{n={};for(s in e)s==="__proto__"?Object.defineProperty(n,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):n[s]=A(e[s])}return n}if(o==="[object Array]"){for(s=e.length,n=Array(s);s--;)n[s]=A(e[s]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(m){n.add(A(m))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(m,f){n.set(A(f),A(m))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(A(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ct(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=window.cookieStore;function jt(e,s){const n={...Vt,...s};n.filter??=i=>i===e;const o=Se(n)||{};let m;n.maxAge!==void 0?m=n.maxAge*1e3:n.expires&&(m=n.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,d=f||o[e]===void 0||o[e]===null,_=A(f?void 0:o[e]??n.default?.()),h=m&&!f?Ot(_,m,n.watch&&n.watch!=="shallow"):P(_);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const E=(w=!1)=>{!w&&(n.readonly||Ke(h.value,o[e]))||(Ut(e,h.value,n),o[e]=A(h.value),i?.postMessage({value:n.encode(h.value)}))},I=w=>{const y=w.refresh?Se(n)?.[e]:n.decode(w.value);B=!0,h.value=y,o[e]=A(y),mt(()=>{B=!1})};let B=!1;const J=!!Ue();if(J&&me(()=>{B=!0,E(),i?.close()}),le){const w=y=>{const U=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);U&&I({value:U.value}),g&&I({value:null})};le.addEventListener("change",w),J&&me(()=>le.removeEventListener("change",w))}else i&&(i.onmessage=({data:w})=>I(w));n.watch&&Ie(h,()=>{B||E()},{deep:n.watch!=="shallow"}),d&&E(d)}return h}function Se(e={}){return $t(document.cookie,e)}function It(e,s,n={}){return s==null?Ce(e,s,{...n,maxAge:-1}):Ce(e,s,n)}function Ut(e,s,n={}){document.cookie=It(e,s,n)}const Te=2147483647;function Ot(e,s,n){let o,m,f=0;const d=n?P(e):{value:e};return Ue()&&me(()=>{m?.(),clearTimeout(o)}),vt((_,h)=>{n&&(m=Ie(d,h));function i(){f=0,clearTimeout(o);const E=s-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<s)return i();d.value=void 0,h()},I)}return{get(){return _(),d.value},set(E){i(),d.value=E,h()}}})}const Nt={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},Pt={flex:"~ gap2 items-center"},At={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt={class:"hidden md:block"},Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Gt={key:2},Kt={key:3,border:"b base",relative:"","n-code-block":""},Qt={flex:"~ wrap","w-full":""},Xt=["onClick"],Yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Zt={key:1,"text-xs":"",op50:""},eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},ao={border:"~ base",rounded:""},lo=["src"],so={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const n=e,o=s,[m,f]=Qe(),d=Xe(),_=Ye(),h=Ze(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=V(()=>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=V(()=>{if(E.value==="json")return JSON.stringify(i.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),w=et(),y=V(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),U=V(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(n.route.method||"GET"),C=P({}),x=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"}]}),j=P({}),{inputDefaults:S,sendFrom:F}=Ee("serverRoutes"),Q=V(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=V(()=>ie.includes(g.value.toUpperCase())),c=P(),te=["input","json"],W=P(te[0]),ue=V({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=V(()=>({...G(S.value.query),...G(x.query)})),ge=V(()=>({...G(S.value.headers),...G(x.headers)})),de=V(()=>ee.value?W.value==="json"?{...G(S.value.body),...j.value}:{...G(S.value.body),...G(x.body)}:void 0),Ae=V(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=V(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&C.value[R]||R).join("")||"")+a;let p=_.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=V(()=>Ae.value+oe.value);function G(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:$})=>p&&R&&$!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;st("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:de.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 ke=V(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`, | ||
| `);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),p&&t.push(`headers: { | ||
| ${p} | ||
| }`),de.value&&t.push(`body: ${JSON.stringify(de.value,null,2)}`);const R=t.length?`, { | ||
| ${t.join(`, | ||
| `).split(` | ||
| `).map($=>` ${$}`).join(` | ||
| `)} | ||
| }`:"";return a.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${R})`}),a.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${R})`}),a}),X=P(qe()),z=ve({key:"",value:""}),Be=V(()=>{const a=[];return U.value.length&&a.push({name:"Params",slug:"params",length:U.value.length}),a.push({name:"Query",slug:"query",length:x.query.length}),ee.value&&a.push({name:"Body",slug:"body",length:x.body.length}),a.push({name:"Headers",slug:"headers",length:x.headers.length}),a.push({name:"Cookies",slug:"cookies",length:X.value.length}),a.push({name:"Snippets",slug:"snippet"}),a});function qe(){return document.cookie.split("; ").map(a=>{const[t,p]=a.split("=");return{key:t,value:p}}).filter(a=>a.key)}function ce(a,t){if(!a)return;const p=X.value.find($=>$.key===a),R=jt(a);p!==void 0?t===void 0&&(X.value=X.value.filter($=>$.key!==a)):(X.value.push({key:a,value:t}),z.key="",z.value=""),R.value=t}yt(()=>{W.value==="json"&&typeof j.value=="string"&&(j.value=JSON.parse(j.value))});const pe=tt("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});ot([x,c],()=>{const a=pe.value?.find(t=>t.path===n.route.filepath);if(a){c.value||(c.value=a.tab),a.tab!==c.value&&(a.tab=c.value);const{body:t,query:p,headers:R,params:$}=a.inputs;Object.assign(x,{body:t,query:p,headers:R}),C.value=$}else{const t={path:n.route.filepath,tab:U.value.length?"params":"query",inputs:{...x,...U.value.length?{params:C.value}:{}}};pe.value.push(t),c.value||(c.value=t.tab)}},{immediate:!0,deep:!0,debounce:500});function Me(){pe.value=[],x.body=[],x.query=[],x.headers=[],C.value={},c.value=U.value.length?"params":"query"}const Fe=nt();return(a,t)=>{const p=Re,R=_t,$=at,q=De,we=Ne,ze=kt,He=Ve,Je=lt,fe=je,We=wt,Ge=xt,ne=Oe("tooltip");return r(),k("div",Nt,[u("div",Lt,[u("div",Pt,[a.route.method?(r(),D(p,{key:0,class:M(["n-badge-base n-sm",b(se)(g.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:T(()=>[K(O(g.value.toUpperCase()),1)]),_:1},8,["class"])):(r(),D(R,{key:1,modelValue:g.value,"onUpdate:modelValue":t[0]||(t[0]=l=>g.value=l),class:M(["n-badge-base n-sm",b(se)(g.value)])},{default:T(()=>[(r(),k(L,null,H(re,l=>u("option",{key:l,class:M(b(se)(l))},O(l.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),u("div",At,[v($,{"model-value":oe.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),u("div",Bt,[Z(v(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:t[1]||(t[1]=l=>b(Fe)(be.value,"server-route-url"))},null,512),[[ne,"Copy URL"]]),Z(v(p,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:t[2]||(t[2]=l=>b(w)(a.route.filepath))},null,512),[[ne,"Open in Editor"]])])]),v(p,{"h-full":"",n:"primary solid",onClick:_e},{default:T(()=>[v(q,{icon:"carbon:send"})]),_:1})])]),u("div",qt,[(r(!0),k(L,null,H(Be.value,l=>Z((r(),D(p,{key:l.slug,class:M(c.value===l.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>c.value=l.slug},{default:T(()=>[v(q,{icon:b(Le)[l.slug]},null,8,["icon"]),u("div",Mt,[K(O(l.name)+" "+O(l?.length?`(${l.length})`:"")+" ",1),u("span",null,O(b(S)[l.slug]?.length?`(${b(S)[l.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ne,l.name]])),128)),t[12]||(t[12]=u("div",{"flex-auto":""},null,-1)),t[13]||(t[13]=u("div",{"text-xs":"",op50:""}," Send from ",-1)),v(R,{modelValue:Q.value,"onUpdate:modelValue":t[3]||(t[3]=l=>Q.value=l),class:"n-xs",disabled:!b(h)?.app?.$fetch},{default:T(()=>t[11]||(t[11]=[u("option",{value:"app"}," App ",-1),u("option",{value:"devtools"}," DevTools ",-1)])),_:1,__:[11]},8,["modelValue","disabled"]),Z(v(p,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Me},null,512),[[ne,"Clear Inputs Saved Cache"]])]),c.value==="params"?(r(),k("div",Ft,[(r(!0),k(L,null,H(U.value,l=>(r(),k(L,{key:l},[u("div",zt,O(l),1),v($,{modelValue:C.value[l],"onUpdate:modelValue":Y=>C.value[l]=Y,placeholder:l,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),c.value==="cookies"?(r(),k("div",Ht,[(r(!0),k(L,null,H(X.value,l=>(r(),k("div",{key:l.key,flex:"~ gap-4 items-center"},[v($,{placeholder:"Key...","model-value":l.key,disabled:"","op-70":""},null,8,["model-value"]),v($,{placeholder:"Value...","model-value":l.value,"flex-1":"",n:"primary",onInput:Y=>ce(l.key,Y.target?.value)},null,8,["model-value","onInput"]),v(p,{title:"Delete",n:"red",onClick:Y=>ce(l.key,void 0)},{default:T(()=>[v(q,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),u("div",Jt,[v($,{modelValue:z.key,"onUpdate:modelValue":t[4]||(t[4]=l=>z.key=l),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v($,{modelValue:z.value,"onUpdate:modelValue":t[5]||(t[5]=l=>z.value=l),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(p,{title:"Add",n:"primary",onClick:t[6]||(t[6]=l=>ce(z.key,z.value))},{default:T(()=>[v(q,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),v(b(m),null,{default:T(()=>[v(we,{modelValue:ue.value,"onUpdate:modelValue":t[9]||(t[9]=l=>ue.value=l),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:T(()=>[b(S)[c.value]?.length?(r(),k(L,{key:0},[u("div",Wt,[t[14]||(t[14]=u("div",{"w-5":"","x-divider":""},null,-1)),t[15]||(t[15]=u("div",{"flex-none":""}," Default Inputs ",-1)),v(p,{icon:"i-carbon-edit",border:!1,onClick:t[7]||(t[7]=l=>o("openDefaultInput"))}),t[16]||(t[16]=u("div",{"x-divider":""},null,-1))]),v(we,{modelValue:b(S)[c.value],"onUpdate:modelValue":t[8]||(t[8]=l=>b(S)[c.value]=l),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),c.value==="snippet"?(r(),k("div",Gt,[ke.value.length?(r(),D(ze,{key:0,"code-snippets":ke.value},null,8,["code-snippets"])):N("",!0)])):ue.value?(r(),k("div",Kt,[c.value==="body"?(r(),k(L,{key:0},[u("div",Qt,[(r(),k(L,null,H(te,l=>u("button",{key:l,px4:"",py2:"",border:"r base",hover:"bg-active",class:M({"border-b":l!==W.value}),onClick:Y=>W.value=l},[u("div",{class:M({op30:l!==W.value}),"font-mono":""},O(l),3)],10,Xt)),64)),t[17]||(t[17]=u("div",{border:"b base","flex-auto":""},null,-1))]),W.value==="input"?(r(),D(b(f),{key:0})):W.value==="json"?(r(),D(b(gt),ht({key:1,modelValue:j.value,"onUpdate:modelValue":t[10]||(t[10]=l=>j.value=l),class:[b(d)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},a.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(r(),D(b(f),{key:1}))])):N("",!0),J.value?B.value?(r(),D(Je,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:T(()=>t[19]||(t[19]=[K(" Fetching... ")])),_:1,__:[19]})):(r(),k(L,{key:6},[u("div",Yt,[t[21]||(t[21]=u("div",null,"Response",-1)),i.error?(r(),D(fe,{key:0,n:"red"},{default:T(()=>t[20]||(t[20]=[K(" Error ")])),_:1,__:[20]})):N("",!0),v(fe,{n:i.error?"orange":"green",textContent:O(i.statusCode)},null,8,["n","textContent"]),i.contentType?(r(),k("code",Zt,O(i.contentType),1)):N("",!0),i.contentType==="application/json"?(r(),D(We,{key:2,getter:()=>({input:I.value})},null,8,["getter"])):N("",!0),t[22]||(t[22]=u("div",{"flex-auto":""},null,-1)),t[23]||(t[23]=u("div",{op50:""}," Request finished in ",-1)),v(fe,{n:"green"},{default:T(()=>[K(O(i.fetchTime)+" ms ",1)]),_:1})]),E.value==="pdf"?(r(),k("div",eo,[u("div",to,[u("object",{data:I.value,type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,oo)])])):E.value!=="media"?(r(),D(Ge,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:I.value,lang:E.value},null,8,["code","lang"])):(r(),k("div",no,[u("div",ao,[i.contentType.includes("image")?(r(),k("img",{key:0,rounded:"",src:I.value},null,8,lo)):(r(),k("video",so,[u("source",{src:I.value,type:"video/mp4"},null,8,ro)]))])]))],64)):(r(),D(He,{key:4},{default:T(()=>[v(p,{n:"primary",onClick:_e},{default:T(()=>[v(q,{icon:"carbon:send"}),t[18]||(t[18]=K(" Send request "))]),_:1,__:[18]})]),_:1}))])}}}),uo={flex:"~ gap1","text-sm":""},co={key:0,op50:""},po={op50:""},Ro=ye({__name:"server-routes",setup(e){const s=P(!1),n=rt(),o=$e(),{selectedRoute:m,view:f,inputDefaults:d}=Ee("serverRoutes"),_=V(()=>{!o.value&&m.value&&(o.value=m.value.filepath);const w=n.value?.find(y=>y.filepath===o.value);return o.value!==m.value?.filepath&&w&&(m.value=w),w}),h=P(""),i=V(()=>new it(n.value||[],{keys:["method","route"],shouldSort:!0})),E=V(()=>n.value?h.value?i.value.search(h.value).map(y=>y.item):n.value:[]),I=V(()=>{const w=[],y=(g,C)=>{g.routes=g.routes||[],g.routes.push(C)},U=(g,C)=>{const x=C?C.routes?.find(S=>S.route===g):w.find(S=>S.route===g);if(x)return x;const j={route:g,filepath:g.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return C?y(C,j):w.push(j),j};return E.value.forEach(g=>{let C,x;const j=g.filepath.split("/"),S=j.slice(j.indexOf("server")+1);if(g.type==="runtime"){S[0]="runtime";const F=j.indexOf("dist");F!==-1&&(C=j[F-1],C&&S.splice(1,0,C))}S.length>0&&S[S.length-1].includes(".")&&S.pop(),S.forEach(F=>{x=U(F,x)}),x?y(x,g):w.push(g)}),w});function B(){f.value=f.value==="tree"?"list":"tree"}function J(w){return w.charAt(0).toUpperCase()+w.slice(1)}return(w,y)=>{const U=Re,g=ct,C=Pe,x=io,j=ut,S=Ve,F=dt,Q=Ne,re=St,ie=Tt,ee=Oe("tooltip");return r(),k(L,null,[v(F,{"storage-key":"tab-server-routes"},{left:T(()=>[v(g,{search:h.value,"onUpdate:search":y[1]||(y[1]=c=>h.value=c),pb2:""},{actions:T(()=>[Z(v(U,{"text-lg":"",icon:b(f)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:B},null,8,["icon"]),[[ee,"Toggle View"]]),Z(v(U,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:y[0]||(y[0]=c=>s.value=!s.value)},null,512),[[ee,"Default Inputs"]])]),default:T(()=>[u("div",uo,[h.value?(r(),k("span",co,O(E.value.length)+" matched · ",1)):N("",!0),u("span",po,O(b(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(r(!0),k(L,null,H(b(f)==="tree"?I.value:E.value,c=>(r(),D(C,{key:c.filepath,item:c},null,8,["item"]))),128))]),right:T(()=>[(r(),D(bt,{max:10},[_.value?(r(),D(x,{key:_.value.filepath,route:_.value,onOpenDefaultInput:y[2]||(y[2]=c=>s.value=!0)},null,8,["route"])):N("",!0)],1024)),_.value?N("",!0):(r(),D(S,{key:0},{default:T(()=>[v(j,{px6:"",py2:""},{default:T(()=>y[5]||(y[5]=[u("span",{op75:""},"Select a route to start",-1)])),_:1,__:[5]})]),_:1}))]),_:1}),v(ie,{modelValue:s.value,"onUpdate:modelValue":y[3]||(y[3]=c=>s.value=c),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:y[4]||(y[4]=c=>s.value=!1)},{default:T(()=>[u("div",null,[y[6]||(y[6]=u("div",{p4:"",border:"b base"},[u("span",{"text-lg":""},"Default Inputs"),u("br"),u("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1)),(r(!0),k(L,null,H(Object.keys(b(d)),c=>(r(),D(re,{key:c,text:`${J(c)} ${b(d)[c].length?`(${b(d)[c].length})`:""}`,padding:!1,icon:b(Le)[c]},{default:T(()=>[v(Q,{modelValue:b(d)[c],"onUpdate:modelValue":te=>b(d)[c]=te,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Ro as default}; |
| import{b1 as ne,I as re,g as ue,b2 as xe,a4 as Oe,A as Te,w as Se,ay as we,b3 as Xe,a as Ee,_ as le,b4 as De,v as Ce,i as ce,F as Me,M as Ie,b5 as $e,S as Re,n as Ue,a8 as Le}from"./gk0e56xz.js";import{_ as Ne}from"./nnavbar.vue-bqgn7lkr.js";import{_ as fe}from"./nbadge-k88iypqm.js";import{a as Ae,p as K,k as B,q as R,J as I,a3 as g,S as m,U as j,a5 as x,aa as N,F as H,ag as G,Z,u as E,r as ie,w as Ve,ai as pe,V as A,ac as z,a4 as M,ab as P,a6 as je,av as He,W as We,X as Be,K as Fe}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as de}from"./server-route-inputs.vue-np6xo7ds.js";import{_ as qe}from"./ncode-block.vue-ctkw4rc7.js";import{S as ve}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-msli0p3p.js";import{_ as Ye}from"./ndrawer.vue-jkaykvna.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./ncheckbox.vue-fi8jhway.js";import"./nselect.vue-mubgmzer.js";import"./client-oeqdl4pb.js";import"./nicon-title.vue-ejocqf9t.js";var te={exports:{}},se;function Ze(){return se||(se=1,function(F,U){(function(O,S){F.exports=S()})(globalThis,()=>(()=>{var L={949:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),v=function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a==="@reboot")return e=["@reboot","","","","","",""],e;if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(u){return u.trim()}).filter(function(u){return u!==""}).map(function(u){return isNaN(Number(u))?u:Number(u)}).filter(function(u){return u!==null&&u!==""});r.length===0&&r.push("*"),r.sort(function(u,i){return u!==null&&i!==null?u-i:0}),e[a]=r.map(function(u){return u!==null?u.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(l){var h=l.replace(/\D/,""),d=h;return e.dayOfWeekStartIndexZero?h=="7"&&(d="0"):d=(parseInt(h)-1).toString(),l.replace(h,d)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(l){var h=l.replace(/\D/,""),d=h;return e.monthStartIndexZero&&(d=(parseInt(h)+1).toString()),l.replace(h,d)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var u in n)t[4]=t[4].replace(new RegExp(u,"gi"),n[u].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(l){return l!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var s=null;switch(i){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(s!==null){var f=t[i].split("/");t[i]="".concat(f[0],"-").concat(s,"/").concat(f[1])}}},y.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},y.prototype.validateAnyRanges=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.validateOnlyExpectedCharactersFound=function(t,e){var a=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(a&&a.length)throw new Error("Expression contains invalid values: '".concat(a.toString(),"'"))},y}();p.CronParser=v},333:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),v=_(949),y=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,u=n===void 0?!0:n,i=r.verbose,s=i===void 0?!1:i,f=r.dayOfWeekStartIndexZero,l=f===void 0?!0:f,h=r.monthStartIndexZero,d=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,W=C===void 0?null:C,V={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:$,locale:W};V.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var X=new t(e,V);return X.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e,a,r="";try{var n=new v.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]==="@reboot")return((a=(e=this.i18n).atReboot)===null||a===void 0?void 0:a.call(e))||"Run once, at startup";var u=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),f=this.getDayOfWeekDescription(),l=this.getYearDescription();r+=u+i+f+s+l,r=this.transformVerbosity(r,!!this.options.verbose),r=r.charAt(0).toLocaleUpperCase()+r.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)r=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return r},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var u=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,u[0],""),this.formatTime(r,u[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var s=0;s<i.length;s++)n+=" ",n+=this.formatTime(i[s],a,""),s<i.length-2&&(n+=","),s==i.length-2&&(n+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),l=this.getMinutesDescription(),h=this.getHoursDescription();if(n+=f,n&&l&&(n+=", "),n+=l,l===h)return n;n&&h&&(n+=", "),n+=h}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(u){return u},function(u){return o.StringUtilities.format(e.i18n.everyX0Minutes(u),u)},function(u){return e.i18n.minutesX0ThroughX1PastTheHour()},function(u){try{return u=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(u)<20?e.i18n.atX0MinutesPastTheHour(u):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(u)}catch{return e.i18n.atX0MinutesPastTheHour(u)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=0,n=[];a.split("/")[0].split(",").forEach(function(s){var f=s.split("-");f.length===2&&n.push({value:f[1],index:r+1}),r+=f.length});var u=0,i=this.getSegmentDescription(a,this.i18n.everyHour(),function(s){var f=n.find(function(h){return h.value===s&&h.index===u}),l=f&&e.expressionParts[1]!=="0";return u++,l?e.formatTime(s,"59",""):e.formatTime(s,"0","")},function(s){return o.StringUtilities.format(e.i18n.everyX0Hours(s),s)},function(s){return e.i18n.betweenX0AndX1()},function(s){return e.i18n.atX0()});return i},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,u){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var s=parseInt(i),f=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(u)[s]:a[s];if(n.indexOf("#")>-1){var l=null,h=n.substring(n.indexOf("#")+1),d=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(d);break;case"2":l=e.i18n.second(d);break;case"3":l=e.i18n.third(d);break;case"4":l=e.i18n.fourth(d);break;case"5":l=e.i18n.fifth(d);break}f=l+" "+f}return f},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var u=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(u):e.i18n.commaX0ThroughX1(u)},function(n){var u=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),s=n.substring(0,n.indexOf("#"));u=e.i18n.commaOnThe(i,s).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)u=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var f=e.expressionParts[3]!="*";u=f?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return u}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,u){return u&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(u)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var u=parseInt(n[0].replace("W","")),i=u==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),u.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var s=r.match(/L-(\d{1,2})/);if(s){var f=s[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(l){return l=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),l):l},function(l){return l=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(l)},function(l){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(l)},function(l){return e.i18n.commaOnDayX0OfTheMonth(l)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,u,i){var s=null,f=e.indexOf("/")>-1,l=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)s="";else if(e==="*")s=a;else if(!f&&!l&&!h)s=o.StringUtilities.format(i(e),r(e));else if(h){for(var d=e.split(","),$="",C=0;C<d.length;C++)if(C>0&&d.length>2&&($+=",",C<d.length-1&&($+=" ")),C>0&&d.length>1&&(C==d.length-1||d.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),d[C].indexOf("/")>-1||d[C].indexOf("-")>-1){var W=d[C].indexOf("-")>-1&&d[C].indexOf("/")==-1,V=this.getSegmentDescription(d[C],a,r,n,W?this.i18n.commaX0ThroughX1:u,i);W&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(d[C],a,r,n,u,i):$+=r(d[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var d=e.split("/");if(s=o.StringUtilities.format(n(d[1]),d[1]),d[0].indexOf("-")>-1){var X=this.generateRangeSegmentDescription(d[0],u,r);X.indexOf(", ")!=0&&(s+=", "),s+=X}else if(d[0].indexOf("*")==-1){var Y=o.StringUtilities.format(i(d[0]),r(d[0]));Y=Y.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),Y)}}else l&&(s=this.generateRangeSegmentDescription(e,u,r));return s},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",u=e.split("-"),i=r(u[0],1),s=r(u[1],2),f=a(e);return n+=o.StringUtilities.format(f,i,s),n},t.prototype.formatTime=function(e,a,r){var n=0,u=0,i=parseInt(e)+n,s=parseInt(a)+u;s>=60?(s-=60,i+=1):s<0&&(s+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var f="",l=!1;this.options.use24HourTimeFormat||(l=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=l?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return r&&(h=":".concat(("00"+r).substring(r.length))),"".concat(l?f:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(h).concat(l?"":f)},t.prototype.transformVerbosity=function(e,a){if(!a&&(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var r=0,n=Object.entries(this.i18n.conciseVerbosityReplacements());r<n.length;r++){var u=n[r],i=u[0],s=u[1];e=e.replace(new RegExp(i,"g"),s)}return e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();p.ExpressionDescriptor=y},747:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=_(486),v=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=v},486:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o.prototype.atReboot=function(){return"Run once, at startup"},o}();p.en=_},515:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(v,y){if(!v)throw new Error(y)}var o=function(){function v(){}return v.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},v.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},v.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},v.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},v.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},v.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},v}();p.default=o},823:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function o(){}return o.format=function(v){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return v.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(v,y){return y.some(function(t){return v.indexOf(t)>-1})},o}();p.StringUtilities=_}},O={};function S(b){var p=O[b];if(p!==void 0)return p.exports;var _=O[b]={exports:{}};return L[b](_,_.exports,S),_.exports}var w={};return(()=>{var b=w;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=S(333),_=S(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),w})())}(te)),te.exports}var ze=Ze();const Ge=Ae(ze),Je=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(F){const U=F,L=ne(),O=B(!0),S=R(()=>Ge.toString(U.collection.cron));return(w,b)=>{const p=re,_=fe;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",p2:"","hover-bg-active":"",title:S.value,onClick:b[0]||(b[0]=o=>O.value=!O.value)},[m("div",Qe,[x(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":O.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[x(_,{class:"font-mono n-primary",textContent:N(w.collection.cron)},null,8,["textContent"]),m("span",et,N(S.value),1),m("span",tt,"("+N(w.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),O.value?(g(),I("ul",nt,[(g(!0),I(H,null,G(w.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","pl-9":"","font-mono":"","hover-bg-active":"",class:Z([{"bg-active":E(L)===o}]),onClick:v=>L.value=o},N(o),11,rt),b[1]||(b[1]=m("div",{"x-divider":""},null,-1))]))),128))])):j("",!0)])}}}),at={"h-full":"","w-full":"",flex:"~ col"},it={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},st={flex:"~ gap2 items-center"},ut={relative:"","w-full":""},lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ct={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ft={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},dt={key:0,border:"b base",relative:"","n-code-block":""},vt={flex:"~ wrap","w-full":""},ht=["onClick"],mt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},yt={key:1,"text-xs":"",op50:""},gt=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(F,{emit:U}){const L=F,O=U,S=B({payload:{}}),{inputDefaults:w}=ue("serverRoutes"),[b,p]=xe(),_=Oe(),o=Te(),v=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>JSON.stringify(v.data,null,2)),t=R(()=>v.contentType.includes("application/json")?"json":"text"),e=B(!1),a=B(!1),r=Se(),n=B(),u=["json"],i=B(u[0]),s=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=R({get:()=>s[n.value],set:k=>{s[n.value]=k}}),l=R(()=>({...X(w.value.query),...X(s.query)})),h=R(()=>({...X(w.value.headers)})),d=R(()=>Object.keys(S.value?.payload??{}).length?{...S.value}:void 0),$=R(()=>d.value?"POST":"GET"),C=R(()=>{let k=window?.location.origin;return k.charAt(k.length-1)==="/"&&(k=k.slice(0,-1)),k}),W=R(()=>{let k=new URLSearchParams(l.value).toString();k&&(k=`?${k}`);const c=`/_nitro/tasks/${L.task.name}${k}`;let D=o.value?.app.baseURL||"";return(D==="./"||D===".")&&(D=""),D.endsWith("/")&&(D=D.slice(0,-1)),D+c}),V=R(()=>C.value+W.value);function X(k){const c=Object.fromEntries(k.filter(({active:D,key:q,value:J})=>D&&q&&J!==void 0).map(({key:D,value:q})=>[D,q]));return Object.entries(c).length?c:void 0}async function Y(){a.value=!0,e.value=!0;const k=Date.now();Ie("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:d.value,onResponse({response:c}){v.contentType=(c.headers.get("content-type")||"").toString().toLowerCase().trim(),v.statusCode=c.status,v.error=void 0},onResponseError(c){v.error=c.response._data,v.data=c.response._data}})}catch{}e.value=!1,v.fetchTime=Date.now()-k}const me=R(()=>{const k=[];return k.push({name:"Query",slug:"query",length:s.query.length}),k.push({name:"Body",slug:"body",length:s.body.length}),k});Ve(()=>{if(i.value==="json"&&typeof S.value=="string")try{S.value=JSON.parse(S.value)}catch{}});const oe=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const k=oe.value?.find(c=>c.task===L.task.name);if(k){n.value||(n.value=k.tab),k.tab!==n.value&&(k.tab=n.value);const{body:c,query:D,headers:q}=k.inputs;Object.assign(s,{body:c,query:D,headers:q})}else{const c={task:L.task.name,tab:"query",inputs:s};oe.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(k,c)=>{const D=le,q=Ce,J=re,ae=de,ge=ce,_e=Me,ee=fe,be=qe,Q=pe("tooltip");return g(),I("div",at,[m("div",it,[m("div",st,[z((g(),I("div",null,[x(D,{class:Z(["n-badge-base n-sm",E(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[P(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",ut,[x(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",lt,[z(x(D,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=T=>E(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),z(x(D,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=T=>E(r)(k.task.handler))},null,512),[[Q,"Open in Editor"]])])]),x(D,{"h-full":"",n:"primary solid",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"})]),_:1})])]),m("div",ct,[(g(!0),I(H,null,G(me.value,T=>z((g(),A(D,{key:T.slug,class:Z(n.value===T.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=T.slug},{default:M(()=>[x(J,{icon:E(ve)[T.slug]},null,8,["icon"]),m("div",ft,[P(N(T.name)+" "+N(T?.length?`(${T.length})`:"")+" ",1),m("span",null,N(E(w)[T.slug]?.length?`(${E(w)[T.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,T.name]])),128))]),x(E(b),null,{default:M(()=>[x(ae,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=T=>f.value=T),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[E(w)[n.value]?.length?(g(),I(H,{key:0},[m("div",pt,[c[6]||(c[6]=m("div",{"w-5":"","x-divider":""},null,-1)),c[7]||(c[7]=m("div",{"flex-none":""}," Default Inputs ",-1)),x(D,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=T=>O("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),x(ae,{modelValue:E(w)[n.value],"onUpdate:modelValue":c[3]||(c[3]=T=>E(w)[n.value]=T),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",dt,[n.value==="body"?(g(),I(H,{key:0},[m("div",vt,[(g(),I(H,null,G(u,T=>m("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:Z({"border-b":T!==i.value}),onClick:ke=>i.value=T},[m("div",{class:Z({op30:T!==i.value}),"font-mono":""},N(T),3)],10,ht)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(E(p),{key:0})):i.value==="json"?(g(),A(E(He),je({key:1,modelValue:S.value,"onUpdate:modelValue":c[5]||(c[5]=T=>S.value=T),class:[E(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},k.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(E(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>c[11]||(c[11]=[P(" Running... ")])),_:1,__:[11]})):(g(),I(H,{key:3},[m("div",mt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),A(ee,{key:0,n:"red"},{default:M(()=>c[12]||(c[12]=[P(" Error ")])),_:1,__:[12]})):j("",!0),x(ee,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",yt,N(v.contentType),1)):j("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),x(ee,{n:"green"},{default:M(()=>[P(N(v.fetchTime)+" ms ",1)]),_:1})]),x(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:M(()=>[x(D,{n:"primary",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"}),c[10]||(c[10]=P(" Run task "))]),_:1,__:[10]})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},he=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const U=B(!0),L=ne();return(O,S)=>{const w=re,b=he;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:Z([{"bg-active":E(L)===O.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${O.index*1.5}em)`}),onClick:S[0]||(S[0]=p=>{U.value=!U.value,L.value=O.item.name})},[m("div",_t,[O.item.type==="collection"?(g(),A(w,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),m("span",bt,[O.item.type==="collection"?(g(),A(w,{key:0,title:`${O.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(w,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+N(O.item.name),1)])],6),S[1]||(S[1]=m("div",{"x-divider":""},null,-1)),U.value?We(O.$slots,"default",{key:0},()=>[(g(!0),I(H,null,G(O.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:O.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),kt={flex:"~ gap1","text-sm":""},xt={key:0,op50:""},Ot={op50:""},Vt=K({__name:"server-tasks",setup(F){const U=B(!1),L=$e(),O=R(()=>Object.keys(L.value?.tasks??{}).map(r=>({name:r,...L.value.tasks[r],type:"task"}))),S=R(()=>Object.entries(L.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),w=ne(),{view:b,selectedTask:p,inputDefaults:_}=ue("serverTasks"),o=R(()=>{!w.value&&p.value&&(w.value=p.value.name);const r=O.value.find(n=>n.name===w.value);return w.value!==p.value?.name&&r&&(p.value=r),r}),v=B(""),y=R(()=>new Re(O.value,{keys:["key","description"],shouldSort:!0})),t=R(()=>v.value?y.value.search(v.value).map(n=>n.item):O.value),e=R(()=>{const r=[],n=(i,s)=>{i.tasks||=[],i.tasks.push(s)},u=(i,s)=>{const f=s?s.tasks?.find(h=>h.name===i):r.find(h=>h.name===i);if(f)return{...f,type:"collection"};const l={name:i,handler:i,description:"",type:"collection",tasks:[]};return s?n(s,l):r.push(l),l};return t.value.forEach(i=>{let s;const f={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(d=>{s=u(d,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=le,i=Ne,s=ot,f=Le,l=gt,h=Ue,d=ce,$=de,C=Pe,W=Ye,V=pe("tooltip");return g(),I(H,null,[x(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[x(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[x(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=X=>v.value=X),pb2:""},{actions:M(()=>[z(x(u,{"text-lg":"",icon:E(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),z(x(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=X=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",kt,[v.value?(g(),I("span",xt,N(t.value.length)+" matched · ",1)):j("",!0),m("span",Ot,N(O.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(H,null,G(E(b)==="tree"?e.value:t.value,X=>(g(),A(he,{key:X.name,item:X},null,8,["item"]))),128))]),right:M(()=>[n[6]||(n[6]=m("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),m("div",null,[m("ul",null,[(g(!0),I(H,null,G(S.value,X=>(g(),I("li",{key:X.cron},[x(s,{collection:X},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),A(Fe,{max:10},[o.value?(g(),A(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=X=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(d,{key:0},{default:M(()=>[x(h,{px6:"",py2:""},{default:M(()=>n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])),_:1,__:[7]})]),_:1}))]),_:1}),x(W,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=X=>U.value=X),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=X=>U.value=!1)},{default:M(()=>[m("div",null,[n[8]||(n[8]=m("div",{p4:"",border:"b base"},[m("span",{"text-lg":""},"Default Inputs"),m("br"),m("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),x(C,{text:`Query ${E(_).query.length?`(${E(_).query.length})`:""}`,padding:!1,icon:E(ve).query},{default:M(()=>[x($,{modelValue:E(_).query,"onUpdate:modelValue":n[3]||(n[3]=X=>E(_).query=X),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default}; |
| import{_ as h}from"./nicon-title.vue-ejocqf9t.js";import{_ as ee}from"./nswitch.vue-bpoo3j7g.js";import{g as j,f as le,k as oe,l as ne,m as te,_ as ae,n as se,t as A,r as ie,o as ue}from"./gk0e56xz.js";import{_ as de}from"./nselect.vue-mubgmzer.js";import{_ as re}from"./ncheckbox.vue-fi8jhway.js";import{_ as pe}from"./nlink.vue-gpbxgl1n.js";import{p as me,w as P,J as m,a3 as d,a5 as n,S as o,F as v,ag as k,u as t,a4 as a,ab as N,aa as _,j as p,V as F,U as M,Z as R}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const fe={px8:"",py6:""},ve={grid:"~ lg:cols-2 gap-x-10 gap-y-3","max-w-300":""},ge={flex:"~ col gap-2"},be={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},_e={capitalize:"",op75:""},xe={"flex-auto":"","overflow-hidden":"","text-ellipsis":"","ws-nowrap":""},ye={flex:"~ col gap-2"},ce=["value"],Ve=["value"],ke=["value"],Ce={flex:"~ gap-2"},we={flex:"~ gap-2"},Be=me({__name:"settings",setup(Se){const{interactionCloseOnOutsideClick:C,showPanel:I,showHelpButtons:$,scale:z,hiddenTabs:x,pinnedTabs:u,hiddenTabCategories:y,minimizePanelInactive:w,sidebarExpanded:S,sidebarScrollable:D}=j("ui"),{openInEditor:E}=j("behavior"),c=le(),W=[["Auto",void 0],["VS Code","vscode"],["VS Code Insider","vscode-insider"],["Cursor","cursor"],["Zed","zed"],["WebStorm","webstorm"],["Sublime Text","sublime"],["Atom","atom"],["Windsurf","windsurf"]],H=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],Z=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],J=oe(ne());function q(s,e){e?x.value=x.value.filter(r=>r!==s):x.value.push(s)}function G(s,e){e?y.value=y.value.filter(r=>r!==s):y.value.push(s)}function K(s){u.value.includes(s)?u.value=u.value.filter(e=>e!==s):u.value.push(s)}function L(s,e){const r=u.value.indexOf(s);if(r===-1)return;const g=r+e;if(g<0||g>=u.value.length)return;const V=[...u.value];V.splice(r,1),V.splice(g,0,s),u.value=V}async function Q(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await ie.clearOptions(),c.value?.app?.reload?.(),window.location.reload())}return P(()=>{c.value&&(c.value.app.frameState.value.closeOnOutsideClick=C.value)}),P(()=>{c.value&&(c.value.app.frameState.value.minimizePanelInactive=w.value)}),(s,e)=>{const r=h,g=ee,V=ue,f=ae,T=se,X=te,B=de,b=re,Y=pe;return d(),m("div",fe,[n(r,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),o("div",ve,[o("div",ge,[e[10]||(e[10]=o("h3",{"text-lg":""}," Tabs ",-1)),(d(!0),m(v,null,k(t(J),([l,O])=>(d(),m(v,{key:l},[O.length?(d(),F(T,{key:0,p3:"",flex:"~ col gap-1",class:R(t(y).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(g,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(y).includes(l),"onUpdate:modelValue":i=>G(l,i)},{default:a(()=>[o("div",be,[o("span",_e,_(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e[9]||(e[9]=o("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),(d(!0),m(v,null,k(O,i=>(d(),F(g,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(x).includes(i.name),"onUpdate:modelValue":U=>q(i.name,U)},{default:a(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","of-hidden":"","pr-4":"",class:R(t(x).includes(i.name)?"op25":"")},[n(V,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),o("span",xe,_(i.title),1),t(u).includes(i.name)?(d(),m(v,{key:0},[n(f,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:U=>L(i.name,-1)},null,8,["disabled","onClick"]),n(f,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:U=>L(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(f,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:U=>K(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2,__:[9]},1032,["class"])):M("",!0)],64))),128))]),o("div",ye,[e[29]||(e[29]=o("h3",{"text-lg":""}," Appearance ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[o("div",null,[n(X,null,{default:a(({toggle:l,isDark:O})=>[n(f,{n:"primary",onClick:l},{default:a(()=>[e[11]||(e[11]=o("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1)),N(" "+_(O.value?"Dark":"Light"),1)]),_:2,__:[11]},1032,["onClick"])]),_:1})]),e[14]||(e[14]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[15]||(e[15]=o("p",null,"UI Scale",-1)),n(B,{modelValue:t(z),"onUpdate:modelValue":e[0]||(e[0]=l=>p(z)?z.value=l:null),n:"primary"},{default:a(()=>[(d(),m(v,null,k(H,l=>o("option",{key:l[0],value:l[1]},_(l[0]),9,ce)),64))]),_:1},8,["modelValue"]),e[16]||(e[16]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),n(b,{modelValue:t(S),"onUpdate:modelValue":e[1]||(e[1]=l=>p(S)?S.value=l:null),"n-primary":""},{default:a(()=>e[12]||(e[12]=[o("span",null," Expand Sidebar ",-1)])),_:1,__:[12]},8,["modelValue"]),n(b,{modelValue:t(D),"onUpdate:modelValue":e[2]||(e[2]=l=>p(D)?D.value=l:null),disabled:t(S),"n-primary":""},{default:a(()=>e[13]||(e[13]=[o("span",null," Scrollable Sidebar ",-1)])),_:1,__:[13]},8,["modelValue","disabled"])]),_:1,__:[14,15,16]}),e[30]||(e[30]=o("h3",{mt2:"","text-lg":""}," Features ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(C),"onUpdate:modelValue":e[3]||(e[3]=l=>p(C)?C.value=l:null),"n-primary":""},{default:a(()=>e[17]||(e[17]=[o("span",null,"Close DevTools when clicking outside",-1)])),_:1,__:[17]},8,["modelValue"]),n(b,{modelValue:t($),"onUpdate:modelValue":e[4]||(e[4]=l=>p($)?$.value=l:null),"n-primary":""},{default:a(()=>e[18]||(e[18]=[o("span",null,"Show help buttons",-1)])),_:1,__:[18]},8,["modelValue"]),n(b,{modelValue:t(I),"onUpdate:modelValue":e[5]||(e[5]=l=>p(I)?I.value=l:null),"n-primary":""},{default:a(()=>e[19]||(e[19]=[o("span",null,"Show the floating panel",-1)])),_:1,__:[19]},8,["modelValue"]),e[20]||(e[20]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[21]||(e[21]=o("p",null,"Minimize floating panel on inactive",-1)),n(B,{modelValue:t(w),"onUpdate:modelValue":e[6]||(e[6]=l=>p(w)?w.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(d(),m(v,null,k(Z,l=>o("option",{key:l[0],value:l[1]},_(l[0]),9,Ve)),64))]),_:1},8,["modelValue"]),e[22]||(e[22]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[23]||(e[23]=o("p",null,"Open In Editor",-1)),n(B,{modelValue:t(E),"onUpdate:modelValue":e[7]||(e[7]=l=>p(E)?E.value=l:null),"n-primary":""},{default:a(()=>[(d(),m(v,null,k(W,l=>o("option",{key:l[0],value:l[1]},_(l[0]),9,ke)),64))]),_:1},8,["modelValue"])]),_:1,__:[20,21,22,23]}),e[31]||(e[31]=o("h3",{mt2:"","text-lg":""}," Feedback ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(A),"onUpdate:modelValue":e[8]||(e[8]=l=>p(A)?A.value=l:null),"n-primary":""},{default:a(()=>[e[24]||(e[24]=o("span",null,"Send anonymous statistics, help us improving DevTools",-1)),n(Y,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1,__:[24]},8,["modelValue"]),e[27]||(e[27]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),o("div",Ce,[n(f,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>e[25]||(e[25]=[o("div",{"i-carbon-data-enrichment":""},null,-1),N(" Ideas & Suggestions ")])),_:1,__:[25]}),n(f,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>e[26]||(e[26]=[o("div",{"i-carbon-debug":""},null,-1),N(" Bug Reports ")])),_:1,__:[26]})])]),_:1,__:[27]}),e[32]||(e[32]=o("h3",{mt2:"","text-lg":""}," Debug ",-1)),o("div",we,[n(f,{n:"orange",onClick:Q},{default:a(()=>e[28]||(e[28]=[o("div",{"i-carbon-breaking-change":""},null,-1),N(" Reset Local Settings & State ")])),_:1,__:[28]})])])])])}}});export{Be as default}; |
| import{_ as p}from"./filepath-item.vue-gwnp998z.js";import{A as m}from"./gk0e56xz.js";import{p as f,J as r,a3 as n,F as s,ag as _,S as o,aa as h,V as d,U as g}from"./vendor/json-editor-vue-m9gzt21j.js";const k={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},x={"text-right":""},N={"ws-nowrap":""},B=f({__name:"StacktraceList",props:{stacktrace:{}},setup($){const i=m();function c(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const l=p;return n(),r("div",k,[(n(!0),r(s,null,_(a.stacktrace,(e,u)=>(n(),r(s,{key:u},[o("div",x,h(e.functionName||"(anonymous)"),1),o("div",N,[e.fileName?(n(),d(l,{key:0,filepath:`${c(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):g("",!0)])],64))),128))])}}});export{B as _}; |
| import{f as m,al as o,r as n}from"./gk0e56xz.js";import{q as s}from"./vendor/json-editor-vue-m9gzt21j.js";function u(){const p=m(),a=o("getComponents",()=>n.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(a.value||[]).find(t=>t.pascalName===e.pascalName)));return s(()=>[...l.value,...a.value||[]].sort((e,t)=>e.pascalName.localeCompare(t.pascalName)))}function i(){return o("getComponentsRelationships",()=>n.getComponentsRelationships())}export{i as a,u}; |
| import{G as C,a4 as O,_ as z}from"./gk0e56xz.js";import{_ as D}from"./data-schema-button.vue-jylz9ayu.js";import{p as E,n as g,E as J,x as M,ai as P,J as c,a3 as r,u as o,S as p,U as u,W as R,Z as d,aa as b,a7 as $,a8 as j,F as k,ac as x,V as _,a5 as A,av as F,a6 as U,z as G}from"./vendor/json-editor-vue-m9gzt21j.js";const T=["open"],W={flex:"~ gap2","select-none":"","items-center":"",px4:""},Z={key:0,class:"bg-red:10 px5 py3 text-red"},L=E({__name:"StateEditor",props:{name:{},open:{type:Boolean},revision:{},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(h,{emit:V}){const n=h,s=C(n,"open",V,{passive:!0}),S=O(),i=g(),l=g();function m(e){return["number","bigint","string","boolean"].includes(typeof e)}function v(){l.value=void 0;try{i.value=m(n.state)?n.state:JSON.parse(JSON.stringify(n.state||{}))}catch(e){console.error(e),l.value=e}}J(()=>{v(),M(()=>[n.revision,n.state],([e,t])=>{m(t)?i.value=n.state:y(t,n.state)},{deep:!0})});function y(e,t){for(const a in e)Array.isArray(e[a])?t[a]=e[a].slice():typeof e[a]=="object"&&e[a]!==null?y(e[a],t[a]):t[a]=e[a]}async function B(){v(),await G()}return(e,t)=>{const a=z,w=D,N=P("tooltip");return r(),c("div",{class:"state-editor-details",open:e.name?o(s):!0},[p("div",W,[e.name?(r(),c("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(o(s)?"":"op50"),onClick:t[0]||(t[0]=f=>s.value=!o(s))},[p("div",{"i-carbon-chevron-right":"",transition:"",class:d(o(s)?"rotate-90 op0":"")},null,2),p("code",{px3:"",py1:"","font-mono":"",class:d(o(s)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},b(e.name),3)],2)):u("",!0),R(e.$slots,"actions",$(j({isOpen:o(s),name:e.name,state:e.state}))),o(s)?(r(),c(k,{key:1},[x(A(a,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:B},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),i.value&&!l.value?(r(),_(w,{key:0,getter:()=>({name:e.name,input:JSON.stringify(i.value)})},null,8,["getter"])):u("",!0)],64)):u("",!0)]),o(s)||!e.name?(r(),c(k,{key:0},[l.value?(r(),c("div",Z," Error: "+b(l.value),1)):(r(),_(o(F),U({key:1,modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=f=>i.value=f)},e.$attrs,{class:["json-editor-vue",[o(S)==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":n.readonly,indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"]))],64)):u("",!0)],8,T)}}});export{L as _}; |
| import{_ as j}from"./nbadge-k88iypqm.js";import{_ as F}from"./ncode-block.vue-ctkw4rc7.js";import{_ as W}from"./ncheckbox.vue-fi8jhway.js";import{a6 as q,ah as A,ai as L,aj as E,Z as G,Q as J,q as Q,_ as Y,M as Z,ak as z,A as H,Y as K,W as O,a3 as X,al as ee}from"./gk0e56xz.js";import{p as te,k as P,J as _,a3 as p,F as $,W as ae,a5 as o,U as w,u as s,aa as M,V as ne,a4 as u,S as v,ab as c,q as oe}from"./vendor/json-editor-vue-m9gzt21j.js";const se={key:0},le={p4:"",flex:"~ col gap-1"},re={class:"text-lg font-medium leading-6"},ue={flex:"~ gap-3",mt2:"","justify-end":""},_e=te({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const a=l,t=q(),{info:n,update:i,state:g,processId:y,restart:m}=A(a.packageName,a.options),k=P(!0),N=P(!0),U=L(),x=E(),D=G();async function C(){const r=await i(async e=>x.start(e));Z("npm:update",{packageName:a.packageName,oldVersion:n.value?.current}),r&&N.value&&U.value.push({id:r,message:`${a.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&k.value&&(D.value=r,t.push("/modules/terminals"))}return(r,e)=>{const b=j,S=F,h=W,T=Q,V=Y,I=J;return p(),_($,null,[ae(r.$slots,"default",{id:s(y),info:s(n),update:C,state:s(g),restart:s(m)},()=>[s(n)&&r.showVersion?(p(),_("code",se,M(`v${s(n).current}`),1)):w("",!0),s(n)?.latest?(p(),_($,{key:1},[s(n).needsUpdate?(p(),_("button",{key:0,onClick:e[0]||(e[0]=f=>C())},[o(b,{n:"green",title:"updates available",textContent:"updates available"})])):(p(),ne(b,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),o(s(x),null,{default:u(({resolve:f,args:R})=>[o(I,{"model-value":!0,onClose:d=>f(!1)},{default:u(()=>[v("div",le,[v("h3",re," Update "+M(a.packageName)+"? ",1),e[8]||(e[8]=v("p",{op50:""}," The following command will be executed in your terminal: ",-1)),o(S,{code:R[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),o(h,{modelValue:k.value,"onUpdate:modelValue":e[1]||(e[1]=d=>k.value=d),n:"primary"},{default:u(()=>e[3]||(e[3]=[c(" Navigate to terminal ")])),_:1,__:[3]},8,["modelValue"]),o(h,{modelValue:N.value,"onUpdate:modelValue":e[2]||(e[2]=d=>N.value=d),n:"primary"},{default:u(()=>e[4]||(e[4]=[c(" Restart Nuxt server after update ")])),_:1,__:[4]},8,["modelValue"]),v("div",ue,[o(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>e[5]||(e[5]=[c(" Please make sure to backup your project first. ")])),_:1,__:[5]}),o(V,{onClick:d=>f(!1)},{default:u(()=>e[6]||(e[6]=[c(" Cancel ")])),_:2,__:[6]},1032,["onClick"]),o(V,{n:"solid primary",onClick:d=>f(!0)},{default:u(()=>e[7]||(e[7]=[c(" Update ")])),_:2,__:[7]},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),B=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function ie(){return ee("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(a=>!B.includes(a.npm)&&a.compatibility.nuxt.includes(">=3")))}function ve(){return z("installed-modules",()=>{const l=H(),a=ie();return oe(()=>(l.value?._installedModules||[]).map(t=>{if(!t.entryPath)return;const n=!!(t.entryPath&&K(t.entryPath)),i=t.meta?.name?t.meta?.name:t.entryPath?n?O(t.entryPath):l.value?.rootDir?X(t.entryPath,l.value?.rootDir).path:void 0:void 0,g=!!l.value?.modules?.includes(i),y=a.value?.find(m=>m.npm===i)||a.value?.find(m=>m.name===i);return{name:i,isPackageModule:n,isUninstallable:g,info:y,...t}}).filter(t=>t&&(!t.name||!B.includes(t.name))))})}export{_e as _,ie as a,ve as u}; |
| import{a4 as ae,a5 as ne,a6 as oe,a7 as P,H as se,r as f,E as k,a8 as le,v as re,I as ue,_ as ie,i as de,n as pe,a9 as T,aa as me}from"./gk0e56xz.js";import{_ as ve}from"./nselect.vue-mubgmzer.js";import{_ as fe}from"./nlink.vue-gpbxgl1n.js";import{_ as ce}from"./filepath-item.vue-gwnp998z.js";import{p as G,k as M,au as F,M as _e,x as ye,w as ge,q as ke,V as m,u as c,a3 as s,a4 as r,J as u,S as l,ac as xe,U as R,Y as U,ab as i,a5 as d,aa as x,Z as z,av as be,a6 as we,at as Ce,al as Ke,ag as A,F as b,j as Se}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const Ve={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ne={class:"w-full text-sm"},$e=["value"],Ie=["onClick"],he={key:0,"h-full":"","of-hidden":"",flex:"~ col"},je={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},De={class:"flex items-center gap-4"},Me={key:1},Ue=["onKeyup"],Ae={key:0,op50:""},qe={key:1},Be={"font-bold":""},Le={"text-sm":""},Ee=G({__name:"StorageDetails",async setup(H){let p,y;const w=ae(),C=ne(),K=oe(),S=M(""),g=M(""),o=P("storage:current",""),t=M(),_=P("storage:file:state",""),{data:V}=([p,y]=F(()=>T("storageMounts",()=>f.getStorageMounts())),p=await p,y(),p),{data:N,refresh:q}=([p,y]=F(async()=>T("storageKeys",async()=>o.value?await f.getStorageKeys(o.value):[])),p=await p,y(),p),J=C.hook("storage:key:update",async(a,e)=>{if(!(!o.value||a.split(":")[0]!==o.value)&&(await q(),_.value===a)){if(e==="remove")return K.replace({query:{storage:o.value}});await I(_.value)}});_e(J),ye(o,()=>{q(),_.value=""}),ge(async()=>{if(!_.value){t.value=null;return}I(_.value)}),se("keydown",a=>{a.key==="s"&&(a.ctrlKey||a.metaKey)&&(h(),a.preventDefault())});function $(a){return a.replace(`${o.value}:`,"")}const O=ke(()=>N.value?N.value.filter(a=>a.includes(S.value)):[]);async function I(a){const e=await f.getStorageItem(await k(),a);t.value={key:a,updatedKey:$(a),editingKey:!1,content:e,updatedContent:e}}async function W(){if(!g.value||!o.value)return;const a=`${o.value}:${g.value}`;N.value?.includes(a)||await f.setStorageItem(await k(),a,""),K.replace({query:{storage:o.value,key:a}}),g.value=""}async function h(){t.value&&(await f.setStorageItem(await k(),t.value.key,t.value.updatedContent),await I(t.value.key))}async function Y(){!t.value||!o.value||(await f.removeStorageItem(await k(),t.value.key),t.value=null)}async function Z(){if(!t.value||!o.value)return;const a=`${o.value}:${t.value.updatedKey}`,e=await k();await f.setStorageItem(e,a,t.value.updatedContent),await f.removeStorageItem(e,t.value.key),K.replace({query:{storage:o.value,key:a}})}return(a,e)=>{const j=ie,Q=ve,D=re,X=ue,B=fe,L=pe,E=de,ee=le,te=ce;return c(o)?(s(),m(ee,{key:0,"storage-key":"tab-storage"},{left:r(()=>[l("div",Ve,[d(j,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:e[0]||(e[0]=n=>o.value="")}),l("div",Ne,[d(Q,{modelValue:c(o),"onUpdate:modelValue":e[1]||(e[1]=n=>Se(o)?o.value=n:null),n:"primary",icon:"carbon-data-base"},{default:r(()=>[(s(!0),u(b,null,A(c(V),(n,v)=>(s(),u("option",{key:v,value:v},x(v),9,$e))),128))]),_:1},8,["modelValue"])])]),d(D,{modelValue:S.value,"onUpdate:modelValue":e[2]||(e[2]=n=>S.value=n),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(s(!0),u(b,null,A(O.value,n=>(s(),u(b,{key:n},[l("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:z(n===t.value?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:v=>_.value=n},x($(n)),11,Ie),e[8]||(e[8]=l("div",{"x-divider":""},null,-1))],64))),128)),d(D,{modelValue:g.value,"onUpdate:modelValue":e[3]||(e[3]=n=>g.value=n),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:U(W,["enter"])},null,8,["modelValue"])]),right:r(()=>[t.value?.key?(s(),u("div",he,[l("div",je,[l("div",De,[t.value.editingKey?(s(),m(D,{key:0,modelValue:t.value.updatedKey,"onUpdate:modelValue":e[4]||(e[4]=n=>t.value.updatedKey=n),onKeyup:U(Z,["enter"])},null,8,["modelValue"])):(s(),u("code",Me,[i(x($(t.value.key))+" ",1),d(X,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:e[5]||(e[5]=n=>t.value.editingKey=!0)})])),t.value.editingKey?R("",!0):(s(),m(j,{key:2,n:"green xs",disabled:t.value.content===t.value.updatedContent,class:z({"border-green":t.value.content!==t.value.updatedContent}),onClick:h},{default:r(()=>e[9]||(e[9]=[i(" Save ")])),_:1,__:[9]},8,["disabled","class"]))]),l("div",null,[d(j,{n:"red xs",onClick:Y},{default:r(()=>e[10]||(e[10]=[i(" Delete ")])),_:1,__:[10]})])]),typeof t.value.content=="object"?(s(),m(c(be),we({key:0,modelValue:t.value.updatedContent,"onUpdate:modelValue":e[6]||(e[6]=n=>t.value.updatedContent=n),class:[[c(w)==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},a.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):xe((s(),u("textarea",{key:1,"onUpdate:modelValue":e[7]||(e[7]=n=>t.value.updatedContent=n),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:U(Ke(h,["ctrl"]),["enter"])},null,40,Ue)),[[Ce,t.value.updatedContent]])])):(s(),m(E,{key:1},{default:r(()=>[d(L,{px6:"",py4:""},{default:r(()=>[e[12]||(e[12]=i(" Select one key to start.")),e[13]||(e[13]=l("br",null,null,-1)),e[14]||(e[14]=i("Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[11]||(e[11]=[i(" Nitro storage ")])),_:1,__:[11]})]),_:1,__:[12,13,14]})]),_:1}))]),_:1})):(s(),m(E,{key:1},{default:r(()=>[Object.keys(c(V)).length?(s(),u("p",Ae," Select one storage to start: ")):(s(),u("p",qe,[e[16]||(e[16]=i(" No custom storage defined in ")),e[17]||(e[17]=l("code",null,"nitro.storage",-1)),e[18]||(e[18]=i(".")),e[19]||(e[19]=l("br",null,null,-1)),e[20]||(e[20]=i(" Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[15]||(e[15]=[i(" Nitro storage ")])),_:1,__:[15]})])),(s(!0),u(b,null,A(c(V),(n,v)=>(s(),m(L,{key:v,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Pe=>o.value=v},{default:r(()=>[l("span",Be,x(v),1),e[21]||(e[21]=l("br",null,null,-1)),l("span",Le,x(n.driver)+" driver",1),e[22]||(e[22]=l("br",null,null,-1)),n.base?(s(),m(te,{key:0,"text-xs":"",filepath:n.base},null,8,["filepath"])):R("",!0)]),_:2,__:[21,22]},1032,["onClick"]))),128))]),_:1}))}}}),Oe=G({__name:"storage",setup(H){return(p,y)=>{const w=Ee,C=me;return s(),m(C,null,{default:r(()=>[d(w)]),_:1})}}});export{Oe as default}; |
| import{a5 as E,H as V,r as f,E as p,_ as $,ap as B,Z as F,I,aa as D}from"./gk0e56xz.js";import{x as M,a as P}from"./vendor/xterm-dbpzgj7s.js";import{p as y,k as g,E as R,J as d,a3 as t,F as A,S as c,a5 as N,V as m,U as v,aa as _,q,w as z,u as w,ag as L,ab as C,Z as h,al as S,a4 as Z}from"./vendor/json-editor-vue-m9gzt21j.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const j={border:"t base",flex:"~ gap-2","items-center":"",p2:""},H={"text-sm":"",op50:""},J=y({__name:"TerminalView",props:{id:{}},setup(b){const n=b,r=g(),i=E(),o=g();let a;R(async()=>{a=new M.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const u=new P.FitAddon;a.loadAddon(u),a.open(r.value),u.fit(),V(window,"resize",()=>{u.fit()}),o.value=await f.getTerminalDetail(await p(),n.id),o.value?.buffer&&a.write(o.value.buffer),i.hook("devtools:terminal:data",({id:e,data:l})=>{e===n.id&&a.write(l)})});async function s(){f.runTerminalAction(await p(),n.id,"clear"),a?.clear()}async function k(){f.runTerminalAction(await p(),n.id,"restart")}async function x(){f.runTerminalAction(await p(),n.id,"terminate")}return(u,e)=>{const l=$;return t(),d(A,null,[c("div",{ref_key:"container",ref:r,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",j,[N(l,{title:"Clear",icon:"i-carbon-clean",border:!1,onClick:e[0]||(e[0]=T=>s())}),o.value?.restartable?(t(),m(l,{key:0,title:"Restart",icon:"carbon-renew",border:!1,onClick:e[1]||(e[1]=T=>k())})):v("",!0),o.value?.terminatable?(t(),m(l,{key:1,title:"Terminate",icon:"carbon-delete",border:!1,onClick:e[2]||(e[2]=T=>x())})):v("",!0),c("span",H,_(o.value?.description),1)])],64)}}}),U={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},G={flex:"~",border:"b base","n-navbar-glass":"","flex-1":"","items-center":""},K=["onClick"],O={key:1,p10:""},Q={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},W=y({__name:"TerminalPage",setup(b){const n=B(),r=F(),i=q(()=>n.value?.find(a=>a.id===r.value));async function o(a){f.runTerminalAction(await p(),a,"remove")}return z(()=>{!r.value&&n.value?.length&&(r.value=n.value[0].id)}),(a,s)=>{const k=I,x=$,u=J;return w(n)?.length?(t(),d("div",U,[c("div",G,[(t(!0),d(A,null,L(w(n),e=>(t(),d("button",{key:e.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:h(e.id===i.value?.id?"bg-active":""),onClick:l=>r.value=e.id},[e.icon?(t(),m(k,{key:0,icon:e.icon},null,8,["icon"])):v("",!0),c("span",{class:h(e.id===i.value?.id?"":"op50")},_(e.name)+_(e.isTerminated?" (terminated)":""),3),e.isTerminated?(t(),m(x,{key:1,icon:"carbon-close","mx--2":"",border:!1,onClick:S(l=>o(e.id),["stop"])},null,8,["onClick"])):v("",!0)],10,K))),128))]),i.value?(t(),m(u,{id:i.value.id,key:i.value.id},null,8,["id"])):(t(),d("div",O,[s[0]||(s[0]=C(" Terminal ")),c("code",null,_(w(r)),1),s[1]||(s[1]=C(" not found "))]))])):(t(),d("div",Q,s[2]||(s[2]=[c("em",{op50:""},"No terminal attached",-1)])))}}}),ae=y({__name:"terminals",setup(b){return(n,r)=>{const i=W,o=D;return t(),m(o,null,{default:Z(()=>[N(i)]),_:1})}}});export{ae as default}; |
| import{P as j,H,am as Y,b as U,a4 as q,a as X,_ as z,V as Z,f as K,an as Q,A as ee,aj as se,w as ne,i as oe,Q as te,r as R,J as ae}from"./gk0e56xz.js";import{_ as W}from"./duration-display.vue-mr4ha0rw.js";import{g as M}from"./color-mt9xuhgy.js";import{p as B,q as w,J as i,a3 as t,X as T,S as o,aa as m,u as g,F as f,ag as E,V as v,k as C,x as le,z as re,U as x,a5 as u,Z as O,$ as G,a4 as h,av as ie,a6 as pe,ab as F,am as ce}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as P}from"./nbadge-k88iypqm.js";import{_ as de}from"./composable-item.vue-cx3jl4ee.js";import{_ as ue}from"./stacktrace-list.vue-msyjkhr0.js";import{_ as me}from"./ndrawer.vue-jkaykvna.js";import{_ as ke}from"./launch-page.vue-ibwpr0ng.js";import{_ as ye}from"./nlink.vue-gpbxgl1n.js";import{_ as fe}from"./code-diff.vue-e789bk3j.js";import{_ as ve}from"./help-fab.vue-cws4yr5r.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";import"./nmarkdown.vue-mk2gi3ky.js";import"./client-oeqdl4pb.js";import"./filepath-item.vue-gwnp998z.js";import"./index-jc4yj4to.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-ctkw4rc7.js";const he=B({__name:"TimelineItemFunction",props:{item:{}},setup(y){const d=y,p=w(()=>M(d.item.name,50,60,"_op_")),n=w(()=>p.value.replace(/_op_/,"1")),e=w(()=>M(d.item.name,50,40)),l=w(()=>p.value.replace(/_op_/,"0.2"));return(a,r)=>(t(),i("button",{class:"group",style:T({color:n.value,borderLeft:`2px solid ${n.value}`}),relative:"","bg-base":"","text-sm":"",transition:"","hover:z-1000":""},[o("div",{style:T({backgroundColor:l.value}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),o("div",{style:T({color:e.value,"--c":n.value}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},m(a.item.name),5)],4))}}),_e={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(y,{emit:d}){const p=y,n=d,e=j(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:l=>l,future:l=>l,invalid:"-",second:l=>l?`${l}s`:"",minute:l=>`${l}m`,hour:l=>`${l}h`,week:l=>`${l}w`,day:l=>`${l}d`,month:l=>`${l}mo`,year:l=>`${l}y`}});return(l,a)=>{const r=he;return t(),i("div",_e,[o("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:a[0]||(a[0]=s=>l.segment.route?n("select",l.segment.route):void 0)},m(l.segment.route?.event.to),1),o("div",be,m(g(e))+" ago ",1),o("div",null,[(t(!0),i(f,null,E(l.segment.functions,(s,c)=>(t(),v(r,{key:c,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:k=>n("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,De=50;function Ae(y){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const n of y){const e=n.end||n.start;(n.start-p.end>xe||n.type==="route")&&(p={start:n.start,end:e,events:[],functions:[],duration:0},d.push(p)),p.events.push(n),p.end=e+De}return d.forEach((n,e)=>{const l=n.end-n.start,a=[];n.duration=l,n.previousGap=e>0?n.start-d[e-1].end:0,n.events.forEach(r=>{const s=r.end||r.start;let c=0;r.type!=="route"&&(c=a.findIndex(D=>D<=r.start),c===-1?(c=a.length,a.push(s+1e3)):a[c]=s+1e3);const k={event:r,segment:n,relativeStart:(r.start-n.start)/l,relativeWidth:(s-r.start)/l,layer:c};r.type==="function"?n.functions.push(k):n.route=k})}),d}const $e={relative:""},Ce={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=y,n=d,e=C(),l=C(),a=C(),r=C(),s=C(!0),c=C(1.5),k=w(()=>Ae(p.data.events)),D=w(()=>(p.data.events.length,e.value?.scrollWidth||window.innerWidth));function A(){r.value&&(r.value.style.width=`${D.value}px`)}function S(){s.value&&e.value&&(e.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}),a.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}))}return le(()=>p.data.events.length,async()=>{await re(),A(),S()},{flush:"post"}),H(e,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),a.value.scrollLeft=e.value.scrollLeft,s.value=e.value.scrollLeft>=e.value.scrollWidth-e.value.clientWidth)}),H(a,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),e.value.scrollLeft=a.value.scrollLeft)}),H(e,"wheel",_=>{_.altKey?(c.value=Y(c.value+_.deltaY/200,.5,3),A()):e.value.scrollLeft+=_.deltaY}),(_,L)=>{const $=W,V=ge;return t(),i(f,null,[o("div",$e,[o("div",{ref_key:"minimap",ref:l,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,b.duration/10)/D.value*100}%`})},[(t(!0),i(f,null,E(b.functions,(I,J)=>(t(),i("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHslColorFromStringHash"in _?_.getHslColorFromStringHash:g(M))(I.event.name,50,60)})},null,4))),128)),b.route?(t(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${b.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),o("div",{ref_key:"minimapScroller",ref:a,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[o("div",{ref_key:"minimapScrollerInner",ref:r,"h-1px":""},null,512)],512)]),o("div",{ref_key:"scroller",ref:e,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i(f,{key:N},[b.previousGap&&b.previousGap>=200?(t(),i("div",Ce,[u($,{op50:"",duration:b.previousGap,color:!1},null,8,["duration"])])):x("",!0),u(V,{"flex-inline":"","of-x-hidden":"","bg-base":"","hover:of-x-visible":"",class:O(N===k.value.length-1?"border-r border-base":""),segment:b,style:T({width:`${Math.max(50,b.duration/10)*c.value}px`}),onSelect:L[0]||(L[0]=I=>n("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=U(Be,[["__scopeId","data-v-da163089"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne={flex:"~","ml--1":"","font-mono":""},Fe={key:0,mr2:"",op30:""},Ee={op75:""},Le={flex:"~ col items-start"},Ie={"text-xs":"","font-mono":"",op30:""},Ve={"text-green":"","font-bold":"","font-mono":""},Me=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=d;return(n,e)=>{const l=W;return t(),i("div",Te,[(t(!0),i(f,null,E(n.data.events,(a,r)=>(t(),i("button",{key:r,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>p("select",a)},[a.type==="function"?(t(),i(f,{key:0},[e[2]||(e[2]=o("div",{"i-carbon-function":"",op50:""},null,-1)),o("div",{"font-mono":"",style:T({color:a.type==="function"?("getHslColorFromStringHash"in n?n.getHslColorFromStringHash:g(M))(a.name,50,60):""})},m(a.name),5),o("div",Ne,[e[0]||(e[0]=o("div",{op30:""}," ( ",-1)),(t(!0),i(f,null,E(a.args,(s,c)=>(t(),i(f,{key:c},[c?(t(),i("div",Fe," , ")):x("",!0),o("div",Ee,m(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),e[1]||(e[1]=o("div",{op30:""}," ) ",-1))])],64)):(t(),i(f,{key:1},[e[3]||(e[3]=o("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[o("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1)),o("div",Le,[o("div",Ie,m(a.from),1),o("div",Ve,m(a.to),1)])],64)),e[4]||(e[4]=o("div",{"flex-auto":""},null,-1)),a.end?(t(),v(l,{key:2,duration:a.end-a.start,color:a.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),e[5]||(e[5]=o("div",{"min-h-100":""},null,-1))])}}}),We={key:0,"text-blue":""},He={key:1,"text-purple":""},je={key:2,"text-green":""},ze={key:3,"text-gray":""},Oe={key:4,"text-gray":""},Re={key:5,"text-gray":""},Ge={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Pe={key:1},Je={p2:"","text-sm":"",border:"t base"},Ye=B({__name:"TimelineArgumentView",props:{value:{}},setup(y){const d=y,p=C(),n=C();function e(){try{p.value=JSON.parse(JSON.stringify(d.value))}catch(s){console.error(s),n.value=s}}const l=B({emits:["setup"],setup(s,{emit:c}){return c("setup"),()=>null}}),a=q(),r=X();return(s,c)=>{const k=z,D=G("VMenu");return typeof s.value=="string"?(t(),i("div",We,m(JSON.stringify(s.value)),1)):typeof s.value=="number"?(t(),i("div",He,m(s.value),1)):typeof s.value=="boolean"?(t(),i("div",je,m(s.value),1)):typeof s.value>"u"?(t(),i("div",ze," undefined ")):typeof s.value=="function"?(t(),i("div",Oe," [Function"+m(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(t(),i("div",Re," null ")):(t(),v(D,{key:6,placement:"top"},{popper:h(()=>[u(g(l),{onSetup:e}),n.value?(t(),i("div",Ge," Failed to display object: "+m(n.value),1)):p.value?(t(),i("div",Pe,[u(g(ie),pe({"model-value":p.value},s.$attrs,{class:["json-editor-vue",[g(a)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),o("div",Je,[u(k,{title:"Copy to clipboard",icon:"carbon-copy",onClick:c[0]||(c[0]=A=>g(r)(JSON.stringify(p.value,null,2),"timeline-argument"))},{default:h(()=>c[1]||(c[1]=[F(" Copy ")])),_:1,__:[1]})])])):x("",!0)]),default:h(()=>[o("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:O([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},m(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),Ue={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},qe={"mx--1":""},Xe={flex:"~ gap-1","font-mono":""},Ze={key:1},Ke={key:0,op30:""},Qe={flex:"~ gap-1","text-sm":""},es={class:"text-sm text-gray-400"},ss=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(y){const d=y,p=j(()=>d.record.start,{showSecond:!0}),n=Z(),e=w(()=>n.value?.metadata),l=w(()=>n.value?.imports.find(a=>a.as===d.record.name));return(a,r)=>{const s=P,c=de,k=Ye,D=W,A=ue;return a.record?(t(),i("div",Ue,[o("div",qe,[u(s,{n:"yellow",textContent:"Function call"})]),o("div",Xe,[l.value?(t(),v(c,{key:0,item:l.value,metadata:e.value,counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),i("span",Ze,m(a.record.name),1)),r[0]||(r[0]=o("span",{ml1:"",op30:""},"(",-1)),(t(!0),i(f,null,E(a.record.args,(S,_)=>(t(),i(f,{key:_},[_?(t(),i("span",Ke,", ")):x("",!0),u(k,{value:S},null,8,["value"])],64))),128)),r[1]||(r[1]=o("span",{op30:""},")",-1))]),o("div",Qe,[a.record.end?(t(),v(D,{key:0,duration:a.record.end-a.record.start},null,8,["duration"])):x("",!0),r[2]||(r[2]=o("span",{mx1:"",op50:""},"·",-1)),o("div",es,m(g(p)),1)]),a.record.stacktrace?(t(),v(A,{key:0,stacktrace:a.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ns={key:0,"p-4":"",flex:"~ col gap-2"},os={"mx--1":""},ts={flex:"~ gap-1 items-center","font-mono":""},as={op50:""},ls={flex:"~ gap-1","text-sm":""},rs={class:"text-sm text-gray-400"},is=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(y){const d=y,p=j(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=P,a=W;return n.record?(t(),i("div",ns,[o("div",os,[u(l,{n:"green",textContent:"Route Change"})]),o("div",ts,[o("span",as,m(n.record.from),1),e[0]||(e[0]=o("span",{"i-carbon-arrow-right":"",op50:""},null,-1)),o("span",null,m(n.record.to),1)]),o("div",ls,[n.record.end?(t(),v(a,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),e[1]||(e[1]=o("span",{mx1:"",op50:""},"·",-1)),o("div",rs,m(g(p)),1)])])):x("",!0)}}}),ps={key:0,"h-screen":"","of-hidden":""},cs={"h-screen":"","w-full":"",flex:"","flex-col":""},ds={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},us={"text-sm":""},ms={"min-h-50":"",px3:"",py2:""},ks=B({__name:"TimelineView",setup(y){const d=K(),p=C("table"),n=C(),e=w(()=>d.value?.metrics.clientTimeline());function l(){e.value&&(e.value.events=[])}function a(){p.value=p.value==="table"?"list":"table"}return(r,s)=>{const c=G("VTooltip"),k=z,D=we,A=Me,S=ss,_=is,L=me;return e.value?(t(),i("div",ps,[o("div",cs,[o("div",ds,[u(c,{flex:""},{popper:h(()=>[o("div",us,m(e.value.options.enabled?"Recording...":"Paused"),1)]),default:h(()=>[o("div",{"text-lg":"",class:O(e.value.options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),e.value.options.enabled?(t(),v(k,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=$=>e.value.options.enabled=!1)},{default:h(()=>s[6]||(s[6]=[F(" Stop Tracking ")])),_:1,__:[6]})):(t(),v(k,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=$=>e.value.options.enabled=!0)},{default:h(()=>s[5]||(s[5]=[F(" Start Tracking ")])),_:1,__:[5]})),s[7]||(s[7]=o("div",{"flex-auto":""},null,-1)),u(k,{icon:p.value==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:a},null,8,["icon"]),u(k,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:l})]),p.value==="table"?(t(),v(D,{key:0,data:{...e.value},onSelect:s[2]||(s[2]=$=>n.value=$.event)},null,8,["data"])):(t(),v(A,{key:1,data:{...e.value},onSelect:s[3]||(s[3]=$=>n.value=$)},null,8,["data"]))]),u(L,{"model-value":!!n.value,"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=$=>n.value=void 0)},{default:h(()=>[o("div",ms,[n.value?.type==="function"?(t(),v(S,{key:0,record:n.value},null,8,["record"])):n.value?.type==="route"?(t(),v(_,{key:1,record:n.value},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),ys={class:"markdown-body"},fs={__name:"timeline",setup(y,{expose:d}){return d({frontmatter:{}}),(n,e)=>(t(),i("div",ys,e[0]||(e[0]=[o("h1",null,"Timeline",-1),o("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ",-1),ce(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span> | ||
| <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#app/composables/router</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"></span> | ||
| <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span> | ||
| <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span> | ||
| <span class="line"></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span> | ||
| <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"></</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#999999;--shiki-dark:#666666;">></span></span> | ||
| <span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span> | ||
| <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span> | ||
| <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span> | ||
| <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span> | ||
| <span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span> | ||
| <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span> | ||
| <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span> | ||
| <span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span> | ||
| <span class="line"></span></code></pre>`,6)])))}},vs={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},hs={op50:""},_s={flex:"~ gap-3",mt2:"","justify-end":""},js=B({__name:"timeline",setup(y){const d=Q(),p=ee(),n=se(),e=ne();async function l(){try{const[a,r]=await R.enableTimeline(!0);if(!await n.start(a,r))return;await R.enableTimeline(!1)}catch{ae({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(a,r)=>{const s=ks,c=ke,k=oe,D=ye,A=fe,S=z,_=te,L=fs,$=ve;return t(),i(f,null,[g(d)?.timeline?.enabled?(t(),v(s,{key:0})):(t(),i(f,{key:1},[u(k,null,{default:h(()=>[u(c,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:l})]),_:1}),u(g(n),null,{default:h(({resolve:V,args:b})=>[u(_,{"model-value":!0,onClose:N=>V(!1)},{default:h(()=>[o("div",vs,[r[5]||(r[5]=o("h2",{"text-xl":""},[o("span",{capitalize:""},"Enable Timeline?")],-1)),o("p",hs,[r[1]||(r[1]=F(" Your ")),u(D,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=N=>g(e)(g(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),r[2]||(r[2]=F(" will be updated as: "))]),u(A,{from:b[0],to:b[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),r[6]||(r[6]=o("p",null,[o("span",{op50:""},"Then Nuxt will "),o("span",{"text-orange":""},"restart automatically"),F(". ")],-1)),o("div",_s,[u(S,{onClick:N=>V(!1)},{default:h(()=>r[3]||(r[3]=[F(" Cancel ")])),_:2,__:[3]},1032,["onClick"]),u(S,{n:"solid primary",capitalize:"",onClick:N=>V(!0)},{default:h(()=>r[4]||(r[4]=[F(" Enable ")])),_:2,__:[4]},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),u($,null,{default:h(()=>[u(L)]),_:1})],64)}}});export{js as default}; |
| import{_ as w}from"./nnavbar.vue-bqgn7lkr.js";import{_ as S}from"./ncode-block.vue-ctkw4rc7.js";import{bi as D,bj as B,S as j,i as P,n as E,a8 as I}from"./gk0e56xz.js";import{J as c,a3 as i,S as a,p as U,k as m,w as W,q as _,a5 as l,a4 as u,V as q,aa as v,F as d,ag as z,Z as G}from"./vendor/json-editor-vue-m9gzt21j.js";import{_ as H}from"./help-fab.vue-cws4yr5r.js";import"./client-oeqdl4pb.js";import"./vendor/unocss-oyl7opas.js";import"./vendor/shiki-imfwxqoq.js";const J={class:"markdown-body"},L={__name:"virtual-files",setup(h,{expose:r}){return r({frontmatter:{}}),(p,o)=>(i(),c("div",J,o[0]||(o[0]=[a("h1",null,"Virtual Files",-1),a("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1)])))}},R=["onClick"],Z={key:0,"h-full":"","of-hidden":"",flex:"~ col"},A={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},oe=U({__name:"virtual-files",setup(h){const r=m(""),n=D(),p=B(),o=m();W(()=>{if(!p.value)return;const e=`/_vfs.json/${encodeURIComponent(p.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>o.value=t.current)});function x(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const f=_(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=_(()=>new j(f.value,{keys:["id","path"]})),b=_(()=>r.value?k.value.search(r.value).map(e=>e.item):f.value);return(e,t)=>{const y=w,g=S,C=E,F=P,$=I,N=L,V=H;return i(),c(d,null,[l($,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(y,{search:r.value,"onUpdate:search":t[0]||(t[0]=s=>r.value=s),"no-padding":"",p3:""},null,8,["search"]),(i(!0),c(d,null,z(b.value,s=>(i(),c(d,{key:s.id},[a("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:G(s.id===o.value?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:K=>p.value=s.id},v(x(s.id)),11,R),t[1]||(t[1]=a("div",{"x-divider":""},null,-1))],64))),128))]),right:u(()=>[o.value?.content?(i(),c("div",Z,[a("div",A,[a("code",null,v(o.value.id),1)]),l(g,{"h-full":"","of-auto":"","text-sm":"",code:o.value.content,lang:"typescript"},null,8,["code"])])):(i(),q(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>t[2]||(t[2]=[a("span",{op75:""},"Select a file to start",-1)])),_:1,__:[2]})]),_:1}))]),_:1}),l(V,null,{default:u(()=>[l(N)]),_:1})],64)}}});export{oe as default}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 4 instances in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 4 instances in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
7316485
040612
075
-1.32%+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated