@ubean/devtools 0.5.1 → 0.6.0-beta.1
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.
|
@@ -436,7 +436,7 @@ When the user asks to "create" or "add" something, use the create_resource tool.
|
|
|
436
436
|
`}${t}\n${a}`}let i=p(e,`definePage`);return i?e.slice(0,i.start)+t+e.slice(i.end):e}async function v(){if(n.filePath){i.value=!0,o.value=``,s.value=``;try{let e=await n.onRead(`page`,n.filePath);if(e.success&&e.content!==void 0){c.value=e.content;let{meta:t,found:n}=h(e.content);u.value=t,l.value=n}else o.value=e.error||`Failed to load file`}catch(e){o.value=e instanceof Error?e.message:`Failed to load file`}finally{i.value=!1}}}Un(()=>n.open,e=>{e&&(u.value=d(),c.value=``,l.value=!1,v())});let y=V(()=>!i.value&&!a.value&&!o.value);function b(){a.value||r(`close`)}function x(){if(s.value=``,u.value.meta.trim())try{JSON.parse(u.value.meta.trim())}catch(e){s.value=e instanceof Error?e.message:`Invalid JSON`}return!s.value}async function S(){if(x()){a.value=!0,o.value=``;try{let e=g(u.value),t=_(c.value,e),i=await n.onSave(`page`,{path:n.filePath,content:t});i.success?(r(`saved`),r(`close`)):i.errors?.length&&(o.value=i.errors[0])}catch(e){o.value=e instanceof Error?e.message:`Failed to save`}finally{a.value=!1}}}return(t,n)=>(I(),Ta(nr,{to:`body`},[e.open?(I(),L(`div`,k3,[R(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:b}),R(`div`,A3,[R(`div`,j3,[R(`div`,M3,[R(`div`,N3,[z(P(K),{icon:`lucide:sliders-horizontal`,size:15,class:`text-primary`})]),R(`div`,P3,[n[7]||=R(`div`,{class:`text-sm font-semibold text-foreground`},`Page Properties`,-1),R(`div`,F3,j(e.pagePath)+` · `+j(e.filePath),1)])]),R(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer flex-shrink-0`,onClick:b},[z(P(K),{icon:`lucide:x`,size:14})])]),R(`div`,I3,[i.value?(I(),L(`div`,L3,[...n[8]||=[R(`div`,{class:`size-5 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),R(`span`,{class:`ml-2 text-xs text-muted-foreground`},`Loading...`,-1)]])):o.value&&!c.value?(I(),L(`div`,R3,[z(P(K),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Na(` `+j(o.value),1)])):(I(),L(`div`,z3,[l.value?B(``,!0):(I(),L(`div`,B3,[z(P(K),{icon:`lucide:info`,size:13,class:`flex-shrink-0 mt-0.5`}),n[9]||=R(`span`,null,[Na(` No `),R(`code`,{class:`font-mono`},`definePage()`),Na(` call detected. Saving will add one to the <script setup> block. `)],-1)])),R(`div`,V3,[R(`label`,H3,[n[10]||=R(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Name`,-1),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>u.value.name=e,type:`text`,placeholder:`route name`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,u.value.name]])]),R(`label`,U3,[n[11]||=R(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Path Override`,-1),Fn(R(`input`,{"onUpdate:modelValue":n[1]||=e=>u.value.path=e,type:`text`,placeholder:`/custom/path`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[vs,u.value.path]])]),R(`label`,W3,[n[12]||=R(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Layout`,-1),Fn(R(`input`,{"onUpdate:modelValue":n[2]||=e=>u.value.layout=e,type:`text`,placeholder:`default (empty) / name / false`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[vs,u.value.layout]])]),R(`label`,G3,[n[13]||=R(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Reuse`,-1),Fn(R(`input`,{"onUpdate:modelValue":n[3]||=e=>u.value.reuse=e,type:`text`,placeholder:`reuse key`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[vs,u.value.reuse]])]),R(`label`,K3,[n[14]||=R(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Middleware (comma-separated)`,-1),Fn(R(`input`,{"onUpdate:modelValue":n[4]||=e=>u.value.middleware=e,type:`text`,placeholder:`auth, admin`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[vs,u.value.middleware]])]),R(`label`,q3,[Fn(R(`input`,{"onUpdate:modelValue":n[5]||=e=>u.value.requiresAuth=e,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,512),[[ys,u.value.requiresAuth]]),n[15]||=R(`span`,{class:`text-xs text-foreground`},`Requires Auth`,-1),n[16]||=R(`span`,{class:`text-2xs text-muted-foreground`},`(redirect unauthenticated users)`,-1)])]),R(`div`,J3,[R(`div`,Y3,[n[17]||=R(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Meta (JSON object)`,-1),s.value?(I(),L(`span`,X3,j(s.value),1)):B(``,!0)]),z(S4,{modelValue:u.value.meta,"onUpdate:modelValue":n[6]||=e=>u.value.meta=e,language:`json`,height:`120px`,"line-numbers":!1,label:`meta`},null,8,[`modelValue`])])]))]),o.value&&c.value&&!i.value?(I(),L(`div`,Z3,[R(`div`,Q3,[z(P(K),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Na(` `+j(o.value),1)])])):B(``,!0),R(`div`,$3,[R(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:a.value,onClick:b},` Cancel `,8,e6),R(`button`,{type:`button`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:!y.value,onClick:S},[a.value?(I(),L(`div`,n6)):(I(),Ta(P(K),{key:1,icon:`lucide:save`,size:12})),Na(` `+j(a.value?`Saving...`:`Save Properties`),1)],8,t6)])])])):B(``,!0)]))}}),[[`__scopeId`,`data-v-d9030ac0`]]),i6={class:`flex flex-col h-full bg-background`},a6={class:`flex items-center justify-between px-3 py-2 border-b border-base bg-background/50`},o6={class:`flex items-center gap-2`},s6={key:0,class:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] font-medium bg-primary/10 text-primary`},c6={key:1,class:`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono text-muted-foreground bg-secondary`},l6={key:0,class:`px-3 py-2.5 border-b border-base bg-background/30 space-y-2`},u6=[`placeholder`],d6=[`placeholder`],f6={key:1,class:`px-3 py-2 bg-warning/10 border-b border-warning/20`},p6={class:`text-[10px] text-warning flex items-start gap-1.5`},m6={key:0,class:`size-6 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5`},h6={class:`max-w-[85%] space-y-1.5`},g6={key:0,class:`whitespace-pre-wrap`},_6={key:1,class:`flex gap-1 py-0.5`},Oue={key:0,class:`space-y-1`},kue={key:1,class:`space-y-1`},Aue={key:1,class:`size-6 rounded-full bg-primary flex items-center justify-center flex-shrink-0 mt-0.5`},jue={key:0,class:`pt-2`},Mue={class:`flex flex-wrap gap-1.5`},Nue=[`onClick`],Pue={class:`px-3 py-2.5 border-t border-base bg-background/50`},Fue={class:`flex items-end gap-2`},Iue=[`disabled`],Lue=br({__name:`AiAssistant`,props:{info:{},sendChatStream:{type:Function},onRefresh:{type:Function}},setup(e){let t=e,n=M([]),r=M(``),i=M(!1),a=M(null),o=M(!1),s=M(localStorage.getItem(`ubean_ai_api_key`)||``),c=M(localStorage.getItem(`ubean_ai_api_base`)||``),l=M(localStorage.getItem(`ubean_ai_model`)||``),u=V(()=>t.info?.ai?.enabled||!!s.value),d=V(()=>!!s.value||!!t.info?.ai?.enabled),f=[{text:`List all pages`,icon:`lucide:file-text`},{text:`Create an API route`,icon:`lucide:send`},{text:`Show environment variables`,icon:`lucide:key`},{text:`Create a page /about`,icon:`lucide:plus`}];function p(){Cn(()=>{a.value&&(a.value.scrollTop=a.value.scrollHeight)})}function m(){s.value?localStorage.setItem(`ubean_ai_api_key`,s.value):localStorage.removeItem(`ubean_ai_api_key`),c.value?localStorage.setItem(`ubean_ai_api_base`,c.value):localStorage.removeItem(`ubean_ai_api_base`),l.value?localStorage.setItem(`ubean_ai_model`,l.value):localStorage.removeItem(`ubean_ai_model`),o.value=!1}function h(e,t){return`${e}(${Object.entries(t).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${e}: ${String(t)}`).join(`, `)})`}function g(e){if(!e)return``;if(typeof e==`object`){let t=e;return t.success===!1&&t.errors?`❌ ${t.errors.join(`, `)}`:t.created&&Array.isArray(t.created)?`✅ Created: ${t.created.join(`, `)}`:t.deleted&&Array.isArray(t.deleted)?`🗑️ Deleted: ${t.deleted.join(`, `)}`:t.updated&&Array.isArray(t.updated)?`📝 Updated: ${t.updated.join(`, `)}`:t.data&&typeof t.data==`object`?Object.entries(t.data).slice(0,10).map(([e,t])=>`${e}: ${typeof t==`string`?t:JSON.stringify(t)}`).join(`
|
|
437
437
|
`):t.content&&typeof t.content==`string`?t.content.slice(0,300):JSON.stringify(e,null,2).slice(0,300)}return String(e)}async function _(e){let a=(e??r.value).trim();if(!a||i.value)return;let o={role:`user`,content:a,timestamp:Date.now()};n.value.push(o),r.value=``,i.value=!0;let u={role:`assistant`,content:``,timestamp:Date.now()};n.value.push(u),p();try{let e={};s.value&&(e.apiKey=s.value),c.value&&(e.apiBase=c.value),l.value&&(e.model=l.value);let r=await t.sendChatStream(n.value.slice(0,-1),e,e=>{u.content=e.text,e.toolCalls&&(u.toolCalls=e.toolCalls),e.toolResults&&(u.toolResults=e.toolResults),p()});u.content=r.message.content,u.toolCalls=r.message.toolCalls,r.toolResults&&(u.toolResults=r.toolResults,await t.onRefresh())}catch(e){u.content=`Error: ${e instanceof Error?e.message:`Unknown error`}`}finally{i.value=!1,p()}}function v(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),_())}return Lr(()=>{n.value=[{role:`assistant`,content:`👋 Hi! I'm your ubean AI assistant. I can help you manage your project:\n\n• **Create resources**: pages, APIs, layouts, middleware, cron jobs, plugins\n• **Inspect project**: list routes, pages, env vars, config\n• **Manage env**: set/get/remove environment variables\n\n${d.value?`You have AI configured — I can understand natural language commands!`:`Set up your API key in settings to enable full AI chat, or use simple text commands like "create page about"`}`,timestamp:Date.now()}]}),(t,p)=>(I(),L(`div`,i6,[R(`div`,a6,[R(`div`,o6,[z(P(K),{icon:`lucide:sparkles`,size:14,class:`text-primary`}),p[6]||=R(`span`,{class:`text-xs font-semibold text-foreground`},`AI Assistant`,-1),u.value?(I(),L(`span`,s6,j(e.info?.ai?.provider||`deepseek`),1)):B(``,!0),e.info?.ai?.model?(I(),L(`span`,c6,j(e.info.ai.model),1)):B(``,!0)]),R(`button`,{class:`p-1 rounded hover:bg-active text-muted-foreground hover:text-foreground transition-colors`,onClick:p[0]||=e=>o.value=!o.value},[z(P(K),{icon:`lucide:settings`,size:14})])]),o.value?(I(),L(`div`,l6,[R(`div`,null,[p[7]||=R(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`API Key`,-1),Fn(R(`input`,{"onUpdate:modelValue":p[1]||=e=>s.value=e,type:`password`,placeholder:`sk-... (DeepSeek or OpenAI-compatible)`,class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,512),[[vs,s.value]])]),R(`div`,null,[p[8]||=R(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`API Base URL (optional)`,-1),Fn(R(`input`,{"onUpdate:modelValue":p[2]||=e=>c.value=e,type:`text`,placeholder:P(FB),class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,8,u6),[[vs,c.value]])]),R(`div`,null,[p[9]||=R(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`Model (optional)`,-1),Fn(R(`input`,{"onUpdate:modelValue":p[3]||=e=>l.value=e,type:`text`,placeholder:P(IB),class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,8,d6),[[vs,l.value]])]),R(`button`,{class:`w-full px-2 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors`,onClick:m},` Save Settings `)])):B(``,!0),!d.value&&!o.value?(I(),L(`div`,f6,[R(`p`,p6,[z(P(K),{icon:`lucide:alert-circle`,size:12,class:`mt-0.5 flex-shrink-0`}),p[10]||=R(`span`,null,[Na(` No API key configured. Set `),R(`code`,{class:`text-warning font-mono`},`DEEPSEEK_API_KEY`),Na(` env var (or `),R(`code`,{class:`text-warning font-mono`},`UBEAN_AI_API_KEY`),Na(` / `),R(`code`,{class:`text-warning font-mono`},`OPENAI_API_KEY`),Na(` ) or configure in settings. Simple text commands still work without LLM. `)],-1)])])):B(``,!0),R(`div`,{ref_key:`messagesEl`,ref:a,class:`flex-1 overflow-y-auto px-3 py-3 space-y-3`},[(I(!0),L(ha,null,Yr(n.value,(e,t)=>(I(),L(`div`,{key:t,class:A([`flex gap-2`,[e.role===`user`?`justify-end`:`justify-start`]])},[e.role===`user`?B(``,!0):(I(),L(`div`,m6,[z(P(K),{icon:`lucide:sparkles`,size:11,class:`text-primary`})])),R(`div`,h6,[R(`div`,{class:A([`px-3 py-2 rounded-lg text-xs leading-relaxed`,[e.role===`user`?`bg-primary text-primary-foreground rounded-tr-sm`:`bg-background border border-base text-foreground rounded-tl-sm`]])},[e.content?(I(),L(`div`,g6,j(e.content),1)):i.value&&t===n.value.length-1?(I(),L(`div`,_6,[...p[11]||=[R(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`0ms`}},null,-1),R(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`150ms`}},null,-1),R(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`300ms`}},null,-1)]])):B(``,!0)],2),e.toolCalls&&e.toolCalls.length>0?(I(),L(`div`,Oue,[(I(!0),L(ha,null,Yr(e.toolCalls,e=>(I(),L(`div`,{key:e.id,class:`px-2 py-1 bg-secondary border border-base rounded text-[10px] font-mono text-muted-foreground`},[z(P(K),{icon:`lucide:wrench`,size:10,class:`inline mr-1`}),Na(` `+j(h(e.name,e.arguments)),1)]))),128))])):B(``,!0),e.toolResults&&e.toolResults.length>0?(I(),L(`div`,kue,[(I(!0),L(ha,null,Yr(e.toolResults,e=>(I(),L(`div`,{key:e.toolCallId,class:`px-2 py-1.5 bg-success/5 border border-success/20 rounded text-[10px] font-mono text-success/90 whitespace-pre-wrap`},j(e.error?`❌ ${e.error}`:g(e.result)),1))),128))])):B(``,!0)]),e.role===`user`?(I(),L(`div`,Aue,[z(P(K),{icon:`lucide:user`,size:11,class:`text-primary-foreground`})])):B(``,!0)],2))),128)),n.value.length<=1?(I(),L(`div`,jue,[p[12]||=R(`p`,{class:`text-[10px] text-muted-foreground mb-2 font-medium`},`Try:`,-1),R(`div`,Mue,[(I(),L(ha,null,Yr(f,e=>R(`button`,{key:e.text,class:`inline-flex items-center gap-1 px-2 py-1 text-[10px] bg-background border border-base rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors`,onClick:t=>_(e.text)},[z(P(K),{icon:e.icon,size:10},null,8,[`icon`]),Na(` `+j(e.text),1)],8,Nue)),64))])])):B(``,!0)],512),R(`div`,Pue,[R(`div`,Fue,[Fn(R(`textarea`,{"onUpdate:modelValue":p[4]||=e=>r.value=e,rows:`1`,placeholder:`Ask me anything about your project...`,class:`flex-1 resize-none px-3 py-2 text-xs bg-background border border-base rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500 max-h-24`,onKeydown:v},null,544),[[vs,r.value]]),R(`button`,{disabled:!r.value.trim()||i.value,class:`size-8 rounded-lg bg-primary text-primary-foreground flex items-center justify-center flex-shrink-0 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-primary/90 transition-colors`,onClick:p[5]||=()=>_()},[z(P(K),{icon:`lucide:send-horizontal`,size:14})],8,Iue)]),p[13]||=R(`p`,{class:`text-[9px] text-muted-foreground/60 mt-1 text-center`},`Press Enter to send, Shift+Enter for new line`,-1)])]))}}),Rue={class:`w-full h-full relative bg-background`},zue={key:0,class:`flex flex-col items-center justify-center h-full text-muted-foreground gap-3 px-10 py-10 text-center`},Bue=[`src`],Vue=br({__name:`ApiDocs`,props:{scalarPath:{},enabled:{type:Boolean}},setup(e){let t=e,n=V(()=>t.scalarPath||`/_scalar`);return(t,r)=>(I(),L(`div`,Rue,[e.enabled===!1?(I(),L(`div`,zue,[z(P(K),{icon:`lucide:file-text`,size:40,class:`text-muted-foreground/50`}),r[0]||=R(`div`,{class:`text-[15px] font-semibold text-foreground`},`API Docs Not Enabled`,-1),r[1]||=R(`div`,{class:`text-xs leading-relaxed max-w-80 op-fade`},[Na(` Set `),R(`code`,{class:`bg-secondary px-1.5 py-0.5 rounded text-[11px] font-mono text-primary`},`openAPI: true`),Na(` in your ubean config to enable Scalar API reference. `)],-1)])):(I(),L(`iframe`,{key:1,src:n.value,class:`w-full h-full border-none bg-white`,title:`API Reference`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`},null,8,Bue))]))}}),Hue={class:`flex flex-col h-full`},Uue={class:`flex flex-col border-b border-base flex-shrink-0`},Wue={class:`flex items-center gap-1.5 px-3 py-2`},Gue=[`value`],Kue=[`disabled`],que={class:`flex gap-0 border-t border-base`},Jue={key:0,class:`ml-1 text-primary`},Yue={key:0,class:`px-3 py-2 max-h-32 overflow-y-auto`},Xue={class:`flex flex-col gap-1`},Zue=[`onUpdate:modelValue`],Que=[`onUpdate:modelValue`],$ue=[`onUpdate:modelValue`],ede=[`onClick`],tde={key:1,class:`px-3 py-2 max-h-32 overflow-y-auto`},nde={class:`flex flex-col gap-1`},rde=[`onUpdate:modelValue`],ide=[`onUpdate:modelValue`],ade=[`onUpdate:modelValue`],ode=[`onClick`],sde={key:2,class:`px-3 py-2 h-36`},cde={class:`flex-1 overflow-hidden flex flex-col min-h-0`},lde={key:0,class:`m-3 p-3 rounded-lg text-xs leading-relaxed bg-destructive/10 text-destructive border border-destructive/15 flex items-start gap-2 flex-shrink-0`},ude={key:1,class:`flex flex-col h-full`},dde={class:`flex items-center gap-3 px-3 py-1.5 border-b border-base bg-background/50 flex-shrink-0`},fde={class:`text-[11px] text-muted-foreground flex items-center gap-1`},pde={class:`text-[11px] text-muted-foreground flex items-center gap-1`},mde={class:`ml-auto flex gap-0`},hde={key:0,class:`flex-1 overflow-hidden p-2 min-h-0`},gde={key:1,class:`flex-1 overflow-y-auto p-2`},_de={class:`flex flex-col gap-0`},vde={class:`text-muted-foreground w-44 flex-shrink-0`},yde={class:`text-foreground break-all`},bde={key:2,class:`flex-1 overflow-y-auto p-3.5`},xde={key:0,class:`section-card`},Sde={class:`section-header`},Cde={class:`section-body`},wde={class:`p-1 flex flex-col gap-0.5 max-h-80 overflow-y-auto`},Tde=[`onClick`],Ede=[`title`],Dde={key:0,class:`px-2 py-1 text-[10px] text-muted-foreground text-center`},Ode={class:`empty-state py-8`},kde={key:3,class:`flex-1 flex items-center justify-center`},Ade=br({__name:`ApiPlayground`,props:{routes:{},methodClass:{type:Function},initialMethod:{},initialPath:{}},setup(e){let t=e,n=M(t.initialMethod||`GET`),r=M(t.initialPath||`/api/`),i=M(``),a=M(`params`),o=M(`body`),s=M(!1),c=M(null),l=M(null),u=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],d=M([{key:``,value:``,enabled:!0}]),f=M([{key:`Content-Type`,value:`application/json`,enabled:!0}]),p=V(()=>[`POST`,`PUT`,`PATCH`].includes(n.value)),m=V(()=>{if(!c.value)return``;let e=c.value.status;return e>=200&&e<300?`bg-success/12 text-success`:e>=300&&e<400?`bg-info/12 text-info`:e>=400&&e<500?`bg-warning/12 text-warning`:`bg-destructive/12 text-destructive`}),h=V(()=>{if(!c.value)return``;if(c.value.contentType.includes(`application/json`))try{return JSON.stringify(JSON.parse(c.value.body),null,2)}catch{return c.value.body}return c.value.body}),g=V(()=>{if(!c.value)return`json`;let e=c.value.contentType;return e.includes(`json`)?`json`:e.includes(`html`)?`javascript`:`json`});Un(()=>t.initialPath,e=>{e&&(r.value=e)}),Un(()=>t.initialMethod,e=>{e&&(n.value=e)}),Un(n,e=>{p.value&&!i.value&&(i.value=`{
|
|
438
438
|
|
|
439
|
-
}`)});function _(){d.value.push({key:``,value:``,enabled:!0})}function v(e){d.value.splice(e,1)}function y(){f.value.push({key:``,value:``,enabled:!0})}function b(e){f.value.splice(e,1)}function x(){let e=d.value.filter(e=>e.key&&e.enabled);if(e.length===0)return r.value;let t=r.value.includes(`?`)?`&`:`?`,n=e.map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join(`&`);return`${r.value}${t}${n}`}function S(){let e={};for(let t of f.value)t.key&&t.enabled&&(e[t.key]=t.value);return e}async function C(){if(s.value)return;s.value=!0,l.value=null,c.value=null;let e=performance.now(),t=x(),r=S(),a={method:n.value,headers:r};p.value&&i.value.trim()&&(a.body=i.value);try{let n=await fetch(t,a),r=Math.round(performance.now()-e),i={};n.headers.forEach((e,t)=>{i[t]=e});let s=await n.text();c.value={status:n.status,statusText:n.statusText,headers:i,body:s,time:r,size:new Blob([s]).size,contentType:n.headers.get(`content-type`)||``},o.value=`body`}catch(e){l.value=e instanceof Error?e.message:`Request failed`}finally{s.value=!1}}function w(e){n.value=e.method,r.value=e.path}function T(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let ee=V(()=>t.routes.filter(e=>e.path!==`*`&&!e.path.includes(`_scalar`)&&!e.path.includes(`_openapi`)));return(t,x)=>(I(),L(`div`,Hue,[R(`div`,Uue,[R(`div`,Wue,[Fn(R(`select`,{"onUpdate:modelValue":x[0]||=e=>n.value=e,class:A([`px-2 py-1.5 bg-background border border-base rounded-md text-xs font-bold text-foreground outline-none focus:border-active cursor-pointer`,e.methodClass(n.value)])},[(I(),L(ha,null,Yr(u,e=>R(`option`,{key:e,value:e},j(e),9,Gue)),64))],2),[[vee,n.value]]),Fn(R(`input`,{"onUpdate:modelValue":x[1]||=e=>r.value=e,type:`text`,placeholder:`Enter request URL...`,class:`flex-1 px-3 py-1.5 bg-background border border-base rounded-md text-xs font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`,onKeydown:Ts(C,[`enter`])},null,544),[[vs,r.value]]),R(`button`,{class:A([`px-4 py-1.5 rounded-md text-xs font-semibold text-primary-foreground transition-all cursor-pointer flex items-center gap-1.5`,s.value?`bg-primary/60 cursor-wait`:`bg-primary hover:bg-primary/90`]),disabled:s.value,onClick:C},[s.value?(I(),Ta(P(K),{key:0,icon:`lucide:loader-2`,size:12,class:`animate-spin`})):(I(),Ta(P(K),{key:1,icon:`lucide:send`,size:12})),Na(` `+j(s.value?`Sending...`:`Send`),1)],10,Kue)]),R(`div`,que,[R(`button`,{class:A([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`params`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[2]||=e=>a.value=`params`},[x[8]||=Na(` Params `,-1),d.value.some(e=>e.key&&e.enabled)?(I(),L(`span`,Jue,`●`)):B(``,!0)],2),R(`button`,{class:A([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`headers`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[3]||=e=>a.value=`headers`},` Headers `,2),p.value?(I(),L(`button`,{key:0,class:A([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`body`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[4]||=e=>a.value=`body`},` Body `,2)):B(``,!0)]),a.value===`params`?(I(),L(`div`,Yue,[R(`div`,Xue,[(I(!0),L(ha,null,Yr(d.value,(e,t)=>(I(),L(`div`,{key:t,class:`flex items-center gap-1.5`},[Fn(R(`input`,{"onUpdate:modelValue":t=>e.enabled=t,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,8,Zue),[[ys,e.enabled]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.key=t,type:`text`,placeholder:`Key`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,Que),[[vs,e.key]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,placeholder:`Value`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,$ue),[[vs,e.value]]),R(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded cursor-pointer transition-colors`,onClick:e=>v(t)},[z(P(K),{icon:`lucide:x`,size:11})],8,ede)]))),128))]),R(`button`,{class:`mt-1 px-2 py-1 text-[11px] text-primary hover:text-primary/80 flex items-center gap-1 cursor-pointer`,onClick:_},[z(P(K),{icon:`lucide:plus`,size:11}),x[9]||=Na(` Add Parameter `,-1)])])):a.value===`headers`?(I(),L(`div`,tde,[R(`div`,nde,[(I(!0),L(ha,null,Yr(f.value,(e,t)=>(I(),L(`div`,{key:t,class:`flex items-center gap-1.5`},[Fn(R(`input`,{"onUpdate:modelValue":t=>e.enabled=t,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,8,rde),[[ys,e.enabled]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.key=t,type:`text`,placeholder:`Header name`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,ide),[[vs,e.key]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,placeholder:`Value`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,ade),[[vs,e.value]]),R(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded cursor-pointer transition-colors`,onClick:e=>b(t)},[z(P(K),{icon:`lucide:x`,size:11})],8,ode)]))),128))]),R(`button`,{class:`mt-1 px-2 py-1 text-[11px] text-primary hover:text-primary/80 flex items-center gap-1 cursor-pointer`,onClick:y},[z(P(K),{icon:`lucide:plus`,size:11}),x[10]||=Na(` Add Header `,-1)])])):a.value===`body`&&p.value?(I(),L(`div`,sde,[z(S4,{modelValue:i.value,"onUpdate:modelValue":x[5]||=e=>i.value=e,language:`json`,"line-numbers":!1,height:`100%`},null,8,[`modelValue`])])):B(``,!0)]),R(`div`,cde,[l.value?(I(),L(`div`,lde,[z(P(K),{icon:`lucide:alert-circle`,size:14,class:`flex-shrink-0 mt-0.5`}),R(`div`,null,[x[11]||=R(`strong`,null,`Request failed`,-1),x[12]||=R(`br`,null,null,-1),Na(` `+j(l.value),1)])])):B(``,!0),c.value?(I(),L(`div`,ude,[R(`div`,dde,[R(`span`,{class:A([`px-2 py-0.5 rounded-md text-[10px] font-bold font-mono`,m.value])},j(c.value.status)+` `+j(c.value.statusText),3),R(`span`,fde,[z(P(K),{icon:`lucide:clock`,size:11}),Na(` `+j(c.value.time)+`ms `,1)]),R(`span`,pde,[z(P(K),{icon:`lucide:hard-drive`,size:11}),Na(` `+j(T(c.value.size)),1)]),R(`div`,mde,[R(`button`,{class:A([`px-2 py-1 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,o.value===`body`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[6]||=e=>o.value=`body`},` Body `,2),R(`button`,{class:A([`px-2 py-1 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,o.value===`headers`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[7]||=e=>o.value=`headers`},` Headers (`+j(Object.keys(c.value.headers).length)+`) `,3)])]),o.value===`body`?(I(),L(`div`,hde,[z(S4,{"model-value":h.value,language:g.value,readonly:``,"line-numbers":!1,height:`100%`},null,8,[`model-value`,`language`])])):(I(),L(`div`,gde,[R(`div`,_de,[(I(!0),L(ha,null,Yr(c.value.headers,(e,t)=>(I(),L(`div`,{key:String(t),class:`flex items-center px-2 py-1 text-[11px] border-b border-base font-mono`},[R(`span`,vde,j(t),1),R(`span`,yde,j(e),1)]))),128))])]))])):!s.value&&!l.value?(I(),L(`div`,bde,[ee.value.length>0?(I(),L(`div`,xde,[R(`div`,Sde,[z(P(K),{icon:`lucide:zap`,size:13,class:`text-primary`}),x[13]||=R(`span`,{class:`section-title`},`Quick Select`,-1)]),R(`div`,Cde,[R(`div`,wde,[(I(!0),L(ha,null,Yr(ee.value.slice(0,50),t=>(I(),L(`button`,{key:`${t.method}-${t.path}`,class:`flex items-center gap-2 px-2 py-1 rounded text-left hover:bg-active transition-colors cursor-pointer`,onClick:e=>w(t)},[R(`span`,{class:A([`min-w-[42px] px-1.5 py-px rounded text-[9px] font-bold uppercase tracking-wider text-center font-mono`,e.methodClass(t.method)])},j(t.method),3),R(`span`,{class:`font-mono text-foreground text-xs truncate flex-1`,title:t.path},j(t.path),9,Ede)],8,Tde))),128)),ee.value.length>50?(I(),L(`div`,Dde,` ... and `+j(ee.value.length-50)+` more routes `,1)):B(``,!0)])])])):B(``,!0),R(`div`,Ode,[z(P(K),{icon:`lucide:play`,size:28,class:`text-muted-foreground/40 mb-2`}),x[14]||=R(`div`,{class:`empty-title`},`Ready to send`,-1),x[15]||=R(`div`,{class:`empty-desc`},`Select a route above or enter a URL to test your API`,-1)])])):B(``,!0),s.value?(I(),L(`div`,kde,[...x[16]||=[R(`div`,{class:`flex flex-col items-center gap-3 text-muted-foreground`},[R(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`}),R(`span`,{class:`text-xs`},`Sending request...`)],-1)]])):B(``,!0)])]))}}),jde={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},Mde={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-sm mx-4 overflow-hidden animate-scale-in`},Nde={class:`p-4 pb-3`},Pde={class:`flex items-start gap-3`},Fde={class:`min-w-0`},Ide={class:`text-sm font-semibold text-foreground`},Lde={class:`text-xs text-muted-foreground mt-1 leading-relaxed`},Rde={class:`flex items-center justify-end gap-2 px-4 py-3 bg-secondary border-t border-base`},zde=[`disabled`],Bde=[`disabled`],Vde={key:0,class:`size-3 border-2 border-current/30 border-t-current rounded-full animate-spin`},v6=cV(br({__name:`ConfirmDialog`,props:{open:{type:Boolean},title:{},message:{},confirmText:{},cancelText:{},variant:{}},emits:[`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=M(!1);Un(()=>n.open,e=>{e&&(i.value=!1)});function a(){i.value||r(`cancel`)}async function o(){i.value=!0,r(`confirm`)}return(t,n)=>(I(),Ta(nr,{to:`body`},[e.open?(I(),L(`div`,jde,[R(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:a}),R(`div`,Mde,[R(`div`,Nde,[R(`div`,Pde,[R(`div`,{class:A([`size-9 rounded-lg flex items-center justify-center flex-shrink-0`,e.variant===`danger`?`bg-destructive/10`:`bg-warning/10`])},[z(P(K),{icon:`lucide:alert-triangle`,size:18,class:A(e.variant===`danger`?`text-destructive`:`text-warning`)},null,8,[`class`])],2),R(`div`,Fde,[R(`div`,Ide,j(e.title),1),R(`div`,Lde,j(e.message),1)])])]),R(`div`,Rde,[R(`button`,{class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:i.value,onClick:a},j(e.cancelText||`Cancel`),9,zde),R(`button`,{class:A([`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,e.variant===`danger`?`bg-destructive text-destructive-foreground hover:bg-destructive/90`:`bg-warning text-warning-foreground hover:bg-warning/90`]),disabled:i.value,onClick:o},[i.value?(I(),L(`div`,Vde)):B(``,!0),Na(` `+j(e.confirmText||`Confirm`),1)],10,Bde)])])])):B(``,!0)]))}}),[[`__scopeId`,`data-v-abfe521d`]]),Hde={class:`flex flex-col h-full`},Ude={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},Wde={class:`relative flex-1 max-w-xs`},Gde={class:`flex gap-1 overflow-x-auto`},Kde=[`onClick`],qde={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},Jde={class:`flex-1 overflow-y-auto p-3.5`},Yde={key:0,class:`flex flex-col gap-1`},Xde=[`title`],Zde=[`onClick`],Qde=[`onClick`],$de=[`onClick`],efe=[`title`],tfe={key:1,class:`empty-state`},nfe={class:`empty-title`},rfe={class:`empty-desc`},ife=br({__name:`ApiRoutes`,props:{routes:{},filePath:{type:Function},methodClass:{type:Function}},emits:[`tryRoute`,`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(`ALL`),o=M(null),s=V(()=>{let e=new Set(n.routes.map(e=>e.method));return[`ALL`,...Array.from(e).sort()]}),c=V(()=>{let e=[...n.routes];if(a.value!==`ALL`&&(e=e.filter(e=>e.method===a.value)),i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e}),l=V(()=>o.value?`Are you sure you want to delete "${o.value.method} ${o.value.path}"? A backup will be created (.bak file).`:``);function u(e){o.value=e}function d(){o.value&&=(r(`delete`,o.value),null)}return(t,n)=>(I(),L(`div`,Hde,[R(`div`,Ude,[R(`div`,Wde,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search routes...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`div`,Gde,[(I(!0),L(ha,null,Yr(s.value,e=>(I(),L(`button`,{key:e,class:A([`filter-chip`,a.value===e?`filter-chip-active`:`filter-chip-idle`]),onClick:t=>a.value=e},j(e),11,Kde))),128))]),R(`span`,qde,j(c.value.length)+` routes `,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New API route (A)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,Jde,[c.value.length>0?(I(),L(`div`,Yde,[(I(!0),L(ha,null,Yr(c.value,(t,n)=>(I(),L(`div`,{key:n,class:`group flex items-center gap-2.5 px-3 py-2 bg-background border border-base rounded-lg text-xs hover:bg-active transition-colors`},[R(`span`,{class:A([`min-w-[46px] px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider text-center font-mono flex-shrink-0`,e.methodClass(t.method)])},j(t.method),3),R(`span`,{class:`font-mono text-foreground flex-1 text-xs truncate`,title:t.path},j(t.path),9,Xde),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit route`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,Zde),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary rounded transition-all cursor-pointer flex-shrink-0`,title:`Try in Playground`,onClick:e=>r(`tryRoute`,t)},[z(P(K),{icon:`lucide:play`,size:12})],8,Qde),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete route`,onClick:ws(e=>u(t),[`stop`])},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,$de),t.filePath?(I(),L(`span`,{key:0,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,efe)):B(``,!0)]))),128))])):(I(),L(`div`,tfe,[z(P(K),{icon:`lucide:route`,size:32,class:`text-muted-foreground/40 mb-3`}),R(`div`,nfe,j(i.value?`No routes match your search`:`No API routes`),1),R(`div`,rfe,j(i.value?`Try different keywords`:`API routes will appear here as you add endpoints`),1)]))]),z(v6,{open:!!o.value,title:`Delete API Route`,message:l.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:d,onCancel:n[2]||=e=>o.value=null},null,8,[`open`,`message`])]))}}),afe={class:`flex flex-col h-full`},ofe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center justify-between gap-2 flex-shrink-0`},sfe={class:`flex-1 overflow-y-auto p-3.5`},cfe={class:`grid grid-cols-3 gap-2 mb-4`},lfe={class:`flex items-center gap-1.5 mb-1`},ufe={class:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`},dfe=[`title`],ffe={key:0,class:`bg-background border border-base rounded-lg overflow-hidden`},pfe={class:`divide-y divide-#8882`},mfe={class:`text-xs font-mono text-primary font-medium min-w-24`},hfe=[`title`],gfe={key:1,class:`mt-3 bg-background border border-base rounded-lg overflow-hidden`},_fe={class:`p-3 flex flex-wrap gap-1.5`},vfe=br({__name:`Config`,props:{config:{},info:{},fmtUptime:{type:Function},fmtTime:{type:Function},fmtVal:{type:Function},uptime:{}},emits:[`edit`],setup(e,{emit:t}){let n=e,r=t,i=V(()=>Object.entries(n.config)),a=V(()=>[{label:`Version`,value:n.info.version,icon:`lucide:tag`,color:`text-primary`},{label:`Uptime`,value:n.fmtUptime(n.uptime),icon:`lucide:clock`,color:`text-success`},{label:`Started`,value:n.fmtTime(n.info.startTime),icon:`lucide:play`,color:`text-info`},{label:`Preset`,value:n.info.presets.join(`, `)||`standard`,icon:`lucide:package`,color:`text-warning`},{label:`Pages`,value:String(n.info.pages),icon:`lucide:file-text`,color:`text-info`},{label:`API Routes`,value:String(n.info.apiRoutes),icon:`lucide:send`,color:`text-success`},{label:`Middleware`,value:String(n.info.middleware),icon:`lucide:layers`,color:`text-warning`},{label:`Layouts`,value:String(n.info.layouts),icon:`lucide:layout`,color:`text-purple-400`},{label:`Cron Jobs`,value:String(n.info.crons),icon:`lucide:clock-4`,color:`text-accent`}]);return(t,n)=>(I(),L(`div`,afe,[R(`div`,ofe,[n[2]||=R(`span`,{class:`text-xs font-semibold text-foreground`},`Configuration`,-1),R(`button`,{class:`flex items-center gap-1 px-2 py-1 text-2xs font-medium text-muted-foreground hover:text-primary hover:bg-primary/10 rounded-md transition-colors cursor-pointer`,title:`Edit Config File`,onClick:n[0]||=e=>r(`edit`)},[z(P(K),{icon:`lucide:pencil`,size:12}),n[1]||=Na(` Edit Config File `,-1)])]),R(`div`,sfe,[R(`div`,cfe,[(I(!0),L(ha,null,Yr(a.value,e=>(I(),L(`div`,{key:e.label,class:`bg-background border border-base rounded-lg p-2.5`},[R(`div`,lfe,[z(P(K),{icon:e.icon,size:12,class:A(e.color)},null,8,[`icon`,`class`]),R(`span`,ufe,j(e.label),1)]),R(`div`,{class:`text-xs font-semibold text-foreground font-mono truncate`,title:e.value},j(e.value),9,dfe)]))),128))]),i.value.length>0?(I(),L(`div`,ffe,[n[3]||=R(`div`,{class:`px-3 py-2 border-b border-base bg-secondary`},[R(`span`,{class:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`},`Resolved Config`)],-1),R(`div`,pfe,[(I(!0),L(ha,null,Yr(i.value,([t,n])=>(I(),L(`div`,{key:t,class:`flex items-center px-3 py-2 gap-2 hover:bg-active transition-colors`},[R(`span`,mfe,j(t),1),R(`span`,{class:`text-xs font-mono text-foreground truncate`,title:e.fmtVal(n)},j(e.fmtVal(n)),9,hfe)]))),128))])])):B(``,!0),e.info.presets&&e.info.presets.length>0?(I(),L(`div`,gfe,[n[4]||=R(`div`,{class:`px-3 py-2 border-b border-base bg-secondary`},[R(`span`,{class:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`},`Active Presets`)],-1),R(`div`,_fe,[(I(!0),L(ha,null,Yr(e.info.presets,e=>(I(),L(`span`,{key:e,class:`inline-flex items-center gap-1 px-2 py-0.5 bg-primary/10 text-primary text-[10px] font-semibold rounded-md`},[z(P(K),{icon:`lucide:package`,size:10}),Na(` `+j(e),1)]))),128))])])):B(``,!0)])]))}}),yfe={class:`flex flex-col h-full`},bfe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},xfe={class:`relative flex-1 max-w-xs`},Sfe={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},Cfe={class:`flex-1 overflow-y-auto p-3.5`},wfe={key:0,class:`flex flex-col gap-1`},Tfe={class:`flex flex-col min-w-0 flex-1`},Efe={class:`font-mono text-sm font-medium text-foreground`},Dfe={class:`font-mono text-2xs text-accent/80`},Ofe=[`onClick`],kfe=[`onClick`],Afe=[`title`],jfe={key:1,class:`empty-state`},Mfe=br({__name:`Crons`,props:{crons:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(null),o=V(()=>{let e=[...n.crons];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.schedule?.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e}),s=V(()=>a.value?`Are you sure you want to delete cron job "${a.value.name}"? A backup will be created.`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}return(t,n)=>(I(),L(`div`,yfe,[R(`div`,bfe,[R(`div`,xfe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search cron jobs...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`span`,Sfe,j(o.value.length)+` jobs`,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New cron job (C)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,Cfe,[o.value.length>0?(I(),L(`div`,wfe,[(I(!0),L(ha,null,Yr(o.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:clock`,size:14,class:`text-accent flex-shrink-0`}),R(`div`,Tfe,[R(`span`,Efe,j(t.name),1),R(`span`,Dfe,j(t.schedule),1)]),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit cron job`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,Ofe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete cron job`,onClick:e=>c(t)},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,kfe),t.filePath?(I(),L(`span`,{key:0,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,Afe)):B(``,!0)]))),128))])):(I(),L(`div`,jfe,[z(P(K),{icon:`lucide:clock`,size:32,class:`text-muted-foreground/40 mb-3`}),n[4]||=R(`div`,{class:`empty-title`},`No cron jobs`,-1),n[5]||=R(`div`,{class:`empty-desc`},`Define scheduled tasks with defineScheduled()`,-1)]))]),z(v6,{open:!!a.value,title:`Delete Cron Job`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),Nfe={class:`w-full h-full relative bg-background`},Pfe={key:0,class:`w-full h-full relative`},Ffe={key:0,class:`absolute inset-0 flex flex-col items-center justify-center gap-3 text-muted-foreground text-xs`},Ife=[`src`],Lfe={key:1,class:`absolute inset-0 flex flex-col items-center justify-center gap-3 text-muted-foreground px-10 py-10 text-center bg-background`},Rfe={key:1,class:`flex flex-col items-center justify-center h-full text-muted-foreground gap-3 px-10 py-10 text-center`},zfe=br({__name:`DrizzleStudio`,props:{studioUrl:{},available:{type:Boolean}},setup(e){let t=e,n=M(!1),r=M(!1),i=t.studioUrl||`http://127.0.0.1:4983`;function a(){n.value=!0,r.value=!1}function o(){r.value=!0}function s(){window.open(i,`_blank`,`noopener,noreferrer`)}function c(){window.open(`https://local.drizzle.studio`,`_blank`,`noopener,noreferrer`)}return(t,l)=>(I(),L(`div`,Nfe,[e.available===!1?(I(),L(`div`,Rfe,[z(P(K),{icon:`lucide:database`,size:40,class:`text-muted-foreground/50`}),l[6]||=R(`div`,{class:`text-[15px] font-semibold text-foreground`},`Database Not Configured`,-1),l[7]||=R(`div`,{class:`text-xs leading-relaxed max-w-90 op-fade`},[Na(` Drizzle Studio requires a database connection. Configure `),R(`code`,{class:`bg-secondary px-1.5 py-0.5 rounded text-[11px] font-mono text-primary`},`db0`),Na(` or Drizzle ORM to enable. `)],-1)])):(I(),L(`div`,Pfe,[!n.value&&!r.value?(I(),L(`div`,Ffe,[l[0]||=R(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),l[1]||=R(`span`,null,`Connecting to Drizzle Studio...`,-1),l[2]||=R(`p`,{class:`text-[12px] text-muted-foreground/70 m-0`},[Na(` Make sure `),R(`code`,{class:`bg-secondary px-1 py-0.5 rounded font-mono text-primary text-[11px]`},`drizzle-kit studio`),Na(` is running on port 4983 `)],-1),R(`button`,{class:`btn-action-sm mt-2`,onClick:c},`Open local.drizzle.studio →`)])):B(``,!0),Fn(R(`iframe`,{src:P(i),class:`w-full h-full border-none bg-white`,title:`Drizzle Studio`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups allow-modals`,onLoad:a,onError:o},null,40,Ife),[[zo,n.value]]),r.value||!e.available?(I(),L(`div`,Lfe,[z(P(K),{icon:`lucide:database`,size:40,class:`text-muted-foreground/50`}),l[3]||=R(`div`,{class:`text-[15px] font-semibold text-foreground`},`Drizzle Studio Not Connected`,-1),l[4]||=R(`div`,{class:`text-xs leading-relaxed max-w-90 op-fade`},` Drizzle Studio needs to be started separately. Run the command below and refresh: `,-1),l[5]||=R(`pre`,{class:`bg-secondary border border-base px-4 py-2.5 rounded-md font-mono text-xs text-foreground my-1`},`npx drizzle-kit studio`,-1),R(`button`,{class:`mt-2 px-4.5 py-2 bg-primary border-none rounded-md text-primary-foreground text-sm font-medium cursor-pointer transition-all hover:bg-primary/90`,onClick:s},` Open in Browser (`+j(P(i))+`) → `,1)])):B(``,!0)]))]))}}),Bfe={class:`flex flex-col h-full`},Vfe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},Hfe={class:`relative flex-1 max-w-xs`},Ufe={class:`flex gap-1`},Wfe={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},Gfe={class:`flex-1 overflow-hidden p-3.5`},Kfe={key:0,class:`h-full`},qfe={key:1,class:`h-full overflow-y-auto`},Jfe={key:0,class:`section-card`},Yfe={class:`section-header`},Xfe={class:`section-body`},Zfe={class:`info-key font-mono text-2xs flex items-center gap-1.5`},Qfe=[`title`],$fe=[`onClick`],epe=[`onClick`],tpe={key:1,class:`empty-state`},npe={class:`empty-title`},rpe={class:`empty-desc`},ipe=br({__name:`EnvVars`,props:{env:{},onAdd:{type:Function},onEdit:{type:Function},onDelete:{type:Function}},setup(e){let t=e,n=M(``),r=M(`list`),i=V(()=>{let e=Object.entries(t.env);if(n.value){let t=n.value.toLowerCase();e=e.filter(([e,n])=>e.toLowerCase().includes(t)||String(n).toLowerCase().includes(t))}return e.sort(([e],[t])=>e.localeCompare(t))}),a=V(()=>JSON.stringify(t.env,null,2));function o(e){let t=e.toUpperCase();return[`KEY`,`SECRET`,`TOKEN`,`PASSWORD`,`AUTH`,`CREDENTIAL`].some(e=>t.includes(e))}return(e,s)=>(I(),L(`div`,Bfe,[R(`div`,Vfe,[R(`div`,Hfe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":s[0]||=e=>n.value=e,type:`text`,placeholder:`Search env vars...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,n.value]])]),R(`div`,Ufe,[R(`button`,{class:A([`filter-chip`,r.value===`list`?`filter-chip-active`:`filter-chip-idle`]),onClick:s[1]||=e=>r.value=`list`},` List `,2),R(`button`,{class:A([`filter-chip`,r.value===`json`?`filter-chip-active`:`filter-chip-idle`]),onClick:s[2]||=e=>r.value=`json`},` JSON `,2)]),R(`button`,{class:`flex items-center gap-1 px-2 py-1 bg-primary text-primary-foreground rounded-md text-2xs font-medium hover:bg-primary/90 transition-colors cursor-pointer flex-shrink-0`,title:`Add env var`,onClick:s[3]||=(...e)=>t.onAdd&&t.onAdd(...e)},[z(P(K),{icon:`lucide:plus`,size:12}),s[4]||=Na(` Add `,-1)]),R(`span`,Wfe,j(i.value.length)+` vars`,1)]),R(`div`,Gfe,[r.value===`json`?(I(),L(`div`,Kfe,[z(S4,{"model-value":a.value,language:`json`,readonly:``,label:`Environment Variables`,height:`100%`},null,8,[`model-value`])])):(I(),L(`div`,qfe,[i.value.length>0?(I(),L(`div`,Jfe,[R(`div`,Yfe,[z(P(K),{icon:`lucide:shield`,size:13,class:`text-warning`}),s[5]||=R(`span`,{class:`section-title`},`Environment Variables`,-1)]),R(`div`,Xfe,[(I(!0),L(ha,null,Yr(i.value,([e,n])=>(I(),L(`div`,{key:e,class:`info-row group`},[R(`span`,Zfe,[o(e)?(I(),Ta(P(K),{key:0,icon:`lucide:eye-off`,size:11,class:`text-destructive`})):B(``,!0),Na(` `+j(e),1)]),R(`span`,{class:`info-val truncate max-w-[200px]`,title:String(n)},j(String(n)),9,Qfe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-5 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit env var`,onClick:ws(r=>t.onEdit(e,String(n)),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:11})],8,$fe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-5 flex items-center justify-center text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete env var`,onClick:ws(n=>t.onDelete(e),[`stop`])},[z(P(K),{icon:`lucide:trash-2`,size:11})],8,epe)]))),128))])])):(I(),L(`div`,tpe,[z(P(K),{icon:`lucide:terminal`,size:32,class:`text-muted-foreground/40 mb-3`}),R(`div`,npe,j(n.value?`No env vars match your search`:`No environment variables`),1),R(`div`,rpe,j(n.value?`Try different keywords`:`Define env vars in your .env file`),1)]))]))])]))}}),ape={class:`flex flex-col h-full`},ope={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},spe={class:`relative flex-1 max-w-xs`},cpe={class:`text-[10px] text-muted-foreground ml-auto op-fade`},lpe={class:`flex-1 overflow-y-auto p-3.5`},upe={key:0,class:`flex flex-col gap-1`},dpe={class:`flex flex-col flex-1 min-w-0`},fpe={class:`text-xs font-medium text-foreground truncate`},ppe=[`title`],mpe={key:0,class:`text-[10px] px-1.5 py-0.5 bg-purple-500/12 text-purple-400 rounded-md font-semibold`},hpe=[`onClick`],gpe=[`onClick`],_pe=[`title`],vpe={key:1,class:`empty-state`},ype=br({__name:`Layouts`,props:{layouts:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(null),o=V(()=>{let e=[...n.layouts];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t))}return e.sort((e,t)=>e.isDefault===t.isDefault?e.name.localeCompare(t.name):e.isDefault?-1:1)}),s=V(()=>a.value?`Are you sure you want to delete layout "${a.value.name}"? A backup will be created.`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}return(t,n)=>(I(),L(`div`,ape,[R(`div`,ope,[R(`div`,spe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search layouts...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`span`,cpe,j(e.layouts.length)+` layouts`,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New layout (L)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,lpe,[o.value.length>0?(I(),L(`div`,upe,[(I(!0),L(ha,null,Yr(o.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:layout`,size:14,class:`text-purple-400 flex-shrink-0`}),R(`div`,dpe,[R(`span`,fpe,j(t.name),1),R(`span`,{class:`text-[10px] text-muted-foreground font-mono truncate`,title:t.path},j(t.path),9,ppe)]),t.isDefault?(I(),L(`span`,mpe,` DEFAULT `)):B(``,!0),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit layout`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,hpe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete layout`,onClick:e=>c(t)},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,gpe),t.filePath?(I(),L(`span`,{key:1,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,_pe)):B(``,!0)]))),128))])):(I(),L(`div`,vpe,[z(P(K),{icon:`lucide:layout`,size:32,class:`text-muted-foreground/40 mb-3`}),n[4]||=R(`div`,{class:`empty-title`},`No layouts found`,-1),n[5]||=R(`div`,{class:`empty-desc`},`Add layout files to the layouts/ directory`,-1)]))]),z(v6,{open:!!a.value,title:`Delete Layout`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),bpe={class:`flex flex-col h-full`},xpe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},Spe={class:`relative flex-1 max-w-xs`},Cpe={class:`flex gap-1`},wpe={class:`flex-1 overflow-y-auto p-3.5`},Tpe={key:0,class:`flex flex-col gap-1`},Epe=[`title`],Dpe={key:0,class:`text-[10px] px-1.5 py-0.5 bg-warning/12 text-warning rounded-md font-semibold`},Ope=[`onClick`],kpe=[`onClick`],Ape=[`title`],jpe={key:1,class:`empty-state`},Mpe=br({__name:`Middlewares`,props:{middlewares:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(`ALL`),o=M(null),s=V(()=>{let e=[...n.middlewares];if(a.value===`GLOBAL`?e=e.filter(e=>e.global):a.value===`ROUTE`&&(e=e.filter(e=>!e.global)),i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e.sort((e,t)=>e.global===t.global?e.path.localeCompare(t.path):e.global?-1:1)}),c=V(()=>n.middlewares.filter(e=>e.global).length),l=V(()=>n.middlewares.filter(e=>!e.global).length),u=V(()=>o.value?`Are you sure you want to delete middleware "${o.value.path}"? A backup will be created.`:``);function d(e){o.value=e}function f(){o.value&&=(r(`delete`,o.value),null)}return(t,n)=>(I(),L(`div`,bpe,[R(`div`,xpe,[R(`div`,Spe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search middlewares...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`div`,Cpe,[R(`button`,{class:A([`filter-chip`,a.value===`ALL`?`filter-chip-active`:`filter-chip-idle`]),onClick:n[1]||=e=>a.value=`ALL`},` All (`+j(e.middlewares.length)+`) `,3),R(`button`,{class:A([`filter-chip`,a.value===`GLOBAL`?`bg-warning/15 text-warning op100!`:`filter-chip-idle`]),onClick:n[2]||=e=>a.value=`GLOBAL`},` Global (`+j(c.value)+`) `,3),R(`button`,{class:A([`filter-chip`,a.value===`ROUTE`?`bg-info/15 text-info op100!`:`filter-chip-idle`]),onClick:n[3]||=e=>a.value=`ROUTE`},` Route (`+j(l.value)+`) `,3)]),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0 ml-auto`,title:`New middleware (M)`,onClick:n[4]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[6]||=Na(` New `,-1)])]),R(`div`,wpe,[s.value.length>0?(I(),L(`div`,Tpe,[(I(!0),L(ha,null,Yr(s.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:layers`,size:14,class:`text-warning flex-shrink-0`}),R(`span`,{class:`font-mono text-foreground flex-1 text-xs truncate`,title:t.path},j(t.path),9,Epe),t.global?(I(),L(`span`,Dpe,` GLOBAL `)):B(``,!0),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit middleware`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,Ope),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete middleware`,onClick:e=>d(t)},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,kpe),t.filePath?(I(),L(`span`,{key:1,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,Ape)):B(``,!0)]))),128))])):(I(),L(`div`,jpe,[z(P(K),{icon:`lucide:layers`,size:32,class:`text-muted-foreground/40 mb-3`}),n[7]||=R(`div`,{class:`empty-title`},`No middlewares found`,-1),n[8]||=R(`div`,{class:`empty-desc`},`Add middleware files to intercept requests`,-1)]))]),z(v6,{open:!!o.value,title:`Delete Middleware`,message:u.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:f,onCancel:n[5]||=e=>o.value=null},null,8,[`open`,`message`])]))}}),Npe={class:`p-3.5`},Ppe={class:`grid grid-cols-4 gap-2 mb-3`},Fpe={class:`text-lg font-semibold text-foreground leading-tight`},Ipe={class:`text-[11px] text-muted-foreground`},Lpe={class:`grid grid-cols-2 gap-2.5 mb-2.5`},Rpe={class:`section-card`},zpe={class:`section-header`},Bpe={class:`section-body`},Vpe={class:`info-row`},Hpe={class:`info-val`},Upe={class:`info-row`},Wpe={class:`info-val`},Gpe={class:`info-row`},Kpe={class:`info-val`},qpe={class:`section-card`},Jpe={class:`section-header`},Ype={class:`section-body`},Xpe={key:0,class:`px-3.5 py-2.5 flex flex-wrap gap-1.5`},Zpe={key:1,class:`empty-state py-6`},Qpe={key:0,class:`section-card`},$pe={class:`section-header`},eme={class:`section-body`},tme={class:`info-key font-mono text-2xs`},nme={class:`info-val`},rme=br({__name:`Overview`,props:{info:{},uptime:{},fmtUptime:{type:Function},fmtTime:{type:Function},fmtVal:{type:Function}},setup(e){let t=e,n=V(()=>t.info?[{val:t.info.pages||0,label:`Pages`,icon:`lucide:file-text`,color:`primary`},{val:t.info.apiRoutes||0,label:`API Routes`,icon:`lucide:send`,color:`info`},{val:t.info.middleware||0,label:`Middleware`,icon:`lucide:layers`,color:`warning`},{val:t.info.crons||0,label:`Cron Jobs`,icon:`lucide:clock`,color:`accent`}]:[]),r={primary:`bg-primary/10 text-primary`,success:`bg-success/12 text-success`,warning:`bg-warning/12 text-warning`,info:`bg-info/12 text-info`,accent:`bg-accent/10 text-accent`,destructive:`bg-destructive/12 text-destructive`},i=[`primary`,`success`,`info`,`warning`,`accent`];return(t,a)=>(I(),L(`div`,Npe,[R(`div`,Ppe,[(I(!0),L(ha,null,Yr(n.value,(e,t)=>(I(),L(`div`,{key:t,class:`flex items-center gap-2.5 px-3 py-2.5 bg-background border border-base rounded-lg`},[R(`div`,{class:A([`size-9 rounded-lg flex items-center justify-center flex-shrink-0`,[r[e.color]]])},[z(P(K),{icon:e.icon,size:18},null,8,[`icon`])],2),R(`div`,null,[R(`div`,Fpe,j(e.val),1),R(`div`,Ipe,j(e.label),1)])]))),128))]),R(`div`,Lpe,[R(`div`,Rpe,[R(`div`,zpe,[z(P(K),{icon:`lucide:activity`,size:13,class:`text-primary`}),a[0]||=R(`span`,{class:`section-title`},`Server Status`,-1)]),R(`div`,Bpe,[a[4]||=R(`div`,{class:`info-row`},[R(`span`,{class:`info-key`},`Status`),R(`span`,{class:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold bg-success/12 text-success`},[R(`span`,{class:`size-1.5 rounded-full bg-success animate-pulse`}),Na(` Running `)])],-1),R(`div`,Vpe,[a[1]||=R(`span`,{class:`info-key`},`Uptime`,-1),R(`span`,Hpe,j(e.fmtUptime(e.uptime)),1)]),R(`div`,Upe,[a[2]||=R(`span`,{class:`info-key`},`Version`,-1),R(`span`,Wpe,`v`+j(e.info.version),1)]),R(`div`,Gpe,[a[3]||=R(`span`,{class:`info-key`},`Start Time`,-1),R(`span`,Kpe,j(e.fmtTime(e.info.startTime)),1)])])]),R(`div`,qpe,[R(`div`,Jpe,[z(P(K),{icon:`lucide:cpu`,size:13,class:`text-info`}),a[5]||=R(`span`,{class:`section-title`},`Presets`,-1)]),R(`div`,Ype,[e.info.presets&&e.info.presets.length>0?(I(),L(`div`,Xpe,[(I(!0),L(ha,null,Yr(e.info.presets,(e,t)=>(I(),L(`span`,{key:e,class:A([`inline-flex items-center px-2.5 py-1 rounded-md text-2xs font-medium`,[r[i[t%i.length]]]])},j(e),3))),128))])):(I(),L(`div`,Zpe,[...a[6]||=[R(`span`,{class:`text-xs text-muted-foreground`},`No presets loaded`,-1)]]))])])]),e.info.config&&Object.keys(e.info.config).length>0?(I(),L(`div`,Qpe,[R(`div`,$pe,[z(P(K),{icon:`lucide:settings`,size:13,class:`text-warning`}),a[7]||=R(`span`,{class:`section-title`},`Configuration`,-1)]),R(`div`,eme,[(I(!0),L(ha,null,Yr(e.info.config,(t,n)=>(I(),L(`div`,{key:String(n),class:`info-row`},[R(`span`,tme,j(n),1),R(`span`,nme,j(e.fmtVal(t)),1)]))),128))])])):B(``,!0)]))}}),ime={class:`flex flex-col h-full`},ame={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 shrink-0`},ome={class:`relative flex-1 max-w-xs`},sme={class:`text-2xs text-muted-foreground ml-auto shrink-0 op-fade`},cme={class:`flex-1 overflow-y-auto p-3.5`},lme={key:0,class:`flex flex-col gap-1`},ume={class:`flex flex-col min-w-0 flex-1`},dme=[`title`],fme={key:0,class:`text-2xs text-muted-foreground flex items-center gap-1 mt-0.5`},pme=[`title`],mme=[`onClick`],hme=[`onClick`],gme=[`onClick`],_me=[`onClick`],vme={key:1,class:`empty-state`},yme={class:`empty-title`},bme={class:`empty-desc`},xme=br({__name:`Pages`,props:{pages:{},filePath:{type:Function}},emits:[`delete`,`edit`,`edit-meta`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(null),o=V(()=>{let e=[...n.pages];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t)||e.name&&e.name.toLowerCase().includes(t))}return e.sort((e,t)=>e.path.localeCompare(t.path))}),s=V(()=>a.value?`Are you sure you want to delete "${a.value.path}"? A backup will be created (.bak file).`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}function u(e){let t=`${window.location.origin}${e}`;window.open(t,`_blank`)}return(t,n)=>(I(),L(`div`,ime,[R(`div`,ame,[R(`div`,ome,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search pages...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`span`,sme,j(o.value.length)+` pages`,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer shrink-0`,title:`New page (P)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,cme,[o.value.length>0?(I(),L(`div`,lme,[(I(!0),L(ha,null,Yr(o.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:file-text`,size:14,class:`text-primary shrink-0`}),R(`div`,ume,[R(`span`,{class:`font-mono text-primary text-xs`,title:t.path},j(t.path),9,dme),t.layout?(I(),L(`span`,fme,[z(P(K),{icon:`lucide:layout`,size:11}),Na(` `+j(t.layout),1)])):B(``,!0)]),t.filePath?(I(),L(`span`,{key:0,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,pme)):B(``,!0),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Open route in browser`,onClick:ws(e=>u(t.path),[`stop`])},[z(P(K),{icon:`lucide:external-link`,size:12})],8,mme),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Edit page properties (definePage)`,onClick:ws(e=>r(`edit-meta`,t),[`stop`])},[z(P(K),{icon:`lucide:sliders-horizontal`,size:12})],8,hme),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Edit page source`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,gme),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Delete page`,onClick:ws(e=>c(t),[`stop`])},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,_me)]))),128))])):(I(),L(`div`,vme,[z(P(K),{icon:`lucide:file-text`,size:32,class:`text-muted-foreground/40 mb-3`}),R(`div`,yme,j(i.value?`No pages match your search`:`No pages found`),1),R(`div`,bme,j(i.value?`Try different keywords`:`Add .vue files in your pages directory`),1)]))]),z(v6,{open:!!a.value,title:`Delete Page`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),Sme=2,Cme=1,wme=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(Sme,Math.floor(u/e.css.cell.width)),rows:Math.max(Cme,Math.floor(l/e.css.cell.height))}}},y6=Object.defineProperty,Tme=Object.getOwnPropertyDescriptor,Eme=(e,t)=>{for(var n in t)y6(e,n,{get:t[n],enumerable:!0})},b6=(e,t,n,r)=>{for(var i=r>1?void 0:r?Tme(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&y6(t,n,i),i},Z=(e,t)=>(n,r)=>t(n,r,e),x6=`Terminal input`,S6={get:()=>x6,set:e=>x6=e},C6=`Too much output to announce, navigate to rows manually to read`,w6={get:()=>C6,set:e=>C6=e};function Dme(e){return e.replace(/\r?\n/g,`\r`)}function Ome(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function kme(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function Ame(e,t,n,r){e.stopPropagation(),e.clipboardData&&T6(e.clipboardData.getData(`text/plain`),t,n,r)}function T6(e,t,n,r){e=Dme(e),e=Ome(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function E6(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function D6(e,t,n,r,i){E6(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function O6(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function k6(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var jme=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Mme=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},A6=``,j6=` `,M6=class e{constructor(){this.fg=0,this.bg=0,this.extended=new N6}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},N6=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},P6=class e extends M6{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new N6,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?O6(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},F6=`di$target`,I6=`di$dependencies`,L6=new Map;function Nme(e){return e[I6]||[]}function R6(e){if(L6.has(e))return L6.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Pme(t,e,r)};return t._id=e,L6.set(e,t),t}function Pme(e,t,n){t[F6]===t?t[I6].push({id:e,index:n}):(t[I6]=[{id:e,index:n}],t[F6]=t)}var z6=R6(`BufferService`),B6=R6(`CoreMouseService`),V6=R6(`CoreService`),Fme=R6(`CharsetService`),H6=R6(`InstantiationService`),U6=R6(`LogService`),W6=R6(`OptionsService`),G6=R6(`OscLinkService`),Ime=R6(`UnicodeService`),K6=R6(`DecorationService`),q6=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new P6,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Lme(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};q6=b6([Z(0,z6),Z(1,W6),Z(2,G6)],q6);function Lme(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
439
|
+
}`)});function _(){d.value.push({key:``,value:``,enabled:!0})}function v(e){d.value.splice(e,1)}function y(){f.value.push({key:``,value:``,enabled:!0})}function b(e){f.value.splice(e,1)}function x(){let e=d.value.filter(e=>e.key&&e.enabled);if(e.length===0)return r.value;let t=r.value.includes(`?`)?`&`:`?`,n=e.map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join(`&`);return`${r.value}${t}${n}`}function S(){let e={};for(let t of f.value)t.key&&t.enabled&&(e[t.key]=t.value);return e}async function C(){if(s.value)return;s.value=!0,l.value=null,c.value=null;let e=performance.now(),t=x(),r=S(),a={method:n.value,headers:r};p.value&&i.value.trim()&&(a.body=i.value);try{let n=await fetch(t,a),r=Math.round(performance.now()-e),i={};n.headers.forEach((e,t)=>{i[t]=e});let s=await n.text();c.value={status:n.status,statusText:n.statusText,headers:i,body:s,time:r,size:new Blob([s]).size,contentType:n.headers.get(`content-type`)||``},o.value=`body`}catch(e){l.value=e instanceof Error?e.message:`Request failed`}finally{s.value=!1}}function w(e){n.value=e.method,r.value=e.path}function T(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let ee=V(()=>t.routes.filter(e=>e.path!==`*`&&!e.path.includes(`_scalar`)&&!e.path.includes(`_openapi`)));return(t,x)=>(I(),L(`div`,Hue,[R(`div`,Uue,[R(`div`,Wue,[Fn(R(`select`,{"onUpdate:modelValue":x[0]||=e=>n.value=e,class:A([`px-2 py-1.5 bg-background border border-base rounded-md text-xs font-bold text-foreground outline-none focus:border-active cursor-pointer`,e.methodClass(n.value)])},[(I(),L(ha,null,Yr(u,e=>R(`option`,{key:e,value:e},j(e),9,Gue)),64))],2),[[vee,n.value]]),Fn(R(`input`,{"onUpdate:modelValue":x[1]||=e=>r.value=e,type:`text`,placeholder:`Enter request URL...`,class:`flex-1 px-3 py-1.5 bg-background border border-base rounded-md text-xs font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`,onKeydown:Ts(C,[`enter`])},null,544),[[vs,r.value]]),R(`button`,{class:A([`px-4 py-1.5 rounded-md text-xs font-semibold text-primary-foreground transition-all cursor-pointer flex items-center gap-1.5`,s.value?`bg-primary/60 cursor-wait`:`bg-primary hover:bg-primary/90`]),disabled:s.value,onClick:C},[s.value?(I(),Ta(P(K),{key:0,icon:`lucide:loader-2`,size:12,class:`animate-spin`})):(I(),Ta(P(K),{key:1,icon:`lucide:send`,size:12})),Na(` `+j(s.value?`Sending...`:`Send`),1)],10,Kue)]),R(`div`,que,[R(`button`,{class:A([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`params`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[2]||=e=>a.value=`params`},[x[8]||=Na(` Params `,-1),d.value.some(e=>e.key&&e.enabled)?(I(),L(`span`,Jue,`●`)):B(``,!0)],2),R(`button`,{class:A([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`headers`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[3]||=e=>a.value=`headers`},` Headers `,2),p.value?(I(),L(`button`,{key:0,class:A([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`body`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[4]||=e=>a.value=`body`},` Body `,2)):B(``,!0)]),a.value===`params`?(I(),L(`div`,Yue,[R(`div`,Xue,[(I(!0),L(ha,null,Yr(d.value,(e,t)=>(I(),L(`div`,{key:t,class:`flex items-center gap-1.5`},[Fn(R(`input`,{"onUpdate:modelValue":t=>e.enabled=t,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,8,Zue),[[ys,e.enabled]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.key=t,type:`text`,placeholder:`Key`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,Que),[[vs,e.key]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,placeholder:`Value`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,$ue),[[vs,e.value]]),R(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded cursor-pointer transition-colors`,onClick:e=>v(t)},[z(P(K),{icon:`lucide:x`,size:11})],8,ede)]))),128))]),R(`button`,{class:`mt-1 px-2 py-1 text-[11px] text-primary hover:text-primary/80 flex items-center gap-1 cursor-pointer`,onClick:_},[z(P(K),{icon:`lucide:plus`,size:11}),x[9]||=Na(` Add Parameter `,-1)])])):a.value===`headers`?(I(),L(`div`,tde,[R(`div`,nde,[(I(!0),L(ha,null,Yr(f.value,(e,t)=>(I(),L(`div`,{key:t,class:`flex items-center gap-1.5`},[Fn(R(`input`,{"onUpdate:modelValue":t=>e.enabled=t,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,8,rde),[[ys,e.enabled]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.key=t,type:`text`,placeholder:`Header name`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,ide),[[vs,e.key]]),Fn(R(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,placeholder:`Value`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,ade),[[vs,e.value]]),R(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded cursor-pointer transition-colors`,onClick:e=>b(t)},[z(P(K),{icon:`lucide:x`,size:11})],8,ode)]))),128))]),R(`button`,{class:`mt-1 px-2 py-1 text-[11px] text-primary hover:text-primary/80 flex items-center gap-1 cursor-pointer`,onClick:y},[z(P(K),{icon:`lucide:plus`,size:11}),x[10]||=Na(` Add Header `,-1)])])):a.value===`body`&&p.value?(I(),L(`div`,sde,[z(S4,{modelValue:i.value,"onUpdate:modelValue":x[5]||=e=>i.value=e,language:`json`,"line-numbers":!1,height:`100%`},null,8,[`modelValue`])])):B(``,!0)]),R(`div`,cde,[l.value?(I(),L(`div`,lde,[z(P(K),{icon:`lucide:alert-circle`,size:14,class:`flex-shrink-0 mt-0.5`}),R(`div`,null,[x[11]||=R(`strong`,null,`Request failed`,-1),x[12]||=R(`br`,null,null,-1),Na(` `+j(l.value),1)])])):B(``,!0),c.value?(I(),L(`div`,ude,[R(`div`,dde,[R(`span`,{class:A([`px-2 py-0.5 rounded-md text-[10px] font-bold font-mono`,m.value])},j(c.value.status)+` `+j(c.value.statusText),3),R(`span`,fde,[z(P(K),{icon:`lucide:clock`,size:11}),Na(` `+j(c.value.time)+`ms `,1)]),R(`span`,pde,[z(P(K),{icon:`lucide:hard-drive`,size:11}),Na(` `+j(T(c.value.size)),1)]),R(`div`,mde,[R(`button`,{class:A([`px-2 py-1 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,o.value===`body`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[6]||=e=>o.value=`body`},` Body `,2),R(`button`,{class:A([`px-2 py-1 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,o.value===`headers`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[7]||=e=>o.value=`headers`},` Headers (`+j(Object.keys(c.value.headers).length)+`) `,3)])]),o.value===`body`?(I(),L(`div`,hde,[z(S4,{"model-value":h.value,language:g.value,readonly:``,"line-numbers":!1,height:`100%`},null,8,[`model-value`,`language`])])):(I(),L(`div`,gde,[R(`div`,_de,[(I(!0),L(ha,null,Yr(c.value.headers,(e,t)=>(I(),L(`div`,{key:String(t),class:`flex items-center px-2 py-1 text-[11px] border-b border-base font-mono`},[R(`span`,vde,j(t),1),R(`span`,yde,j(e),1)]))),128))])]))])):!s.value&&!l.value?(I(),L(`div`,bde,[ee.value.length>0?(I(),L(`div`,xde,[R(`div`,Sde,[z(P(K),{icon:`lucide:zap`,size:13,class:`text-primary`}),x[13]||=R(`span`,{class:`section-title`},`Quick Select`,-1)]),R(`div`,Cde,[R(`div`,wde,[(I(!0),L(ha,null,Yr(ee.value.slice(0,50),t=>(I(),L(`button`,{key:`${t.method}-${t.path}`,class:`flex items-center gap-2 px-2 py-1 rounded text-left hover:bg-active transition-colors cursor-pointer`,onClick:e=>w(t)},[R(`span`,{class:A([`min-w-[42px] px-1.5 py-px rounded text-[9px] font-bold uppercase tracking-wider text-center font-mono`,e.methodClass(t.method)])},j(t.method),3),R(`span`,{class:`font-mono text-foreground text-xs truncate flex-1`,title:t.path},j(t.path),9,Ede)],8,Tde))),128)),ee.value.length>50?(I(),L(`div`,Dde,` ... and `+j(ee.value.length-50)+` more routes `,1)):B(``,!0)])])])):B(``,!0),R(`div`,Ode,[z(P(K),{icon:`lucide:play`,size:28,class:`text-muted-foreground/40 mb-2`}),x[14]||=R(`div`,{class:`empty-title`},`Ready to send`,-1),x[15]||=R(`div`,{class:`empty-desc`},`Select a route above or enter a URL to test your API`,-1)])])):B(``,!0),s.value?(I(),L(`div`,kde,[...x[16]||=[R(`div`,{class:`flex flex-col items-center gap-3 text-muted-foreground`},[R(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`}),R(`span`,{class:`text-xs`},`Sending request...`)],-1)]])):B(``,!0)])]))}}),jde={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},Mde={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-sm mx-4 overflow-hidden animate-scale-in`},Nde={class:`p-4 pb-3`},Pde={class:`flex items-start gap-3`},Fde={class:`min-w-0`},Ide={class:`text-sm font-semibold text-foreground`},Lde={class:`text-xs text-muted-foreground mt-1 leading-relaxed`},Rde={class:`flex items-center justify-end gap-2 px-4 py-3 bg-secondary border-t border-base`},zde=[`disabled`],Bde=[`disabled`],Vde={key:0,class:`size-3 border-2 border-current/30 border-t-current rounded-full animate-spin`},v6=cV(br({__name:`ConfirmDialog`,props:{open:{type:Boolean},title:{},message:{},confirmText:{},cancelText:{},variant:{}},emits:[`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=M(!1);Un(()=>n.open,e=>{e&&(i.value=!1)});function a(){i.value||r(`cancel`)}async function o(){i.value=!0,r(`confirm`)}return(t,n)=>(I(),Ta(nr,{to:`body`},[e.open?(I(),L(`div`,jde,[R(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:a}),R(`div`,Mde,[R(`div`,Nde,[R(`div`,Pde,[R(`div`,{class:A([`size-9 rounded-lg flex items-center justify-center flex-shrink-0`,e.variant===`danger`?`bg-destructive/10`:`bg-warning/10`])},[z(P(K),{icon:`lucide:alert-triangle`,size:18,class:A(e.variant===`danger`?`text-destructive`:`text-warning`)},null,8,[`class`])],2),R(`div`,Fde,[R(`div`,Ide,j(e.title),1),R(`div`,Lde,j(e.message),1)])])]),R(`div`,Rde,[R(`button`,{class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:i.value,onClick:a},j(e.cancelText||`Cancel`),9,zde),R(`button`,{class:A([`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,e.variant===`danger`?`bg-destructive text-destructive-foreground hover:bg-destructive/90`:`bg-warning text-warning-foreground hover:bg-warning/90`]),disabled:i.value,onClick:o},[i.value?(I(),L(`div`,Vde)):B(``,!0),Na(` `+j(e.confirmText||`Confirm`),1)],10,Bde)])])])):B(``,!0)]))}}),[[`__scopeId`,`data-v-abfe521d`]]),Hde={class:`flex flex-col h-full`},Ude={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},Wde={class:`relative flex-1 max-w-xs`},Gde={class:`flex gap-1 overflow-x-auto`},Kde=[`onClick`],qde={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},Jde={class:`flex-1 overflow-y-auto p-3.5`},Yde={key:0,class:`flex flex-col gap-1`},Xde=[`title`],Zde=[`onClick`],Qde=[`onClick`],$de=[`onClick`],efe=[`title`],tfe={key:1,class:`empty-state`},nfe={class:`empty-title`},rfe={class:`empty-desc`},ife=br({__name:`ApiRoutes`,props:{routes:{},filePath:{type:Function},methodClass:{type:Function}},emits:[`tryRoute`,`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(`ALL`),o=M(null),s=V(()=>{let e=new Set(n.routes.map(e=>e.method));return[`ALL`,...Array.from(e).sort()]}),c=V(()=>{let e=[...n.routes];if(a.value!==`ALL`&&(e=e.filter(e=>e.method===a.value)),i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e}),l=V(()=>o.value?`Are you sure you want to delete "${o.value.method} ${o.value.path}"? A backup will be created (.bak file).`:``);function u(e){o.value=e}function d(){o.value&&=(r(`delete`,o.value),null)}return(t,n)=>(I(),L(`div`,Hde,[R(`div`,Ude,[R(`div`,Wde,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search routes...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`div`,Gde,[(I(!0),L(ha,null,Yr(s.value,e=>(I(),L(`button`,{key:e,class:A([`filter-chip`,a.value===e?`filter-chip-active`:`filter-chip-idle`]),onClick:t=>a.value=e},j(e),11,Kde))),128))]),R(`span`,qde,j(c.value.length)+` routes `,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New API route (A)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,Jde,[c.value.length>0?(I(),L(`div`,Yde,[(I(!0),L(ha,null,Yr(c.value,(t,n)=>(I(),L(`div`,{key:n,class:`group flex items-center gap-2.5 px-3 py-2 bg-background border border-base rounded-lg text-xs hover:bg-active transition-colors`},[R(`span`,{class:A([`min-w-[46px] px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider text-center font-mono flex-shrink-0`,e.methodClass(t.method)])},j(t.method),3),R(`span`,{class:`font-mono text-foreground flex-1 text-xs truncate`,title:t.path},j(t.path),9,Xde),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit route`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,Zde),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary rounded transition-all cursor-pointer flex-shrink-0`,title:`Try in Playground`,onClick:e=>r(`tryRoute`,t)},[z(P(K),{icon:`lucide:play`,size:12})],8,Qde),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete route`,onClick:ws(e=>u(t),[`stop`])},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,$de),t.filePath?(I(),L(`span`,{key:0,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,efe)):B(``,!0)]))),128))])):(I(),L(`div`,tfe,[z(P(K),{icon:`lucide:route`,size:32,class:`text-muted-foreground/40 mb-3`}),R(`div`,nfe,j(i.value?`No routes match your search`:`No API routes`),1),R(`div`,rfe,j(i.value?`Try different keywords`:`API routes will appear here as you add endpoints`),1)]))]),z(v6,{open:!!o.value,title:`Delete API Route`,message:l.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:d,onCancel:n[2]||=e=>o.value=null},null,8,[`open`,`message`])]))}}),afe={class:`flex flex-col h-full`},ofe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center justify-between gap-2 flex-shrink-0`},sfe={class:`flex-1 overflow-y-auto p-3.5`},cfe={class:`grid grid-cols-3 gap-2 mb-4`},lfe={class:`flex items-center gap-1.5 mb-1`},ufe={class:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`},dfe=[`title`],ffe={key:0,class:`bg-background border border-base rounded-lg overflow-hidden`},pfe={class:`divide-y divide-#8882`},mfe={class:`text-xs font-mono text-primary font-medium min-w-24`},hfe=[`title`],gfe={key:1,class:`mt-3 bg-background border border-base rounded-lg overflow-hidden`},_fe={class:`p-3 flex flex-wrap gap-1.5`},vfe=br({__name:`Config`,props:{config:{},info:{},fmtUptime:{type:Function},fmtTime:{type:Function},fmtVal:{type:Function},uptime:{}},emits:[`edit`],setup(e,{emit:t}){let n=e,r=t,i=V(()=>Object.entries(n.config)),a=V(()=>[{label:`Version`,value:n.info.version,icon:`lucide:tag`,color:`text-primary`},{label:`Uptime`,value:n.fmtUptime(n.uptime),icon:`lucide:clock`,color:`text-success`},{label:`Started`,value:n.fmtTime(n.info.startTime),icon:`lucide:play`,color:`text-info`},{label:`Preset`,value:n.info.presets.join(`, `)||`standard`,icon:`lucide:package`,color:`text-warning`},{label:`Pages`,value:String(n.info.pages),icon:`lucide:file-text`,color:`text-info`},{label:`API Routes`,value:String(n.info.apiRoutes),icon:`lucide:send`,color:`text-success`},{label:`Middleware`,value:String(n.info.middleware),icon:`lucide:layers`,color:`text-warning`},{label:`Layouts`,value:String(n.info.layouts),icon:`lucide:layout`,color:`text-purple-400`},{label:`Cron Jobs`,value:String(n.info.crons),icon:`lucide:clock-4`,color:`text-accent`}]);return(t,n)=>(I(),L(`div`,afe,[R(`div`,ofe,[n[2]||=R(`span`,{class:`text-xs font-semibold text-foreground`},`Configuration`,-1),R(`button`,{class:`flex items-center gap-1 px-2 py-1 text-2xs font-medium text-muted-foreground hover:text-primary hover:bg-primary/10 rounded-md transition-colors cursor-pointer`,title:`Edit Config File`,onClick:n[0]||=e=>r(`edit`)},[z(P(K),{icon:`lucide:pencil`,size:12}),n[1]||=Na(` Edit Config File `,-1)])]),R(`div`,sfe,[R(`div`,cfe,[(I(!0),L(ha,null,Yr(a.value,e=>(I(),L(`div`,{key:e.label,class:`bg-background border border-base rounded-lg p-2.5`},[R(`div`,lfe,[z(P(K),{icon:e.icon,size:12,class:A(e.color)},null,8,[`icon`,`class`]),R(`span`,ufe,j(e.label),1)]),R(`div`,{class:`text-xs font-semibold text-foreground font-mono truncate`,title:e.value},j(e.value),9,dfe)]))),128))]),i.value.length>0?(I(),L(`div`,ffe,[n[3]||=R(`div`,{class:`px-3 py-2 border-b border-base bg-secondary`},[R(`span`,{class:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`},`Resolved Config`)],-1),R(`div`,pfe,[(I(!0),L(ha,null,Yr(i.value,([t,n])=>(I(),L(`div`,{key:t,class:`flex items-center px-3 py-2 gap-2 hover:bg-active transition-colors`},[R(`span`,mfe,j(t),1),R(`span`,{class:`text-xs font-mono text-foreground truncate`,title:e.fmtVal(n)},j(e.fmtVal(n)),9,hfe)]))),128))])])):B(``,!0),e.info.presets&&e.info.presets.length>0?(I(),L(`div`,gfe,[n[4]||=R(`div`,{class:`px-3 py-2 border-b border-base bg-secondary`},[R(`span`,{class:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`},`Active Presets`)],-1),R(`div`,_fe,[(I(!0),L(ha,null,Yr(e.info.presets,e=>(I(),L(`span`,{key:e,class:`inline-flex items-center gap-1 px-2 py-0.5 bg-primary/10 text-primary text-[10px] font-semibold rounded-md`},[z(P(K),{icon:`lucide:package`,size:10}),Na(` `+j(e),1)]))),128))])])):B(``,!0)])]))}}),yfe={class:`flex flex-col h-full`},bfe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},xfe={class:`relative flex-1 max-w-xs`},Sfe={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},Cfe={class:`flex-1 overflow-y-auto p-3.5`},wfe={key:0,class:`flex flex-col gap-1`},Tfe={class:`flex flex-col min-w-0 flex-1`},Efe={class:`font-mono text-sm font-medium text-foreground`},Dfe={class:`font-mono text-2xs text-accent/80`},Ofe=[`onClick`],kfe=[`onClick`],Afe=[`title`],jfe={key:1,class:`empty-state`},Mfe=br({__name:`Crons`,props:{crons:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(null),o=V(()=>{let e=[...n.crons];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.schedule?.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e}),s=V(()=>a.value?`Are you sure you want to delete cron job "${a.value.name}"? A backup will be created.`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}return(t,n)=>(I(),L(`div`,yfe,[R(`div`,bfe,[R(`div`,xfe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search cron jobs...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`span`,Sfe,j(o.value.length)+` jobs`,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New cron job (C)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,Cfe,[o.value.length>0?(I(),L(`div`,wfe,[(I(!0),L(ha,null,Yr(o.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:clock`,size:14,class:`text-accent flex-shrink-0`}),R(`div`,Tfe,[R(`span`,Efe,j(t.name),1),R(`span`,Dfe,j(t.schedule),1)]),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit cron job`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,Ofe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete cron job`,onClick:e=>c(t)},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,kfe),t.filePath?(I(),L(`span`,{key:0,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,Afe)):B(``,!0)]))),128))])):(I(),L(`div`,jfe,[z(P(K),{icon:`lucide:clock`,size:32,class:`text-muted-foreground/40 mb-3`}),n[4]||=R(`div`,{class:`empty-title`},`No cron jobs`,-1),n[5]||=R(`div`,{class:`empty-desc`},`Define scheduled tasks with defineScheduled()`,-1)]))]),z(v6,{open:!!a.value,title:`Delete Cron Job`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),Nfe={class:`w-full h-full relative bg-background`},Pfe={key:0,class:`w-full h-full relative`},Ffe={key:0,class:`absolute inset-0 flex flex-col items-center justify-center gap-3 text-muted-foreground text-xs`},Ife=[`src`],Lfe={key:1,class:`absolute inset-0 flex flex-col items-center justify-center gap-3 text-muted-foreground px-10 py-10 text-center bg-background`},Rfe={key:1,class:`flex flex-col items-center justify-center h-full text-muted-foreground gap-3 px-10 py-10 text-center`},zfe=br({__name:`DrizzleStudio`,props:{studioUrl:{},available:{type:Boolean}},setup(e){let t=e,n=M(!1),r=M(!1),i=t.studioUrl||`http://127.0.0.1:4983`;function a(){n.value=!0,r.value=!1}function o(){r.value=!0}function s(){window.open(i,`_blank`,`noopener,noreferrer`)}function c(){window.open(`https://local.drizzle.studio`,`_blank`,`noopener,noreferrer`)}return(t,l)=>(I(),L(`div`,Nfe,[e.available===!1?(I(),L(`div`,Rfe,[z(P(K),{icon:`lucide:database`,size:40,class:`text-muted-foreground/50`}),l[6]||=R(`div`,{class:`text-[15px] font-semibold text-foreground`},`Database Not Configured`,-1),l[7]||=R(`div`,{class:`text-xs leading-relaxed max-w-90 op-fade`},[Na(` Drizzle Studio requires a database connection. Configure `),R(`code`,{class:`bg-secondary px-1.5 py-0.5 rounded text-[11px] font-mono text-primary`},`db0`),Na(` or Drizzle ORM to enable. `)],-1)])):(I(),L(`div`,Pfe,[!n.value&&!r.value?(I(),L(`div`,Ffe,[l[0]||=R(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),l[1]||=R(`span`,null,`Connecting to Drizzle Studio...`,-1),l[2]||=R(`p`,{class:`text-[12px] text-muted-foreground/70 m-0`},[Na(` Make sure `),R(`code`,{class:`bg-secondary px-1 py-0.5 rounded font-mono text-primary text-[11px]`},`drizzle-kit studio`),Na(` is running on port 4983 `)],-1),R(`button`,{class:`btn-action-sm mt-2`,onClick:c},`Open local.drizzle.studio →`)])):B(``,!0),Fn(R(`iframe`,{src:P(i),class:`w-full h-full border-none bg-white`,title:`Drizzle Studio`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups allow-modals`,onLoad:a,onError:o},null,40,Ife),[[zo,n.value]]),r.value||!e.available?(I(),L(`div`,Lfe,[z(P(K),{icon:`lucide:database`,size:40,class:`text-muted-foreground/50`}),l[3]||=R(`div`,{class:`text-[15px] font-semibold text-foreground`},`Drizzle Studio Not Connected`,-1),l[4]||=R(`div`,{class:`text-xs leading-relaxed max-w-90 op-fade`},` Drizzle Studio needs to be started separately. Run the command below and refresh: `,-1),l[5]||=R(`pre`,{class:`bg-secondary border border-base px-4 py-2.5 rounded-md font-mono text-xs text-foreground my-1`},`npx drizzle-kit studio`,-1),R(`button`,{class:`mt-2 px-4.5 py-2 bg-primary border-none rounded-md text-primary-foreground text-sm font-medium cursor-pointer transition-all hover:bg-primary/90`,onClick:s},` Open in Browser (`+j(P(i))+`) → `,1)])):B(``,!0)]))]))}}),Bfe={class:`flex flex-col h-full`},Vfe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},Hfe={class:`relative flex-1 max-w-xs`},Ufe={class:`flex gap-1`},Wfe={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},Gfe={class:`flex-1 overflow-hidden p-3.5`},Kfe={key:0,class:`h-full`},qfe={key:1,class:`h-full overflow-y-auto`},Jfe={key:0,class:`section-card`},Yfe={class:`section-header`},Xfe={class:`section-body`},Zfe={class:`info-key font-mono text-2xs flex items-center gap-1.5`},Qfe=[`title`],$fe=[`onClick`],epe=[`onClick`],tpe={key:1,class:`empty-state`},npe={class:`empty-title`},rpe={class:`empty-desc`},ipe=br({__name:`EnvVars`,props:{env:{},onAdd:{type:Function},onEdit:{type:Function},onDelete:{type:Function}},setup(e){let t=e,n=M(``),r=M(`list`),i=V(()=>{let e=Object.entries(t.env);if(n.value){let t=n.value.toLowerCase();e=e.filter(([e,n])=>e.toLowerCase().includes(t)||String(n).toLowerCase().includes(t))}return e.sort(([e],[t])=>e.localeCompare(t))}),a=V(()=>JSON.stringify(t.env,null,2));function o(e){let t=e.toUpperCase();return[`KEY`,`SECRET`,`TOKEN`,`PASSWORD`,`AUTH`,`CREDENTIAL`].some(e=>t.includes(e))}return(e,s)=>(I(),L(`div`,Bfe,[R(`div`,Vfe,[R(`div`,Hfe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":s[0]||=e=>n.value=e,type:`text`,placeholder:`Search env vars...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,n.value]])]),R(`div`,Ufe,[R(`button`,{class:A([`filter-chip`,r.value===`list`?`filter-chip-active`:`filter-chip-idle`]),onClick:s[1]||=e=>r.value=`list`},` List `,2),R(`button`,{class:A([`filter-chip`,r.value===`json`?`filter-chip-active`:`filter-chip-idle`]),onClick:s[2]||=e=>r.value=`json`},` JSON `,2)]),R(`button`,{class:`flex items-center gap-1 px-2 py-1 bg-primary text-primary-foreground rounded-md text-2xs font-medium hover:bg-primary/90 transition-colors cursor-pointer flex-shrink-0`,title:`Add env var`,onClick:s[3]||=(...e)=>t.onAdd&&t.onAdd(...e)},[z(P(K),{icon:`lucide:plus`,size:12}),s[4]||=Na(` Add `,-1)]),R(`span`,Wfe,j(i.value.length)+` vars`,1)]),R(`div`,Gfe,[r.value===`json`?(I(),L(`div`,Kfe,[z(S4,{"model-value":a.value,language:`json`,readonly:``,label:`Environment Variables`,height:`100%`},null,8,[`model-value`])])):(I(),L(`div`,qfe,[i.value.length>0?(I(),L(`div`,Jfe,[R(`div`,Yfe,[z(P(K),{icon:`lucide:shield`,size:13,class:`text-warning`}),s[5]||=R(`span`,{class:`section-title`},`Environment Variables`,-1)]),R(`div`,Xfe,[(I(!0),L(ha,null,Yr(i.value,([e,n])=>(I(),L(`div`,{key:e,class:`info-row group`},[R(`span`,Zfe,[o(e)?(I(),Ta(P(K),{key:0,icon:`lucide:eye-off`,size:11,class:`text-destructive`})):B(``,!0),Na(` `+j(e),1)]),R(`span`,{class:`info-val truncate max-w-[200px]`,title:String(n)},j(String(n)),9,Qfe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-5 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit env var`,onClick:ws(r=>t.onEdit(e,String(n)),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:11})],8,$fe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-5 flex items-center justify-center text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete env var`,onClick:ws(n=>t.onDelete(e),[`stop`])},[z(P(K),{icon:`lucide:trash-2`,size:11})],8,epe)]))),128))])])):(I(),L(`div`,tpe,[z(P(K),{icon:`lucide:terminal`,size:32,class:`text-muted-foreground/40 mb-3`}),R(`div`,npe,j(n.value?`No env vars match your search`:`No environment variables`),1),R(`div`,rpe,j(n.value?`Try different keywords`:`Define env vars in your .env file`),1)]))]))])]))}}),ape={class:`flex flex-col h-full`},ope={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},spe={class:`relative flex-1 max-w-xs`},cpe={class:`text-[10px] text-muted-foreground ml-auto op-fade`},lpe={class:`flex-1 overflow-y-auto p-3.5`},upe={key:0,class:`flex flex-col gap-1`},dpe={class:`flex flex-col flex-1 min-w-0`},fpe={class:`text-xs font-medium text-foreground truncate`},ppe=[`title`],mpe={key:0,class:`text-[10px] px-1.5 py-0.5 bg-purple-500/12 text-purple-400 rounded-md font-semibold`},hpe=[`onClick`],gpe=[`onClick`],_pe=[`title`],vpe={key:1,class:`empty-state`},ype=br({__name:`Layouts`,props:{layouts:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(null),o=V(()=>{let e=[...n.layouts];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t))}return e.sort((e,t)=>e.isDefault===t.isDefault?e.name.localeCompare(t.name):e.isDefault?-1:1)}),s=V(()=>a.value?`Are you sure you want to delete layout "${a.value.name}"? A backup will be created.`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}return(t,n)=>(I(),L(`div`,ape,[R(`div`,ope,[R(`div`,spe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search layouts...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`span`,cpe,j(e.layouts.length)+` layouts`,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New layout (L)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,lpe,[o.value.length>0?(I(),L(`div`,upe,[(I(!0),L(ha,null,Yr(o.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:layout`,size:14,class:`text-purple-400 flex-shrink-0`}),R(`div`,dpe,[R(`span`,fpe,j(t.name),1),R(`span`,{class:`text-[10px] text-muted-foreground font-mono truncate`,title:t.path},j(t.path),9,ppe)]),t.isDefault?(I(),L(`span`,mpe,` DEFAULT `)):B(``,!0),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit layout`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,hpe),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete layout`,onClick:e=>c(t)},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,gpe),t.filePath?(I(),L(`span`,{key:1,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,_pe)):B(``,!0)]))),128))])):(I(),L(`div`,vpe,[z(P(K),{icon:`lucide:layout`,size:32,class:`text-muted-foreground/40 mb-3`}),n[4]||=R(`div`,{class:`empty-title`},`No layouts found`,-1),n[5]||=R(`div`,{class:`empty-desc`},`Add layout files to the layouts/ directory`,-1)]))]),z(v6,{open:!!a.value,title:`Delete Layout`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),bpe={class:`flex flex-col h-full`},xpe={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},Spe={class:`relative flex-1 max-w-xs`},Cpe={class:`flex gap-1`},wpe={class:`flex-1 overflow-y-auto p-3.5`},Tpe={key:0,class:`flex flex-col gap-1`},Epe=[`title`],Dpe={key:0,class:`text-[10px] px-1.5 py-0.5 bg-warning/12 text-warning rounded-md font-semibold`},Ope=[`onClick`],kpe=[`onClick`],Ape=[`title`],jpe={key:1,class:`empty-state`},Mpe=br({__name:`Middlewares`,props:{middlewares:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(`ALL`),o=M(null),s=V(()=>{let e=[...n.middlewares];if(a.value===`GLOBAL`?e=e.filter(e=>e.global):a.value===`ROUTE`&&(e=e.filter(e=>!e.global)),i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e.sort((e,t)=>e.global===t.global?e.path.localeCompare(t.path):e.global?-1:1)}),c=V(()=>n.middlewares.filter(e=>e.global).length),l=V(()=>n.middlewares.filter(e=>!e.global).length),u=V(()=>o.value?`Are you sure you want to delete middleware "${o.value.path}"? A backup will be created.`:``);function d(e){o.value=e}function f(){o.value&&=(r(`delete`,o.value),null)}return(t,n)=>(I(),L(`div`,bpe,[R(`div`,xpe,[R(`div`,Spe,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search middlewares...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`div`,Cpe,[R(`button`,{class:A([`filter-chip`,a.value===`ALL`?`filter-chip-active`:`filter-chip-idle`]),onClick:n[1]||=e=>a.value=`ALL`},` All (`+j(e.middlewares.length)+`) `,3),R(`button`,{class:A([`filter-chip`,a.value===`GLOBAL`?`bg-warning/15 text-warning op100!`:`filter-chip-idle`]),onClick:n[2]||=e=>a.value=`GLOBAL`},` Global (`+j(c.value)+`) `,3),R(`button`,{class:A([`filter-chip`,a.value===`ROUTE`?`bg-info/15 text-info op100!`:`filter-chip-idle`]),onClick:n[3]||=e=>a.value=`ROUTE`},` Route (`+j(l.value)+`) `,3)]),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0 ml-auto`,title:`New middleware (M)`,onClick:n[4]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[6]||=Na(` New `,-1)])]),R(`div`,wpe,[s.value.length>0?(I(),L(`div`,Tpe,[(I(!0),L(ha,null,Yr(s.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:layers`,size:14,class:`text-warning flex-shrink-0`}),R(`span`,{class:`font-mono text-foreground flex-1 text-xs truncate`,title:t.path},j(t.path),9,Epe),t.global?(I(),L(`span`,Dpe,` GLOBAL `)):B(``,!0),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit middleware`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,Ope),R(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete middleware`,onClick:e=>d(t)},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,kpe),t.filePath?(I(),L(`span`,{key:1,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,Ape)):B(``,!0)]))),128))])):(I(),L(`div`,jpe,[z(P(K),{icon:`lucide:layers`,size:32,class:`text-muted-foreground/40 mb-3`}),n[7]||=R(`div`,{class:`empty-title`},`No middlewares found`,-1),n[8]||=R(`div`,{class:`empty-desc`},`Add middleware files to intercept requests`,-1)]))]),z(v6,{open:!!o.value,title:`Delete Middleware`,message:u.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:f,onCancel:n[5]||=e=>o.value=null},null,8,[`open`,`message`])]))}}),Npe={class:`p-3.5`},Ppe={class:`grid grid-cols-4 gap-2 mb-3`},Fpe={class:`text-lg font-semibold text-foreground leading-tight`},Ipe={class:`text-[11px] text-muted-foreground`},Lpe={class:`grid grid-cols-2 gap-2.5 mb-2.5`},Rpe={class:`section-card`},zpe={class:`section-header`},Bpe={class:`section-body`},Vpe={class:`info-row`},Hpe={class:`info-val`},Upe={class:`info-row`},Wpe={class:`info-val`},Gpe={class:`info-row`},Kpe={class:`info-val`},qpe={class:`section-card`},Jpe={class:`section-header`},Ype={class:`section-body`},Xpe={key:0,class:`px-3.5 py-2.5 flex flex-wrap gap-1.5`},Zpe={key:1,class:`empty-state py-6`},Qpe={key:0,class:`section-card`},$pe={class:`section-header`},eme={class:`section-body`},tme={class:`info-key font-mono text-2xs`},nme={class:`info-val`},rme=br({__name:`Overview`,props:{info:{},uptime:{},fmtUptime:{type:Function},fmtTime:{type:Function},fmtVal:{type:Function}},setup(e){let t=e,n=V(()=>t.info?[{val:t.info.pages||0,label:`Pages`,icon:`lucide:file-text`,color:`primary`},{val:t.info.apiRoutes||0,label:`API Routes`,icon:`lucide:send`,color:`info`},{val:t.info.middleware||0,label:`Middleware`,icon:`lucide:layers`,color:`warning`},{val:t.info.crons||0,label:`Cron Jobs`,icon:`lucide:clock`,color:`accent`}]:[]),r={primary:`bg-primary/10 text-primary`,success:`bg-success/12 text-success`,warning:`bg-warning/12 text-warning`,info:`bg-info/12 text-info`,accent:`bg-accent/10 text-accent`,destructive:`bg-destructive/12 text-destructive`},i=[`primary`,`success`,`info`,`warning`,`accent`];return(t,a)=>(I(),L(`div`,Npe,[R(`div`,Ppe,[(I(!0),L(ha,null,Yr(n.value,(e,t)=>(I(),L(`div`,{key:t,class:`flex items-center gap-2.5 px-3 py-2.5 bg-background border border-base rounded-lg`},[R(`div`,{class:A([`size-9 rounded-lg flex items-center justify-center flex-shrink-0`,[r[e.color]]])},[z(P(K),{icon:e.icon,size:18},null,8,[`icon`])],2),R(`div`,null,[R(`div`,Fpe,j(e.val),1),R(`div`,Ipe,j(e.label),1)])]))),128))]),R(`div`,Lpe,[R(`div`,Rpe,[R(`div`,zpe,[z(P(K),{icon:`lucide:activity`,size:13,class:`text-primary`}),a[0]||=R(`span`,{class:`section-title`},`Server Status`,-1)]),R(`div`,Bpe,[a[4]||=R(`div`,{class:`info-row`},[R(`span`,{class:`info-key`},`Status`),R(`span`,{class:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold bg-success/12 text-success`},[R(`span`,{class:`size-1.5 rounded-full bg-success animate-pulse`}),Na(` Running `)])],-1),R(`div`,Vpe,[a[1]||=R(`span`,{class:`info-key`},`Uptime`,-1),R(`span`,Hpe,j(e.fmtUptime(e.uptime)),1)]),R(`div`,Upe,[a[2]||=R(`span`,{class:`info-key`},`Version`,-1),R(`span`,Wpe,`v`+j(e.info.version),1)]),R(`div`,Gpe,[a[3]||=R(`span`,{class:`info-key`},`Start Time`,-1),R(`span`,Kpe,j(e.fmtTime(e.info.startTime)),1)])])]),R(`div`,qpe,[R(`div`,Jpe,[z(P(K),{icon:`lucide:cpu`,size:13,class:`text-info`}),a[5]||=R(`span`,{class:`section-title`},`Presets`,-1)]),R(`div`,Ype,[e.info.presets&&e.info.presets.length>0?(I(),L(`div`,Xpe,[(I(!0),L(ha,null,Yr(e.info.presets,(e,t)=>(I(),L(`span`,{key:e,class:A([`inline-flex items-center px-2.5 py-1 rounded-md text-2xs font-medium`,[r[i[t%i.length]]]])},j(e),3))),128))])):(I(),L(`div`,Zpe,[...a[6]||=[R(`span`,{class:`text-xs text-muted-foreground`},`No presets loaded`,-1)]]))])])]),e.info.config&&Object.keys(e.info.config).length>0?(I(),L(`div`,Qpe,[R(`div`,$pe,[z(P(K),{icon:`lucide:settings`,size:13,class:`text-warning`}),a[7]||=R(`span`,{class:`section-title`},`Configuration`,-1)]),R(`div`,eme,[(I(!0),L(ha,null,Yr(e.info.config,(t,n)=>(I(),L(`div`,{key:String(n),class:`info-row`},[R(`span`,tme,j(n),1),R(`span`,nme,j(e.fmtVal(t)),1)]))),128))])])):B(``,!0)]))}}),ime={class:`flex flex-col h-full`},ame={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 shrink-0`},ome={class:`relative flex-1 max-w-xs`},sme={class:`text-2xs text-muted-foreground ml-auto shrink-0 op-fade`},cme={class:`flex-1 overflow-y-auto p-3.5`},lme={key:0,class:`flex flex-col gap-1`},ume={class:`flex flex-col min-w-0 flex-1`},dme=[`title`],fme={key:0,class:`text-2xs text-muted-foreground flex items-center gap-1 mt-0.5`},pme=[`title`],mme=[`onClick`],hme=[`onClick`],gme=[`onClick`],_me=[`onClick`],vme={key:1,class:`empty-state`},yme={class:`empty-title`},bme={class:`empty-desc`},xme=br({__name:`Pages`,props:{pages:{},filePath:{type:Function}},emits:[`delete`,`edit`,`editMeta`,`create`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(null),o=V(()=>{let e=[...n.pages];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t)||e.name&&e.name.toLowerCase().includes(t))}return e.sort((e,t)=>e.path.localeCompare(t.path))}),s=V(()=>a.value?`Are you sure you want to delete "${a.value.path}"? A backup will be created (.bak file).`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}function u(e){let t=`${window.location.origin}${e}`;window.open(t,`_blank`)}return(t,n)=>(I(),L(`div`,ime,[R(`div`,ame,[R(`div`,ome,[z(P(K),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),Fn(R(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search pages...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[vs,i.value]])]),R(`span`,sme,j(o.value.length)+` pages`,1),R(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer shrink-0`,title:`New page (P)`,onClick:n[1]||=e=>r(`create`)},[z(P(K),{icon:`lucide:plus`,size:13}),n[3]||=Na(` New `,-1)])]),R(`div`,cme,[o.value.length>0?(I(),L(`div`,lme,[(I(!0),L(ha,null,Yr(o.value,(t,n)=>(I(),L(`div`,{key:n,class:`list-item group`},[z(P(K),{icon:`lucide:file-text`,size:14,class:`text-primary shrink-0`}),R(`div`,ume,[R(`span`,{class:`font-mono text-primary text-xs`,title:t.path},j(t.path),9,dme),t.layout?(I(),L(`span`,fme,[z(P(K),{icon:`lucide:layout`,size:11}),Na(` `+j(t.layout),1)])):B(``,!0)]),t.filePath?(I(),L(`span`,{key:0,class:`file-name`,title:t.filePath},j(e.filePath(t.filePath)),9,pme)):B(``,!0),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Open route in browser`,onClick:ws(e=>u(t.path),[`stop`])},[z(P(K),{icon:`lucide:external-link`,size:12})],8,mme),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Edit page properties (definePage)`,onClick:ws(e=>r(`editMeta`,t),[`stop`])},[z(P(K),{icon:`lucide:sliders-horizontal`,size:12})],8,hme),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Edit page source`,onClick:ws(e=>r(`edit`,t),[`stop`])},[z(P(K),{icon:`lucide:pencil`,size:12})],8,gme),R(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer shrink-0 ml-1`,title:`Delete page`,onClick:ws(e=>c(t),[`stop`])},[z(P(K),{icon:`lucide:trash-2`,size:12})],8,_me)]))),128))])):(I(),L(`div`,vme,[z(P(K),{icon:`lucide:file-text`,size:32,class:`text-muted-foreground/40 mb-3`}),R(`div`,yme,j(i.value?`No pages match your search`:`No pages found`),1),R(`div`,bme,j(i.value?`Try different keywords`:`Add .vue files in your pages directory`),1)]))]),z(v6,{open:!!a.value,title:`Delete Page`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),Sme=2,Cme=1,wme=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(Sme,Math.floor(u/e.css.cell.width)),rows:Math.max(Cme,Math.floor(l/e.css.cell.height))}}},y6=Object.defineProperty,Tme=Object.getOwnPropertyDescriptor,Eme=(e,t)=>{for(var n in t)y6(e,n,{get:t[n],enumerable:!0})},b6=(e,t,n,r)=>{for(var i=r>1?void 0:r?Tme(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&y6(t,n,i),i},Z=(e,t)=>(n,r)=>t(n,r,e),x6=`Terminal input`,S6={get:()=>x6,set:e=>x6=e},C6=`Too much output to announce, navigate to rows manually to read`,w6={get:()=>C6,set:e=>C6=e};function Dme(e){return e.replace(/\r?\n/g,`\r`)}function Ome(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function kme(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function Ame(e,t,n,r){e.stopPropagation(),e.clipboardData&&T6(e.clipboardData.getData(`text/plain`),t,n,r)}function T6(e,t,n,r){e=Dme(e),e=Ome(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function E6(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function D6(e,t,n,r,i){E6(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function O6(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function k6(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var jme=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Mme=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},A6=``,j6=` `,M6=class e{constructor(){this.fg=0,this.bg=0,this.extended=new N6}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},N6=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},P6=class e extends M6{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new N6,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?O6(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},F6=`di$target`,I6=`di$dependencies`,L6=new Map;function Nme(e){return e[I6]||[]}function R6(e){if(L6.has(e))return L6.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Pme(t,e,r)};return t._id=e,L6.set(e,t),t}function Pme(e,t,n){t[F6]===t?t[I6].push({id:e,index:n}):(t[I6]=[{id:e,index:n}],t[F6]=t)}var z6=R6(`BufferService`),B6=R6(`CoreMouseService`),V6=R6(`CoreService`),Fme=R6(`CharsetService`),H6=R6(`InstantiationService`),U6=R6(`LogService`),W6=R6(`OptionsService`),G6=R6(`OscLinkService`),Ime=R6(`UnicodeService`),K6=R6(`DecorationService`),q6=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new P6,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Lme(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};q6=b6([Z(0,z6),Z(1,W6),Z(2,G6)],q6);function Lme(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
440
440
|
|
|
441
441
|
WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var J6=R6(`CharSizeService`),Y6=R6(`CoreBrowserService`),X6=R6(`MouseService`),Z6=R6(`RenderService`),Rme=R6(`SelectionService`),Q6=R6(`CharacterJoinerService`),$6=R6(`ThemeService`),e8=R6(`LinkProviderService`),zme=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?r8.isErrorNoTelemetry(e)?new r8(e.message+`
|
|
442
442
|
|
package/dist/client/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" href="https://r2.soybeanjs.tech/soybeanjs/logo-ubean.svg?v=202608192144" type="image/svg+xml" />
|
|
7
7
|
<title>Ubean DevTools</title>
|
|
8
|
-
<script type="module" crossorigin src="/_devtools/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/_devtools/assets/index-Dc0VSCJd.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/_devtools/assets/index-CDhg1wN2.css">
|
|
10
10
|
</head>
|
|
11
11
|
|
package/dist/index.js
CHANGED
|
@@ -1322,7 +1322,7 @@ function createDefineWrapperWithContext() {
|
|
|
1322
1322
|
};
|
|
1323
1323
|
}
|
|
1324
1324
|
//#endregion
|
|
1325
|
-
//#region ../../node_modules/.pnpm/@vitejs+devtools-kit@0.6.3_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_@
|
|
1325
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools-kit@0.6.3_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_@vitej_ce681b19cad3979f47dad5d5ceae04cc/node_modules/@vitejs/devtools-kit/dist/index.js
|
|
1326
1326
|
const defineRpcFunction = createDefineWrapperWithContext();
|
|
1327
1327
|
//#endregion
|
|
1328
1328
|
//#region src/node/rpc/ai.ts
|