@nuxt/devtools 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/chunks/module-main.mjs +71 -42
  2. package/dist/chunks/vscode.mjs +4 -4
  3. package/dist/client/200.html +35 -35
  4. package/dist/client/404.html +35 -35
  5. package/dist/client/_nuxt/{CodeDiff.vue.495a2700.js → CodeDiff.vue.0700b533.js} +1 -1
  6. package/dist/client/_nuxt/{ComposableItem.vue.09c56ec4.js → ComposableItem.vue.869f4305.js} +1 -1
  7. package/dist/client/_nuxt/{DataSchemaButton.vue.058ff215.js → DataSchemaButton.vue.72b202db.js} +1 -1
  8. package/dist/client/_nuxt/{DataSchemaDrawer.d62bbda3.js → DataSchemaDrawer.3aeebd14.js} +3 -3
  9. package/dist/client/_nuxt/{DurationDisplay.vue.e7d2f90b.js → DurationDisplay.vue.37c54f2c.js} +1 -1
  10. package/dist/client/_nuxt/{FilepathItem.vue.feb8a13c.js → FilepathItem.vue.ca308ea2.js} +1 -1
  11. package/dist/client/_nuxt/{HelpFab.vue.70bfd8f0.js → HelpFab.vue.6bf23ece.js} +1 -1
  12. package/dist/client/_nuxt/LaunchPage.vue.c8e4a567.js +1 -0
  13. package/dist/client/_nuxt/{NBadge.b912de36.js → NBadge.0b42c7f8.js} +1 -1
  14. package/dist/client/_nuxt/{NCheckbox.vue.a65a9466.js → NCheckbox.vue.6b5ce38f.js} +1 -1
  15. package/dist/client/_nuxt/{NCodeBlock.vue.c114d969.js → NCodeBlock.vue.c80c8282.js} +1 -1
  16. package/dist/client/_nuxt/{NDrawer.vue.4bcebe5d.js → NDrawer.vue.e2617b9c.js} +1 -1
  17. package/dist/client/_nuxt/{NDropdown.vue.32f13066.js → NDropdown.vue.ff9a8df2.js} +1 -1
  18. package/dist/client/_nuxt/{NIconTitle.vue.dcd70230.js → NIconTitle.vue.83cd82be.js} +1 -1
  19. package/dist/client/_nuxt/{NLink.vue.353afc82.js → NLink.vue.92e49c8b.js} +1 -1
  20. package/dist/client/_nuxt/{NMarkdown.vue.4e215b1f.js → NMarkdown.vue.07fe8875.js} +1 -1
  21. package/dist/client/_nuxt/{NNavbar.vue.29f03776.js → NNavbar.vue.823096f1.js} +1 -1
  22. package/dist/client/_nuxt/{NSectionBlock.56f7fa97.js → NSectionBlock.c3646235.js} +1 -1
  23. package/dist/client/_nuxt/{NSelect.vue.d4b5d548.js → NSelect.vue.c8c511ae.js} +1 -1
  24. package/dist/client/_nuxt/{NSelectTabs.vue.f4ae464e.js → NSelectTabs.vue.ec21a846.js} +1 -1
  25. package/dist/client/_nuxt/{NSwitch.vue.95382b67.js → NSwitch.vue.1cea2bc6.js} +1 -1
  26. package/dist/client/_nuxt/{NTip.vue.fbfe6de9.js → NTip.vue.ca2f8e8a.js} +1 -1
  27. package/dist/client/_nuxt/{StateEditor.vue.9d7dcb3f.js → StateEditor.vue.2abb9bb3.js} +1 -1
  28. package/dist/client/_nuxt/{__blank.961dc152.js → __blank.aff34a18.js} +1 -1
  29. package/dist/client/_nuxt/analyze-build.76d0de73.js +1 -0
  30. package/dist/client/_nuxt/{assets.5182b2b7.js → assets.2cb4325d.js} +3 -3
  31. package/dist/client/_nuxt/builds/latest.json +1 -1
  32. package/dist/client/_nuxt/builds/meta/c6495541-4f21-430a-9b71-cda3f41cbf03.json +1 -0
  33. package/dist/client/_nuxt/{client.4841a079.js → client.b8ca1554.js} +1 -1
  34. package/dist/client/_nuxt/{components.3821affe.js → components.f8fde87c.js} +5 -5
  35. package/dist/client/_nuxt/{custom-_name_.45e0e481.js → custom-_name_.779ca3e5.js} +1 -1
  36. package/dist/client/_nuxt/{default.551695d6.js → default.50175b13.js} +1 -1
  37. package/dist/client/_nuxt/{entry.5d59ff5c.js → entry.9a5af3dc.js} +6 -6
  38. package/dist/client/_nuxt/{error-404.c4b39504.js → error-404.0dae1ccf.js} +1 -1
  39. package/dist/client/_nuxt/{error-500.4029de92.js → error-500.0a479375.js} +1 -1
  40. package/dist/client/_nuxt/{full.b09bb7d2.js → full.f21cfe4d.js} +1 -1
  41. package/dist/client/_nuxt/{hooks.ad652487.js → hooks.08bf14b9.js} +1 -1
  42. package/dist/client/_nuxt/{imports.779c7207.js → imports.10f1634a.js} +1 -1
  43. package/dist/client/_nuxt/{index.8874e47c.js → index.06e4cc9c.js} +1 -1
  44. package/dist/client/_nuxt/{index.07112662.js → index.b567c37e.js} +1 -1
  45. package/dist/client/_nuxt/{json-editor-vue.b1851782.js → json-editor-vue.c3cbb111.js} +1 -1
  46. package/dist/client/_nuxt/{modules.53d23733.js → modules.63cf2a03.js} +2 -2
  47. package/dist/client/_nuxt/{none.48f4e2a5.js → none.7a39bbba.js} +1 -1
  48. package/dist/client/_nuxt/{open-graph.545307be.js → open-graph.7c382b87.js} +2 -2
  49. package/dist/client/_nuxt/overview.ea00b3f6.js +1 -0
  50. package/dist/client/_nuxt/{pages.065c5174.js → pages.e4e22a03.js} +1 -1
  51. package/dist/client/_nuxt/{payload.f3ad6ba9.js → payload.d7e93a46.js} +1 -1
  52. package/dist/client/_nuxt/{plugins.97361fa6.js → plugins.b2f10668.js} +1 -1
  53. package/dist/client/_nuxt/{runtime-configs.04157e18.js → runtime-configs.9fe5125f.js} +1 -1
  54. package/dist/client/_nuxt/{server-routes.631067b9.js → server-routes.95c3caa5.js} +2 -2
  55. package/dist/client/_nuxt/{settings.72bdb2b5.js → settings.78f334a8.js} +1 -1
  56. package/dist/client/_nuxt/state-components.d81178a3.js +1 -0
  57. package/dist/client/_nuxt/{state-modules.3599ee72.js → state-modules.b9e84f85.js} +1 -1
  58. package/dist/client/_nuxt/{storage-options.5fca38da.js → storage-options.2b389201.js} +1 -1
  59. package/dist/client/_nuxt/storage.44a95fac.js +1 -0
  60. package/dist/client/_nuxt/{terminals.ad730beb.js → terminals.539d48eb.js} +1 -1
  61. package/dist/client/_nuxt/timeline.5deddf7e.js +29 -0
  62. package/dist/client/_nuxt/unocss-runtime.dfaa24d0.js +2 -0
  63. package/dist/client/_nuxt/{virtual-files.7fd05201.js → virtual-files.46ad04c9.js} +1 -1
  64. package/dist/client/index.html +35 -35
  65. package/dist/module.json +1 -1
  66. package/dist/module.mjs +1 -1
  67. package/dist/runtime/plugins/view/FrameBox.vue +1 -1
  68. package/dist/runtime/plugins/view/client.mjs +3 -2
  69. package/dist/shared/{devtools.ca660ec5.mjs → devtools.6f6e0f47.mjs} +3 -6
  70. package/package.json +21 -21
  71. package/dist/client/__blank/index.html +0 -42
  72. package/dist/client/_nuxt/LaunchPage.vue.68d99ad2.js +0 -1
  73. package/dist/client/_nuxt/analyze-build.29ca822b.js +0 -1
  74. package/dist/client/_nuxt/builds/meta/9c2bc90a-5134-40c2-becb-286bd0304a77.json +0 -1
  75. package/dist/client/_nuxt/overview.60692331.js +0 -1
  76. package/dist/client/_nuxt/state-components.9496e3b2.js +0 -1
  77. package/dist/client/_nuxt/storage.be53a14a.js +0 -1
  78. package/dist/client/_nuxt/timeline.b8cc1d67.js +0 -29
  79. package/dist/client/_nuxt/unocss-runtime.55c74b5c.js +0 -2
  80. package/dist/client/modules/analyze-build/index.html +0 -42
  81. package/dist/client/modules/assets/index.html +0 -42
  82. package/dist/client/modules/components/index.html +0 -42
  83. package/dist/client/modules/hooks/index.html +0 -42
  84. package/dist/client/modules/imports/index.html +0 -42
  85. package/dist/client/modules/modules/index.html +0 -42
  86. package/dist/client/modules/open-graph/index.html +0 -42
  87. package/dist/client/modules/overview/index.html +0 -42
  88. package/dist/client/modules/pages/index.html +0 -42
  89. package/dist/client/modules/payload/index.html +0 -42
  90. package/dist/client/modules/plugins/index.html +0 -42
  91. package/dist/client/modules/runtime-configs/index.html +0 -42
  92. package/dist/client/modules/server-routes/index.html +0 -42
  93. package/dist/client/modules/storage/index.html +0 -42
  94. package/dist/client/modules/terminals/index.html +0 -42
  95. package/dist/client/modules/timeline/index.html +0 -42
  96. package/dist/client/modules/virtual-files/index.html +0 -42
  97. package/dist/client/settings/index.html +0 -42
@@ -1,4 +1,4 @@
1
- import{d as ae,r as A,bk as we,o as t,m as h,k as u,G as L,h as w,f as e,bl as se,t as O,p as N,v as G,a7 as He,a8 as Z,F as D,n as B,a4 as fe,Y as We,a as T,w as $e,i as v,j as $,W as Se,_ as me,bm as Ge,bn as Te,aw as Je,bo as Ke,bp as Qe,bq as Ye,aa as Xe,as as Ze,au as pe,a9 as et,ax as tt,e as ot,a0 as Ve,l as X,I as le,ar as nt,U as st,A as Re,br as lt,bs as at,af as rt,S as it,bt as ut,am as dt}from"./entry.5d59ff5c.js";import{_ as ct}from"./NNavbar.vue.29f03776.js";import{_ as Ue}from"./NBadge.b912de36.js";import{_ as Ne}from"./NSelect.vue.d4b5d548.js";import{_ as pt}from"./NCheckbox.vue.a65a9466.js";import{u as De,_ as ft}from"./storage-options.5fca38da.js";import{_ as mt}from"./DataSchemaButton.vue.058ff215.js";import{_ as vt}from"./NCodeBlock.vue.c114d969.js";import{C as xe,S as Ie}from"./constants.2cc6e981.js";import{t as ht}from"./json-editor-vue.b1851782.js";import{_ as yt}from"./NSectionBlock.56f7fa97.js";import{_ as gt}from"./NDrawer.vue.4bcebe5d.js";import"./client.4841a079.js";import"./NIconTitle.vue.dcd70230.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _t(s,g){if(typeof s!="string")throw new TypeError("argument str must be a string");const d={},_=(g||{}).decode||xt;let k=0;for(;k<s.length;){const f=s.indexOf("=",k);if(f===-1)break;let b=s.indexOf(";",k);if(b===-1)b=s.length;else if(b<f){k=s.lastIndexOf(";",f-1)+1;continue}const a=s.slice(k,f).trim();if(d[a]===void 0){let c=s.slice(f+1,b).trim();c.codePointAt(0)===34&&(c=c.slice(1,-1)),d[a]=kt(c,_)}k=b+1}return d}function Ce(s,g,d){const n=d||{},_=n.encode||Ct;if(typeof _!="function")throw new TypeError("option encode is invalid");if(!ne.test(s))throw new TypeError("argument name is invalid");const k=_(g);if(k&&!ne.test(k))throw new TypeError("argument val is invalid");let f=s+"="+k;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");f+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ne.test(n.domain))throw new TypeError("option domain is invalid");f+="; Domain="+n.domain}if(n.path){if(!ne.test(n.path))throw new TypeError("option path is invalid");f+="; Path="+n.path}if(n.expires){if(!bt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");f+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(f+="; HttpOnly"),n.secure&&(f+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":f+="; Priority=Low";break;case"medium":f+="; Priority=Medium";break;case"high":f+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return f}function bt(s){return Object.prototype.toString.call(s)==="[object Date]"||s instanceof Date}function kt(s,g){try{return g(s)}catch{return s}}function xt(s){return s.includes("%")?decodeURIComponent(s):s}function Ct(s){return encodeURIComponent(s)}const wt=u("div",{"x-divider":""},null,-1),Ee=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(s){const g=A(!0),d=we();return(n,_)=>{const k=fe,f=Ue,b=Ee;return t(),h("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:L([{"bg-active":e(d)===n.item.filepath}]),style:He({paddingLeft:`calc(0.5rem + ${n.index*1.5}em)`}),onClick:_[0]||(_[0]=a=>{g.value=!e(g),d.value=n.item.filepath})},[u("div",{class:L({"w-12":!n.item.routes}),"flex-none":"","text-left":""},[n.item.type==="collection"?(t(),w(k,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(g)?90:0,transition:""},null,8,["transform-rotate"])):(t(),w(f,{key:1,class:L(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(n.item.method||"*")),textContent:O((n.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:L({"flex items-center":n.item.routes}),"text-sm":"","font-mono":""},[n.item.type==="collection"?(t(),w(k,{key:0,title:`${n.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),G(" "+O(n.item.route),1)],2)],6),wt,e(g)?Z(n.$slots,"default",{key:0},()=>[(t(!0),h(D,null,B(n.item.routes,a=>(t(),w(b,{key:a.filepath,item:a,index:n.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),$t={p4:"",flex:"~ col gap-4"},St={key:1,ml2:"",flex:""},Tt=["value"],Vt={key:0,flex:"","gap-4":""},Rt=u("div",{"flex-auto":""},null,-1),je=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(s,{emit:g}){const d=s,_=We(d,"modelValue",g,{passive:!0}),k=T(()=>[...d.keys,"active","key","value","type"]),f=T(()=>{const c={};for(const l of k.value)c[l]=d.default[l]||"";return c}),b=["string","number","boolean","file","date","time","datetime-local"];function a(c,l){const I=l.target;if(I.files&&I.files[0]){const M=I.files[0],H=new FileReader;H.readAsDataURL(M),H.onload=()=>{_.value[c].value=H.result}}}return $e(()=>_,c=>{c.value.forEach(l=>{if(l.type==="number"&&typeof l.value!="number"){const I=Number.parseFloat(l.value);l.value=Number.isNaN(I)?0:I}else l.type==="boolean"&&typeof l.value!="boolean"?l.value=!0:l.type==="file"&&typeof l.value!="object"?l.value="":l.type==="date"&&typeof l.value=="string"&&!l.value.match(/^\d{4}-\d{2}-\d{2}$/)?l.value=new Date().toISOString().slice(0,10):l.type==="time"&&typeof l.value=="string"&&!l.value.match(/^\d{2}:\d{2}$/)?l.value=new Date().toISOString().slice(11,16):l.type==="datetime-local"&&typeof l.value=="string"&&!l.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?l.value=new Date().toISOString().slice(0,16):l.type==="string"&&(l.value=l.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(c,l)=>{const I=pt,M=Se,H=Ne,S=fe,C=me;return t(),h("div",$t,[(t(!0),h(D,null,B(e(_),(i,P)=>(t(),h("div",{key:P,flex:"~ gap-2","justify-around":""},[Z(c.$slots,"input",{item:i}),(t(!0),h(D,null,B(e(k),x=>(t(),h(D,{key:x},[i.type!==null&&x==="active"?(t(),w(I,{key:0,modelValue:i[x],"onUpdate:modelValue":y=>i[x]=y,n:"sm primary",disabled:c.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):N("",!0),i.type!==null&&x==="key"?(t(),w(M,{key:1,modelValue:i[x],"onUpdate:modelValue":y=>i[x]=y,placeholder:x,"flex-1":"","font-mono":"",n:"sm primary",disabled:c.disabled,class:L(c.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):x==="value"?(t(),h(D,{key:2},[i.type==="file"?(t(),w(M,{key:0,type:"file",disabled:c.disabled,class:L(c.disabled?"op75":""),onChange:y=>a(P,y)},null,8,["disabled","class","onChange"])):i.type==="boolean"?(t(),h("div",St,[v(I,{modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,placeholder:"Value",n:"green lg",disabled:c.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),w(M,{key:2,modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,type:i.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:c.disabled,class:L(c.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):x==="type"?(t(),w(H,{key:3,modelValue:i.type,"onUpdate:modelValue":y=>i.type=y,n:"sm green",class:L(c.disabled?"op75":""),disabled:c.disabled},{default:$(()=>[(t(),h(D,null,B(b,y=>u("option",{key:y,value:y},O(y),9,Tt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):N("",!0)],64))),128)),Z(c.$slots,"input-actions",{},()=>[v(C,{n:"red",disabled:c.disabled,class:L(c.disabled?"op0!":""),onClick:x=>e(_).splice(P,1)},{default:$(()=>[v(S,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),c.disabled?N("",!0):(t(),h("div",Vt,[Z(c.$slots,"actions",{params:e(_)},()=>[v(C,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:l[0]||(l[0]=i=>e(_).push({...e(f)}))},{default:$(()=>[G(" Add ")]),_:1}),Rt,e(_).length?(t(),w(C,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:l[1]||(l[1]=i=>_.value=[])},{default:$(()=>[G(" Remove All ")]),_:1})):N("",!0)])])),Z(c.$slots,"default")])}}}),Ut={path:"/",watch:!0,decode:s=>Qe(decodeURIComponent(s)),encode:s=>encodeURIComponent(typeof s=="string"?s:JSON.stringify(s))};function Nt(s,g){const d={...Ut,...g},n=Dt(d)||{};let _;d.maxAge!==void 0?_=d.maxAge*1e3:d.expires&&(_=d.expires.getTime()-Date.now());const k=_!==void 0&&_<=0,f=k?void 0:n[s]??d.default?.(),b=_&&!k?jt(f,_):A(f);{const a=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${s}`),c=()=>{Et(s,b.value,d),a?.postMessage(d.encode(b.value))};let l=!1;Ge()&&Te(()=>{l=!0,c(),a?.close()}),a&&(a.onmessage=I=>{l=!0,b.value=d.decode(I.data),Je(()=>{l=!1})}),d.watch?$e(b,()=>{l||c()},{deep:d.watch!=="shallow"}):c()}return b}function Dt(s={}){return _t(document.cookie,s)}function It(s,g,d={}){return g==null?Ce(s,g,{...d,maxAge:-1}):Ce(s,g,d)}function Et(s,g,d={}){document.cookie=It(s,g,d)}function jt(s,g){let d;return Te(()=>{clearTimeout(d)}),Ke((n,_)=>({get(){return n(),s},set(k){clearTimeout(d),d=setTimeout(()=>{s=void 0,_()},g),s=k,_()}}))}const Ot={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Pt={flex:"~ gap2 items-center"},qt={relative:"","w-full":""},At={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Bt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt=u("div",{"flex-auto":""},null,-1),Ft=u("div",{"text-xs":"",op50:""}," Send from ",-1),zt=u("option",{value:"app"}," App ",-1),Ht=u("option",{value:"devtools"}," DevTools ",-1),Wt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Gt={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Kt={flex:"~ gap-4"},Qt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Yt=u("div",{"w-5":"","x-divider":""},null,-1),Xt=u("div",{"flex-none":""}," Default Inputs ",-1),Zt=u("div",{"x-divider":""},null,-1),eo={key:2},to={key:3,border:"b base",relative:"","n-code-block":""},oo={flex:"~ wrap","w-full":""},no=["onClick"],so=u("div",{border:"b base","flex-auto":""},null,-1),lo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},ao=u("div",null,"Response",-1),ro={key:1,"text-xs":"",op50:""},io=u("div",{"flex-auto":""},null,-1),uo=u("div",{op50:""}," Request finished in ",-1),co={key:0,"flex-auto":"","overflow-auto":""},po={border:"~ base","h-full":"","w-full":"",rounded:""},fo=["data"],mo={key:2,"flex-auto":"","overflow-auto":"",p4:""},vo={border:"~ base",rounded:""},ho=["src"],yo={key:1,controls:"",rounded:""},go=["src"],_o=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(s,{emit:g}){const d=s,n=g,[_,k]=Ye(),f=Xe(),b=Ze(),a=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),c=T(()=>a.contentType.includes("application/json")?"json":a.contentType.includes("text/html")?"html":a.contentType.includes("text/css")?"css":a.contentType.includes("text/javascript")?"javascript":a.contentType.includes("image")||a.contentType.includes("video")?"media":a.contentType.includes("text/xml")||a.contentType.includes("application/xml")?"xml":a.contentType.includes("application/pdf")?"pdf":"text"),l=T(()=>{if(c.value==="json")return JSON.stringify(a.data,null,2);if(c.value==="media"||c.value==="pdf"){const o=new Blob([a.data],{type:a.contentType});return URL.createObjectURL(o)}return a.data}),I=A(!1),M=A(!1),H=et(),S=T(()=>d.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),C=T(()=>S.value?.filter(o=>o.startsWith(":")||o.startsWith("**:"))||[]),i=A(d.route.method||"GET"),P=A({}),x=pe({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"}]}),y=A({}),{inputDefaults:R,sendFrom:F}=De("serverRoutes"),j=T(()=>b?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=T(()=>ie.includes(i.value.toUpperCase())),q=A(C.value.length?"params":"query"),V=["input","json"],W=A(V[0]),te=T({get:()=>x[q.value],set:o=>{x[q.value]=o}}),ve=T(()=>({...K(R.value.query),...K(x.query)})),he=T(()=>({...K(R.value.headers),...K(x.headers)})),ue=T(()=>ee.value?W.value==="json"?{...K(R.value.body),...y.value}:{...K(R.value.body),...K(x.body)}:void 0),Oe=T(()=>{let o=window?.location.origin;return o.charAt(o.length-1)==="/"&&(o=o.slice(0,-1)),o}),oe=T(()=>{let o=new URLSearchParams(ve.value).toString();o&&(o=`?${o}`);const p=(S.value?.map(E=>(E.startsWith(":")||E.startsWith("**:"))&&P.value[E]||E).join("")||"")+o;let m=f.value?.app.baseURL||"";return(m==="./"||m===".")&&(m=""),m.endsWith("/")&&(m=m.slice(0,-1)),m+p}),ye=T(()=>Oe.value+oe.value);function K(o){const p=Object.fromEntries(o.filter(({active:m,key:E,value:U})=>m&&E&&U!==void 0).map(({key:m,value:E})=>[m,E]));return Object.entries(p).length?p:void 0}async function ge(){M.value=!0,I.value=!0;const o=Date.now(),p=j.value==="app"?b.value.app.$fetch:$fetch;st("server-routes:fetch",{method:i.value,sendFrom:j.value});try{a.data=await p(ye.value,{method:i.value.toUpperCase(),headers:he.value,query:ve.value,body:ue.value,onResponse({response:m}){a.contentType=(m.headers.get("content-type")||"").toString().toLowerCase().trim(),a.statusCode=m.status,a.error=void 0},onResponseError(m){a.error=m.response._data,a.data=m.response._data}})}catch{}I.value=!1,a.fetchTime=Date.now()-o}const _e=T(()=>{const o=[],p=[],m=Object.entries(he.value).filter(([U,z])=>U&&z&&!(U==="Content-Type"&&z==="application/json")).map(([U,z])=>` '${U}': '${z}'`).join(`,
1
+ import{d as ae,r as A,bl as we,o as t,m as h,k as u,G as L,h as w,f as e,bm as se,t as O,p as N,v as W,a8 as He,a9 as Y,F as D,n as B,a5 as fe,Z as Ge,a as V,w as $e,i as v,j as $,X as Se,_ as me,bn as We,bo as Ve,ax as Je,bp as Ke,bq as Qe,br as Xe,ab as Ze,at as Ye,av as pe,aa as et,ay as tt,e as ot,a1 as Te,l as Z,I as le,as as nt,V as st,A as Re,bs as lt,bt as at,ag as rt,U as it,bu as ut,an as dt}from"./entry.9a5af3dc.js";import{_ as ct}from"./NNavbar.vue.823096f1.js";import{_ as Ue}from"./NBadge.0b42c7f8.js";import{_ as Ne}from"./NSelect.vue.c8c511ae.js";import{_ as pt}from"./NCheckbox.vue.6b5ce38f.js";import{u as De,_ as ft}from"./storage-options.2b389201.js";import{_ as mt}from"./DataSchemaButton.vue.72b202db.js";import{_ as vt}from"./NCodeBlock.vue.c80c8282.js";import{C as xe,S as Ie}from"./constants.2cc6e981.js";import{t as ht}from"./json-editor-vue.c3cbb111.js";import{_ as yt}from"./NSectionBlock.c3646235.js";import{_ as gt}from"./NDrawer.vue.e2617b9c.js";import"./client.b8ca1554.js";import"./NIconTitle.vue.83cd82be.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _t(s,g){if(typeof s!="string")throw new TypeError("argument str must be a string");const d={},_=(g||{}).decode||xt;let k=0;for(;k<s.length;){const f=s.indexOf("=",k);if(f===-1)break;let b=s.indexOf(";",k);if(b===-1)b=s.length;else if(b<f){k=s.lastIndexOf(";",f-1)+1;continue}const a=s.slice(k,f).trim();if(d[a]===void 0){let c=s.slice(f+1,b).trim();c.codePointAt(0)===34&&(c=c.slice(1,-1)),d[a]=kt(c,_)}k=b+1}return d}function Ce(s,g,d){const n=d||{},_=n.encode||Ct;if(typeof _!="function")throw new TypeError("option encode is invalid");if(!ne.test(s))throw new TypeError("argument name is invalid");const k=_(g);if(k&&!ne.test(k))throw new TypeError("argument val is invalid");let f=s+"="+k;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");f+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ne.test(n.domain))throw new TypeError("option domain is invalid");f+="; Domain="+n.domain}if(n.path){if(!ne.test(n.path))throw new TypeError("option path is invalid");f+="; Path="+n.path}if(n.expires){if(!bt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");f+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(f+="; HttpOnly"),n.secure&&(f+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":f+="; Priority=Low";break;case"medium":f+="; Priority=Medium";break;case"high":f+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return f}function bt(s){return Object.prototype.toString.call(s)==="[object Date]"||s instanceof Date}function kt(s,g){try{return g(s)}catch{return s}}function xt(s){return s.includes("%")?decodeURIComponent(s):s}function Ct(s){return encodeURIComponent(s)}const wt=u("div",{"x-divider":""},null,-1),Ee=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(s){const g=A(!0),d=we();return(n,_)=>{const k=fe,f=Ue,b=Ee;return t(),h("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:L([{"bg-active":e(d)===n.item.filepath}]),style:He({paddingLeft:`calc(0.5rem + ${n.index*1.5}em)`}),onClick:_[0]||(_[0]=a=>{g.value=!e(g),d.value=n.item.filepath})},[u("div",{class:L({"w-12":!n.item.routes}),"flex-none":"","text-left":""},[n.item.type==="collection"?(t(),w(k,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(g)?90:0,transition:""},null,8,["transform-rotate"])):(t(),w(f,{key:1,class:L(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(n.item.method||"*")),textContent:O((n.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:L({"flex items-center":n.item.routes}),"text-sm":"","font-mono":""},[n.item.type==="collection"?(t(),w(k,{key:0,title:`${n.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),W(" "+O(n.item.route),1)],2)],6),wt,e(g)?Y(n.$slots,"default",{key:0},()=>[(t(!0),h(D,null,B(n.item.routes,a=>(t(),w(b,{key:a.filepath,item:a,index:n.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),$t={p4:"",flex:"~ col gap-4"},St={key:1,ml2:"",flex:""},Vt=["value"],Tt={key:0,flex:"","gap-4":""},Rt=u("div",{"flex-auto":""},null,-1),je=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(s,{emit:g}){const d=s,_=Ge(d,"modelValue",g,{passive:!0}),k=V(()=>[...d.keys,"active","key","value","type"]),f=V(()=>{const c={};for(const l of k.value)c[l]=d.default[l]||"";return c}),b=["string","number","boolean","file","date","time","datetime-local"];function a(c,l){const I=l.target;if(I.files&&I.files[0]){const M=I.files[0],H=new FileReader;H.readAsDataURL(M),H.onload=()=>{_.value[c].value=H.result}}}return $e(()=>_,c=>{c.value.forEach(l=>{if(l.type==="number"&&typeof l.value!="number"){const I=Number.parseFloat(l.value);l.value=Number.isNaN(I)?0:I}else l.type==="boolean"&&typeof l.value!="boolean"?l.value=!0:l.type==="file"&&typeof l.value!="object"?l.value="":l.type==="date"&&typeof l.value=="string"&&!l.value.match(/^\d{4}-\d{2}-\d{2}$/)?l.value=new Date().toISOString().slice(0,10):l.type==="time"&&typeof l.value=="string"&&!l.value.match(/^\d{2}:\d{2}$/)?l.value=new Date().toISOString().slice(11,16):l.type==="datetime-local"&&typeof l.value=="string"&&!l.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?l.value=new Date().toISOString().slice(0,16):l.type==="string"&&(l.value=l.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(c,l)=>{const I=pt,M=Se,H=Ne,S=fe,C=me;return t(),h("div",$t,[(t(!0),h(D,null,B(e(_),(i,P)=>(t(),h("div",{key:P,flex:"~ gap-2","justify-around":""},[Y(c.$slots,"input",{item:i}),(t(!0),h(D,null,B(e(k),x=>(t(),h(D,{key:x},[i.type!==null&&x==="active"?(t(),w(I,{key:0,modelValue:i[x],"onUpdate:modelValue":y=>i[x]=y,n:"sm primary",disabled:c.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):N("",!0),i.type!==null&&x==="key"?(t(),w(M,{key:1,modelValue:i[x],"onUpdate:modelValue":y=>i[x]=y,placeholder:x,"flex-1":"","font-mono":"",n:"sm primary",disabled:c.disabled,class:L(c.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):x==="value"?(t(),h(D,{key:2},[i.type==="file"?(t(),w(M,{key:0,type:"file",disabled:c.disabled,class:L(c.disabled?"op75":""),onChange:y=>a(P,y)},null,8,["disabled","class","onChange"])):i.type==="boolean"?(t(),h("div",St,[v(I,{modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,placeholder:"Value",n:"green lg",disabled:c.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),w(M,{key:2,modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,type:i.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:c.disabled,class:L(c.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):x==="type"?(t(),w(H,{key:3,modelValue:i.type,"onUpdate:modelValue":y=>i.type=y,n:"sm green",class:L(c.disabled?"op75":""),disabled:c.disabled},{default:$(()=>[(t(),h(D,null,B(b,y=>u("option",{key:y,value:y},O(y),9,Vt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):N("",!0)],64))),128)),Y(c.$slots,"input-actions",{},()=>[v(C,{n:"red",disabled:c.disabled,class:L(c.disabled?"op0!":""),onClick:x=>e(_).splice(P,1)},{default:$(()=>[v(S,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),c.disabled?N("",!0):(t(),h("div",Tt,[Y(c.$slots,"actions",{params:e(_)},()=>[v(C,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:l[0]||(l[0]=i=>e(_).push({...e(f)}))},{default:$(()=>[W(" Add ")]),_:1}),Rt,e(_).length?(t(),w(C,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:l[1]||(l[1]=i=>_.value=[])},{default:$(()=>[W(" Remove All ")]),_:1})):N("",!0)])])),Y(c.$slots,"default")])}}}),Ut={path:"/",watch:!0,decode:s=>Qe(decodeURIComponent(s)),encode:s=>encodeURIComponent(typeof s=="string"?s:JSON.stringify(s))};function Nt(s,g){const d={...Ut,...g},n=Dt(d)||{};let _;d.maxAge!==void 0?_=d.maxAge*1e3:d.expires&&(_=d.expires.getTime()-Date.now());const k=_!==void 0&&_<=0,f=k?void 0:n[s]??d.default?.(),b=_&&!k?jt(f,_):A(f);{const a=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${s}`),c=()=>{Et(s,b.value,d),a?.postMessage(d.encode(b.value))};let l=!1;We()&&Ve(()=>{l=!0,c(),a?.close()}),a&&(a.onmessage=I=>{l=!0,b.value=d.decode(I.data),Je(()=>{l=!1})}),d.watch?$e(b,()=>{l||c()},{deep:d.watch!=="shallow"}):c()}return b}function Dt(s={}){return _t(document.cookie,s)}function It(s,g,d={}){return g==null?Ce(s,g,{...d,maxAge:-1}):Ce(s,g,d)}function Et(s,g,d={}){document.cookie=It(s,g,d)}function jt(s,g){let d;return Ve(()=>{clearTimeout(d)}),Ke((n,_)=>({get(){return n(),s},set(k){clearTimeout(d),d=setTimeout(()=>{s=void 0,_()},g),s=k,_()}}))}const Ot={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Pt={flex:"~ gap2 items-center"},qt={relative:"","w-full":""},At={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Bt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt=u("div",{"flex-auto":""},null,-1),Ft=u("div",{"text-xs":"",op50:""}," Send from ",-1),zt=u("option",{value:"app"}," App ",-1),Ht=u("option",{value:"devtools"}," DevTools ",-1),Gt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Wt={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Kt={flex:"~ gap-4"},Qt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Xt=u("div",{"w-5":"","x-divider":""},null,-1),Zt=u("div",{"flex-none":""}," Default Inputs ",-1),Yt=u("div",{"x-divider":""},null,-1),eo={key:2},to={key:3,border:"b base",relative:"","n-code-block":""},oo={flex:"~ wrap","w-full":""},no=["onClick"],so=u("div",{border:"b base","flex-auto":""},null,-1),lo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},ao=u("div",null,"Response",-1),ro={key:1,"text-xs":"",op50:""},io=u("div",{"flex-auto":""},null,-1),uo=u("div",{op50:""}," Request finished in ",-1),co={key:0,"flex-auto":"","overflow-auto":""},po={border:"~ base","h-full":"","w-full":"",rounded:""},fo=["data"],mo={key:2,"flex-auto":"","overflow-auto":"",p4:""},vo={border:"~ base",rounded:""},ho=["src"],yo={key:1,controls:"",rounded:""},go=["src"],_o=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(s,{emit:g}){const d=s,n=g,[_,k]=Xe(),f=Ze(),b=Ye(),a=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),c=V(()=>a.contentType.includes("application/json")?"json":a.contentType.includes("text/html")?"html":a.contentType.includes("text/css")?"css":a.contentType.includes("text/javascript")?"javascript":a.contentType.includes("image")||a.contentType.includes("video")?"media":a.contentType.includes("text/xml")||a.contentType.includes("application/xml")?"xml":a.contentType.includes("application/pdf")?"pdf":"text"),l=V(()=>{if(c.value==="json")return JSON.stringify(a.data,null,2);if(c.value==="media"||c.value==="pdf"){const o=new Blob([a.data],{type:a.contentType});return URL.createObjectURL(o)}return a.data}),I=A(!1),M=A(!1),H=et(),S=V(()=>d.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),C=V(()=>S.value?.filter(o=>o.startsWith(":")||o.startsWith("**:"))||[]),i=A(d.route.method||"GET"),P=A({}),x=pe({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"}]}),y=A({}),{inputDefaults:R,sendFrom:F}=De("serverRoutes"),j=V(()=>b?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=V(()=>ie.includes(i.value.toUpperCase())),q=A(C.value.length?"params":"query"),T=["input","json"],G=A(T[0]),te=V({get:()=>x[q.value],set:o=>{x[q.value]=o}}),ve=V(()=>({...K(R.value.query),...K(x.query)})),he=V(()=>({...K(R.value.headers),...K(x.headers)})),ue=V(()=>ee.value?G.value==="json"?{...K(R.value.body),...y.value}:{...K(R.value.body),...K(x.body)}:void 0),Oe=V(()=>{let o=window?.location.origin;return o.charAt(o.length-1)==="/"&&(o=o.slice(0,-1)),o}),oe=V(()=>{let o=new URLSearchParams(ve.value).toString();o&&(o=`?${o}`);const p=(S.value?.map(E=>(E.startsWith(":")||E.startsWith("**:"))&&P.value[E]||E).join("")||"")+o;let m=f.value?.app.baseURL||"";return(m==="./"||m===".")&&(m=""),m.endsWith("/")&&(m=m.slice(0,-1)),m+p}),ye=V(()=>Oe.value+oe.value);function K(o){const p=Object.fromEntries(o.filter(({active:m,key:E,value:U})=>m&&E&&U!==void 0).map(({key:m,value:E})=>[m,E]));return Object.entries(p).length?p:void 0}async function ge(){M.value=!0,I.value=!0;const o=Date.now(),p=j.value==="app"?b.value.app.$fetch:$fetch;st("server-routes:fetch",{method:i.value,sendFrom:j.value});try{a.data=await p(ye.value,{method:i.value.toUpperCase(),headers:he.value,query:ve.value,body:ue.value,onResponse({response:m}){a.contentType=(m.headers.get("content-type")||"").toString().toLowerCase().trim(),a.statusCode=m.status,a.error=void 0},onResponseError(m){a.error=m.response._data,a.data=m.response._data}})}catch{}I.value=!1,a.fetchTime=Date.now()-o}const _e=V(()=>{const o=[],p=[],m=Object.entries(he.value).filter(([U,z])=>U&&z&&!(U==="Content-Type"&&z==="application/json")).map(([U,z])=>` '${U}': '${z}'`).join(`,
2
2
  `);i.value.toUpperCase()!=="GET"&&p.push(`method: '${i.value.toUpperCase()}'`),m&&p.push(`headers: {
3
3
  ${m}
4
4
  }`),ue.value&&p.push(`body: ${JSON.stringify(ue.value,null,2)}`);const E=p.length?`, {
@@ -6,4 +6,4 @@ ${p.join(`,
6
6
  `).split(`
7
7
  `).map(U=>` ${U}`).join(`
8
8
  `)}
9
- }`:"";return o.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${E})`}),o.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${E})`}),o}),Q=A(Pe()),J=pe({key:"",value:""}),Le=T(()=>{const o=[];return C.value.length&&o.push({name:"Params",slug:"params",length:C.value.length}),o.push({name:"Query",slug:"query",length:x.query.length}),ee.value&&o.push({name:"Body",slug:"body",length:x.body.length}),o.push({name:"Headers",slug:"headers",length:x.headers.length}),o.push({name:"Cookies",slug:"cookies",length:Q.value.length}),o.push({name:"Snippets",slug:"snippet"}),o});function Pe(){return document.cookie.split("; ").map(o=>{const[p,m]=o.split("=");return{key:p,value:m}}).filter(o=>o.key)}function de(o,p){if(!o)return;const m=Q.value.find(U=>U.key===o),E=Nt(o);m!==void 0?p===void 0&&(Q.value=Q.value.filter(U=>U.key!==o)):(Q.value.push({key:o,value:p}),J.key="",J.value=""),E.value=p}tt(()=>{W.value==="json"&&typeof y.value=="string"&&(y.value=JSON.parse(y.value))});const qe=ot();return(o,p)=>{const m=me,E=Ne,U=Se,z=fe,be=je,Ae=ft,Be=Re,Me=lt,ce=Ue,Fe=mt,ze=vt,ke=Ve("tooltip");return t(),h("div",Ot,[u("div",Lt,[u("div",Pt,[o.route.method?(t(),w(m,{key:0,class:L(["n-badge-base n-sm",("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(e(i))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:$(()=>[G(O(e(i).toUpperCase()),1)]),_:1},8,["class"])):(t(),w(E,{key:1,modelValue:e(i),"onUpdate:modelValue":p[0]||(p[0]=r=>X(i)?i.value=r:null),class:L(["n-badge-base n-sm",("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(e(i))])},{default:$(()=>[(t(),h(D,null,B(re,r=>u("option",{key:r,class:L(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(r))},O(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),u("div",qt,[v(U,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),u("div",At,[le(v(m,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:p[1]||(p[1]=r=>e(qe)(e(ye),"server-route-url"))},null,512),[[ke,"Copy URL"]]),le(v(m,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:p[2]||(p[2]=r=>e(H)(o.route.filepath))},null,512),[[ke,"Open in Editor"]])])]),v(m,{"h-full":"",n:"primary solid",onClick:ge},{default:$(()=>[v(z,{icon:"carbon:send"})]),_:1})])]),u("div",Bt,[(t(!0),h(D,null,B(e(Le),r=>(t(),w(m,{key:r.slug,class:L(e(q)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>q.value=r.slug},{default:$(()=>[v(z,{icon:("ServerRouteTabIcons"in o?o.ServerRouteTabIcons:e(Ie))[r.slug]},null,8,["icon"]),G(" "+O(r.name)+" "+O(r?.length?`(${r.length})`:"")+" ",1),u("span",null,O(e(R)[r.slug]?.length?`(${e(R)[r.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Mt,Ft,v(E,{modelValue:e(j),"onUpdate:modelValue":p[3]||(p[3]=r=>X(j)?j.value=r:null),class:"n-xs",disabled:!e(b)?.app?.$fetch},{default:$(()=>[zt,Ht]),_:1},8,["modelValue","disabled"])]),e(q)==="params"?(t(),h("div",Wt,[(t(!0),h(D,null,B(e(C),r=>(t(),h(D,{key:r},[u("div",Gt,O(r),1),v(U,{modelValue:e(P)[r],"onUpdate:modelValue":Y=>e(P)[r]=Y,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),e(q)==="cookies"?(t(),h("div",Jt,[(t(!0),h(D,null,B(e(Q),r=>(t(),h("div",{key:r.key,flex:"~ gap-4 items-center"},[v(U,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),v(U,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:Y=>de(r.key,Y.target?.value)},null,8,["model-value","onInput"]),v(m,{title:"Delete",n:"red",onClick:Y=>de(r.key,void 0)},{default:$(()=>[v(z,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),u("div",Kt,[v(U,{modelValue:e(J).key,"onUpdate:modelValue":p[4]||(p[4]=r=>e(J).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v(U,{modelValue:e(J).value,"onUpdate:modelValue":p[5]||(p[5]=r=>e(J).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(m,{title:"Add",n:"primary",onClick:p[6]||(p[6]=r=>de(e(J).key,e(J).value))},{default:$(()=>[v(z,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),v(e(_),null,{default:$(()=>[v(be,{modelValue:e(te),"onUpdate:modelValue":p[9]||(p[9]=r=>X(te)?te.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:$(()=>[e(R)[e(q)]?.length?(t(),h(D,{key:0},[u("div",Qt,[Yt,Xt,v(m,{icon:"i-carbon-edit",border:!1,onClick:p[7]||(p[7]=r=>n("open-default-input"))}),Zt]),v(be,{modelValue:e(R)[e(q)],"onUpdate:modelValue":p[8]||(p[8]=r=>e(R)[e(q)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),e(q)==="snippet"?(t(),h("div",eo,[e(_e).length?(t(),w(Ae,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):N("",!0)])):e(te)?(t(),h("div",to,[e(q)==="body"?(t(),h(D,{key:0},[u("div",oo,[(t(),h(D,null,B(V,r=>u("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:L({"border-b":r!==e(W)}),onClick:Y=>W.value=r},[u("div",{class:L({op30:r!==e(W)}),"font-mono":""},O(r),3)],10,no)),64)),so]),e(W)==="input"?(t(),w(e(k),{key:0})):e(W)==="json"?(t(),w(e(ht),nt({key:1,modelValue:e(y),"onUpdate:modelValue":p[10]||(p[10]=r=>X(y)?y.value=r:null),class:[[o.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},o.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(t(),w(e(k),{key:1}))])):N("",!0),e(M)?e(I)?(t(),w(Me,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:$(()=>[G(" Fetching... ")]),_:1})):(t(),h(D,{key:6},[u("div",lo,[ao,e(a).error?(t(),w(ce,{key:0,n:"red"},{default:$(()=>[G(" Error ")]),_:1})):N("",!0),v(ce,{n:e(a).error?"orange":"green",textContent:O(e(a).statusCode)},null,8,["n","textContent"]),e(a).contentType?(t(),h("code",ro,O(e(a).contentType),1)):N("",!0),e(a).contentType==="application/json"?(t(),w(Fe,{key:2,getter:()=>({input:e(l)})},null,8,["getter"])):N("",!0),io,uo,v(ce,{n:"green"},{default:$(()=>[G(O(e(a).fetchTime)+" ms ",1)]),_:1})]),e(c)==="pdf"?(t(),h("div",co,[u("div",po,[u("object",{data:e(l),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,fo)])])):e(c)!=="media"?(t(),w(ze,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(l),lang:e(c)},null,8,["code","lang"])):(t(),h("div",mo,[u("div",vo,[e(a).contentType.includes("image")?(t(),h("img",{key:0,rounded:"",src:e(l)},null,8,ho)):(t(),h("video",yo,[u("source",{src:e(l),type:"video/mp4"},null,8,go)]))])]))],64)):(t(),w(Be,{key:4},{default:$(()=>[v(m,{n:"primary",onClick:ge},{default:$(()=>[v(z,{icon:"carbon:send"}),G(" Send request ")]),_:1})]),_:1}))])}}}),bo={flex:"~ gap1","text-sm":""},ko={key:0,op50:""},xo={op50:""},Co=u("span",{op75:""},"Select a route to start",-1),wo=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),qo=ae({__name:"server-routes",setup(s){const g=A(!1),d=at(),n=we(),{selectedRoute:_,view:k,inputDefaults:f}=De("serverRoutes"),b=T(()=>{!n.value&&_.value&&(n.value=_.value.filepath);const S=d.value?.find(C=>C.filepath===n.value);return n.value!==_.value?.filepath&&S&&(_.value=S),S}),a=A(""),c=T(()=>new rt(d.value||[],{keys:["method","route"],shouldSort:!0})),l=T(()=>d.value?a.value?c.value.search(a.value).map(C=>C.item):d.value:[]),I=T(()=>{const S=[],C=(i,P)=>{i.routes=i.routes||[],i.routes.push(P)};return l.value.forEach(i=>{const P=i.filepath.split("/"),x=P.slice(P.indexOf("server")+1);x.length>0&&x[x.length-1].includes(".")&&x.pop();let y=null;if(x.forEach(R=>{const F=y?y.routes?.find(j=>j.route===R):S.find(j=>j.route===R);if(F)y=F;else{const j={route:R,filepath:R.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};y?C(y,j):S.push(j),y=j}}),i.type==="runtime"){const R=S.find(F=>F.route==="runtime");if(R)C(R,i);else{const F={route:"runtime",filepath:"runtime",type:"collection",routes:[i]};S.push(F)}}else y?C(y,i):S.push(i)}),S});function M(){k.value=k.value==="tree"?"list":"tree"}function H(S){return S.charAt(0).toUpperCase()+S.slice(1)}return(S,C)=>{const i=me,P=ct,x=Ee,y=_o,R=dt,F=Re,j=it,re=je,ie=yt,ee=gt,q=Ve("tooltip");return t(),h(D,null,[v(j,{"storage-key":"tab-server-routes"},{left:$(()=>[v(P,{search:e(a),"onUpdate:search":C[1]||(C[1]=V=>X(a)?a.value=V:null),pb2:""},{actions:$(()=>[le(v(i,{"text-lg":"",icon:e(k)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:M},null,8,["icon"]),[[q,"Toggle View"]]),le(v(i,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:C[0]||(C[0]=V=>g.value=!e(g))},null,512),[[q,"Default Inputs"]])]),default:$(()=>[u("div",bo,[e(a)?(t(),h("span",ko,O(e(l).length)+" matched · ",1)):N("",!0),u("span",xo,O(e(d)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),h(D,null,B(e(k)==="tree"?e(I):e(l),V=>(t(),w(x,{key:V.filepath,item:V},null,8,["item"]))),128))]),right:$(()=>[(t(),w(ut,{max:10},[e(b)?(t(),w(y,{key:e(b).filepath,route:e(b),onOpenDefaultInput:C[2]||(C[2]=V=>g.value=!0)},null,8,["route"])):N("",!0)],1024)),e(b)?N("",!0):(t(),w(F,{key:0},{default:$(()=>[v(R,{px6:"",py2:""},{default:$(()=>[Co]),_:1})]),_:1}))]),_:1}),v(ee,{modelValue:e(g),"onUpdate:modelValue":C[3]||(C[3]=V=>X(g)?g.value=V:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:C[4]||(C[4]=V=>g.value=!1)},{default:$(()=>[u("div",null,[wo,(t(!0),h(D,null,B(Object.keys(e(f)),V=>(t(),w(ie,{key:V,text:`${H(V)} ${e(f)[V].length?`(${e(f)[V].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in S?S.ServerRouteTabIcons:e(Ie))[V]},{default:$(()=>[v(re,{modelValue:e(f)[V],"onUpdate:modelValue":W=>e(f)[V]=W,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{qo as default};
9
+ }`:"";return o.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${E})`}),o.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${E})`}),o}),Q=A(Pe()),J=pe({key:"",value:""}),Le=V(()=>{const o=[];return C.value.length&&o.push({name:"Params",slug:"params",length:C.value.length}),o.push({name:"Query",slug:"query",length:x.query.length}),ee.value&&o.push({name:"Body",slug:"body",length:x.body.length}),o.push({name:"Headers",slug:"headers",length:x.headers.length}),o.push({name:"Cookies",slug:"cookies",length:Q.value.length}),o.push({name:"Snippets",slug:"snippet"}),o});function Pe(){return document.cookie.split("; ").map(o=>{const[p,m]=o.split("=");return{key:p,value:m}}).filter(o=>o.key)}function de(o,p){if(!o)return;const m=Q.value.find(U=>U.key===o),E=Nt(o);m!==void 0?p===void 0&&(Q.value=Q.value.filter(U=>U.key!==o)):(Q.value.push({key:o,value:p}),J.key="",J.value=""),E.value=p}tt(()=>{G.value==="json"&&typeof y.value=="string"&&(y.value=JSON.parse(y.value))});const qe=ot();return(o,p)=>{const m=me,E=Ne,U=Se,z=fe,be=je,Ae=ft,Be=Re,Me=lt,ce=Ue,Fe=mt,ze=vt,ke=Te("tooltip");return t(),h("div",Ot,[u("div",Lt,[u("div",Pt,[o.route.method?(t(),w(m,{key:0,class:L(["n-badge-base n-sm",("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(e(i))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:$(()=>[W(O(e(i).toUpperCase()),1)]),_:1},8,["class"])):(t(),w(E,{key:1,modelValue:e(i),"onUpdate:modelValue":p[0]||(p[0]=r=>Z(i)?i.value=r:null),class:L(["n-badge-base n-sm",("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(e(i))])},{default:$(()=>[(t(),h(D,null,B(re,r=>u("option",{key:r,class:L(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(r))},O(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),u("div",qt,[v(U,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),u("div",At,[le(v(m,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:p[1]||(p[1]=r=>e(qe)(e(ye),"server-route-url"))},null,512),[[ke,"Copy URL"]]),le(v(m,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:p[2]||(p[2]=r=>e(H)(o.route.filepath))},null,512),[[ke,"Open in Editor"]])])]),v(m,{"h-full":"",n:"primary solid",onClick:ge},{default:$(()=>[v(z,{icon:"carbon:send"})]),_:1})])]),u("div",Bt,[(t(!0),h(D,null,B(e(Le),r=>(t(),w(m,{key:r.slug,class:L(e(q)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:X=>q.value=r.slug},{default:$(()=>[v(z,{icon:("ServerRouteTabIcons"in o?o.ServerRouteTabIcons:e(Ie))[r.slug]},null,8,["icon"]),W(" "+O(r.name)+" "+O(r?.length?`(${r.length})`:"")+" ",1),u("span",null,O(e(R)[r.slug]?.length?`(${e(R)[r.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Mt,Ft,v(E,{modelValue:e(j),"onUpdate:modelValue":p[3]||(p[3]=r=>Z(j)?j.value=r:null),class:"n-xs",disabled:!e(b)?.app?.$fetch},{default:$(()=>[zt,Ht]),_:1},8,["modelValue","disabled"])]),e(q)==="params"?(t(),h("div",Gt,[(t(!0),h(D,null,B(e(C),r=>(t(),h(D,{key:r},[u("div",Wt,O(r),1),v(U,{modelValue:e(P)[r],"onUpdate:modelValue":X=>e(P)[r]=X,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),e(q)==="cookies"?(t(),h("div",Jt,[(t(!0),h(D,null,B(e(Q),r=>(t(),h("div",{key:r.key,flex:"~ gap-4 items-center"},[v(U,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),v(U,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:X=>de(r.key,X.target?.value)},null,8,["model-value","onInput"]),v(m,{title:"Delete",n:"red",onClick:X=>de(r.key,void 0)},{default:$(()=>[v(z,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),u("div",Kt,[v(U,{modelValue:e(J).key,"onUpdate:modelValue":p[4]||(p[4]=r=>e(J).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v(U,{modelValue:e(J).value,"onUpdate:modelValue":p[5]||(p[5]=r=>e(J).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(m,{title:"Add",n:"primary",onClick:p[6]||(p[6]=r=>de(e(J).key,e(J).value))},{default:$(()=>[v(z,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),v(e(_),null,{default:$(()=>[v(be,{modelValue:e(te),"onUpdate:modelValue":p[9]||(p[9]=r=>Z(te)?te.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:$(()=>[e(R)[e(q)]?.length?(t(),h(D,{key:0},[u("div",Qt,[Xt,Zt,v(m,{icon:"i-carbon-edit",border:!1,onClick:p[7]||(p[7]=r=>n("open-default-input"))}),Yt]),v(be,{modelValue:e(R)[e(q)],"onUpdate:modelValue":p[8]||(p[8]=r=>e(R)[e(q)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),e(q)==="snippet"?(t(),h("div",eo,[e(_e).length?(t(),w(Ae,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):N("",!0)])):e(te)?(t(),h("div",to,[e(q)==="body"?(t(),h(D,{key:0},[u("div",oo,[(t(),h(D,null,B(T,r=>u("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:L({"border-b":r!==e(G)}),onClick:X=>G.value=r},[u("div",{class:L({op30:r!==e(G)}),"font-mono":""},O(r),3)],10,no)),64)),so]),e(G)==="input"?(t(),w(e(k),{key:0})):e(G)==="json"?(t(),w(e(ht),nt({key:1,modelValue:e(y),"onUpdate:modelValue":p[10]||(p[10]=r=>Z(y)?y.value=r:null),class:[[o.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},o.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(t(),w(e(k),{key:1}))])):N("",!0),e(M)?e(I)?(t(),w(Me,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:$(()=>[W(" Fetching... ")]),_:1})):(t(),h(D,{key:6},[u("div",lo,[ao,e(a).error?(t(),w(ce,{key:0,n:"red"},{default:$(()=>[W(" Error ")]),_:1})):N("",!0),v(ce,{n:e(a).error?"orange":"green",textContent:O(e(a).statusCode)},null,8,["n","textContent"]),e(a).contentType?(t(),h("code",ro,O(e(a).contentType),1)):N("",!0),e(a).contentType==="application/json"?(t(),w(Fe,{key:2,getter:()=>({input:e(l)})},null,8,["getter"])):N("",!0),io,uo,v(ce,{n:"green"},{default:$(()=>[W(O(e(a).fetchTime)+" ms ",1)]),_:1})]),e(c)==="pdf"?(t(),h("div",co,[u("div",po,[u("object",{data:e(l),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,fo)])])):e(c)!=="media"?(t(),w(ze,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(l),lang:e(c)},null,8,["code","lang"])):(t(),h("div",mo,[u("div",vo,[e(a).contentType.includes("image")?(t(),h("img",{key:0,rounded:"",src:e(l)},null,8,ho)):(t(),h("video",yo,[u("source",{src:e(l),type:"video/mp4"},null,8,go)]))])]))],64)):(t(),w(Be,{key:4},{default:$(()=>[v(m,{n:"primary",onClick:ge},{default:$(()=>[v(z,{icon:"carbon:send"}),W(" Send request ")]),_:1})]),_:1}))])}}}),bo={flex:"~ gap1","text-sm":""},ko={key:0,op50:""},xo={op50:""},Co=u("span",{op75:""},"Select a route to start",-1),wo=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),qo=ae({__name:"server-routes",setup(s){const g=A(!1),d=at(),n=we(),{selectedRoute:_,view:k,inputDefaults:f}=De("serverRoutes"),b=V(()=>{!n.value&&_.value&&(n.value=_.value.filepath);const S=d.value?.find(C=>C.filepath===n.value);return n.value!==_.value?.filepath&&S&&(_.value=S),S}),a=A(""),c=V(()=>new rt(d.value||[],{keys:["method","route"],shouldSort:!0})),l=V(()=>d.value?a.value?c.value.search(a.value).map(C=>C.item):d.value:[]),I=V(()=>{const S=[],C=(i,P)=>{i.routes=i.routes||[],i.routes.push(P)};return l.value.forEach(i=>{const P=i.filepath.split("/"),x=P.slice(P.indexOf("server")+1);x.length>0&&x[x.length-1].includes(".")&&x.pop();let y=null;if(x.forEach(R=>{const F=y?y.routes?.find(j=>j.route===R):S.find(j=>j.route===R);if(F)y=F;else{const j={route:R,filepath:R.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};y?C(y,j):S.push(j),y=j}}),i.type==="runtime"){const R=S.find(F=>F.route==="runtime");if(R)C(R,i);else{const F={route:"runtime",filepath:"runtime",type:"collection",routes:[i]};S.push(F)}}else y?C(y,i):S.push(i)}),S});function M(){k.value=k.value==="tree"?"list":"tree"}function H(S){return S.charAt(0).toUpperCase()+S.slice(1)}return(S,C)=>{const i=me,P=ct,x=Ee,y=_o,R=dt,F=Re,j=it,re=je,ie=yt,ee=gt,q=Te("tooltip");return t(),h(D,null,[v(j,{"storage-key":"tab-server-routes"},{left:$(()=>[v(P,{search:e(a),"onUpdate:search":C[1]||(C[1]=T=>Z(a)?a.value=T:null),pb2:""},{actions:$(()=>[le(v(i,{"text-lg":"",icon:e(k)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:M},null,8,["icon"]),[[q,"Toggle View"]]),le(v(i,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:C[0]||(C[0]=T=>g.value=!e(g))},null,512),[[q,"Default Inputs"]])]),default:$(()=>[u("div",bo,[e(a)?(t(),h("span",ko,O(e(l).length)+" matched · ",1)):N("",!0),u("span",xo,O(e(d)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),h(D,null,B(e(k)==="tree"?e(I):e(l),T=>(t(),w(x,{key:T.filepath,item:T},null,8,["item"]))),128))]),right:$(()=>[(t(),w(ut,{max:10},[e(b)?(t(),w(y,{key:e(b).filepath,route:e(b),onOpenDefaultInput:C[2]||(C[2]=T=>g.value=!0)},null,8,["route"])):N("",!0)],1024)),e(b)?N("",!0):(t(),w(F,{key:0},{default:$(()=>[v(R,{px6:"",py2:""},{default:$(()=>[Co]),_:1})]),_:1}))]),_:1}),v(ee,{modelValue:e(g),"onUpdate:modelValue":C[3]||(C[3]=T=>Z(g)?g.value=T:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:C[4]||(C[4]=T=>g.value=!1)},{default:$(()=>[u("div",null,[wo,(t(!0),h(D,null,B(Object.keys(e(f)),T=>(t(),w(ie,{key:T,text:`${H(T)} ${e(f)[T].length?`(${e(f)[T].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in S?S.ServerRouteTabIcons:e(Ie))[T]},{default:$(()=>[v(re,{modelValue:e(f)[T],"onUpdate:modelValue":G=>e(f)[T]=G,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{qo as default};
@@ -1 +1 @@
1
- import{_ as Q}from"./NIconTitle.vue.dcd70230.js";import{_ as X}from"./NSwitch.vue.95382b67.js";import{d as Y,as as Z,bL as ee,aB as le,ax as L,m,i as n,k as e,F as v,n as N,f as t,j as a,K as oe,_ as ne,am as te,o as r,h as j,t as y,G as A,p as M,v as U,l as c,C as D,B as ae,bE as se,bM as ie}from"./entry.5d59ff5c.js";import{_ as ue}from"./NSelect.vue.d4b5d548.js";import{_ as de}from"./NCheckbox.vue.a65a9466.js";import{_ as re}from"./NLink.vue.353afc82.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),xe={flex:"~ col gap-2"},be=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Ue=e("span",null,"Close DevTools when clicking outside",-1),Oe=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be=e("p",null,"Minimize floating panel on inactive",-1),De=["value"],ze=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Ee=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Le=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),je={flex:"~ gap-2"},Ae=e("div",{"i-carbon-data-enrichment":""},null,-1),Me=e("div",{"i-carbon-debug":""},null,-1),Pe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Fe={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(He){const{interactionCloseOnOutsideClick:k,showPanel:O,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:B}=ae(),x=Z(),P=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],F=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function H(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function G(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function K(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function z(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const b=[...u.value];b.splice(d,1),b.splice(_,0,s),u.value=b}async function W(){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 oe.clearOptions(),x.value?.app?.reload?.(),window.location.reload())}return L(()=>{x.value&&(x.value.app.frameState.value.closeOnOutsideClick=k.value)}),L(()=>{x.value&&(x.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,b=se,p=ne,w=te,q=ie,E=ue,f=de,J=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),j(w,{key:0,p3:"",flex:"~ col gap-1",class:A(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>G(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),j(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>H(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(i.name)?"op25":"")},[n(b,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>z(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>z(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>K(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):M("",!0)],64))),128))]),e("div",xe,[be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(q,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,U(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(E,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(P,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(B),"onUpdate:modelValue":o[2]||(o[2]=l=>c(B)?B.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t(O),"onUpdate:modelValue":o[5]||(o[5]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,Be,n(E,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(F,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,De)),64))]),_:1},8,["modelValue"])]),_:1}),ze,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(D),"onUpdate:modelValue":o[7]||(o[7]=l=>c(D)?D.value=l:null),"n-primary":""},{default:a(()=>[Ee,n(J,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Le,e("div",je,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[Ae,U(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Me,U(" Bug Reports ")]),_:1})])]),_:1}),Pe,e("div",Fe,[n(p,{n:"orange",onClick:W},{default:a(()=>[Re,U(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
1
+ import{_ as Q}from"./NIconTitle.vue.83cd82be.js";import{_ as X}from"./NSwitch.vue.1cea2bc6.js";import{d as Y,at as Z,bM as ee,aC as le,ay as E,m,i as n,k as e,F as v,n as N,f as t,j as a,L as oe,_ as ne,an as te,o as r,h as j,t as y,G as A,p as F,v as U,l as c,C as D,B as ae,bF as se,bN as ie}from"./entry.9a5af3dc.js";import{_ as ue}from"./NSelect.vue.c8c511ae.js";import{_ as de}from"./NCheckbox.vue.6b5ce38f.js";import{_ as re}from"./NLink.vue.92e49c8b.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),be={flex:"~ col gap-2"},xe=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Ue=e("span",null,"Close DevTools when clicking outside",-1),Oe=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be=e("p",null,"Minimize floating panel on inactive",-1),De=["value"],ze=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Le=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Ee=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),je={flex:"~ gap-2"},Ae=e("div",{"i-carbon-data-enrichment":""},null,-1),Fe=e("div",{"i-carbon-debug":""},null,-1),Me=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Pe={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(He){const{interactionCloseOnOutsideClick:k,showPanel:O,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:B}=ae(),b=Z(),M=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],P=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function H(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function G(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function W(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function z(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const x=[...u.value];x.splice(d,1),x.splice(_,0,s),u.value=x}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 oe.clearOptions(),b.value?.app?.reload?.(),window.location.reload())}return E(()=>{b.value&&(b.value.app.frameState.value.closeOnOutsideClick=k.value)}),E(()=>{b.value&&(b.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,x=se,p=ne,w=te,J=ie,L=ue,f=de,K=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),j(w,{key:0,p3:"",flex:"~ col gap-1",class:A(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>G(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),j(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>H(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(i.name)?"op25":"")},[n(x,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>z(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>z(i.name,1)},null,8,["disabled","onClick"])],64)):F("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>W(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):F("",!0)],64))),128))]),e("div",be,[xe,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(J,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,U(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(L,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(B),"onUpdate:modelValue":o[2]||(o[2]=l=>c(B)?B.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t(O),"onUpdate:modelValue":o[5]||(o[5]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,Be,n(L,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(P,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,De)),64))]),_:1},8,["modelValue"])]),_:1}),ze,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(D),"onUpdate:modelValue":o[7]||(o[7]=l=>c(D)?D.value=l:null),"n-primary":""},{default:a(()=>[Le,n(K,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Ee,e("div",je,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[Ae,U(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Fe,U(" Bug Reports ")]),_:1})])]),_:1}),Me,e("div",Pe,[n(p,{n:"orange",onClick:q},{default:a(()=>[Re,U(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
@@ -0,0 +1 @@
1
+ import{at as m,b9 as n,a as s,L as o}from"./entry.9a5af3dc.js";function u(){const p=m(),a=n("getComponents",()=>o.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 r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
@@ -1 +1 @@
1
- import{_ as F}from"./NBadge.b912de36.js";import{_ as L}from"./NCodeBlock.vue.c114d969.js";import{_ as q}from"./NCheckbox.vue.a65a9466.js";import{_ as A}from"./NTip.vue.fbfe6de9.js";import{d as E,O as G,b9 as O,r as V,ba as Q,M as W,Q as X,o as m,m as g,a8 as z,f as a,t as $,p as w,F as M,i as s,h as H,j as u,k as h,l as B,v as p,U as J,_ as K,X as Y,bb as Z,aa as ee,a as te,ap as ae,aq as ne,bc as se,b8 as oe}from"./entry.5d59ff5c.js";const le={key:0},re={p4:"",flex:"~ col gap-1"},ue={class:"text-lg font-medium leading-6"},ie=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ce={flex:"~ gap-3",mt2:"","justify-end":""},ge=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const t=l,e=G(),{info:n,update:i,state:y,processId:k,restart:d}=O(t.packageName,t.options),f=V(!0),_=V(!0),D=Q(),b=W(),R=X();async function N(){const r=await i(async o=>b.start(o));J("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&D.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(R.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=q,T=A,P=K,I=Y;return m(),g(M,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:N,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(M,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>N())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(b),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>B(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>B(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),U=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return oe("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(t=>!U.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function he(){return Z("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&ae(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!U.includes(e.name))))})}export{ge as _,de as a,he as u};
1
+ import{_ as F}from"./NBadge.0b42c7f8.js";import{_ as L}from"./NCodeBlock.vue.c80c8282.js";import{_ as q}from"./NCheckbox.vue.6b5ce38f.js";import{_ as A}from"./NTip.vue.ca2f8e8a.js";import{d as E,P as G,ba as W,r as V,bb as Y,N as z,R as H,o as m,m as g,a9 as J,f as a,t as $,p as w,F as B,i as s,h as K,j as u,k as h,l as M,v as p,V as O,_ as Q,Y as X,bc as Z,ab as ee,a as te,aq as ae,ar as ne,bd as se,b9 as oe}from"./entry.9a5af3dc.js";const le={key:0},re={p4:"",flex:"~ col gap-1"},ue={class:"text-lg font-medium leading-6"},ie=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ce={flex:"~ gap-3",mt2:"","justify-end":""},ge=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const t=l,e=G(),{info:n,update:i,state:y,processId:k,restart:d}=W(t.packageName,t.options),f=V(!0),_=V(!0),R=Y(),b=z(),U=H();async function N(){const r=await i(async o=>b.start(o));O("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&R.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(U.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=q,T=A,P=Q,I=X;return m(),g(B,null,[J(r.$slots,"default",{id:a(k),info:a(n),update:N,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(B,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>N())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),K(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(b),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>M(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>M(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),D=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return oe("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(t=>!D.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function he(){return Z("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&ae(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!D.includes(e.name))))})}export{ge as _,de as a,he as u};
@@ -1 +1 @@
1
- import{_ as B}from"./NCodeBlock.vue.c114d969.js";import{d as N,bu as R,e as $,a as D,ax as T,o as n,m as a,k as c,F as f,n as V,G as m,f as t,t as E,i as _,j as v,v as b,h as F,p as l,_ as L,r as y,K as p,bv as k,bw as g}from"./entry.5d59ff5c.js";const W={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},z=["onClick"],G=c("div",{border:"b base","flex-auto":""},null,-1),K={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},P=N({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(s){const r=s,e=R(r.codeSnippets[0]),w=$(),x=D(()=>e.value?.lang||"text");return T(()=>{r.codeSnippets.includes(e.value)||(e.value=r.codeSnippets[0])}),(i,d)=>{const S=B,u=L;return i.codeSnippets.length?(n(),a("div",W,[c("div",j,[(n(!0),a(f,null,V(i.codeSnippets,(o,O)=>(n(),a("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(o===t(e)?"":"border-b"),onClick:I=>e.value=o},[c("div",{class:m(o===t(e)?"":"op30"),"font-mono":""},E(o.name),3)],10,z))),128)),G]),t(e)?(n(),a(f,{key:0},[_(S,{code:t(e).code,lang:t(x),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),c("div",K,[_(u,{icon:"carbon-copy",onClick:d[0]||(d[0]=o=>t(w)(t(e).code,i.eventType||`code-snippet-${t(e).name}`))},{default:v(()=>[b(" Copy ")]),_:1}),t(e)?.docs?(n(),F(u,{key:0,to:t(e).docs,target:"_blank",icon:"carbon-catalog"},{default:v(()=>[b(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}}),h=y(await p.getOptions("assets")),q=k(h);g(h,async s=>{p.updateOptions("assets",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const C=y(await p.getOptions("serverRoutes")),A=k(C);g(C,async s=>{p.updateOptions("serverRoutes",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const H={serverRoutes:A,assets:q};function Q(s){return H[s]}export{P as _,Q as u};
1
+ import{_ as B}from"./NCodeBlock.vue.c80c8282.js";import{d as N,bv as R,e as $,a as D,ay as T,o as n,m as a,k as c,F as f,n as V,G as m,f as t,t as L,i as _,j as v,v as b,h as E,p as l,_ as F,r as y,L as p,bw as k,bx as g}from"./entry.9a5af3dc.js";const W={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},z=["onClick"],G=c("div",{border:"b base","flex-auto":""},null,-1),q={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},P=N({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(s){const r=s,e=R(r.codeSnippets[0]),w=$(),x=D(()=>e.value?.lang||"text");return T(()=>{r.codeSnippets.includes(e.value)||(e.value=r.codeSnippets[0])}),(i,d)=>{const S=B,u=F;return i.codeSnippets.length?(n(),a("div",W,[c("div",j,[(n(!0),a(f,null,V(i.codeSnippets,(o,O)=>(n(),a("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(o===t(e)?"":"border-b"),onClick:J=>e.value=o},[c("div",{class:m(o===t(e)?"":"op30"),"font-mono":""},L(o.name),3)],10,z))),128)),G]),t(e)?(n(),a(f,{key:0},[_(S,{code:t(e).code,lang:t(x),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),c("div",q,[_(u,{icon:"carbon-copy",onClick:d[0]||(d[0]=o=>t(w)(t(e).code,i.eventType||`code-snippet-${t(e).name}`))},{default:v(()=>[b(" Copy ")]),_:1}),t(e)?.docs?(n(),E(u,{key:0,to:t(e).docs,target:"_blank",icon:"carbon-catalog"},{default:v(()=>[b(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}}),h=y(await p.getOptions("assets")),A=k(h);g(h,async s=>{p.updateOptions("assets",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const C=y(await p.getOptions("serverRoutes")),H=k(C);g(C,async s=>{p.updateOptions("serverRoutes",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const I={serverRoutes:H,assets:A};function Q(s){return I[s]}export{P as _,Q as u};
@@ -0,0 +1 @@
1
+ import{d as G,P as ne,r as A,Q as z,by as F,az as ae,w as oe,ay as se,a0 as le,a as re,L as f,M as k,f as t,o as l,h as m,j as u,k as r,i as c,l as D,m as i,F as w,n as U,t as b,G as T,ad as M,v as d,p as E,as as ue,I as ie,be as de,ae as ce,bz as pe,bA as R,_ as me,X as _e,a5 as fe,an as ve,A as ye,U as ge,aF as he}from"./entry.9a5af3dc.js";import{_ as ke}from"./NSelect.vue.c8c511ae.js";import{_ as be}from"./NLink.vue.92e49c8b.js";import{_ as xe}from"./FilepathItem.vue.ca308ea2.js";import{t as we}from"./json-editor-vue.c3cbb111.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},Ae={key:1},De=["onKeyup"],Ue=r("br",null,null,-1),Me={key:0,op50:""},Le={key:1},Be=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),qe={"font-bold":""},ze=r("br",null,null,-1),Fe={"text-sm":""},Te=r("br",null,null,-1),Ee=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=A(""),v=A(""),s=z("storage:current",""),e=A(),y=z("storage:file:state",""),{data:K}=([p,g]=F(()=>R("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:L}=([p,g]=F(async()=>R("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),Q=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await L(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(Q),oe(s,()=>{L(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const W=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(n),editingKey:!1,content:a,updatedContent:a}}async function X(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function H(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function J(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const I=me,Y=ke,j=_e,Z=fe,B=be,P=ve,q=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(Y,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>D(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,U(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>D(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,U(t(W),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:T(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>D(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:M(X,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:M(J,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",Ae,[d(b(V(t(e).key))+" ",1),c(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?E("",!0):(l(),m(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:T({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:H},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:M(de(N,["ctrl"]),["enter"])},null,40,De)),[[ce,t(e).updatedContent]])])):(l(),m(q,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ue,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(q,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Me," Select one storage to start: ")):(l(),i("p",Le,[d(" No custom storage defined in "),Be,d("."),Pe,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,U(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Re=>s.value=_},{default:u(()=>[r("span",qe,b(_),1),ze,r("span",Fe,b(o.driver)+" driver",1),Te,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):E("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),He=G({__name:"storage",setup(O){return(p,g)=>{const C=Ee,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{He as default};
@@ -1,4 +1,4 @@
1
- import{d as Ee,r as ke,al as Pe,Z as Ie,K as fe,L as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,by as He,_ as Ae,bA as Fe,Q as We,a as Ue,ax as Ne,n as $e,G as Le,bd as je,v as De,a4 as ze,j as Ke,aE as qe}from"./entry.5d59ff5c.js";var Be={exports:{}};(function(ne,Y){(function(J,G){ne.exports=G()})(self,()=>(()=>{var J={4567:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),_=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ import{d as Ee,r as ke,am as Pe,a0 as Ie,L as fe,M as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,bz as He,_ as Ae,bB as Fe,R as We,a as Ue,ay as Ne,n as $e,G as Le,be as je,v as De,a5 as ze,j as Ke,aF as qe}from"./entry.9a5af3dc.js";var Be={exports:{}};(function(ne,Y){(function(J,G){ne.exports=G()})(self,()=>(()=>{var J={4567:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),_=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new _.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let a=0;a<i;a++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),/\p{Control}/u.test(i)||this._charsToConsume.push(i)}_refreshRows(i,a){this._liveRegionDebouncer.refresh(i,a,this._terminal.rows)}_renderRows(i,a){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=a;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,a){const l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(a===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([u(1,e.IRenderService)],t)},3614:(P,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function u(d,f,g,_){d=c(d=o(d),g.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const _=g.getBoundingClientRect(),e=d.clientX-_.left-10,s=d.clientY-_.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,_){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),f,g,_)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,_,e){n(d,f,g),e&&_.rightClickSelect(d),f.value=_.selectionText,f.select()}},7239:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=o(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,c,u,n){o.addEventListener(c,u,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,u,n))}}}},6465:function(P,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},u=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),f=o(844),g=o(2585);let _=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i<t.length;i++){const a=t[i];if(a.classList.contains("xterm"))break;if(a.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var t,i;this._activeProviderReplies&&s||((t=this._activeProviderReplies)===null||t===void 0||t.forEach(l=>{l?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let a=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(a=this._checkLinkProviderResult(l,e,a)):v.provideLinks(e.y,m=>{var h,p;if(this._isMouseOut)return;const b=m?.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),a=this._checkLinkProviderResult(l,e,a),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;i<s.size;i++){const a=s.get(i);if(a)for(let l=0;l<a.length;l++){const v=a[l],m=v.link.range.start.y<e?0:v.link.range.start.x,h=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let p=m;p<=h;p++){if(t.has(p)){a.splice(l--,1);break}t.add(p)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(e);let l=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(l=!0);if(!l&&a){const v=a.find(m=>this._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;v<this._activeProviderReplies.size;v++){const m=(i=this._activeProviderReplies.get(v))===null||i===void 0?void 0:i.find(h=>this._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,a;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((a=this._element)===null||a===void 0||a.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,a,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(i,a),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,a=s.y*this._bufferService.cols+s.x;return t<=a&&a<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,a){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:a}}};r.Linkifier2=_=c([u(0,g.IBufferService)],_)},9042:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(P,r,o){var c=this&&this.__decorate||function(_,e,s,t){var i,a=arguments.length,l=a<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(_,e,s,t);else for(var v=_.length-1;v>=0;v--)(i=_[v])&&(l=(a<3?i(l):a>3?i(e,s,l):i(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l},u=this&&this.__param||function(_,e){return function(s,t){e(s,t,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let f=r.OscLinkProvider=class{constructor(_,e,s){this._bufferService=_,this._optionsService=e,this._oscLinkService=s}provideLinks(_,e){var s;const t=this._bufferService.buffer.lines.get(_-1);if(!t)return void e(void 0);const i=[],a=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,p=!1;for(let b=0;b<v;b++)if(h!==-1||t.hasContent(b)){if(t.loadCell(b,l),l.hasExtendedAttrs()&&l.extended.urlId){if(h===-1){h=b,m=l.extended.urlId;continue}p=l.extended.urlId!==m}else h!==-1&&(p=!0);if(p||h!==-1&&b===v-1){const L=(s=this._oscLinkService.getLinkData(m))===null||s===void 0?void 0:s.uri;if(L){const y={start:{x:h+1,y:_},end:{x:b+(p||b!==v-1?0:1),y:_}};let k=!1;if(!a?.allowNonHttpProtocols)try{const x=new URL(L);["http:","https:"].includes(x.protocol)||(k=!0)}catch{k=!0}k||i.push({text:L,range:y,activate:(x,T)=>a?a.activate(x,T,y):g(0,T),hover:(x,T)=>{var O;return(O=a?.hover)===null||O===void 0?void 0:O.call(a,x,T,y)},leave:(x,T)=>{var O;return(O=a?.leave)===null||O===void 0?void 0:O.call(a,x,T,y)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function g(_,e){if(confirm(`Do you want to navigate to ${e}?
4
4
 
@@ -0,0 +1,29 @@
1
+ import{d as w,a as T,aG as V,o as t,m as c,k as e,a8 as N,f as l,t as k,ac as O,F as f,n as I,h as b,r as B,w as U,ax as q,a0 as j,bC as K,p as x,i as m,G as z,q as X,e as Z,ao as P,j as g,as as Q,v as E,_ as G,ab as H,aI as ee,at as se,a_ as te,bD as ne,N as oe,aa as ae,A as le,L as R,a4 as ie,Y as re}from"./entry.9a5af3dc.js";import{_ as M}from"./DurationDisplay.vue.37c54f2c.js";import{_ as J}from"./NBadge.0b42c7f8.js";import{_ as ce}from"./ComposableItem.vue.869f4305.js";import{t as pe}from"./json-editor-vue.c3cbb111.js";import{_ as de}from"./FilepathItem.vue.ca308ea2.js";import{_ as ue}from"./NDrawer.vue.e2617b9c.js";import{_ as me}from"./LaunchPage.vue.c8e4a567.js";import{_ as ke}from"./NLink.vue.92e49c8b.js";import{_ as _e}from"./CodeDiff.vue.0700b533.js";import{_ as he}from"./HelpFab.vue.6bf23ece.js";import"./NMarkdown.vue.07fe8875.js";import"./client.b8ca1554.js";import"./constants.2cc6e981.js";import"./NCodeBlock.vue.c80c8282.js";const fe=w({__name:"TimelineItemFunction",props:{item:{}},setup(h){const u=h,p=T(()=>V(u.item.name,50,60,"_op_")),s=T(()=>p.value.replace(/_op_/,"1")),o=T(()=>V(u.item.name,50,40)),i=T(()=>p.value.replace(/_op_/,"0.2"));return(r,a)=>(t(),c("button",{class:"group",style:N({color:l(s),borderLeft:`2px solid ${l(s)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[e("div",{style:N({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),e("div",{style:N({color:l(o),"--c":l(s)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(r.item.name),5)],4))}}),ye={relative:"","h-full":""},ve={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},be=w({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(h,{emit:u}){const p=h,s=u,o=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,r)=>{const a=fe;return t(),c("div",ye,[e("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:r[0]||(r[0]=n=>i.segment.route?s("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),e("div",ve,k(l(o))+" ago ",1),e("div",null,[(t(!0),c(f,null,I(i.segment.functions,(n,d)=>(t(),b(a,{key:d,item:n.event,style:N({position:"absolute",minWidth:`${n.relativeWidth*100}%`,maxWidth:`${n.relativeWidth*100}%`,top:`${4+n.layer*1.6}em`,left:`${n.relativeStart*100}%`}),onClick:_=>s("select",n)},null,8,["item","style","onClick"]))),128))])])}}}),ge=3e3,xe=50;function $e(h){const u=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const s of h){const o=s.end||s.start;(s.start-p.end>ge||s.type==="route")&&(p={start:s.start,end:o,events:[],functions:[],duration:0},u.push(p)),p.events.push(s),p.end=o+xe}return u.forEach((s,o)=>{const i=s.end-s.start,r=[];s.duration=i,s.previousGap=o>0?s.start-u[o-1].end:0,s.events.forEach(a=>{const n=a.end||a.start;let d=0;a.type!=="route"&&(d=r.findIndex(D=>D<=a.start),d===-1?(d=r.length,r.push(n+1e3)):r[d]=n+1e3);const _={event:a,segment:s,relativeStart:(a.start-s.start)/i,relativeWidth:(n-a.start)/i,layer:d};a.type==="function"?s.functions.push(_):s.route=_})}),u}const Ae={relative:""},De={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":""},Ce=w({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(h,{emit:u}){const p=h,s=u,o=B(),i=B(),r=B(),a=B(),n=B(!0),d=B(1.5),_=T(()=>$e(p.data.events)),D=T(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function C(){a.value&&(a.value.style.width=`${D.value}px`)}function S(){n.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),r.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return U(()=>p.data.events.length,async()=>{await q(),C(),S()},{flush:"post"}),j(o,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(C(),r.value.scrollLeft=o.value.scrollLeft,n.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),j(r,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(C(),o.value.scrollLeft=r.value.scrollLeft)}),j(o,"wheel",A=>{A.altKey?(d.value=K(d.value+A.deltaY/200,.5,3),C()):o.value.scrollLeft+=A.deltaY}),(A,v)=>{const y=M,W=be;return t(),c(f,null,[e("div",Ae,[e("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),c(f,null,I(l(_),($,F)=>(t(),c("div",{key:F,relative:"","h-full":"","flex-inline":"",style:N({width:`${Math.max(100,$.duration/10)/l(D)*100}%`})},[(t(!0),c(f,null,I($.functions,(L,Y)=>(t(),c("div",{key:Y,"h-3px":"",rounded:"",style:N({width:`max(${L.relativeWidth*100}%, 10px)`,position:"absolute",top:`${L.layer*4}px`,left:`${L.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in A?A.getHashColorFromString:l(V))(L.event.name,50,60)})},null,4))),128)),$.route?(t(),c("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:N({left:`${$.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),e("div",{ref_key:"minimapScroller",ref:r,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[e("div",{ref_key:"minimapScrollerInner",ref:a,"h-1px":""},null,512)],512)]),e("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),c(f,null,I(l(_),($,F)=>(t(),c(f,{key:F},[$.previousGap&&$.previousGap>=200?(t(),c("div",De,[m(y,{op50:"",duration:$.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(W,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(F===l(_).length-1?"border-r border-base":""),segment:$,style:N({width:`${Math.max(50,$.duration/10)*l(d)}px`}),onSelect:v[0]||(v[0]=L=>s("select",L))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const Be=X(Ce,[["__scopeId","data-v-a2c475c0"]]),we={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Te=["onClick"],Ne=e("div",{"i-carbon-function":"",op50:""},null,-1),Se={flex:"~","ml--1":"","font-mono":""},Fe=e("div",{op30:""}," ( ",-1),Ee={key:0,mr2:"",op30:""},Ie={op75:""},Le=e("div",{op30:""}," ) ",-1),We=e("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[e("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Ve={flex:"~ col items-start"},Me={"text-xs":"","font-mono":"",op30:""},je={"font-bold":"","font-mono":"","text-green":""},Oe=e("div",{"flex-auto":""},null,-1),ze=e("div",{"min-h-100":""},null,-1),Ge=w({__name:"TimelineList",props:{data:{}},emits:["select"],setup(h,{emit:u}){const p=u;return(s,o)=>{const i=M;return t(),c("div",we,[(t(!0),c(f,null,I(s.data.events,(r,a)=>(t(),c("button",{key:a,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:n=>p("select",r)},[r.type==="function"?(t(),c(f,{key:0},[Ne,e("div",{"font-mono":"",style:N({color:r.type==="function"?("getHashColorFromString"in s?s.getHashColorFromString:l(V))(r.name,50,60):""})},k(r.name),5),e("div",Se,[Fe,(t(!0),c(f,null,I(r.args,(n,d)=>(t(),c(f,{key:d},[d?(t(),c("div",Ee," , ")):x("",!0),e("div",Ie,k(n===null?"null":n===void 0?"undefined":typeof n=="function"?"[function]":Array.isArray(n)?"[Array]":typeof n=="object"?"[object]":JSON.stringify(n)),1)],64))),128)),Le])],64)):(t(),c(f,{key:1},[We,e("div",Ve,[e("div",Me,k(r.from),1),e("div",je,k(r.to),1)])],64)),Oe,r.end?(t(),b(i,{key:2,duration:r.end-r.start,color:r.type==="function"},null,8,["duration","color"])):x("",!0)],8,Te))),128)),ze])}}}),Re={key:0,"text-blue":""},Pe={key:1,"text-purple":""},He={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},Ue={key:5,"text-gray":""},qe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ke={key:1},Xe={p2:"","text-sm":"",border:"t base"},Ze=w({__name:"TimelineArgumentView",props:{value:{}},setup(h){const u=h,p=B(),s=B();function o(){try{p.value=JSON.parse(JSON.stringify(u.value))}catch(a){console.error(a),s.value=a}}const i=w({emits:["setup"],setup(a,{emit:n}){return n("setup"),()=>null}}),r=Z();return(a,n)=>{const d=G,_=P("VMenu");return typeof a.value=="string"?(t(),c("div",Re,k(JSON.stringify(a.value)),1)):typeof a.value=="number"?(t(),c("div",Pe,k(a.value),1)):typeof a.value=="boolean"?(t(),c("div",He,k(a.value),1)):typeof a.value>"u"?(t(),c("div",Je," undefined ")):typeof a.value=="function"?(t(),c("div",Ye," [Function"+k(a.value.name?`: ${a.value.name}`:"")+"] ",1)):a.value===null?(t(),c("div",Ue," null ")):(t(),b(_,{key:6,placement:"top"},{popper:g(()=>[m(l(i),{onSetup:o}),l(s)?(t(),c("div",qe," Failed to display object: "+k(l(s)),1)):l(p)?(t(),c("div",Ke,[m(l(pe),Q({"model-value":l(p)},a.$attrs,{class:["json-editor-vue",[a.$colorMode.value==="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"]),e("div",Xe,[m(d,{title:"Copy to clipboard",icon:"carbon-copy",onClick:n[0]||(n[0]=D=>l(r)(JSON.stringify(l(p),null,2),"timeline-argument"))},{default:g(()=>[E(" Copy ")]),_:1})])])):x("",!0)]),default:g(()=>[e("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(a.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(a.value)?`[Array(${a.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},es={"mx--1":""},ss={flex:"~ gap-1","font-mono":""},ts={key:1},ns=e("span",{ml1:"",op30:""},"(",-1),os={key:0,op30:""},as=e("span",{op30:""},")",-1),ls={flex:"~ gap-1","text-sm":""},is=e("span",{mx1:"",op50:""},"·",-1),rs={class:"text-sm text-gray-400"},cs={key:0,class:"text-xs text-gray-400",mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},ps={"text-right":""},ds={"ws-nowrap":""},us=w({__name:"TimelineDetailsFunction",props:{record:{}},setup(h){const u=h,p=H(),s=O(()=>u.record.start,{showSecond:!0});function o(n){let d=new URL(n).pathname;return d.startsWith("/_nuxt/")&&(d=d.slice(6)),d.startsWith("/@id/virtual:nuxt:")?`#build/${d.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):d.includes("/@fs/")?`/${d.split("/@fs/")[1]}`:(p.value?.rootDir||"")+d}const i=ee(),r=T(()=>i.value?.metadata),a=T(()=>i.value?.imports.find(n=>n.as===u.record.name));return(n,d)=>{const _=J,D=ce,C=Ze,S=M,A=de;return n.record?(t(),c("div",Qe,[e("div",es,[m(_,{n:"yellow",textContent:"Function call"})]),e("div",ss,[l(a)?(t(),b(D,{key:0,item:l(a),metadata:l(r),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),c("span",ts,k(n.record.name),1)),ns,(t(!0),c(f,null,I(n.record.args,(v,y)=>(t(),c(f,{key:y},[y?(t(),c("span",os,", ")):x("",!0),m(C,{value:v},null,8,["value"])],64))),128)),as]),e("div",ls,[n.record.end?(t(),b(S,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),is,e("div",rs,k(l(s)),1)]),n.record.stacktrace?(t(),c("div",cs,[(t(!0),c(f,null,I(n.record.stacktrace,(v,y)=>(t(),c(f,{key:y},[e("div",ps,k(v.functionName||"(anonymous)"),1),e("div",ds,[v.fileName?(t(),b(A,{key:0,filepath:`${o(v.fileName)}:${v.lineNumber}:${v.columnNumber}`,subpath:""},null,8,["filepath"])):x("",!0)])],64))),128))])):x("",!0)])):x("",!0)}}}),ms={key:0,"p-4":"",flex:"~ col gap-2"},ks={"mx--1":""},_s={flex:"~ gap-1 items-center","font-mono":""},hs={op50:""},fs=e("span",{"i-carbon-arrow-right":"",op50:""},null,-1),ys={flex:"~ gap-1","text-sm":""},vs=e("span",{mx1:"",op50:""},"·",-1),bs={class:"text-sm text-gray-400"},gs=w({__name:"TimelineDetailsRoute",props:{record:{}},setup(h){const u=h,p=O(()=>u.record.start,{showSecond:!0});return(s,o)=>{const i=J,r=M;return s.record?(t(),c("div",ms,[e("div",ks,[m(i,{n:"green",textContent:"Route Change"})]),e("div",_s,[e("span",hs,k(s.record.from),1),fs,e("span",null,k(s.record.to),1)]),e("div",ys,[s.record.end?(t(),b(r,{key:0,duration:s.record.end-s.record.start},null,8,["duration"])):x("",!0),vs,e("div",bs,k(l(p)),1)])])):x("",!0)}}}),xs={key:0,"h-screen":"","of-hidden":""},$s={"h-screen":"","w-full":"",flex:"","flex-col":""},As={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},Ds={"text-sm":""},Cs=e("div",{"flex-auto":""},null,-1),Bs={"min-h-50":"",px3:"",py2:""},ws=w({__name:"TimelineView",setup(h){const u=se(),p=B("table"),s=B(),o=T(()=>u.value?.metrics.clientTimeline());function i(){o.value&&(o.value.events=[])}function r(){p.value=p.value==="table"?"list":"table"}return(a,n)=>{const d=P("VTooltip"),_=G,D=Be,C=Ge,S=us,A=gs,v=ue;return l(o)?(t(),c("div",xs,[e("div",$s,[e("div",As,[m(d,{flex:""},{popper:g(()=>[e("div",Ds,k(l(o).options.enabled?"Recording...":"Paused"),1)]),default:g(()=>[e("div",{"text-lg":"",class:z(l(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(o).options.enabled?(t(),b(_,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:n[1]||(n[1]=y=>l(o).options.enabled=!1)},{default:g(()=>[E(" Stop Tracking ")]),_:1})):(t(),b(_,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:n[0]||(n[0]=y=>l(o).options.enabled=!0)},{default:g(()=>[E(" Start Tracking ")]),_:1})),Cs,m(_,{icon:l(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:r},null,8,["icon"]),m(_,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(p)==="table"?(t(),b(D,{key:0,data:{...l(o)},onSelect:n[2]||(n[2]=y=>s.value=y.event)},null,8,["data"])):(t(),b(C,{key:1,data:{...l(o)},onSelect:n[3]||(n[3]=y=>s.value=y)},null,8,["data"]))]),m(v,{"model-value":!!l(s),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:n[4]||(n[4]=y=>s.value=void 0)},{default:g(()=>[e("div",Bs,[l(s)?.type==="function"?(t(),b(S,{key:0,record:l(s)},null,8,["record"])):l(s)?.type==="route"?(t(),b(A,{key:1,record:l(s)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Ts={class:"markdown-body"},Ns=e("h1",null,"Timeline",-1),Ss=e("p",null,[e("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Fs=te(`<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 &#39;#imports&#39;</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;">&lt;</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;">&gt;</span></span>
2
+ <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:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
3
+ <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:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
4
+ <span class="line"></span>
5
+ <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>
6
+ <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>
7
+ <span class="line"></span>
8
+ <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it&#39;s directly imported</span></span>
9
+ <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 style="color:#393A34;--shiki-dark:#DBD7CAEE;"> </span></span>
10
+ <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>
11
+ <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>
12
+ <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>
13
+ <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>
14
+ <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>
15
+ <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
16
+ <span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
17
+ <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
18
+ <span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> /</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:#B5695999;--shiki-dark:#C98A7D99;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
19
+ <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
20
+ <span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =&gt;</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:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
21
+ <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
22
+ <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>
23
+ <span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
24
+ <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
25
+ <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
26
+ <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
27
+ <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
28
+ <span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
29
+ <span class="line"></span></code></pre>`,6),Es=[Ns,Ss,Fs],Is={__name:"timeline",setup(h,{expose:u}){return u({frontmatter:{}}),(s,o)=>(t(),c("div",Ts,Es))}},Ls={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Ws=e("h2",{"text-xl":""},[e("span",{capitalize:""},"Enable Timeline?")],-1),Vs={op50:""},Ms=e("p",null,[e("span",{op50:""},"Then Nuxt will "),e("span",{"text-orange":""},"restart automatically"),E(". ")],-1),js={flex:"~ gap-3",mt2:"","justify-end":""},st=w({__name:"timeline",setup(h){const u=ne(),p=H(),s=oe(),o=ae();async function i(){try{const[r,a]=await R.enableTimeline(!0);if(!await s.start(r,a))return;await R.enableTimeline(!1)}catch{ie({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(r,a)=>{const n=ws,d=me,_=le,D=ke,C=_e,S=G,A=re,v=Is,y=he;return t(),c(f,null,[l(u)?.timeline?.enabled?(t(),b(n,{key:0})):(t(),c(f,{key:1},[m(_,null,{default:g(()=>[m(d,{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:i})]),_:1}),m(l(s),null,{default:g(({resolve:W,args:$})=>[m(A,{"model-value":!0,onClose:F=>W(!1)},{default:g(()=>[e("div",Ls,[Ws,e("p",Vs,[E(" Your "),m(D,{role:"button",n:"primary",underline:"",onClick:a[0]||(a[0]=F=>l(o)(l(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),E(" will be updated as: ")]),m(C,{from:$[0],to:$[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Ms,e("div",js,[m(S,{onClick:F=>W(!1)},{default:g(()=>[E(" Cancel ")]),_:2},1032,["onClick"]),m(S,{n:"solid primary",capitalize:"",onClick:F=>W(!0)},{default:g(()=>[E(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(y,null,{default:g(()=>[m(v)]),_:1})],64)}}});export{st as default};
@@ -0,0 +1,2 @@
1
+ import{$ as xe}from"./entry.9a5af3dc.js";function $e(t){const e=t.length;let n=-1,s,r="";const i=t.charCodeAt(0);for(;++n<e;){if(s=t.charCodeAt(n),s===0){r+="�";continue}if(s===37){r+="\\%";continue}if(s===44){r+="\\,";continue}if(s>=1&&s<=31||s===127||n===0&&s>=48&&s<=57||n===1&&s>=48&&s<=57&&i===45){r+=`\\${s.toString(16)} `;continue}if(n===0&&e===1&&s===45){r+=`\\${t.charAt(n)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}const G=$e;function P(t=[]){return Array.isArray(t)?t:[t]}function U(t){return Array.from(new Set(t))}function _e(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function O(t){return typeof t=="string"}function R(t){return O(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Ce(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>R(e)):[t]:[R(t)]}function Ae(t){return t.filter(([e,n],s)=>{if(e.startsWith("$$"))return!1;for(let r=s-1;r>=0;r--)if(t[r][0]===e&&t[r][1]===n)return!1;return!0})}function W(t){return t==null?"":Ae(t).map(([e,n])=>n!=null?`${e}:${n};`:void 0).filter(Boolean).join("")}function D(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ue(t,e,n=!1){const s=t,r=e;if(Array.isArray(r))return n&&Array.isArray(r)?[...s,...r]:[...r];const i={...s};return D(s)&&D(r)&&Object.keys(r).forEach(o=>{D(s[o])&&D(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ue(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function B(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:B(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}return t}function Oe(t){return O(t[0])}function Me(t){return O(t[0])}const J="$$shortcut-no-merge";function Ee(t){return typeof t=="function"?{match:t}:t}function Q(t){return t.length===3}function je(t){return t!=null}function ke(){}var Pe=Object.defineProperty,Le=(t,e,n)=>e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ze=(t,e,n)=>(Le(t,typeof e!="symbol"?e+"":e,n),n);class Te{constructor(){ze(this,"_map",new Map)}get(e,n){const s=this._map.get(e);if(s)return s.get(n)}getFallback(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(n)||r.set(n,s),r.get(n)}set(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(n,s),this}has(e,n){return this._map.get(e)?.has(n)}delete(e,n){return this._map.get(e)?.delete(n)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([n,s])=>Array.from(s.entries()).map(([r,i])=>e(i,n,r)))}}var Fe=Object.defineProperty,Ie=(t,e,n)=>e in t?Fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Re=(t,e,n)=>(Ie(t,typeof e!="symbol"?e+"":e,n),n);class he extends Set{constructor(e){super(e),Re(this,"_map"),this._map??(this._map=new Map)}add(e){return this._map??(this._map=new Map),this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,n){return this._map.set(e,n),super.add(e)}}function Y(t){return t instanceof he}const V={};function Ne(t=["-",":"]){const e=t.join("|");return V[e]||(V[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),V[e].lastIndex=0,V[e]}function De(t,e=["-",":"],n=5){const s=Ne(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(u,c,h,g,y)=>{if(!e.includes(h))return u;r=!0,o.add(c+h);const x=y+c.length+h.length+1,m={length:u.length,items:[]};a.set(y,m);for(const d of[...g.matchAll(/\S+/g)]){const $=x+d.index;let w=a.get($)?.items;w?a.delete($):w=[{offset:$,length:d[0].length,className:d[0]}];for(const b of w)b.className=b.className==="~"?c:b.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),m.items.push(b)}return"$".repeat(u.length)}),n-=1;while(r&&n);let f;if(typeof t=="string"){f="";let u=0;for(const[c,h]of a)f+=t.slice(u,c),f+=h.items.map(g=>g.className).join(" "),u=c+h.length;f+=t.slice(u)}else{f=t;for(const[u,c]of a)f.overwrite(u,u+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return f.toString()}}}function Ve(t,e=["-",":"],n=5){const s=De(t,e,n);return typeof t=="string"?s.expanded:t}const ee=new Set;function de(t){ee.has(t)||(console.warn("[unocss]",t),ee.add(t))}const Be=/[\\:]?[\s'"`;{}]+/g;function Ue(t){return t.split(Be)}const He={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ue(t)}};function Ge(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}}}const K="default",X="preflights",We="shortcuts",Ye="imports",qe={[Ye]:-200,[X]:-100,[We]:-10,[K]:0};function pe(t){return P(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const te="_uno_resolved";function Ke(t){let e=typeof t=="function"?t():t;if(te in e)return e;e={...e},Object.defineProperty(e,te,{value:!0,enumerable:!1});const n=e.shortcuts?pe(e.shortcuts):void 0;if(e.shortcuts=n,e.prefix||e.layer){const s=r=>{r[2]||(r[2]={});const i=r[2];i.prefix==null&&e.prefix&&(i.prefix=P(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function me(t){const e=Ke(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(P).flatMap(me);return[e,...n]}function ne(t={},e={}){const n=Object.assign({},e,t),s=_e((n.presets||[]).flatMap(P).flatMap(me),(l,v)=>l.name===v.name),r=[...s.filter(l=>l.enforce==="pre"),...s.filter(l=>!l.enforce),...s.filter(l=>l.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},qe,...i.map(l=>l.layers));function f(l){return U(i.flatMap(v=>P(v[l]||[])))}const u=f("extractors");let c=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=He),c&&!u.includes(c)&&u.unshift(c),u.sort((l,v)=>(l.order||0)-(v.order||0));const h=f("rules"),g={},y=h.length,x=h.map((l,v)=>{if(Oe(l)){P(l[2]?.prefix||"").forEach(A=>{g[A+l[0]]=[v,l[1],l[2],l]});return}return[v,...l]}).filter(Boolean).reverse();let m=Xe(i.map(l=>l.theme));const d=f("extendTheme");for(const l of d)m=l(m)||m;const $={templates:U(i.flatMap(l=>P(l.autocomplete?.templates))),extractors:i.flatMap(l=>P(l.autocomplete?.extractors)).sort((l,v)=>(l.order||0)-(v.order||0)),shorthands:Ze(i.map(l=>l.autocomplete?.shorthands||{}))};let w=f("separators");w.length||(w=[":","-"]);const b={mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:l=>l,...n,presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:m,rulesSize:y,rulesDynamic:x,rulesStaticMap:g,preprocess:f("preprocess"),postprocess:f("postprocess"),preflights:f("preflights"),autocomplete:$,variants:f("variants").map(Ee).sort((l,v)=>(l.order||0)-(v.order||0)),shortcuts:pe(f("shortcuts")).reverse(),extractors:u,safelist:f("safelist"),separators:w,details:n.details??n.envMode==="dev"};for(const l of i)l?.configResolved?.(b);return b}function Xe(t){return t.map(e=>e?B(e):{}).reduce((e,n)=>ue(e,n),{})}function Ze(t){return t.reduce((e,n)=>{const s={};for(const r in n){const i=n[r];Array.isArray(i)?s[r]=`(${i.join("|")})`:s[r]=i}return{...e,...s}},{})}const Je="0.57.6";var Qe=Object.defineProperty,et=(t,e,n)=>e in t?Qe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e,n)=>(et(t,typeof e!="symbol"?e+"":e,n),n);class tt{constructor(e={},n={}){this.userConfig=e,this.defaults=n,F(this,"version",Je),F(this,"_cache",new Map),F(this,"config"),F(this,"blocked",new Set),F(this,"parentOrders",new Map),F(this,"events",Ge()),this.config=ne(e,n),this.events.emit("config",this.config)}setConfig(e,n){e&&(n&&(this.defaults=n),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ne(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,n,s=new Set){const r={original:e,code:e,id:n,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const o=await i.extract?.(r);if(o)if(Y(o)&&Y(s))for(const a of o)s.setCount(a,s.getCount(a)+o.getCount(a));else for(const a of o)s.add(a)}return s}makeContext(e,n){const s={rawSelector:e,currentSelector:n[1],theme:this.config.theme,generator:this,variantHandlers:n[2],constructCSS:(...r)=>this.constructCustomCSS(s,...r),variantMatch:n};return s}async parseToken(e,n){if(this.blocked.has(e))return;const s=`${e}${n?` ${n}`:""}`;if(this._cache.has(s))return this._cache.get(s);let r=e;for(const u of this.config.preprocess)r=u(e);if(this.isBlocked(r)){this.blocked.add(e),this._cache.set(s,null);return}const i=await this.matchVariants(e,r);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(s,null);return}const o=this.makeContext(e,[n||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);const a=await this.expandShortcut(o.currentSelector,o),f=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(je);if(f?.length)return this._cache.set(s,f),f;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:f=!1}=n,u=O(e)?await this.applyExtractors(e,s,f?new he:new Set):Array.isArray(e)?new Set(e):e;o&&this.config.safelist.forEach(l=>{u.has(l)||u.add(l)});const c=a?"":`
2
+ `,h=new Set([K]),g=f?new Map:new Set,y=new Map;let x={};const m=Array.from(u).map(async l=>{if(g.has(l))return;const v=await this.parseToken(l);if(v!=null){g instanceof Map?g.set(l,{data:v,count:Y(u)?u.getCount(l):-1}):g.add(l);for(const C of v){const A=C[3]||"",M=C[4]?.layer;y.has(A)||y.set(A,[]),y.get(A).push(C),M&&h.add(M)}}});await Promise.all(m),await(async()=>{if(!i)return;const l={generator:this,theme:this.config.theme},v=new Set([]);this.config.preflights.forEach(({layer:C=X})=>{h.add(C),v.add(C)}),x=Object.fromEntries(await Promise.all(Array.from(v).map(async C=>{const M=(await Promise.all(this.config.preflights.filter(z=>(z.layer||X)===C).map(async z=>await z.getCSS(l)))).filter(Boolean).join(c);return[C,M]})))})();const d=this.config.sortLayers(Array.from(h).sort((l,v)=>(this.config.layers[l]??0)-(this.config.layers[v]??0)||l.localeCompare(v))),$={},w=l=>{if($[l])return $[l];let v=Array.from(y).sort((A,M)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(M[0])??0)||A[0]?.localeCompare(M[0]||"")||0).map(([A,M])=>{const z=M.length,T=M.filter(p=>(p[4]?.layer||K)===l).sort((p,S)=>p[0]-S[0]||(p[4]?.sort||0)-(S[4]?.sort||0)||p[5]?.currentSelector?.localeCompare(S[5]?.currentSelector??"")||p[1]?.localeCompare(S[1]||"")||p[2]?.localeCompare(S[2]||"")||0).map(([,p,S,,_,,E])=>[[[(p&&it(p,r))??"",_?.sort??0]],S,!!(E??_?.noMerge)]);if(!T.length)return;const I=T.reverse().map(([p,S,_],E)=>{if(!_&&this.config.mergeSelectors)for(let j=E+1;j<z;j++){const L=T[j];if(L&&!L[2]&&(p&&L[0]||p==null&&L[0]==null)&&L[1]===S)return p&&L[0]&&L[0].push(...p),null}const k=p?U(p.sort((j,L)=>j[1]-L[1]||j[0]?.localeCompare(L[0]||"")||0).map(j=>j[0]).filter(Boolean)):[];return k.length?`${k.join(`,${c}`)}{${S}}`:S}).filter(Boolean).reverse().join(c);if(!A)return I;const N=A.split(" $$ ");return`${N.join("{")}{${c}${I}${c}${"}".repeat(N.length)}`}).filter(Boolean).join(c);i&&(v=[x[l],v].filter(Boolean).join(c));const C=a?"":`/* layer: ${l} */${c}`;return $[l]=v?C+v:""},b=(l=d,v)=>l.filter(C=>!v?.includes(C)).map(C=>w(C)||"").filter(Boolean).join(c);return{get css(){return b()},layers:d,matched:g,getLayers:b,getLayer:w}}async matchVariants(e,n){const s=new Set,r=[];let i=n||e,o=!0;const a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(const f of this.config.variants){if(!f.multiPass&&s.has(f))continue;let u=await f.match(i,a);if(u){if(O(u)){if(u===i)continue;u={matcher:u}}i=u.matcher,r.unshift(u),s.add(f),o=!0;break}}if(!o)break;if(r.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,r,s]}applyVariants(e,n=e[4],s=e[1]){const i=n.slice().sort((u,c)=>(u.order||0)-(c.order||0)).reduceRight((u,c)=>h=>{const g=c.body?.(h.entries)||h.entries,y=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??at)({...h,entries:g,selector:c.selector?.(h.selector,g)||h.selector,parent:y[0]||h.parent,parentOrder:y[1]||h.parentOrder,layer:c.layer||h.layer,sort:c.sort||h.sort},u)},u=>u)({prefix:"",selector:ot(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);const f={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const u of this.config.postprocess)u(f);return f}constructCustomCSS(e,n,s){const r=R(n);if(O(r))return r;const{selector:i,entries:o,parent:a}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),f=`${i}{${W(o)}}`;return a?`${a}{${f}}`:f}async parseUtil(e,n,s=!1,r){const[i,o,a]=O(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const f=this.config.rulesStaticMap[o];if(f&&f[1]&&(s||!f[2]?.internal)){this.config.details&&n.rules.push(f[3]);const c=f[0],h=R(f[1]),g=f[2];return O(h)?[[c,h,g]]:[[c,i,h,g,a]]}n.variantHandlers=a;const{rulesDynamic:u}=this.config;for(const[c,h,g,y]of u){if(y?.internal&&!s)continue;let x=o;if(y?.prefix){const w=P(y.prefix);if(r){const b=P(r);if(!w.some(l=>b.includes(l)))continue}else{const b=w.find(l=>o.startsWith(l));if(b==null)continue;x=o.slice(b.length)}}const m=x.match(h);if(!m)continue;const d=await g(m,n);if(!d)continue;this.config.details&&n.rules.push([h,g,y]);const $=Ce(d).filter(w=>w.length);if($.length)return $.map(w=>O(w)?[c,w,y]:[c,i,w,y,a])}}stringifyUtil(e,n){if(!e)return;if(Q(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?n:void 0,void 0];const{selector:s,entries:r,parent:i,layer:o,sort:a,noMerge:f}=this.applyVariants(e),u=W(r);if(!u)return;const{layer:c,sort:h,...g}=e[3]??{},y={...g,layer:o??c,sort:a??h};return[e[0],s,u,i,y,this.config.details?n:void 0,f]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?a=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(a)}:ke;let i,o;for(const a of this.config.shortcuts){let f=e;if(a[2]?.prefix){const c=P(a[2].prefix).find(h=>e.startsWith(h));if(c==null)continue;f=e.slice(c.length)}if(Me(a)){if(a[0]===f){i=i||a[2],o=a[1],r(a);break}}else{const u=f.match(a[0]);if(u&&(o=a[1](u,n)),o){i=i||a[2],r(a);break}}}if(O(o)&&(o=Ve(o.trim()).split(/\s+/g)),!o){const[a,f]=O(e)?await this.matchVariants(e):e;if(a!==f){const u=await this.expandShortcut(f,n,s-1);u&&(o=u[0].map(c=>O(c)?a.replace(f,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(O(a)?(await this.expandShortcut(a,n,s-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,n,s,r={layer:this.config.shortcutsLayer}){const i=new Te,o=(await Promise.all(U(s).map(async c=>{const h=O(c)?await this.parseUtil(c,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",R(c),void 0,[]]];return!h&&this.config.warn&&de(`unmatched utility "${c}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((c,h)=>c[0]-h[0]),[a,,f]=e,u=[];for(const c of o){if(Q(c)){u.push([c[0],void 0,c[1],void 0,c[2],n,void 0]);continue}const{selector:h,entries:g,parent:y,sort:x,noMerge:m}=this.applyVariants(c,[...c[4],...f],a);i.getFallback(h,y,[[],c[0]])[0].push([g,!!(m??c[3]?.noMerge),x??0])}return u.concat(i.map(([c,h],g,y)=>{const x=(d,$,w)=>{const b=Math.max(...w.map(v=>v[1])),l=w.map(v=>v[0]);return(d?[l.flat(1)]:l).map(v=>{const C=W(v);if(C)return[h,g,C,y,{...r,noMerge:$,sort:b},n,void 0]})};return[[c.filter(([,d])=>d).map(([d,,$])=>[d,$]),!0],[c.filter(([,d])=>!d).map(([d,,$])=>[d,$]),!1]].map(([d,$])=>[...x(!1,$,d.filter(([w])=>w.some(b=>b[0]===J))),...x(!0,$,d.filter(([w])=>w.every(b=>b[0]!==J)))])}).flat(2).filter(Boolean))}isBlocked(e){return!e||this.config.blocklist.some(n=>typeof n=="function"?n(e):O(n)?n===e:n.test(e))}}function nt(t,e){return new tt(t,e)}const rt=/\s\$\$\s+/g;function st(t){return t.match(/\s\$\$\s/)}function it(t,e){return st(t)?t.replace(rt,e?` ${e} `:" "):e?`${e} ${t}`:t}const re=/^\[(.+?)(~?=)"(.*)"\]$/;function ot(t){return re.test(t)?t.replace(re,(e,n,s,r)=>`[${G(n)}${s}"${G(r)}"]`):`.${G(t)}`}function at(t,e){return e(t)}const ct=Object.freeze({left:0,top:0,width:16,height:16}),H=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ge=Object.freeze({...ct,...H}),lt=Object.freeze({...ge,body:"",hidden:!1}),ft=Object.freeze({width:null,height:null}),ye=Object.freeze({...ft,...H});function ut(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function se(t,e){const n=ut(t,e);for(const s in lt)s in H?s in t&&!(s in n)&&(n[s]=H[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function ht(t,e){const n=t.icons,s=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const a=s[o]&&s[o].parent,f=a&&i(a);f&&(r[o]=[a].concat(f))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function ie(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(a){i=se(s[a]||r[a],i)}return o(e),n.forEach(o),se(t,i)}function dt(t,e){if(t.icons[e])return ie(t,e,[]);const n=ht(t,[e])[e];return n?ie(t,e,n):null}const pt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function oe(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(pt);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=mt.test(i);for(;;){if(o){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*e*n)/n)}else r.push(i);if(i=s.shift(),i===void 0)return r.join("");o=!o}}function gt(t){let e="";const n=t.indexOf("<defs");for(;n>=0;){const s=t.indexOf(">",n),r=t.indexOf("</defs");if(s===-1||r===-1)break;const i=t.indexOf(">",r);if(i===-1)break;e+=t.slice(s+1,r).trim(),t=t.slice(0,n).trim()+t.slice(i+1)}return{defs:e,content:t}}function yt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function wt(t,e,n){const s=gt(t);return yt(s.defs,e+s.content+n)}const Z=t=>t==="unset"||t==="undefined"||t==="none";function vt(t,e){const n={...ge,...t},s={...ye,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(m=>{const d=[],$=m.hFlip,w=m.vFlip;let b=m.rotate;$?w?b+=2:(d.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),d.push("scale(-1 1)"),r.top=r.left=0):w&&(d.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),d.push("scale(1 -1)"),r.top=r.left=0);let l;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:l=r.height/2+r.top,d.unshift("rotate(90 "+l.toString()+" "+l.toString()+")");break;case 2:d.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:l=r.width/2+r.left,d.unshift("rotate(-90 "+l.toString()+" "+l.toString()+")");break}b%2===1&&(r.left!==r.top&&(l=r.left,r.left=r.top,r.top=l),r.width!==r.height&&(l=r.width,r.width=r.height,r.height=l)),d.length&&(i=wt(i,'<g transform="'+d.join(" ")+'">',"</g>"))});const o=s.width,a=s.height,f=r.width,u=r.height;let c,h;o===null?(h=a===null?"1em":a==="auto"?u:a,c=oe(h,f/u)):(c=o==="auto"?f:o,h=a===null?oe(c,u/f):a==="auto"?u:a);const g={},y=(m,d)=>{Z(d)||(g[m]=d.toString())};y("width",c),y("height",h);const x=[r.left,r.top,f,u];return g.viewBox=x.join(" "),{attributes:g,viewBox:x,body:i}}function bt(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function St(t){let e=t.startsWith("<svg>")?t.replace("<svg>","<svg >"):t;return!e.includes(" xmlns:xlink=")&&e.includes(" xlink:")&&(e=e.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),e.includes(" xmlns=")||(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),bt(e)}function xt(t){return t.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').trim()}const $t=/\swidth\s*=\s*["'](\w+)["']/,_t=/\sheight\s*=\s*["'](\w+)["']/,q=/<svg\s+/;function Ct(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const a=o.exec(s),f=a!=null,u=e[i];return!u&&!Z(u)&&(typeof n=="number"?n>0&&(e[i]=`${n}em`):a&&(e[i]=a[1])),f};return[r("width",$t),r("height",_t)]}async function we(t,e,n,s,r,i){const{scale:o,addXmlNs:a=!1}=s??{},{additionalProps:f={},iconCustomizer:u}=s?.customizations??{},c=await r?.()??{};await u?.(e,n,c),Object.keys(f).forEach(m=>{const d=f[m];d!=null&&(c[m]=d)}),i?.(c);const[h,g]=Ct(t,c,o);a&&(!t.includes("xmlns=")&&!c.xmlns&&(c.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!c["xmlns:xlink"]&&(c["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const y=Object.keys(c).map(m=>m==="width"&&h||m==="height"&&g?null:`${m}="${c[m]}"`).filter(m=>m!=null);if(y.length&&(t=t.replace(q,`<svg ${y.join(" ")} `)),s){const{defaultStyle:m,defaultClass:d}=s;d&&!t.includes("class=")&&(t=t.replace(q,`<svg class="${d}" `)),m&&!t.includes("style=")&&(t=t.replace(q,`<svg style="${m}" `))}const x=s?.usedProps;return x&&(Object.keys(f).forEach(m=>{const d=c[m];d!=null&&(x[m]=d)}),typeof c.width<"u"&&c.width!==null&&(x.width=c.width),typeof c.height<"u"&&c.height!==null&&(x.height=c.height)),t}async function ae(t,e,n,s){let r;try{if(typeof t=="function")r=await t(n);else{const i=t[n];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${n}" in "${e}":`,i);return}if(r){const i=r.indexOf("<svg");i>0&&(r=r.slice(i));const{transform:o}=s?.customizations??{};return r=typeof o=="function"?await o(r,e,n):r,r.startsWith("<svg")?await we(s?.customizations?.trimCustomSvg===!0?xt(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function ve(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=dt(t,o),r){let a={...ye};typeof i=="function"&&(a=i(a));const{attributes:{width:f,height:u,...c},body:h}=vt(r,a),g=s?.scale;return await we(`<svg >${h}</svg>`,e,o,s,()=>({...c}),y=>{const x=(m,d)=>{const $=y[m];let w;if(!Z($)){if($)return;typeof g=="number"?g&&(w=`${g}em`):w=d}w?y[m]=w:delete y[m]};x("width",f),x("height",u)})}}const be=async(t,e,n)=>{const s=n?.customCollections?.[t];if(s)if(typeof s=="function"){let r;try{r=await s(e)}catch(i){console.warn(`Failed to load custom icon "${e}" in "${t}":`,i);return}if(r){if(typeof r=="string")return await ae(()=>r,t,e,n);if("icons"in r){const i=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await ve(r,t,i,n)}}}else return await ae(s,t,e,n)};function At(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ot=["academicons","akar-icons","ant-design","arcticons","basil","bi","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const Mt=At(Ot),Et=3;function jt(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:a={},customizations:f={},autoInstall:u=!1,layer:c="icons",unit:h}=e,g={addXmlNs:!0,scale:n,customCollections:o,autoInstall:u,warn:void 0,customizations:{...f,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(x,m,d){await f.iconCustomizer?.(x,m,d),h&&(d.width||(d.width=`${n}${h}`),d.height||(d.height=`${n}${h}`))}}};let y;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async([x,m,d=s])=>{let $="",w="",b;y=y||await t(e);const l={};if(m.includes(":"))[$,w]=m.split(":"),b=await y($,w,{...g,usedProps:l});else{const C=m.split(/-/g);for(let A=Et;A>=1&&($=C.slice(0,A).join("-"),w=C.slice(A).join("-"),b=await y($,w,{...g,usedProps:l}),!b);A--);}if(!b){i&&de(`failed to load icon "${x}"`);return}const v=`url("data:image/svg+xml;utf8,${St(b)}")`;return d==="auto"&&(d=b.includes("currentColor")?"mask":"bg"),d==="mask"?{"--un-icon":v,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...l}:{background:`${v} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...l}},{layer:c,prefix:r}]]}}}function Se(t,e){const n=new Map;function s(r){if(Mt.includes(r))return n.has(r)||n.set(r,t(`${e}@iconify-json/${r}/icons.json`)),n.get(r)}return async(r,i,o)=>{let a=await be(r,i,o);if(a)return a;const f=await s(r);if(f){const u=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await ve(f,r,u,o)}return a}}function kt(t){return Se(xe,t)}const Pt=jt(async t=>{const e=t?.customFetch,n=t?.cdn;return e&&n?Se(e,n):n?kt(n):be});function Lt(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function ce(t){return t.charAt(0).toUpperCase()+t.slice(1)}function le(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var fe=["Webkit","Moz","ms"];function zt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=Lt(s);if(i!=="filter"&&i in t)return e[s]=le(i);i=ce(i);for(let o=0;o<fe.length;o++){const a=`${fe[o]}${i}`;if(a in t)return e[s]=le(ce(a))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function Tt(t){return t.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}function Ft(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,n=window.document,s=()=>n.documentElement,r=e.__unocss||{},i=Object.assign({},t,r.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=P(o.postprocess)).unshift(zt(n.createElement("div").style)),i.configResolved?.(r,o);const f=nt(r,o),u=p=>i.inject?i.inject(p):s().prepend(p),c=()=>i.rootElement?i.rootElement():n.body,h=new Map;let g=!0,y=new Set,x,m,d=[];const $=()=>new Promise(p=>{d.push(p),m!=null&&clearTimeout(m),m=setTimeout(()=>l().then(()=>{const S=d;d=[],S.forEach(_=>_())}),0)});function w(p){if(p.nodeType!==1)return;const S=p;S.hasAttribute(a)&&S.removeAttribute(a),S.querySelectorAll(`[${a}]`).forEach(_=>{_.removeAttribute(a)})}function b(p,S){let _=h.get(p);if(!_)if(_=n.createElement("style"),_.setAttribute("data-unocss-runtime-layer",p),h.set(p,_),S==null)u(_);else{const E=b(S),k=E.parentNode;k?k.insertBefore(_,E.nextSibling):u(_)}return _}async function l(){const p=await f.generate(y);return p.layers.reduce((S,_)=>(b(_,S).innerHTML=p.getLayer(_)??"",_),void 0),y=p.matched,{...p,getStyleElement:S=>h.get(S),getStyleElements:()=>h}}async function v(p){const S=y.size;await f.applyExtractors(p,void 0,y),S!==y.size&&await $()}async function C(p=c()){const S=p&&p.outerHTML;S&&(await v(`${S} ${Tt(S)}`),w(s()),w(p))}const A=new MutationObserver(p=>{g||p.forEach(async S=>{if(S.target.nodeType!==1)return;const _=S.target;for(const E of h)if(_===E[1])return;if(S.type==="childList")S.addedNodes.forEach(async E=>{if(E.nodeType!==1)return;const k=E;x&&!x(k)||(await v(k.outerHTML),w(k))});else{if(x&&!x(_))return;if(S.attributeName!==a){const E=Array.from(_.attributes).map(j=>j.value?`${j.name}="${j.value}"`:j.name).join(" "),k=`<${_.tagName.toLowerCase()} ${E}>`;await v(k)}_.hasAttribute(a)&&_.removeAttribute(a)}})});let M=!1;function z(){if(M)return;const p=i.observer?.target?i.observer.target():c();p&&(A.observe(p,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),M=!0)}function T(){i.bypassDefined&&It(f.blocked),C(),z()}function I(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",T):T()}const N=e.__unocss_runtime=e.__unocss_runtime={version:f.version,uno:f,async extract(p){O(p)||(p.forEach(S=>y.add(S)),p=""),await v(p)},extractAll:C,inspect(p){x=p},toggleObserver(p){p===void 0?g=!g:g=!!p,!M&&!g&&I()},update:l,presets:e.__unocss_runtime?.presets??{}};i.ready?.(N)!==!1&&(g=!1,I())}function It(t=new Set){for(let e=0;e<document.styleSheets.length;e++){const n=document.styleSheets[e];let s;try{if(s=n.cssRules||n.rules,!s)continue;Array.from(s).flatMap(r=>r.selectorText?.split(/,/g)||[]).forEach(r=>{r&&(r=r.trim(),r.startsWith(".")&&(r=r.slice(1)),t.add(r))})}catch{continue}}return t}Ft({defaults:{presets:[Pt({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
@@ -1 +1 @@
1
- import{_ as D}from"./NNavbar.vue.29f03776.js";import{_ as S}from"./NCodeBlock.vue.c114d969.js";import{o as c,m as _,k as s,d as B,r as v,bI as j,bJ as I,ax as P,a as p,af as E,i as l,j as u,F as f,S as G,f as i,l as R,n as U,t as h,G as W,h as z,am as A,A as H}from"./entry.5d59ff5c.js";import{_ as J}from"./HelpFab.vue.70bfd8f0.js";import"./client.4841a079.js";const L={class:"markdown-body"},q=s("h1",null,"Virtual Files",-1),K=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[q,K],O={__name:"virtual-files",setup(x,{expose:n}){return n({frontmatter:{}}),(d,a)=>(c(),_("div",L,M))}},Q=["onClick"],T=s("div",{"x-divider":""},null,-1),X={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Y={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},Z=s("span",{op75:""},"Select a file to start",-1),re=B({__name:"virtual-files",setup(x){const n=v(""),o=j(),d=I(),a=v();P(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function y(e){if(o.value?.rootDir)return e.startsWith(o.value?.rootDir)?e.slice(o.value.rootDir.length):e}const m=p(()=>o.value?o.value.entries.filter(e=>!e.id.startsWith(`${o.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=p(()=>new E(m.value,{keys:["id","path"]})),b=p(()=>n.value?k.value.search(n.value).map(e=>e.item):m.value);return(e,t)=>{const g=D,$=S,C=A,F=H,N=G,V=O,w=J;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(g,{search:i(n),"onUpdate:search":t[0]||(t[0]=r=>R(n)?n.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,U(i(b),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:W(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:ee=>d.value=r.id},h(y(r.id)),11,Q),T],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",X,[s("div",Y,[s("code",null,h(i(a).id),1)]),l($,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),z(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[Z]),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(V)]),_:1})],64)}}});export{re as default};
1
+ import{_ as D}from"./NNavbar.vue.823096f1.js";import{_ as B}from"./NCodeBlock.vue.c80c8282.js";import{o as c,m as _,k as s,d as S,r as v,bJ as j,bK as P,ay as U,a as p,ag as E,i as l,j as u,F as f,U as G,f as i,l as I,n as R,t as h,G as W,h as z,an as A,A as H}from"./entry.9a5af3dc.js";import{_ as J}from"./HelpFab.vue.6bf23ece.js";import"./client.b8ca1554.js";const K={class:"markdown-body"},L=s("h1",null,"Virtual Files",-1),q=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[L,q],O={__name:"virtual-files",setup(x,{expose:n}){return n({frontmatter:{}}),(d,a)=>(c(),_("div",K,M))}},Q=["onClick"],T=s("div",{"x-divider":""},null,-1),X={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Y={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},Z=s("span",{op75:""},"Select a file to start",-1),re=S({__name:"virtual-files",setup(x){const n=v(""),o=j(),d=P(),a=v();U(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function y(e){if(o.value?.rootDir)return e.startsWith(o.value?.rootDir)?e.slice(o.value.rootDir.length):e}const m=p(()=>o.value?o.value.entries.filter(e=>!e.id.startsWith(`${o.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=p(()=>new E(m.value,{keys:["id","path"]})),b=p(()=>n.value?k.value.search(n.value).map(e=>e.item):m.value);return(e,t)=>{const g=D,$=B,C=A,F=H,N=G,V=O,w=J;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(g,{search:i(n),"onUpdate:search":t[0]||(t[0]=r=>I(n)?n.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,R(i(b),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:W(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:ee=>d.value=r.id},h(y(r.id)),11,Q),T],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",X,[s("div",Y,[s("code",null,h(i(a).id),1)]),l($,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),z(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[Z]),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(V)]),_:1})],64)}}});export{re as default};