@nuxt/devtools 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +11 -6
- package/dist/chunks/vite-inspect.mjs +1 -1
- package/dist/client/200.html +25 -26
- package/dist/client/404.html +25 -26
- package/dist/client/_nuxt/{BC70P7_F.js → 5icOpXn4.js} +1 -1
- package/dist/client/_nuxt/{DDnrbwm6.js → 8B46VhQd.js} +10 -10
- package/dist/client/_nuxt/{DkWzd13i.js → 95vJRnOC.js} +1 -1
- package/dist/client/_nuxt/{wH9tLl3L.js → B6pqls1-.js} +1 -1
- package/dist/client/_nuxt/{CxjTqXJ3.js → BBwATVWa.js} +1 -1
- package/dist/client/_nuxt/BFU18nbo.js +1 -0
- package/dist/client/_nuxt/BHFh0d3M.js +1 -0
- package/dist/client/_nuxt/{CiJaujZp.js → BOCztcZa.js} +1 -1
- package/dist/client/_nuxt/BSxPYwaX.js +9 -0
- package/dist/client/_nuxt/{BUsJdU1D.js → BZttYiGX.js} +1 -1
- package/dist/client/_nuxt/{B_TJJefU.js → BaHHWTDW.js} +1 -1
- package/dist/client/_nuxt/{BMFk7jIo.js → BcY_kb8Z.js} +2 -7
- package/dist/client/_nuxt/{Cf2y5AWw.js → Bdw4ogYl.js} +1 -1
- package/dist/client/_nuxt/{CPaWbrKR.js → Bm7GelXr.js} +1 -1
- package/dist/client/_nuxt/{Dja8TLy7.js → BqFTXkdX.js} +1 -1
- package/dist/client/_nuxt/{BGq4KZyx.js → Br6ll-O0.js} +1 -1
- package/dist/client/_nuxt/{D9QwXXm-.js → BuHEGYFm.js} +1 -1
- package/dist/client/_nuxt/{hV8zgwZN.js → BwZNBl_i.js} +1 -1
- package/dist/client/_nuxt/{V_y36BGi.js → Bxkoe-BC.js} +1 -1
- package/dist/client/_nuxt/BzZi0kk8.js +30 -0
- package/dist/client/_nuxt/{CJh8tcLd.js → C84bMERG.js} +1 -1
- package/dist/client/_nuxt/{DNKTLI-X.js → CB2p7gUj.js} +1 -1
- package/dist/client/_nuxt/{Du-HkQgI.js → CKyeeumc.js} +1 -1
- package/dist/client/_nuxt/{d9hkAmu-.js → CNMcdA5y.js} +1 -1
- package/dist/client/_nuxt/{CJA0Nzuy.js → CR9D18UE.js} +1 -1
- package/dist/client/_nuxt/{D67vQ_AH.js → CUz7aF6D.js} +1 -1
- package/dist/client/_nuxt/{DNcopq6z.js → CVTYawdK.js} +1 -1
- package/dist/client/_nuxt/{BVv9Eso3.js → C_00-WxQ.js} +1 -1
- package/dist/client/_nuxt/C_UmrX8j.js +1 -0
- package/dist/client/_nuxt/{Chcty9cC.js → Cesx2JqR.js} +1 -1
- package/dist/client/_nuxt/{BIZE-RmO.js → ChEasZVw.js} +1 -1
- package/dist/client/_nuxt/{CY3rhNYA.js → CxRAjt7E.js} +1 -1
- package/dist/client/_nuxt/{DHStGI0s.js → CzSsbgVT.js} +1 -1
- package/dist/client/_nuxt/{CG2u9oVp.js → D49UL1Mz.js} +2 -2
- package/dist/client/_nuxt/{yolNcZdz.js → D5uuYwbV.js} +1 -1
- package/dist/client/_nuxt/{CicM_Tn6.js → DA_gWIKG.js} +1 -1
- package/dist/client/_nuxt/{BkHeZ-Kl.js → DGbyHtVw.js} +1 -1
- package/dist/client/_nuxt/{CQ4DIexe.js → DI2S-mmO.js} +1 -1
- package/dist/client/_nuxt/DL_Umk9C.js +100 -0
- package/dist/client/_nuxt/{Rgd--cyG.js → DMQf3nI6.js} +1 -1
- package/dist/client/_nuxt/DMihCQJ_.js +2 -0
- package/dist/client/_nuxt/DP008-Ly.js +1 -0
- package/dist/client/_nuxt/{DtbS56cH.js → DP4rCJej.js} +1 -1
- package/dist/client/_nuxt/{D6s5UxPA.js → DYgqHVwa.js} +1 -1
- package/dist/client/_nuxt/{Cj0TlqSt.js → De1Y8lB-.js} +1 -1
- package/dist/client/_nuxt/{C6Ei2A0L.js → Dh5Afz2J.js} +1 -1
- package/dist/client/_nuxt/{B7GIg3G6.js → DpejoWnk.js} +1 -1
- package/dist/client/_nuxt/{BmLFD5M3.js → Drfq5M3J.js} +1 -1
- package/dist/client/_nuxt/DvA7Ywdy.js +1032 -0
- package/dist/client/_nuxt/{pO9n-Epq.js → DvifPl4v.js} +1 -1
- package/dist/client/_nuxt/{D3UZejev.js → ElxmrMfl.js} +1 -1
- package/dist/client/_nuxt/{szFYwhVn.js → Kxk8Hc64.js} +1 -1
- package/dist/client/_nuxt/{CY-72W8G.js → LlSIX508.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.Bcfh0aRP.css → NCodeBlock.BJ-XAY5s.css} +1 -1
- package/dist/client/_nuxt/NSectionBlock.Dnwb6MN5.css +1 -0
- package/dist/client/_nuxt/{BQNSMSKH.js → PF6U826s.js} +1 -1
- package/dist/client/_nuxt/{B4UVI4YI.js → TuJR20B4.js} +1 -1
- package/dist/client/_nuxt/{CaqiXFWz.js → ZyHoMeHZ.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/0148a850-ea4d-465f-8f41-a17235e36e50.json +1 -0
- package/dist/client/_nuxt/{BdPp7ki7.js → dVuo_hLp.js} +1 -1
- package/dist/client/_nuxt/entry.CuU2sB_i.css +1 -0
- package/dist/client/_nuxt/{B_kufNum.js → eoRoFZz1.js} +1 -1
- package/dist/client/_nuxt/error-404.CdZ-8tbX.css +1 -0
- package/dist/client/_nuxt/error-500.4KK_ddFR.css +1 -0
- package/dist/client/_nuxt/{VjEYhvFP.js → fMHX_-wi.js} +1 -1
- package/dist/client/_nuxt/{BQwqZtdq.js → giz0tI1M.js} +1 -1
- package/dist/client/_nuxt/{CwbK9Dp1.js → ifvc2XRc.js} +1 -1
- package/dist/client/_nuxt/l1tWIxUc.js +9 -0
- package/dist/client/_nuxt/{BJ6YdImB.js → mckm0NQH.js} +1 -1
- package/dist/client/_nuxt/{d85UEzaq.js → oC4jMXG3.js} +1 -1
- package/dist/client/_nuxt/{Diil_3yv.js → pATA0c1v.js} +2 -2
- package/dist/client/_nuxt/terminals.dNTO8Cf0.css +1 -0
- package/dist/client/_nuxt/vTxNztlt.js +43 -0
- package/dist/client/index.html +25 -26
- package/dist/module.json +1 -1
- package/dist/runtime/settings.d.ts +1 -1
- package/package.json +33 -35
- package/dist/client/_nuxt/B-raFxqM.js +0 -30
- package/dist/client/_nuxt/B3Qmg_qx.js +0 -99
- package/dist/client/_nuxt/B8I-AuTp.js +0 -1031
- package/dist/client/_nuxt/BCmHY4gl.js +0 -1
- package/dist/client/_nuxt/BQJhJYMu.js +0 -1
- package/dist/client/_nuxt/CCmycU7E.js +0 -1
- package/dist/client/_nuxt/CNqbp7Gb.js +0 -1
- package/dist/client/_nuxt/CSqTRDVQ.js +0 -2
- package/dist/client/_nuxt/DdXfWFmw.js +0 -9
- package/dist/client/_nuxt/DrlyhbnE.js +0 -9
- package/dist/client/_nuxt/NSectionBlock.DF4F_onM.css +0 -1
- package/dist/client/_nuxt/builds/meta/18b2ce8f-3b8c-41e7-8fa5-448213ee4a24.json +0 -1
- package/dist/client/_nuxt/entry.C09IdXcP.css +0 -1
- package/dist/client/_nuxt/error-404.ClUqCsUG.css +0 -1
- package/dist/client/_nuxt/error-500.Xj6Xfe4d.css +0 -1
- package/dist/client/_nuxt/p0yxMpsq.js +0 -48
- package/dist/client/_nuxt/terminals.bPBXyte9.css +0 -32
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as G,P as ne,r as D,Q as q,bR as R,aC as ae,w as oe,aB as se,a1 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 U,m as i,F as w,n as A,t as b,G as E,ae as M,v as d,p as F,aw as ue,I as ie,bh as de,af as ce,bS as pe,bT as z,_ as me,X as _e,a6 as fe,ar as ve,A as ye,U as ge,aI as he}from"./p0yxMpsq.js";import{_ as ke}from"./Cf2y5AWw.js";import{_ as be}from"./C6Ei2A0L.js";import{_ as xe}from"./CPaWbrKR.js";import{e as we}from"./B3Qmg_qx.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),Ie={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ne={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},De={key:1},Ue=["onKeyup"],Ae=r("br",null,null,-1),Me={key:0,op50:""},Be={key:1},Le=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),Te={"font-bold":""},qe=r("br",null,null,-1),Re={"text-sm":""},Ee=r("br",null,null,-1),Fe=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=D(""),v=D(""),s=q("storage:current",""),e=D(),y=q("storage:file:state",""),{data:K}=([p,g]=R(()=>z("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:B}=([p,g]=R(async()=>z("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 B(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(Q),oe(s,()=>{B(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(I(),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 I(){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 N=me,Y=ke,j=_e,Z=fe,L=be,P=ve,T=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(N,{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=>U(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,A(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=>U(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,A(t(W),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:E(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=>U(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"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ie,[r("div",Ne,[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"])):(l(),i("code",De,[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?F("",!0):(l(),m(N,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:E({"border-green":t(e).content!==t(e).updatedContent}),onClick:I},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(N,{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(I,["ctrl"]),["enter"])},null,40,Ue)),[[ce,t(e).updatedContent]])])):(l(),m(T,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ae,d("Learn more about "),c(L,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(T,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Me," Select one storage to start: ")):(l(),i("p",Be,[d(" No custom storage defined in "),Le,d("."),Pe,d(" Learn more about "),c(L,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,A(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:ze=>s.value=_},{default:u(()=>[r("span",Te,b(_),1),qe,r("span",Re,b(o.driver)+" driver",1),Ee,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),He=G({__name:"storage",setup(O){return(p,g)=>{const C=Fe,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{He as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as o,s,o as a,m as i,k as e,t as r,y as u,z as l}from"./p0yxMpsq.js";const c=t=>(u("data-v-f3f8980b"),t=t(),l(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},b=["textContent"],g=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,x)=>(a(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,b),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,g)])]))}},k=o(f,[["__scopeId","data-v-f3f8980b"]]);export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as B,r as T,a as k,as as W,f as t,o,m as s,k as e,t as $,h as y,j as x,bh as q,F as v,n as M,p as P,i as h,v as L,G as E,X as A,_ as G,ac as H,bi as D,b3 as X,b4 as J,ab as Q,ap as Y,b5 as Z,aq as ee,l as te,ae as oe,L as ne,M as ae}from"./p0yxMpsq.js";import{_ as j}from"./DkWzd13i.js";import{_ as F}from"./CPaWbrKR.js";import{_ as se}from"./B4UVI4YI.js";import{_ as re}from"./B_kufNum.js";import{_ as le}from"./DtbS56cH.js";import"./DNcopq6z.js";import"./BC70P7_F.js";import"./BQwqZtdq.js";const ie={block:"","cursor-pointer":""},ue={p2:""},ce=["onSubmit"],de=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),pe={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},_e={key:1},he=B({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(V,{emit:i}){const d=V,w=i,m=T([]),p=k(()=>{const u=N(d.route.path);return m.value=Array.from({length:u.length},()=>""),u});function N(u){return u.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(_=>_[0]===":"?_.replace(/\(\)$/,"?"):_)}const r=k(()=>p.value.map((u,_)=>u[0]===":"?m.value[_]:u).join("").replace(/\/+/g,"/")),n=k(()=>d.route.path.includes(":"));function f(){w("navigate",r.value)}return(u,_)=>{const a=A,l=G,c=W("VDropdown");return t(n)?(o(),y(c,{key:1},{popper:x(({hide:g})=>[e("div",ue,[e("form",{flex:"~ col",onSubmit:q(()=>{f(),g()},["prevent"])},[t(n)?(o(),s(v,{key:0},[de,e("div",pe,[(o(!0),s(v,null,M(t(p),(b,R)=>(o(),s(v,{key:R},[b[0]===":"?(o(),y(a,{key:0,modelValue:t(m)[R],"onUpdate:modelValue":I=>t(m)[R]=I,"w-20":"","n-sm":"",placeholder:b.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",_e,$(b),1))],64))),128))])],64)):P("",!0),h(l,{block:"",n:"primary"},{default:x(()=>[L(" Navigate ")]),_:1})],40,ce)])]),default:x(()=>[e("code",ie,[(o(!0),s(v,null,M(t(p),(g,b)=>(o(),s("span",{key:b,class:E(g[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(g[0]===":"?g.slice(1):g),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:f},[e("code",null,$(u.route.path),1)]))}}}),me={"w-full":""},fe=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),ge={"w-20":"","pr-1":""},ve={flex:"","items-center":"","justify-end":""},ye={"text-sm":""},be={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},ke=["onClick"],$e=e("div",{"i-carbon-script-reference":""},null,-1),we=[$e],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ve=["onClick"],Ie=B({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(V){const i=V,d=H(),w=D(),m=k(()=>[...i.pages].sort((r,n)=>r.path.localeCompare(n.path)));function p(r){const n=i.layouts.find(f=>f.name===r);n&&d(n.file)}function N(r){if(typeof r=="string")return w.value?.middleware.find(n=>n.name===r)?.path}return(r,n)=>{const f=j,u=he,_=F;return o(),s("div",null,[e("table",me,[fe,e("tbody",null,[(o(!0),s(v,null,M(t(m),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ge,[e("div",ve,[r.matched.find(l=>l.name===a.name)?(o(),y(f,{key:0,n:"green",title:"active",textContent:"active"})):r.matchedPending.find(l=>l.name===a.name)?(o(),y(f,{key:1,n:"teal",title:"next",textContent:"next"})):P("",!0)])]),e("td",ye,[e("div",be,[h(u,{route:a,class:E(r.matched.find(l=>l.name===a.name)?"text-primary":r.matchedPending.find(l=>l.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=l=>r.$emit("navigate",l))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>t(d)(a.file||a.meta?.file)},we,8,ke)):P("",!0)])])]),e("td",Ne,$(a.name),1),e("td",Re,[h(_,{filepath:N(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ce,[a.meta.layout===!1?(o(),s("span",Pe,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:l=>p(a.meta.layout)},$(a.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=l=>p("default"))}," (default) "))])]))),128))])])])}}}),Le={class:"markdown-body"},Me=e("h1",null,"Pages",-1),Te=e("p",null,[L("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),L(" directory.")],-1),Be=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Ee=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),De=e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),je=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Fe=[Me,Te,Be,Ee,Ae,De,je],Se={__name:"pages",setup(V,{expose:i}){return i({frontmatter:{}}),(w,m)=>(o(),s("div",Le,Fe))}},ze={key:0,"h-full":"","of-auto":""},Ue={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Ke=e("span",{op50:""},"Navigate from ",-1),Oe={"font-mono":""},We=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},Ge=e("span",null,[L("Press "),e("b",{"font-bold":""},"Enter"),L(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Xe={key:1,op50:""},Je={"min-h-14":""},Qe={key:1,class:"py-4 text-center"},Ye=e("span",{op50:""},"No routes matched",-1),Ze=[Ye],et={"w-full":""},tt=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),ot={mr1:""},pt=B({__name:"pages",setup(V){const i=X(),d=J(),w=Q(),m=D(),p=Y(),N=Z(),r=k(()=>m.value?.middleware||[]),n=T(""),f=T(0),u=k(()=>(r.value,n.value,p.value,f.value,i.value?.currentRoute?.value?.path));ee(()=>{d.value&&(n.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(c=>{n.value=c.fullPath}),i.value?.afterEach(c=>{n.value=c.fullPath})});async function _(){n.value!==i.value?.currentRoute?.value?.path&&i.value.push(n.value||"/")}const a=k(()=>i.value.resolve(n.value||"/").matched);function l(c){i.value.push(c),n.value=c}return(c,g)=>{const b=A,R=Ie,I=se,S=j,z=F,U=re,K=Se,O=le;return o(),s(v,null,[t(w)?.pages&&t(i)?(o(),s("div",ze,[e("div",Ue,[e("div",null,[t(u)!==t(n)?(o(),s(v,{key:0},[Ke,e("span",Oe,$(t(u)),1),We],64)):(o(),s("span",qe,"Current route"))]),h(b,{modelValue:t(n),"onUpdate:modelValue":g[0]||(g[0]=C=>te(n)?n.value=C:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:E(t(u)===t(n)?"":t(a).length?"text-green":"text-orange"),onKeydown:oe(_,["enter"])},null,8,["modelValue","class"]),e("div",null,[t(u)!==t(n)?(o(),s(v,{key:0},[Ge,t(a).length?P("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Xe,"Edit path above to navigate"))])]),h(I,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:x(()=>[e("div",Je,[t(a).length?(o(),y(R,{key:0,pages:t(a),layouts:t(p)||[],matched:t(d).matched,"matched-pending":t(a),onNavigate:l},null,8,["pages","layouts","matched","matched-pending"])):(o(),s("div",Qe,Ze))])]),_:1}),h(I,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(N).length} routes registered in your application`,padding:"pr5"},{default:x(()=>[h(R,{pages:t(N),layouts:t(p)||[],matched:t(d).matched,"matched-pending":t(a),onNavigate:l},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),y(I,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:x(()=>[e("table",et,[tt,(o(!0),s(v,null,M(t(r),C=>(o(),s("tr",{key:C.path,"h-7":""},[e("td",null,[e("span",ot,$(C.name),1),C.global?(o(),y(S,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):P("",!0)]),e("td",null,[h(z,{filepath:C.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):P("",!0)])):(o(),y(U,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in c?c.rpc:t(ne)).runWizard(await("ensureDevAuthToken"in c?c.ensureDevAuthToken:t(ae))(),"enablePages")}}]},null,8,["actions"])),h(O,null,{default:x(()=>[h(K)]),_:1})],64)}}});export{pt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bO as ke,d as te,bP as re,r as W,a as $,o as y,m as I,k as d,i as O,f as u,t as R,F as B,n as Z,G as F,p as j,a6 as oe,bK as Oe,ab as Te,ay as ie,ac as xe,aB as Se,b0 as we,bL as Xe,e as De,a2 as se,I as G,j as C,v as Y,bH as Ee,h as A,l as ee,aw as Me,ak as ue,V as Ce,_ as le,X as Ie,A as ce,am as $e,a9 as Ue,aa as Le,bQ as Ne,ah as Re,U as Ae,bN as Ve,ar as je}from"./p0yxMpsq.js";import{_ as Be}from"./D6s5UxPA.js";import{_ as fe}from"./DkWzd13i.js";import{_ as pe}from"./d9hkAmu-.js";import{_ as He}from"./CwbK9Dp1.js";import{S as de}from"./BcJws1i5.js";import{e as We}from"./B3Qmg_qx.js";import{_ as ze}from"./B4UVI4YI.js";import{_ as qe}from"./Du-HkQgI.js";import"./pO9n-Epq.js";import"./Cf2y5AWw.js";import"./BQwqZtdq.js";import"./DNcopq6z.js";var he={exports:{}};(function(z,U){(function(x,D){z.exports=D()})(globalThis,()=>(()=>{var L={794:(S,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var r=_(586),k=function(){function m(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return m.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a.startsWith("@")){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},m.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},m.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var n=e[a].split(",").map(function(s){return s.trim()}).filter(function(s){return s!==""}).map(function(s){return isNaN(Number(s))?s:Number(s)}).filter(function(s){return s!==null&&s!==""});n.length===0&&n.push("*"),n.sort(function(s,i){return s!==null&&i!==null?s-i:0}),e[a]=n.map(function(s){return s!==null?s.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var o=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";o?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},m.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(f){var h=f.replace(/\D/,""),c=h;return e.dayOfWeekStartIndexZero?h=="7"&&(c="0"):c=(parseInt(h)-1).toString(),f.replace(h,c)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var n in a)t[5]=t[5].replace(new RegExp(n,"gi"),a[n].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(f){var h=f.replace(/\D/,""),c=h;return e.monthStartIndexZero&&(c=(parseInt(h)+1).toString()),f.replace(h,c)});var o={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in o)t[4]=t[4].replace(new RegExp(s,"gi"),o[s].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(f){return f!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var l=null;switch(i){case 4:l="12";break;case 5:l="6";break;case 6:l="9999";break;default:l=null;break}if(l!==null){var v=t[i].split("/");t[i]="".concat(v[0],"-").concat(l,"/").concat(v[1])}}},m.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},m.prototype.validateRange=function(t){r.default.secondRange(t[0]),r.default.minuteRange(t[1]),r.default.hourRange(t[2]),r.default.dayOfMonthRange(t[3]),r.default.monthRange(t[4],this.monthStartIndexZero),r.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},m.prototype.assertNoInvalidCharacters=function(t,e){var a=e.match(/[A-KM-VX-Z]+/gi);if(a&&a.length)throw new Error("".concat(t," part contains invalid values: '").concat(a.toString(),"'"))},m}();p.CronParser=k},728:(S,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var r=_(910),k=_(794),m=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var n=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(n,"'.")),this.options.locale=n}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var n=a===void 0?{}:a,o=n.throwExceptionOnParseError,s=o===void 0?!0:o,i=n.verbose,l=i===void 0?!1:i,v=n.dayOfWeekStartIndexZero,f=v===void 0?!0:v,h=n.monthStartIndexZero,c=h===void 0?!1:h,N=n.use24HourTimeFormat,T=n.locale,H=T===void 0?null:T,V=n.tzOffset,E=V===void 0?0:V,q={throwExceptionOnParseError:s,verbose:l,dayOfWeekStartIndexZero:f,monthStartIndexZero:c,use24HourTimeFormat:N,locale:H,tzOffset:E},Q=new t(e,q);return Q.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var a=new k.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=a.parse();var n=this.getTimeOfDayDescription(),o=this.getDayOfMonthDescription(),s=this.getMonthDescription(),i=this.getDayOfWeekDescription(),l=this.getYearDescription();e+=n+o+i+s+l,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(v){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(v)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],n=this.expressionParts[2],o="";if(!r.StringUtilities.containsAny(a,t.specialCharacters)&&!r.StringUtilities.containsAny(n,t.specialCharacters)&&!r.StringUtilities.containsAny(e,t.specialCharacters))o+=this.i18n.atSpace()+this.formatTime(n,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!r.StringUtilities.containsAny(n,t.specialCharacters)){var s=a.split("-");o+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(n,s[0],""),this.formatTime(n,s[1],""))}else if(!e&&n.indexOf(",")>-1&&n.indexOf("-")==-1&&n.indexOf("/")==-1&&!r.StringUtilities.containsAny(a,t.specialCharacters)){var i=n.split(",");o+=this.i18n.at();for(var l=0;l<i.length;l++)o+=" ",o+=this.formatTime(i[l],a,""),l<i.length-2&&(o+=","),l==i.length-2&&(o+=this.i18n.spaceAnd())}else{var v=this.getSecondsDescription(),f=this.getMinutesDescription(),h=this.getHoursDescription();if(o+=v,o&&f&&(o+=", "),o+=f,f===h)return o;o&&h&&(o+=", "),o+=h}return o},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(n){return n},function(n){return r.StringUtilities.format(e.i18n.everyX0Seconds(n),n)},function(n){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(n){return n=="0"?"":parseInt(n)<20?e.i18n.atX0SecondsPastTheMinute(n):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(n)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],n=this.expressionParts[2],o=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(s){return s},function(s){return r.StringUtilities.format(e.i18n.everyX0Minutes(s),s)},function(s){return e.i18n.minutesX0ThroughX1PastTheHour()},function(s){try{return s=="0"&&n.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(s)<20?e.i18n.atX0MinutesPastTheHour(s):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(s)}catch{return e.i18n.atX0MinutesPastTheHour(s)}});return o},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],n=this.getSegmentDescription(a,this.i18n.everyHour(),function(i){return e.formatTime(i,"0","")},function(i){return r.StringUtilities.format(e.i18n.everyX0Hours(i),i)},function(i){return e.i18n.betweenX0AndX1()},function(i){return e.i18n.atX0()});if(n&&a.includes("-")&&this.expressionParts[1]!="0"){var o=Array.from(n.matchAll(/:00/g));if(o.length>1){var s=o[o.length-1].index;n=n.substring(0,s)+":59"+n.substring(s+3)}}return n},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),n=null;return this.expressionParts[5]=="*"?n="":n=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(o,s){var i=o;o.indexOf("#")>-1?i=o.substring(0,o.indexOf("#")):o.indexOf("L")>-1&&(i=i.replace("L",""));var l=parseInt(i);if(e.options.tzOffset){var v=e.expressionParts[2],f=parseInt(v)+(e.options.tzOffset?e.options.tzOffset:0);f>=24?l++:f<0&&l--,l>6?l=0:l<0&&(l=6)}var h=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(s)[l]:a[l];if(o.indexOf("#")>-1){var c=null,N=o.substring(o.indexOf("#")+1),T=o.substring(0,o.indexOf("#"));switch(N){case"1":c=e.i18n.first(T);break;case"2":c=e.i18n.second(T);break;case"3":c=e.i18n.third(T);break;case"4":c=e.i18n.fourth(T);break;case"5":c=e.i18n.fifth(T);break}h=c+" "+h}return h},function(o){return parseInt(o)==1?"":r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(o),o)},function(o){var s=o.substring(0,o.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(s):e.i18n.commaX0ThroughX1(s)},function(o){var s=null;if(o.indexOf("#")>-1){var i=o.substring(o.indexOf("#")+1);s=e.i18n.commaOnThe(i).trim()+e.i18n.spaceX0OfTheMonth()}else if(o.indexOf("L")>-1)s=e.i18n.commaOnTheLastX0OfTheMonth(o.replace("L",""));else{var l=e.expressionParts[3]!="*";s=l?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(o)}return s}),n},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),n=this.getSegmentDescription(this.expressionParts[4],"",function(o,s){return s&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(s)[parseInt(o)-1]:a[parseInt(o)-1]},function(o){return parseInt(o)==1?"":r.StringUtilities.format(e.i18n.commaEveryX0Months(o),o)},function(o){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(o){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return n},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,n=this.expressionParts[3];switch(n){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var o=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(o){var s=parseInt(o[0].replace("W","")),i=s==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());a=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var l=n.match(/L-(\d{1,2})/);if(l){var v=l[1];a=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(v),v);break}else{if(n=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(f){return f=="L"?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),f):f},function(f){return f=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(f)},function(f){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(f)},function(f){return e.i18n.commaOnDayX0OfTheMonth(f)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(n){return/^\d+$/.test(n)?new Date(parseInt(n),1).getFullYear().toString():n},function(n){return r.StringUtilities.format(e.i18n.commaEveryX0Years(n),n)},function(n){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,n,o,s,i){var l=null,v=e.indexOf("/")>-1,f=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)l="";else if(e==="*")l=a;else if(!v&&!f&&!h)l=r.StringUtilities.format(i(e),n(e));else if(h){for(var c=e.split(","),N="",T=0;T<c.length;T++)if(T>0&&c.length>2&&(N+=",",T<c.length-1&&(N+=" ")),T>0&&c.length>1&&(T==c.length-1||c.length==2)&&(N+="".concat(this.i18n.spaceAnd()," ")),c[T].indexOf("/")>-1||c[T].indexOf("-")>-1){var H=c[T].indexOf("-")>-1&&c[T].indexOf("/")==-1,V=this.getSegmentDescription(c[T],a,n,o,H?this.i18n.commaX0ThroughX1:s,i);H&&(V=V.replace(", ","")),N+=V}else v?N+=this.getSegmentDescription(c[T],a,n,o,s,i):N+=n(c[T]);v?l=N:l=r.StringUtilities.format(i(e),N)}else if(v){var c=e.split("/");if(l=r.StringUtilities.format(o(c[1]),c[1]),c[0].indexOf("-")>-1){var E=this.generateRangeSegmentDescription(c[0],s,n);E.indexOf(", ")!=0&&(l+=", "),l+=E}else if(c[0].indexOf("*")==-1){var q=r.StringUtilities.format(i(c[0]),n(c[0]));q=q.replace(", ",""),l+=r.StringUtilities.format(this.i18n.commaStartingX0(),q)}}else f&&(l=this.generateRangeSegmentDescription(e,s,n));return l},t.prototype.generateRangeSegmentDescription=function(e,a,n){var o="",s=e.split("-"),i=n(s[0],1),l=n(s[1],2),v=a(e);return o+=r.StringUtilities.format(v,i,l),o},t.prototype.formatTime=function(e,a,n){var o=0,s=0;this.options.tzOffset&&(o=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),s=parseFloat((this.options.tzOffset%1).toFixed(2)),s!=0&&(s*=60));var i=parseInt(e)+o,l=parseInt(a)+s;l>=60?(l-=60,i+=1):l<0&&(l+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var v="",f=!1;this.options.use24HourTimeFormat||(f=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),v=f?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return n&&(h=":".concat(("00"+n).substring(n.length))),"".concat(f?v:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+l.toString()).substring(l.toString().length)).concat(h).concat(f?"":v)},t.prototype.transformVerbosity=function(e,a){return a||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();p.ExpressionDescriptor=m},336:(S,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var r=_(751),k=function(){function m(){}return m.prototype.load=function(t){t.en=new r.en},m}();p.enLocaleLoader=k},751:(S,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=function(){function r(){}return r.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},r.prototype.atX0MinutesPastTheHourGt20=function(){return null},r.prototype.commaMonthX0ThroughMonthX1=function(){return null},r.prototype.commaYearX0ThroughYearX1=function(){return null},r.prototype.use24HourTimeFormatByDefault=function(){return!1},r.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},r.prototype.everyMinute=function(){return"every minute"},r.prototype.everyHour=function(){return"every hour"},r.prototype.atSpace=function(){return"At "},r.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},r.prototype.at=function(){return"At"},r.prototype.spaceAnd=function(){return" and"},r.prototype.everySecond=function(){return"every second"},r.prototype.everyX0Seconds=function(){return"every %s seconds"},r.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},r.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},r.prototype.everyX0Minutes=function(){return"every %s minutes"},r.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},r.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},r.prototype.everyX0Hours=function(){return"every %s hours"},r.prototype.betweenX0AndX1=function(){return"between %s and %s"},r.prototype.atX0=function(){return"at %s"},r.prototype.commaEveryDay=function(){return", every day"},r.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},r.prototype.commaX0ThroughX1=function(){return", %s through %s"},r.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},r.prototype.first=function(){return"first"},r.prototype.second=function(){return"second"},r.prototype.third=function(){return"third"},r.prototype.fourth=function(){return"fourth"},r.prototype.fifth=function(){return"fifth"},r.prototype.commaOnThe=function(){return", on the "},r.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},r.prototype.lastDay=function(){return"the last day"},r.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},r.prototype.commaOnlyOnX0=function(){return", only on %s"},r.prototype.commaAndOnX0=function(){return", and on %s"},r.prototype.commaEveryX0Months=function(){return", every %s months"},r.prototype.commaOnlyInX0=function(){return", only in %s"},r.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},r.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},r.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},r.prototype.firstWeekday=function(){return"first weekday"},r.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},r.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},r.prototype.commaEveryX0Days=function(){return", every %s days"},r.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},r.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},r.prototype.commaEveryHour=function(){return", every hour"},r.prototype.commaEveryX0Years=function(){return", every %s years"},r.prototype.commaStartingX0=function(){return", starting %s"},r.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},r.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},r}();p.en=_},586:(S,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(k,m){if(!k)throw new Error(m)}var r=function(){function k(){}return k.secondRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},k.minuteRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},k.hourRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},k.dayOfMonthRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},k.monthRange=function(m,t){for(var e=m.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var n=parseInt(e[a],10);_(n>=1&&n<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},k.dayOfWeekRange=function(m,t){for(var e=m.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var n=parseInt(e[a],10);_(n>=0&&n<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},k}();p.default=r},910:(S,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function r(){}return r.format=function(k){for(var m=[],t=1;t<arguments.length;t++)m[t-1]=arguments[t];return k.replace(/%s/g,function(e){return m.shift()})},r.containsAny=function(k,m){return m.some(function(t){return k.indexOf(t)>-1})},r}();p.StringUtilities=_}},x={};function D(S){var p=x[S];if(p!==void 0)return p.exports;var _=x[S]={exports:{}};return L[S](_,_.exports,D),_.exports}var X={};return(()=>{var S=X;Object.defineProperty(S,"__esModule",{value:!0}),S.toString=void 0;var p=D(728),_=D(336);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),S.default=p.ExpressionDescriptor;var r=p.ExpressionDescriptor.toString;S.toString=r})(),X})())})(he);var Pe=he.exports;const Ye=ke(Pe),Fe=["title"],Ge={"flex-none":"","text-left":""},Ze={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},Je={class:"truncate"},Qe={"text-xs":"",op50:""},Ke=d("div",{"x-divider":""},null,-1),et={key:0},tt=["onClick"],nt=d("div",{"x-divider":""},null,-1),rt=te({__name:"CronCollection",props:{collection:{}},setup(z){const U=z,L=re(),x=W(!0),D=$(()=>Ye.toString(U.collection.cron));return(X,S)=>{const p=oe,_=fe;return y(),I("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:u(D),onClick:S[0]||(S[0]=r=>x.value=!u(x))},[d("div",Ge,[O(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":u(x)?90:0,transition:""},null,8,["transform-rotate"])]),d("span",Ze,[O(_,{class:"font-mono n-primary",textContent:R(X.collection.cron)},null,8,["textContent"]),d("span",Je,R(u(D)),1),d("span",Qe,"("+R(X.collection.tasks.length)+")",1)])],8,Fe),Ke,u(x)?(y(),I("ul",et,[(y(!0),I(B,null,Z(X.collection.tasks,r=>(y(),I("li",{key:r},[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:F([{"bg-active":u(L)===r}]),onClick:k=>L.value=r},R(r),11,tt),nt]))),128))])):j("",!0)])}}}),ot={"h-full":"","w-full":"",flex:"~ col"},at={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},it={flex:"~ gap2 items-center"},st={relative:"","w-full":""},ut={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},lt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ct={class:"hidden md:block"},ft={flex:"~ gap2","mb--2":"","items-center":"",op50:""},pt=d("div",{"w-5":"","x-divider":""},null,-1),dt=d("div",{"flex-none":""}," Default Inputs ",-1),ht=d("div",{"x-divider":""},null,-1),vt={key:0,border:"b base",relative:"","n-code-block":""},mt={flex:"~ wrap","w-full":""},yt=["onClick"],gt=d("div",{border:"b base","flex-auto":""},null,-1),_t={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},bt=d("div",null,"Result",-1),kt={key:1,"text-xs":"",op50:""},Ot=d("div",{"flex-auto":""},null,-1),Tt=d("div",{op50:""}," Tasks finished in ",-1),xt=te({__name:"ServerTaskDetails",props:{task:{}},emits:["open-default-input"],setup(z,{emit:U}){const L=z,x=U,D=W({payload:{}}),{inputDefaults:X}=ue("serverRoutes"),[S,p]=Oe(),_=Te(),r=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),k=$(()=>JSON.stringify(r.data,null,2)),m=$(()=>r.contentType.includes("application/json")?"json":"text"),t=W(!1),e=W(!1),a=xe(),n=W(),o=["json"],s=W(o[0]),i=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),l=$({get:()=>i[n.value],set:g=>{i[n.value]=g}}),v=$(()=>({...V(X.value.query),...V(i.query)})),f=$(()=>({...V(X.value.headers)})),h=$(()=>Object.keys(D.value?.payload??{}).length?{...D.value}:void 0),c=$(()=>h.value?"POST":"GET"),N=$(()=>{let g=window?.location.origin;return g.charAt(g.length-1)==="/"&&(g=g.slice(0,-1)),g}),T=$(()=>{let g=new URLSearchParams(v.value).toString();g&&(g=`?${g}`);const b=`/_nitro/tasks/${L.task.name}${g}`;let M=_.value?.app.baseURL||"";return(M==="./"||M===".")&&(M=""),M.endsWith("/")&&(M=M.slice(0,-1)),M+b}),H=$(()=>N.value+T.value);function V(g){const b=Object.fromEntries(g.filter(({active:M,key:P,value:J})=>M&&P&&J!==void 0).map(({key:M,value:P})=>[M,P]));return Object.entries(b).length?b:void 0}async function E(){e.value=!0,t.value=!0;const g=Date.now();Ce("server-tasks:run",{method:c.value});try{r.data=await $fetch(H.value,{method:"POST",headers:f.value,query:v.value,body:h.value,onResponse({response:b}){r.contentType=(b.headers.get("content-type")||"").toString().toLowerCase().trim(),r.statusCode=b.status,r.error=void 0},onResponseError(b){r.error=b.response._data,r.data=b.response._data}})}catch{}t.value=!1,r.fetchTime=Date.now()-g}const q=$(()=>{const g=[];return g.push({name:"Query",slug:"query",length:i.query.length}),g.push({name:"Body",slug:"body",length:i.body.length}),g});Se(()=>{if(s.value==="json"&&typeof D.value=="string")try{D.value=JSON.parse(D.value)}catch{}});const Q=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([i,n],()=>{const g=Q.value?.find(b=>b.task===L.task.name);if(g){n.value||(n.value=g.tab),g.tab!==n.value&&(g.tab=n.value);const{body:b,query:M,headers:P}=g.inputs;Object.assign(i,{body:b,query:M,headers:P})}else{const b={task:L.task.name,tab:"query",inputs:i};Q.value.push(b),n.value||(n.value=b.tab)}},{immediate:!0,deep:!0,debounce:500});const me=De();return(g,b)=>{const M=le,P=Ie,J=oe,ae=pe,ye=ce,ge=$e,ne=fe,_e=He,K=se("tooltip");return y(),I("div",ot,[d("div",at,[d("div",it,[G((y(),I("div",null,[O(M,{class:F(["n-badge-base n-sm",("getRequestMethodClass"in g?g.getRequestMethodClass:u(Ee))(u(c))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:C(()=>[Y(R(u(c)),1)]),_:1},8,["class"])])),[[K,`Method is ${u(c)} as ${u(c)==="GET"?"no":""} json body is sent`]]),d("div",st,[O(P,{"model-value":u(T),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),d("div",ut,[G(O(M,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:b[0]||(b[0]=w=>u(me)(u(H),"server-task-url"))},null,512),[[K,"Copy URL"]]),G(O(M,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:b[1]||(b[1]=w=>u(a)(g.task.handler))},null,512),[[K,"Open in Editor"]])])]),O(M,{"h-full":"",n:"primary solid",onClick:E},{default:C(()=>[O(J,{icon:"carbon:send"})]),_:1})])]),d("div",lt,[(y(!0),I(B,null,Z(u(q),w=>G((y(),A(M,{key:w.slug,class:F(u(n)===w.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:be=>n.value=w.slug},{default:C(()=>[O(J,{icon:("ServerRouteTabIcons"in g?g.ServerRouteTabIcons:u(de))[w.slug]},null,8,["icon"]),d("div",ct,[Y(R(w.name)+" "+R(w?.length?`(${w.length})`:"")+" ",1),d("span",null,R(u(X)[w.slug]?.length?`(${u(X)[w.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[K,w.name]])),128))]),O(u(S),null,{default:C(()=>[O(ae,{modelValue:u(l),"onUpdate:modelValue":b[4]||(b[4]=w=>ee(l)?l.value=w:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:C(()=>[u(X)[u(n)]?.length?(y(),I(B,{key:0},[d("div",ft,[pt,dt,O(M,{icon:"i-carbon-edit",border:!1,onClick:b[2]||(b[2]=w=>x("open-default-input"))}),ht]),O(ae,{modelValue:u(X)[u(n)],"onUpdate:modelValue":b[3]||(b[3]=w=>u(X)[u(n)]=w),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),u(l)?(y(),I("div",vt,[u(n)==="body"?(y(),I(B,{key:0},[d("div",mt,[(y(),I(B,null,Z(o,w=>d("button",{key:w,px4:"",py2:"",border:"r base",hover:"bg-active",class:F({"border-b":w!==u(s)}),onClick:be=>s.value=w},[d("div",{class:F({op30:w!==u(s)}),"font-mono":""},R(w),3)],10,yt)),64)),gt]),u(s)==="input"?(y(),A(u(p),{key:0})):u(s)==="json"?(y(),A(u(We),Me({key:1,modelValue:u(D),"onUpdate:modelValue":b[5]||(b[5]=w=>ee(D)?D.value=w:null),class:[[g.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},g.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(y(),A(u(p),{key:1}))])):j("",!0),u(e)?u(t)?(y(),A(ge,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:C(()=>[Y(" Running... ")]),_:1})):(y(),I(B,{key:3},[d("div",_t,[bt,u(r).error?(y(),A(ne,{key:0,n:"red"},{default:C(()=>[Y(" Error ")]),_:1})):j("",!0),O(ne,{n:u(r).error?"orange":"green",textContent:R(u(r).statusCode)},null,8,["n","textContent"]),u(r).contentType?(y(),I("code",kt,R(u(r).contentType),1)):j("",!0),Ot,Tt,O(ne,{n:"green"},{default:C(()=>[Y(R(u(r).fetchTime)+" ms ",1)]),_:1})]),O(_e,{"flex-auto":"","overflow-auto":"","py-2":"",code:u(k),lang:u(m)},null,8,["code","lang"])],64)):(y(),A(ye,{key:1},{default:C(()=>[O(M,{n:"primary",onClick:E},{default:C(()=>[O(J,{icon:"carbon:send"}),Y(" Run task ")]),_:1})]),_:1}))])}}}),St={"flex-none":"","text-left":""},wt={flex:"","items-center":"","text-sm":"","font-mono":""},Xt=d("div",{"x-divider":""},null,-1),ve=te({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(z){const U=W(!0),L=re();return(x,D)=>{const X=oe,S=ve;return y(),I("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:F([{"bg-active":u(L)===x.item.name}]),style:Ue({paddingLeft:`calc(0.5rem + ${x.index*1.5}em)`}),onClick:D[0]||(D[0]=p=>{U.value=!u(U),L.value=x.item.name})},[d("div",St,[x.item.type==="collection"?(y(),A(X,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":u(U)?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),d("span",wt,[x.item.type==="collection"?(y(),A(X,{key:0,title:`${x.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(y(),A(X,{key:1,icon:"carbon:play",ml3:"",mr1:""})),Y(" "+R(x.item.name),1)])],6),Xt,u(U)?Le(x.$slots,"default",{key:0},()=>[(y(!0),I(B,null,Z(x.item.tasks,p=>(y(),A(S,{key:p.name,item:p,index:x.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),Dt={flex:"~ gap1","text-sm":""},Et={key:0,op50:""},Mt={op50:""},Ct=d("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1),It=d("span",{op75:""},"Select a task to start",-1),$t=d("div",{p4:"",border:"b base"},[d("span",{"text-lg":""},"Default Inputs"),d("br"),d("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1),Yt=te({__name:"server-tasks",setup(z){const U=W(!1),L=Ne(),x=$(()=>Object.keys(L.value?.tasks??{}).map(n=>({name:n,...L.value.tasks[n],type:"task"}))),D=$(()=>Object.entries(L.value?.scheduledTasks??{}).map(([n,o])=>({cron:n,tasks:o}))),X=re(),{view:S,selectedTask:p,inputDefaults:_}=ue("serverTasks"),r=$(()=>{!X.value&&p.value&&(X.value=p.value.name);const n=x.value.find(o=>o.name===X.value);return X.value!==p.value?.name&&n&&(p.value=n),n}),k=W(""),m=$(()=>new Re(x.value,{keys:["key","description"],shouldSort:!0})),t=$(()=>k.value?m.value.search(k.value).map(o=>o.item):x.value),e=$(()=>{const n=[],o=(i,l)=>{i.tasks||=[],i.tasks.push(l)},s=(i,l)=>{const v=l?l.tasks?.find(h=>h.name===i):n.find(h=>h.name===i);if(v)return{...v,type:"collection"};const f={name:i,handler:i,description:"",type:"collection",tasks:[]};return l?o(l,f):n.push(f),f};return t.value.forEach(i=>{let l;const v={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(c=>{l=s(c,l)}),l?o(l,v):n.push(v)}),n});function a(){S.value=S.value==="tree"?"list":"tree"}return(n,o)=>{const s=le,i=Be,l=rt,v=Ae,f=xt,h=je,c=ce,N=pe,T=ze,H=qe,V=se("tooltip");return y(),I(B,null,[O(v,{"storage-key":"tab-server-tasks"},{left:C(()=>[O(v,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:C(()=>[O(i,{search:u(k),"onUpdate:search":o[1]||(o[1]=E=>ee(k)?k.value=E:null),pb2:""},{actions:C(()=>[G(O(s,{"text-lg":"",icon:u(S)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(O(s,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:o[0]||(o[0]=E=>U.value=!u(U))},null,512),[[V,"Default Inputs"]])]),default:C(()=>[d("div",Dt,[u(k)?(y(),I("span",Et,R(u(t).length)+" matched · ",1)):j("",!0),d("span",Mt,R(u(x)?.length)+" tasks in total",1)])]),_:1},8,["search"]),(y(!0),I(B,null,Z(u(S)==="tree"?u(e):u(t),E=>(y(),A(ve,{key:E.name,item:E},null,8,["item"]))),128))]),right:C(()=>[Ct,d("div",null,[d("ul",null,[(y(!0),I(B,null,Z(u(D),E=>(y(),I("li",{key:E.cron},[O(l,{collection:E},null,8,["collection"])]))),128))])])]),_:1})]),right:C(()=>[(y(),A(Ve,{max:10},[u(r)?(y(),A(f,{key:u(r).name,task:u(r),onOpenDefaultInput:o[2]||(o[2]=E=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),u(r)?j("",!0):(y(),A(c,{key:0},{default:C(()=>[O(h,{px6:"",py2:""},{default:C(()=>[It]),_:1})]),_:1}))]),_:1}),O(H,{modelValue:u(U),"onUpdate:modelValue":o[4]||(o[4]=E=>ee(U)?U.value=E:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:o[5]||(o[5]=E=>U.value=!1)},{default:C(()=>[d("div",null,[$t,O(T,{text:`Query ${u(_).query.length?`(${u(_).query.length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in n?n.ServerRouteTabIcons:u(de)).query},{default:C(()=>[O(N,{modelValue:u(_).query,"onUpdate:modelValue":o[3]||(o[3]=E=>u(_).query=E),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Yt as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as Ce}from"./p0yxMpsq.js";function Ae(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 Y=Ae;function L(t=[]){return Array.isArray(t)?t:[t]}function G(t){return Array.from(new Set(t))}function Oe(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function E(t){return typeof t=="string"}function D(t){return E(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Me(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>D(e)):[t]:[D(t)]}function Ee(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 q(t){return t==null?"":Ee(t).map(([e,n])=>n!=null?`${e}:${n};`:void 0).filter(Boolean).join("")}function V(t){return t&&typeof t=="object"&&!Array.isArray(t)}function de(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 V(s)&&V(r)&&Object.keys(r).forEach(o=>{V(s[o])&&V(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=de(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function U(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?U(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:U(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?U(s):s;return n}return t}function ke(t){return E(t[0])}function je(t){return E(t[0])}const Q="$$shortcut-no-merge";function Le(t){return typeof t=="function"?{match:t}:t}function ee(t){return t.length===3}function Pe(t){return t!=null}function Te(){}var ze=Object.defineProperty,Fe=(t,e,n)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ie=(t,e,n)=>(Fe(t,e+"",n),n);class Ne{constructor(){Ie(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)))}}class Re extends Map{getFallback(e,n){const s=this.get(e);return s===void 0?(this.set(e,n),n):s}map(e){const n=[];return this.forEach((s,r)=>{n.push(e(s,r))}),n}flatMap(e){const n=[];return this.forEach((s,r)=>{n.push(...e(s,r))}),n}}var De=Object.defineProperty,Ve=(t,e,n)=>e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Be=(t,e,n)=>(Ve(t,e+"",n),n);class pe extends Set{constructor(e){super(e),Be(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 K(t){return t instanceof pe}const B={};function Ue(t=["-",":"]){const e=t.join("|");return B[e]||(B[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),B[e].lastIndex=0,B[e]}function He(t,e=["-",":"],n=5){const s=Ue(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(f,c,h,y,v)=>{if(!e.includes(h))return f;r=!0,o.add(c+h);const _=v+c.length+h.length+1,p={length:f.length,items:[]};a.set(v,p);for(const m of[...y.matchAll(/\S+/g)]){const O=_+m.index;let g=a.get(O)?.items;g?a.delete(O):g=[{offset:O,length:m[0].length,className:m[0]}];for(const w of g)w.className=w.className==="~"?c:w.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),p.items.push(w)}return"$".repeat(f.length)}),n-=1;while(r&&n);let l;if(typeof t=="string"){l="";let f=0;for(const[c,h]of a)l+=t.slice(f,c),l+=h.items.map(y=>y.className).join(" "),f=c+h.length;l+=t.slice(f)}else{l=t;for(const[f,c]of a)l.overwrite(f,f+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return l.toString()}}}function Ge(t,e=["-",":"],n=5){const s=He(t,e,n);return typeof t=="string"?s.expanded:t}const te=new Set;function me(t){te.has(t)||(console.warn("[unocss]",t),te.add(t))}const We=/[\\:]?[\s'"`;{}]+/g;function Ye(t){return t.split(We)}const qe={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ye(t)}};function Ke(){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 H="default",Z="preflights",Xe="shortcuts",Ze="imports",Je={[Ze]:-200,[Z]:-100,[Xe]:-10,[H]:0};function ge(t){return L(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ne="_uno_resolved";function Qe(t){let e=typeof t=="function"?t():t;if(ne in e)return e;e={...e},Object.defineProperty(e,ne,{value:!0,enumerable:!1});const n=e.shortcuts?ge(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=L(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function ye(t){const e=Qe(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(L).flatMap(ye);return[e,...n]}function re(t={},e={}){const n=Object.assign({},e,t),s=Oe((n.presets||[]).flatMap(L).flatMap(ye),(u,d)=>u.name===d.name),r=[...s.filter(u=>u.enforce==="pre"),...s.filter(u=>!u.enforce),...s.filter(u=>u.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},Je,...i.map(u=>u.layers));function l(u){return G(i.flatMap(d=>L(d[u]||[])))}const f=l("extractors");let c=o.find(u=>u.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=qe),c&&!f.includes(c)&&f.unshift(c),f.sort((u,d)=>(u.order||0)-(d.order||0));const h=l("rules"),y={},v=h.length,_=h.map((u,d)=>{if(ke(u)){L(u[2]?.prefix||"").forEach(C=>{y[C+u[0]]=[d,u[1],u[2],u]});return}return[d,...u]}).filter(Boolean).reverse();let p=et(i.map(u=>u.theme));const m=l("extendTheme");for(const u of m)p=u(p)||p;const O={templates:G(i.flatMap(u=>L(u.autocomplete?.templates))),extractors:i.flatMap(u=>L(u.autocomplete?.extractors)).sort((u,d)=>(u.order||0)-(d.order||0)),shorthands:tt(i.map(u=>u.autocomplete?.shorthands||{}))};let g=l("separators");g.length||(g=[":","-"]);const w={mergeSelectors:!0,warn:!0,sortLayers:u=>u,...n,blocklist:l("blocklist"),presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:p,rulesSize:v,rulesDynamic:_,rulesStaticMap:y,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:O,variants:l("variants").map(Le).sort((u,d)=>(u.order||0)-(d.order||0)),shortcuts:ge(l("shortcuts")).reverse(),extractors:f,safelist:l("safelist"),separators:g,details:n.details??n.envMode==="dev"};for(const u of i)u?.configResolved?.(w);return w}function et(t){return t.map(e=>e?U(e):{}).reduce((e,n)=>de(e,n),{})}function tt(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 nt="0.60.0";var rt=Object.defineProperty,st=(t,e,n)=>e in t?rt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(st(t,typeof e!="symbol"?e+"":e,n),n);class it{constructor(e={},n={}){this.userConfig=e,this.defaults=n,R(this,"version",nt),R(this,"_cache",new Map),R(this,"config"),R(this,"blocked",new Set),R(this,"parentOrders",new Map),R(this,"events",Ke()),this.config=re(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=re(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(K(o)&&K(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 f of this.config.preprocess)r=f(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),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(f=>this.stringifyUtil(f,o)).filter(Pe);if(l?.length)return this._cache.set(s,l),l;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=n,f=this.config.outputToCssLayers,c=E(e)?await this.applyExtractors(e,s,l?new pe:new Set):Array.isArray(e)?new Set(e):e;if(o){const d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(x=>typeof x=="function"?x(d):x).forEach(x=>{c.has(x)||c.add(x)})}const h=a?"":`
|
|
2
|
-
`,y=new Set([H]),v=l?new Map:new Set,_=new Map;let p={};const m=Array.from(c).map(async d=>{if(v.has(d))return;const x=await this.parseToken(d);if(x!=null){v instanceof Map?v.set(d,{data:x,count:K(c)?c.getCount(d):-1}):v.add(d);for(const C of x){const A=C[3]||"",M=C[4]?.layer;_.has(A)||_.set(A,[]),_.get(A).push(C),M&&y.add(M)}}});await Promise.all(m),await(async()=>{if(!i)return;const d={generator:this,theme:this.config.theme},x=new Set([]);this.config.preflights.forEach(({layer:C=Z})=>{y.add(C),x.add(C)}),p=Object.fromEntries(await Promise.all(Array.from(x).map(async C=>{const M=(await Promise.all(this.config.preflights.filter(P=>(P.layer||Z)===C).map(async P=>await P.getCSS(d)))).filter(Boolean).join(h);return[C,M]})))})();const O=this.config.sortLayers(Array.from(y).sort((d,x)=>(this.config.layers[d]??0)-(this.config.layers[x]??0)||d.localeCompare(x))),g={},w=(d=H)=>{if(g[d])return g[d];let x=Array.from(_).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 P=M.length,z=M.filter(b=>(b[4]?.layer||H)===d).sort((b,$)=>b[0]-$[0]||(b[4]?.sort||0)-($[4]?.sort||0)||b[5]?.currentSelector?.localeCompare($[5]?.currentSelector??"")||b[1]?.localeCompare($[1]||"")||b[2]?.localeCompare($[2]||"")||0).map(([,b,$,,k,,j])=>[[[(b&&ct(b,r))??"",k?.sort??0]],$,!!(j??k?.noMerge)]);if(!z.length)return;const F=z.reverse().map(([b,$,k],j)=>{if(!k&&this.config.mergeSelectors)for(let N=j+1;N<P;N++){const T=z[N];if(T&&!T[2]&&(b&&T[0]||b==null&&T[0]==null)&&T[1]===$)return b&&T[0]&&T[0].push(...b),null}const I=b?G(b.sort((N,T)=>N[1]-T[1]||N[0]?.localeCompare(T[0]||"")||0).map(N=>N[0]).filter(Boolean)):[];return I.length?`${I.join(`,${h}`)}{${$}}`:$}).filter(Boolean).reverse().join(h);if(!A)return F;const S=A.split(" $$ ");return`${S.join("{")}{${h}${F}${h}${"}".repeat(S.length)}`}).filter(Boolean).join(h);if(i&&(x=[p[d],x].filter(Boolean).join(h)),f&&x){let A=typeof f=="object"?f.cssLayerName?.(d):void 0;A!==null&&(A||(A=d),x=`@layer ${A}{${h}${x}${h}}`)}const C=a?"":`/* layer: ${d} */${h}`;return g[d]=x?C+x:""},u=(d=O,x)=>d.filter(C=>!x?.includes(C)).map(C=>w(C)||"").filter(Boolean).join(h);return{get css(){return u()},layers:O,matched:v,getLayers:u,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 l of this.config.variants){if(!l.multiPass&&s.has(l))continue;let f=await l.match(i,a);if(f){if(E(f)){if(f===i)continue;f={matcher:f}}i=f.matcher,r.unshift(f),s.add(l),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((f,c)=>(f.order||0)-(c.order||0)).reduceRight((f,c)=>h=>{const y=c.body?.(h.entries)||h.entries,v=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??ft)({...h,entries:y,selector:c.selector?.(h.selector,y)||h.selector,parent:v[0]||h.parent,parentOrder:v[1]||h.parentOrder,layer:c.layer||h.layer,sort:c.sort||h.sort},f)},f=>f)({prefix:"",selector:lt(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);const l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const f of this.config.postprocess)f(l);return l}constructCustomCSS(e,n,s){const r=D(n);if(E(r))return r;const{selector:i,entries:o,parent:a}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),l=`${i}{${q(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,n,s=!1,r){const[i,o,a]=E(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const l=this.config.rulesStaticMap[o];if(l&&l[1]&&(s||!l[2]?.internal)){this.config.details&&n.rules.push(l[3]);const c=l[0],h=D(l[1]),y=l[2];return E(h)?[[c,h,y]]:[[c,i,h,y,a]]}n.variantHandlers=a;const{rulesDynamic:f}=this.config;for(const[c,h,y,v]of f){if(v?.internal&&!s)continue;let _=o;if(v?.prefix){const g=L(v.prefix);if(r){const w=L(r);if(!g.some(u=>w.includes(u)))continue}else{const w=g.find(u=>o.startsWith(u));if(w==null)continue;_=o.slice(w.length)}}const p=_.match(h);if(!p)continue;const m=await y(p,n);if(!m)continue;this.config.details&&n.rules.push([h,y,v]);const O=Me(m).filter(g=>g.length);if(O.length)return O.map(g=>E(g)?[c,g,v]:[c,i,g,v,a])}}stringifyUtil(e,n){if(!e)return;if(ee(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:l}=this.applyVariants(e),f=q(r);if(!f)return;const{layer:c,sort:h,...y}=e[3]??{},v={...y,layer:o??c,sort:a??h};return[e[0],s,f,i,v,this.config.details?n:void 0,l]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?a=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(a)}:Te;let i,o;for(const a of this.config.shortcuts){let l=e;if(a[2]?.prefix){const c=L(a[2].prefix).find(h=>e.startsWith(h));if(c==null)continue;l=e.slice(c.length)}if(je(a)){if(a[0]===l){i=i||a[2],o=a[1],r(a);break}}else{const f=l.match(a[0]);if(f&&(o=a[1](f,n)),o){i=i||a[2],r(a);break}}}if(E(o)&&(o=Ge(o.trim()).split(/\s+/g)),!o){const[a,l]=E(e)?await this.matchVariants(e):e;if(a!==l){const f=await this.expandShortcut(l,n,s-1);f&&(o=f[0].map(c=>E(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(E(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 Re,o=(await Promise.all(G(s).map(async c=>{const h=E(c)?await this.parseUtil(c,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",D(c),void 0,[]]];return!h&&this.config.warn&&me(`unmatched utility "${c}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((c,h)=>c[0]-h[0]),[a,,l]=e,f=[];for(const c of o){if(ee(c)){f.push([c[0],void 0,c[1],void 0,c[2],n,void 0]);continue}const{selector:h,entries:y,parent:v,sort:_,noMerge:p,layer:m}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(m??r.layer,new Ne).getFallback(h,v,[[],c[0]])[0].push([y,!!(p??c[3]?.noMerge),_??0])}return f.concat(i.flatMap((c,h)=>c.map(([y,v],_,p)=>{const m=(g,w,u)=>{const d=Math.max(...u.map(C=>C[1])),x=u.map(C=>C[0]);return(g?[x.flat(1)]:x).map(C=>{const A=q(C);if(A)return[v,_,A,p,{...r,noMerge:w,sort:d,layer:h},n,void 0]})};return[[y.filter(([,g])=>g).map(([g,,w])=>[g,w]),!0],[y.filter(([,g])=>!g).map(([g,,w])=>[g,w]),!1]].map(([g,w])=>[...m(!1,w,g.filter(([u])=>u.some(d=>d[0]===Q))),...m(!0,w,g.filter(([u])=>u.every(d=>d[0]!==Q)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.some(n=>typeof n=="function"?n(e):E(n)?n===e:n.test(e))}}function ot(t,e){return new it(t,e)}const we=/\s\$\$\s+/g;function at(t){return we.test(t)}function ct(t,e){return at(t)?t.replace(we,e?` ${e} `:" "):e?`${e} ${t}`:t}const se=/^\[(.+?)(~?=)"(.*)"\]$/;function lt(t){return se.test(t)?t.replace(se,(e,n,s,r)=>`[${Y(n)}${s}"${Y(r)}"]`):`.${Y(t)}`}function ft(t,e){return e(t)}var ie={};const ut=Object.freeze({left:0,top:0,width:16,height:16}),W=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ve=Object.freeze({...ut,...W}),ht=Object.freeze({...ve,body:"",hidden:!1}),dt=Object.freeze({width:null,height:null}),be=Object.freeze({...dt,...W});function pt(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 oe(t,e){const n=pt(t,e);for(const s in ht)s in W?s in t&&!(s in n)&&(n[s]=W[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function mt(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,l=a&&i(a);l&&(r[o]=[a].concat(l))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function ae(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(a){i=oe(s[a]||r[a],i)}return o(e),n.forEach(o),oe(t,i)}function gt(t,e){if(t.icons[e])return ae(t,e,[]);const n=mt(t,[e])[e];return n?ae(t,e,n):null}const yt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ce(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(yt);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=wt.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 vt(t,e="defs"){let n="";const s=t.indexOf("<"+e);for(;s>=0;){const r=t.indexOf(">",s),i=t.indexOf("</"+e);if(r===-1||i===-1)break;const o=t.indexOf(">",i);if(o===-1)break;n+=t.slice(r+1,i).trim(),t=t.slice(0,s).trim()+t.slice(o+1)}return{defs:n,content:t}}function bt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function St(t,e,n){const s=vt(t);return bt(s.defs,e+s.content+n)}const J=t=>t==="unset"||t==="undefined"||t==="none";function xt(t,e){const n={...ve,...t},s={...be,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(p=>{const m=[],O=p.hFlip,g=p.vFlip;let w=p.rotate;O?g?w+=2:(m.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),m.push("scale(-1 1)"),r.top=r.left=0):g&&(m.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),m.push("scale(1 -1)"),r.top=r.left=0);let u;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:u=r.height/2+r.top,m.unshift("rotate(90 "+u.toString()+" "+u.toString()+")");break;case 2:m.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:u=r.width/2+r.left,m.unshift("rotate(-90 "+u.toString()+" "+u.toString()+")");break}w%2===1&&(r.left!==r.top&&(u=r.left,r.left=r.top,r.top=u),r.width!==r.height&&(u=r.width,r.width=r.height,r.height=u)),m.length&&(i=St(i,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=s.width,a=s.height,l=r.width,f=r.height;let c,h;o===null?(h=a===null?"1em":a==="auto"?f:a,c=ce(h,l/f)):(c=o==="auto"?l:o,h=a===null?ce(c,f/l):a==="auto"?f:a);const y={},v=(p,m)=>{J(m)||(y[p]=m.toString())};v("width",c),v("height",h);const _=[r.left,r.top,l,f];return y.viewBox=_.join(" "),{attributes:y,viewBox:_,body:i}}function $t(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function _t(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" ')),$t(e)}function Ct(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,'="').replace(/(\s)+\/>/g,"/>").trim()}const At=/\swidth\s*=\s*["']([\w.]+)["']/,Ot=/\sheight\s*=\s*["']([\w.]+)["']/,X=/<svg\s+/;function Mt(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const a=o.exec(s),l=a!=null,f=e[i];return!f&&!J(f)&&(typeof n=="number"?n>0&&(e[i]=`${n}em`):a&&(e[i]=a[1])),l};return[r("width",At),r("height",Ot)]}async function Se(t,e,n,s,r,i){const{scale:o,addXmlNs:a=!1}=s??{},{additionalProps:l={},iconCustomizer:f}=s?.customizations??{},c=await r?.()??{};await f?.(e,n,c),Object.keys(l).forEach(p=>{const m=l[p];m!=null&&(c[p]=m)}),i?.(c);const[h,y]=Mt(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 v=Object.keys(c).map(p=>p==="width"&&h||p==="height"&&y?null:`${p}="${c[p]}"`).filter(p=>p!=null);if(v.length&&(t=t.replace(X,`<svg ${v.join(" ")} `)),s){const{defaultStyle:p,defaultClass:m}=s;m&&!t.includes("class=")&&(t=t.replace(X,`<svg class="${m}" `)),p&&!t.includes("style=")&&(t=t.replace(X,`<svg style="${p}" `))}const _=s?.usedProps;return _&&(Object.keys(l).forEach(p=>{const m=c[p];m!=null&&(_[p]=m)}),typeof c.width<"u"&&c.width!==null&&(_.width=c.width),typeof c.height<"u"&&c.height!==null&&(_.height=c.height)),t}async function le(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 Se(s?.customizations?.trimCustomSvg===!0?Ct(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function xe(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=gt(t,o),r){let a={...be};typeof i=="function"&&(a=i(a));const{attributes:{width:l,height:f,...c},body:h}=xt(r,a),y=s?.scale;return await Se(`<svg >${h}</svg>`,e,o,s,()=>({...c}),v=>{const _=(p,m)=>{const O=v[p];let g;if(!J(O)){if(O)return;typeof y=="number"?y&&(g=`${y}em`):g=m}g?v[p]=g:delete v[p]};_("width",l),_("height",f)})}}const $e=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 le(()=>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 xe(r,t,i,n)}}}else return await le(s,t,e,n)};function Et(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var kt=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","cbi","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","f7","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","flowbite","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","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","mage","majesticons","maki","map","marketeq","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","oui","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","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const jt=Et(kt),Lt=3;function Pt(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:a={},customizations:l={},autoInstall:f=!1,collectionsNodeResolvePath:c,layer:h="icons",unit:y,processor:v}=e,_=Tt(),p={addXmlNs:!0,scale:n,customCollections:o,autoInstall:f,cwd:c,warn:void 0,customizations:{...l,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(O,g,w){await l.iconCustomizer?.(O,g,w),y&&(w.width||(w.width=`${n}${y}`),w.height||(w.height=`${n}${y}`))}}};let m;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async O=>{let[g,w,u=s]=O,d="",x="",C;m=m||await t(e);const A={};if(w.includes(":"))[d,x]=w.split(":"),C=await m(d,x,{...p,usedProps:A});else{const z=w.split(/-/g);for(let F=Lt;F>=1&&(d=z.slice(0,F).join("-"),x=z.slice(F).join("-"),C=await m(d,x,{...p,usedProps:A}),!C);F--);}if(!C){i&&!_.isESLint&&me(`failed to load icon "${g}"`);return}let M;const P=`url("data:image/svg+xml;utf8,${_t(C)}")`;return u==="auto"&&(u=C.includes("currentColor")?"mask":"bg"),u==="mask"?M={"--un-icon":P,"-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",...A}:M={background:`${P} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...A},v?.(M,{collection:d,icon:x,svg:C,mode:u}),M},{layer:h,prefix:r}]]}}}function _e(t,e){const n=new Map;function s(r){if(jt.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 $e(r,i,o);if(a)return a;const l=await s(r);if(l){const f=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await xe(l,r,f,o)}return a}}function Tt(){const t=typeof process<"u"&&process.stdout&&!process.versions.deno,e=t&&!!ie.VSCODE_CWD,n=t&&!!ie.ESLINT;return{isNode:t,isVSCode:e,isESLint:n}}function zt(t){return _e(Ce,t)}const Ft=Pt(async t=>{const e=t?.customFetch,n=t?.cdn;return e&&n?_e(e,n):n?zt(n):$e});function It(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function fe(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ue(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var he=["Webkit","Moz","ms"];function Nt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=It(s);if(i!=="filter"&&i in t)return e[s]=ue(i);i=fe(i);for(let o=0;o<he.length;o++){const a=`${he[o]}${i}`;if(a in t)return e[s]=ue(fe(a))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function Rt(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function Dt(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=L(o.postprocess)).unshift(Nt(n.createElement("div").style)),i.configResolved?.(r,o);const l=ot(r,o),f=S=>i.inject?i.inject(S):s().prepend(S),c=()=>i.rootElement?i.rootElement():n.body,h=new Map;let y=!0,v=new Set,_,p,m=[];const O=()=>new Promise(S=>{m.push(S),p!=null&&clearTimeout(p),p=setTimeout(()=>u().then(()=>{const b=m;m=[],b.forEach($=>$())}),0)});function g(S){if(S.nodeType!==1)return;const b=S;b.hasAttribute(a)&&b.removeAttribute(a),b.querySelectorAll(`[${a}]`).forEach($=>{$.removeAttribute(a)})}function w(S,b){let $=h.get(S);if(!$)if($=n.createElement("style"),$.setAttribute("data-unocss-runtime-layer",S),h.set(S,$),b==null)f($);else{const k=w(b),j=k.parentNode;j?j.insertBefore($,k.nextSibling):f($)}return $}async function u(){const S=await l.generate(v);return S.layers.reduce((b,$)=>(w($,b).innerHTML=S.getLayer($)??"",$),void 0),v=S.matched,{...S,getStyleElement:b=>h.get(b),getStyleElements:()=>h}}async function d(S){const b=v.size;await l.applyExtractors(S,void 0,v),b!==v.size&&await O()}async function x(S=c()){const b=S&&S.outerHTML;b&&(await d(`${b} ${Rt(b)}`),g(s()),g(S))}const C=new MutationObserver(S=>{y||S.forEach(async b=>{if(b.target.nodeType!==1)return;const $=b.target;for(const k of h)if($===k[1])return;if(b.type==="childList")b.addedNodes.forEach(async k=>{if(k.nodeType!==1)return;const j=k;_&&!_(j)||(await d(j.outerHTML),g(j))});else{if(_&&!_($))return;if(b.attributeName!==a){const k=Array.from($.attributes).map(I=>I.value?`${I.name}="${I.value}"`:I.name).join(" "),j=`<${$.tagName.toLowerCase()} ${k}>`;await d(j)}$.hasAttribute(a)&&$.removeAttribute(a)}})});let A=!1;function M(){if(A)return;const S=i.observer?.target?i.observer.target():c();S&&(C.observe(S,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),A=!0)}function P(){i.bypassDefined&&Vt(l.blocked),x(),M()}function z(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",P):P()}const F=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(S){E(S)||(S.forEach(b=>v.add(b)),S=""),await d(S)},extractAll:x,inspect(S){_=S},toggleObserver(S){S===void 0?y=!y:y=!!S,!A&&!y&&z()},update:u,presets:e.__unocss_runtime?.presets??{}};i.ready?.(F)!==!1&&(y=!1,z())}function Vt(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}Dt({defaults:{presets:[Ft({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as me,r as P,bG as Se,o as u,m as _,k as c,G as F,h as x,f as e,bH as re,t as N,p as O,v as K,a9 as We,aa as Ke,F as L,n as J,a6 as Te,bw as $e,bx as Re,w as Ee,bu as Qe,bI as Xe,bJ as Ye,aA as Ze,bK as et,ab as tt,al as ot,ay as fe,a as E,ac as nt,aB as st,b0 as at,bL as rt,e as lt,a2 as je,j as w,l as Y,i as m,I as Z,aw as it,ak as De,V as ut,_ as Ve,X as ct,A as Ie,am as dt,bM as pt,ah as ft,U as mt,bN as vt,ar as ht}from"./p0yxMpsq.js";import{_ as yt}from"./D6s5UxPA.js";import{_ as Ue}from"./DkWzd13i.js";import{_ as _t}from"./Cf2y5AWw.js";import{_ as Ne}from"./d9hkAmu-.js";import{_ as gt}from"./CJA0Nzuy.js";import{_ as bt}from"./BVv9Eso3.js";import{_ as kt}from"./CwbK9Dp1.js";import{C as ke,S as Oe}from"./BcJws1i5.js";import{e as wt}from"./B3Qmg_qx.js";import{_ as Ct}from"./B4UVI4YI.js";import{_ as xt}from"./Du-HkQgI.js";import"./pO9n-Epq.js";import"./BQwqZtdq.js";import"./DNcopq6z.js";const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function St(t,r){if(typeof t!="string")throw new TypeError("argument str must be a string");const n={},h=(r||{}).decode||Rt;let v=0;for(;v<t.length;){const d=t.indexOf("=",v);if(d===-1)break;let f=t.indexOf(";",v);if(f===-1)f=t.length;else if(f<d){v=t.lastIndexOf(";",d-1)+1;continue}const a=t.slice(v,d).trim();if(n[a]===void 0){let S=t.slice(d+1,f).trim();S.codePointAt(0)===34&&(S=S.slice(1,-1)),n[a]=$t(S,h)}v=f+1}return n}function we(t,r,n){const o=n||{},h=o.encode||Et;if(typeof h!="function")throw new TypeError("option encode is invalid");if(!ae.test(t))throw new TypeError("argument name is invalid");const v=h(r);if(v&&!ae.test(v))throw new TypeError("argument val is invalid");let d=t+"="+v;if(o.maxAge!==void 0&&o.maxAge!==null){const f=o.maxAge-0;if(Number.isNaN(f)||!Number.isFinite(f))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(f)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Tt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function Tt(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}function $t(t,r){try{return r(t)}catch{return t}}function Rt(t){return t.includes("%")?decodeURIComponent(t):t}function Et(t){return encodeURIComponent(t)}function B(t){if(typeof t!="object")return t;var r,n,o=Object.prototype.toString.call(t);if(o==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){n=new t.constructor;for(r in t)t.hasOwnProperty(r)&&n[r]!==t[r]&&(n[r]=B(t[r]))}else{n={};for(r in t)r==="__proto__"?Object.defineProperty(n,r,{value:B(t[r]),configurable:!0,enumerable:!0,writable:!0}):n[r]=B(t[r])}return n}if(o==="[object Array]"){for(r=t.length,n=Array(r);r--;)n[r]=B(t[r]);return n}return o==="[object Set]"?(n=new Set,t.forEach(function(h){n.add(B(h))}),n):o==="[object Map]"?(n=new Map,t.forEach(function(h,v){n.set(B(v),B(h))}),n):o==="[object Date]"?new Date(+t):o==="[object RegExp]"?(n=new RegExp(t.source,t.flags),n.lastIndex=t.lastIndex,n):o==="[object DataView]"?new t.constructor(B(t.buffer)):o==="[object ArrayBuffer]"?t.slice(0):o.slice(-6)==="Array]"?new t.constructor(t):t}const jt=c("div",{"x-divider":""},null,-1),Ae=me({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(t){const r=P(!0),n=Se();return(o,h)=>{const v=Te,d=Ue,f=Ae;return u(),_("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:F([{"bg-active":e(n)===o.item.filepath}]),style:We({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:h[0]||(h[0]=a=>{r.value=!e(r),n.value=o.item.filepath})},[c("div",{class:F({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(u(),x(v,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(r)?90:0,transition:""},null,8,["transform-rotate"])):(u(),x(d,{key:1,class:F(("getRequestMethodClass"in o?o.getRequestMethodClass:e(re))(o.item.method||"*")),textContent:N((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:F({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(u(),x(v,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):O("",!0),K(" "+N(o.item.route),1)],2)],6),jt,e(r)?Ke(o.$slots,"default",{key:0},()=>[(u(!0),_(L,null,J(o.item.routes,a=>(u(),x(f,{key:a.filepath,item:a,index:o.index+1},null,8,["item","index"]))),128))]):O("",!0)])}}}),Dt={path:"/",watch:!0,decode:t=>Xe(decodeURIComponent(t)),encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},Vt=void 0;function It(t,r){const n={...Dt,...r},o=Ce(n)||{};let h;n.maxAge!==void 0?h=n.maxAge*1e3:n.expires&&(h=n.expires.getTime()-Date.now());const v=h!==void 0&&h<=0,d=B(v?void 0:o[t]??n.default?.()),f=h&&!v?Ot(d,h,n.watch&&n.watch!=="shallow"):P(d);{let a=null;try{!Vt&&typeof BroadcastChannel<"u"&&(a=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const S=()=>{n.readonly||Ye(f.value,o[t])||(Nt(t,f.value,n),o[t]=B(f.value),a?.postMessage({value:n.encode(f.value)}))},V=H=>{const ee=H.refresh?Ce(n)?.[t]:n.decode(H.value);A=!0,o[t]=f.value=ee,Ze(()=>{A=!1})};let A=!1;$e()&&Re(()=>{A=!0,S(),a?.close()}),a&&(a.onmessage=({data:H})=>V(H)),n.watch?Ee(f,()=>{A||S()},{deep:n.watch!=="shallow"}):S()}return f}function Ce(t={}){return St(document.cookie,t)}function Ut(t,r,n={}){return r==null?we(t,r,{...n,maxAge:-1}):we(t,r,n)}function Nt(t,r,n={}){document.cookie=Ut(t,r,n)}const xe=2147483647;function Ot(t,r,n){let o,h,v=0;const d=n?P(t):{value:t};return $e()&&Re(()=>{h?.(),clearTimeout(o)}),Qe((f,a)=>{n&&(h=Ee(d,a));function S(){clearTimeout(o);const V=r-v,A=V<xe?V:xe;o=setTimeout(()=>{if(v+=A,v<r)return S();d.value=void 0,a()},A)}return{get(){return f(),d.value},set(V){S(),d.value=V,a()}}})}const At={"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":""},Mt={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"},Ft={class:"hidden md:block"},Ht=c("div",{"flex-auto":""},null,-1),zt=c("div",{"text-xs":"",op50:""}," Send from ",-1),Gt=c("option",{value:"app"}," App ",-1),Jt=c("option",{value:"devtools"}," DevTools ",-1),Wt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Kt={"text-right":"","font-mono":""},Qt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Xt={flex:"~ gap-4"},Yt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Zt=c("div",{"w-5":"","x-divider":""},null,-1),eo=c("div",{"flex-none":""}," Default Inputs ",-1),to=c("div",{"x-divider":""},null,-1),oo={key:2},no={key:3,border:"b base",relative:"","n-code-block":""},so={flex:"~ wrap","w-full":""},ao=["onClick"],ro=c("div",{border:"b base","flex-auto":""},null,-1),lo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},io=c("div",null,"Response",-1),uo={key:1,"text-xs":"",op50:""},co=c("div",{"flex-auto":""},null,-1),po=c("div",{op50:""}," Request finished in ",-1),fo={key:0,"flex-auto":"","overflow-auto":""},mo={border:"~ base","h-full":"","w-full":"",rounded:""},vo=["data"],ho={key:2,"flex-auto":"","overflow-auto":"",p4:""},yo={border:"~ base",rounded:""},_o=["src"],go={key:1,controls:"",rounded:""},bo=["src"],ko=me({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(t,{emit:r}){const n=t,o=r,[h,v]=et(),d=tt(),f=ot(),a=fe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),S=E(()=>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"),V=E(()=>{if(S.value==="json")return JSON.stringify(a.data,null,2);if(S.value==="media"||S.value==="pdf"){const s=new Blob([a.data],{type:a.contentType});return URL.createObjectURL(s)}return a.data}),A=P(!1),H=P(!1),ee=nt(),j=E(()=>n.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),g=E(()=>j.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),I=P(n.route.method||"GET"),b=P({}),y=fe({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"}]}),D=P({}),{inputDefaults:T,sendFrom:U}=De("serverRoutes"),q=E(()=>f?.value?.app?.$fetch?U.value:"devtools"),le=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],te=E(()=>ie.includes(I.value.toUpperCase())),k=P(),$=["input","json"],z=P($[0]),oe=E({get:()=>y[k.value],set:s=>{y[k.value]=s}}),ve=E(()=>({...W(T.value.query),...W(y.query)})),he=E(()=>({...W(T.value.headers),...W(y.headers)})),ue=E(()=>te.value?z.value==="json"?{...W(T.value.body),...D.value}:{...W(T.value.body),...W(y.body)}:void 0),Le=E(()=>{let s=window?.location.origin;return s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1)),s}),ne=E(()=>{let s=new URLSearchParams(ve.value).toString();s&&(s=`?${s}`);const i=(j.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&b.value[R]||R).join("")||"")+s;let p=d.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+i}),ye=E(()=>Le.value+ne.value);function W(s){const i=Object.fromEntries(s.filter(({active:p,key:R,value:C})=>p&&R&&C!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(i).length?i:void 0}async function _e(){H.value=!0,A.value=!0;const s=Date.now(),i=q.value==="app"?f.value.app.$fetch:$fetch;ut("server-routes:fetch",{method:I.value,sendFrom:q.value});try{a.data=await i(ye.value,{method:I.value.toUpperCase(),headers:he.value,query:ve.value,body:ue.value,onResponse({response:p}){a.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),a.statusCode=p.status,a.error=void 0},onResponseError(p){a.error=p.response._data,a.data=p.response._data}})}catch{}A.value=!1,a.fetchTime=Date.now()-s}const ge=E(()=>{const s=[],i=[],p=Object.entries(he.value).filter(([C,M])=>C&&M&&!(C==="Content-Type"&&M==="application/json")).map(([C,M])=>` '${C}': '${M}'`).join(`,
|
|
2
|
-
`);I.value.toUpperCase()!=="GET"&&i.push(`method: '${I.value.toUpperCase()}'`),p&&i.push(`headers: {
|
|
3
|
-
${p}
|
|
4
|
-
}`),ue.value&&i.push(`body: ${JSON.stringify(ue.value,null,2)}`);const R=i.length?`, {
|
|
5
|
-
${i.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(C=>` ${C}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return s.push({name:"useFetch",lang:"javascript",docs:ke.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${ne.value}'${R})`}),s.push({name:"$fetch",lang:"javascript",docs:ke.nuxt.$fetch,code:`await $fetch('${ne.value}'${R})`}),s}),Q=P(qe()),G=fe({key:"",value:""}),Pe=E(()=>{const s=[];return g.value.length&&s.push({name:"Params",slug:"params",length:g.value.length}),s.push({name:"Query",slug:"query",length:y.query.length}),te.value&&s.push({name:"Body",slug:"body",length:y.body.length}),s.push({name:"Headers",slug:"headers",length:y.headers.length}),s.push({name:"Cookies",slug:"cookies",length:Q.value.length}),s.push({name:"Snippets",slug:"snippet"}),s});function qe(){return document.cookie.split("; ").map(s=>{const[i,p]=s.split("=");return{key:i,value:p}}).filter(s=>s.key)}function ce(s,i){if(!s)return;const p=Q.value.find(C=>C.key===s),R=It(s);p!==void 0?i===void 0&&(Q.value=Q.value.filter(C=>C.key!==s)):(Q.value.push({key:s,value:i}),G.key="",G.value=""),R.value=i}st(()=>{z.value==="json"&&typeof D.value=="string"&&(D.value=JSON.parse(D.value))});const de=at("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});rt([y,k],()=>{const s=de.value?.find(i=>i.path===n.route.filepath);if(s){k.value||(k.value=s.tab),s.tab!==k.value&&(s.tab=k.value);const{body:i,query:p,headers:R,params:C}=s.inputs;Object.assign(y,{body:i,query:p,headers:R}),b.value=C}else{const i={path:n.route.filepath,tab:g.value.length?"params":"query",inputs:{...y,...g.value.length?{params:b.value}:{}}};de.value.push(i),k.value||(k.value=i.tab)}},{immediate:!0,deep:!0,debounce:500});function Me(){de.value=[],y.body=[],y.query=[],y.headers=[],b.value={},k.value=g.value.length?"params":"query"}const Be=lt();return(s,i)=>{const p=Ve,R=_t,C=ct,M=Te,be=Ne,Fe=gt,He=Ie,ze=dt,pe=Ue,Ge=bt,Je=kt,se=je("tooltip");return u(),_("div",At,[c("div",Lt,[c("div",Pt,[s.route.method?(u(),x(p,{key:0,class:F(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(re))(e(I))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:w(()=>[K(N(e(I).toUpperCase()),1)]),_:1},8,["class"])):(u(),x(R,{key:1,modelValue:e(I),"onUpdate:modelValue":i[0]||(i[0]=l=>Y(I)?I.value=l:null),class:F(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(re))(e(I))])},{default:w(()=>[(u(),_(L,null,J(le,l=>c("option",{key:l,class:F(("getRequestMethodClass"in s?s.getRequestMethodClass:e(re))(l))},N(l.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),c("div",qt,[m(C,{"model-value":e(ne),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),c("div",Mt,[Z(m(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:i[1]||(i[1]=l=>e(Be)(e(ye),"server-route-url"))},null,512),[[se,"Copy URL"]]),Z(m(p,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:i[2]||(i[2]=l=>e(ee)(s.route.filepath))},null,512),[[se,"Open in Editor"]])])]),m(p,{"h-full":"",n:"primary solid",onClick:_e},{default:w(()=>[m(M,{icon:"carbon:send"})]),_:1})])]),c("div",Bt,[(u(!0),_(L,null,J(e(Pe),l=>Z((u(),x(p,{key:l.slug,class:F(e(k)===l.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:X=>k.value=l.slug},{default:w(()=>[m(M,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e(Oe))[l.slug]},null,8,["icon"]),c("div",Ft,[K(N(l.name)+" "+N(l?.length?`(${l.length})`:"")+" ",1),c("span",null,N(e(T)[l.slug]?.length?`(${e(T)[l.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[se,l.name]])),128)),Ht,zt,m(R,{modelValue:e(q),"onUpdate:modelValue":i[3]||(i[3]=l=>Y(q)?q.value=l:null),class:"n-xs",disabled:!e(f)?.app?.$fetch},{default:w(()=>[Gt,Jt]),_:1},8,["modelValue","disabled"]),Z(m(p,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Me},null,512),[[se,"Clear Inputs Saved Cache"]])]),e(k)==="params"?(u(),_("div",Wt,[(u(!0),_(L,null,J(e(g),l=>(u(),_(L,{key:l},[c("div",Kt,N(l),1),m(C,{modelValue:e(b)[l],"onUpdate:modelValue":X=>e(b)[l]=X,placeholder:l,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):O("",!0),e(k)==="cookies"?(u(),_("div",Qt,[(u(!0),_(L,null,J(e(Q),l=>(u(),_("div",{key:l.key,flex:"~ gap-4 items-center"},[m(C,{placeholder:"Key...","model-value":l.key,disabled:"","op-70":""},null,8,["model-value"]),m(C,{placeholder:"Value...","model-value":l.value,"flex-1":"",n:"primary",onInput:X=>ce(l.key,X.target?.value)},null,8,["model-value","onInput"]),m(p,{title:"Delete",n:"red",onClick:X=>ce(l.key,void 0)},{default:w(()=>[m(M,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),c("div",Xt,[m(C,{modelValue:e(G).key,"onUpdate:modelValue":i[4]||(i[4]=l=>e(G).key=l),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),m(C,{modelValue:e(G).value,"onUpdate:modelValue":i[5]||(i[5]=l=>e(G).value=l),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),m(p,{title:"Add",n:"primary",onClick:i[6]||(i[6]=l=>ce(e(G).key,e(G).value))},{default:w(()=>[m(M,{icon:"i-carbon-save"})]),_:1})])])):O("",!0),m(e(h),null,{default:w(()=>[m(be,{modelValue:e(oe),"onUpdate:modelValue":i[9]||(i[9]=l=>Y(oe)?oe.value=l:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:w(()=>[e(T)[e(k)]?.length?(u(),_(L,{key:0},[c("div",Yt,[Zt,eo,m(p,{icon:"i-carbon-edit",border:!1,onClick:i[7]||(i[7]=l=>o("open-default-input"))}),to]),m(be,{modelValue:e(T)[e(k)],"onUpdate:modelValue":i[8]||(i[8]=l=>e(T)[e(k)]=l),disabled:"",p0:""},null,8,["modelValue"])],64)):O("",!0)]),_:1},8,["modelValue"])]),_:1}),e(k)==="snippet"?(u(),_("div",oo,[e(ge).length?(u(),x(Fe,{key:0,"code-snippets":e(ge)},null,8,["code-snippets"])):O("",!0)])):e(oe)?(u(),_("div",no,[e(k)==="body"?(u(),_(L,{key:0},[c("div",so,[(u(),_(L,null,J($,l=>c("button",{key:l,px4:"",py2:"",border:"r base",hover:"bg-active",class:F({"border-b":l!==e(z)}),onClick:X=>z.value=l},[c("div",{class:F({op30:l!==e(z)}),"font-mono":""},N(l),3)],10,ao)),64)),ro]),e(z)==="input"?(u(),x(e(v),{key:0})):e(z)==="json"?(u(),x(e(wt),it({key:1,modelValue:e(D),"onUpdate:modelValue":i[10]||(i[10]=l=>Y(D)?D.value=l:null),class:[[s.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},s.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):O("",!0)],64)):(u(),x(e(v),{key:1}))])):O("",!0),e(H)?e(A)?(u(),x(ze,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:w(()=>[K(" Fetching... ")]),_:1})):(u(),_(L,{key:6},[c("div",lo,[io,e(a).error?(u(),x(pe,{key:0,n:"red"},{default:w(()=>[K(" Error ")]),_:1})):O("",!0),m(pe,{n:e(a).error?"orange":"green",textContent:N(e(a).statusCode)},null,8,["n","textContent"]),e(a).contentType?(u(),_("code",uo,N(e(a).contentType),1)):O("",!0),e(a).contentType==="application/json"?(u(),x(Ge,{key:2,getter:()=>({input:e(V)})},null,8,["getter"])):O("",!0),co,po,m(pe,{n:"green"},{default:w(()=>[K(N(e(a).fetchTime)+" ms ",1)]),_:1})]),e(S)==="pdf"?(u(),_("div",fo,[c("div",mo,[c("object",{data:e(V),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,vo)])])):e(S)!=="media"?(u(),x(Je,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(V),lang:e(S)},null,8,["code","lang"])):(u(),_("div",ho,[c("div",yo,[e(a).contentType.includes("image")?(u(),_("img",{key:0,rounded:"",src:e(V)},null,8,_o)):(u(),_("video",go,[c("source",{src:e(V),type:"video/mp4"},null,8,bo)]))])]))],64)):(u(),x(He,{key:4},{default:w(()=>[m(p,{n:"primary",onClick:_e},{default:w(()=>[m(M,{icon:"carbon:send"}),K(" Send request ")]),_:1})]),_:1}))])}}}),wo={flex:"~ gap1","text-sm":""},Co={key:0,op50:""},xo={op50:""},So=c("span",{op75:""},"Select a route to start",-1),To=c("div",{p4:"",border:"b base"},[c("span",{"text-lg":""},"Default Inputs"),c("br"),c("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Bo=me({__name:"server-routes",setup(t){const r=P(!1),n=pt(),o=Se(),{selectedRoute:h,view:v,inputDefaults:d}=De("serverRoutes"),f=E(()=>{!o.value&&h.value&&(o.value=h.value.filepath);const j=n.value?.find(g=>g.filepath===o.value);return o.value!==h.value?.filepath&&j&&(h.value=j),j}),a=P(""),S=E(()=>new ft(n.value||[],{keys:["method","route"],shouldSort:!0})),V=E(()=>n.value?a.value?S.value.search(a.value).map(g=>g.item):n.value:[]),A=E(()=>{const j=[],g=(b,y)=>{b.routes=b.routes||[],b.routes.push(y)},I=(b,y)=>{const D=y?y.routes?.find(U=>U.route===b):j.find(U=>U.route===b);if(D)return D;const T={route:b,filepath:b.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return y?g(y,T):j.push(T),T};return V.value.forEach(b=>{let y,D;const T=b.filepath.split("/"),U=T.slice(T.indexOf("server")+1);if(b.type==="runtime"){U[0]="runtime";const q=T.indexOf("dist");q!==-1&&(y=T[q-1],y&&U.splice(1,0,y))}U.length>0&&U[U.length-1].includes(".")&&U.pop(),U.forEach(q=>{D=I(q,D)}),D?g(D,b):j.push(b)}),j});function H(){v.value=v.value==="tree"?"list":"tree"}function ee(j){return j.charAt(0).toUpperCase()+j.slice(1)}return(j,g)=>{const I=Ve,b=yt,y=Ae,D=ko,T=ht,U=Ie,q=mt,le=Ne,ie=Ct,te=xt,k=je("tooltip");return u(),_(L,null,[m(q,{"storage-key":"tab-server-routes"},{left:w(()=>[m(b,{search:e(a),"onUpdate:search":g[1]||(g[1]=$=>Y(a)?a.value=$:null),pb2:""},{actions:w(()=>[Z(m(I,{"text-lg":"",icon:e(v)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:H},null,8,["icon"]),[[k,"Toggle View"]]),Z(m(I,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:g[0]||(g[0]=$=>r.value=!e(r))},null,512),[[k,"Default Inputs"]])]),default:w(()=>[c("div",wo,[e(a)?(u(),_("span",Co,N(e(V).length)+" matched · ",1)):O("",!0),c("span",xo,N(e(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(u(!0),_(L,null,J(e(v)==="tree"?e(A):e(V),$=>(u(),x(y,{key:$.filepath,item:$},null,8,["item"]))),128))]),right:w(()=>[(u(),x(vt,{max:10},[e(f)?(u(),x(D,{key:e(f).filepath,route:e(f),onOpenDefaultInput:g[2]||(g[2]=$=>r.value=!0)},null,8,["route"])):O("",!0)],1024)),e(f)?O("",!0):(u(),x(U,{key:0},{default:w(()=>[m(T,{px6:"",py2:""},{default:w(()=>[So]),_:1})]),_:1}))]),_:1}),m(te,{modelValue:e(r),"onUpdate:modelValue":g[3]||(g[3]=$=>Y(r)?r.value=$:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:g[4]||(g[4]=$=>r.value=!1)},{default:w(()=>[c("div",null,[To,(u(!0),_(L,null,J(Object.keys(e(d)),$=>(u(),x(ie,{key:$,text:`${ee($)} ${e(d)[$].length?`(${e(d)[$].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in j?j.ServerRouteTabIcons:e(Oe))[$]},{default:w(()=>[m(le,{modelValue:e(d)[$],"onUpdate:modelValue":z=>e(d)[$]=z,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Bo as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as g,al as N,a as m,m as u,f as a,i as E,j as x,k as p,t as d,p as v,h as y,Y as C,o as l,v as b}from"./p0yxMpsq.js";import{_ as S}from"./DNKTLI-X.js";import"./CPaWbrKR.js";const R=/(^|@)\S+:\d+/,h=/^\s*at .*(\S+:\d+|\(native\))/m,$=/^(eval@)?(\[native code])?$/;function _(n){if(typeof n.stacktrace<"u"||typeof n["opera#sourceloc"]<"u")return A(n);if(n.stack&&n.stack.match(h))return O(n);if(n.stack)return w(n);throw new Error("Cannot parse given Error object")}function f(n){if(!n.includes(":"))return[n];const e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(n.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]}function O(n){return n.stack.split(`
|
|
2
|
-
`).filter(e=>!!e.match(h)).map(e=>{e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let s=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const t=s.match(/ (\(.+\)$)/);s=t?s.replace(t[0],""):s;const r=f(t?t[1]:s),o=t&&s||void 0,i=["eval","<anonymous>"].includes(r[0])?void 0:r[0];return{functionName:o,fileName:i,lineNumber:r[1]?+r[1]:void 0,columnNumber:r[2]?+r[2]:void 0,source:e}})}function w(n){return n.stack.split(`
|
|
3
|
-
`).filter(e=>!e.match($)).map(e=>{if(e.includes(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!e.includes("@")&&!e.includes(":"))return{functionName:e};{const s=/((.*".+"[^@]*)?[^@]*)(?:@)/,t=e.match(s),r=t&&t[1]?t[1]:void 0,o=f(e.replace(s,""));return{functionName:r,fileName:o[0],lineNumber:o[1]?+o[1]:void 0,columnNumber:o[2]?+o[2]:void 0,source:e}}})}function A(n){return!n.stacktrace||n.message.includes(`
|
|
4
|
-
`)&&n.message.split(`
|
|
5
|
-
`).length>n.stacktrace.split(`
|
|
6
|
-
`).length?I(n):n.stack?P(n):F(n)}function I(n){const c=/Line (\d+).*script (?:in )?(\S+)/i,e=n.message.split(`
|
|
7
|
-
`),s=[];for(let t=2,r=e.length;t<r;t+=2){const o=c.exec(e[t]);o&&s.push({fileName:o[2],lineNumber:+o[1],source:e[t]})}return s}function F(n){const c=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,e=n.stacktrace.split(`
|
|
8
|
-
`),s=[];for(let t=0,r=e.length;t<r;t+=2){const o=c.exec(e[t]);o&&s.push({functionName:o[3]||void 0,fileName:o[2],lineNumber:o[1]?+o[1]:void 0,source:e[t]})}return s}function P(n){return n.stack.split(`
|
|
9
|
-
`).filter(e=>!!e.match(R)&&!e.match(/^Error created at/)).map(e=>{const s=e.split("@"),t=f(s.pop()),r=s.shift()||"",o=r.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;let i;r.match(/\(([^)]*)\)/)&&(i=r.replace(/^[^(]+\(([^)]*)\)$/,"$1"));const k=i===void 0||i==="[arguments not available]"?void 0:i.split(",");return{functionName:o,args:k,fileName:t[0],lineNumber:t[1]?+t[1]:void 0,columnNumber:t[2]?+t[2]:void 0,source:e}})}const T={p6:""},V={key:0},B={"text-6xl":""},X={key:0,op75:""},D={my4:"","text-xl":"","text-red":""},G={key:1,"of-auto":"",rounded:"","bg-active":"",p2:""},L=p("div",{px1:"",op50:""}," Stacktrace ",-1),M=["textContent"],j={key:1,op50:""},U=g({__name:"error",setup(n){const c=N(),e=m(()=>{const t=c.value?.nuxt?.payload?.error;return t&&(console.error("[Nuxt DevTools] Error in payload:"),console.error(t),console.error({...t})),t}),s=m(()=>{if(!e.value?.stack)return[];try{return e.value.stack.startsWith("<pre>")?_({stack:e.value.stack.replace(/<.*?>/g,"")}):_(e.value)}catch(t){return console.error(t),[]}});return(t,r)=>{const o=C,i=S;return l(),u("div",T,[a(e)?(l(),u("div",V,[E(o,{n:"red",icon:"i-carbon-warning-alt-filled",mb5:""},{default:x(()=>[b(" Error occurred in this page ")]),_:1}),p("div",B,d(a(e).statusCode||"Client Error"),1),a(e).statusMessage?(l(),u("div",X,d(a(e).statusMessage),1)):v("",!0),p("div",D,d(a(e).message||a(e).description||"Unknown error"),1),a(s).length||a(e).stack?(l(),u("div",G,[L,a(s).length?(l(),y(i,{key:0,px2:"",stacktrace:a(s)},null,8,["stacktrace"])):(l(),u("pre",{key:1,textContent:d(a(e).stack)},null,8,M))])):v("",!0)])):(l(),u("div",j," No error "))])}}});export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
details[data-v-bae9fa8d]{border-style:none}summary[data-v-bae9fa8d]{border-style:none;list-style:none}details[open] summary[data-v-bae9fa8d]{border-style:none}details summary[data-v-bae9fa8d]::-webkit-details-marker{display:none}details[open] .chevron[data-v-bae9fa8d]{opacity:.75;transform:rotate(180deg)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"18b2ce8f-3b8c-41e7-8fa5-448213ee4a24","timestamp":1717506069342,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|