@nuxt/devtools 1.3.8 → 1.3.14
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 +526 -5
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +27 -27
- package/dist/client/404.html +27 -27
- package/dist/client/_nuxt/{C7cYo4YF.js → 2tJW9cKr.js} +1 -1
- package/dist/client/_nuxt/{CbM9OHn3.js → B-wfK0SS.js} +1 -1
- package/dist/client/_nuxt/B2TuRHFi.js +1 -0
- package/dist/client/_nuxt/{DKSts1V4.js → BEKXAodE.js} +1 -1
- package/dist/client/_nuxt/{Ckn823xU.js → BF_UD7ZT.js} +114 -114
- package/dist/client/_nuxt/{Cuq1Z6bh.js → BHBvn5Xs.js} +1 -1
- package/dist/client/_nuxt/BLmvGqlk.js +1 -0
- package/dist/client/_nuxt/{DX-YUedo.js → BMUgLter.js} +9 -9
- package/dist/client/_nuxt/BMbUeBqv.js +1 -1
- package/dist/client/_nuxt/{BjYCaXNT.js → BO314c-_.js} +1 -1
- package/dist/client/_nuxt/{GdB9kz-4.js → BWPbreBU.js} +1 -1
- package/dist/client/_nuxt/BYelj_cE.js +1 -0
- package/dist/client/_nuxt/{BLxIf9BH.js → BZZpaKJQ.js} +1 -1
- package/dist/client/_nuxt/{CPUwo9Dx.js → BZvh3yot.js} +2 -2
- package/dist/client/_nuxt/BcJweaq3.js +9 -0
- package/dist/client/_nuxt/{CH-roGkP.js → Bi99gj7u.js} +1 -1
- package/dist/client/_nuxt/{DETXY6Xa.js → BkmSFWMo.js} +1 -1
- package/dist/client/_nuxt/{DvDu1JUs.js → Bl8OBrwH.js} +1 -1
- package/dist/client/_nuxt/BrzmMRQX.js +2 -0
- package/dist/client/_nuxt/{8q1pCtVS.js → C4OO6w_e.js} +1 -1
- package/dist/client/_nuxt/{DuFGBY9A.js → C8RrL2-P.js} +1 -1
- package/dist/client/_nuxt/{BnXFHUk0.js → CA5wVMK1.js} +1 -1
- package/dist/client/_nuxt/{Dslz6rss.js → CE84j0J9.js} +1 -1
- package/dist/client/_nuxt/{o8QbmO42.js → CLVHkiJk.js} +1 -1
- package/dist/client/_nuxt/{DE5e3ZuV.js → CPWqrNrA.js} +1 -1
- package/dist/client/_nuxt/{C8N9kWh2.js → CPr4CZHz.js} +1 -1
- package/dist/client/_nuxt/CTKqK4eG.js +1 -1
- package/dist/client/_nuxt/CVW-sDYN.js +1 -0
- package/dist/client/_nuxt/{D0h9jATl.js → CWyKSuRn.js} +1 -1
- package/dist/client/_nuxt/CbViG2Xw.js +1 -1
- package/dist/client/_nuxt/{fwfpIEej.js → Cb_ad2sg.js} +1 -1
- package/dist/client/_nuxt/{dXjzJhiW.js → CcKfWHXB.js} +2 -2
- package/dist/client/_nuxt/{BG5RUyXI.js → CfVBzxeB.js} +1 -1
- package/dist/client/_nuxt/Cic6Ln_D.js +98 -0
- package/dist/client/_nuxt/{B_lF4o9u.js → CjFkCrIW.js} +1 -1
- package/dist/client/_nuxt/{D7m39p-9.js → CmbkPMjd.js} +1 -1
- package/dist/client/_nuxt/CnW1WPg6.js +1 -0
- package/dist/client/_nuxt/CsgBhI1g.js +16 -0
- package/dist/client/_nuxt/Cvo3JE8Q.js +1 -0
- package/dist/client/_nuxt/{DJdrWIcn.js → CxLTb5RC.js} +1 -1
- package/dist/client/_nuxt/{DVk2I1gO.js → CyS6YlEb.js} +1 -1
- package/dist/client/_nuxt/{mQFKENXH.js → CyvuMq07.js} +1 -1
- package/dist/client/_nuxt/D-a-w6CR.js +9 -0
- package/dist/client/_nuxt/{Xpd7UJs5.js → D4Ks82zD.js} +1 -1
- package/dist/client/_nuxt/{DdjW6vu9.js → D8XE2BC8.js} +1 -1
- package/dist/client/_nuxt/DDMtKJxh.js +1 -1
- package/dist/client/_nuxt/{C5gCGmDW.js → DK4oFTHQ.js} +1 -1
- package/dist/client/_nuxt/{C3FSKLnj.js → DKlNNSWk.js} +1 -1
- package/dist/client/_nuxt/{Cda7aUrs.js → DN0HCnq5.js} +1 -1
- package/dist/client/_nuxt/{H6yjxI9R.js → DOv5BRyJ.js} +1 -1
- package/dist/client/_nuxt/{Bxh-fvdv.js → DVZAdofw.js} +1 -1
- package/dist/client/_nuxt/{DeSj8VZN.js → DYx1ZwvQ.js} +1 -1
- package/dist/client/_nuxt/Di9lD2rK.js +1 -0
- package/dist/client/_nuxt/{BM3cCZms.js → DoQHeYxB.js} +3 -3
- package/dist/client/_nuxt/{ix9IAXj6.js → DpYuRYxj.js} +92 -22
- package/dist/client/_nuxt/{B04hL9Ab.js → Dv0NFAnW.js} +1 -1
- package/dist/client/_nuxt/{DEkvPDn8.js → DwVKZd3-.js} +1 -1
- package/dist/client/_nuxt/{QBzUTbSD.js → DwdKwQHN.js} +1 -1
- package/dist/client/_nuxt/{BRFlSxxW.js → JMx2uAI6.js} +1 -1
- package/dist/client/_nuxt/{BS5FcDmG.js → VNvxalkE.js} +1 -1
- package/dist/client/_nuxt/W2Tyz6z1.js +9 -0
- package/dist/client/_nuxt/{QQ7YbgtC.js → awWHqjli.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/a69820c2-31c2-48f6-8161-842a62467079.json +1 -0
- package/dist/client/_nuxt/ciodjZaS.js +43 -0
- package/dist/client/_nuxt/entry.Gpl6Gx6M.css +1 -0
- package/dist/client/_nuxt/error-404.Bssqox27.css +1 -0
- package/dist/client/_nuxt/error-500.D3oXMFZl.css +1 -0
- package/dist/client/_nuxt/{Csl1JfEo.js → ewAh1ZiX.js} +1 -1
- package/dist/client/_nuxt/{CHQglk26.js → gXK6hV6W.js} +8 -8
- package/dist/client/_nuxt/pl_4MfI2.js +1 -0
- package/dist/client/_nuxt/{BTj8T8Us.js → rLudNEh9.js} +1 -1
- package/dist/client/_nuxt/terminals.BIEho_Pa.css +1 -0
- package/dist/client/_nuxt/timeline.BVVcTKn-.css +1 -0
- package/dist/client/_nuxt/{BdSLTmjP.js → viHXAOJs.js} +1 -1
- package/dist/client/_nuxt/yFeWtr-M.js +1 -0
- package/dist/client/_nuxt/{CyiHZscW.js → z0xAc3RC.js} +1 -1
- package/dist/client/_nuxt/{_OFeGLwh.js → zLQhdF7m.js} +1 -1
- package/dist/client/_nuxt/{CGZO0Dbu.js → zjxoDR5L.js} +1 -1
- package/dist/client/index.html +27 -27
- package/dist/module.json +1 -1
- package/dist/runtime/auth/index.html +2 -12
- package/dist/runtime/function-metrics-helpers.mjs +1 -1
- package/dist/runtime/plugins/view/Main.vue +1 -1
- package/dist/runtime/plugins/view/client.mjs +7 -5
- package/dist/runtime/plugins/view/utils.mjs +10 -6
- package/package.json +37 -37
- package/dist/client/_nuxt/B6TDWpKk.js +0 -1
- package/dist/client/_nuxt/BvHZCDLj.js +0 -9
- package/dist/client/_nuxt/BwKcIQOa.js +0 -16
- package/dist/client/_nuxt/C2c19bzT.js +0 -1
- package/dist/client/_nuxt/C9duD8Qg.js +0 -1
- package/dist/client/_nuxt/CCEQErg8.js +0 -1
- package/dist/client/_nuxt/CSGOJSAd.js +0 -1
- package/dist/client/_nuxt/CZLRDnsa.js +0 -1
- package/dist/client/_nuxt/CfkdovQd.js +0 -98
- package/dist/client/_nuxt/CssX2CxZ.js +0 -2
- package/dist/client/_nuxt/CwTcTc2N.js +0 -43
- package/dist/client/_nuxt/D5ctTtkd.js +0 -1
- package/dist/client/_nuxt/DJS8TjB-.js +0 -1
- package/dist/client/_nuxt/DluxqTUE.js +0 -1
- package/dist/client/_nuxt/builds/meta/8ac9da91-0524-4abf-a805-60b3d6199fe9.json +0 -1
- package/dist/client/_nuxt/entry.hxdKUDpu.css +0 -1
- package/dist/client/_nuxt/error-404.C4UNnO0a.css +0 -1
- package/dist/client/_nuxt/error-500.BbJ9e2Fk.css +0 -1
- package/dist/client/_nuxt/pA_iBoe4.js +0 -9
- package/dist/client/_nuxt/terminals.dNTO8Cf0.css +0 -1
- package/dist/client/_nuxt/timeline.DvDJbalt.css +0 -1
- package/dist/client/_nuxt/wGyJxDW5.js +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,a0 as c,r as p,
|
|
1
|
+
import{d as i,a0 as c,r as p,aY as u,o as m,m as f,aa as n,i as v,j as _,v as b,f as a,k,G as V,_ as B}from"./ciodjZaS.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=c(r,"modelValue",l,{passive:!0}),s=p();return u(s,()=>{e.value=!1}),(o,t)=>{const d=B;return m(),f("div",{ref_key:"el",ref:s,class:"relative"},[n(o.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[v(d,{onClick:t[0]||(t[0]=g=>e.value=!a(e))},{default:_(()=>[b(" Dropdown ")]),_:1})]),k("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[a(e)?"op-100":"op0 pointer-events-none -translate-y-1",o.direction==="end"?"right-0":"left-0"]])},[n(o.$slots,"default")],2)],512)}}});export{$ as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o}from"./
|
|
1
|
+
import{d as o}from"./yFeWtr-M.js";import{d as t,f as e,o as a,h as r,az as s,t as d}from"./ciodjZaS.js";const i=t({__name:"NMarkdown",props:{markdown:{},tag:{}},setup(m){return(n,l)=>n.markdown&&e(o)?.devtools?.renderMarkdown?(a(),r(s(n.tag||"span"),{key:0,class:"n-markdown",innerHTML:e(o).devtools.renderMarkdown(n.markdown)},null,8,["innerHTML"])):(a(),r(s(n.tag||"span"),{key:1,class:"n-markdown",textContent:d(n.markdown)},null,8,["textContent"]))}});export{i as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as y,a0 as $,m as p,k as o,G as i,i as w,j as B,f as l,F as u,I as C,J as S,aa as s,p as d,o as r,v as f,t as v,h as b,y as k,z as I,a6 as N,q as V}from"./
|
|
1
|
+
import{d as y,a0 as $,m as p,k as o,G as i,i as w,j as B,f as l,F as u,I as C,J as S,aa as s,p as d,o as r,v as f,t as v,h as b,y as k,z as I,a6 as N,q as V}from"./ciodjZaS.js";import{_ as x}from"./zLQhdF7m.js";const m=t=>(k("data-v-bae9fa8d"),t=t(),I(),t),z=["open"],T={"text-base":""},D={key:0,"text-sm":"",op50:""},F=m(()=>o("div",{class:"flex-auto"},null,-1)),j=m(()=>o("div",{class:"x-divider"},null,-1)),q=y({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(t){const a=$(t,"open",void 0,{passive:!0});function c(e){a.value=e.target.open}return(e,n)=>{const h=N,g=x;return r(),p(u,null,[o("details",{open:l(a),onToggle:n[0]||(n[0]=(..._)=>c&&c(..._))},[o("summary",{class:i(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[w(g,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:i([l(a)?"op100":"op60",e.headerClass])},{default:B(()=>[o("div",null,[o("div",T,[s(e.$slots,"text",{},()=>[f(v(e.text),1)],!0)]),e.description||e.$slots.description?(r(),p("div",D,[s(e.$slots,"description",{},()=>[f(v(e.description),1)],!0)])):d("",!0)]),F,s(e.$slots,"actions",{},void 0,!0),e.collapse?(r(),b(h,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):d("",!0)]),_:3},8,["icon","text","class"])],2),n._lazyshow1||l(a)?(n._lazyshow1=!0,r(),p(u,null,[C(o("div",{class:i(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(e.$slots,"details",{},void 0,!0),o("div",{class:i([e.containerClass,"mt1"])},[s(e.$slots,"default",{},void 0,!0)],2),s(e.$slots,"footer",{},void 0,!0)],2),[[S,l(a)]])],64)):d("v-show-if",!0)],40,z),j],64)}}}),M=V(q,[["__scopeId","data-v-bae9fa8d"]]);export{M as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bP as Oe,d as ee,bQ as re,r as H,a as U,o as g,m as $,k as h,i as O,f as l,t as N,F as B,n as Z,G as F,p as j,a6 as oe,ak as ue,bL as Te,ao as xe,ab as Se,az as se,ac as we,aC as Xe,b1 as De,bM as Ee,e as Me,a2 as le,I as G,j as I,v as Y,bI as Ce,h as A,l as K,ax as Ie,V as $e,_ as ce,X as Ue,A as fe,an as Le,a9 as Re,aa as Ne,bR as Ae,ah as Ve,U as je,bO as Be,as as We}from"./CwTcTc2N.js";import{_ as He}from"./Xpd7UJs5.js";import{_ as pe}from"./CH-roGkP.js";import{_ as de}from"./Cuq1Z6bh.js";import{_ as ze}from"./CPUwo9Dx.js";import{S as he}from"./BcJws1i5.js";import{e as qe}from"./DX-YUedo.js";import{_ as Pe}from"./QBzUTbSD.js";import{_ as Ye}from"./C3FSKLnj.js";import"./GdB9kz-4.js";import"./B_lF4o9u.js";import"./CSGOJSAd.js";import"./_OFeGLwh.js";var ve={exports:{}};(function(q,L){(function(T,E){q.exports=E()})(globalThis,()=>(()=>{var R={794:(x,p,b)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=b(586),d=function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(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!==""});r.length===0&&r.push("*"),r.sort(function(s,i){return s!==null&&i!==null?s-i:0}),e[a]=r.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 n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(c){var m=c.replace(/\D/,""),f=m;return e.dayOfWeekStartIndexZero?m=="7"&&(f="0"):f=(parseInt(m)-1).toString(),c.replace(m,f)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(c){var m=c.replace(/\D/,""),f=m;return e.monthStartIndexZero&&(f=(parseInt(m)+1).toString()),c.replace(m,f)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in n)t[4]=t[4].replace(new RegExp(s,"gi"),n[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(c){return c!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var u=null;switch(i){case 4:u="12";break;case 5:u="6";break;case 6:u="9999";break;default:u=null;break}if(u!==null){var v=t[i].split("/");t[i]="".concat(v[0],"-").concat(u,"/").concat(v[1])}}},y.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},y.prototype.validateRange=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.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(),"'"))},y}();p.CronParser=d},728:(x,p,b)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=b(910),d=b(794),y=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,s=n===void 0?!0:n,i=r.verbose,u=i===void 0?!1:i,v=r.dayOfWeekStartIndexZero,c=v===void 0?!0:v,m=r.monthStartIndexZero,f=m===void 0?!1:m,C=r.use24HourTimeFormat,S=r.locale,W=S===void 0?null:S,V=r.tzOffset,D=V===void 0?0:V,z={throwExceptionOnParseError:s,verbose:u,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:C,locale:W,tzOffset:D},te=new t(e,z);return te.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 d.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=a.parse();var r=this.getTimeOfDayDescription(),n=this.getDayOfMonthDescription(),s=this.getMonthDescription(),i=this.getDayOfWeekDescription(),u=this.getYearDescription();e+=r+n+i+s+u,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],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var s=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,s[0],""),this.formatTime(r,s[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var u=0;u<i.length;u++)n+=" ",n+=this.formatTime(i[u],a,""),u<i.length-2&&(n+=","),u==i.length-2&&(n+=this.i18n.spaceAnd())}else{var v=this.getSecondsDescription(),c=this.getMinutesDescription(),m=this.getHoursDescription();if(n+=v,n&&c&&(n+=", "),n+=c,c===m)return n;n&&m&&(n+=", "),n+=m}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(s){return s},function(s){return o.StringUtilities.format(e.i18n.everyX0Minutes(s),s)},function(s){return e.i18n.minutesX0ThroughX1PastTheHour()},function(s){try{return s=="0"&&r.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 n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=this.getSegmentDescription(a,this.i18n.everyHour(),function(i){return e.formatTime(i,"0","")},function(i){return o.StringUtilities.format(e.i18n.everyX0Hours(i),i)},function(i){return e.i18n.betweenX0AndX1()},function(i){return e.i18n.atX0()});if(r&&a.includes("-")&&this.expressionParts[1]!="0"){var n=Array.from(r.matchAll(/:00/g));if(n.length>1){var s=n[n.length-1].index;r=r.substring(0,s)+":59"+r.substring(s+3)}}return r},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,s){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var u=parseInt(i);if(e.options.tzOffset){var v=e.expressionParts[2],c=parseInt(v)+(e.options.tzOffset?e.options.tzOffset:0);c>=24?u++:c<0&&u--,u>6?u=0:u<0&&(u=6)}var m=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(s)[u]:a[u];if(n.indexOf("#")>-1){var f=null,C=n.substring(n.indexOf("#")+1),S=n.substring(0,n.indexOf("#"));switch(C){case"1":f=e.i18n.first(S);break;case"2":f=e.i18n.second(S);break;case"3":f=e.i18n.third(S);break;case"4":f=e.i18n.fourth(S);break;case"5":f=e.i18n.fifth(S);break}m=f+" "+m}return m},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var s=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(s):e.i18n.commaX0ThroughX1(s)},function(n){var s=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1);s=e.i18n.commaOnThe(i).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)s=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var u=e.expressionParts[3]!="*";s=u?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return s}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,s){return s&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(s)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var s=parseInt(n[0].replace("W","")),i=s==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var u=r.match(/L-(\d{1,2})/);if(u){var v=u[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(v),v);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(c){return c=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),c):c},function(c){return c=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(c)},function(c){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(c)},function(c){return e.i18n.commaOnDayX0OfTheMonth(c)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,s,i){var u=null,v=e.indexOf("/")>-1,c=e.indexOf("-")>-1,m=e.indexOf(",")>-1;if(!e)u="";else if(e==="*")u=a;else if(!v&&!c&&!m)u=o.StringUtilities.format(i(e),r(e));else if(m){for(var f=e.split(","),C="",S=0;S<f.length;S++)if(S>0&&f.length>2&&(C+=",",S<f.length-1&&(C+=" ")),S>0&&f.length>1&&(S==f.length-1||f.length==2)&&(C+="".concat(this.i18n.spaceAnd()," ")),f[S].indexOf("/")>-1||f[S].indexOf("-")>-1){var W=f[S].indexOf("-")>-1&&f[S].indexOf("/")==-1,V=this.getSegmentDescription(f[S],a,r,n,W?this.i18n.commaX0ThroughX1:s,i);W&&(V=V.replace(", ","")),C+=V}else v?C+=this.getSegmentDescription(f[S],a,r,n,s,i):C+=r(f[S]);v?u=C:u=o.StringUtilities.format(i(e),C)}else if(v){var f=e.split("/");if(u=o.StringUtilities.format(n(f[1]),f[1]),f[0].indexOf("-")>-1){var D=this.generateRangeSegmentDescription(f[0],s,r);D.indexOf(", ")!=0&&(u+=", "),u+=D}else if(f[0].indexOf("*")==-1){var z=o.StringUtilities.format(i(f[0]),r(f[0]));z=z.replace(", ",""),u+=o.StringUtilities.format(this.i18n.commaStartingX0(),z)}}else c&&(u=this.generateRangeSegmentDescription(e,s,r));return u},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",s=e.split("-"),i=r(s[0],1),u=r(s[1],2),v=a(e);return n+=o.StringUtilities.format(v,i,u),n},t.prototype.formatTime=function(e,a,r){var n=0,s=0;this.options.tzOffset&&(n=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)+n,u=parseInt(a)+s;u>=60?(u-=60,i+=1):u<0&&(u+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var v="",c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),v=c?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var m="";return r&&(m=":".concat(("00"+r).substring(r.length))),"".concat(c?v:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+u.toString()).substring(u.toString().length)).concat(m).concat(c?"":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=y},336:(x,p,b)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=b(751),d=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=d},751:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var b=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o}();p.en=b},586:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function b(d,y){if(!d)throw new Error(y)}var o=function(){function d(){}return d.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},d.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},d.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},d.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},d.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);b(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},d.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);b(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},d}();p.default=o},910:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var b=function(){function o(){}return o.format=function(d){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return d.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(d,y){return y.some(function(t){return d.indexOf(t)>-1})},o}();p.StringUtilities=b}},T={};function E(x){var p=T[x];if(p!==void 0)return p.exports;var b=T[x]={exports:{}};return R[x](b,b.exports,E),b.exports}var X={};return(()=>{var x=X;Object.defineProperty(x,"__esModule",{value:!0}),x.toString=void 0;var p=E(728),b=E(336);p.ExpressionDescriptor.initialize(new b.enLocaleLoader),x.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;x.toString=o})(),X})())})(ve);var Fe=ve.exports;const Ge=Oe(Fe),Ze=["title"],Je={"flex-none":"","text-left":""},Qe={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},Ke={class:"truncate"},et={"text-xs":"",op50:""},tt=h("div",{"x-divider":""},null,-1),nt={key:0},rt=["onClick"],ot=h("div",{"x-divider":""},null,-1),at=ee({__name:"CronCollection",props:{collection:{}},setup(q){const L=q,R=re(),T=H(!0),E=U(()=>Ge.toString(L.collection.cron));return(X,x)=>{const p=oe,b=pe;return g(),$("div",null,[h("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:l(E),onClick:x[0]||(x[0]=o=>T.value=!l(T))},[h("div",Je,[O(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l(T)?90:0,transition:""},null,8,["transform-rotate"])]),h("span",Qe,[O(b,{class:"font-mono n-primary",textContent:N(X.collection.cron)},null,8,["textContent"]),h("span",Ke,N(l(E)),1),h("span",et,"("+N(X.collection.tasks.length)+")",1)])],8,Ze),tt,l(T)?(g(),$("ul",nt,[(g(!0),$(B,null,Z(X.collection.tasks,o=>(g(),$("li",{key:o},[h("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:F([{"bg-active":l(R)===o}]),onClick:d=>R.value=o},N(o),11,rt),ot]))),128))])):j("",!0)])}}}),it={"h-full":"","w-full":"",flex:"~ col"},st={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},ut={flex:"~ gap2 items-center"},lt={relative:"","w-full":""},ct={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ft={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},pt={class:"hidden md:block"},dt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},ht=h("div",{"w-5":"","x-divider":""},null,-1),vt=h("div",{"flex-none":""}," Default Inputs ",-1),mt=h("div",{"x-divider":""},null,-1),yt={key:0,border:"b base",relative:"","n-code-block":""},gt={flex:"~ wrap","w-full":""},_t=["onClick"],bt=h("div",{border:"b base","flex-auto":""},null,-1),kt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Ot=h("div",null,"Result",-1),Tt={key:1,"text-xs":"",op50:""},xt=h("div",{"flex-auto":""},null,-1),St=h("div",{op50:""}," Tasks finished in ",-1),wt=ee({__name:"ServerTaskDetails",props:{task:{}},emits:["open-default-input"],setup(q,{emit:L}){const R=q,T=L,E=H({payload:{}}),{inputDefaults:X}=ue("serverRoutes"),[x,p]=Te(),b=xe(),o=Se(),d=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=U(()=>JSON.stringify(d.data,null,2)),t=U(()=>d.contentType.includes("application/json")?"json":"text"),e=H(!1),a=H(!1),r=we(),n=H(),s=["json"],i=H(s[0]),u=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),v=U({get:()=>u[n.value],set:_=>{u[n.value]=_}}),c=U(()=>({...D(X.value.query),...D(u.query)})),m=U(()=>({...D(X.value.headers)})),f=U(()=>Object.keys(E.value?.payload??{}).length?{...E.value}:void 0),C=U(()=>f.value?"POST":"GET"),S=U(()=>{let _=window?.location.origin;return _.charAt(_.length-1)==="/"&&(_=_.slice(0,-1)),_}),W=U(()=>{let _=new URLSearchParams(c.value).toString();_&&(_=`?${_}`);const k=`/_nitro/tasks/${R.task.name}${_}`;let M=o.value?.app.baseURL||"";return(M==="./"||M===".")&&(M=""),M.endsWith("/")&&(M=M.slice(0,-1)),M+k}),V=U(()=>S.value+W.value);function D(_){const k=Object.fromEntries(_.filter(({active:M,key:P,value:J})=>M&&P&&J!==void 0).map(({key:M,value:P})=>[M,P]));return Object.entries(k).length?k:void 0}async function z(){a.value=!0,e.value=!0;const _=Date.now();$e("server-tasks:run",{method:C.value});try{d.data=await $fetch(V.value,{method:"POST",headers:m.value,query:c.value,body:f.value,onResponse({response:k}){d.contentType=(k.headers.get("content-type")||"").toString().toLowerCase().trim(),d.statusCode=k.status,d.error=void 0},onResponseError(k){d.error=k.response._data,d.data=k.response._data}})}catch{}e.value=!1,d.fetchTime=Date.now()-_}const te=U(()=>{const _=[];return _.push({name:"Query",slug:"query",length:u.query.length}),_.push({name:"Body",slug:"body",length:u.body.length}),_});Xe(()=>{if(i.value==="json"&&typeof E.value=="string")try{E.value=JSON.parse(E.value)}catch{}});const ae=De("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Ee([u,n],()=>{const _=ae.value?.find(k=>k.task===R.task.name);if(_){n.value||(n.value=_.tab),_.tab!==n.value&&(_.tab=n.value);const{body:k,query:M,headers:P}=_.inputs;Object.assign(u,{body:k,query:M,headers:P})}else{const k={task:R.task.name,tab:"query",inputs:u};ae.value.push(k),n.value||(n.value=k.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Me();return(_,k)=>{const M=ce,P=Ue,J=oe,ie=de,ge=fe,_e=Le,ne=pe,be=ze,Q=le("tooltip");return g(),$("div",it,[h("div",st,[h("div",ut,[G((g(),$("div",null,[O(M,{class:F(["n-badge-base n-sm",("getRequestMethodClass"in _?_.getRequestMethodClass:l(Ce))(l(C))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:I(()=>[Y(N(l(C)),1)]),_:1},8,["class"])])),[[Q,`Method is ${l(C)} as ${l(C)==="GET"?"no":""} json body is sent`]]),h("div",lt,[O(P,{"model-value":l(W),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),h("div",ct,[G(O(M,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:k[0]||(k[0]=w=>l(ye)(l(V),"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(O(M,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:k[1]||(k[1]=w=>l(r)(_.task.handler))},null,512),[[Q,"Open in Editor"]])])]),O(M,{"h-full":"",n:"primary solid",onClick:z},{default:I(()=>[O(J,{icon:"carbon:send"})]),_:1})])]),h("div",ft,[(g(!0),$(B,null,Z(l(te),w=>G((g(),A(M,{key:w.slug,class:F(l(n)===w.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=w.slug},{default:I(()=>[O(J,{icon:("ServerRouteTabIcons"in _?_.ServerRouteTabIcons:l(he))[w.slug]},null,8,["icon"]),h("div",pt,[Y(N(w.name)+" "+N(w?.length?`(${w.length})`:"")+" ",1),h("span",null,N(l(X)[w.slug]?.length?`(${l(X)[w.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,w.name]])),128))]),O(l(x),null,{default:I(()=>[O(ie,{modelValue:l(v),"onUpdate:modelValue":k[4]||(k[4]=w=>K(v)?v.value=w:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:I(()=>[l(X)[l(n)]?.length?(g(),$(B,{key:0},[h("div",dt,[ht,vt,O(M,{icon:"i-carbon-edit",border:!1,onClick:k[2]||(k[2]=w=>T("open-default-input"))}),mt]),O(ie,{modelValue:l(X)[l(n)],"onUpdate:modelValue":k[3]||(k[3]=w=>l(X)[l(n)]=w),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),l(v)?(g(),$("div",yt,[l(n)==="body"?(g(),$(B,{key:0},[h("div",gt,[(g(),$(B,null,Z(s,w=>h("button",{key:w,px4:"",py2:"",border:"r base",hover:"bg-active",class:F({"border-b":w!==l(i)}),onClick:ke=>i.value=w},[h("div",{class:F({op30:w!==l(i)}),"font-mono":""},N(w),3)],10,_t)),64)),bt]),l(i)==="input"?(g(),A(l(p),{key:0})):l(i)==="json"?(g(),A(l(qe),Ie({key:1,modelValue:l(E),"onUpdate:modelValue":k[5]||(k[5]=w=>K(E)?E.value=w:null),class:[l(b)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},_.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(l(p),{key:1}))])):j("",!0),l(a)?l(e)?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:I(()=>[Y(" Running... ")]),_:1})):(g(),$(B,{key:3},[h("div",kt,[Ot,l(d).error?(g(),A(ne,{key:0,n:"red"},{default:I(()=>[Y(" Error ")]),_:1})):j("",!0),O(ne,{n:l(d).error?"orange":"green",textContent:N(l(d).statusCode)},null,8,["n","textContent"]),l(d).contentType?(g(),$("code",Tt,N(l(d).contentType),1)):j("",!0),xt,St,O(ne,{n:"green"},{default:I(()=>[Y(N(l(d).fetchTime)+" ms ",1)]),_:1})]),O(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:l(y),lang:l(t)},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:I(()=>[O(M,{n:"primary",onClick:z},{default:I(()=>[O(J,{icon:"carbon:send"}),Y(" Run task ")]),_:1})]),_:1}))])}}}),Xt={"flex-none":"","text-left":""},Dt={flex:"","items-center":"","text-sm":"","font-mono":""},Et=h("div",{"x-divider":""},null,-1),me=ee({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(q){const L=H(!0),R=re();return(T,E)=>{const X=oe,x=me;return g(),$("div",null,[h("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:F([{"bg-active":l(R)===T.item.name}]),style:Re({paddingLeft:`calc(0.5rem + ${T.index*1.5}em)`}),onClick:E[0]||(E[0]=p=>{L.value=!l(L),R.value=T.item.name})},[h("div",Xt,[T.item.type==="collection"?(g(),A(X,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l(L)?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),h("span",Dt,[T.item.type==="collection"?(g(),A(X,{key:0,title:`${T.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(X,{key:1,icon:"carbon:play",ml3:"",mr1:""})),Y(" "+N(T.item.name),1)])],6),Et,l(L)?Ne(T.$slots,"default",{key:0},()=>[(g(!0),$(B,null,Z(T.item.tasks,p=>(g(),A(x,{key:p.name,item:p,index:T.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),Mt={flex:"~ gap1","text-sm":""},Ct={key:0,op50:""},It={op50:""},$t=h("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1),Ut=h("span",{op75:""},"Select a task to start",-1),Lt=h("div",{p4:"",border:"b base"},[h("span",{"text-lg":""},"Default Inputs"),h("br"),h("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1),Gt=ee({__name:"server-tasks",setup(q){const L=H(!1),R=Ae(),T=U(()=>Object.keys(R.value?.tasks??{}).map(r=>({name:r,...R.value.tasks[r],type:"task"}))),E=U(()=>Object.entries(R.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),X=re(),{view:x,selectedTask:p,inputDefaults:b}=ue("serverTasks"),o=U(()=>{!X.value&&p.value&&(X.value=p.value.name);const r=T.value.find(n=>n.name===X.value);return X.value!==p.value?.name&&r&&(p.value=r),r}),d=H(""),y=U(()=>new Ve(T.value,{keys:["key","description"],shouldSort:!0})),t=U(()=>d.value?y.value.search(d.value).map(n=>n.item):T.value),e=U(()=>{const r=[],n=(i,u)=>{i.tasks||=[],i.tasks.push(u)},s=(i,u)=>{const v=u?u.tasks?.find(m=>m.name===i):r.find(m=>m.name===i);if(v)return{...v,type:"collection"};const c={name:i,handler:i,description:"",type:"collection",tasks:[]};return u?n(u,c):r.push(c),c};return t.value.forEach(i=>{let u;const v={...i,type:"task"},m=i.name.split(":").concat();m.length>0&&m[m.length-1].includes(".")&&m.pop(),m.forEach(f=>{u=s(f,u)}),u?n(u,v):r.push(v)}),r});function a(){x.value=x.value==="tree"?"list":"tree"}return(r,n)=>{const s=ce,i=He,u=at,v=je,c=wt,m=We,f=fe,C=de,S=Pe,W=Ye,V=le("tooltip");return g(),$(B,null,[O(v,{"storage-key":"tab-server-tasks"},{left:I(()=>[O(v,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:I(()=>[O(i,{search:l(d),"onUpdate:search":n[1]||(n[1]=D=>K(d)?d.value=D:null),pb2:""},{actions:I(()=>[G(O(s,{"text-lg":"",icon:l(x)==="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:n[0]||(n[0]=D=>L.value=!l(L))},null,512),[[V,"Default Inputs"]])]),default:I(()=>[h("div",Mt,[l(d)?(g(),$("span",Ct,N(l(t).length)+" matched · ",1)):j("",!0),h("span",It,N(l(T)?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),$(B,null,Z(l(x)==="tree"?l(e):l(t),D=>(g(),A(me,{key:D.name,item:D},null,8,["item"]))),128))]),right:I(()=>[$t,h("div",null,[h("ul",null,[(g(!0),$(B,null,Z(l(E),D=>(g(),$("li",{key:D.cron},[O(u,{collection:D},null,8,["collection"])]))),128))])])]),_:1})]),right:I(()=>[(g(),A(Be,{max:10},[l(o)?(g(),A(c,{key:l(o).name,task:l(o),onOpenDefaultInput:n[2]||(n[2]=D=>L.value=!0)},null,8,["task"])):j("",!0)],1024)),l(o)?j("",!0):(g(),A(f,{key:0},{default:I(()=>[O(m,{px6:"",py2:""},{default:I(()=>[Ut]),_:1})]),_:1}))]),_:1}),O(W,{modelValue:l(L),"onUpdate:modelValue":n[4]||(n[4]=D=>K(L)?L.value=D:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=D=>L.value=!1)},{default:I(()=>[h("div",null,[Lt,O(S,{text:`Query ${l(b).query.length?`(${l(b).query.length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in r?r.ServerRouteTabIcons:l(he)).query},{default:I(()=>[O(C,{modelValue:l(b).query,"onUpdate:modelValue":n[3]||(n[3]=D=>l(b).query=D),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Gt as default};
|
|
1
|
+
import{bP as Oe,d as ee,bQ as re,r as H,a as U,o as g,m as $,k as h,i as O,f as l,t as N,F as B,n as Z,G as F,p as j,a6 as oe,ak as ue,bL as Te,ao as xe,ab as Se,aA as se,ac as we,aD as Xe,b2 as De,bM as Ee,e as Me,a2 as le,I as G,j as I,v as Y,bI as Ce,h as A,l as K,ay as Ie,V as $e,_ as ce,X as Ue,A as fe,an as Le,a9 as Re,aa as Ne,bR as Ae,ah as Ve,U as je,bO as Be,at as We}from"./ciodjZaS.js";import{_ as He}from"./D4Ks82zD.js";import{_ as pe}from"./Bi99gj7u.js";import{_ as de}from"./BHBvn5Xs.js";import{_ as ze}from"./BZvh3yot.js";import{S as he}from"./BcJws1i5.js";import{e as qe}from"./BMUgLter.js";import{_ as Pe}from"./DwdKwQHN.js";import{_ as Ye}from"./DKlNNSWk.js";import"./BWPbreBU.js";import"./CjFkCrIW.js";import"./yFeWtr-M.js";import"./zLQhdF7m.js";var ve={exports:{}};(function(q,L){(function(T,E){q.exports=E()})(globalThis,()=>(()=>{var R={794:(x,p,b)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=b(586),d=function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(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!==""});r.length===0&&r.push("*"),r.sort(function(s,i){return s!==null&&i!==null?s-i:0}),e[a]=r.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 n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(c){var m=c.replace(/\D/,""),f=m;return e.dayOfWeekStartIndexZero?m=="7"&&(f="0"):f=(parseInt(m)-1).toString(),c.replace(m,f)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(c){var m=c.replace(/\D/,""),f=m;return e.monthStartIndexZero&&(f=(parseInt(m)+1).toString()),c.replace(m,f)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in n)t[4]=t[4].replace(new RegExp(s,"gi"),n[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(c){return c!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var u=null;switch(i){case 4:u="12";break;case 5:u="6";break;case 6:u="9999";break;default:u=null;break}if(u!==null){var v=t[i].split("/");t[i]="".concat(v[0],"-").concat(u,"/").concat(v[1])}}},y.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},y.prototype.validateRange=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.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(),"'"))},y}();p.CronParser=d},728:(x,p,b)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=b(910),d=b(794),y=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,s=n===void 0?!0:n,i=r.verbose,u=i===void 0?!1:i,v=r.dayOfWeekStartIndexZero,c=v===void 0?!0:v,m=r.monthStartIndexZero,f=m===void 0?!1:m,C=r.use24HourTimeFormat,S=r.locale,W=S===void 0?null:S,V=r.tzOffset,D=V===void 0?0:V,z={throwExceptionOnParseError:s,verbose:u,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:C,locale:W,tzOffset:D},te=new t(e,z);return te.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 d.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=a.parse();var r=this.getTimeOfDayDescription(),n=this.getDayOfMonthDescription(),s=this.getMonthDescription(),i=this.getDayOfWeekDescription(),u=this.getYearDescription();e+=r+n+i+s+u,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],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var s=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,s[0],""),this.formatTime(r,s[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var u=0;u<i.length;u++)n+=" ",n+=this.formatTime(i[u],a,""),u<i.length-2&&(n+=","),u==i.length-2&&(n+=this.i18n.spaceAnd())}else{var v=this.getSecondsDescription(),c=this.getMinutesDescription(),m=this.getHoursDescription();if(n+=v,n&&c&&(n+=", "),n+=c,c===m)return n;n&&m&&(n+=", "),n+=m}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(s){return s},function(s){return o.StringUtilities.format(e.i18n.everyX0Minutes(s),s)},function(s){return e.i18n.minutesX0ThroughX1PastTheHour()},function(s){try{return s=="0"&&r.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 n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=this.getSegmentDescription(a,this.i18n.everyHour(),function(i){return e.formatTime(i,"0","")},function(i){return o.StringUtilities.format(e.i18n.everyX0Hours(i),i)},function(i){return e.i18n.betweenX0AndX1()},function(i){return e.i18n.atX0()});if(r&&a.includes("-")&&this.expressionParts[1]!="0"){var n=Array.from(r.matchAll(/:00/g));if(n.length>1){var s=n[n.length-1].index;r=r.substring(0,s)+":59"+r.substring(s+3)}}return r},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,s){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var u=parseInt(i);if(e.options.tzOffset){var v=e.expressionParts[2],c=parseInt(v)+(e.options.tzOffset?e.options.tzOffset:0);c>=24?u++:c<0&&u--,u>6?u=0:u<0&&(u=6)}var m=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(s)[u]:a[u];if(n.indexOf("#")>-1){var f=null,C=n.substring(n.indexOf("#")+1),S=n.substring(0,n.indexOf("#"));switch(C){case"1":f=e.i18n.first(S);break;case"2":f=e.i18n.second(S);break;case"3":f=e.i18n.third(S);break;case"4":f=e.i18n.fourth(S);break;case"5":f=e.i18n.fifth(S);break}m=f+" "+m}return m},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var s=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(s):e.i18n.commaX0ThroughX1(s)},function(n){var s=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1);s=e.i18n.commaOnThe(i).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)s=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var u=e.expressionParts[3]!="*";s=u?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return s}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,s){return s&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(s)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var s=parseInt(n[0].replace("W","")),i=s==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var u=r.match(/L-(\d{1,2})/);if(u){var v=u[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(v),v);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(c){return c=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),c):c},function(c){return c=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(c)},function(c){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(c)},function(c){return e.i18n.commaOnDayX0OfTheMonth(c)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,s,i){var u=null,v=e.indexOf("/")>-1,c=e.indexOf("-")>-1,m=e.indexOf(",")>-1;if(!e)u="";else if(e==="*")u=a;else if(!v&&!c&&!m)u=o.StringUtilities.format(i(e),r(e));else if(m){for(var f=e.split(","),C="",S=0;S<f.length;S++)if(S>0&&f.length>2&&(C+=",",S<f.length-1&&(C+=" ")),S>0&&f.length>1&&(S==f.length-1||f.length==2)&&(C+="".concat(this.i18n.spaceAnd()," ")),f[S].indexOf("/")>-1||f[S].indexOf("-")>-1){var W=f[S].indexOf("-")>-1&&f[S].indexOf("/")==-1,V=this.getSegmentDescription(f[S],a,r,n,W?this.i18n.commaX0ThroughX1:s,i);W&&(V=V.replace(", ","")),C+=V}else v?C+=this.getSegmentDescription(f[S],a,r,n,s,i):C+=r(f[S]);v?u=C:u=o.StringUtilities.format(i(e),C)}else if(v){var f=e.split("/");if(u=o.StringUtilities.format(n(f[1]),f[1]),f[0].indexOf("-")>-1){var D=this.generateRangeSegmentDescription(f[0],s,r);D.indexOf(", ")!=0&&(u+=", "),u+=D}else if(f[0].indexOf("*")==-1){var z=o.StringUtilities.format(i(f[0]),r(f[0]));z=z.replace(", ",""),u+=o.StringUtilities.format(this.i18n.commaStartingX0(),z)}}else c&&(u=this.generateRangeSegmentDescription(e,s,r));return u},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",s=e.split("-"),i=r(s[0],1),u=r(s[1],2),v=a(e);return n+=o.StringUtilities.format(v,i,u),n},t.prototype.formatTime=function(e,a,r){var n=0,s=0;this.options.tzOffset&&(n=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)+n,u=parseInt(a)+s;u>=60?(u-=60,i+=1):u<0&&(u+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var v="",c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),v=c?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var m="";return r&&(m=":".concat(("00"+r).substring(r.length))),"".concat(c?v:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+u.toString()).substring(u.toString().length)).concat(m).concat(c?"":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=y},336:(x,p,b)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=b(751),d=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=d},751:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var b=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o}();p.en=b},586:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function b(d,y){if(!d)throw new Error(y)}var o=function(){function d(){}return d.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},d.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},d.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},d.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);b(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},d.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);b(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},d.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);b(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},d}();p.default=o},910:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var b=function(){function o(){}return o.format=function(d){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return d.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(d,y){return y.some(function(t){return d.indexOf(t)>-1})},o}();p.StringUtilities=b}},T={};function E(x){var p=T[x];if(p!==void 0)return p.exports;var b=T[x]={exports:{}};return R[x](b,b.exports,E),b.exports}var X={};return(()=>{var x=X;Object.defineProperty(x,"__esModule",{value:!0}),x.toString=void 0;var p=E(728),b=E(336);p.ExpressionDescriptor.initialize(new b.enLocaleLoader),x.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;x.toString=o})(),X})())})(ve);var Fe=ve.exports;const Ge=Oe(Fe),Ze=["title"],Je={"flex-none":"","text-left":""},Qe={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},Ke={class:"truncate"},et={"text-xs":"",op50:""},tt=h("div",{"x-divider":""},null,-1),nt={key:0},rt=["onClick"],ot=h("div",{"x-divider":""},null,-1),at=ee({__name:"CronCollection",props:{collection:{}},setup(q){const L=q,R=re(),T=H(!0),E=U(()=>Ge.toString(L.collection.cron));return(X,x)=>{const p=oe,b=pe;return g(),$("div",null,[h("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:l(E),onClick:x[0]||(x[0]=o=>T.value=!l(T))},[h("div",Je,[O(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l(T)?90:0,transition:""},null,8,["transform-rotate"])]),h("span",Qe,[O(b,{class:"font-mono n-primary",textContent:N(X.collection.cron)},null,8,["textContent"]),h("span",Ke,N(l(E)),1),h("span",et,"("+N(X.collection.tasks.length)+")",1)])],8,Ze),tt,l(T)?(g(),$("ul",nt,[(g(!0),$(B,null,Z(X.collection.tasks,o=>(g(),$("li",{key:o},[h("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:F([{"bg-active":l(R)===o}]),onClick:d=>R.value=o},N(o),11,rt),ot]))),128))])):j("",!0)])}}}),it={"h-full":"","w-full":"",flex:"~ col"},st={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},ut={flex:"~ gap2 items-center"},lt={relative:"","w-full":""},ct={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ft={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},pt={class:"hidden md:block"},dt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},ht=h("div",{"w-5":"","x-divider":""},null,-1),vt=h("div",{"flex-none":""}," Default Inputs ",-1),mt=h("div",{"x-divider":""},null,-1),yt={key:0,border:"b base",relative:"","n-code-block":""},gt={flex:"~ wrap","w-full":""},_t=["onClick"],bt=h("div",{border:"b base","flex-auto":""},null,-1),kt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Ot=h("div",null,"Result",-1),Tt={key:1,"text-xs":"",op50:""},xt=h("div",{"flex-auto":""},null,-1),St=h("div",{op50:""}," Tasks finished in ",-1),wt=ee({__name:"ServerTaskDetails",props:{task:{}},emits:["open-default-input"],setup(q,{emit:L}){const R=q,T=L,E=H({payload:{}}),{inputDefaults:X}=ue("serverRoutes"),[x,p]=Te(),b=xe(),o=Se(),d=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=U(()=>JSON.stringify(d.data,null,2)),t=U(()=>d.contentType.includes("application/json")?"json":"text"),e=H(!1),a=H(!1),r=we(),n=H(),s=["json"],i=H(s[0]),u=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),v=U({get:()=>u[n.value],set:_=>{u[n.value]=_}}),c=U(()=>({...D(X.value.query),...D(u.query)})),m=U(()=>({...D(X.value.headers)})),f=U(()=>Object.keys(E.value?.payload??{}).length?{...E.value}:void 0),C=U(()=>f.value?"POST":"GET"),S=U(()=>{let _=window?.location.origin;return _.charAt(_.length-1)==="/"&&(_=_.slice(0,-1)),_}),W=U(()=>{let _=new URLSearchParams(c.value).toString();_&&(_=`?${_}`);const k=`/_nitro/tasks/${R.task.name}${_}`;let M=o.value?.app.baseURL||"";return(M==="./"||M===".")&&(M=""),M.endsWith("/")&&(M=M.slice(0,-1)),M+k}),V=U(()=>S.value+W.value);function D(_){const k=Object.fromEntries(_.filter(({active:M,key:P,value:J})=>M&&P&&J!==void 0).map(({key:M,value:P})=>[M,P]));return Object.entries(k).length?k:void 0}async function z(){a.value=!0,e.value=!0;const _=Date.now();$e("server-tasks:run",{method:C.value});try{d.data=await $fetch(V.value,{method:"POST",headers:m.value,query:c.value,body:f.value,onResponse({response:k}){d.contentType=(k.headers.get("content-type")||"").toString().toLowerCase().trim(),d.statusCode=k.status,d.error=void 0},onResponseError(k){d.error=k.response._data,d.data=k.response._data}})}catch{}e.value=!1,d.fetchTime=Date.now()-_}const te=U(()=>{const _=[];return _.push({name:"Query",slug:"query",length:u.query.length}),_.push({name:"Body",slug:"body",length:u.body.length}),_});Xe(()=>{if(i.value==="json"&&typeof E.value=="string")try{E.value=JSON.parse(E.value)}catch{}});const ae=De("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Ee([u,n],()=>{const _=ae.value?.find(k=>k.task===R.task.name);if(_){n.value||(n.value=_.tab),_.tab!==n.value&&(_.tab=n.value);const{body:k,query:M,headers:P}=_.inputs;Object.assign(u,{body:k,query:M,headers:P})}else{const k={task:R.task.name,tab:"query",inputs:u};ae.value.push(k),n.value||(n.value=k.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Me();return(_,k)=>{const M=ce,P=Ue,J=oe,ie=de,ge=fe,_e=Le,ne=pe,be=ze,Q=le("tooltip");return g(),$("div",it,[h("div",st,[h("div",ut,[G((g(),$("div",null,[O(M,{class:F(["n-badge-base n-sm",("getRequestMethodClass"in _?_.getRequestMethodClass:l(Ce))(l(C))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:I(()=>[Y(N(l(C)),1)]),_:1},8,["class"])])),[[Q,`Method is ${l(C)} as ${l(C)==="GET"?"no":""} json body is sent`]]),h("div",lt,[O(P,{"model-value":l(W),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),h("div",ct,[G(O(M,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:k[0]||(k[0]=w=>l(ye)(l(V),"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(O(M,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:k[1]||(k[1]=w=>l(r)(_.task.handler))},null,512),[[Q,"Open in Editor"]])])]),O(M,{"h-full":"",n:"primary solid",onClick:z},{default:I(()=>[O(J,{icon:"carbon:send"})]),_:1})])]),h("div",ft,[(g(!0),$(B,null,Z(l(te),w=>G((g(),A(M,{key:w.slug,class:F(l(n)===w.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=w.slug},{default:I(()=>[O(J,{icon:("ServerRouteTabIcons"in _?_.ServerRouteTabIcons:l(he))[w.slug]},null,8,["icon"]),h("div",pt,[Y(N(w.name)+" "+N(w?.length?`(${w.length})`:"")+" ",1),h("span",null,N(l(X)[w.slug]?.length?`(${l(X)[w.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,w.name]])),128))]),O(l(x),null,{default:I(()=>[O(ie,{modelValue:l(v),"onUpdate:modelValue":k[4]||(k[4]=w=>K(v)?v.value=w:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:I(()=>[l(X)[l(n)]?.length?(g(),$(B,{key:0},[h("div",dt,[ht,vt,O(M,{icon:"i-carbon-edit",border:!1,onClick:k[2]||(k[2]=w=>T("open-default-input"))}),mt]),O(ie,{modelValue:l(X)[l(n)],"onUpdate:modelValue":k[3]||(k[3]=w=>l(X)[l(n)]=w),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),l(v)?(g(),$("div",yt,[l(n)==="body"?(g(),$(B,{key:0},[h("div",gt,[(g(),$(B,null,Z(s,w=>h("button",{key:w,px4:"",py2:"",border:"r base",hover:"bg-active",class:F({"border-b":w!==l(i)}),onClick:ke=>i.value=w},[h("div",{class:F({op30:w!==l(i)}),"font-mono":""},N(w),3)],10,_t)),64)),bt]),l(i)==="input"?(g(),A(l(p),{key:0})):l(i)==="json"?(g(),A(l(qe),Ie({key:1,modelValue:l(E),"onUpdate:modelValue":k[5]||(k[5]=w=>K(E)?E.value=w:null),class:[l(b)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},_.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(l(p),{key:1}))])):j("",!0),l(a)?l(e)?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:I(()=>[Y(" Running... ")]),_:1})):(g(),$(B,{key:3},[h("div",kt,[Ot,l(d).error?(g(),A(ne,{key:0,n:"red"},{default:I(()=>[Y(" Error ")]),_:1})):j("",!0),O(ne,{n:l(d).error?"orange":"green",textContent:N(l(d).statusCode)},null,8,["n","textContent"]),l(d).contentType?(g(),$("code",Tt,N(l(d).contentType),1)):j("",!0),xt,St,O(ne,{n:"green"},{default:I(()=>[Y(N(l(d).fetchTime)+" ms ",1)]),_:1})]),O(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:l(y),lang:l(t)},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:I(()=>[O(M,{n:"primary",onClick:z},{default:I(()=>[O(J,{icon:"carbon:send"}),Y(" Run task ")]),_:1})]),_:1}))])}}}),Xt={"flex-none":"","text-left":""},Dt={flex:"","items-center":"","text-sm":"","font-mono":""},Et=h("div",{"x-divider":""},null,-1),me=ee({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(q){const L=H(!0),R=re();return(T,E)=>{const X=oe,x=me;return g(),$("div",null,[h("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:F([{"bg-active":l(R)===T.item.name}]),style:Re({paddingLeft:`calc(0.5rem + ${T.index*1.5}em)`}),onClick:E[0]||(E[0]=p=>{L.value=!l(L),R.value=T.item.name})},[h("div",Xt,[T.item.type==="collection"?(g(),A(X,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l(L)?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),h("span",Dt,[T.item.type==="collection"?(g(),A(X,{key:0,title:`${T.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(X,{key:1,icon:"carbon:play",ml3:"",mr1:""})),Y(" "+N(T.item.name),1)])],6),Et,l(L)?Ne(T.$slots,"default",{key:0},()=>[(g(!0),$(B,null,Z(T.item.tasks,p=>(g(),A(x,{key:p.name,item:p,index:T.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),Mt={flex:"~ gap1","text-sm":""},Ct={key:0,op50:""},It={op50:""},$t=h("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1),Ut=h("span",{op75:""},"Select a task to start",-1),Lt=h("div",{p4:"",border:"b base"},[h("span",{"text-lg":""},"Default Inputs"),h("br"),h("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1),Gt=ee({__name:"server-tasks",setup(q){const L=H(!1),R=Ae(),T=U(()=>Object.keys(R.value?.tasks??{}).map(r=>({name:r,...R.value.tasks[r],type:"task"}))),E=U(()=>Object.entries(R.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),X=re(),{view:x,selectedTask:p,inputDefaults:b}=ue("serverTasks"),o=U(()=>{!X.value&&p.value&&(X.value=p.value.name);const r=T.value.find(n=>n.name===X.value);return X.value!==p.value?.name&&r&&(p.value=r),r}),d=H(""),y=U(()=>new Ve(T.value,{keys:["key","description"],shouldSort:!0})),t=U(()=>d.value?y.value.search(d.value).map(n=>n.item):T.value),e=U(()=>{const r=[],n=(i,u)=>{i.tasks||=[],i.tasks.push(u)},s=(i,u)=>{const v=u?u.tasks?.find(m=>m.name===i):r.find(m=>m.name===i);if(v)return{...v,type:"collection"};const c={name:i,handler:i,description:"",type:"collection",tasks:[]};return u?n(u,c):r.push(c),c};return t.value.forEach(i=>{let u;const v={...i,type:"task"},m=i.name.split(":").concat();m.length>0&&m[m.length-1].includes(".")&&m.pop(),m.forEach(f=>{u=s(f,u)}),u?n(u,v):r.push(v)}),r});function a(){x.value=x.value==="tree"?"list":"tree"}return(r,n)=>{const s=ce,i=He,u=at,v=je,c=wt,m=We,f=fe,C=de,S=Pe,W=Ye,V=le("tooltip");return g(),$(B,null,[O(v,{"storage-key":"tab-server-tasks"},{left:I(()=>[O(v,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:I(()=>[O(i,{search:l(d),"onUpdate:search":n[1]||(n[1]=D=>K(d)?d.value=D:null),pb2:""},{actions:I(()=>[G(O(s,{"text-lg":"",icon:l(x)==="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:n[0]||(n[0]=D=>L.value=!l(L))},null,512),[[V,"Default Inputs"]])]),default:I(()=>[h("div",Mt,[l(d)?(g(),$("span",Ct,N(l(t).length)+" matched · ",1)):j("",!0),h("span",It,N(l(T)?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),$(B,null,Z(l(x)==="tree"?l(e):l(t),D=>(g(),A(me,{key:D.name,item:D},null,8,["item"]))),128))]),right:I(()=>[$t,h("div",null,[h("ul",null,[(g(!0),$(B,null,Z(l(E),D=>(g(),$("li",{key:D.cron},[O(u,{collection:D},null,8,["collection"])]))),128))])])]),_:1})]),right:I(()=>[(g(),A(Be,{max:10},[l(o)?(g(),A(c,{key:l(o).name,task:l(o),onOpenDefaultInput:n[2]||(n[2]=D=>L.value=!0)},null,8,["task"])):j("",!0)],1024)),l(o)?j("",!0):(g(),A(f,{key:0},{default:I(()=>[O(m,{px6:"",py2:""},{default:I(()=>[Ut]),_:1})]),_:1}))]),_:1}),O(W,{modelValue:l(L),"onUpdate:modelValue":n[4]||(n[4]=D=>K(L)?L.value=D:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=D=>L.value=!1)},{default:I(()=>[h("div",null,[Lt,O(S,{text:`Query ${l(b).query.length?`(${l(b).query.length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in r?r.ServerRouteTabIcons:l(he)).query},{default:I(()=>[O(C,{modelValue:l(b).query,"onUpdate:modelValue":n[3]||(n[3]=D=>l(b).query=D),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Gt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./
|
|
1
|
+
import{_ as S}from"./zjxoDR5L.js";import{_ as D}from"./Bi99gj7u.js";import{_ as C}from"./CxLTb5RC.js";import{d as v,ab as B,a as x,bi as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,au as F,aa as N,a6 as H,q as I,j as g,v as y,bk as E,am as W,F as k,n as j,G as L}from"./ciodjZaS.js";import{_ as M}from"./DwdKwQHN.js";import{_ as q}from"./CLVHkiJk.js";import"./zLQhdF7m.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")]),_:1}),et])}}},ot=nt,st={pt4:""},it={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},at=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),rt=t("span",{op50:""},"Total execution time:",-1),ft=v({__name:"plugins",setup(p){const e=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=ot,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",st,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",it,[at,rt,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{ft as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{d as ye,r as A,bH as Re,o as i,m as b,k as c,G as B,h as $,f as e,bI as ie,t as U,p as O,v as Q,a9 as Qe,aa as Xe,F as L,n as G,a6 as Ee,bz as he,w as De,by as je,bx as Ye,bJ as Ze,bK as et,aC as tt,bL as ot,ao as nt,ab as st,am as at,aA as ve,a as D,ac as rt,ak as Ve,aD as lt,b2 as it,bM as ut,e as ct,a2 as Ie,j as S,l as Z,i as m,I as ee,ay as dt,V as pt,_ as Ue,X as ft,A as Oe,an as mt,bN as vt,ah as ht,U as yt,bO as _t,at as gt}from"./ciodjZaS.js";import{_ as bt}from"./D4Ks82zD.js";import{_ as Ne}from"./Bi99gj7u.js";import{_ as kt}from"./CjFkCrIW.js";import{_ as Le}from"./BHBvn5Xs.js";import{_ as wt}from"./DN0HCnq5.js";import{_ as Ct}from"./B-wfK0SS.js";import{_ as xt}from"./BZvh3yot.js";import{C as xe,S as Ae}from"./BcJws1i5.js";import{e as St}from"./BMUgLter.js";import{_ as Tt}from"./DwdKwQHN.js";import{_ as $t}from"./DKlNNSWk.js";import"./BWPbreBU.js";import"./yFeWtr-M.js";import"./zLQhdF7m.js";const re=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Rt(t,a){if(typeof t!="string")throw new TypeError("argument str must be a string");const n={},y=(a||{}).decode||jt;let v=0;for(;v<t.length;){const d=t.indexOf("=",v);if(d===-1)break;let h=t.indexOf(";",v);if(h===-1)h=t.length;else if(h<d){v=t.lastIndexOf(";",d-1)+1;continue}const _=t.slice(v,d).trim();if(n[_]===void 0){let u=t.slice(d+1,h).trim();u.codePointAt(0)===34&&(u=u.slice(1,-1)),n[_]=Dt(u,y)}v=h+1}return n}function Se(t,a,n){const o=n||{},y=o.encode||Vt;if(typeof y!="function")throw new TypeError("option encode is invalid");if(!re.test(t))throw new TypeError("argument name is invalid");const v=y(a);if(v&&!re.test(v))throw new TypeError("argument val is invalid");let d=t+"="+v;if(o.maxAge!==void 0&&o.maxAge!==null){const h=o.maxAge-0;if(Number.isNaN(h)||!Number.isFinite(h))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(h)}if(o.domain){if(!re.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!re.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Et(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 Et(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}function Dt(t,a){try{return a(t)}catch{return t}}function jt(t){return t.includes("%")?decodeURIComponent(t):t}function Vt(t){return encodeURIComponent(t)}const It=c("div",{"x-divider":""},null,-1),Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(t){const a=A(!0),n=Re();return(o,y)=>{const v=Ee,d=Ne,h=Pe;return i(),b("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:B([{"bg-active":e(n)===o.item.filepath}]),style:Qe({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:y[0]||(y[0]=_=>{a.value=!e(a),n.value=o.item.filepath})},[c("div",{class:B({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(i(),$(v,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(a)?90:0,transition:""},null,8,["transform-rotate"])):(i(),$(d,{key:1,class:B(("getRequestMethodClass"in o?o.getRequestMethodClass:e(ie))(o.item.method||"*")),textContent:U((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:B({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(i(),$(v,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):O("",!0),Q(" "+U(o.item.route),1)],2)],6),It,e(a)?Xe(o.$slots,"default",{key:0},()=>[(i(!0),b(L,null,G(o.item.routes,_=>(i(),$(h,{key:_.filepath,item:_,index:o.index+1},null,8,["item","index"]))),128))]):O("",!0)])}}});function q(t){if(typeof t!="object")return t;var a,n,o=Object.prototype.toString.call(t);if(o==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){n=new t.constructor;for(a in t)t.hasOwnProperty(a)&&n[a]!==t[a]&&(n[a]=q(t[a]))}else{n={};for(a in t)a==="__proto__"?Object.defineProperty(n,a,{value:q(t[a]),configurable:!0,enumerable:!0,writable:!0}):n[a]=q(t[a])}return n}if(o==="[object Array]"){for(a=t.length,n=Array(a);a--;)n[a]=q(t[a]);return n}return o==="[object Set]"?(n=new Set,t.forEach(function(y){n.add(q(y))}),n):o==="[object Map]"?(n=new Map,t.forEach(function(y,v){n.set(q(v),q(y))}),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(q(t.buffer)):o==="[object ArrayBuffer]"?t.slice(0):o.slice(-6)==="Array]"?new t.constructor(t):t}const Ut={path:"/",watch:!0,decode:t=>Ze(decodeURIComponent(t)),encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},le=window.cookieStore;function Ot(t,a){const n={...Ut,...a},o=Te(n)||{};let y;n.maxAge!==void 0?y=n.maxAge*1e3:n.expires&&(y=n.expires.getTime()-Date.now());const v=y!==void 0&&y<=0,d=q(v?void 0:o[t]??n.default?.()),h=y&&!v?At(d,y,n.watch&&n.watch!=="shallow"):A(d);{let _=null;try{!le&&typeof BroadcastChannel<"u"&&(_=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const u=()=>{n.readonly||et(h.value,o[t])||(Lt(t,h.value,n),o[t]=q(h.value),_?.postMessage({value:n.encode(h.value)}))},j=P=>{const x=P.refresh?Te(n)?.[t]:n.decode(P.value);I=!0,h.value=x,o[t]=q(x),tt(()=>{I=!1})};let I=!1;const F=!!je();if(F&&he(()=>{I=!0,u(),_?.close()}),le){const P=x=>{const w=x.changed.find(N=>N.name===t);w&&j({value:w.value})};le.addEventListener("change",P),F&&he(()=>le.removeEventListener("change",P))}else _&&(_.onmessage=({data:P})=>j(P));n.watch?De(h,()=>{I||u()},{deep:n.watch!=="shallow"}):u()}return h}function Te(t={}){return Rt(document.cookie,t)}function Nt(t,a,n={}){return a==null?Se(t,a,{...n,maxAge:-1}):Se(t,a,n)}function Lt(t,a,n={}){document.cookie=Nt(t,a,n)}const $e=2147483647;function At(t,a,n){let o,y,v=0;const d=n?A(t):{value:t};return je()&&he(()=>{y?.(),clearTimeout(o)}),Ye((h,_)=>{n&&(y=De(d,_));function u(){v=0,clearTimeout(o);const j=a-v,I=j<$e?j:$e;o=setTimeout(()=>{if(v+=I,v<a)return u();d.value=void 0,_()},I)}return{get(){return h(),d.value},set(j){u(),d.value=j,_()}}})}const Pt={"h-full":"","w-full":"",flex:"~ col"},qt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Mt={flex:"~ gap2 items-center"},Bt={relative:"","w-full":""},Ft={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Ht={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},zt={class:"hidden md:block"},Gt=c("div",{"flex-auto":""},null,-1),Jt=c("div",{"text-xs":"",op50:""}," Send from ",-1),Wt=c("option",{value:"app"}," App ",-1),Kt=c("option",{value:"devtools"}," DevTools ",-1),Qt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Xt={"text-right":"","font-mono":""},Yt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Zt={flex:"~ gap-4"},eo={flex:"~ gap2","mb--2":"","items-center":"",op50:""},to=c("div",{"w-5":"","x-divider":""},null,-1),oo=c("div",{"flex-none":""}," Default Inputs ",-1),no=c("div",{"x-divider":""},null,-1),so={key:2},ao={key:3,border:"b base",relative:"","n-code-block":""},ro={flex:"~ wrap","w-full":""},lo=["onClick"],io=c("div",{border:"b base","flex-auto":""},null,-1),uo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},co=c("div",null,"Response",-1),po={key:1,"text-xs":"",op50:""},fo=c("div",{"flex-auto":""},null,-1),mo=c("div",{op50:""}," Request finished in ",-1),vo={key:0,"flex-auto":"","overflow-auto":""},ho={border:"~ base","h-full":"","w-full":"",rounded:""},yo=["data"],_o={key:2,"flex-auto":"","overflow-auto":"",p4:""},go={border:"~ base",rounded:""},bo=["src"],ko={key:1,controls:"",rounded:""},wo=["src"],Co=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(t,{emit:a}){const n=t,o=a,[y,v]=ot(),d=nt(),h=st(),_=at(),u=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=D(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("image")||u.contentType.includes("video")?"media":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":u.contentType.includes("application/pdf")?"pdf":"text"),I=D(()=>{if(j.value==="json")return JSON.stringify(u.data,null,2);if(j.value==="media"||j.value==="pdf"){const s=new Blob([u.data],{type:u.contentType});return URL.createObjectURL(s)}return u.data}),F=A(!1),P=A(!1),x=rt(),w=D(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),N=D(()=>w.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),g=A(n.route.method||"GET"),R=A({}),k=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=A({}),{inputDefaults:C,sendFrom:H}=Ve("serverRoutes"),J=D(()=>_?.value?.app?.$fetch?H.value:"devtools"),ue=["GET","POST","PUT","PATCH","DELETE","HEAD"],ce=["PATCH","POST","PUT","DELETE"],te=D(()=>ce.includes(g.value.toUpperCase())),p=A(),oe=["input","json"],W=A(oe[0]),ne=D({get:()=>k[p.value],set:s=>{k[p.value]=s}}),_e=D(()=>({...K(C.value.query),...K(k.query)})),ge=D(()=>({...K(C.value.headers),...K(k.headers)})),de=D(()=>te.value?W.value==="json"?{...K(C.value.body),...V.value}:{...K(C.value.body),...K(k.body)}:void 0),qe=D(()=>{let s=window?.location.origin;return s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1)),s}),se=D(()=>{let s=new URLSearchParams(_e.value).toString();s&&(s=`?${s}`);const l=(w.value?.map(E=>(E.startsWith(":")||E.startsWith("**:"))&&R.value[E]||E).join("")||"")+s;let f=h.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+l}),be=D(()=>qe.value+se.value);function K(s){const l=Object.fromEntries(s.filter(({active:f,key:E,value:T})=>f&&E&&T!==void 0).map(({key:f,value:E})=>[f,E]));return Object.entries(l).length?l:void 0}async function ke(){P.value=!0,F.value=!0;const s=Date.now(),l=J.value==="app"?_.value.app.$fetch:$fetch;pt("server-routes:fetch",{method:g.value,sendFrom:J.value});try{u.data=await l(be.value,{method:g.value.toUpperCase(),headers:ge.value,query:_e.value,body:de.value,onResponse({response:f}){u.contentType=(f.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=f.status,u.error=void 0},onResponseError(f){u.error=f.response._data,u.data=f.response._data}})}catch{}F.value=!1,u.fetchTime=Date.now()-s}const we=D(()=>{const s=[],l=[],f=Object.entries(ge.value).filter(([T,M])=>T&&M&&!(T==="Content-Type"&&M==="application/json")).map(([T,M])=>` '${T}': '${M}'`).join(`,
|
|
2
|
+
`);g.value.toUpperCase()!=="GET"&&l.push(`method: '${g.value.toUpperCase()}'`),f&&l.push(`headers: {
|
|
3
|
+
${f}
|
|
4
|
+
}`),de.value&&l.push(`body: ${JSON.stringify(de.value,null,2)}`);const E=l.length?`, {
|
|
5
|
+
${l.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(T=>` ${T}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return s.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${se.value}'${E})`}),s.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${se.value}'${E})`}),s}),X=A(Be()),z=ve({key:"",value:""}),Me=D(()=>{const s=[];return N.value.length&&s.push({name:"Params",slug:"params",length:N.value.length}),s.push({name:"Query",slug:"query",length:k.query.length}),te.value&&s.push({name:"Body",slug:"body",length:k.body.length}),s.push({name:"Headers",slug:"headers",length:k.headers.length}),s.push({name:"Cookies",slug:"cookies",length:X.value.length}),s.push({name:"Snippets",slug:"snippet"}),s});function Be(){return document.cookie.split("; ").map(s=>{const[l,f]=s.split("=");return{key:l,value:f}}).filter(s=>s.key)}function pe(s,l){if(!s)return;const f=X.value.find(T=>T.key===s),E=Ot(s);f!==void 0?l===void 0&&(X.value=X.value.filter(T=>T.key!==s)):(X.value.push({key:s,value:l}),z.key="",z.value=""),E.value=l}lt(()=>{W.value==="json"&&typeof V.value=="string"&&(V.value=JSON.parse(V.value))});const fe=it("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});ut([k,p],()=>{const s=fe.value?.find(l=>l.path===n.route.filepath);if(s){p.value||(p.value=s.tab),s.tab!==p.value&&(s.tab=p.value);const{body:l,query:f,headers:E,params:T}=s.inputs;Object.assign(k,{body:l,query:f,headers:E}),R.value=T}else{const l={path:n.route.filepath,tab:N.value.length?"params":"query",inputs:{...k,...N.value.length?{params:R.value}:{}}};fe.value.push(l),p.value||(p.value=l.tab)}},{immediate:!0,deep:!0,debounce:500});function Fe(){fe.value=[],k.body=[],k.query=[],k.headers=[],R.value={},p.value=N.value.length?"params":"query"}const He=ct();return(s,l)=>{const f=Ue,E=kt,T=ft,M=Ee,Ce=Le,ze=wt,Ge=Oe,Je=mt,me=Ne,We=Ct,Ke=xt,ae=Ie("tooltip");return i(),b("div",Pt,[c("div",qt,[c("div",Mt,[s.route.method?(i(),$(f,{key:0,class:B(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(e(g))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:S(()=>[Q(U(e(g).toUpperCase()),1)]),_:1},8,["class"])):(i(),$(E,{key:1,modelValue:e(g),"onUpdate:modelValue":l[0]||(l[0]=r=>Z(g)?g.value=r:null),class:B(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(e(g))])},{default:S(()=>[(i(),b(L,null,G(ue,r=>c("option",{key:r,class:B(("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(r))},U(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),c("div",Bt,[m(T,{"model-value":e(se),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),c("div",Ft,[ee(m(f,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:l[1]||(l[1]=r=>e(He)(e(be),"server-route-url"))},null,512),[[ae,"Copy URL"]]),ee(m(f,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:l[2]||(l[2]=r=>e(x)(s.route.filepath))},null,512),[[ae,"Open in Editor"]])])]),m(f,{"h-full":"",n:"primary solid",onClick:ke},{default:S(()=>[m(M,{icon:"carbon:send"})]),_:1})])]),c("div",Ht,[(i(!0),b(L,null,G(e(Me),r=>ee((i(),$(f,{key:r.slug,class:B(e(p)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>p.value=r.slug},{default:S(()=>[m(M,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e(Ae))[r.slug]},null,8,["icon"]),c("div",zt,[Q(U(r.name)+" "+U(r?.length?`(${r.length})`:"")+" ",1),c("span",null,U(e(C)[r.slug]?.length?`(${e(C)[r.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ae,r.name]])),128)),Gt,Jt,m(E,{modelValue:e(J),"onUpdate:modelValue":l[3]||(l[3]=r=>Z(J)?J.value=r:null),class:"n-xs",disabled:!e(_)?.app?.$fetch},{default:S(()=>[Wt,Kt]),_:1},8,["modelValue","disabled"]),ee(m(f,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Fe},null,512),[[ae,"Clear Inputs Saved Cache"]])]),e(p)==="params"?(i(),b("div",Qt,[(i(!0),b(L,null,G(e(N),r=>(i(),b(L,{key:r},[c("div",Xt,U(r),1),m(T,{modelValue:e(R)[r],"onUpdate:modelValue":Y=>e(R)[r]=Y,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):O("",!0),e(p)==="cookies"?(i(),b("div",Yt,[(i(!0),b(L,null,G(e(X),r=>(i(),b("div",{key:r.key,flex:"~ gap-4 items-center"},[m(T,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),m(T,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:Y=>pe(r.key,Y.target?.value)},null,8,["model-value","onInput"]),m(f,{title:"Delete",n:"red",onClick:Y=>pe(r.key,void 0)},{default:S(()=>[m(M,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),c("div",Zt,[m(T,{modelValue:e(z).key,"onUpdate:modelValue":l[4]||(l[4]=r=>e(z).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),m(T,{modelValue:e(z).value,"onUpdate:modelValue":l[5]||(l[5]=r=>e(z).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),m(f,{title:"Add",n:"primary",onClick:l[6]||(l[6]=r=>pe(e(z).key,e(z).value))},{default:S(()=>[m(M,{icon:"i-carbon-save"})]),_:1})])])):O("",!0),m(e(y),null,{default:S(()=>[m(Ce,{modelValue:e(ne),"onUpdate:modelValue":l[9]||(l[9]=r=>Z(ne)?ne.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:S(()=>[e(C)[e(p)]?.length?(i(),b(L,{key:0},[c("div",eo,[to,oo,m(f,{icon:"i-carbon-edit",border:!1,onClick:l[7]||(l[7]=r=>o("open-default-input"))}),no]),m(Ce,{modelValue:e(C)[e(p)],"onUpdate:modelValue":l[8]||(l[8]=r=>e(C)[e(p)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):O("",!0)]),_:1},8,["modelValue"])]),_:1}),e(p)==="snippet"?(i(),b("div",so,[e(we).length?(i(),$(ze,{key:0,"code-snippets":e(we)},null,8,["code-snippets"])):O("",!0)])):e(ne)?(i(),b("div",ao,[e(p)==="body"?(i(),b(L,{key:0},[c("div",ro,[(i(),b(L,null,G(oe,r=>c("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:B({"border-b":r!==e(W)}),onClick:Y=>W.value=r},[c("div",{class:B({op30:r!==e(W)}),"font-mono":""},U(r),3)],10,lo)),64)),io]),e(W)==="input"?(i(),$(e(v),{key:0})):e(W)==="json"?(i(),$(e(St),dt({key:1,modelValue:e(V),"onUpdate:modelValue":l[10]||(l[10]=r=>Z(V)?V.value=r:null),class:[e(d)==="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)):(i(),$(e(v),{key:1}))])):O("",!0),e(P)?e(F)?(i(),$(Je,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:S(()=>[Q(" Fetching... ")]),_:1})):(i(),b(L,{key:6},[c("div",uo,[co,e(u).error?(i(),$(me,{key:0,n:"red"},{default:S(()=>[Q(" Error ")]),_:1})):O("",!0),m(me,{n:e(u).error?"orange":"green",textContent:U(e(u).statusCode)},null,8,["n","textContent"]),e(u).contentType?(i(),b("code",po,U(e(u).contentType),1)):O("",!0),e(u).contentType==="application/json"?(i(),$(We,{key:2,getter:()=>({input:e(I)})},null,8,["getter"])):O("",!0),fo,mo,m(me,{n:"green"},{default:S(()=>[Q(U(e(u).fetchTime)+" ms ",1)]),_:1})]),e(j)==="pdf"?(i(),b("div",vo,[c("div",ho,[c("object",{data:e(I),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,yo)])])):e(j)!=="media"?(i(),$(Ke,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(I),lang:e(j)},null,8,["code","lang"])):(i(),b("div",_o,[c("div",go,[e(u).contentType.includes("image")?(i(),b("img",{key:0,rounded:"",src:e(I)},null,8,bo)):(i(),b("video",ko,[c("source",{src:e(I),type:"video/mp4"},null,8,wo)]))])]))],64)):(i(),$(Ge,{key:4},{default:S(()=>[m(f,{n:"primary",onClick:ke},{default:S(()=>[m(M,{icon:"carbon:send"}),Q(" Send request ")]),_:1})]),_:1}))])}}}),xo={flex:"~ gap1","text-sm":""},So={key:0,op50:""},To={op50:""},$o=c("span",{op75:""},"Select a route to start",-1),Ro=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),Ho=ye({__name:"server-routes",setup(t){const a=A(!1),n=vt(),o=Re(),{selectedRoute:y,view:v,inputDefaults:d}=Ve("serverRoutes"),h=D(()=>{!o.value&&y.value&&(o.value=y.value.filepath);const x=n.value?.find(w=>w.filepath===o.value);return o.value!==y.value?.filepath&&x&&(y.value=x),x}),_=A(""),u=D(()=>new ht(n.value||[],{keys:["method","route"],shouldSort:!0})),j=D(()=>n.value?_.value?u.value.search(_.value).map(w=>w.item):n.value:[]),I=D(()=>{const x=[],w=(g,R)=>{g.routes=g.routes||[],g.routes.push(R)},N=(g,R)=>{const k=R?R.routes?.find(C=>C.route===g):x.find(C=>C.route===g);if(k)return k;const V={route:g,filepath:g.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return R?w(R,V):x.push(V),V};return j.value.forEach(g=>{let R,k;const V=g.filepath.split("/"),C=V.slice(V.indexOf("server")+1);if(g.type==="runtime"){C[0]="runtime";const H=V.indexOf("dist");H!==-1&&(R=V[H-1],R&&C.splice(1,0,R))}C.length>0&&C[C.length-1].includes(".")&&C.pop(),C.forEach(H=>{k=N(H,k)}),k?w(k,g):x.push(g)}),x});function F(){v.value=v.value==="tree"?"list":"tree"}function P(x){return x.charAt(0).toUpperCase()+x.slice(1)}return(x,w)=>{const N=Ue,g=bt,R=Pe,k=Co,V=gt,C=Oe,H=yt,J=Le,ue=Tt,ce=$t,te=Ie("tooltip");return i(),b(L,null,[m(H,{"storage-key":"tab-server-routes"},{left:S(()=>[m(g,{search:e(_),"onUpdate:search":w[1]||(w[1]=p=>Z(_)?_.value=p:null),pb2:""},{actions:S(()=>[ee(m(N,{"text-lg":"",icon:e(v)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[te,"Toggle View"]]),ee(m(N,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:w[0]||(w[0]=p=>a.value=!e(a))},null,512),[[te,"Default Inputs"]])]),default:S(()=>[c("div",xo,[e(_)?(i(),b("span",So,U(e(j).length)+" matched · ",1)):O("",!0),c("span",To,U(e(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(i(!0),b(L,null,G(e(v)==="tree"?e(I):e(j),p=>(i(),$(R,{key:p.filepath,item:p},null,8,["item"]))),128))]),right:S(()=>[(i(),$(_t,{max:10},[e(h)?(i(),$(k,{key:e(h).filepath,route:e(h),onOpenDefaultInput:w[2]||(w[2]=p=>a.value=!0)},null,8,["route"])):O("",!0)],1024)),e(h)?O("",!0):(i(),$(C,{key:0},{default:S(()=>[m(V,{px6:"",py2:""},{default:S(()=>[$o]),_:1})]),_:1}))]),_:1}),m(ce,{modelValue:e(a),"onUpdate:modelValue":w[3]||(w[3]=p=>Z(a)?a.value=p:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:w[4]||(w[4]=p=>a.value=!1)},{default:S(()=>[c("div",null,[Ro,(i(!0),b(L,null,G(Object.keys(e(d)),p=>(i(),$(ue,{key:p,text:`${P(p)} ${e(d)[p].length?`(${e(d)[p].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in x?x.ServerRouteTabIcons:e(Ae))[p]},{default:S(()=>[m(J,{modelValue:e(d)[p],"onUpdate:modelValue":oe=>e(d)[p]=oe,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Ho as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as B,r as T,a as k,
|
|
1
|
+
import{d as B,r as T,a as k,au as W,f as t,o,m as s,k as e,t as $,h as y,j as x,bj 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,bk as j,b5 as X,b6 as J,ab as Q,aq as Y,b7 as Z,as as ee,l as te,ae as oe,L as ne,M as ae}from"./ciodjZaS.js";import{_ as D}from"./Bi99gj7u.js";import{_ as F}from"./zjxoDR5L.js";import{_ as se}from"./DwdKwQHN.js";import{_ as re}from"./CnW1WPg6.js";import{_ as le}from"./CLVHkiJk.js";import"./zLQhdF7m.js";import"./DwVKZd3-.js";import"./yFeWtr-M.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,{type:"submit",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=j(),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=D,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),je=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),De=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,je,De],Se={__name:"pages",setup(V,{expose:i}){return i({frontmatter:{}}),(w,m)=>(o(),s("div",Le,Fe))}},ze=Se,Ue={key:0,"h-full":"","of-auto":""},Ke={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Oe=e("span",{op50:""},"Navigate from ",-1),We={"font-mono":""},qe=e("span",{op50:""}," to ",-1),Ge={key:1,op50:""},He=e("span",null,[L("Press "),e("b",{"font-bold":""},"Enter"),L(" to navigate")],-1),Xe={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},Qe={"min-h-14":""},Ye={key:1,class:"py-4 text-center"},Ze=e("span",{op50:""},"No routes matched",-1),et=[Ze],tt={"w-full":""},ot=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),nt={mr1:""},_t=B({__name:"pages",setup(V){const i=X(),d=J(),w=Q(),m=j(),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=D,z=F,U=re,K=ze,O=le;return o(),s(v,null,[t(w)?.pages&&t(i)?(o(),s("div",Ue,[e("div",Ke,[e("div",null,[t(u)!==t(n)?(o(),s(v,{key:0},[Oe,e("span",We,$(t(u)),1),qe],64)):(o(),s("span",Ge,"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},[He,t(a).length?P("",!0):(o(),s("span",Xe," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),h(I,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:x(()=>[e("div",Qe,[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",Ye,et))])]),_: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",tt,[ot,(o(!0),s(v,null,M(t(r),C=>(o(),s("tr",{key:C.path,"h-7":""},[e("td",null,[e("span",nt,$(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{_t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"a69820c2-31c2-48f6-8161-842a62467079","timestamp":1724173134315}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"a69820c2-31c2-48f6-8161-842a62467079","timestamp":1724173134315,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|