@websublime/vite-plugin-open-api-devtools 0.4.0 → 0.5.0
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/ModelsPage-CWTC2dZx.js +629 -0
- package/dist/ModelsPage-CWTC2dZx.js.map +1 -0
- package/dist/{RoutesPage-D7H_CupP.js → RoutesPage-C2CUh7EQ.js} +6 -5
- package/dist/{RoutesPage-D7H_CupP.js.map → RoutesPage-C2CUh7EQ.js.map} +1 -1
- package/dist/{SimulatorPage-9sBeAxQI.js → SimulatorPage-BeGppUDC.js} +6 -5
- package/dist/{SimulatorPage-9sBeAxQI.js.map → SimulatorPage-BeGppUDC.js.map} +1 -1
- package/dist/{TimelinePage-CMchXIlE.js → TimelinePage-CwQC37C0.js} +25 -23
- package/dist/TimelinePage-CwQC37C0.js.map +1 -0
- package/dist/check-Yd6w1NtA.js +6 -0
- package/dist/check-Yd6w1NtA.js.map +1 -0
- package/dist/devtools.css +1 -1
- package/dist/devtools.js +1 -1
- package/dist/devtools.umd.cjs +3 -1
- package/dist/devtools.umd.cjs.map +1 -1
- package/dist/{format-CE7KDbll.js → format-mVjPq6hT.js} +11 -16
- package/dist/format-mVjPq6hT.js.map +1 -0
- package/dist/{main-AUiFaD93.js → main-BxRf_QJn.js} +5 -5
- package/dist/{main-AUiFaD93.js.map → main-BxRf_QJn.js.map} +1 -1
- package/dist/trash-2-kFFQD_yH.js +12 -0
- package/dist/trash-2-kFFQD_yH.js.map +1 -0
- package/dist/triangle-alert-jXNj-fTF.js +16 -0
- package/dist/triangle-alert-jXNj-fTF.js.map +1 -0
- package/dist/x-BkudkKl_.js +9 -0
- package/dist/x-BkudkKl_.js.map +1 -0
- package/package.json +10 -9
- package/dist/ModelsPage-D-qLEz14.js +0 -93
- package/dist/ModelsPage-D-qLEz14.js.map +0 -1
- package/dist/TimelinePage-CMchXIlE.js.map +0 -1
- package/dist/format-CE7KDbll.js.map +0 -1
- package/dist/triangle-alert-ZH4fYFnz.js +0 -24
- package/dist/triangle-alert-ZH4fYFnz.js.map +0 -1
package/dist/devtools.umd.cjs
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
(function(q,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("pinia"),require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","pinia","vue","vue-router"],G):(q=typeof globalThis<"u"?globalThis:q||self,G(q.ViteOpenApiDevtools={},q.Pinia,q.Vue,q.VueRouter))})(this,(function(q,G,e,oe){"use strict";const De=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Oe=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,l)=>l?l.toUpperCase():o.toLowerCase()),Pe=n=>{const t=Oe(n);return t.charAt(0).toUpperCase()+t.slice(1)},je=(...n)=>n.filter((t,o,l)=>!!t&&t.trim()!==""&&l.indexOf(t)===o).join(" ").trim();var se={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Qe=({size:n,strokeWidth:t=2,absoluteStrokeWidth:o,color:l,iconNode:p,name:s,class:u,..._},{slots:f})=>e.h("svg",{...se,width:n||se.width,height:n||se.height,stroke:l||se.stroke,"stroke-width":o?Number(t)*24/Number(n):t,class:je("lucide",...s?[`lucide-${De(Pe(s))}-icon`,`lucide-${De(s)}`]:["lucide-icon"]),..._},[...p.map(c=>e.h(...c)),...f.default?[f.default()]:[]]);const S=(n,t)=>(o,{slots:l})=>e.h(Qe,{...o,iconNode:t,name:n},l);const pe=S("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const j=S("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Z=S("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const we=S("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Ue=S("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const R=S("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const ue=S("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const _e=S("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const fe=S("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const ye=S("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Te=S("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const We=S("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Ge=S("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Je=S("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const he=S("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);const le=S("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Ke=S("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const ke=S("sprout",[["path",{d:"M7 20h10",key:"e6iznv"}],["path",{d:"M10 20c5.5-2.5.8-6.4 3-10",key:"161w41"}],["path",{d:"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",key:"9gtqwd"}],["path",{d:"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",key:"bkxnd2"}]]);const Ze=S("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const ge=S("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const Ee=S("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Ye=S("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const Xe=S("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);const ae=S("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const Y=S("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),ze=[{path:"/",redirect:"/routes"},{path:"/routes",name:"routes",component:()=>Promise.resolve().then(()=>On),meta:{title:"Routes",icon:"route"}},{path:"/timeline",name:"timeline",component:()=>Promise.resolve().then(()=>Ss),meta:{title:"Timeline",icon:"clock"}},{path:"/models",name:"models",component:()=>Promise.resolve().then(()=>Ps),meta:{title:"Models",icon:"database"}},{path:"/simulator",name:"simulator",component:()=>Promise.resolve().then(()=>rl),meta:{title:"Simulator",icon:"zap"}},{path:"/:pathMatch(.*)*",name:"not-found",redirect:"/routes"}],ve=oe.createRouter({history:oe.createWebHashHistory(),routes:ze}),et={class:"app"},tt={class:"app-header"},nt={class:"app-header__brand"},ot={class:"app-nav",role:"tablist","aria-label":"DevTools navigation"},st=["aria-selected","aria-current","aria-controls","onClick"],lt={class:"app-nav__label"},at={class:"app-header__status"},it={class:"connection-status"},rt={class:"connection-status__text"},ct={class:"app-main"},dt=e.defineComponent({__name:"App",setup(n){const t=oe.useRoute(),o=oe.useRouter(),l=e.computed(()=>ze.filter(c=>c.name&&c.meta?.title).map(c=>({name:c.name,path:c.path,title:c.meta?.title,icon:c.meta?.icon}))),p=e.computed(()=>t.name);function s(c){o.push(c)}const u={route:he,clock:R,database:fe,zap:Y};function _(c){return u[c]??he}const f=e.computed(()=>!1);return(c,g)=>{const $=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",et,[e.createElementVNode("header",tt,[e.createElementVNode("div",nt,[e.createVNode(e.unref(Y),{class:"app-header__logo",size:20}),g[0]||(g[0]=e.createElementVNode("span",{class:"app-header__title"},"OpenAPI DevTools",-1))]),e.createElementVNode("nav",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.name,role:"tab","aria-selected":p.value===E.name,"aria-current":p.value===E.name?"true":void 0,"aria-controls":`panel-${E.name}`,tabindex:0,class:e.normalizeClass(["app-nav__tab",{"app-nav__tab--active":p.value===E.name}]),onClick:k=>s(E.path)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(E.icon)),{size:16,class:"app-nav__icon"})),e.createElementVNode("span",lt,e.toDisplayString(E.title),1)],10,st))),128))]),e.createElementVNode("div",at,[e.createElementVNode("div",it,[e.createElementVNode("span",{class:e.normalizeClass(["connection-status__dot",f.value?"connection-status__dot--connected":"connection-status__dot--disconnected"])},null,2),e.createElementVNode("span",rt,e.toDisplayString(f.value?"Connected":"Disconnected"),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value?e.unref(Xe):e.unref(Ye)),{size:14,class:"connection-status__icon"}))])])]),e.createElementVNode("main",ct,[e.createVNode($,null,{default:e.withCtx(({Component:E})=>[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E)))]),_:2},1024)]),_:1})])])}}}),L=(n,t)=>{const o=n.__vccOpts||n;for(const[l,p]of t)o[l]=p;return o},mt=L(dt,[["__scopeId","data-v-513332df"]]),pt=G.defineStore("registry",()=>{const n=e.ref([]),t=e.ref({totalEndpoints:0,withCustomHandler:0,totalSchemas:0,withCustomSeed:0,autoGenerated:0}),o=e.ref(!1),l=e.ref(null),p=e.ref(""),s=e.ref({methods:[],hasHandler:null,hasSeed:null,tags:[]}),u=e.ref(null),_=e.ref(new Set),f=e.computed(()=>{const a=new Set;for(const r of n.value)for(const N of r.tags)a.add(N);return Array.from(a).sort()}),c=e.computed(()=>{const a=new Set;for(const r of n.value)r.responseSchema&&a.add(r.responseSchema);return Array.from(a).sort()}),g=e.computed(()=>{let a=n.value;if(p.value.trim()){const r=p.value.toLowerCase().trim();a=a.filter(N=>N.path.toLowerCase().includes(r)||N.operationId.toLowerCase().includes(r)||N.summary?.toLowerCase().includes(r)||N.tags.some(i=>i.toLowerCase().includes(r)))}return s.value.methods.length>0&&(a=a.filter(r=>s.value.methods.includes(r.method))),s.value.hasHandler!==null&&(a=a.filter(r=>r.hasHandler===s.value.hasHandler)),s.value.hasSeed!==null&&(a=a.filter(r=>r.hasSeed===s.value.hasSeed)),s.value.tags.length>0&&(a=a.filter(r=>r.tags.some(N=>s.value.tags.includes(N)))),a}),$=e.computed(()=>{const a=new Map;for(const r of g.value){let N;r.tags.length>0?N=r.tags[0]:r.responseSchema?N=r.responseSchema:N=r.path.split("/").filter(Boolean)[0]||"Other",a.has(N)||a.set(N,[]),a.get(N)?.push(r)}return Array.from(a.entries()).map(([r,N])=>({tag:r,endpoints:N.sort((i,m)=>i.path.localeCompare(m.path)),isExpanded:_.value.has(r)})).sort((r,N)=>r.tag.localeCompare(N.tag))}),E=e.computed(()=>u.value?n.value.find(a=>a.key===u.value)??null:null),k=e.computed(()=>n.value.filter(a=>a.hasHandler).length),y=e.computed(()=>n.value.filter(a=>a.hasSeed).length);function M(a){n.value=a.endpoints,t.value=a.stats,l.value=null;for(const r of a.endpoints)r.tags.length>0&&_.value.add(r.tags[0])}function D(a){o.value=a}function d(a){l.value=a,o.value=!1}function b(){l.value=null}function w(a){p.value=a}function I(a){const r=s.value.methods.indexOf(a);r===-1?s.value.methods.push(a):s.value.methods.splice(r,1)}function Q(a){s.value.hasHandler=a}function U(a){s.value.hasSeed=a}function A(a){const r=s.value.tags.indexOf(a);r===-1?s.value.tags.push(a):s.value.tags.splice(r,1)}function C(){s.value={methods:[],hasHandler:null,hasSeed:null,tags:[]},p.value=""}function h(){return p.value.trim()!==""||s.value.methods.length>0||s.value.hasHandler!==null||s.value.hasSeed!==null||s.value.tags.length>0}function z(a){u.value=a}function K(a){_.value.has(a)?_.value.delete(a):_.value.add(a)}function v(){for(const a of $.value)_.value.add(a.tag)}function ee(){_.value.clear()}function te(a){const r=new Set(a);for(const N of n.value)N.hasHandler=r.has(N.operationId)}function B(a){const r=new Set(a);for(const N of n.value)N.hasSeed=N.responseSchema?r.has(N.responseSchema):!1}return{endpoints:n,stats:t,isLoading:o,error:l,searchQuery:p,filter:s,selectedEndpointKey:u,expandedTags:_,allTags:f,allSchemas:c,filteredEndpoints:g,groupedEndpoints:$,selectedEndpoint:E,handlerCount:k,seedCount:y,setRegistryData:M,setLoading:D,setError:d,clearError:b,setSearchQuery:w,toggleMethodFilter:I,setHandlerFilter:Q,setSeedFilter:U,toggleTagFilter:A,clearFilters:C,hasActiveFilters:h,selectEndpoint:z,toggleGroup:K,expandAllGroups:v,collapseAllGroups:ee,updateHandlerStatus:te,updateSeedStatus:B}}),ut=G.defineStore("timeline",()=>{const n=e.ref([]),t=e.ref(!1),o=e.ref(null),l=e.ref({methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}),p=e.ref(null),s=e.ref(500),u=new Map;function _(i){return i<200?"1xx":i<300?"2xx":i<400?"3xx":i<500?"4xx":"5xx"}const f=e.computed(()=>{let i=n.value;if(l.value.searchQuery.trim()){const m=l.value.searchQuery.toLowerCase().trim();i=i.filter(V=>V.request.path.toLowerCase().includes(m)||V.request.operationId.toLowerCase().includes(m))}return l.value.methods.length>0&&(i=i.filter(m=>l.value.methods.includes(m.request.method.toUpperCase()))),l.value.statusCodes.length>0&&(i=i.filter(m=>{if(m.status===null)return!1;const V=_(m.status);return l.value.statusCodes.includes(V)})),l.value.simulatedOnly!==null&&(i=i.filter(m=>m.simulated===l.value.simulatedOnly)),i}),c=e.computed(()=>p.value?n.value.find(i=>i.id===p.value)??null:null),g=e.computed(()=>n.value.length),$=e.computed(()=>n.value.filter(i=>i.response!==null).length),E=e.computed(()=>n.value.filter(i=>i.response===null).length),k=e.computed(()=>{const i={"1xx":0,"2xx":0,"3xx":0,"4xx":0,"5xx":0};for(const m of n.value)if(m.status!==null){const V=_(m.status);i[V]++}return i}),y=e.computed(()=>{const i=n.value.filter(V=>V.duration!==null);if(i.length===0)return 0;const m=i.reduce((V,O)=>V+(O.duration??0),0);return Math.round(m/i.length)});function M(i){const m={id:i.id,request:i,response:null,status:null,duration:null,simulated:!1},V=u.get(i.id);V&&(d(m,V),u.delete(i.id)),n.value.unshift(m),n.value.length>s.value&&(n.value=n.value.slice(0,s.value))}function D(i){const m=n.value.find(V=>V.id===i.requestId);if(m)d(m,i),u.delete(i.requestId);else if(u.set(i.requestId,i),u.size>100){const V=b(i);n.value.unshift(V),u.delete(i.requestId),n.value.length>s.value&&(n.value=n.value.slice(0,s.value))}}function d(i,m){i.response=m,i.status=m.status,i.duration=m.duration,i.simulated=m.simulated}function b(i){const m={id:i.requestId,method:"UNKNOWN",path:"/unknown",operationId:"unknown",timestamp:Date.now(),headers:{},query:{},body:void 0};return{id:i.requestId,request:m,response:i,status:i.status,duration:i.duration,simulated:i.simulated}}function w(i){for(const[m,V]of u){const O=i.get(m);O?(d(O,V),u.delete(m)):(i.set(m,b(V)),u.delete(m))}}function I(i,m){for(const[V,O]of m){const P=i.get(V);P?d(P,O):u.set(V,O)}}function Q(i){for(const[m,V]of u)i.has(m)||(i.set(m,b(V)),u.delete(m))}function U(i){const m=new Map,V=new Map;for(const P of i.entries)if(P.type==="request"){const W=P.data;m.set(W.id,{id:W.id,request:W,response:null,status:null,duration:null,simulated:!1})}else if(P.type==="response"){const W=P.data;V.set(W.requestId,W)}w(m),I(m,V),Q(m);const O=Array.from(m.values()).sort((P,W)=>W.request.timestamp-P.request.timestamp);n.value=O.slice(0,s.value),o.value=null}function A(){n.value=[],p.value=null,u.clear()}function C(i){t.value=i}function h(i){o.value=i,t.value=!1}function z(){o.value=null}function K(i){l.value.searchQuery=i}function v(i){const m=l.value.methods.indexOf(i);m===-1?l.value.methods.push(i):l.value.methods.splice(m,1)}function ee(i){const m=l.value.statusCodes.indexOf(i);m===-1?l.value.statusCodes.push(i):l.value.statusCodes.splice(m,1)}function te(i){l.value.simulatedOnly=i}function B(){l.value={methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}}function a(){return l.value.searchQuery.trim()!==""||l.value.methods.length>0||l.value.statusCodes.length>0||l.value.simulatedOnly!==null}function r(i){p.value=i}function N(i){const m=Math.max(1,i);s.value=m,n.value.length>m&&(n.value=n.value.slice(0,m))}return{entries:n,isLoading:t,error:o,filter:l,selectedEntryId:p,maxEntries:s,filteredEntries:f,selectedEntry:c,totalCount:g,completedCount:$,pendingCount:E,statusCounts:k,averageDuration:y,addRequest:M,addResponse:D,setTimelineData:U,clearTimeline:A,setLoading:C,setError:h,clearError:z,setSearchQuery:K,toggleMethodFilter:v,toggleStatusFilter:ee,setSimulatedFilter:te,clearFilters:B,hasActiveFilters:a,selectEntry:r,setMaxEntries:N}}),_t=["light","dark","system"];function qe(n){return typeof n=="string"&&_t.includes(n)}const Ne="openapi-devtools-theme",H=e.ref("system"),J=e.ref(!1);let ie=null,re=null;function ce(){return typeof window<"u"&&typeof document<"u"}function ft(){return e.getCurrentInstance()!==null}function yt(){const n=e.computed(()=>H.value==="system"?J.value?"dark":"light":H.value),t=e.computed(()=>n.value==="dark");function o(){if(!ce())return;const c=document.documentElement;n.value==="dark"?(c.classList.add("dark"),c.classList.remove("light")):(c.classList.add("light"),c.classList.remove("dark"))}function l(c){if(!qe(c)){console.warn(`[DevTools] Invalid theme mode: ${c}`);return}if(H.value=c,ce())try{localStorage.setItem(Ne,c)}catch{console.warn("[DevTools] Unable to persist theme preference")}}function p(){H.value==="system"?l(J.value?"light":"dark"):l(H.value==="dark"?"light":"dark")}function s(){l("system")}function u(){ie&&re&&(ie.removeEventListener("change",re),ie=null,re=null)}function _(){if(!ce())return;u();const c=window.matchMedia("(prefers-color-scheme: dark)");J.value=c.matches;const g=$=>{J.value=$.matches};c.addEventListener("change",g),ie=c,re=g;try{const $=localStorage.getItem(Ne);qe($)&&(H.value=$)}catch{}o()}function f(){if(u(),H.value="system",J.value=!1,ce()){document.documentElement.classList.remove("dark","light");try{localStorage.removeItem(Ne)}catch{}}}return e.watch([H,J],()=>{o()}),ft()&&(e.onMounted(()=>{_()}),e.onUnmounted(()=>{u()})),{themeMode:e.computed(()=>H.value),effectiveTheme:n,isDark:t,systemPrefersDark:e.computed(()=>J.value),setTheme:l,toggleTheme:p,resetToSystem:s,initialize:_,resetState:f}}const Ve={path:"/_ws",reconnectDelay:2e3,maxReconnectAttempts:Number.POSITIVE_INFINITY,autoConnect:!0},T=e.ref("disconnected"),be=e.ref(null),ne=e.ref(0);let x=null,de=null,X={...Ve},Be=!1;const F=new Map;function Me(){return typeof window<"u"&&typeof WebSocket<"u"}function ht(){return e.getCurrentInstance()!==null}function kt(n){return Me()?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${n}`:`ws://localhost${n}`}function Fe(){de!==null&&(clearTimeout(de),de=null)}function gt(n,t){const o=F.get(n);if(o)for(const p of o)try{p(t)}catch(s){console.error(`[DevTools WebSocket] Error in event handler for '${n}':`,s)}const l=F.get("*");if(l)for(const p of l)try{p({type:n,data:t})}catch(s){console.error("[DevTools WebSocket] Error in wildcard event handler:",s)}}function Et(){T.value="connected",ne.value=0,Fe()}function Nt(n){try{const t=JSON.parse(n.data);if(t.type==="connected"){const o=t.data;be.value=o.serverVersion}gt(t.type,t.data)}catch(t){console.error("[DevTools WebSocket] Failed to parse message:",t)}}function Vt(){T.value,T.value="disconnected",x=null,ne.value<X.maxReconnectAttempts&&(T.value="reconnecting",ne.value++,de=setTimeout(()=>{Se()},X.reconnectDelay))}function bt(n){console.error("[DevTools WebSocket] Error:",n)}function Se(){if(!Me()||T.value==="connecting"||T.value==="connected"||x&&(x.readyState===WebSocket.CONNECTING||x.readyState===WebSocket.OPEN))return;Ie(),T.value="connecting";const n=kt(X.path);try{x=new WebSocket(n),x.onopen=Et,x.onmessage=Nt,x.onclose=Vt,x.onerror=bt}catch(t){console.error("[DevTools WebSocket] Failed to create WebSocket:",t),T.value="disconnected"}}function Ie(){x&&(x.onopen=null,x.onmessage=null,x.onclose=null,x.onerror=null,(x.readyState===WebSocket.OPEN||x.readyState===WebSocket.CONNECTING)&&x.close(),x=null)}function Re(){Fe(),Ie(),T.value="disconnected",ne.value=0}function Bt(n){if(!x||x.readyState!==WebSocket.OPEN)return!1;try{return x.send(JSON.stringify(n)),!0}catch(t){return console.error("[DevTools WebSocket] Failed to send command:",t),!1}}function Ce(n,t){F.has(n)||F.set(n,new Set);const o=F.get(n);return o&&o.add(t),()=>{const l=F.get(n);l&&(l.delete(t),l.size===0&&F.delete(n))}}function $e(n,t){const o=F.get(n);o&&(o.delete(t),o.size===0&&F.delete(n))}function St(n,t){const o=l=>{$e(n,o),t(l)};return Ce(n,o)}function Ct(n,t){const o=l=>{t(l)===!0&&$e(n,o)};return Ce(n,o)}function $t(){Re(),be.value=null,F.clear(),X={...Ve},Be=!1}function xe(n={}){(!Be||T.value==="disconnected")&&(X={...Ve,...n},Be=!0);const t=e.computed(()=>T.value==="connected"),o=e.computed(()=>T.value==="reconnecting");return ht()&&e.onMounted(()=>{X.autoConnect&&Se()}),{connectionState:e.computed(()=>T.value),connected:t,isReconnecting:o,serverVersion:e.computed(()=>be.value),reconnectAttempts:e.computed(()=>ne.value),connect:Se,disconnect:Re,send:Bt,on:Ce,off:$e,once:St,onUntil:Ct,resetState:$t}}let Le=!1,He=null;function Ae(){if(Le)return He;const n=e.createApp(mt),t=G.createPinia();return n.use(t),n.use(ve),n.mount("#app"),Le=!0,He=n,n}typeof window<"u"&&document.getElementById("app")&&Ae();function me(n){return n.toUpperCase()}const xt={class:"endpoint-detail"},Dt={key:0,class:"endpoint-detail__empty"},wt={key:1,class:"endpoint-detail__content"},Tt={class:"endpoint-detail__header"},zt={class:"endpoint-detail__path font-mono"},qt={class:"endpoint-detail__status"},Mt={key:0,class:"endpoint-detail__status-item endpoint-detail__status-item--handler"},Ft={key:1,class:"endpoint-detail__status-item endpoint-detail__status-item--seed"},It={key:2,class:"endpoint-detail__status-item endpoint-detail__status-item--security"},Rt={key:3,class:"endpoint-detail__status-item endpoint-detail__status-item--auto"},Lt={class:"endpoint-detail__sections"},Ht={class:"endpoint-detail__section"},At={class:"endpoint-detail__section-content font-mono"},Ot={key:0,class:"endpoint-detail__section"},Pt={class:"endpoint-detail__section-title"},jt={class:"endpoint-detail__tags"},Qt={key:1,class:"endpoint-detail__section"},Ut={class:"endpoint-detail__section-content"},Wt={key:2,class:"endpoint-detail__section"},Gt={class:"endpoint-detail__section-content endpoint-detail__description"},Jt={key:3,class:"endpoint-detail__section"},Kt={class:"endpoint-detail__section-title"},Zt={class:"endpoint-detail__section-content font-mono"},Yt={key:4,class:"endpoint-detail__section"},Xt={class:"endpoint-detail__section-title"},vt={class:"endpoint-detail__security"},en={class:"endpoint-detail__security-name font-mono"},tn={class:"endpoint-detail__security-scopes text-muted"},nn=L(e.defineComponent({__name:"EndpointDetail",props:{endpoint:{}},setup(n){const t=n,o=e.computed(()=>t.endpoint?.security&&t.endpoint.security.length>0),l=e.computed(()=>t.endpoint?.security?t.endpoint.security.map(p=>({name:p.name,scopes:p.scopes.length>0?p.scopes.join(", "):"No scopes"})):[]);return(p,s)=>(e.openBlock(),e.createElementBlock("div",xt,[n.endpoint?(e.openBlock(),e.createElementBlock("div",wt,[e.createElementVNode("header",Tt,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge","method-badge--large",`method-badge--${n.endpoint.method}`])},e.toDisplayString(e.unref(me)(n.endpoint.method)),3),e.createElementVNode("h2",zt,e.toDisplayString(n.endpoint.path),1)]),e.createElementVNode("div",qt,[n.endpoint.hasHandler?(e.openBlock(),e.createElementBlock("div",Mt,[e.createVNode(e.unref(ue),{size:14}),s[2]||(s[2]=e.createElementVNode("span",null,"Has custom handler",-1))])):e.createCommentVNode("",!0),n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Ft,[e.createVNode(e.unref(ke),{size:14}),s[3]||(s[3]=e.createElementVNode("span",null,"Has seed data",-1))])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",It,[e.createVNode(e.unref(We),{size:14}),s[4]||(s[4]=e.createElementVNode("span",null,"Requires authentication",-1))])):e.createCommentVNode("",!0),!n.endpoint.hasHandler&&!n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Rt,[e.createVNode(e.unref(ye),{size:14}),s[5]||(s[5]=e.createElementVNode("span",null,"Auto-generated response",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Lt,[e.createElementVNode("section",Ht,[s[6]||(s[6]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Operation",-1)),e.createElementVNode("p",At,e.toDisplayString(n.endpoint.operationId),1)]),n.endpoint.tags.length>0?(e.openBlock(),e.createElementBlock("section",Ot,[e.createElementVNode("h3",Pt,[e.createVNode(e.unref(Ze),{size:14}),s[7]||(s[7]=e.createTextVNode(" Tags ",-1))]),e.createElementVNode("div",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.endpoint.tags,u=>(e.openBlock(),e.createElementBlock("span",{key:u,class:"endpoint-detail__tag"},e.toDisplayString(u),1))),128))])])):e.createCommentVNode("",!0),n.endpoint.summary?(e.openBlock(),e.createElementBlock("section",Qt,[s[8]||(s[8]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Summary",-1)),e.createElementVNode("p",Ut,e.toDisplayString(n.endpoint.summary),1)])):e.createCommentVNode("",!0),n.endpoint.description?(e.openBlock(),e.createElementBlock("section",Wt,[s[9]||(s[9]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Description",-1)),e.createElementVNode("p",Gt,e.toDisplayString(n.endpoint.description),1)])):e.createCommentVNode("",!0),n.endpoint.responseSchema?(e.openBlock(),e.createElementBlock("section",Jt,[e.createElementVNode("h3",Kt,[e.createVNode(e.unref(ye),{size:14}),s[10]||(s[10]=e.createTextVNode(" Response Schema ",-1))]),e.createElementVNode("p",Zt,e.toDisplayString(n.endpoint.responseSchema),1)])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("section",Yt,[e.createElementVNode("h3",Xt,[e.createVNode(e.unref(Ke),{size:14}),s[11]||(s[11]=e.createTextVNode(" Security ",-1))]),e.createElementVNode("div",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.name,class:"endpoint-detail__security-item"},[e.createElementVNode("span",en,e.toDisplayString(u.name),1),e.createElementVNode("span",tn,e.toDisplayString(u.scopes),1)]))),128))])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",Dt,[e.createVNode(e.unref(ye),{size:48,class:"endpoint-detail__empty-icon"}),s[0]||(s[0]=e.createElementVNode("h3",{class:"endpoint-detail__empty-title"},"No endpoint selected",-1)),s[1]||(s[1]=e.createElementVNode("p",{class:"endpoint-detail__empty-text text-muted"}," Select an endpoint from the list to view its details ",-1))]))]))}}),[["__scopeId","data-v-c66a0f52"]]),on={class:"endpoint-list"},sn={key:0,class:"endpoint-list__empty"},ln={key:1,class:"endpoint-list__groups"},an=["aria-expanded","aria-controls","onClick"],rn={class:"endpoint-group__tag"},cn={class:"endpoint-group__count text-muted"},dn=["id","aria-label"],mn=["aria-selected","onClick"],pn={class:"endpoint-item__path font-mono"},un={class:"endpoint-item__indicators"},_n={key:0,class:"endpoint-item__indicator endpoint-item__indicator--handler",title:"Has custom handler"},fn={key:1,class:"endpoint-item__indicator endpoint-item__indicator--seed",title:"Has seed data"},yn=L(e.defineComponent({__name:"EndpointList",props:{groups:{},selectedKey:{}},emits:["select","toggle-group"],setup(n,{emit:t}){const o=n,l=t;function p(_){l("select",_.key)}function s(_){l("toggle-group",_)}function u(_){return o.selectedKey===_.key}return(_,f)=>(e.openBlock(),e.createElementBlock("div",on,[n.groups.length===0?(e.openBlock(),e.createElementBlock("div",sn,[...f[0]||(f[0]=[e.createElementVNode("p",{class:"text-muted"},"No endpoints found",-1)])])):(e.openBlock(),e.createElementBlock("div",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.groups,c=>(e.openBlock(),e.createElementBlock("div",{key:c.tag,class:"endpoint-group"},[e.createElementVNode("button",{type:"button",class:"endpoint-group__header","aria-expanded":c.isExpanded,"aria-controls":`group-${c.tag}`,onClick:g=>s(c.tag)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.isExpanded?e.unref(j):e.unref(Z)),{size:16,class:"endpoint-group__chevron"})),e.createElementVNode("span",rn,e.toDisplayString(c.tag),1),e.createElementVNode("span",cn," ("+e.toDisplayString(c.endpoints.length)+") ",1)],8,an),e.withDirectives(e.createElementVNode("div",{id:`group-${c.tag}`,class:"endpoint-group__items",role:"group","aria-label":`${c.tag} endpoints`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.endpoints,g=>(e.openBlock(),e.createElementBlock("button",{key:g.key,type:"button",class:e.normalizeClass(["endpoint-item",{"endpoint-item--selected":u(g)}]),"aria-selected":u(g),onClick:$=>p(g)},[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${g.method}`])},e.toDisplayString(e.unref(me)(g.method)),3),e.createElementVNode("span",pn,e.toDisplayString(g.path),1),e.createElementVNode("div",un,[g.hasHandler?(e.openBlock(),e.createElementBlock("span",_n,[e.createVNode(e.unref(ue),{size:12})])):e.createCommentVNode("",!0),g.hasSeed?(e.openBlock(),e.createElementBlock("span",fn,[e.createVNode(e.unref(ke),{size:12})])):e.createCommentVNode("",!0)])],10,mn))),128))],8,dn),[[e.vShow,c.isExpanded]])]))),128))]))]))}}),[["__scopeId","data-v-554ffe63"]]),hn={class:"routes-page"},kn={class:"routes-toolbar"},gn={class:"routes-search"},En=["value"],Nn=["aria-expanded"],Vn={key:0,class:"routes-filter-toggle__badge"},bn={class:"routes-stats"},Bn={class:"routes-stats__item"},Sn={class:"routes-stats__item"},Cn={key:0,class:"routes-filters"},$n={class:"routes-filters__section"},xn={class:"routes-filters__methods"},Dn=["onClick"],wn={class:"routes-filters__section"},Tn={class:"routes-filters__status"},zn={key:0,class:"routes-filters__actions"},qn={class:"routes-content"},Mn={key:0,class:"routes-loading"},Fn={key:1,class:"routes-error"},In={class:"routes-error__message"},Rn={key:2,class:"routes-empty empty-state"},Ln={key:3,class:"routes-empty empty-state"},Hn={class:"routes-list-panel"},An={class:"routes-detail-panel"},On=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"RoutesPage",setup(n){const t=pt(),{send:o,on:l,connected:p}=xe(),s=e.ref(!1),u=e.ref(null),_=["get","post","put","patch","delete","options","head","trace"];function f(){p.value&&(t.setLoading(!0),o({type:"get:registry"}))}function c(C){t.setRegistryData(C),t.setLoading(!1)}function g(C){t.selectEndpoint(C)}function $(C){t.toggleGroup(C)}function E(C){const h=C.target;t.setSearchQuery(h.value)}function k(){t.setSearchQuery(""),u.value?.focus()}function y(C){t.toggleMethodFilter(C)}function M(C){return t.filter.methods.includes(C)}function D(){const C=t.filter.hasHandler;t.setHandlerFilter(C===!0?null:!0)}function d(){const C=t.filter.hasSeed;t.setSeedFilter(C===!0?null:!0)}function b(){t.clearFilters()}function w(){s.value=!s.value}const I=e.computed(()=>t.hasActiveFilters());let Q=null,U=null,A=null;return e.onMounted(()=>{Q=l("registry",c),U=l("handlers:updated",()=>f()),A=l("seeds:updated",()=>f()),p.value&&f()}),e.onUnmounted(()=>{Q?.(),U?.(),A?.()}),e.watch(p,C=>{C&&f()}),(C,h)=>(e.openBlock(),e.createElementBlock("div",hn,[e.createElementVNode("div",kn,[e.createElementVNode("div",gn,[e.createVNode(e.unref(le),{size:16,class:"routes-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:u,type:"text",class:"routes-search__input input",placeholder:"Search endpoints...",value:e.unref(t).searchQuery,onInput:E},null,40,En),e.unref(t).searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"routes-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:k},[e.createVNode(e.unref(ae),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filter-toggle btn btn--secondary",{"routes-filter-toggle--active":I.value}]),"aria-expanded":s.value,onClick:w},[e.createVNode(e.unref(Te),{size:16}),h[0]||(h[0]=e.createElementVNode("span",null,"Filters",-1)),I.value?(e.openBlock(),e.createElementBlock("span",Vn,e.toDisplayString(e.unref(t).filter.methods.length+(e.unref(t).filter.hasHandler?1:0)+(e.unref(t).filter.hasSeed?1:0)),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value?e.unref(we):e.unref(j)),{size:14}))],10,Nn),e.createElementVNode("div",bn,[e.createElementVNode("span",Bn,e.toDisplayString(e.unref(t).filteredEndpoints.length)+" endpoints ",1),h[1]||(h[1]=e.createElementVNode("span",{class:"routes-stats__separator"},"|",-1)),e.createElementVNode("span",Sn,e.toDisplayString(e.unref(t).allTags.length)+" tags ",1)])]),s.value?(e.openBlock(),e.createElementBlock("div",Cn,[e.createElementVNode("div",$n,[h[2]||(h[2]=e.createElementVNode("h4",{class:"routes-filters__title"},"Methods",-1)),e.createElementVNode("div",xn,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,z=>e.createElementVNode("button",{key:z,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${z}`,{"method-badge--inactive":!M(z)&&e.unref(t).filter.methods.length>0}]),onClick:K=>y(z)},e.toDisplayString(z.toUpperCase()),11,Dn)),64))])]),e.createElementVNode("div",wn,[h[5]||(h[5]=e.createElementVNode("h4",{class:"routes-filters__title"},"Status",-1)),e.createElementVNode("div",Tn,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasHandler}]),onClick:D},[e.createVNode(e.unref(ue),{size:14}),h[3]||(h[3]=e.createElementVNode("span",null,"Has Handler",-1))],2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasSeed}]),onClick:d},[e.createVNode(e.unref(ke),{size:14}),h[4]||(h[4]=e.createElementVNode("span",null,"Has Seed",-1))],2)])]),I.value?(e.openBlock(),e.createElementBlock("div",zn,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:b},[e.createVNode(e.unref(ae),{size:14}),h[6]||(h[6]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",qn,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",Mn,[...h[7]||(h[7]=[e.createElementVNode("div",{class:"routes-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading endpoints...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",Fn,[e.createElementVNode("p",In,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:f}," Retry ")])):e.unref(t).endpoints.length===0?(e.openBlock(),e.createElementBlock("div",Rn,[e.createVNode(e.unref(he),{size:48,class:"empty-state__icon"}),h[8]||(h[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No endpoints found",-1)),h[9]||(h[9]=e.createElementVNode("p",{class:"empty-state__description"}," No API endpoints are available. Make sure your OpenAPI spec is loaded. ",-1))])):e.unref(t).filteredEndpoints.length===0?(e.openBlock(),e.createElementBlock("div",Ln,[e.createVNode(e.unref(le),{size:48,class:"empty-state__icon"}),h[10]||(h[10]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching endpoints",-1)),h[11]||(h[11]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),I.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:b}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Hn,[e.createVNode(yn,{groups:e.unref(t).groupedEndpoints,"selected-key":e.unref(t).selectedEndpointKey,onSelect:g,onToggleGroup:$},null,8,["groups","selected-key"])]),e.createElementVNode("div",An,[e.createVNode(nn,{endpoint:e.unref(t).selectedEndpoint},null,8,["endpoint"])])],64))])]))}}),[["__scopeId","data-v-bdd419e3"]])},Symbol.toStringTag,{value:"Module"})),Pn={class:"timeline-detail"},jn={key:0,class:"timeline-detail__empty"},Qn={key:1,class:"timeline-detail__content"},Un={class:"timeline-detail__header"},Wn={class:"timeline-detail__summary"},Gn={class:"timeline-detail__path font-mono"},Jn={class:"timeline-detail__meta"},Kn={key:1,class:"status-badge status-badge--pending"},Zn={class:"timeline-detail__duration"},Yn={key:2,class:"timeline-detail__simulated",title:"Simulated response"},Xn={class:"timeline-detail__actions"},vn={class:"timeline-detail__info"},eo={class:"timeline-detail__info-item"},to={class:"timeline-detail__info-value font-mono"},no={class:"timeline-detail__info-item"},oo={class:"timeline-detail__info-value font-mono"},so={class:"timeline-detail__info-item"},lo={class:"timeline-detail__info-value font-mono"},ao={class:"timeline-detail__section"},io={key:0,class:"timeline-detail__subsection"},ro=["aria-expanded"],co={class:"text-muted"},mo={id:"requestQuery-panel",class:"timeline-detail__subsection-content"},po={class:"timeline-detail__kv-key font-mono"},uo={class:"timeline-detail__kv-value font-mono"},_o={key:1,class:"timeline-detail__subsection"},fo=["aria-expanded"],yo={class:"text-muted"},ho={id:"requestHeaders-panel",class:"timeline-detail__subsection-content"},ko={class:"timeline-detail__kv-key font-mono"},go={class:"timeline-detail__kv-value font-mono"},Eo={key:2,class:"timeline-detail__subsection"},No={class:"timeline-detail__subsection-header",role:"group"},Vo=["aria-expanded"],bo={id:"requestBody-panel",class:"timeline-detail__subsection-content"},Bo={class:"timeline-detail__json"},So={key:0,class:"timeline-detail__section"},Co={key:0,class:"timeline-detail__subsection"},$o=["aria-expanded"],xo={class:"text-muted"},Do={id:"responseHeaders-panel",class:"timeline-detail__subsection-content"},wo={class:"timeline-detail__kv-key font-mono"},To={class:"timeline-detail__kv-value font-mono"},zo={key:1,class:"timeline-detail__subsection"},qo={class:"timeline-detail__subsection-header",role:"group"},Mo=["aria-expanded"],Fo={id:"responseBody-panel",class:"timeline-detail__subsection-content"},Io={class:"timeline-detail__json"},Ro={key:1,class:"timeline-detail__section timeline-detail__section--pending"},Lo={class:"timeline-detail__pending"},Ho=L(e.defineComponent({__name:"TimelineDetail",props:{entry:{}},setup(n){const t=n,o=e.ref({requestHeaders:!0,requestQuery:!0,requestBody:!0,responseHeaders:!0,responseBody:!0}),l=e.ref(null),p=e.computed(()=>t.entry?new Date(t.entry.request.timestamp).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1}):""),s=e.computed(()=>t.entry?.duration==null?"pending...":t.entry.duration<1e3?`${t.entry.duration}ms`:`${(t.entry.duration/1e3).toFixed(2)}s`),u=e.computed(()=>t.entry?.status?t.entry.status<200?"status-badge--1xx":t.entry.status<300?"status-badge--2xx":t.entry.status<400?"status-badge--3xx":t.entry.status<500?"status-badge--4xx":"status-badge--5xx":"status-badge--pending"),_=e.computed(()=>t.entry?.request.query?Object.keys(t.entry.request.query).length>0:!1),f=e.computed(()=>t.entry?.request.headers?Object.keys(t.entry.request.headers).length>0:!1),c=e.computed(()=>t.entry?.request.body!==void 0&&t.entry?.request.body!==null),g=e.computed(()=>t.entry?.response?.headers?Object.keys(t.entry.response.headers).length>0:!1),$=e.computed(()=>t.entry?.response?.body!==void 0&&t.entry?.response?.body!==null);function E(D){try{return JSON.stringify(D,null,2)}catch{return String(D)}}function k(D){o.value[D]=!o.value[D]}async function y(D,d){try{await navigator.clipboard.writeText(D),l.value=d,setTimeout(()=>{l.value=null},2e3)}catch(b){console.error("Failed to copy:",b)}}async function M(){if(!t.entry)return;const D={request:t.entry.request,response:t.entry.response};await y(JSON.stringify(D,null,2),"full")}return(D,d)=>(e.openBlock(),e.createElementBlock("div",Pn,[n.entry?(e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("div",Un,[e.createElementVNode("div",Wn,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(me)(n.entry.request.method)),3),e.createElementVNode("span",Gn,e.toDisplayString(n.entry.request.path),1)]),e.createElementVNode("div",Jn,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",u.value])},e.toDisplayString(n.entry.status),3)):(e.openBlock(),e.createElementBlock("span",Kn,"pending")),e.createElementVNode("span",Zn,[e.createVNode(e.unref(R),{size:14}),e.createTextVNode(" "+e.toDisplayString(s.value),1)]),n.entry.simulated?(e.openBlock(),e.createElementBlock("span",Yn,[e.createVNode(e.unref(Y),{size:14}),d[9]||(d[9]=e.createTextVNode(" Simulated ",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Xn,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--sm",title:"Copy as JSON",onClick:M},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value==="full"?e.unref(pe):e.unref(_e)),{size:14})),e.createTextVNode(" "+e.toDisplayString(l.value==="full"?"Copied!":"Copy JSON"),1)])])]),e.createElementVNode("div",vn,[e.createElementVNode("div",eo,[d[10]||(d[10]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Timestamp",-1)),e.createElementVNode("span",to,e.toDisplayString(p.value),1)]),e.createElementVNode("div",no,[d[11]||(d[11]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Operation ID",-1)),e.createElementVNode("span",oo,e.toDisplayString(n.entry.request.operationId),1)]),e.createElementVNode("div",so,[d[12]||(d[12]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Request ID",-1)),e.createElementVNode("span",lo,e.toDisplayString(n.entry.id),1)])]),e.createElementVNode("div",ao,[d[16]||(d[16]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Request",-1)),_.value?(e.openBlock(),e.createElementBlock("div",io,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":o.value.requestQuery,"aria-controls":"requestQuery-panel",onClick:d[0]||(d[0]=b=>k("requestQuery"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.requestQuery?e.unref(j):e.unref(Z)),{size:16})),d[13]||(d[13]=e.createElementVNode("span",null,"Query Parameters",-1)),e.createElementVNode("span",co,"("+e.toDisplayString(Object.keys(n.entry.request.query).length)+")",1)],8,ro),e.withDirectives(e.createElementVNode("div",mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.query,(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"timeline-detail__kv-row"},[e.createElementVNode("span",po,e.toDisplayString(w),1),e.createElementVNode("span",uo,e.toDisplayString(Array.isArray(b)?b.join(", "):b),1)]))),128))],512),[[e.vShow,o.value.requestQuery]])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("div",_o,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":o.value.requestHeaders,"aria-controls":"requestHeaders-panel",onClick:d[1]||(d[1]=b=>k("requestHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.requestHeaders?e.unref(j):e.unref(Z)),{size:16})),d[14]||(d[14]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",yo,"("+e.toDisplayString(Object.keys(n.entry.request.headers).length)+")",1)],8,fo),e.withDirectives(e.createElementVNode("div",ho,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.headers,(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"timeline-detail__kv-row"},[e.createElementVNode("span",ko,e.toDisplayString(w),1),e.createElementVNode("span",go,e.toDisplayString(b),1)]))),128))],512),[[e.vShow,o.value.requestHeaders]])])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",Eo,[e.createElementVNode("div",No,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":o.value.requestBody,"aria-controls":"requestBody-panel",onClick:d[2]||(d[2]=b=>k("requestBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.requestBody?e.unref(j):e.unref(Z)),{size:16})),d[15]||(d[15]=e.createElementVNode("span",null,"Body",-1))],8,Vo),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:d[3]||(d[3]=e.withModifiers(b=>y(E(n.entry.request.body),"reqBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value==="reqBody"?e.unref(pe):e.unref(_e)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",bo,[e.createElementVNode("pre",Bo,e.toDisplayString(E(n.entry.request.body)),1)],512),[[e.vShow,o.value.requestBody]])])):e.createCommentVNode("",!0)]),n.entry.response?(e.openBlock(),e.createElementBlock("div",So,[d[19]||(d[19]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),g.value?(e.openBlock(),e.createElementBlock("div",Co,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":o.value.responseHeaders,"aria-controls":"responseHeaders-panel",onClick:d[4]||(d[4]=b=>k("responseHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.responseHeaders?e.unref(j):e.unref(Z)),{size:16})),d[17]||(d[17]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",xo,"("+e.toDisplayString(Object.keys(n.entry.response.headers).length)+")",1)],8,$o),e.withDirectives(e.createElementVNode("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.response.headers,(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"timeline-detail__kv-row"},[e.createElementVNode("span",wo,e.toDisplayString(w),1),e.createElementVNode("span",To,e.toDisplayString(b),1)]))),128))],512),[[e.vShow,o.value.responseHeaders]])])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("div",zo,[e.createElementVNode("div",qo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":o.value.responseBody,"aria-controls":"responseBody-panel",onClick:d[5]||(d[5]=b=>k("responseBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.responseBody?e.unref(j):e.unref(Z)),{size:16})),d[18]||(d[18]=e.createElementVNode("span",null,"Body",-1))],8,Mo),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:d[6]||(d[6]=e.withModifiers(b=>y(E(n.entry.response.body),"resBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value==="resBody"?e.unref(pe):e.unref(_e)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",Fo,[e.createElementVNode("pre",Io,e.toDisplayString(E(n.entry.response.body)),1)],512),[[e.vShow,o.value.responseBody]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Ro,[d[21]||(d[21]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),e.createElementVNode("div",Lo,[e.createVNode(e.unref(R),{size:24,class:"timeline-detail__pending-icon"}),d[20]||(d[20]=e.createElementVNode("span",{class:"text-muted"},"Waiting for response...",-1))])]))])):(e.openBlock(),e.createElementBlock("div",jn,[e.createVNode(e.unref(R),{size:48,class:"timeline-detail__empty-icon"}),d[7]||(d[7]=e.createElementVNode("h3",{class:"timeline-detail__empty-title"},"Select an entry",-1)),d[8]||(d[8]=e.createElementVNode("p",{class:"timeline-detail__empty-description"}," Click on a timeline entry to view its details. ",-1))]))]))}}),[["__scopeId","data-v-b4bdd2d2"]]),Ao={class:"timeline-entry__time font-mono text-muted"},Oo={class:"timeline-entry__method"},Po={class:"timeline-entry__path font-mono"},jo={class:"timeline-entry__status"},Qo={key:1,class:"status-badge status-badge--pending"},Uo={class:"timeline-entry__duration font-mono text-muted"},Wo={key:0,class:"timeline-entry__simulated",title:"Simulated response"},Go=L(e.defineComponent({__name:"TimelineEntry",props:{entry:{},isSelected:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const o=n,l=t,p=e.computed(()=>new Date(o.entry.request.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})),s=e.computed(()=>o.entry.duration===null?"pending...":o.entry.duration<1e3?`${o.entry.duration}ms`:`${(o.entry.duration/1e3).toFixed(2)}s`),u=e.computed(()=>o.entry.status===null?"status-badge--pending":o.entry.status<200?"status-badge--1xx":o.entry.status<300?"status-badge--2xx":o.entry.status<400?"status-badge--3xx":o.entry.status<500?"status-badge--4xx":"status-badge--5xx"),_=e.computed(()=>o.entry.status===null?R:o.entry.status<400?Ue:Ee),f=e.computed(()=>o.entry.response===null);function c(){l("select",o.entry.id)}return(g,$)=>(e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(["timeline-entry",{"timeline-entry--selected":n.isSelected},{"timeline-entry--pending":f.value},{"timeline-entry--simulated":n.entry.simulated}]),onClick:c},[e.createElementVNode("div",Ao,e.toDisplayString(p.value),1),e.createElementVNode("div",Oo,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(me)(n.entry.request.method)),3)]),e.createElementVNode("div",Po,e.toDisplayString(n.entry.request.path),1),e.createElementVNode("div",jo,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",u.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.value),{size:12})),e.createTextVNode(" "+e.toDisplayString(n.entry.status),1)],2)):(e.openBlock(),e.createElementBlock("span",Qo,[e.createVNode(e.unref(R),{size:12}),$[0]||($[0]=e.createTextVNode(" pending ",-1))]))]),e.createElementVNode("div",Uo,e.toDisplayString(s.value),1),n.entry.simulated?(e.openBlock(),e.createElementBlock("div",Wo,[e.createVNode(e.unref(Y),{size:14})])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-a073dbdf"]]),Jo={class:"timeline-page"},Ko={class:"timeline-toolbar"},Zo={class:"timeline-search"},Yo=["value"],Xo=["aria-expanded"],vo={key:0,class:"timeline-filter-toggle__badge"},es={class:"timeline-stats"},ts={class:"timeline-stats__item"},ns={key:0,class:"timeline-stats__separator"},os={key:1,class:"timeline-stats__item"},ss=["disabled"],ls={key:0,class:"timeline-filters"},as={class:"timeline-filters__section"},is={class:"timeline-filters__methods"},rs=["onClick"],cs={class:"timeline-filters__section"},ds={class:"timeline-filters__status"},ms=["onClick"],ps={class:"timeline-filters__status-count"},us={class:"timeline-filters__section"},_s={class:"timeline-filters__type"},fs={key:0,class:"timeline-filters__actions"},ys={class:"timeline-content"},hs={key:0,class:"timeline-loading"},ks={key:1,class:"timeline-error"},gs={class:"timeline-error__message"},Es={key:2,class:"timeline-empty empty-state"},Ns={key:3,class:"timeline-empty empty-state"},Vs={class:"timeline-list-panel"},bs={class:"timeline-list"},Bs={class:"timeline-detail-panel"},Ss=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"TimelinePage",setup(n){const t=ut(),{send:o,on:l,connected:p}=xe(),s=e.ref(!1),u=e.ref(null),_=["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD","TRACE"],f=["2xx","3xx","4xx","5xx"];function c(){p.value&&(t.setLoading(!0),o({type:"get:timeline"}))}function g(B){t.setTimelineData(B),t.setLoading(!1)}function $(B){t.addRequest(B)}function E(B){t.addResponse(B)}function k(){t.clearTimeline()}function y(){o({type:"clear:timeline"}),t.clearTimeline()}function M(B){t.selectEntry(B)}function D(B){const a=B.target;t.setSearchQuery(a.value)}function d(){t.setSearchQuery(""),u.value?.focus()}function b(B){t.toggleMethodFilter(B)}function w(B){return t.filter.methods.includes(B)}function I(B){t.toggleStatusFilter(B)}function Q(B){return t.filter.statusCodes.includes(B)}function U(){const B=t.filter.simulatedOnly;t.setSimulatedFilter(B===!0?null:!0)}function A(){t.clearFilters()}function C(){s.value=!s.value}const h=e.computed(()=>t.hasActiveFilters()),z=e.computed(()=>t.filter.methods.length+t.filter.statusCodes.length+(t.filter.simulatedOnly!==null?1:0));let K=null,v=null,ee=null,te=null;return e.onMounted(()=>{K=l("timeline",g),v=l("request",$),ee=l("response",E),te=l("timeline:cleared",k),p.value&&c()}),e.onUnmounted(()=>{K?.(),v?.(),ee?.(),te?.()}),e.watch(p,B=>{B&&c()}),(B,a)=>(e.openBlock(),e.createElementBlock("div",Jo,[e.createElementVNode("div",Ko,[e.createElementVNode("div",Zo,[e.createVNode(e.unref(le),{size:16,class:"timeline-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:u,type:"text",class:"timeline-search__input input",placeholder:"Search by path or operation...",value:e.unref(t).filter.searchQuery,onInput:D},null,40,Yo),e.unref(t).filter.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"timeline-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:d},[e.createVNode(e.unref(ae),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filter-toggle btn btn--secondary",{"timeline-filter-toggle--active":h.value}]),"aria-expanded":s.value,onClick:C},[e.createVNode(e.unref(Te),{size:16}),a[0]||(a[0]=e.createElementVNode("span",null,"Filters",-1)),z.value>0?(e.openBlock(),e.createElementBlock("span",vo,e.toDisplayString(z.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value?e.unref(we):e.unref(j)),{size:14}))],10,Xo),e.createElementVNode("div",es,[e.createElementVNode("span",ts,e.toDisplayString(e.unref(t).filteredEntries.length)+" requests ",1),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",ns,"|")):e.createCommentVNode("",!0),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",os," avg "+e.toDisplayString(e.unref(t).averageDuration)+"ms ",1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:"btn btn--secondary btn--icon",title:"Clear timeline",disabled:e.unref(t).entries.length===0,onClick:y},[e.createVNode(e.unref(ge),{size:16})],8,ss)]),s.value?(e.openBlock(),e.createElementBlock("div",ls,[e.createElementVNode("div",as,[a[1]||(a[1]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Methods",-1)),e.createElementVNode("div",is,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,r=>e.createElementVNode("button",{key:r,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${r.toLowerCase()}`,{"method-badge--inactive":!w(r)&&e.unref(t).filter.methods.length>0}]),onClick:N=>b(r)},e.toDisplayString(r),11,rs)),64))])]),e.createElementVNode("div",cs,[a[2]||(a[2]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Status",-1)),e.createElementVNode("div",ds,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(f,r=>e.createElementVNode("button",{key:r,type:"button",class:e.normalizeClass(["timeline-filters__status-btn",`timeline-filters__status-btn--${r}`,{"timeline-filters__status-btn--active":Q(r)}]),onClick:N=>I(r)},[e.createTextVNode(e.toDisplayString(r)+" ",1),e.createElementVNode("span",ps," ("+e.toDisplayString(e.unref(t).statusCounts[r])+") ",1)],10,ms)),64))])]),e.createElementVNode("div",us,[a[3]||(a[3]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Type",-1)),e.createElementVNode("div",_s,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filters__status-btn",{"timeline-filters__status-btn--active":e.unref(t).filter.simulatedOnly}]),onClick:U}," Simulated only ",2)])]),h.value?(e.openBlock(),e.createElementBlock("div",fs,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:A},[e.createVNode(e.unref(ae),{size:14}),a[4]||(a[4]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ys,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",hs,[...a[5]||(a[5]=[e.createElementVNode("div",{class:"timeline-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading timeline...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",ks,[e.createElementVNode("p",gs,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:c}," Retry ")])):e.unref(t).entries.length===0?(e.openBlock(),e.createElementBlock("div",Es,[e.createVNode(e.unref(R),{size:48,class:"empty-state__icon"}),a[6]||(a[6]=e.createElementVNode("h3",{class:"empty-state__title"},"No requests yet",-1)),a[7]||(a[7]=e.createElementVNode("p",{class:"empty-state__description"}," API requests will appear here in real-time as they are made. ",-1))])):e.unref(t).filteredEntries.length===0?(e.openBlock(),e.createElementBlock("div",Ns,[e.createVNode(e.unref(le),{size:48,class:"empty-state__icon"}),a[8]||(a[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching requests",-1)),a[9]||(a[9]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:A}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Vs,[e.createElementVNode("div",bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).filteredEntries,r=>(e.openBlock(),e.createBlock(Go,{key:r.id,entry:r,"is-selected":e.unref(t).selectedEntryId===r.id,onSelect:M},null,8,["entry","is-selected"]))),128))])]),e.createElementVNode("div",Bs,[e.createVNode(Ho,{entry:e.unref(t).selectedEntry},null,8,["entry"])])],64))])]))}}),[["__scopeId","data-v-a5c73778"]])},Symbol.toStringTag,{value:"Module"})),Cs={class:"models-page"},$s={class:"models-sidebar"},xs={class:"models-sidebar__header"},Ds={class:"models-sidebar__list"},ws=["onClick"],Ts={class:"models-sidebar__name"},zs={class:"models-sidebar__count"},qs={class:"models-content"},Ms={class:"models-toolbar"},Fs={class:"models-toolbar__title"},Is={class:"font-mono"},Rs={class:"text-muted"},Ls={class:"models-toolbar__actions"},Hs={class:"models-data"},As={class:"models-data__json font-mono"},Os={key:1,class:"empty-state"},Ps=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"ModelsPage",setup(n){const t=e.ref("Pet"),o=e.ref([{name:"Pet",count:5},{name:"Category",count:3},{name:"Order",count:2},{name:"User",count:1}]),l=e.ref([{id:1,name:"Fluffy",category:{id:1,name:"Dogs"},status:"available"},{id:2,name:"Whiskers",category:{id:2,name:"Cats"},status:"pending"},{id:3,name:"Goldie",category:{id:3,name:"Fish"},status:"available"},{id:4,name:"Tweety",category:{id:4,name:"Birds"},status:"sold"},{id:5,name:"Hoppy",category:{id:5,name:"Rabbits"},status:"available"}]);function p(u){t.value=u}function s(){console.log("Reseeding schema:",t.value)}return(u,_)=>(e.openBlock(),e.createElementBlock("div",Cs,[e.createElementVNode("aside",$s,[e.createElementVNode("div",xs,[e.createVNode(e.unref(fe),{size:18}),_[0]||(_[0]=e.createElementVNode("span",null,"Schemas",-1))]),e.createElementVNode("div",Ds,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock("button",{key:f.name,class:e.normalizeClass(["models-sidebar__item",{"models-sidebar__item--active":t.value===f.name}]),onClick:c=>p(f.name)},[e.createElementVNode("span",Ts,e.toDisplayString(f.name),1),e.createElementVNode("span",zs,e.toDisplayString(f.count),1)],10,ws))),128))])]),e.createElementVNode("main",qs,[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Ms,[e.createElementVNode("div",Fs,[e.createElementVNode("span",Is,e.toDisplayString(t.value),1),e.createElementVNode("span",Rs,"("+e.toDisplayString(l.value.length)+" items)",1)]),e.createElementVNode("div",Ls,[e.createElementVNode("button",{class:"btn btn--secondary",title:"Reseed with generated data",onClick:s},[e.createVNode(e.unref(Je),{size:16}),_[1]||(_[1]=e.createElementVNode("span",null,"Reseed",-1))])])]),e.createElementVNode("div",Hs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"models-data__item card"},[e.createElementVNode("pre",As,e.toDisplayString(JSON.stringify(f,null,2)),1)]))),128))])],64)):(e.openBlock(),e.createElementBlock("div",Os,[e.createVNode(e.unref(fe),{size:48,class:"empty-state__icon"}),_[2]||(_[2]=e.createElementVNode("h3",{class:"empty-state__title"},"Select a schema",-1)),_[3]||(_[3]=e.createElementVNode("p",{class:"empty-state__description"}," Choose a schema from the sidebar to view and edit its data. ",-1))]))])]))}}),[["__scopeId","data-v-6373fe56"]])},Symbol.toStringTag,{value:"Module"})),js={class:"simulator-page"},Qs={class:"simulator-form card"},Us={class:"simulator-form__header"},Ws={class:"simulator-form__body"},Gs={class:"simulator-form__row"},Js=["value"],Ks={class:"simulator-presets"},Zs=["onClick"],Ys={class:"simulator-preset__label"},Xs=["disabled"],vs={class:"simulator-active"},el={class:"simulator-active__header"},tl={class:"simulator-active__title"},nl={class:"simulator-active__list"},ol={class:"simulator-simulation__info"},sl={class:"simulator-simulation__path font-mono"},ll={class:"simulator-simulation__preset"},al=["onClick"],il={key:0,class:"empty-state"},rl=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"SimulatorPage",setup(n){const t=[{id:"slow",label:"Slow Response",description:"Add 2 second delay",type:"delay",delay:2e3},{id:"very-slow",label:"Very Slow",description:"Add 5 second delay",type:"delay",delay:5e3},{id:"timeout",label:"Timeout",description:"Simulate request timeout (30s)",type:"delay",delay:3e4},{id:"error-400",label:"Bad Request",description:"Return 400 status",type:"error",status:400},{id:"error-401",label:"Unauthorized",description:"Return 401 status",type:"error",status:401},{id:"error-403",label:"Forbidden",description:"Return 403 status",type:"error",status:403},{id:"error-404",label:"Not Found",description:"Return 404 status",type:"error",status:404},{id:"error-429",label:"Rate Limited",description:"Return 429 status",type:"error",status:429},{id:"error-500",label:"Server Error",description:"Return 500 status",type:"error",status:500},{id:"error-503",label:"Unavailable",description:"Return 503 status",type:"error",status:503}],o=e.ref([{id:"1",path:"/pets",method:"GET",preset:t[0]},{id:"2",path:"/pets/{petId}",method:"GET",preset:t[6]}]),l=e.ref(""),p=e.ref("GET"),s=e.ref(null),u=["GET","POST","PUT","PATCH","DELETE"];function _(E){return t.find(k=>k.id===E)}const f=e.computed(()=>l.value.trim()!==""&&s.value!==null);function c(){if(!f.value||!s.value)return;const E=_(s.value);E&&(o.value.push({id:Date.now().toString(),path:l.value.trim(),method:p.value,preset:E}),l.value="",s.value=null)}function g(E){o.value=o.value.filter(k=>k.id!==E)}function $(){o.value=[]}return(E,k)=>(e.openBlock(),e.createElementBlock("div",js,[e.createElementVNode("div",Qs,[e.createElementVNode("div",Us,[e.createVNode(e.unref(Y),{size:18}),k[2]||(k[2]=e.createElementVNode("span",null,"Add Simulation",-1))]),e.createElementVNode("div",Ws,[e.createElementVNode("div",Gs,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":k[0]||(k[0]=y=>p.value=y),class:"simulator-form__method input"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,y=>e.createElementVNode("option",{key:y,value:y},e.toDisplayString(y),9,Js)),64))],512),[[e.vModelSelect,p.value]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":k[1]||(k[1]=y=>l.value=y),type:"text",class:"simulator-form__path input",placeholder:"/api/path or * for all"},null,512),[[e.vModelText,l.value]])]),e.createElementVNode("div",Ks,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(t,y=>e.createElementVNode("button",{key:y.id,class:e.normalizeClass(["simulator-preset",{"simulator-preset--selected":s.value===y.id},y.type==="delay"?"simulator-preset--delay":"simulator-preset--error"]),onClick:M=>s.value=y.id},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.type==="delay"?e.unref(R):e.unref(Ee)),{size:14})),e.createElementVNode("span",Ys,e.toDisplayString(y.label),1)],10,Zs)),64))]),e.createElementVNode("button",{class:"btn btn--primary",disabled:!f.value,onClick:c},[e.createVNode(e.unref(Ge),{size:16}),k[3]||(k[3]=e.createElementVNode("span",null,"Add Simulation",-1))],8,Xs)])]),e.createElementVNode("div",vs,[e.createElementVNode("div",el,[e.createElementVNode("span",tl," Active Simulations ("+e.toDisplayString(o.value.length)+") ",1),o.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn--ghost",onClick:$},[e.createVNode(e.unref(ge),{size:14}),k[4]||(k[4]=e.createElementVNode("span",null,"Clear All",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"simulator-simulation card"},[e.createElementVNode("div",ol,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${y.method.toLowerCase()}`])},e.toDisplayString(y.method),3),e.createElementVNode("span",sl,e.toDisplayString(y.path),1)]),e.createElementVNode("div",ll,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.preset.type==="delay"?e.unref(R):e.unref(Ee)),{size:14,class:e.normalizeClass(y.preset.type==="delay"?"text-warning":"text-error")},null,8,["class"])),e.createElementVNode("span",null,e.toDisplayString(y.preset.label),1)]),e.createElementVNode("button",{class:"btn btn--ghost btn--icon",title:"Remove simulation",onClick:M=>g(y.id)},[e.createVNode(e.unref(ge),{size:14})],8,al)]))),128)),o.value.length===0?(e.openBlock(),e.createElementBlock("div",il,[e.createVNode(e.unref(Y),{size:48,class:"empty-state__icon"}),k[5]||(k[5]=e.createElementVNode("h3",{class:"empty-state__title"},"No active simulations",-1)),k[6]||(k[6]=e.createElementVNode("p",{class:"empty-state__description"}," Add a simulation above to test error handling and slow responses. ",-1))])):e.createCommentVNode("",!0)])])]))}}),[["__scopeId","data-v-cf6df4d2"]])},Symbol.toStringTag,{value:"Module"}));q.bootstrap=Ae,q.useTheme=yt,q.useWebSocket=xe,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(A,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("pinia"),require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","pinia","vue","vue-router"],G):(A=typeof globalThis<"u"?globalThis:A||self,G(A.ViteOpenApiDevtools={},A.Pinia,A.Vue,A.VueRouter))})(this,(function(A,G,e,ie){"use strict";const qe=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ge=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,s,a)=>a?a.toUpperCase():s.toLowerCase()),Ke=n=>{const t=Ge(n);return t.charAt(0).toUpperCase()+t.slice(1)},Ze=(...n)=>n.filter((t,s,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===s).join(" ").trim();var ce={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Ye=({size:n,strokeWidth:t=2,absoluteStrokeWidth:s,color:a,iconNode:d,name:o,class:m,...y},{slots:f})=>e.h("svg",{...ce,width:n||ce.width,height:n||ce.height,stroke:a||ce.stroke,"stroke-width":s?Number(t)*24/Number(n):t,class:Ze("lucide",...o?[`lucide-${qe(Ke(o))}-icon`,`lucide-${qe(o)}`]:["lucide-icon"]),...y},[...d.map(c=>e.h(...c)),...f.default?[f.default()]:[]]);const D=(n,t)=>(s,{slots:a})=>e.h(Ye,{...s,iconNode:t,name:n},a);const de=D("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const K=D("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const X=D("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Fe=D("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Xe=D("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const ve=D("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const j=D("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ne=D("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const Ve=D("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const be=D("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const Se=D("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Re=D("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const et=D("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const tt=D("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const nt=D("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const Ce=D("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);const ot=D("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const me=D("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const st=D("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const Be=D("sprout",[["path",{d:"M7 20h10",key:"e6iznv"}],["path",{d:"M10 20c5.5-2.5.8-6.4 3-10",key:"161w41"}],["path",{d:"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",key:"9gtqwd"}],["path",{d:"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",key:"bkxnd2"}]]);const lt=D("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const pe=D("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const $e=D("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const at=D("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const rt=D("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);const le=D("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const v=D("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Ae=[{path:"/",redirect:"/routes"},{path:"/routes",name:"routes",component:()=>Promise.resolve().then(()=>Yn),meta:{title:"Routes",icon:"route"}},{path:"/timeline",name:"timeline",component:()=>Promise.resolve().then(()=>qs),meta:{title:"Timeline",icon:"clock"}},{path:"/models",name:"models",component:()=>Promise.resolve().then(()=>Sl),meta:{title:"Models",icon:"database"}},{path:"/simulator",name:"simulator",component:()=>Promise.resolve().then(()=>Ul),meta:{title:"Simulator",icon:"zap"}},{path:"/:pathMatch(.*)*",name:"not-found",redirect:"/routes"}],it=ie.createRouter({history:ie.createWebHashHistory(),routes:Ae}),ct={class:"app"},dt={class:"app-header"},mt={class:"app-header__brand"},pt={class:"app-nav",role:"tablist","aria-label":"DevTools navigation"},ut=["aria-selected","aria-current","aria-controls","onClick"],ft={class:"app-nav__label"},_t={class:"app-header__status"},ht={class:"connection-status"},yt={class:"connection-status__text"},gt={class:"app-main"},kt=e.defineComponent({__name:"App",setup(n){const t=ie.useRoute(),s=ie.useRouter(),a=e.computed(()=>Ae.filter(c=>c.name&&c.meta?.title).map(c=>({name:c.name,path:c.path,title:c.meta?.title,icon:c.meta?.icon}))),d=e.computed(()=>t.name);function o(c){s.push(c)}const m={route:Ce,clock:j,database:be,zap:v};function y(c){return m[c]??Ce}const f=e.computed(()=>!1);return(c,E)=>{const B=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",ct,[e.createElementVNode("header",dt,[e.createElementVNode("div",mt,[e.createVNode(e.unref(v),{class:"app-header__logo",size:20}),E[0]||(E[0]=e.createElementVNode("span",{class:"app-header__title"},"OpenAPI DevTools",-1))]),e.createElementVNode("nav",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,b=>(e.openBlock(),e.createElementBlock("button",{key:b.name,role:"tab","aria-selected":d.value===b.name,"aria-current":d.value===b.name?"true":void 0,"aria-controls":`panel-${b.name}`,tabindex:0,class:e.normalizeClass(["app-nav__tab",{"app-nav__tab--active":d.value===b.name}]),onClick:k=>o(b.path)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y(b.icon)),{size:16,class:"app-nav__icon"})),e.createElementVNode("span",ft,e.toDisplayString(b.title),1)],10,ut))),128))]),e.createElementVNode("div",_t,[e.createElementVNode("div",ht,[e.createElementVNode("span",{class:e.normalizeClass(["connection-status__dot",f.value?"connection-status__dot--connected":"connection-status__dot--disconnected"])},null,2),e.createElementVNode("span",yt,e.toDisplayString(f.value?"Connected":"Disconnected"),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value?e.unref(rt):e.unref(at)),{size:14,class:"connection-status__icon"}))])])]),e.createElementVNode("main",gt,[e.createVNode(B,null,{default:e.withCtx(({Component:b})=>[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b)))]),_:2},1024)]),_:1})])])}}}),L=(n,t)=>{const s=n.__vccOpts||n;for(const[a,d]of t)s[a]=d;return s},Et=L(kt,[["__scopeId","data-v-513332df"]]);function ue(n){try{return structuredClone(e.toRaw(n))}catch{return JSON.parse(JSON.stringify(n))}}const Nt=G.defineStore("models",()=>{const n=e.ref([]),t=e.ref(null),s=e.ref([]),a=e.ref([]),d=e.ref(!1),o=e.ref(null),m=e.computed(()=>t.value?n.value.find(h=>h.name===t.value)??null:null),y=e.ref(!1),f=e.computed(()=>y.value),c=e.computed(()=>n.value.length),E=e.computed(()=>n.value.reduce((h,x)=>h+x.count,0));async function B(){d.value=!0,o.value=null;try{const h=await fetch("/_api/store");if(!h.ok)throw new Error(`Failed to fetch schemas: ${h.statusText}`);const x=await h.json();n.value=x.schemas??[]}catch(h){o.value=h instanceof Error?h.message:"Failed to fetch schemas",console.error("[ModelsStore] Error fetching schemas:",h)}finally{d.value=!1}}async function b(h){t.value!==h&&(t.value=h,await k(h))}async function k(h){d.value=!0,o.value=null;try{const x=await fetch(`/_api/store/${encodeURIComponent(h)}`);if(!x.ok)throw new Error(`Failed to fetch schema data: ${x.statusText}`);const C=await x.json(),V=C.items??[];s.value=ue(V),a.value=ue(V),y.value=!1;const I=n.value.findIndex(Q=>Q.name===h);I!==-1&&(n.value[I].count=C.count)}catch(x){o.value=x instanceof Error?x.message:"Failed to fetch schema data",console.error("[ModelsStore] Error fetching schema data:",x)}finally{d.value=!1}}function N(h){if(!Array.isArray(h)){o.value="Invalid data: Expected an array of items",console.error("[ModelsStore] updateItems received non-array value:",typeof h);return}s.value=h,o.value=null,y.value=!0}async function S(){if(!t.value)return o.value="No schema selected",!1;d.value=!0,o.value=null;try{const h=await fetch(`/_api/store/${encodeURIComponent(t.value)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s.value)});if(!h.ok){const V=await h.json().catch(()=>({}));throw new Error(V.error||`Failed to save items: ${h.statusText}`)}const x=await h.json();a.value=ue(s.value),y.value=!1;const C=n.value.findIndex(V=>V.name===t.value);return C!==-1&&(n.value[C].count=x.created??s.value.length),!0}catch(h){return o.value=h instanceof Error?h.message:"Failed to save items",console.error("[ModelsStore] Error saving items:",h),!1}finally{d.value=!1}}async function p(){if(!t.value)return o.value="No schema selected",!1;d.value=!0,o.value=null;try{const h=await fetch(`/_api/store/${encodeURIComponent(t.value)}`,{method:"DELETE"});if(!h.ok)throw new Error(`Failed to clear schema: ${h.statusText}`);s.value=[],a.value=[],y.value=!1;const x=n.value.findIndex(C=>C.name===t.value);return x!==-1&&(n.value[x].count=0),!0}catch(h){return o.value=h instanceof Error?h.message:"Failed to clear schema",console.error("[ModelsStore] Error clearing schema:",h),!1}finally{d.value=!1}}function l(){s.value=ue(a.value),y.value=!1}async function g(){t.value?await k(t.value):await B()}function z(){n.value=[],t.value=null,s.value=[],a.value=[],d.value=!1,o.value=null,y.value=!1}function q(h){const x=n.value.findIndex(C=>C.name===h.schema);x!==-1&&(n.value[x].count=h.count),t.value===h.schema&&(f.value?console.warn(`[ModelsStore] Skipping auto-refresh for schema "${h.schema}" - unsaved changes exist`):k(h.schema))}function P(h){h.success&&(B(),t.value&&(f.value?console.warn(`[ModelsStore] Skipping auto-refresh after reseed for schema "${t.value}" - unsaved changes exist`):k(t.value)))}return{schemas:n,selectedSchema:t,currentItems:s,loading:d,error:o,currentSchema:m,isDirty:f,schemaCount:c,totalItems:E,fetchSchemas:B,selectSchemaByName:b,fetchSchemaData:k,updateItems:N,saveItems:S,clearSchema:p,discardChanges:l,refresh:g,reset:z,handleStoreUpdate:q,handleReseedComplete:P}}),Vt=G.defineStore("registry",()=>{const n=e.ref([]),t=e.ref({totalEndpoints:0,withCustomHandler:0,totalSchemas:0,withCustomSeed:0,autoGenerated:0}),s=e.ref(!1),a=e.ref(null),d=e.ref(""),o=e.ref({methods:[],hasHandler:null,hasSeed:null,tags:[]}),m=e.ref(null),y=e.ref(new Set),f=e.computed(()=>{const r=new Set;for(const u of n.value)for(const $ of u.tags)r.add($);return Array.from(r).sort()}),c=e.computed(()=>{const r=new Set;for(const u of n.value)u.responseSchema&&r.add(u.responseSchema);return Array.from(r).sort()}),E=e.computed(()=>{let r=n.value;if(d.value.trim()){const u=d.value.toLowerCase().trim();r=r.filter($=>$.path.toLowerCase().includes(u)||$.operationId.toLowerCase().includes(u)||$.summary?.toLowerCase().includes(u)||$.tags.some(i=>i.toLowerCase().includes(u)))}return o.value.methods.length>0&&(r=r.filter(u=>o.value.methods.includes(u.method))),o.value.hasHandler!==null&&(r=r.filter(u=>u.hasHandler===o.value.hasHandler)),o.value.hasSeed!==null&&(r=r.filter(u=>u.hasSeed===o.value.hasSeed)),o.value.tags.length>0&&(r=r.filter(u=>u.tags.some($=>o.value.tags.includes($)))),r}),B=e.computed(()=>{const r=new Map;for(const u of E.value){let $;u.tags.length>0?$=u.tags[0]:u.responseSchema?$=u.responseSchema:$=u.path.split("/").filter(Boolean)[0]||"Other",r.has($)||r.set($,[]),r.get($)?.push(u)}return Array.from(r.entries()).map(([u,$])=>({tag:u,endpoints:$.sort((i,_)=>i.path.localeCompare(_.path)),isExpanded:y.value.has(u)})).sort((u,$)=>u.tag.localeCompare($.tag))}),b=e.computed(()=>m.value?n.value.find(r=>r.key===m.value)??null:null),k=e.computed(()=>n.value.filter(r=>r.hasHandler).length),N=e.computed(()=>n.value.filter(r=>r.hasSeed).length);function S(r){n.value=r.endpoints,t.value=r.stats,a.value=null;for(const u of r.endpoints)u.tags.length>0&&y.value.add(u.tags[0])}function p(r){s.value=r}function l(r){a.value=r,s.value=!1}function g(){a.value=null}function z(r){d.value=r}function q(r){const u=o.value.methods.indexOf(r);u===-1?o.value.methods.push(r):o.value.methods.splice(u,1)}function P(r){o.value.hasHandler=r}function h(r){o.value.hasSeed=r}function x(r){const u=o.value.tags.indexOf(r);u===-1?o.value.tags.push(r):o.value.tags.splice(u,1)}function C(){o.value={methods:[],hasHandler:null,hasSeed:null,tags:[]},d.value=""}function V(){return d.value.trim()!==""||o.value.methods.length>0||o.value.hasHandler!==null||o.value.hasSeed!==null||o.value.tags.length>0}function I(r){m.value=r}function Q(r){y.value.has(r)?y.value.delete(r):y.value.add(r)}function ne(){for(const r of B.value)y.value.add(r.tag)}function oe(){y.value.clear()}function se(r){const u=new Set(r);for(const $ of n.value)$.hasHandler=u.has($.operationId)}function T(r){const u=new Set(r);for(const $ of n.value)$.hasSeed=$.responseSchema?u.has($.responseSchema):!1}return{endpoints:n,stats:t,isLoading:s,error:a,searchQuery:d,filter:o,selectedEndpointKey:m,expandedTags:y,allTags:f,allSchemas:c,filteredEndpoints:E,groupedEndpoints:B,selectedEndpoint:b,handlerCount:k,seedCount:N,setRegistryData:S,setLoading:p,setError:l,clearError:g,setSearchQuery:z,toggleMethodFilter:q,setHandlerFilter:P,setSeedFilter:h,toggleTagFilter:x,clearFilters:C,hasActiveFilters:V,selectEndpoint:I,toggleGroup:Q,expandAllGroups:ne,collapseAllGroups:oe,updateHandlerStatus:se,updateSeedStatus:T}}),bt=G.defineStore("timeline",()=>{const n=e.ref([]),t=e.ref(!1),s=e.ref(null),a=e.ref({methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}),d=e.ref(null),o=e.ref(500),m=new Map;function y(i){return i<200?"1xx":i<300?"2xx":i<400?"3xx":i<500?"4xx":"5xx"}const f=e.computed(()=>{let i=n.value;if(a.value.searchQuery.trim()){const _=a.value.searchQuery.toLowerCase().trim();i=i.filter(w=>w.request.path.toLowerCase().includes(_)||w.request.operationId.toLowerCase().includes(_))}return a.value.methods.length>0&&(i=i.filter(_=>a.value.methods.includes(_.request.method.toUpperCase()))),a.value.statusCodes.length>0&&(i=i.filter(_=>{if(_.status===null)return!1;const w=y(_.status);return a.value.statusCodes.includes(w)})),a.value.simulatedOnly!==null&&(i=i.filter(_=>_.simulated===a.value.simulatedOnly)),i}),c=e.computed(()=>d.value?n.value.find(i=>i.id===d.value)??null:null),E=e.computed(()=>n.value.length),B=e.computed(()=>n.value.filter(i=>i.response!==null).length),b=e.computed(()=>n.value.filter(i=>i.response===null).length),k=e.computed(()=>{const i={"1xx":0,"2xx":0,"3xx":0,"4xx":0,"5xx":0};for(const _ of n.value)if(_.status!==null){const w=y(_.status);i[w]++}return i}),N=e.computed(()=>{const i=n.value.filter(w=>w.duration!==null);if(i.length===0)return 0;const _=i.reduce((w,J)=>w+(J.duration??0),0);return Math.round(_/i.length)});function S(i){const _={id:i.id,request:i,response:null,status:null,duration:null,simulated:!1},w=m.get(i.id);w&&(l(_,w),m.delete(i.id)),n.value.unshift(_),n.value.length>o.value&&(n.value=n.value.slice(0,o.value))}function p(i){const _=n.value.find(w=>w.id===i.requestId);if(_)l(_,i),m.delete(i.requestId);else if(m.set(i.requestId,i),m.size>100){const w=g(i);n.value.unshift(w),m.delete(i.requestId),n.value.length>o.value&&(n.value=n.value.slice(0,o.value))}}function l(i,_){i.response=_,i.status=_.status,i.duration=_.duration,i.simulated=_.simulated}function g(i){const _={id:i.requestId,method:"UNKNOWN",path:"/unknown",operationId:"unknown",timestamp:Date.now(),headers:{},query:{},body:void 0};return{id:i.requestId,request:_,response:i,status:i.status,duration:i.duration,simulated:i.simulated}}function z(i){for(const[_,w]of m){const J=i.get(_);J?(l(J,w),m.delete(_)):(i.set(_,g(w)),m.delete(_))}}function q(i,_){for(const[w,J]of _){const W=i.get(w);W?l(W,J):m.set(w,J)}}function P(i){for(const[_,w]of m)i.has(_)||(i.set(_,g(w)),m.delete(_))}function h(i){const _=new Map,w=new Map;for(const W of i.entries)if(W.type==="request"){const Z=W.data;_.set(Z.id,{id:Z.id,request:Z,response:null,status:null,duration:null,simulated:!1})}else if(W.type==="response"){const Z=W.data;w.set(Z.requestId,Z)}z(_),q(_,w),P(_);const J=Array.from(_.values()).sort((W,Z)=>Z.request.timestamp-W.request.timestamp);n.value=J.slice(0,o.value),s.value=null}function x(){n.value=[],d.value=null,m.clear()}function C(i){t.value=i}function V(i){s.value=i,t.value=!1}function I(){s.value=null}function Q(i){a.value.searchQuery=i}function ne(i){const _=a.value.methods.indexOf(i);_===-1?a.value.methods.push(i):a.value.methods.splice(_,1)}function oe(i){const _=a.value.statusCodes.indexOf(i);_===-1?a.value.statusCodes.push(i):a.value.statusCodes.splice(_,1)}function se(i){a.value.simulatedOnly=i}function T(){a.value={methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}}function r(){return a.value.searchQuery.trim()!==""||a.value.methods.length>0||a.value.statusCodes.length>0||a.value.simulatedOnly!==null}function u(i){d.value=i}function $(i){const _=Math.max(1,i);o.value=_,n.value.length>_&&(n.value=n.value.slice(0,_))}return{entries:n,isLoading:t,error:s,filter:a,selectedEntryId:d,maxEntries:o,filteredEntries:f,selectedEntry:c,totalCount:E,completedCount:B,pendingCount:b,statusCounts:k,averageDuration:N,addRequest:S,addResponse:p,setTimelineData:h,clearTimeline:x,setLoading:C,setError:V,clearError:I,setSearchQuery:Q,toggleMethodFilter:ne,toggleStatusFilter:oe,setSimulatedFilter:se,clearFilters:T,hasActiveFilters:r,selectEntry:u,setMaxEntries:$}}),St=["light","dark","system"];function Oe(n){return typeof n=="string"&&St.includes(n)}const xe="openapi-devtools-theme",U=e.ref("system"),Y=e.ref(!1);let fe=null,_e=null;function he(){return typeof window<"u"&&typeof document<"u"}function Ct(){return e.getCurrentInstance()!==null}function Bt(){const n=e.computed(()=>U.value==="system"?Y.value?"dark":"light":U.value),t=e.computed(()=>n.value==="dark");function s(){if(!he())return;const c=document.documentElement;n.value==="dark"?(c.classList.add("dark"),c.classList.remove("light")):(c.classList.add("light"),c.classList.remove("dark"))}function a(c){if(!Oe(c)){console.warn(`[DevTools] Invalid theme mode: ${c}`);return}if(U.value=c,he())try{localStorage.setItem(xe,c)}catch{console.warn("[DevTools] Unable to persist theme preference")}}function d(){U.value==="system"?a(Y.value?"light":"dark"):a(U.value==="dark"?"light":"dark")}function o(){a("system")}function m(){fe&&_e&&(fe.removeEventListener("change",_e),fe=null,_e=null)}function y(){if(!he())return;m();const c=window.matchMedia("(prefers-color-scheme: dark)");Y.value=c.matches;const E=B=>{Y.value=B.matches};c.addEventListener("change",E),fe=c,_e=E;try{const B=localStorage.getItem(xe);Oe(B)&&(U.value=B)}catch{}s()}function f(){if(m(),U.value="system",Y.value=!1,he()){document.documentElement.classList.remove("dark","light");try{localStorage.removeItem(xe)}catch{}}}return e.watch([U,Y],()=>{s()}),Ct()&&(e.onMounted(()=>{y()}),e.onUnmounted(()=>{m()})),{themeMode:e.computed(()=>U.value),effectiveTheme:n,isDark:t,systemPrefersDark:e.computed(()=>Y.value),setTheme:a,toggleTheme:d,resetToSystem:o,initialize:y,resetState:f}}const we={path:"/_ws",reconnectDelay:2e3,maxReconnectAttempts:Number.POSITIVE_INFINITY,autoConnect:!0},F=e.ref("disconnected"),De=e.ref(null),ae=e.ref(0);let M=null,ye=null,ee={...we},Te=!1;const H=new Map;function Le(){return typeof window<"u"&&typeof WebSocket<"u"}function $t(){return e.getCurrentInstance()!==null}function xt(n){return Le()?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${n}`:`ws://localhost${n}`}function He(){ye!==null&&(clearTimeout(ye),ye=null)}function wt(n,t){const s=H.get(n);if(s)for(const d of s)try{d(t)}catch(o){console.error(`[DevTools WebSocket] Error in event handler for '${n}':`,o)}const a=H.get("*");if(a)for(const d of a)try{d({type:n,data:t})}catch(o){console.error("[DevTools WebSocket] Error in wildcard event handler:",o)}}function Dt(){F.value="connected",ae.value=0,He()}function Tt(n){try{const t=JSON.parse(n.data);if(t.type==="connected"){const s=t.data;De.value=s.serverVersion}wt(t.type,t.data)}catch(t){console.error("[DevTools WebSocket] Failed to parse message:",t)}}function zt(){F.value,F.value="disconnected",M=null,ae.value<ee.maxReconnectAttempts&&(F.value="reconnecting",ae.value++,ye=setTimeout(()=>{ze()},ee.reconnectDelay))}function Mt(n){console.error("[DevTools WebSocket] Error:",n)}function ze(){if(!Le()||F.value==="connecting"||F.value==="connected"||M&&(M.readyState===WebSocket.CONNECTING||M.readyState===WebSocket.OPEN))return;Pe(),F.value="connecting";const n=xt(ee.path);try{M=new WebSocket(n),M.onopen=Dt,M.onmessage=Tt,M.onclose=zt,M.onerror=Mt}catch(t){console.error("[DevTools WebSocket] Failed to create WebSocket:",t),F.value="disconnected"}}function Pe(){M&&(M.onopen=null,M.onmessage=null,M.onclose=null,M.onerror=null,(M.readyState===WebSocket.OPEN||M.readyState===WebSocket.CONNECTING)&&M.close(),M=null)}function je(){He(),Pe(),F.value="disconnected",ae.value=0}function It(n){if(!M||M.readyState!==WebSocket.OPEN)return!1;try{return M.send(JSON.stringify(n)),!0}catch(t){return console.error("[DevTools WebSocket] Failed to send command:",t),!1}}function Me(n,t){H.has(n)||H.set(n,new Set);const s=H.get(n);return s&&s.add(t),()=>{const a=H.get(n);a&&(a.delete(t),a.size===0&&H.delete(n))}}function Ie(n,t){const s=H.get(n);s&&(s.delete(t),s.size===0&&H.delete(n))}function qt(n,t){const s=a=>{Ie(n,s),t(a)};return Me(n,s)}function Ft(n,t){const s=a=>{t(a)===!0&&Ie(n,s)};return Me(n,s)}function Rt(){je(),De.value=null,H.clear(),ee={...we},Te=!1}function ge(n={}){(!Te||F.value==="disconnected")&&(ee={...we,...n},Te=!0);const t=e.computed(()=>F.value==="connected"),s=e.computed(()=>F.value==="reconnecting");return $t()&&e.onMounted(()=>{ee.autoConnect&&ze()}),{connectionState:e.computed(()=>F.value),connected:t,isReconnecting:s,serverVersion:e.computed(()=>De.value),reconnectAttempts:e.computed(()=>ae.value),connect:ze,disconnect:je,send:It,on:Me,off:Ie,once:qt,onUntil:Ft,resetState:Rt}}let Ue=!1,Qe=null;function Je(){if(Ue)return Qe;const n=e.createApp(Et),t=G.createPinia();return n.use(t),n.use(it),n.mount("#app"),Ue=!0,Qe=n,n}typeof window<"u"&&document.getElementById("app")&&Je();function ke(n){return n.toUpperCase()}const At={class:"endpoint-detail"},Ot={key:0,class:"endpoint-detail__empty"},Lt={key:1,class:"endpoint-detail__content"},Ht={class:"endpoint-detail__header"},Pt={class:"endpoint-detail__path font-mono"},jt={class:"endpoint-detail__status"},Ut={key:0,class:"endpoint-detail__status-item endpoint-detail__status-item--handler"},Qt={key:1,class:"endpoint-detail__status-item endpoint-detail__status-item--seed"},Jt={key:2,class:"endpoint-detail__status-item endpoint-detail__status-item--security"},Wt={key:3,class:"endpoint-detail__status-item endpoint-detail__status-item--auto"},Gt={class:"endpoint-detail__sections"},Kt={class:"endpoint-detail__section"},Zt={class:"endpoint-detail__section-content font-mono"},Yt={key:0,class:"endpoint-detail__section"},Xt={class:"endpoint-detail__section-title"},vt={class:"endpoint-detail__tags"},en={key:1,class:"endpoint-detail__section"},tn={class:"endpoint-detail__section-content"},nn={key:2,class:"endpoint-detail__section"},on={class:"endpoint-detail__section-content endpoint-detail__description"},sn={key:3,class:"endpoint-detail__section"},ln={class:"endpoint-detail__section-title"},an={class:"endpoint-detail__section-content font-mono"},rn={key:4,class:"endpoint-detail__section"},cn={class:"endpoint-detail__section-title"},dn={class:"endpoint-detail__security"},mn={class:"endpoint-detail__security-name font-mono"},pn={class:"endpoint-detail__security-scopes text-muted"},un=L(e.defineComponent({__name:"EndpointDetail",props:{endpoint:{}},setup(n){const t=n,s=e.computed(()=>t.endpoint?.security&&t.endpoint.security.length>0),a=e.computed(()=>t.endpoint?.security?t.endpoint.security.map(d=>({name:d.name,scopes:d.scopes.length>0?d.scopes.join(", "):"No scopes"})):[]);return(d,o)=>(e.openBlock(),e.createElementBlock("div",At,[n.endpoint?(e.openBlock(),e.createElementBlock("div",Lt,[e.createElementVNode("header",Ht,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge","method-badge--large",`method-badge--${n.endpoint.method}`])},e.toDisplayString(e.unref(ke)(n.endpoint.method)),3),e.createElementVNode("h2",Pt,e.toDisplayString(n.endpoint.path),1)]),e.createElementVNode("div",jt,[n.endpoint.hasHandler?(e.openBlock(),e.createElementBlock("div",Ut,[e.createVNode(e.unref(Ne),{size:14}),o[2]||(o[2]=e.createElementVNode("span",null,"Has custom handler",-1))])):e.createCommentVNode("",!0),n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Qt,[e.createVNode(e.unref(Be),{size:14}),o[3]||(o[3]=e.createElementVNode("span",null,"Has seed data",-1))])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",Jt,[e.createVNode(e.unref(et),{size:14}),o[4]||(o[4]=e.createElementVNode("span",null,"Requires authentication",-1))])):e.createCommentVNode("",!0),!n.endpoint.hasHandler&&!n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Wt,[e.createVNode(e.unref(Se),{size:14}),o[5]||(o[5]=e.createElementVNode("span",null,"Auto-generated response",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Gt,[e.createElementVNode("section",Kt,[o[6]||(o[6]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Operation",-1)),e.createElementVNode("p",Zt,e.toDisplayString(n.endpoint.operationId),1)]),n.endpoint.tags.length>0?(e.openBlock(),e.createElementBlock("section",Yt,[e.createElementVNode("h3",Xt,[e.createVNode(e.unref(lt),{size:14}),o[7]||(o[7]=e.createTextVNode(" Tags ",-1))]),e.createElementVNode("div",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.endpoint.tags,m=>(e.openBlock(),e.createElementBlock("span",{key:m,class:"endpoint-detail__tag"},e.toDisplayString(m),1))),128))])])):e.createCommentVNode("",!0),n.endpoint.summary?(e.openBlock(),e.createElementBlock("section",en,[o[8]||(o[8]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Summary",-1)),e.createElementVNode("p",tn,e.toDisplayString(n.endpoint.summary),1)])):e.createCommentVNode("",!0),n.endpoint.description?(e.openBlock(),e.createElementBlock("section",nn,[o[9]||(o[9]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Description",-1)),e.createElementVNode("p",on,e.toDisplayString(n.endpoint.description),1)])):e.createCommentVNode("",!0),n.endpoint.responseSchema?(e.openBlock(),e.createElementBlock("section",sn,[e.createElementVNode("h3",ln,[e.createVNode(e.unref(Se),{size:14}),o[10]||(o[10]=e.createTextVNode(" Response Schema ",-1))]),e.createElementVNode("p",an,e.toDisplayString(n.endpoint.responseSchema),1)])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("section",rn,[e.createElementVNode("h3",cn,[e.createVNode(e.unref(st),{size:14}),o[11]||(o[11]=e.createTextVNode(" Security ",-1))]),e.createElementVNode("div",dn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,m=>(e.openBlock(),e.createElementBlock("div",{key:m.name,class:"endpoint-detail__security-item"},[e.createElementVNode("span",mn,e.toDisplayString(m.name),1),e.createElementVNode("span",pn,e.toDisplayString(m.scopes),1)]))),128))])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",Ot,[e.createVNode(e.unref(Se),{size:48,class:"endpoint-detail__empty-icon"}),o[0]||(o[0]=e.createElementVNode("h3",{class:"endpoint-detail__empty-title"},"No endpoint selected",-1)),o[1]||(o[1]=e.createElementVNode("p",{class:"endpoint-detail__empty-text text-muted"}," Select an endpoint from the list to view its details ",-1))]))]))}}),[["__scopeId","data-v-c66a0f52"]]),fn={class:"endpoint-list"},_n={key:0,class:"endpoint-list__empty"},hn={key:1,class:"endpoint-list__groups"},yn=["aria-expanded","aria-controls","onClick"],gn={class:"endpoint-group__tag"},kn={class:"endpoint-group__count text-muted"},En=["id","aria-label"],Nn=["aria-selected","onClick"],Vn={class:"endpoint-item__path font-mono"},bn={class:"endpoint-item__indicators"},Sn={key:0,class:"endpoint-item__indicator endpoint-item__indicator--handler",title:"Has custom handler"},Cn={key:1,class:"endpoint-item__indicator endpoint-item__indicator--seed",title:"Has seed data"},Bn=L(e.defineComponent({__name:"EndpointList",props:{groups:{},selectedKey:{}},emits:["select","toggle-group"],setup(n,{emit:t}){const s=n,a=t;function d(y){a("select",y.key)}function o(y){a("toggle-group",y)}function m(y){return s.selectedKey===y.key}return(y,f)=>(e.openBlock(),e.createElementBlock("div",fn,[n.groups.length===0?(e.openBlock(),e.createElementBlock("div",_n,[...f[0]||(f[0]=[e.createElementVNode("p",{class:"text-muted"},"No endpoints found",-1)])])):(e.openBlock(),e.createElementBlock("div",hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.groups,c=>(e.openBlock(),e.createElementBlock("div",{key:c.tag,class:"endpoint-group"},[e.createElementVNode("button",{type:"button",class:"endpoint-group__header","aria-expanded":c.isExpanded,"aria-controls":`group-${c.tag}`,onClick:E=>o(c.tag)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.isExpanded?e.unref(K):e.unref(X)),{size:16,class:"endpoint-group__chevron"})),e.createElementVNode("span",gn,e.toDisplayString(c.tag),1),e.createElementVNode("span",kn," ("+e.toDisplayString(c.endpoints.length)+") ",1)],8,yn),e.withDirectives(e.createElementVNode("div",{id:`group-${c.tag}`,class:"endpoint-group__items",role:"group","aria-label":`${c.tag} endpoints`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.endpoints,E=>(e.openBlock(),e.createElementBlock("button",{key:E.key,type:"button",class:e.normalizeClass(["endpoint-item",{"endpoint-item--selected":m(E)}]),"aria-selected":m(E),onClick:B=>d(E)},[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${E.method}`])},e.toDisplayString(e.unref(ke)(E.method)),3),e.createElementVNode("span",Vn,e.toDisplayString(E.path),1),e.createElementVNode("div",bn,[E.hasHandler?(e.openBlock(),e.createElementBlock("span",Sn,[e.createVNode(e.unref(Ne),{size:12})])):e.createCommentVNode("",!0),E.hasSeed?(e.openBlock(),e.createElementBlock("span",Cn,[e.createVNode(e.unref(Be),{size:12})])):e.createCommentVNode("",!0)])],10,Nn))),128))],8,En),[[e.vShow,c.isExpanded]])]))),128))]))]))}}),[["__scopeId","data-v-554ffe63"]]),$n={class:"routes-page"},xn={class:"routes-toolbar"},wn={class:"routes-search"},Dn=["value"],Tn=["aria-expanded"],zn={key:0,class:"routes-filter-toggle__badge"},Mn={class:"routes-stats"},In={class:"routes-stats__item"},qn={class:"routes-stats__item"},Fn={key:0,class:"routes-filters"},Rn={class:"routes-filters__section"},An={class:"routes-filters__methods"},On=["onClick"],Ln={class:"routes-filters__section"},Hn={class:"routes-filters__status"},Pn={key:0,class:"routes-filters__actions"},jn={class:"routes-content"},Un={key:0,class:"routes-loading"},Qn={key:1,class:"routes-error"},Jn={class:"routes-error__message"},Wn={key:2,class:"routes-empty empty-state"},Gn={key:3,class:"routes-empty empty-state"},Kn={class:"routes-list-panel"},Zn={class:"routes-detail-panel"},Yn=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"RoutesPage",setup(n){const t=Vt(),{send:s,on:a,connected:d}=ge(),o=e.ref(!1),m=e.ref(null),y=["get","post","put","patch","delete","options","head","trace"];function f(){d.value&&(t.setLoading(!0),s({type:"get:registry"}))}function c(C){t.setRegistryData(C),t.setLoading(!1)}function E(C){t.selectEndpoint(C)}function B(C){t.toggleGroup(C)}function b(C){const V=C.target;t.setSearchQuery(V.value)}function k(){t.setSearchQuery(""),m.value?.focus()}function N(C){t.toggleMethodFilter(C)}function S(C){return t.filter.methods.includes(C)}function p(){const C=t.filter.hasHandler;t.setHandlerFilter(C===!0?null:!0)}function l(){const C=t.filter.hasSeed;t.setSeedFilter(C===!0?null:!0)}function g(){t.clearFilters()}function z(){o.value=!o.value}const q=e.computed(()=>t.hasActiveFilters());let P=null,h=null,x=null;return e.onMounted(()=>{P=a("registry",c),h=a("handlers:updated",()=>f()),x=a("seeds:updated",()=>f()),d.value&&f()}),e.onUnmounted(()=>{P?.(),h?.(),x?.()}),e.watch(d,C=>{C&&f()}),(C,V)=>(e.openBlock(),e.createElementBlock("div",$n,[e.createElementVNode("div",xn,[e.createElementVNode("div",wn,[e.createVNode(e.unref(me),{size:16,class:"routes-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:m,type:"text",class:"routes-search__input input",placeholder:"Search endpoints...",value:e.unref(t).searchQuery,onInput:b},null,40,Dn),e.unref(t).searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"routes-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:k},[e.createVNode(e.unref(le),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filter-toggle btn btn--secondary",{"routes-filter-toggle--active":q.value}]),"aria-expanded":o.value,onClick:z},[e.createVNode(e.unref(Re),{size:16}),V[0]||(V[0]=e.createElementVNode("span",null,"Filters",-1)),q.value?(e.openBlock(),e.createElementBlock("span",zn,e.toDisplayString(e.unref(t).filter.methods.length+(e.unref(t).filter.hasHandler?1:0)+(e.unref(t).filter.hasSeed?1:0)),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value?e.unref(Fe):e.unref(K)),{size:14}))],10,Tn),e.createElementVNode("div",Mn,[e.createElementVNode("span",In,e.toDisplayString(e.unref(t).filteredEndpoints.length)+" endpoints ",1),V[1]||(V[1]=e.createElementVNode("span",{class:"routes-stats__separator"},"|",-1)),e.createElementVNode("span",qn,e.toDisplayString(e.unref(t).allTags.length)+" tags ",1)])]),o.value?(e.openBlock(),e.createElementBlock("div",Fn,[e.createElementVNode("div",Rn,[V[2]||(V[2]=e.createElementVNode("h4",{class:"routes-filters__title"},"Methods",-1)),e.createElementVNode("div",An,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(y,I=>e.createElementVNode("button",{key:I,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${I}`,{"method-badge--inactive":!S(I)&&e.unref(t).filter.methods.length>0}]),onClick:Q=>N(I)},e.toDisplayString(I.toUpperCase()),11,On)),64))])]),e.createElementVNode("div",Ln,[V[5]||(V[5]=e.createElementVNode("h4",{class:"routes-filters__title"},"Status",-1)),e.createElementVNode("div",Hn,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasHandler}]),onClick:p},[e.createVNode(e.unref(Ne),{size:14}),V[3]||(V[3]=e.createElementVNode("span",null,"Has Handler",-1))],2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasSeed}]),onClick:l},[e.createVNode(e.unref(Be),{size:14}),V[4]||(V[4]=e.createElementVNode("span",null,"Has Seed",-1))],2)])]),q.value?(e.openBlock(),e.createElementBlock("div",Pn,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:g},[e.createVNode(e.unref(le),{size:14}),V[6]||(V[6]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",jn,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",Un,[...V[7]||(V[7]=[e.createElementVNode("div",{class:"routes-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading endpoints...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("p",Jn,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:f}," Retry ")])):e.unref(t).endpoints.length===0?(e.openBlock(),e.createElementBlock("div",Wn,[e.createVNode(e.unref(Ce),{size:48,class:"empty-state__icon"}),V[8]||(V[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No endpoints found",-1)),V[9]||(V[9]=e.createElementVNode("p",{class:"empty-state__description"}," No API endpoints are available. Make sure your OpenAPI spec is loaded. ",-1))])):e.unref(t).filteredEndpoints.length===0?(e.openBlock(),e.createElementBlock("div",Gn,[e.createVNode(e.unref(me),{size:48,class:"empty-state__icon"}),V[10]||(V[10]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching endpoints",-1)),V[11]||(V[11]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),q.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:g}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Kn,[e.createVNode(Bn,{groups:e.unref(t).groupedEndpoints,"selected-key":e.unref(t).selectedEndpointKey,onSelect:E,onToggleGroup:B},null,8,["groups","selected-key"])]),e.createElementVNode("div",Zn,[e.createVNode(un,{endpoint:e.unref(t).selectedEndpoint},null,8,["endpoint"])])],64))])]))}}),[["__scopeId","data-v-bdd419e3"]])},Symbol.toStringTag,{value:"Module"})),Xn={class:"timeline-detail"},vn={key:0,class:"timeline-detail__empty"},eo={key:1,class:"timeline-detail__content"},to={class:"timeline-detail__header"},no={class:"timeline-detail__summary"},oo={class:"timeline-detail__path font-mono"},so={class:"timeline-detail__meta"},lo={key:1,class:"status-badge status-badge--pending"},ao={class:"timeline-detail__duration"},ro={key:2,class:"timeline-detail__simulated",title:"Simulated response"},io={class:"timeline-detail__actions"},co={class:"timeline-detail__info"},mo={class:"timeline-detail__info-item"},po={class:"timeline-detail__info-value font-mono"},uo={class:"timeline-detail__info-item"},fo={class:"timeline-detail__info-value font-mono"},_o={class:"timeline-detail__info-item"},ho={class:"timeline-detail__info-value font-mono"},yo={class:"timeline-detail__section"},go={key:0,class:"timeline-detail__subsection"},ko=["aria-expanded"],Eo={class:"text-muted"},No={id:"requestQuery-panel",class:"timeline-detail__subsection-content"},Vo={class:"timeline-detail__kv-key font-mono"},bo={class:"timeline-detail__kv-value font-mono"},So={key:1,class:"timeline-detail__subsection"},Co=["aria-expanded"],Bo={class:"text-muted"},$o={id:"requestHeaders-panel",class:"timeline-detail__subsection-content"},xo={class:"timeline-detail__kv-key font-mono"},wo={class:"timeline-detail__kv-value font-mono"},Do={key:2,class:"timeline-detail__subsection"},To={class:"timeline-detail__subsection-header",role:"group"},zo=["aria-expanded"],Mo={id:"requestBody-panel",class:"timeline-detail__subsection-content"},Io={class:"timeline-detail__json"},qo={key:0,class:"timeline-detail__section"},Fo={key:0,class:"timeline-detail__subsection"},Ro=["aria-expanded"],Ao={class:"text-muted"},Oo={id:"responseHeaders-panel",class:"timeline-detail__subsection-content"},Lo={class:"timeline-detail__kv-key font-mono"},Ho={class:"timeline-detail__kv-value font-mono"},Po={key:1,class:"timeline-detail__subsection"},jo={class:"timeline-detail__subsection-header",role:"group"},Uo=["aria-expanded"],Qo={id:"responseBody-panel",class:"timeline-detail__subsection-content"},Jo={class:"timeline-detail__json"},Wo={key:1,class:"timeline-detail__section timeline-detail__section--pending"},Go={class:"timeline-detail__pending"},Ko=L(e.defineComponent({__name:"TimelineDetail",props:{entry:{}},setup(n){const t=n,s=e.ref({requestHeaders:!0,requestQuery:!0,requestBody:!0,responseHeaders:!0,responseBody:!0}),a=e.ref(null),d=e.computed(()=>t.entry?new Date(t.entry.request.timestamp).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1}):""),o=e.computed(()=>t.entry?.duration==null?"pending...":t.entry.duration<1e3?`${t.entry.duration}ms`:`${(t.entry.duration/1e3).toFixed(2)}s`),m=e.computed(()=>t.entry?.status?t.entry.status<200?"status-badge--1xx":t.entry.status<300?"status-badge--2xx":t.entry.status<400?"status-badge--3xx":t.entry.status<500?"status-badge--4xx":"status-badge--5xx":"status-badge--pending"),y=e.computed(()=>t.entry?.request.query?Object.keys(t.entry.request.query).length>0:!1),f=e.computed(()=>t.entry?.request.headers?Object.keys(t.entry.request.headers).length>0:!1),c=e.computed(()=>t.entry?.request.body!==void 0&&t.entry?.request.body!==null),E=e.computed(()=>t.entry?.response?.headers?Object.keys(t.entry.response.headers).length>0:!1),B=e.computed(()=>t.entry?.response?.body!==void 0&&t.entry?.response?.body!==null);function b(p){try{return JSON.stringify(p,null,2)}catch{return String(p)}}function k(p){s.value[p]=!s.value[p]}async function N(p,l){try{await navigator.clipboard.writeText(p),a.value=l,setTimeout(()=>{a.value=null},2e3)}catch(g){console.error("Failed to copy:",g)}}async function S(){if(!t.entry)return;const p={request:t.entry.request,response:t.entry.response};await N(JSON.stringify(p,null,2),"full")}return(p,l)=>(e.openBlock(),e.createElementBlock("div",Xn,[n.entry?(e.openBlock(),e.createElementBlock("div",eo,[e.createElementVNode("div",to,[e.createElementVNode("div",no,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(ke)(n.entry.request.method)),3),e.createElementVNode("span",oo,e.toDisplayString(n.entry.request.path),1)]),e.createElementVNode("div",so,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",m.value])},e.toDisplayString(n.entry.status),3)):(e.openBlock(),e.createElementBlock("span",lo,"pending")),e.createElementVNode("span",ao,[e.createVNode(e.unref(j),{size:14}),e.createTextVNode(" "+e.toDisplayString(o.value),1)]),n.entry.simulated?(e.openBlock(),e.createElementBlock("span",ro,[e.createVNode(e.unref(v),{size:14}),l[9]||(l[9]=e.createTextVNode(" Simulated ",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",io,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--sm",title:"Copy as JSON",onClick:S},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value==="full"?e.unref(de):e.unref(Ve)),{size:14})),e.createTextVNode(" "+e.toDisplayString(a.value==="full"?"Copied!":"Copy JSON"),1)])])]),e.createElementVNode("div",co,[e.createElementVNode("div",mo,[l[10]||(l[10]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Timestamp",-1)),e.createElementVNode("span",po,e.toDisplayString(d.value),1)]),e.createElementVNode("div",uo,[l[11]||(l[11]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Operation ID",-1)),e.createElementVNode("span",fo,e.toDisplayString(n.entry.request.operationId),1)]),e.createElementVNode("div",_o,[l[12]||(l[12]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Request ID",-1)),e.createElementVNode("span",ho,e.toDisplayString(n.entry.id),1)])]),e.createElementVNode("div",yo,[l[16]||(l[16]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Request",-1)),y.value?(e.openBlock(),e.createElementBlock("div",go,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":s.value.requestQuery,"aria-controls":"requestQuery-panel",onClick:l[0]||(l[0]=g=>k("requestQuery"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value.requestQuery?e.unref(K):e.unref(X)),{size:16})),l[13]||(l[13]=e.createElementVNode("span",null,"Query Parameters",-1)),e.createElementVNode("span",Eo,"("+e.toDisplayString(Object.keys(n.entry.request.query).length)+")",1)],8,ko),e.withDirectives(e.createElementVNode("div",No,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.query,(g,z)=>(e.openBlock(),e.createElementBlock("div",{key:z,class:"timeline-detail__kv-row"},[e.createElementVNode("span",Vo,e.toDisplayString(z),1),e.createElementVNode("span",bo,e.toDisplayString(Array.isArray(g)?g.join(", "):g),1)]))),128))],512),[[e.vShow,s.value.requestQuery]])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("div",So,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":s.value.requestHeaders,"aria-controls":"requestHeaders-panel",onClick:l[1]||(l[1]=g=>k("requestHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value.requestHeaders?e.unref(K):e.unref(X)),{size:16})),l[14]||(l[14]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",Bo,"("+e.toDisplayString(Object.keys(n.entry.request.headers).length)+")",1)],8,Co),e.withDirectives(e.createElementVNode("div",$o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.headers,(g,z)=>(e.openBlock(),e.createElementBlock("div",{key:z,class:"timeline-detail__kv-row"},[e.createElementVNode("span",xo,e.toDisplayString(z),1),e.createElementVNode("span",wo,e.toDisplayString(g),1)]))),128))],512),[[e.vShow,s.value.requestHeaders]])])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",Do,[e.createElementVNode("div",To,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":s.value.requestBody,"aria-controls":"requestBody-panel",onClick:l[2]||(l[2]=g=>k("requestBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value.requestBody?e.unref(K):e.unref(X)),{size:16})),l[15]||(l[15]=e.createElementVNode("span",null,"Body",-1))],8,zo),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:l[3]||(l[3]=e.withModifiers(g=>N(b(n.entry.request.body),"reqBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value==="reqBody"?e.unref(de):e.unref(Ve)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",Mo,[e.createElementVNode("pre",Io,e.toDisplayString(b(n.entry.request.body)),1)],512),[[e.vShow,s.value.requestBody]])])):e.createCommentVNode("",!0)]),n.entry.response?(e.openBlock(),e.createElementBlock("div",qo,[l[19]||(l[19]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),E.value?(e.openBlock(),e.createElementBlock("div",Fo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":s.value.responseHeaders,"aria-controls":"responseHeaders-panel",onClick:l[4]||(l[4]=g=>k("responseHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value.responseHeaders?e.unref(K):e.unref(X)),{size:16})),l[17]||(l[17]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",Ao,"("+e.toDisplayString(Object.keys(n.entry.response.headers).length)+")",1)],8,Ro),e.withDirectives(e.createElementVNode("div",Oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.response.headers,(g,z)=>(e.openBlock(),e.createElementBlock("div",{key:z,class:"timeline-detail__kv-row"},[e.createElementVNode("span",Lo,e.toDisplayString(z),1),e.createElementVNode("span",Ho,e.toDisplayString(g),1)]))),128))],512),[[e.vShow,s.value.responseHeaders]])])):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createElementBlock("div",Po,[e.createElementVNode("div",jo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":s.value.responseBody,"aria-controls":"responseBody-panel",onClick:l[5]||(l[5]=g=>k("responseBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value.responseBody?e.unref(K):e.unref(X)),{size:16})),l[18]||(l[18]=e.createElementVNode("span",null,"Body",-1))],8,Uo),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:l[6]||(l[6]=e.withModifiers(g=>N(b(n.entry.response.body),"resBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value==="resBody"?e.unref(de):e.unref(Ve)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",Qo,[e.createElementVNode("pre",Jo,e.toDisplayString(b(n.entry.response.body)),1)],512),[[e.vShow,s.value.responseBody]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Wo,[l[21]||(l[21]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),e.createElementVNode("div",Go,[e.createVNode(e.unref(j),{size:24,class:"timeline-detail__pending-icon"}),l[20]||(l[20]=e.createElementVNode("span",{class:"text-muted"},"Waiting for response...",-1))])]))])):(e.openBlock(),e.createElementBlock("div",vn,[e.createVNode(e.unref(j),{size:48,class:"timeline-detail__empty-icon"}),l[7]||(l[7]=e.createElementVNode("h3",{class:"timeline-detail__empty-title"},"Select an entry",-1)),l[8]||(l[8]=e.createElementVNode("p",{class:"timeline-detail__empty-description"}," Click on a timeline entry to view its details. ",-1))]))]))}}),[["__scopeId","data-v-b4bdd2d2"]]),Zo={class:"timeline-entry__time font-mono text-muted"},Yo={class:"timeline-entry__method"},Xo={class:"timeline-entry__path font-mono"},vo={class:"timeline-entry__status"},es={key:1,class:"status-badge status-badge--pending"},ts={class:"timeline-entry__duration font-mono text-muted"},ns={key:0,class:"timeline-entry__simulated",title:"Simulated response"},os=L(e.defineComponent({__name:"TimelineEntry",props:{entry:{},isSelected:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const s=n,a=t,d=e.computed(()=>new Date(s.entry.request.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})),o=e.computed(()=>s.entry.duration===null?"pending...":s.entry.duration<1e3?`${s.entry.duration}ms`:`${(s.entry.duration/1e3).toFixed(2)}s`),m=e.computed(()=>s.entry.status===null?"status-badge--pending":s.entry.status<200?"status-badge--1xx":s.entry.status<300?"status-badge--2xx":s.entry.status<400?"status-badge--3xx":s.entry.status<500?"status-badge--4xx":"status-badge--5xx"),y=e.computed(()=>s.entry.status===null?j:s.entry.status<400?ve:$e),f=e.computed(()=>s.entry.response===null);function c(){a("select",s.entry.id)}return(E,B)=>(e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(["timeline-entry",{"timeline-entry--selected":n.isSelected},{"timeline-entry--pending":f.value},{"timeline-entry--simulated":n.entry.simulated}]),onClick:c},[e.createElementVNode("div",Zo,e.toDisplayString(d.value),1),e.createElementVNode("div",Yo,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(ke)(n.entry.request.method)),3)]),e.createElementVNode("div",Xo,e.toDisplayString(n.entry.request.path),1),e.createElementVNode("div",vo,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",m.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),{size:12})),e.createTextVNode(" "+e.toDisplayString(n.entry.status),1)],2)):(e.openBlock(),e.createElementBlock("span",es,[e.createVNode(e.unref(j),{size:12}),B[0]||(B[0]=e.createTextVNode(" pending ",-1))]))]),e.createElementVNode("div",ts,e.toDisplayString(o.value),1),n.entry.simulated?(e.openBlock(),e.createElementBlock("div",ns,[e.createVNode(e.unref(v),{size:14})])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-a073dbdf"]]),ss={class:"timeline-page"},ls={class:"timeline-toolbar"},as={class:"timeline-search"},rs=["value"],is=["aria-expanded"],cs={key:0,class:"timeline-filter-toggle__badge"},ds={class:"timeline-stats"},ms={class:"timeline-stats__item"},ps={key:0,class:"timeline-stats__separator"},us={key:1,class:"timeline-stats__item"},fs=["disabled"],_s={key:0,class:"timeline-filters"},hs={class:"timeline-filters__section"},ys={class:"timeline-filters__methods"},gs=["onClick"],ks={class:"timeline-filters__section"},Es={class:"timeline-filters__status"},Ns=["onClick"],Vs={class:"timeline-filters__status-count"},bs={class:"timeline-filters__section"},Ss={class:"timeline-filters__type"},Cs={key:0,class:"timeline-filters__actions"},Bs={class:"timeline-content"},$s={key:0,class:"timeline-loading"},xs={key:1,class:"timeline-error"},ws={class:"timeline-error__message"},Ds={key:2,class:"timeline-empty empty-state"},Ts={key:3,class:"timeline-empty empty-state"},zs={class:"timeline-list-panel"},Ms={class:"timeline-list"},Is={class:"timeline-detail-panel"},qs=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"TimelinePage",setup(n){const t=bt(),{send:s,on:a,connected:d}=ge(),o=e.ref(!1),m=e.ref(null),y=["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD","TRACE"],f=["2xx","3xx","4xx","5xx"];function c(){d.value&&(t.setLoading(!0),s({type:"get:timeline"}))}function E(T){t.setTimelineData(T),t.setLoading(!1)}function B(T){t.addRequest(T)}function b(T){t.addResponse(T)}function k(){t.clearTimeline()}function N(){s({type:"clear:timeline"}),t.clearTimeline()}function S(T){t.selectEntry(T)}function p(T){const r=T.target;t.setSearchQuery(r.value)}function l(){t.setSearchQuery(""),m.value?.focus()}function g(T){t.toggleMethodFilter(T)}function z(T){return t.filter.methods.includes(T)}function q(T){t.toggleStatusFilter(T)}function P(T){return t.filter.statusCodes.includes(T)}function h(){const T=t.filter.simulatedOnly;t.setSimulatedFilter(T===!0?null:!0)}function x(){t.clearFilters()}function C(){o.value=!o.value}const V=e.computed(()=>t.hasActiveFilters()),I=e.computed(()=>t.filter.methods.length+t.filter.statusCodes.length+(t.filter.simulatedOnly!==null?1:0));let Q=null,ne=null,oe=null,se=null;return e.onMounted(()=>{Q=a("timeline",E),ne=a("request",B),oe=a("response",b),se=a("timeline:cleared",k),d.value&&c()}),e.onUnmounted(()=>{Q?.(),ne?.(),oe?.(),se?.()}),e.watch(d,T=>{T&&c()}),(T,r)=>(e.openBlock(),e.createElementBlock("div",ss,[e.createElementVNode("div",ls,[e.createElementVNode("div",as,[e.createVNode(e.unref(me),{size:16,class:"timeline-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:m,type:"text",class:"timeline-search__input input",placeholder:"Search by path or operation...",value:e.unref(t).filter.searchQuery,onInput:p},null,40,rs),e.unref(t).filter.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"timeline-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:l},[e.createVNode(e.unref(le),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filter-toggle btn btn--secondary",{"timeline-filter-toggle--active":V.value}]),"aria-expanded":o.value,onClick:C},[e.createVNode(e.unref(Re),{size:16}),r[0]||(r[0]=e.createElementVNode("span",null,"Filters",-1)),I.value>0?(e.openBlock(),e.createElementBlock("span",cs,e.toDisplayString(I.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value?e.unref(Fe):e.unref(K)),{size:14}))],10,is),e.createElementVNode("div",ds,[e.createElementVNode("span",ms,e.toDisplayString(e.unref(t).filteredEntries.length)+" requests ",1),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",ps,"|")):e.createCommentVNode("",!0),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",us," avg "+e.toDisplayString(e.unref(t).averageDuration)+"ms ",1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:"btn btn--secondary btn--icon",title:"Clear timeline",disabled:e.unref(t).entries.length===0,onClick:N},[e.createVNode(e.unref(pe),{size:16})],8,fs)]),o.value?(e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",hs,[r[1]||(r[1]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Methods",-1)),e.createElementVNode("div",ys,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(y,u=>e.createElementVNode("button",{key:u,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${u.toLowerCase()}`,{"method-badge--inactive":!z(u)&&e.unref(t).filter.methods.length>0}]),onClick:$=>g(u)},e.toDisplayString(u),11,gs)),64))])]),e.createElementVNode("div",ks,[r[2]||(r[2]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Status",-1)),e.createElementVNode("div",Es,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(f,u=>e.createElementVNode("button",{key:u,type:"button",class:e.normalizeClass(["timeline-filters__status-btn",`timeline-filters__status-btn--${u}`,{"timeline-filters__status-btn--active":P(u)}]),onClick:$=>q(u)},[e.createTextVNode(e.toDisplayString(u)+" ",1),e.createElementVNode("span",Vs," ("+e.toDisplayString(e.unref(t).statusCounts[u])+") ",1)],10,Ns)),64))])]),e.createElementVNode("div",bs,[r[3]||(r[3]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Type",-1)),e.createElementVNode("div",Ss,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filters__status-btn",{"timeline-filters__status-btn--active":e.unref(t).filter.simulatedOnly}]),onClick:h}," Simulated only ",2)])]),V.value?(e.openBlock(),e.createElementBlock("div",Cs,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:x},[e.createVNode(e.unref(le),{size:14}),r[4]||(r[4]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Bs,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",$s,[...r[5]||(r[5]=[e.createElementVNode("div",{class:"timeline-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading timeline...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",xs,[e.createElementVNode("p",ws,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:c}," Retry ")])):e.unref(t).entries.length===0?(e.openBlock(),e.createElementBlock("div",Ds,[e.createVNode(e.unref(j),{size:48,class:"empty-state__icon"}),r[6]||(r[6]=e.createElementVNode("h3",{class:"empty-state__title"},"No requests yet",-1)),r[7]||(r[7]=e.createElementVNode("p",{class:"empty-state__description"}," API requests will appear here in real-time as they are made. ",-1))])):e.unref(t).filteredEntries.length===0?(e.openBlock(),e.createElementBlock("div",Ts,[e.createVNode(e.unref(me),{size:48,class:"empty-state__icon"}),r[8]||(r[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching requests",-1)),r[9]||(r[9]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),V.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:x}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",zs,[e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).filteredEntries,u=>(e.openBlock(),e.createBlock(os,{key:u.id,entry:u,"is-selected":e.unref(t).selectedEntryId===u.id,onSelect:S},null,8,["entry","is-selected"]))),128))])]),e.createElementVNode("div",Is,[e.createVNode(Ko,{entry:e.unref(t).selectedEntry},null,8,["entry"])])],64))])]))}}),[["__scopeId","data-v-a5c73778"]])},Symbol.toStringTag,{value:"Module"})),Fs={class:"json-editor"},Rs={class:"json-editor__container"},As={class:"json-editor__lines","aria-hidden":"true"},Os=["value","readonly","placeholder"],Ls={class:"json-editor__status"},Hs={class:"json-editor__status-left"},Ps={key:0,class:"json-editor__valid"},js={key:1,class:"json-editor__error"},Us={class:"json-editor__status-right"},Qs={class:"json-editor__info"},Js=L(e.defineComponent({__name:"JsonEditor",props:{modelValue:{},readonly:{type:Boolean,default:!1},placeholder:{default:"Enter JSON data..."},minHeight:{default:200}},emits:["update:modelValue"],setup(n,{expose:t,emit:s}){const a=n,d=s,o=e.ref(""),m=e.ref(null),y=e.computed(()=>m.value===null),f=e.computed(()=>o.value.split(`
|
|
2
|
+
`).length),c=e.computed(()=>Array.from({length:f.value},(S,p)=>p+1));function E(){try{o.value=JSON.stringify(a.modelValue,null,2),m.value=null}catch{o.value="",m.value="Invalid initial value"}}E(),e.watch(()=>a.modelValue,()=>{try{const S=JSON.parse(o.value);JSON.stringify(S)!==JSON.stringify(a.modelValue)&&E()}catch{E()}});function B(S){const p=S.target;o.value=p.value,b()}function b(){if(o.value.trim()===""){m.value=null,d("update:modelValue",[]);return}try{const S=JSON.parse(o.value);m.value=null,d("update:modelValue",S)}catch(S){if(S instanceof Error){const p=S.message.match(/position (\d+)/);if(p){const l=Number.parseInt(p[1],10),g=o.value.substring(0,l).split(`
|
|
3
|
+
`),z=g.length,q=g[g.length-1].length+1;m.value=`Line ${z}, Column ${q}: ${S.message}`}else m.value=S.message}else m.value="Invalid JSON"}}function k(){try{const S=JSON.parse(o.value);o.value=JSON.stringify(S,null,2),m.value=null,d("update:modelValue",S)}catch{}}function N(S){if(S.key==="Tab"){S.preventDefault();const p=S.target,l=p.selectionStart,g=p.selectionEnd,z=`${o.value.substring(0,l)} ${o.value.substring(g)}`;o.value=z,setTimeout(()=>{p.selectionStart=p.selectionEnd=l+2},0),b()}}return t({formatJson:k,isValid:y}),(S,p)=>(e.openBlock(),e.createElementBlock("div",Fs,[e.createElementVNode("div",Rs,[e.createElementVNode("div",As,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"json-editor__line-number"},e.toDisplayString(l),1))),128))]),e.createElementVNode("textarea",{value:o.value,readonly:n.readonly,placeholder:n.placeholder,style:e.normalizeStyle({minHeight:`${n.minHeight}px`}),class:"json-editor__textarea",spellcheck:"false",onInput:B,onKeydown:N},null,44,Os)]),e.createElementVNode("div",Ls,[e.createElementVNode("div",Hs,[y.value?(e.openBlock(),e.createElementBlock("div",Ps,[e.createVNode(e.unref(de),{size:14}),p[0]||(p[0]=e.createElementVNode("span",null,"Valid JSON",-1))])):m.value?(e.openBlock(),e.createElementBlock("div",js,[e.createVNode(e.unref(Xe),{size:14}),e.createElementVNode("span",null,e.toDisplayString(m.value),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Us,[e.createElementVNode("span",Qs,e.toDisplayString(f.value)+" lines",1)])])]))}}),[["__scopeId","data-v-dbd5ce20"]]),re=e.ref([]),O=e.reactive({visible:!1,title:"",message:"",confirmText:"Confirm",cancelText:"Cancel",onConfirm:null,onCancel:null}),te=new Map;let R=null,Ws=0;function Gs(){return`toast-${Date.now()}-${Ws++}`}function Ee(n,t,s=3e3){const a=Gs(),d={id:a,type:n,message:t,duration:s,timestamp:Date.now()};if(re.value.push(d),s>0){const o=setTimeout(()=>{We(a),te.delete(a)},s);te.set(a,o)}return a}function We(n){const t=te.get(n);t!==void 0&&(clearTimeout(t),te.delete(n));const s=re.value.findIndex(a=>a.id===n);s!==-1&&re.value.splice(s,1)}function Ks(){function n(f,c){return Ee("success",f,c)}function t(f,c){return Ee("error",f,c)}function s(f,c){return Ee("info",f,c)}function a(f,c){return Ee("warning",f,c)}function d(f,c){return new Promise(E=>{R&&(R(!1),R=null),R=E,O.visible=!0,O.title=c?.title||"Confirm",O.message=f,O.confirmText=c?.confirmText||"Confirm",O.cancelText=c?.cancelText||"Cancel",O.onConfirm=()=>{O.visible=!1,R&&(R(!0),R=null)},O.onCancel=()=>{O.visible=!1,R&&(R(!1),R=null)}})}function o(){O.visible=!1,R&&(R(!1),R=null)}function m(f){We(f)}function y(){for(const f of te.values())clearTimeout(f);te.clear(),re.value=[]}return{toasts:re,confirmDialog:O,success:n,error:t,info:s,warning:a,dismiss:m,clearAll:y,confirm:d,closeConfirm:o}}const Zs={class:"models-page"},Ys={class:"models-sidebar"},Xs={class:"models-sidebar__header"},vs={class:"models-sidebar__badge"},el={key:0,class:"models-sidebar__loading"},tl={key:1,class:"models-sidebar__list"},nl=["onClick"],ol={class:"models-sidebar__name"},sl={class:"models-sidebar__count"},ll={class:"models-sidebar__footer"},al={class:"models-sidebar__stat"},rl={class:"font-mono"},il={class:"models-content"},cl={class:"models-toolbar"},dl={class:"models-toolbar__title"},ml={class:"font-mono"},pl={class:"text-muted"},ul={key:0,class:"models-toolbar__badge models-toolbar__badge--warning"},fl={class:"models-toolbar__actions"},_l=["disabled"],hl=["disabled"],yl={key:0,class:"models-error"},gl={class:"models-editor"},kl={key:1,class:"models-loading-overlay"},El={key:1,class:"empty-state"},Nl={key:0,class:"models-error"},Vl={class:"modal__body"},bl={class:"modal__footer"},Sl=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"ModelsPage",setup(n){const t=Nt(),{send:s,on:a,connected:d}=ge(),{success:o,error:m,confirm:y}=Ks(),f=e.ref(null),c=e.ref(!1);e.onMounted(async()=>{try{await t.fetchSchemas(),t.schemas.length>0&&!t.selectedSchema&&await t.selectSchemaByName(t.schemas[0].name)}catch(p){t.error||(t.error=p instanceof Error?p.message:"Failed to load schemas")}}),a("store:updated",p=>{const l=p;if(typeof p!="object"||p===null||typeof l.schema!="string"||typeof l.action!="string"||typeof l.count!="number"){console.warn("[ModelsPage] Invalid store:updated payload:",p);return}t.handleStoreUpdate(p)}),a("reseeded",p=>{const l=p;if(typeof p!="object"||p===null||typeof l.success!="boolean"||!Array.isArray(l.schemas)){console.warn("[ModelsPage] Invalid reseeded payload:",p);return}t.handleReseedComplete(p)}),e.watch(()=>t.selectedSchema,async()=>{f.value&&t.currentItems.length>0&&(await e.nextTick(),f.value?.formatJson())});async function E(p){t.isDirty&&!await y("You have unsaved changes. Are you sure you want to switch schemas?",{title:"Unsaved Changes",confirmText:"Switch Schema",cancelText:"Cancel"})||await t.selectSchemaByName(p)}async function B(){if(!f.value?.isValid){m("Cannot save invalid JSON. Please fix the errors first.");return}if(await t.saveItems())o("Items saved successfully");else{const l=t.error||"Failed to save items";m(l)}}async function b(){if(!t.isDirty)return;await y("Discard all changes and revert to saved data?",{title:"Discard Changes",confirmText:"Discard",cancelText:"Cancel"})&&(t.discardChanges(),o("Changes discarded"))}async function k(){c.value=!1;try{if(await t.clearSchema())o("Schema cleared successfully");else{const l=t.error||"Failed to clear schema";m(l)}}catch(p){const l=p instanceof Error?p.message:"Failed to clear schema";m(l)}}async function N(){if(!d.value){m("WebSocket not connected. Cannot trigger reseed.");return}await y("This will regenerate all seed data and replace existing items. Continue?",{title:"Reseed All Schemas",confirmText:"Reseed",cancelText:"Cancel"})&&(s({type:"reseed"}),o("Reseed command sent"))}function S(p){t.updateItems(p)}return(p,l)=>(e.openBlock(),e.createElementBlock("div",Zs,[e.createElementVNode("aside",Ys,[e.createElementVNode("div",Xs,[e.createVNode(e.unref(be),{size:18}),l[4]||(l[4]=e.createElementVNode("span",null,"Schemas",-1)),e.createElementVNode("span",vs,e.toDisplayString(e.unref(t).schemaCount),1)]),e.unref(t).loading&&e.unref(t).schemas.length===0?(e.openBlock(),e.createElementBlock("div",el,[...l[5]||(l[5]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("span",null,"Loading...",-1)])])):(e.openBlock(),e.createElementBlock("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).schemas,g=>(e.openBlock(),e.createElementBlock("button",{key:g.name,class:e.normalizeClass(["models-sidebar__item",{"models-sidebar__item--active":e.unref(t).selectedSchema===g.name}]),onClick:z=>E(g.name)},[e.createElementVNode("span",ol,e.toDisplayString(g.name),1),e.createElementVNode("span",sl,e.toDisplayString(g.count),1)],10,nl))),128))])),e.createElementVNode("div",ll,[e.createElementVNode("div",al,[l[6]||(l[6]=e.createElementVNode("span",{class:"text-muted"},"Total Items:",-1)),e.createElementVNode("span",rl,e.toDisplayString(e.unref(t).totalItems),1)])])]),e.createElementVNode("main",il,[e.unref(t).selectedSchema?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",cl,[e.createElementVNode("div",dl,[e.createElementVNode("span",ml,e.toDisplayString(e.unref(t).selectedSchema),1),e.createElementVNode("span",pl,"("+e.toDisplayString(e.unref(t).currentItems.length)+" items)",1),e.unref(t).isDirty?(e.openBlock(),e.createElementBlock("span",ul," Unsaved ")):e.createCommentVNode("",!0)]),e.createElementVNode("div",fl,[e.unref(t).isDirty?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn--ghost",title:"Discard changes",onClick:b},[e.createVNode(e.unref(le),{size:16}),l[7]||(l[7]=e.createElementVNode("span",null,"Discard",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{disabled:!e.unref(t).isDirty||e.unref(t).loading,class:"btn btn--primary",title:"Save changes",onClick:B},[e.createVNode(e.unref(ot),{size:16}),l[8]||(l[8]=e.createElementVNode("span",null,"Save",-1))],8,_l),e.createElementVNode("button",{class:"btn btn--danger",title:"Clear all items",onClick:l[0]||(l[0]=g=>c.value=!0)},[e.createVNode(e.unref(pe),{size:16}),l[9]||(l[9]=e.createElementVNode("span",null,"Clear",-1))]),e.createElementVNode("button",{disabled:!e.unref(d),class:"btn btn--secondary",title:"Reseed all schemas with generated data",onClick:N},[e.createVNode(e.unref(nt),{size:16}),l[10]||(l[10]=e.createElementVNode("span",null,"Reseed All",-1))],8,hl)])]),e.unref(t).error?(e.openBlock(),e.createElementBlock("div",yl,[e.createElementVNode("span",null,"⚠️ "+e.toDisplayString(e.unref(t).error),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",gl,[e.createVNode(Js,{ref_key:"jsonEditorRef",ref:f,"model-value":e.unref(t).currentItems,readonly:e.unref(t).loading,"min-height":400,"onUpdate:modelValue":S},null,8,["model-value","readonly"])]),e.unref(t).loading?(e.openBlock(),e.createElementBlock("div",kl,[...l[11]||(l[11]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("span",null,"Loading...",-1)])])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",El,[e.unref(t).error?(e.openBlock(),e.createElementBlock("div",Nl,[e.createElementVNode("span",null,"⚠️ "+e.toDisplayString(e.unref(t).error),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(be),{size:48,class:"empty-state__icon"}),l[12]||(l[12]=e.createElementVNode("h3",{class:"empty-state__title"},"Select a schema",-1)),l[13]||(l[13]=e.createElementVNode("p",{class:"empty-state__description"}," Choose a schema from the sidebar to view and edit its data. ",-1))],64))]))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:l[3]||(l[3]=g=>c.value=!1)},[e.createElementVNode("div",{class:"modal",onClick:l[2]||(l[2]=e.withModifiers(()=>{},["stop"]))},[l[17]||(l[17]=e.createElementVNode("div",{class:"modal__header"},[e.createElementVNode("h3",null,"Clear Schema Data")],-1)),e.createElementVNode("div",Vl,[e.createElementVNode("p",null,[l[14]||(l[14]=e.createTextVNode(" Are you sure you want to clear all items for ",-1)),e.createElementVNode("strong",null,e.toDisplayString(e.unref(t).selectedSchema),1),l[15]||(l[15]=e.createTextVNode("? ",-1))]),l[16]||(l[16]=e.createElementVNode("p",{class:"text-muted"},"This action cannot be undone.",-1))]),e.createElementVNode("div",bl,[e.createElementVNode("button",{class:"btn btn--ghost",onClick:l[1]||(l[1]=g=>c.value=!1)}," Cancel "),e.createElementVNode("button",{class:"btn btn--danger",onClick:k}," Clear Schema ")])])])):e.createCommentVNode("",!0)]))]))}}),[["__scopeId","data-v-b06706f4"]])},Symbol.toStringTag,{value:"Module"})),Cl={class:"simulator-page"},Bl={class:"simulator-form card"},$l={class:"simulator-form__header"},xl={class:"simulator-form__body"},wl={class:"simulator-form__row"},Dl=["value"],Tl={class:"simulator-presets"},zl=["onClick"],Ml={class:"simulator-preset__label"},Il=["disabled"],ql={class:"simulator-active"},Fl={class:"simulator-active__header"},Rl={class:"simulator-active__title"},Al={class:"simulator-active__list"},Ol={class:"simulator-simulation__info"},Ll={class:"simulator-simulation__path font-mono"},Hl={class:"simulator-simulation__preset"},Pl=["onClick"],jl={key:0,class:"empty-state"},Ul=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"SimulatorPage",setup(n){const t=[{id:"slow",label:"Slow Response",description:"Add 2 second delay",type:"delay",delay:2e3},{id:"very-slow",label:"Very Slow",description:"Add 5 second delay",type:"delay",delay:5e3},{id:"timeout",label:"Timeout",description:"Simulate request timeout (30s)",type:"delay",delay:3e4},{id:"error-400",label:"Bad Request",description:"Return 400 status",type:"error",status:400},{id:"error-401",label:"Unauthorized",description:"Return 401 status",type:"error",status:401},{id:"error-403",label:"Forbidden",description:"Return 403 status",type:"error",status:403},{id:"error-404",label:"Not Found",description:"Return 404 status",type:"error",status:404},{id:"error-429",label:"Rate Limited",description:"Return 429 status",type:"error",status:429},{id:"error-500",label:"Server Error",description:"Return 500 status",type:"error",status:500},{id:"error-503",label:"Unavailable",description:"Return 503 status",type:"error",status:503}],s=e.ref([{id:"1",path:"/pets",method:"GET",preset:t[0]},{id:"2",path:"/pets/{petId}",method:"GET",preset:t[6]}]),a=e.ref(""),d=e.ref("GET"),o=e.ref(null),m=["GET","POST","PUT","PATCH","DELETE"];function y(b){return t.find(k=>k.id===b)}const f=e.computed(()=>a.value.trim()!==""&&o.value!==null);function c(){if(!f.value||!o.value)return;const b=y(o.value);b&&(s.value.push({id:Date.now().toString(),path:a.value.trim(),method:d.value,preset:b}),a.value="",o.value=null)}function E(b){s.value=s.value.filter(k=>k.id!==b)}function B(){s.value=[]}return(b,k)=>(e.openBlock(),e.createElementBlock("div",Cl,[e.createElementVNode("div",Bl,[e.createElementVNode("div",$l,[e.createVNode(e.unref(v),{size:18}),k[2]||(k[2]=e.createElementVNode("span",null,"Add Simulation",-1))]),e.createElementVNode("div",xl,[e.createElementVNode("div",wl,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":k[0]||(k[0]=N=>d.value=N),class:"simulator-form__method input"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,N=>e.createElementVNode("option",{key:N,value:N},e.toDisplayString(N),9,Dl)),64))],512),[[e.vModelSelect,d.value]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":k[1]||(k[1]=N=>a.value=N),type:"text",class:"simulator-form__path input",placeholder:"/api/path or * for all"},null,512),[[e.vModelText,a.value]])]),e.createElementVNode("div",Tl,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(t,N=>e.createElementVNode("button",{key:N.id,class:e.normalizeClass(["simulator-preset",{"simulator-preset--selected":o.value===N.id},N.type==="delay"?"simulator-preset--delay":"simulator-preset--error"]),onClick:S=>o.value=N.id},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N.type==="delay"?e.unref(j):e.unref($e)),{size:14})),e.createElementVNode("span",Ml,e.toDisplayString(N.label),1)],10,zl)),64))]),e.createElementVNode("button",{class:"btn btn--primary",disabled:!f.value,onClick:c},[e.createVNode(e.unref(tt),{size:16}),k[3]||(k[3]=e.createElementVNode("span",null,"Add Simulation",-1))],8,Il)])]),e.createElementVNode("div",ql,[e.createElementVNode("div",Fl,[e.createElementVNode("span",Rl," Active Simulations ("+e.toDisplayString(s.value.length)+") ",1),s.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn--ghost",onClick:B},[e.createVNode(e.unref(pe),{size:14}),k[4]||(k[4]=e.createElementVNode("span",null,"Clear All",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,N=>(e.openBlock(),e.createElementBlock("div",{key:N.id,class:"simulator-simulation card"},[e.createElementVNode("div",Ol,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${N.method.toLowerCase()}`])},e.toDisplayString(N.method),3),e.createElementVNode("span",Ll,e.toDisplayString(N.path),1)]),e.createElementVNode("div",Hl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N.preset.type==="delay"?e.unref(j):e.unref($e)),{size:14,class:e.normalizeClass(N.preset.type==="delay"?"text-warning":"text-error")},null,8,["class"])),e.createElementVNode("span",null,e.toDisplayString(N.preset.label),1)]),e.createElementVNode("button",{class:"btn btn--ghost btn--icon",title:"Remove simulation",onClick:S=>E(N.id)},[e.createVNode(e.unref(pe),{size:14})],8,Pl)]))),128)),s.value.length===0?(e.openBlock(),e.createElementBlock("div",jl,[e.createVNode(e.unref(v),{size:48,class:"empty-state__icon"}),k[5]||(k[5]=e.createElementVNode("h3",{class:"empty-state__title"},"No active simulations",-1)),k[6]||(k[6]=e.createElementVNode("p",{class:"empty-state__description"}," Add a simulation above to test error handling and slow responses. ",-1))])):e.createCommentVNode("",!0)])])]))}}),[["__scopeId","data-v-cf6df4d2"]])},Symbol.toStringTag,{value:"Module"}));A.bootstrap=Je,A.useTheme=Bt,A.useWebSocket=ge,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})}));
|
|
2
4
|
//# sourceMappingURL=devtools.umd.cjs.map
|