@oro.ad/nuxt-claude-devtools 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{COus5Ssl.js → 0BAoaFXM.js} +1 -1
- package/dist/client/_nuxt/{B_BoWmnX.js → 88aFj9mk.js} +1 -1
- package/dist/client/_nuxt/{DolUcBed.js → B5vRr8Ti.js} +1 -1
- package/dist/client/_nuxt/{CDQtmRaX.js → BI4BFakr.js} +1 -1
- package/dist/client/_nuxt/{CPA0s6N9.js → BJuQJ8yP.js} +1 -1
- package/dist/client/_nuxt/{BB1-kxmm.js → BMxGt8ZG.js} +1 -1
- package/dist/client/_nuxt/{TQi6eIO6.js → Baq9Hzkz.js} +1 -1
- package/dist/client/_nuxt/{DbJLoP3G.js → Bf779K50.js} +1 -1
- package/dist/client/_nuxt/BmF8r-gh.js +1 -0
- package/dist/client/_nuxt/BryQ1L4F.js +1 -0
- package/dist/client/_nuxt/{V4UvAcd3.js → BsG0VKct.js} +1 -1
- package/dist/client/_nuxt/Bt-DdLhQ.js +12 -0
- package/dist/client/_nuxt/{CHeJJZL9.js → C6Xm_PzB.js} +1 -1
- package/dist/client/_nuxt/{DC_XB519.js → C8AkZ-W3.js} +1 -1
- package/dist/client/_nuxt/{BSVkH7b6.js → CEM1iRz_.js} +1 -1
- package/dist/client/_nuxt/{BcZxFXBD.js → CETmet01.js} +1 -1
- package/dist/client/_nuxt/CG1tBJBN.js +1 -0
- package/dist/client/_nuxt/{D2l4TRxW.js → CXOn8Upj.js} +1 -1
- package/dist/client/_nuxt/CYomf6PL.js +1 -0
- package/dist/client/_nuxt/{DEys9N1G.js → CrhTgxiU.js} +1 -1
- package/dist/client/_nuxt/{BYp73eMl.js → CtWfW1XP.js} +1 -1
- package/dist/client/_nuxt/{d8BPa19J.js → CuUOvg0u.js} +1 -1
- package/dist/client/_nuxt/CxYvL5O5.js +1 -0
- package/dist/client/_nuxt/D8DUrd91.js +1 -0
- package/dist/client/_nuxt/{DSt96JPY.js → DFkDlupw.js} +2 -2
- package/dist/client/_nuxt/{B8uzckkK.js → DG-9quB_.js} +1 -1
- package/dist/client/_nuxt/DHlhBFAg.js +1 -0
- package/dist/client/_nuxt/{BnXQTjo-.js → DJw5U4z8.js} +1 -1
- package/dist/client/_nuxt/{M6QPYocW.js → DRReoGGV.js} +1 -1
- package/dist/client/_nuxt/{DGQ4s7ae.js → DSMailoF.js} +1 -1
- package/dist/client/_nuxt/{qbS8UemQ.js → DUPgidXP.js} +1 -1
- package/dist/client/_nuxt/{QumocfwJ.js → D_JyZ6Hh.js} +1 -1
- package/dist/client/_nuxt/{BAb1fJOF.js → Dgm9zqhP.js} +2 -2
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/9c3f4183-f791-4377-86dc-370ce38cc49b.json +1 -0
- package/dist/client/_nuxt/{C--9REmc.js → h1c4XpR7.js} +1 -1
- package/dist/client/_nuxt/kN0L7CSs.js +1 -0
- package/dist/client/_nuxt/{BMZIbUUD.js → n4TwJfzb.js} +1 -1
- package/dist/client/_nuxt/zY60w9UT.js +1 -0
- package/dist/client/agents/index.html +1 -1
- package/dist/client/commands/index.html +1 -1
- package/dist/client/docs/index.html +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/mcp/index.html +1 -1
- package/dist/client/plugins/index.html +1 -1
- package/dist/client/settings/index.html +1 -1
- package/dist/client/skills/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +0 -4
- package/dist/runtime/overlay/components/ChatOverlay.d.vue.ts +0 -1
- package/dist/runtime/overlay/components/ChatOverlay.vue +221 -731
- package/dist/runtime/overlay/components/ChatOverlay.vue.d.ts +0 -1
- package/dist/runtime/overlay/components/MarkdownContent.vue +1 -1
- package/dist/runtime/overlay/components/ToolCallBlock.vue +1 -1
- package/dist/runtime/overlay/components/chat/ChatHeader.d.vue.ts +18 -0
- package/dist/runtime/overlay/components/chat/ChatHeader.vue +82 -0
- package/dist/runtime/overlay/components/chat/ChatHeader.vue.d.ts +18 -0
- package/dist/runtime/overlay/components/chat/ChatInput.d.vue.ts +22 -0
- package/dist/runtime/overlay/components/chat/ChatInput.vue +526 -0
- package/dist/runtime/overlay/components/chat/ChatInput.vue.d.ts +22 -0
- package/dist/runtime/overlay/components/chat/ChatMessages.d.vue.ts +13 -0
- package/dist/runtime/overlay/components/chat/ChatMessages.vue +160 -0
- package/dist/runtime/overlay/components/chat/ChatMessages.vue.d.ts +13 -0
- package/dist/runtime/overlay/components/chat/ClaudeBadge.d.vue.ts +22 -0
- package/dist/runtime/overlay/components/chat/ClaudeBadge.vue +85 -0
- package/dist/runtime/overlay/components/chat/ClaudeBadge.vue.d.ts +22 -0
- package/dist/runtime/overlay/components/chat/HistoryPanel.d.vue.ts +17 -0
- package/dist/runtime/overlay/components/chat/HistoryPanel.vue +65 -0
- package/dist/runtime/overlay/components/chat/HistoryPanel.vue.d.ts +17 -0
- package/dist/runtime/overlay/components/chat/NicknameModal.d.vue.ts +13 -0
- package/dist/runtime/overlay/components/chat/NicknameModal.vue +89 -0
- package/dist/runtime/overlay/components/chat/NicknameModal.vue.d.ts +13 -0
- package/dist/runtime/overlay/components/chat/index.d.ts +6 -0
- package/dist/runtime/overlay/components/chat/index.js +6 -0
- package/dist/runtime/overlay/composables/index.d.ts +3 -0
- package/dist/runtime/overlay/composables/index.js +3 -0
- package/dist/runtime/overlay/composables/useMessageContext.d.ts +25 -0
- package/dist/runtime/overlay/composables/useMessageContext.js +29 -0
- package/dist/runtime/overlay/composables/useMobileSwipe.d.ts +15 -0
- package/dist/runtime/overlay/composables/useMobileSwipe.js +79 -0
- package/dist/runtime/overlay/composables/usePanelInteraction.d.ts +30 -0
- package/dist/runtime/overlay/composables/usePanelInteraction.js +184 -0
- package/dist/runtime/overlay/composables/usePanelPosition.d.ts +69 -0
- package/dist/runtime/overlay/composables/usePanelPosition.js +147 -0
- package/dist/runtime/server/claude-session.d.ts +11 -0
- package/dist/runtime/server/claude-session.js +166 -6
- package/dist/runtime/shared/composables/useClaudeChat.d.ts +7 -3
- package/dist/runtime/shared/composables/useClaudeChat.js +27 -251
- package/dist/runtime/shared/composables/useClaudeChatCore.d.ts +40 -0
- package/dist/runtime/shared/composables/useClaudeChatCore.js +350 -0
- package/dist/runtime/shared/composables/useMessageContext.d.ts +54 -0
- package/dist/runtime/shared/composables/useMessageContext.js +195 -0
- package/dist/runtime/shared/composables/useShare.d.ts +14 -4
- package/dist/runtime/shared/composables/useShare.js +57 -35
- package/dist/runtime/shared/composables/useVoiceInput.js +40 -11
- package/dist/runtime/shared/types.d.ts +36 -0
- package/dist/runtime/types.d.ts +14 -0
- package/package.json +1 -1
- package/dist/client/_nuxt/BSF2Vz9o.js +0 -1
- package/dist/client/_nuxt/BflmC3YB.js +0 -1
- package/dist/client/_nuxt/CRkq21kc.js +0 -1
- package/dist/client/_nuxt/Cgba93Y9.js +0 -1
- package/dist/client/_nuxt/DH8Ugy8E.js +0 -1
- package/dist/client/_nuxt/DeGmaFBY.js +0 -1
- package/dist/client/_nuxt/DgfRwrFR.js +0 -1
- package/dist/client/_nuxt/builds/meta/2be12f06-336a-4fdd-b982-2f6c682c14a6.json +0 -1
- package/dist/client/_nuxt/wDw60tEC.js +0 -10
- package/dist/client/_nuxt/xEjB6ozD.js +0 -1
package/README.md
CHANGED
|
@@ -12,8 +12,9 @@ Nuxt DevTools integration for [Claude Code](https://claude.ai/code) AI assistant
|
|
|
12
12
|
### Core
|
|
13
13
|
- **Chat Interface** — Interactive chat with Claude AI directly in DevTools
|
|
14
14
|
- **Overlay Mode** — Lightweight floating chat panel that works without DevTools (`devtools: false`)
|
|
15
|
-
- **Streaming Responses** — Real-time streaming output from Claude
|
|
15
|
+
- **Streaming Responses** — Real-time streaming output from Claude with stop generation support
|
|
16
16
|
- **Voice Input** — Speech-to-text for hands-free messaging
|
|
17
|
+
- **File Attachments** — Attach images (camera/gallery) and files to messages
|
|
17
18
|
- **Session Management** — Start new conversations or continue previous ones
|
|
18
19
|
- **Chat History** — Browse and restore previous conversations
|
|
19
20
|
|
package/dist/client/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools/_nuxt/entry.BMxUr06A.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools/_nuxt/entry.BMxUr06A.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools/_nuxt/DFkDlupw.js"><script type="module" src="/__claude-devtools/_nuxt/DFkDlupw.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{claudeDevtoolsBc:{tunnel:""}},app:{baseURL:"/__claude-devtools",buildId:"9c3f4183-f791-4377-86dc-370ce38cc49b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770180892944,false]</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools/_nuxt/entry.BMxUr06A.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools/_nuxt/entry.BMxUr06A.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools/_nuxt/DFkDlupw.js"><script type="module" src="/__claude-devtools/_nuxt/DFkDlupw.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{claudeDevtoolsBc:{tunnel:""}},app:{baseURL:"/__claude-devtools",buildId:"9c3f4183-f791-4377-86dc-370ce38cc49b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770180892944,false]</script></body></html>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as de,s as xe,c as be,o as we}from"./
|
|
1
|
+
import{g as de,s as xe,c as be,o as we}from"./DFkDlupw.js";function D(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=D();function se(n){R=n}var _={exec:()=>null};function p(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(x.caret,"$1"),r=r.replace(t,l),s},getRegex:()=>new RegExp(r,e)};return s}var me=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},ye=/^(?:[ \t]*(?:\n|$))+/,$e=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Re=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Se=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,O=/(?:[*+-]|\d{1,9}[.)])/,le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ie=p(le).replace(/bull/g,O).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Te=p(le).replace(/bull/g,O).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),H=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ze=/^[^\n]+/,j=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ae=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",j).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_e=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,O).getRegex(),B="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",N=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pe=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",N).replace("tag",B).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ae=p(H).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),Ie=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ae).getRegex(),G={blockquote:Ie,code:$e,def:Ae,fences:Re,heading:Se,hr:P,html:Pe,lheading:ie,list:_e,newline:ye,paragraph:ae,table:_,text:ze},V=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),Ce={...G,lheading:Te,table:V,paragraph:p(H).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",V).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex()},Le={...G,html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",N).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(H).replace("hr",P).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ie).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Be=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oe=/^( {2,}|\\)\n(?!\s*$)/,Ee=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,E=/[\p{P}\p{S}]/u,X=/[\s\p{P}\p{S}]/u,ce=/[^\s\p{P}\p{S}]/u,qe=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X).getRegex(),he=/(?!~)[\p{P}\p{S}]/u,Ze=/(?!~)[\s\p{P}\p{S}]/u,Me=/(?:[^\s\p{P}\p{S}]|~)/u,Qe=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",me?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,De=p(pe,"u").replace(/punct/g,E).getRegex(),Oe=p(pe,"u").replace(/punct/g,he).getRegex(),ue="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",He=p(ue,"gu").replace(/notPunctSpace/g,ce).replace(/punctSpace/g,X).replace(/punct/g,E).getRegex(),je=p(ue,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,Ze).replace(/punct/g,he).getRegex(),Ne=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ce).replace(/punctSpace/g,X).replace(/punct/g,E).getRegex(),Ge=p(/\\(punct)/,"gu").replace(/punct/g,E).getRegex(),Xe=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Fe=p(N).replace("(?:-->|$)","-->").getRegex(),We=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Fe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),C=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ue=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",C).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ge=p(/^!?\[(label)\]\[(ref)\]/).replace("label",C).replace("ref",j).getRegex(),ke=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",j).getRegex(),Je=p("reflink|nolink(?!\\()","g").replace("reflink",ge).replace("nolink",ke).getRegex(),Y=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,F={_backpedal:_,anyPunctuation:Ge,autolink:Xe,blockSkip:Qe,br:oe,code:Be,del:_,emStrongLDelim:De,emStrongRDelimAst:He,emStrongRDelimUnd:Ne,escape:ve,link:Ue,nolink:ke,punctuation:qe,reflink:ge,reflinkSearch:Je,tag:We,text:Ee,url:_},Ke={...F,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",C).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",C).getRegex()},Z={...F,emStrongRDelimAst:je,emStrongLDelim:Oe,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Y).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Y).getRegex()},Ve={...Z,br:p(oe).replace("{2,}","*").getRegex(),text:p(Z.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},I={normal:G,gfm:Ce,pedantic:Le},T={normal:F,gfm:Z,breaks:Ve,pedantic:Ke},Ye={"&":"&","<":"<",">":">",'"':""","'":"'"},ee=n=>Ye[n];function y(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ee)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ee);return n}function te(n){try{n=encodeURI(n).replace(x.percentDecode,"%")}catch{return null}return n}function re(n,e){let r=n.replace(x.findPipe,(i,l,o)=>{let a=!1,h=l;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),s=r.split(x.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(x.slashPipe,"|");return s}function z(n,e,r){let s=n.length;if(s===0)return"";let t=0;for(;t<s&&n.charAt(s-t-1)===e;)t++;return n.slice(0,s-t)}function et(n,e){if(n.indexOf(e[1])===-1)return-1;let r=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])r++;else if(n[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function ne(n,e,r,s,t){let i=e.href,l=e.title||null,o=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}function tt(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
|
|
3
3
|
`).map(i=>{let l=i.match(r.other.beginningSpace);if(l===null)return i;let[o]=l;return o.length>=t.length?i.slice(t.length):i}).join(`
|
|
4
4
|
`)}var L=class{options;rules;lexer;constructor(n){this.options=n||R}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:z(r,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as y}from"./
|
|
1
|
+
import{_ as y}from"./CXOn8Upj.js";import{_ as w}from"./Bf779K50.js";import{_ as E}from"./B5vRr8Ti.js";import{_ as $}from"./0BAoaFXM.js";import{g as _,c as r,a as i,b as m,l,m as u,w as k,t as a,o as n,d as f}from"./DFkDlupw.js";import{_ as b}from"./D_JyZ6Hh.js";import"./DG-9quB_.js";import"./DRReoGGV.js";import"./C6Xm_PzB.js";import"./h1c4XpR7.js";import"./BI4BFakr.js";import"./CrhTgxiU.js";const V={class:"flex-1 p-4 overflow-auto"},B={class:"flex flex-wrap gap-2 mb-4"},C={class:"text-xs opacity-50 mb-4"},N=_({__name:"SkillView",props:{skill:{},formattedDate:{}},setup(t){return(c,o)=>{const s=E,e=$;return n(),r("div",V,[i("div",B,[t.skill.model?(n(),l(s,{key:0,n:"blue"},{default:k(()=>[f(" Model: "+a(t.skill.model),1)]),_:1})):u("",!0),t.skill.argumentHint?(n(),l(s,{key:1,n:"gray"},{default:k(()=>[f(" Arg: "+a(t.skill.argumentHint),1)]),_:1})):u("",!0)]),i("div",C," Updated: "+a(t.formattedDate),1),m(e,{content:t.skill.content,class:"max-w-none"},null,8,["content"])])}}}),S=Object.assign(N,{__name:"SkillView"}),D={key:0},h={key:1,class:"flex-1 flex items-center justify-center opacity-50"},F={class:"text-center"},J=_({__name:"[name]",props:{skill:{},isEditing:{type:Boolean},editForm:{},formError:{},formatDate:{type:Function}},emits:["startEditing","save","cancel"],setup(t,{emit:c}){const o=c;return(s,e)=>{const g=y,x=w,p=S,v=b;return t.skill?(n(),r("div",D,[m(g,{title:t.skill.name,description:t.skill.description,"is-editing":t.isEditing,readonly:t.skill.source!=="project",source:t.skill.source,icon:"carbon:lightning","icon-color":"text-orange-500","show-icon":"",onEdit:e[0]||(e[0]=d=>o("startEditing")),onSave:e[1]||(e[1]=d=>o("save")),onCancel:e[2]||(e[2]=d=>o("cancel"))},null,8,["title","description","is-editing","readonly","source"]),t.isEditing?(n(),l(x,{key:0,"model-value":t.editForm,mode:"edit",error:t.formError},null,8,["model-value","error"])):(n(),l(p,{key:1,skill:t.skill,"formatted-date":t.formatDate(t.skill.updatedAt)},null,8,["skill","formatted-date"]))])):(n(),r("div",h,[i("div",F,[m(v,{class:"text-4xl mb-2 animate-pulse",icon:"carbon:lightning"}),e[3]||(e[3]=i("p",null,"Loading skill...",-1))])]))}}});export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as n,c as s,o,M as t}from"./
|
|
1
|
+
import{_ as n,c as s,o,M as t}from"./DFkDlupw.js";const _={},c={class:"n-badge"};function a(e,r){return o(),s("span",c,[t(e.$slots,"default")])}const l=Object.assign(n(_,[["render",a]]),{__name:"NBadge"});export{l as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as w}from"./
|
|
1
|
+
import{_ as w}from"./D_JyZ6Hh.js";import{B as T,N as A,r as I,s as q,O as h,E as B,D as M,c as O,o as k,M as C,n as j,l as D,m as F,P as L,a as R,Q as J,I as W}from"./DFkDlupw.js";const _=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const G=e=>typeof e<"u",U=Object.prototype.toString,Q=e=>U.call(e)==="[object Object]",x=()=>{};function N(e){return Array.isArray(e)?e:[e]}function z(e,s,c){return T(e,s,{...c,immediate:!0})}const V=_?window:void 0;function E(e){var s;const c=h(e);return(s=c?.$el)!==null&&s!==void 0?s:c}function P(...e){const s=(o,i,r,a)=>(o.addEventListener(i,r,a),()=>o.removeEventListener(i,r,a)),c=q(()=>{const o=N(h(e[0])).filter(i=>i!=null);return o.every(i=>typeof i!="string")?o:void 0});return z(()=>{var o,i;return[(o=(i=c.value)===null||i===void 0?void 0:i.map(r=>E(r)))!==null&&o!==void 0?o:[V].filter(r=>r!=null),N(h(c.value?e[1]:e[0])),N(B(c.value?e[2]:e[1])),h(c.value?e[3]:e[2])]},([o,i,r,a],v,d)=>{if(!o?.length||!i?.length||!r?.length)return;const y=Q(a)?{...a}:a,$=o.flatMap(f=>i.flatMap(u=>r.map(m=>s(f,u,m,y))));d(()=>{$.forEach(f=>f())})},{flush:"post"})}function ee(e,s,c={}){const{window:o=V,ignore:i=[],capture:r=!0,detectIframe:a=!1,controls:v=!1}=c;if(!o)return v?{stop:x,cancel:x,trigger:x}:x;let d=!0;const y=t=>h(i).some(l=>{if(typeof l=="string")return Array.from(o.document.querySelectorAll(l)).some(n=>n===t.target||t.composedPath().includes(n));{const n=E(l);return n&&(t.target===n||t.composedPath().includes(n))}});function $(t){const l=h(t);return l&&l.$.subTree.shapeFlag===16}function f(t,l){const n=h(t),p=n.$.subTree&&n.$.subTree.children;return p==null||!Array.isArray(p)?!1:p.some(g=>g.el===l.target||l.composedPath().includes(g.el))}const u=t=>{const l=E(e);if(t.target!=null&&!(!(l instanceof Element)&&$(e)&&f(e,t))&&!(!l||l===t.target||t.composedPath().includes(l))){if("detail"in t&&t.detail===0&&(d=!y(t)),!d){d=!0;return}s(t)}};let m=!1;const b=[P(o,"click",t=>{m||(m=!0,setTimeout(()=>{m=!1},0),u(t))},{passive:!0,capture:r}),P(o,"pointerdown",t=>{const l=E(e);d=!y(t)&&!!(l&&!t.composedPath().includes(l))},{passive:!0}),a&&P(o,"blur",t=>{setTimeout(()=>{var l;const n=E(e);((l=o.document.activeElement)===null||l===void 0?void 0:l.tagName)==="IFRAME"&&!n?.contains(o.document.activeElement)&&s(t)},0)},{passive:!0})].filter(Boolean),S=()=>b.forEach(t=>t());return v?{stop:S,cancel:()=>{d=!1},trigger:t=>{d=!0,u(t),d=!1}}:S}function H(e){return JSON.parse(JSON.stringify(e))}function K(e,s,c,o={}){var i,r;const{clone:a=!1,passive:v=!1,eventName:d,deep:y=!1,defaultValue:$,shouldEmit:f}=o,u=A(),m=c||u?.emit||(u==null||(i=u.$emit)===null||i===void 0?void 0:i.bind(u))||(u==null||(r=u.proxy)===null||r===void 0||(r=r.$emit)===null||r===void 0?void 0:r.bind(u?.proxy));let b=d;b=b||`update:${s.toString()}`;const S=n=>a?typeof a=="function"?a(n):H(n):n,t=()=>G(e[s])?S(e[s]):$,l=n=>{f?f(n)&&m(b,n):m(b,n)};if(v){const n=I(t());let p=!1;return T(()=>e[s],g=>{p||(p=!0,n.value=S(g),M(()=>p=!1))}),T(n,g=>{!p&&(g!==e[s]||y)&&l(g)},{deep:y}),n}else return q({get(){return t()},set(n){l(n)}})}const X={class:"n-text-input flex flex items-center border n-border-base rounded n-bg-base py-1 pl-1 pr-2 focus-within:border-context focus-within:n-focus-base"},te={__name:"NTextInput",props:{modelValue:{type:[String,Number],required:!1,default:""},icon:{type:String,required:!1},placeholder:{type:String,required:!1},disabled:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},readonly:{type:Boolean,required:!1},type:{type:String,required:!1,default:"text"}},emits:["keydown","keyup","change"],setup(e,{emit:s}){const i=K(e,"modelValue",s,{passive:!0});return(r,a)=>{const v=w;return k(),O("div",X,[C(r.$slots,"icon",{},()=>[e.icon?(k(),D(v,{key:0,icon:e.icon,class:"ml-0.3em mr-0.1em text-1.1em op50"},null,8,["icon"])):F("",!0)]),j(R("input",J({"onUpdate:modelValue":a[0]||(a[0]=d=>W(i)?i.value=d:null)},r.$props,{class:"ml-0.4em w-full flex-auto n-bg-base !outline-none"}),null,16),[[L,B(i)]])])}}};export{te as _,ee as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,c as s,o as a,a as t,t as r}from"./
|
|
1
|
+
import{_ as o,c as s,o as a,a as t,t as r}from"./DFkDlupw.js";import{u as i}from"./DSMailoF.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},c={class:"max-w-520px text-center"},l=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return i({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,h)=>(a(),s("div",u,[t("div",c,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,l),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-c415ba6a"]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as w}from"./
|
|
1
|
+
import{_ as w}from"./CXOn8Upj.js";import{_ as E}from"./CETmet01.js";import{_ as $}from"./B5vRr8Ti.js";import{_ as V}from"./0BAoaFXM.js";import{g as y,c as i,a as n,m as d,l,w as c,t as r,F as v,p,b as g,o as e,d as u}from"./DFkDlupw.js";import{_ as B}from"./D_JyZ6Hh.js";import"./DG-9quB_.js";import"./DRReoGGV.js";import"./C6Xm_PzB.js";import"./h1c4XpR7.js";import"./BI4BFakr.js";import"./CrhTgxiU.js";const C={class:"flex-1 p-4 overflow-auto"},F={class:"space-y-4"},N={class:"flex flex-wrap gap-2"},S={class:"text-xs opacity-50"},A={key:0},D={class:"flex flex-wrap gap-1"},h={key:1},j={class:"flex flex-wrap gap-1"},L=y({__name:"AgentView",props:{agent:{},formattedDate:{}},setup(t){return(f,o)=>{const m=$,a=V;return e(),i("div",C,[n("div",F,[n("div",N,[t.agent.model?(e(),l(m,{key:0,n:"purple"},{default:c(()=>[u(" Model: "+r(t.agent.model),1)]),_:1})):d("",!0)]),n("div",S," Updated: "+r(t.formattedDate),1),t.agent.tools&&t.agent.tools.length>0?(e(),i("div",A,[o[0]||(o[0]=n("div",{class:"text-sm font-medium opacity-50 mb-1"}," Tools ",-1)),n("div",D,[(e(!0),i(v,null,p(t.agent.tools,s=>(e(),l(m,{key:s,class:"font-mono text-xs",n:"blue"},{default:c(()=>[u(r(s),1)]),_:2},1024))),128))])])):d("",!0),t.agent.skills&&t.agent.skills.length>0?(e(),i("div",h,[o[1]||(o[1]=n("div",{class:"text-sm font-medium opacity-50 mb-1"}," Skills ",-1)),n("div",j,[(e(!0),i(v,null,p(t.agent.skills,s=>(e(),l(m,{key:s,class:"text-xs",n:"orange"},{default:c(()=>[u(r(s),1)]),_:2},1024))),128))])])):d("",!0),n("div",null,[o[2]||(o[2]=n("div",{class:"text-sm font-medium opacity-50 mb-2"}," System Prompt ",-1)),g(a,{content:t.agent.prompt,class:"max-w-none"},null,8,["content"])])])])}}}),M=Object.assign(L,{__name:"AgentView"}),T={key:0},H={key:1,class:"flex-1 flex items-center justify-center opacity-50"},I={class:"text-center"},Y=y({__name:"[name]",props:{agent:{},isEditing:{type:Boolean},editForm:{},formError:{},formatDate:{type:Function},availableSkills:{}},emits:["startEditing","save","cancel"],setup(t,{emit:f}){const o=f;return(m,a)=>{const s=w,_=E,k=M,b=B;return t.agent?(e(),i("div",T,[g(s,{description:t.agent.description,"is-editing":t.isEditing,readonly:t.agent.source!=="project",source:t.agent.source,title:t.agent.name,icon:"carbon:bot","icon-color":"text-purple-500","show-icon":"",onCancel:a[0]||(a[0]=x=>o("cancel")),onEdit:a[1]||(a[1]=x=>o("startEditing")),onSave:a[2]||(a[2]=x=>o("save"))},null,8,["description","is-editing","readonly","source","title"]),t.isEditing?(e(),l(_,{key:0,"available-skills":t.availableSkills,error:t.formError,"model-value":t.editForm,mode:"edit"},null,8,["available-skills","error","model-value"])):(e(),l(k,{key:1,agent:t.agent,"formatted-date":t.formatDate(t.agent.updatedAt)},null,8,["agent","formatted-date"]))])):(e(),i("div",H,[n("div",I,[g(b,{class:"text-4xl mb-2 animate-pulse",icon:"carbon:bot"}),a[3]||(a[3]=n("p",null,"Loading agent...",-1))])]))}}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./
|
|
1
|
+
import{_ as o}from"./D_JyZ6Hh.js";import{g as s,c,a as t,b as a,o as r}from"./DFkDlupw.js";const i={class:"flex-1 flex items-center justify-center opacity-50"},l={class:"text-center"},f=s({__name:"index",setup(_){return(m,e)=>{const n=o;return r(),c("div",i,[t("div",l,[a(n,{class:"text-4xl mb-2",icon:"carbon:lightning"}),e[0]||(e[0]=t("p",null,"Select a skill or create a new one",-1))])])}}});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g}from"./
|
|
1
|
+
import{_ as g}from"./C6Xm_PzB.js";import{_ as w}from"./BI4BFakr.js";import{_ as C}from"./CrhTgxiU.js";import{_ as N}from"./DRReoGGV.js";import{g as y,K as f,L as M,s as S,c as s,a as l,m as u,b as n,E as i,n as $,x as B,w as v,F,o as a,d as k}from"./DFkDlupw.js";const H={class:"flex-1 overflow-auto"},U={class:"p-4 border-b border-neutral-200 dark:border-neutral-800"},E={key:0,class:"font-bold mb-4"},O={class:"space-y-4"},T={key:0},q={class:"p-4"},D={key:0,class:"p-4 border-t border-neutral-200 dark:border-neutral-800 flex gap-2 flex-shrink-0"},I=y({__name:"SkillForm",props:f({mode:{},error:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:f(["save","cancel"],["update:modelValue"]),setup(r){const c=r,t=M(r,"modelValue"),x=[{value:"",label:"Inherit (default)"},{value:"sonnet",label:"Sonnet"},{value:"opus",label:"Opus"},{value:"haiku",label:"Haiku"}],m=S(()=>c.mode==="create");return(p,e)=>{const V=g,d=w,_=C,b=N;return a(),s(F,null,[l("div",H,[l("div",U,[i(m)?(a(),s("h3",E," Create New Skill ")):u("",!0),n(V,{error:r.error||"",class:"mb-4"},null,8,["error"]),l("div",O,[i(m)?(a(),s("div",T,[e[7]||(e[7]=l("label",{class:"block text-sm font-medium mb-1"},"Name",-1)),n(d,{modelValue:t.value.name,"onUpdate:modelValue":e[0]||(e[0]=o=>t.value.name=o),class:"w-full font-mono",placeholder:"e.g. vue-expert, code-reviewer"},null,8,["modelValue"])])):u("",!0),l("div",null,[e[8]||(e[8]=l("label",{class:"block text-sm font-medium mb-1"},"Description",-1)),n(d,{modelValue:t.value.description,"onUpdate:modelValue":e[1]||(e[1]=o=>t.value.description=o),class:"w-full",placeholder:"Brief description of what this skill does"},null,8,["modelValue"])]),l("div",null,[e[9]||(e[9]=l("label",{class:"block text-sm font-medium mb-1"},"Argument Hint (optional)",-1)),n(d,{modelValue:t.value.argumentHint,"onUpdate:modelValue":e[2]||(e[2]=o=>t.value.argumentHint=o),class:"w-full",placeholder:"e.g. <query>"},null,8,["modelValue"]),e[10]||(e[10]=l("div",{class:"text-xs opacity-50 mt-1"}," Hint for argument when using /skillname ",-1))]),l("div",null,[e[11]||(e[11]=l("label",{class:"block text-sm font-medium mb-1"},"Model (optional)",-1)),n(_,{modelValue:t.value.model,"onUpdate:modelValue":e[3]||(e[3]=o=>t.value.model=o),options:x,class:"w-full"},null,8,["modelValue"])])])]),l("div",q,[e[12]||(e[12]=l("label",{class:"block text-sm font-medium mb-1"},"Content (Markdown)",-1)),$(l("textarea",{"onUpdate:modelValue":e[4]||(e[4]=o=>t.value.content=o),class:"w-full min-h-[200px] p-3 font-mono text-sm n-bg-base rounded-lg border border-neutral-200 dark:border-neutral-800 resize-y",placeholder:"Write the skill instructions in markdown..."},null,512),[[B,t.value.content]])])]),i(m)?(a(),s("div",D,[n(b,{n:"orange",onClick:e[5]||(e[5]=o=>p.$emit("save"))},{default:v(()=>[...e[13]||(e[13]=[k(" Create Skill ",-1)])]),_:1}),n(b,{n:"gray",onClick:e[6]||(e[6]=o=>p.$emit("cancel"))},{default:v(()=>[...e[14]||(e[14]=[k(" Cancel ",-1)])]),_:1})])):u("",!0)],64)}}}),W=Object.assign(I,{__name:"SkillForm"});export{W as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as j}from"./D_JyZ6Hh.js";import{_ as R}from"./DRReoGGV.js";import{_ as q}from"./h1c4XpR7.js";import{_ as D}from"./C6Xm_PzB.js";import{_ as H}from"./BI4BFakr.js";import{_ as I}from"./B5vRr8Ti.js";import{_ as z}from"./n4TwJfzb.js";import{g as K,r as d,j as O,k as G,l as J,o as a,w as r,a as o,b as n,c as i,m as U,d as u,n as b,v as x,F as y,p as Q,t as v,q as W}from"./DFkDlupw.js";import{l as X}from"./CG1tBJBN.js";import{u as Y,a as Z,S as h}from"./kN0L7CSs.js";import"./DG-9quB_.js";const ee={class:"space-y-4"},oe={key:0,class:"n-bg-active rounded-lg p-4"},te={class:"space-y-4"},le={class:"flex gap-4"},ne={class:"flex items-center gap-2"},se={class:"flex items-center gap-2"},ae={class:"flex items-center gap-2"},re={key:1},ue={class:"flex gap-4"},ie={class:"flex items-center gap-2"},me={class:"flex items-center gap-2"},de={class:"flex gap-2 pt-2"},pe={key:1,class:"n-bg-active rounded-lg p-4 opacity-50"},ve={key:2,class:"space-y-2"},ce={class:"font-bold flex items-center gap-2"},fe={class:"text-sm opacity-70 font-mono"},Te=K({__name:"mcp",setup(ge){const S=Y(),{log:_}=Z("mcp"),s=d(null),k=d(!1),c=d(!1),V=d([]),f=d(!1),t=d({name:"",transport:"stdio",command:"",args:"",url:"",scope:"local"}),p=d("");function A(){return S.isActive.value&&S.origin.value?S.origin.value:window.location.origin}function M(){const m=A();_("Connecting to socket at",m),s.value=X(m,{path:h,transports:["websocket","polling"],reconnection:!0,reconnectionAttempts:5}),s.value.on("connect",()=>{_("Connected to socket"),k.value=!0,N()}),s.value.on("disconnect",()=>{_("Disconnected from socket"),k.value=!1}),s.value.on("mcp:list",e=>{_("MCP list received",e),V.value=e,c.value=!1}),s.value.on("mcp:added",e=>{e.success?(f.value=!1,P()):p.value=e.error||"Failed to add MCP server"}),s.value.on("mcp:removed",e=>{e.success||alert(`Failed to remove: ${e.error}`)})}function N(){s.value&&(c.value=!0,s.value.emit("mcp:list"))}function P(){t.value={name:"",transport:"stdio",command:"",args:"",url:"",scope:"local"},p.value=""}function $(){if(!t.value.name){p.value="Name is required";return}if(t.value.transport==="stdio"&&!t.value.command){p.value="Command is required for stdio transport";return}if((t.value.transport==="http"||t.value.transport==="sse")&&!t.value.url){p.value="URL is required for HTTP/SSE transport";return}if(s.value){const m=t.value.args.split(" ").map(e=>e.trim()).filter(e=>e.length>0);s.value.emit("mcp:add",{name:t.value.name,transport:t.value.transport,command:t.value.command,args:m,url:t.value.url,scope:t.value.scope})}}function F(m){confirm(`Remove MCP server "${m.name}"?`)&&s.value&&s.value.emit("mcp:remove",{name:m.name})}return O(()=>{M()}),G(()=>{s.value&&s.value.disconnect()}),(m,e)=>{const w=j,g=R,L=q,B=D,C=H,T=I,E=z;return a(),J(E,{title:"MCP Servers",icon:"carbon:plug",color:"blue"},{actions:r(()=>[n(g,{disabled:!k.value,n:"blue",onClick:e[0]||(e[0]=l=>f.value=!0)},{default:r(()=>[n(w,{class:"mr-1",icon:"carbon:add"}),e[11]||(e[11]=u(" Add Server ",-1))]),_:1},8,["disabled"]),n(g,{disabled:!k.value||c.value,n:"gray",onClick:N},{default:r(()=>[n(w,{class:W([{"animate-spin":c.value},"mr-1"]),icon:"carbon:restart"},null,8,["class"]),e[12]||(e[12]=u(" Refresh ",-1))]),_:1},8,["disabled"])]),default:r(()=>[o("div",ee,[n(L,{class:"text-sm",icon:"carbon:information",n:"blue"},{default:r(()=>[...e[13]||(e[13]=[u(" Model Context Protocol (MCP) servers extend Claude's capabilities with custom tools and data sources. ",-1)])]),_:1}),f.value?(a(),i("div",oe,[e[27]||(e[27]=o("h3",{class:"font-bold mb-4"}," Add MCP Server ",-1)),n(B,{error:p.value,class:"mb-4"},null,8,["error"]),o("div",te,[o("div",null,[e[14]||(e[14]=o("label",{class:"block text-sm font-medium mb-1"},"Name",-1)),n(C,{modelValue:t.value.name,"onUpdate:modelValue":e[1]||(e[1]=l=>t.value.name=l),class:"w-full",placeholder:"e.g. github, nuxt-ui-remote"},null,8,["modelValue"])]),o("div",null,[e[18]||(e[18]=o("label",{class:"block text-sm font-medium mb-1"},"Transport",-1)),o("div",le,[o("label",ne,[b(o("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.transport=l),name:"transport",type:"radio",value:"stdio"},null,512),[[x,t.value.transport]]),e[15]||(e[15]=o("span",null,"stdio",-1))]),o("label",se,[b(o("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>t.value.transport=l),name:"transport",type:"radio",value:"http"},null,512),[[x,t.value.transport]]),e[16]||(e[16]=o("span",null,"HTTP",-1))]),o("label",ae,[b(o("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>t.value.transport=l),name:"transport",type:"radio",value:"sse"},null,512),[[x,t.value.transport]]),e[17]||(e[17]=o("span",null,"SSE",-1))])])]),t.value.transport==="stdio"?(a(),i(y,{key:0},[o("div",null,[e[19]||(e[19]=o("label",{class:"block text-sm font-medium mb-1"},"Command",-1)),n(C,{modelValue:t.value.command,"onUpdate:modelValue":e[5]||(e[5]=l=>t.value.command=l),class:"w-full font-mono",placeholder:"e.g. npx"},null,8,["modelValue"])]),o("div",null,[e[20]||(e[20]=o("label",{class:"block text-sm font-medium mb-1"},"Arguments",-1)),n(C,{modelValue:t.value.args,"onUpdate:modelValue":e[6]||(e[6]=l=>t.value.args=l),class:"w-full font-mono",placeholder:"e.g. -y @modelcontextprotocol/server-github"},null,8,["modelValue"])])],64)):U("",!0),t.value.transport==="http"||t.value.transport==="sse"?(a(),i("div",re,[e[21]||(e[21]=o("label",{class:"block text-sm font-medium mb-1"},"URL",-1)),n(C,{modelValue:t.value.url,"onUpdate:modelValue":e[7]||(e[7]=l=>t.value.url=l),class:"w-full font-mono",placeholder:"e.g. https://ui.nuxt.com/mcp"},null,8,["modelValue"])])):U("",!0),o("div",null,[e[24]||(e[24]=o("label",{class:"block text-sm font-medium mb-1"},"Scope",-1)),o("div",ue,[o("label",ie,[b(o("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>t.value.scope=l),name:"scope",type:"radio",value:"local"},null,512),[[x,t.value.scope]]),e[22]||(e[22]=o("span",null,"Local (this project)",-1))]),o("label",me,[b(o("input",{"onUpdate:modelValue":e[9]||(e[9]=l=>t.value.scope=l),name:"scope",type:"radio",value:"global"},null,512),[[x,t.value.scope]]),e[23]||(e[23]=o("span",null,"User (all projects)",-1))])])]),o("div",de,[n(g,{n:"green",onClick:$},{default:r(()=>[...e[25]||(e[25]=[u(" Add Server ",-1)])]),_:1}),n(g,{n:"gray",onClick:e[10]||(e[10]=l=>{f.value=!1,P()})},{default:r(()=>[...e[26]||(e[26]=[u(" Cancel ",-1)])]),_:1})])])])):U("",!0),V.value.length===0&&!f.value&&!c.value?(a(),i("div",pe,' No MCP servers configured. Click "Add Server" to get started. ')):(a(),i("div",ve,[(a(!0),i(y,null,Q(V.value,l=>(a(),i("div",{key:l.name,class:"n-bg-active rounded-lg p-4 flex items-center justify-between"},[o("div",null,[o("div",ce,[u(v(l.name)+" ",1),n(T,{n:l.transport==="stdio"?"gray":"blue",class:"text-xs"},{default:r(()=>[u(v(l.transport),1)]),_:2},1032,["n"]),n(T,{n:l.scope==="local"?"green":"purple",class:"text-xs"},{default:r(()=>[u(v(l.scope),1)]),_:2},1032,["n"])]),o("div",fe,[l.transport==="stdio"?(a(),i(y,{key:0},[u(v(l.command)+" "+v(l.args?.join(" ")),1)],64)):(a(),i(y,{key:1},[u(v(l.url),1)],64))])]),n(g,{n:"red",onClick:be=>F(l)},{default:r(()=>[n(w,{icon:"carbon:trash-can"})]),_:1},8,["onClick"])]))),128))]))])]),_:1})}}});export{Te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as P,_ as j,a as A}from"./D8DUrd91.js";import{_ as G}from"./C8AkZ-W3.js";import{g as H,s as J,l as s,w as f,E as o,G as M,H as U,o as a,I as Y,J as z,c as g,m as K,a as w,d as C,F as O,p as Q}from"./DFkDlupw.js";import"./D_JyZ6Hh.js";import"./DRReoGGV.js";import"./DG-9quB_.js";import"./B5vRr8Ti.js";import"./h1c4XpR7.js";import"./n4TwJfzb.js";import"./CG1tBJBN.js";import"./kN0L7CSs.js";import"./C6Xm_PzB.js";import"./BI4BFakr.js";const W={key:0,class:"n-bg-active rounded-lg p-4 opacity-50 text-sm"},X={class:"space-y-1"},pe=H({__name:"commands",setup(Z){const v=M(),i=U(),{isConnected:h,isLoading:d,items:m,isEditing:N,showNewForm:c,formError:u,newForm:l,editForm:S,load:x,select:y,startEditing:F,save:p,cancelEditing:k,deleteItem:E,showNew:T,formatDate:b}=P({resourceName:"commands",loggerName:"commands",createDefaultForm:()=>({name:"",description:"",content:"",allowedTools:""}),resourceToForm:e=>({name:e.name,description:e.description||"",content:e.content,allowedTools:e.allowedTools?.join(", ")||""}),validateForm:e=>e.name?e.content?null:"Content is required":"Name is required",transformFormForSave:e=>{const n=e.allowedTools.split(",").map(r=>r.trim()).filter(r=>r.length>0);return{name:e.name,content:e.content,description:e.description||void 0,allowedTools:n.length>0?n:void 0}}}),_=J(()=>{const e=v.params.name;return e&&m.value.find(n=>n.name===e)||null});function D(e){y(e),i.push(`/commands/${e.name}`)}function R(e){E(e,`Delete command "/${e}"?`)}function V(){T(),i.push("/commands")}function L(){c.value=!1}return(e,n)=>{const r=A,B=G,$=z,I=j;return a(),s(I,{title:"Slash Commands",icon:"carbon:terminal",color:"green","is-connected":o(h),"is-loading":o(d),"info-tip":"Slash commands are markdown files with YAML frontmatter.","storage-path":".claude/commands/<name>.md","empty-message":"No slash commands yet. Create one to get started.","empty-editor-message":"Select a command or create a new one","new-button-label":"New Command",onNew:V,onRefresh:o(x)},{list:f(()=>[o(m).length===0&&!o(d)?(a(),g("div",W,[...n[1]||(n[1]=[C(" No slash commands yet. ",-1),w("br",null,null,-1),C(" Create one to get started. ",-1)])])):K("",!0),w("div",X,[(a(!0),g(O,null,Q(o(m),t=>(a(),s(r,{key:t.name,selected:_.value?.name===t.name,name:t.name,description:t.description,source:t.source,icon:"carbon:terminal",color:"green","mono-name":"","name-prefix":"/",onSelect:q=>D(t),onDelete:q=>R(t.name)},null,8,["selected","name","description","source","onSelect","onDelete"]))),128))])]),editor:f(()=>[o(c)?(a(),s(B,{key:0,modelValue:o(l),"onUpdate:modelValue":n[0]||(n[0]=t=>Y(l)?l.value=t:null),mode:"create",error:o(u),onSave:o(p),onCancel:L},null,8,["modelValue","error","onSave"])):(a(),s($,{key:1,command:_.value,"is-editing":o(N),"edit-form":o(S),"form-error":o(u),"format-date":o(b),onStartEditing:o(F),onSave:o(p),onCancel:o(k)},null,8,["command","is-editing","edit-form","form-error","format-date","onStartEditing","onSave","onCancel"]))]),_:1},8,["is-connected","is-loading","onRefresh"])}}});export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g}from"./
|
|
1
|
+
import{_ as g}from"./CXOn8Upj.js";import{_ as y}from"./C8AkZ-W3.js";import{_ as w}from"./B5vRr8Ti.js";import{_ as $}from"./0BAoaFXM.js";import{g as u,c as m,m as k,b as i,a,F as C,p as E,o,l as c,w as _,d as b,t as f}from"./DFkDlupw.js";import{_ as V}from"./D_JyZ6Hh.js";import"./DG-9quB_.js";import"./DRReoGGV.js";import"./C6Xm_PzB.js";import"./h1c4XpR7.js";import"./BI4BFakr.js";const B={class:"flex-1 p-4 overflow-auto"},F={key:0,class:"mb-4"},N={class:"flex flex-wrap gap-1"},T=u({__name:"CommandView",props:{command:{}},setup(t){return(d,n)=>{const r=w,e=$;return o(),m("div",B,[t.command.allowedTools&&t.command.allowedTools.length>0?(o(),m("div",F,[n[0]||(n[0]=a("div",{class:"text-xs font-medium opacity-50 mb-1"}," Allowed Tools ",-1)),a("div",N,[(o(!0),m(C,null,E(t.command.allowedTools,s=>(o(),c(r,{key:s,class:"font-mono text-xs",n:"blue"},{default:_(()=>[b(f(s),1)]),_:2},1024))),128))])])):k("",!0),i(e,{content:t.command.content,class:"max-w-none"},null,8,["content"])])}}}),j=Object.assign(T,{__name:"CommandView"}),D={key:0},A={class:"text-xs opacity-50 mt-1"},L={key:1,class:"flex-1 flex items-center justify-center opacity-50"},S={class:"text-center"},P=u({__name:"[name]",props:{command:{},isEditing:{type:Boolean},editForm:{},formError:{},formatDate:{type:Function}},emits:["startEditing","save","cancel"],setup(t,{emit:d}){const n=d;return(r,e)=>{const s=g,x=y,p=j,v=V;return t.command?(o(),m("div",D,[i(s,{title:`/${t.command.name}`,description:t.command.description,"is-editing":t.isEditing,readonly:t.command.source!=="project",source:t.command.source,"mono-title":"",onEdit:e[0]||(e[0]=l=>n("startEditing")),onSave:e[1]||(e[1]=l=>n("save")),onCancel:e[2]||(e[2]=l=>n("cancel"))},{subtitle:_(()=>[a("div",A," Updated: "+f(t.formatDate(t.command.updatedAt)),1)]),_:1},8,["title","description","is-editing","readonly","source"]),t.isEditing?(o(),c(x,{key:0,"model-value":t.editForm,mode:"edit",error:t.formError},null,8,["model-value","error"])):(o(),c(p,{key:1,command:t.command},null,8,["command"]))])):(o(),m("div",L,[a("div",S,[i(v,{class:"text-4xl mb-2 animate-pulse",icon:"carbon:terminal"}),e[3]||(e[3]=a("p",null,"Loading command...",-1))])]))}}});export{P as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{_ as se}from"./D_JyZ6Hh.js";import{_ as rt}from"./DRReoGGV.js";import{g as oe,l as F,w as q,T as it,o as h,c as _,m as R,a as d,b as v,d as M,F as K,p as ue,q as ee,t as N,_ as at,z as Bn,A as Nn,r as T,s as P,y as Ue,B as Re,n as St,x as At,C as $n,D as Ee,j as In,k as Ln,E as w}from"./DFkDlupw.js";import{_ as Et}from"./B5vRr8Ti.js";import{_ as Pn}from"./DG-9quB_.js";import{_ as Dn}from"./h1c4XpR7.js";import{_ as Un}from"./0BAoaFXM.js";import{D as Mn,u as qn,a as Vn}from"./kN0L7CSs.js";const Hn={key:0,class:"history-sidebar w-72 h-full border-r border-gray-200 dark:border-gray-700 flex flex-col n-bg-base absolute left-0 top-0 z-10 shadow-lg"},Fn={class:"p-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between"},jn={class:"p-3 border-b border-gray-200 dark:border-gray-700"},Kn={class:"flex-1 overflow-y-auto"},Wn=["onClick"],zn={class:"flex items-start justify-between gap-2"},Yn={class:"flex-1 min-w-0"},Jn={class:"font-medium text-sm truncate"},Gn={class:"text-xs opacity-50 mt-1 flex items-center gap-2"},Xn=["onClick"],Qn={key:0,class:"p-4 text-center opacity-50 text-sm"},Zn=oe({__name:"HistorySidebar",props:{conversations:{},activeId:{},isOpen:{type:Boolean}},emits:["select","delete","new","close"],setup(n,{emit:e}){const t=e;function s(r){const a=new Date(r),l=new Date().getTime()-a.getTime(),m=Math.floor(l/6e4),f=Math.floor(m/60),u=Math.floor(f/24);return m<1?"just now":m<60?`${m}m ago`:f<24?`${f}h ago`:u<7?`${u}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function o(r,a){r.stopPropagation(),confirm("Delete this conversation?")&&t("delete",a)}return(r,a)=>{const i=se,l=rt;return h(),F(it,{name:"slide"},{default:q(()=>[n.isOpen?(h(),_("div",Hn,[d("div",Fn,[a[2]||(a[2]=d("h2",{class:"font-semibold text-sm"}," Chat History ",-1)),d("button",{class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors",onClick:a[0]||(a[0]=m=>t("close"))},[v(i,{icon:"carbon:close"})])]),d("div",jn,[v(l,{class:"w-full",n:"blue",onClick:a[1]||(a[1]=m=>t("new"))},{default:q(()=>[v(i,{class:"mr-1",icon:"carbon:add"}),a[3]||(a[3]=M(" New Chat ",-1))]),_:1})]),d("div",Kn,[(h(!0),_(K,null,ue(n.conversations,m=>(h(),_("div",{key:m.id,class:ee([{"bg-blue-500/10 border-l-2 border-l-blue-500":m.id===n.activeId},"p-3 border-b border-gray-100 dark:border-gray-800 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors"]),onClick:f=>t("select",m.id)},[d("div",zn,[d("div",Yn,[d("div",Jn,N(m.title||"New conversation"),1),d("div",Gn,[d("span",null,N(s(m.updatedAt)),1),a[4]||(a[4]=d("span",{class:"opacity-50"},"|",-1)),d("span",null,N(m.messages.length)+" msgs",1)])]),d("button",{class:"opacity-0 group-hover:opacity-100 p-1 hover:bg-red-100 dark:hover:bg-red-900/20 rounded transition-opacity",title:"Delete conversation",onClick:f=>o(f,m.id)},[v(i,{class:"text-red-500 text-sm",icon:"carbon:trash-can"})],8,Xn)])],10,Wn))),128)),n.conversations.length===0?(h(),_("div",Qn,[v(i,{class:"text-2xl mb-2",icon:"carbon:chat"}),a[5]||(a[5]=d("p",null,"No conversations yet",-1))])):R("",!0)])])):R("",!0)]),_:1})}}}),es=Object.assign(at(Zn,[["__scopeId","data-v-797cdae6"]]),{__name:"HistorySidebar"});let he;const Ce=[];function Rt(n){if(Ce.push(n),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&Ce.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&Ce.forEach(t=>t(e))},get(){return he.value},configurable:!0}),()=>{Ce.splice(Ce.indexOf(n),1)}}function Tt(){he||(he=Bn(),Rt(e));function n(){he&&Nn(he)}function e(t){he.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",n)}return he}const ts={class:"tool-call-block rounded-lg border border-gray-200 dark:border-gray-700 my-2 overflow-hidden text-sm"},ns={class:"flex items-center gap-2 px-3 py-2 bg-blue-500/10"},ss={class:"font-medium"},os=["title"],rs=["href","title"],is={key:2,class:"text-xs opacity-50 font-mono"},as={key:3,class:"ml-auto flex-shrink-0"},cs={key:4,class:"ml-auto flex-shrink-0"},ls={key:0,class:"border-t border-gray-200 dark:border-gray-700"},us={class:"text-xs opacity-50"},ds={key:0,class:"px-3 pb-2"},hs={class:"text-xs n-bg-base p-2 rounded overflow-x-auto max-h-64 whitespace-pre-wrap"},fs={class:"font-medium opacity-70"},ps={key:0,class:"px-3 pb-2"},ms={class:"text-xs n-bg-base p-2 rounded overflow-x-auto max-h-96 whitespace-pre-wrap"},gs={key:1,class:"px-3 pb-2"},vs={class:"text-xs opacity-50 truncate font-mono"},ys=oe({__name:"ToolCallBlock",props:{toolUse:{},toolResult:{}},setup(n){const e=Tt(),t=n,s=T(!1),o=T(!1),r=P(()=>JSON.stringify(t.toolUse.input,null,2)),a=P(()=>Object.keys(t.toolUse.input).length),i=P(()=>t.toolResult?typeof t.toolResult.content=="string"?t.toolResult.content:JSON.stringify(t.toolResult.content,null,2):""),l=P(()=>{const x=i.value;return x.length<=100?x:x.substring(0,100)+"..."}),m=P(()=>({Read:"carbon:document",Write:"carbon:document-add",Edit:"carbon:edit",Bash:"carbon:terminal",Glob:"carbon:search",Grep:"carbon:search-locate",WebFetch:"carbon:cloud",WebSearch:"carbon:search",Task:"carbon:task",TodoWrite:"carbon:list-checked",AskUserQuestion:"carbon:help"})[t.toolUse.name]||"carbon:tool-box"),f=P(()=>t.toolUse.id.substring(0,12)),u=P(()=>{const x=t.toolUse.input,k=x.file_path||x.path||x.filePath||x.filename||x.file||null;return k?String(k):null}),g=P(()=>{const x=t.toolUse.input,k=x.url||x.uri||x.href||x.link||null;return k?String(k):null}),S=P(()=>{if(!g.value)return null;const x=g.value,k=50;if(x.length<=k)return x;try{const I=new URL(x),D=I.hostname,V=I.pathname+I.search;return V.length>k-D.length-3?D+V.substring(0,k-D.length-6)+"...":x}catch{return x.substring(0,k-3)+"..."}}),b=P(()=>{const x=t.toolUse.input;return x.line||x.lineNumber||x.offset||null}),A=P(()=>{if(!u.value)return null;const x=u.value,k=32;if(x.length<=k)return x;const I=x.slice(-k),D=I.indexOf("/");return D>0&&D<15?"..."+I.slice(D):"..."+I});async function $(){if(u.value)try{let x=u.value;if(b.value&&(x=`${x}:${b.value}`),e.value?.devtools?.rpc?.openInEditor&&await e.value.devtools.rpc.openInEditor(x))return;const k=`webstorm://open?file=${encodeURIComponent(u.value)}${b.value?`&line=${b.value}`:""}`;window.open(k,"_self")}catch(x){console.error("Failed to open file in IDE:",x)}}return(x,k)=>{const I=se,D=Et;return h(),_("div",ts,[d("div",ns,[v(I,{icon:m.value,class:"text-blue-500 flex-shrink-0"},null,8,["icon"]),d("span",ss,N(n.toolUse.name),1),A.value?(h(),_("button",{key:0,title:`${u.value} (click to open in IDE)`,class:"text-xs text-blue-600 dark:text-blue-400 font-mono hover:underline cursor-pointer truncate max-w-[300px] text-right",onClick:Ue($,["stop"])},N(A.value),9,os)):S.value?(h(),_("a",{key:1,href:g.value,title:g.value,class:"text-xs text-blue-600 dark:text-blue-400 font-mono hover:underline truncate max-w-[300px] text-right",rel:"noopener noreferrer",target:"_blank",onClick:k[0]||(k[0]=Ue(()=>{},["stop"]))},N(S.value),9,rs)):(h(),_("span",is,N(f.value),1)),n.toolResult?(h(),_("div",as,[n.toolResult.is_error?(h(),F(D,{key:0,n:"red"},{default:q(()=>[...k[3]||(k[3]=[M(" Error ",-1)])]),_:1})):(h(),F(D,{key:1,n:"green"},{default:q(()=>[...k[4]||(k[4]=[M(" Done ",-1)])]),_:1}))])):(h(),_("div",cs,[v(D,{n:"yellow"},{default:q(()=>[...k[5]||(k[5]=[M(" Running ",-1)])]),_:1})]))]),a.value>0?(h(),_("div",ls,[d("button",{class:"w-full px-3 py-2 text-left flex items-center gap-2 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",onClick:k[1]||(k[1]=V=>s.value=!s.value)},[v(I,{icon:s.value?"carbon:chevron-down":"carbon:chevron-right",class:"text-xs opacity-70"},null,8,["icon"]),k[6]||(k[6]=d("span",{class:"font-medium opacity-70"},"Parameters",-1)),d("span",us,N(a.value)+" "+N(a.value===1?"field":"fields"),1)]),s.value?(h(),_("div",ds,[d("pre",hs,N(r.value),1)])):R("",!0)])):R("",!0),n.toolResult?(h(),_("div",{key:1,class:ee([{"bg-red-500/5":n.toolResult.is_error},"border-t border-gray-200 dark:border-gray-700"])},[d("button",{class:"w-full px-3 py-2 text-left flex items-center gap-2 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",onClick:k[2]||(k[2]=V=>o.value=!o.value)},[v(I,{icon:o.value?"carbon:chevron-down":"carbon:chevron-right",class:"text-xs opacity-70"},null,8,["icon"]),d("span",fs,N(n.toolResult.is_error?"Error":"Result"),1),n.toolResult.is_error?(h(),F(I,{key:0,class:"text-red-500",icon:"carbon:warning"})):R("",!0)]),o.value?(h(),_("div",ps,[d("pre",ms,N(i.value),1)])):i.value?(h(),_("div",gs,[d("div",vs,N(l.value),1)])):R("",!0)],2)):R("",!0)])}}}),_s=Object.assign(ys,{__name:"ToolCallBlock"}),bs={class:"thinking-block rounded-lg border border-purple-200 dark:border-purple-800 my-2 overflow-hidden text-sm bg-purple-500/5"},xs={class:"text-xs opacity-50"},ws={key:0,class:"px-3 pb-2"},ks={class:"text-xs n-bg-base p-2 rounded overflow-x-auto max-h-96 whitespace-pre-wrap text-purple-800 dark:text-purple-200"},Cs={key:1,class:"px-3 pb-2"},Ss={class:"text-xs opacity-50 truncate font-mono text-purple-700 dark:text-purple-300"},As=oe({__name:"ThinkingBlock",props:{thinking:{}},setup(n){const e=n,t=T(!1),s=P(()=>{const r=e.thinking;return r.length<=80?r:r.substring(0,80)+"..."}),o=P(()=>e.thinking.split(`
|
|
2
|
+
`).length);return(r,a)=>{const i=se;return h(),_("div",bs,[d("button",{class:"w-full px-3 py-2 text-left flex items-center gap-2 hover:bg-purple-500/10 transition-colors",onClick:a[0]||(a[0]=l=>t.value=!t.value)},[v(i,{icon:t.value?"carbon:chevron-down":"carbon:chevron-right",class:"text-xs text-purple-500"},null,8,["icon"]),v(i,{icon:"carbon:idea",class:"text-purple-500"}),a[1]||(a[1]=d("span",{class:"font-medium text-purple-700 dark:text-purple-300"},"Thinking",-1)),d("span",xs,N(o.value)+" "+N(o.value===1?"line":"lines"),1)]),t.value?(h(),_("div",ws,[d("pre",ks,N(n.thinking),1)])):(h(),_("div",Cs,[d("div",Ss,N(s.value),1)]))])}}}),Es=Object.assign(As,{__name:"ThinkingBlock"}),Rs={key:0,class:"flex flex-wrap gap-1.5 mb-2 pb-2 border-b border-neutral-200/50 dark:border-neutral-700/50"},Ts={key:0,class:"flex items-center gap-1 px-2 py-0.5 bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded text-xs",title:"Viewport size"},Os=["title"],Bs=["title"],Ns={class:"font-mono"},$s=["title"],Is={class:"font-mono truncate max-w-[150px]"},Ls=["title"],Ps={class:"font-mono"},Ds=["title"],Us={class:"font-mono"},Ms=oe({__name:"MessageContext",props:{context:{}},setup(n){const e=n,t=P(()=>!!e.context.viewport),s=P(()=>!!e.context.userAgent),o=P(()=>!!e.context.routing),r=P(()=>e.context.components&&e.context.components.length>0),a=P(()=>t.value||s.value||o.value||r.value),i=P(()=>e.context.userAgent?e.context.userAgent:null);function l(m){return Object.entries(m).map(([f,u])=>`${f}=${Array.isArray(u)?u.join(","):u}`).join("&")}return(m,f)=>{const u=se;return a.value?(h(),_("div",Rs,[t.value?(h(),_("div",Ts,[v(u,{class:"text-blue-500",icon:"carbon:fit-to-screen"}),d("span",null,N(n.context.viewport.width)+"×"+N(n.context.viewport.height),1)])):R("",!0),s.value&&i.value?(h(),_("div",{key:1,title:n.context.userAgent,class:"flex items-center gap-1 px-2 py-0.5 bg-orange-500/10 text-orange-600 dark:text-orange-400 rounded text-xs"},[v(u,{class:"text-orange-500",icon:"carbon:application-web"}),d("span",null,N(i.value),1)],8,Os)):R("",!0),o.value?(h(),_(K,{key:2},[d("div",{title:`Full path: ${n.context.routing.fullPath||n.context.routing.path}`,class:"flex items-center gap-1 px-2 py-0.5 bg-green-500/10 text-green-600 dark:text-green-400 rounded text-xs"},[v(u,{class:"text-green-500",icon:"carbon:location"}),d("span",Ns,N(n.context.routing.path),1)],8,Bs),n.context.routing.query&&Object.keys(n.context.routing.query).length>0?(h(),_("div",{key:0,title:l(n.context.routing.query),class:"flex items-center gap-1 px-2 py-0.5 bg-green-500/10 text-green-600 dark:text-green-400 rounded text-xs"},[v(u,{class:"text-green-500",icon:"carbon:query"}),d("span",Is,"?"+N(l(n.context.routing.query)),1)],8,$s)):R("",!0),n.context.routing.pageComponent?(h(),_("div",{key:1,title:n.context.routing.pageComponent,class:"flex items-center gap-1 px-2 py-0.5 bg-teal-500/10 text-teal-600 dark:text-teal-400 rounded text-xs"},[v(u,{class:"text-teal-500",icon:"carbon:document"}),d("span",Ps,N(n.context.routing.pageComponent.split("/").pop()),1)],8,Ls)):R("",!0)],64)):R("",!0),(h(!0),_(K,null,ue(n.context.components,g=>(h(),_("div",{key:g,title:g,class:"flex items-center gap-1 px-2 py-0.5 bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded text-xs"},[v(u,{class:"text-purple-500",icon:"carbon:application"}),d("span",Us,N(g.split("/").pop()?.replace(".vue","")),1)],8,Ds))),128))])):R("",!0)}}}),qs=Object.assign(Ms,{__name:"MessageContext"}),Vs={key:0,class:"mb-2"},Hs={class:"flex flex-wrap gap-2 mb-2"},Fs={class:"font-mono"},js=["title"],Ks=["onClick"],Ws=oe({__name:"ComponentContext",props:{components:{}},emits:["remove","toggle-picker","clear-all"],setup(n,{emit:e}){const t=n,s=e;function o(i){const l=i.split("/");return l[l.length-1].replace(".vue","")}function r(i){const l=i.match(/(?:components|pages|layouts|app)\/.*\.vue$/);return l?l[0]:i}const a=P(()=>t.components.length>0);return(i,l)=>{const m=se;return a.value?(h(),_("div",Vs,[d("div",Hs,[(h(!0),_(K,null,ue(n.components,f=>(h(),_("div",{key:f.filePath,class:"flex items-center gap-1 px-2 py-1 bg-purple-500/20 text-purple-600 dark:text-purple-400 rounded-md text-sm group"},[v(m,{class:"text-purple-500",icon:"carbon:application"}),d("span",Fs,N(o(f.filePath)),1),d("span",{title:f.filePath,class:"text-xs opacity-50 hidden sm:inline"}," ("+N(r(f.filePath))+") ",9,js),d("button",{class:"ml-1 opacity-50 hover:opacity-100 hover:text-red-500 transition-opacity",title:"Remove from context",onClick:Ue(u=>s("remove",f.filePath),["stop"])},[v(m,{icon:"carbon:close"})],8,Ks)]))),128)),n.components.length>1?(h(),_("button",{key:0,class:"flex items-center gap-1 px-2 py-1 text-xs opacity-50 hover:opacity-100 hover:text-red-500 transition-opacity",title:"Clear all components",onClick:l[0]||(l[0]=Ue(f=>s("clear-all"),["stop"]))},[v(m,{icon:"carbon:trash-can"}),l[1]||(l[1]=M(" Clear all ",-1))])):R("",!0)])])):R("",!0)}}}),zs=Object.assign(Ws,{__name:"ComponentContext"}),Ys={class:"flex items-center gap-1"},Js={key:0,class:"text-xs opacity-50 mr-1"},Gs=["title","onClick"],Xs="bg-neutral-100 dark:bg-neutral-800 text-neutral-500 hover:bg-neutral-200 dark:hover:bg-neutral-700",Qs=oe({__name:"ContextChips",props:{chips:{}},emits:["toggle"],setup(n,{emit:e}){const t=n,s=e;function o(a){switch(a.id){case"viewport":return"bg-blue-500/20 text-blue-600 dark:text-blue-400 ring-1 ring-blue-500/30";case"user-agent":return"bg-orange-500/20 text-orange-600 dark:text-orange-400 ring-1 ring-orange-500/30";case"routing":return"bg-green-500/20 text-green-600 dark:text-green-400 ring-1 ring-green-500/30";default:return"bg-gray-500/20 text-gray-600 dark:text-gray-400 ring-1 ring-gray-500/30"}}const r=P(()=>t.chips.some(a=>a.active));return(a,i)=>{const l=se;return h(),_("div",Ys,[r.value?(h(),_("span",Js,"Context:")):R("",!0),(h(!0),_(K,null,ue(n.chips,m=>(h(),_("button",{key:m.id,class:ee(["flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium transition-all",m.active?o(m):Xs]),title:`${m.active?"Disable":"Enable"} ${m.label} context`,onClick:f=>s("toggle",m.id)},[v(l,{icon:m.icon,class:"text-sm"},null,8,["icon"]),d("span",null,N(m.label),1)],10,Gs))),128))])}}}),Zs=Object.assign(Qs,{__name:"ContextChips"}),eo={key:0,class:"absolute bottom-full left-0 mb-1 w-full max-w-md z-50"},to={class:"n-bg-base border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg overflow-hidden"},no={class:"px-3 py-2 border-b border-neutral-200 dark:border-neutral-700 text-xs opacity-60 flex items-center gap-2"},so={class:"max-h-48 overflow-y-auto"},oo=["onClick","onMouseenter"],ro={class:"truncate"},io={key:0,class:"px-3 py-4 text-center text-sm opacity-50"},ao=oe({__name:"DocsAutocomplete",props:{docs:{},inputValue:{},cursorPosition:{},visible:{type:Boolean}},emits:["select","close"],setup(n,{expose:e,emit:t}){const s=n,o=t,r=T(0),a=P(()=>{if(!s.visible)return"";const u=s.inputValue.slice(0,s.cursorPosition).match(/@docs\/(\S*)$/);return u?u[1].toLowerCase():""}),i=P(()=>{const f=a.value;return f?s.docs.filter(u=>u.path.toLowerCase().includes(f)||u.name.toLowerCase().includes(f)):s.docs});Re(i,()=>{r.value=0});function l(f){if(!s.visible||i.value.length===0)return!1;switch(f.key){case"ArrowDown":return f.preventDefault(),r.value=(r.value+1)%i.value.length,!0;case"ArrowUp":return f.preventDefault(),r.value=r.value===0?i.value.length-1:r.value-1,!0;case"Tab":case"Enter":return f.preventDefault(),m(i.value[r.value]),!0;case"Escape":return f.preventDefault(),o("close"),!0}return!1}function m(f){o("select",f.path)}return e({handleKeydown:l}),(f,u)=>{const g=se;return h(),F(it,{name:"dropdown"},{default:q(()=>[n.visible&&i.value.length>0?(h(),_("div",eo,[d("div",to,[d("div",no,[v(g,{icon:"carbon:document"}),u[0]||(u[0]=d("span",null,"Select a document",-1)),u[1]||(u[1]=d("span",{class:"ml-auto opacity-50"},"Tab/Enter to select",-1))]),d("div",so,[(h(!0),_(K,null,ue(i.value,(S,b)=>(h(),_("button",{key:S.path,class:ee(["w-full px-3 py-2 text-left flex items-center gap-2 text-sm transition-colors",b===r.value?"bg-blue-500/20 text-blue-600 dark:text-blue-400":"hover:bg-neutral-100 dark:hover:bg-neutral-800"]),type:"button",onClick:A=>m(S),onMouseenter:A=>r.value=b},[v(g,{class:"opacity-50",icon:"carbon:document"}),d("span",ro,N(S.path),1)],42,oo))),128))]),i.value.length===0?(h(),_("div",io," No documents found ")):R("",!0)])])):R("",!0)]),_:1})}}}),co=Object.assign(at(ao,[["__scopeId","data-v-9157fee2"]]),{__name:"DocsAutocomplete"}),lo={key:0,class:"absolute bottom-full left-0 mb-1 w-full max-w-md z-50"},uo={class:"n-bg-base border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg overflow-hidden"},ho={class:"px-3 py-2 border-b border-neutral-200 dark:border-neutral-700 text-xs opacity-60 flex items-center gap-2"},fo={class:"max-h-48 overflow-y-auto"},po=["onClick","onMouseenter"],mo={class:"flex-1 min-w-0"},go={class:"font-mono truncate"},vo={key:0,class:"text-xs opacity-50 truncate"},yo=oe({__name:"CommandsAutocomplete",props:{commands:{},inputValue:{},cursorPosition:{},visible:{type:Boolean}},emits:["select","close"],setup(n,{expose:e,emit:t}){const s=n,o=t,r=T(0),a=P(()=>{if(!s.visible)return"";const g=s.inputValue.slice(0,s.cursorPosition).match(/(?:^|\s)\/(\S*)$/);return g?g[1].toLowerCase():""}),i=P(()=>{const u=a.value;return s.commands.filter(S=>u?S.name.toLowerCase().includes(u)||S.description?.toLowerCase().includes(u):!0)}),l=P(()=>s.visible&&i.value.length>0);Re(i,()=>{r.value=0}),Re([i,a],([u,g])=>{s.visible&&u.length===0&&g.length>0&&o("close")});function m(u){if(!l.value)return!1;switch(u.key){case"ArrowDown":return u.preventDefault(),r.value=(r.value+1)%i.value.length,!0;case"ArrowUp":return u.preventDefault(),r.value=r.value===0?i.value.length-1:r.value-1,!0;case"Tab":case"Enter":return u.preventDefault(),f(i.value[r.value]),!0;case"Escape":return u.preventDefault(),o("close"),!0}return!1}function f(u){o("select",u.name)}return e({handleKeydown:m}),(u,g)=>{const S=se;return h(),F(it,{name:"dropdown"},{default:q(()=>[l.value?(h(),_("div",lo,[d("div",uo,[d("div",ho,[v(S,{icon:"carbon:terminal"}),g[0]||(g[0]=d("span",null,"Slash Commands",-1)),g[1]||(g[1]=d("span",{class:"ml-auto opacity-50"},"Tab/Enter to select",-1))]),d("div",fo,[(h(!0),_(K,null,ue(i.value,(b,A)=>(h(),_("button",{key:b.name,class:ee(["w-full px-3 py-2 text-left flex items-center gap-2 text-sm transition-colors",A===r.value?"bg-green-500/20 text-green-600 dark:text-green-400":"hover:bg-neutral-100 dark:hover:bg-neutral-800"]),type:"button",onClick:$=>f(b),onMouseenter:$=>r.value=A},[v(S,{class:"opacity-50 text-green-500",icon:"carbon:terminal"}),d("div",mo,[d("div",go," /"+N(b.name),1),b.description?(h(),_("div",vo,N(b.description),1)):R("",!0)])],42,po))),128))])])])):R("",!0)]),_:1})}}}),_o=Object.assign(at(yo,[["__scopeId","data-v-58ca4e57"]]),{__name:"CommandsAutocomplete"}),bo={key:0,class:"fixed inset-0 z-50 flex items-center justify-center"},xo={class:"relative z-10 w-full max-w-md mx-4 p-6 rounded-xl n-bg-base border border-neutral-200 dark:border-neutral-700 shadow-2xl"},wo={class:"text-center mb-6"},ko={class:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-green-500/20 to-blue-500/20 flex items-center justify-center"},Co={class:"space-y-4"},So={key:0,class:"mt-2 text-sm text-red-500"},Ao={class:"flex gap-3"},Eo=oe({__name:"NicknameModal",props:{visible:{type:Boolean},error:{}},emits:["submit","cancel"],setup(n,{emit:e}){const t=e,s=T(""),o=T("");function r(){const i=s.value.trim();if(!i){o.value="Please enter a nickname";return}if(i.length<2){o.value="Nickname must be at least 2 characters";return}if(i.length>20){o.value="Nickname must be 20 characters or less";return}o.value="",t("submit",i)}function a(i){i.key==="Enter"?r():i.key==="Escape"&&t("cancel")}return(i,l)=>{const m=se,f=rt;return h(),F($n,{to:"body"},[n.visible?(h(),_("div",bo,[d("div",{class:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:l[0]||(l[0]=u=>t("cancel"))}),d("div",xo,[d("div",wo,[d("div",ko,[v(m,{class:"text-3xl text-green-500",icon:"carbon:user-avatar"})]),l[3]||(l[3]=d("h2",{class:"text-xl font-bold mb-2"}," Join Collaborative Session ",-1)),l[4]||(l[4]=d("p",{class:"text-sm text-neutral-500 dark:text-neutral-400"}," Enter a nickname to identify yourself in the chat ",-1))]),d("div",Co,[d("div",null,[l[5]||(l[5]=d("label",{class:"block text-sm font-medium mb-2",for:"nickname"}," Nickname ",-1)),St(d("input",{id:"nickname","onUpdate:modelValue":l[1]||(l[1]=u=>s.value=u),class:ee([{"border-red-500 focus:ring-red-500":o.value||n.error},"w-full px-4 py-3 rounded-lg n-bg-base border border-neutral-200 dark:border-neutral-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent"]),autofocus:"",placeholder:"Your nickname",type:"text",onKeydown:a},null,34),[[At,s.value]]),o.value||n.error?(h(),_("p",So,N(o.value||n.error),1)):R("",!0)]),d("div",Ao,[v(f,{class:"flex-1",n:"gray",onClick:l[2]||(l[2]=u=>t("cancel"))},{default:q(()=>[...l[6]||(l[6]=[M(" Cancel ",-1)])]),_:1}),v(f,{class:"flex-1",n:"green",onClick:r},{default:q(()=>[v(m,{class:"mr-1",icon:"carbon:checkmark"}),l[7]||(l[7]=M(" Join ",-1))]),_:1})])])])])):R("",!0)])}}}),Ro=Object.assign(Eo,{__name:"NicknameModal"}),ne=Object.create(null);ne.open="0";ne.close="1";ne.ping="2";ne.pong="3";ne.message="4";ne.upgrade="5";ne.noop="6";const Ie=Object.create(null);Object.keys(ne).forEach(n=>{Ie[ne[n]]=n});const Ze={type:"error",data:"parser error"},Ot=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Bt=typeof ArrayBuffer=="function",Nt=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,ct=({type:n,data:e},t,s)=>Ot&&e instanceof Blob?t?s(e):xt(e,s):Bt&&(e instanceof ArrayBuffer||Nt(e))?t?s(e):xt(new Blob([e]),s):s(ne[n]+(e||"")),xt=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function wt(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Je;function To(n,e){if(Ot&&n.data instanceof Blob)return n.data.arrayBuffer().then(wt).then(e);if(Bt&&(n.data instanceof ArrayBuffer||Nt(n.data)))return e(wt(n.data));ct(n,!1,t=>{Je||(Je=new TextEncoder),e(Je.encode(t))})}const kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<kt.length;n++)Ae[kt.charCodeAt(n)]=n;const Oo=n=>{let e=n.length*.75,t=n.length,s,o=0,r,a,i,l;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const m=new ArrayBuffer(e),f=new Uint8Array(m);for(s=0;s<t;s+=4)r=Ae[n.charCodeAt(s)],a=Ae[n.charCodeAt(s+1)],i=Ae[n.charCodeAt(s+2)],l=Ae[n.charCodeAt(s+3)],f[o++]=r<<2|a>>4,f[o++]=(a&15)<<4|i>>2,f[o++]=(i&3)<<6|l&63;return m},Bo=typeof ArrayBuffer=="function",lt=(n,e)=>{if(typeof n!="string")return{type:"message",data:$t(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:No(n.substring(1),e)}:Ie[t]?n.length>1?{type:Ie[t],data:n.substring(1)}:{type:Ie[t]}:Ze},No=(n,e)=>{if(Bo){const t=Oo(n);return $t(t,e)}else return{base64:!0,data:n}},$t=(n,e)=>e==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,It="",$o=(n,e)=>{const t=n.length,s=new Array(t);let o=0;n.forEach((r,a)=>{ct(r,!1,i=>{s[a]=i,++o===t&&e(s.join(It))})})},Io=(n,e)=>{const t=n.split(It),s=[];for(let o=0;o<t.length;o++){const r=lt(t[o],e);if(s.push(r),r.type==="error")break}return s};function Lo(){return new TransformStream({transform(n,e){To(n,t=>{const s=t.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const r=new DataView(o.buffer);r.setUint8(0,126),r.setUint16(1,s)}else{o=new Uint8Array(9);const r=new DataView(o.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(t)})}})}let Ge;function Oe(n){return n.reduce((e,t)=>e+t.length,0)}function Be(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let o=0;o<e;o++)t[o]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),t}function Po(n,e){Ge||(Ge=new TextDecoder);const t=[];let s=0,o=-1,r=!1;return new TransformStream({transform(a,i){for(t.push(a);;){if(s===0){if(Oe(t)<1)break;const l=Be(t,1);r=(l[0]&128)===128,o=l[0]&127,o<126?s=3:o===126?s=1:s=2}else if(s===1){if(Oe(t)<2)break;const l=Be(t,2);o=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),s=3}else if(s===2){if(Oe(t)<8)break;const l=Be(t,8),m=new DataView(l.buffer,l.byteOffset,l.length),f=m.getUint32(0);if(f>Math.pow(2,21)-1){i.enqueue(Ze);break}o=f*Math.pow(2,32)+m.getUint32(4),s=3}else{if(Oe(t)<o)break;const l=Be(t,o);i.enqueue(lt(r?l:Ge.decode(l),e)),s=0}if(o===0||o>n){i.enqueue(Ze);break}}}})}const Lt=4;function H(n){if(n)return Do(n)}function Do(n){for(var e in H.prototype)n[e]=H.prototype[e];return n}H.prototype.on=H.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};H.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};H.prototype.off=H.prototype.removeListener=H.prototype.removeAllListeners=H.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,o=0;o<t.length;o++)if(s=t[o],s===e||s.fn===e){t.splice(o,1);break}return t.length===0&&delete this._callbacks["$"+n],this};H.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,o=t.length;s<o;++s)t[s].apply(this,e)}return this};H.prototype.emitReserved=H.prototype.emit;H.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};H.prototype.hasListeners=function(n){return!!this.listeners(n).length};const qe=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),W=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Uo="arraybuffer";function Pt(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const Mo=W.setTimeout,qo=W.clearTimeout;function Ve(n,e){e.useNativeTimers?(n.setTimeoutFn=Mo.bind(W),n.clearTimeoutFn=qo.bind(W)):(n.setTimeoutFn=W.setTimeout.bind(W),n.clearTimeoutFn=W.clearTimeout.bind(W))}const Vo=1.33;function Ho(n){return typeof n=="string"?Fo(n):Math.ceil((n.byteLength||n.size)*Vo)}function Fo(n){let e=0,t=0;for(let s=0,o=n.length;s<o;s++)e=n.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function Dt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function jo(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function Ko(n){let e={},t=n.split("&");for(let s=0,o=t.length;s<o;s++){let r=t[s].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class Wo extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class ut extends H{constructor(e){super(),this.writable=!1,Ve(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new Wo(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=lt(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=jo(e);return t.length?"?"+t:""}}class zo extends ut{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Io(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,$o(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Dt()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let Ut=!1;try{Ut=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Yo=Ut;function Jo(){}class Go extends zo{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(o,r)=>{this.onError("xhr post error",o,r)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class te extends H{constructor(e,t,s){super(),this.createRequest=e,Ve(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=Pt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=te.requestsCount++,te.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Jo,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete te.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}te.requestsCount=0;te.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ct);else if(typeof addEventListener=="function"){const n="onpagehide"in W?"pagehide":"unload";addEventListener(n,Ct,!1)}}function Ct(){for(let n in te.requests)te.requests.hasOwnProperty(n)&&te.requests[n].abort()}const Xo=(function(){const n=Mt({xdomain:!1});return n&&n.responseType!==null})();class Qo extends Go{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Xo&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new te(Mt,this.uri(),e)}}function Mt(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Yo))return new XMLHttpRequest}catch{}if(!e)try{return new W[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const qt=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Zo extends ut{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=qt?{}:Pt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],o=t===e.length-1;ct(s,this.supportsBinary,r=>{try{this.doWrite(s,r)}catch{}o&&qe(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Dt()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Xe=W.WebSocket||W.MozWebSocket;class er extends Zo{createSocket(e,t,s){return qt?new Xe(e,t,s):t?new Xe(e,t):new Xe(e)}doWrite(e,t){this.ws.send(t)}}class tr extends ut{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=Po(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),o=Lo();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const r=()=>{s.read().then(({done:i,value:l})=>{i||(this.onPacket(l),r())}).catch(i=>{})};r();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],o=t===e.length-1;this._writer.write(s).then(()=>{o&&qe(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const nr={websocket:er,webtransport:tr,polling:Qo},sr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,or=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function et(n){if(n.length>8e3)throw"URI too long";const e=n,t=n.indexOf("["),s=n.indexOf("]");t!=-1&&s!=-1&&(n=n.substring(0,t)+n.substring(t,s).replace(/:/g,";")+n.substring(s,n.length));let o=sr.exec(n||""),r={},a=14;for(;a--;)r[or[a]]=o[a]||"";return t!=-1&&s!=-1&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=rr(r,r.path),r.queryKey=ir(r,r.query),r}function rr(n,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function ir(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,r){o&&(t[o]=r)}),t}const tt=typeof addEventListener=="function"&&typeof removeEventListener=="function",Le=[];tt&&addEventListener("offline",()=>{Le.forEach(n=>n())},!1);class le extends H{constructor(e,t){if(super(),this.binaryType=Uo,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=et(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=et(t.host).host);Ve(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const o=s.prototype.name;this.transports.push(o),this._transportsByName[o]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ko(this.opts.query)),tt&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Le.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Lt,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&le.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",le.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const o=this.writeBuffer[s].data;if(o&&(t+=Ho(o)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,qe(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,o){if(typeof t=="function"&&(o=t,t=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const r={type:e,data:t,options:s};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(le.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),tt&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Le.indexOf(this._offlineEventListener);s!==-1&&Le.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}le.protocol=Lt;class ar extends le{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;le.priorWebsocketSuccess=!1;const o=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",u=>{if(!s)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;le.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=t.name,this.emitReserved("upgradeError",g)}}))};function r(){s||(s=!0,f(),t.close(),t=null)}const a=u=>{const g=new Error("probe error: "+u);g.transport=t.name,r(),this.emitReserved("upgradeError",g)};function i(){a("transport closed")}function l(){a("socket closed")}function m(u){t&&u.name!==t.name&&r()}const f=()=>{t.removeListener("open",o),t.removeListener("error",a),t.removeListener("close",i),this.off("close",l),this.off("upgrading",m)};t.once("open",o),t.once("error",a),t.once("close",i),this.once("close",l),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let cr=class extends ar{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(o=>nr[o]).filter(o=>!!o)),super(e,s)}};function lr(n,e="",t){let s=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),s=et(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const r=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+r+":"+s.port+e,s.href=s.protocol+"://"+r+(t&&t.port===s.port?"":":"+s.port),s}const ur=typeof ArrayBuffer=="function",dr=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Vt=Object.prototype.toString,hr=typeof Blob=="function"||typeof Blob<"u"&&Vt.call(Blob)==="[object BlobConstructor]",fr=typeof File=="function"||typeof File<"u"&&Vt.call(File)==="[object FileConstructor]";function dt(n){return ur&&(n instanceof ArrayBuffer||dr(n))||hr&&n instanceof Blob||fr&&n instanceof File}function Pe(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(Pe(n[t]))return!0;return!1}if(dt(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Pe(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&Pe(n[t]))return!0;return!1}function pr(n){const e=[],t=n.data,s=n;return s.data=nt(t,e),s.attachments=e.length,{packet:s,buffers:e}}function nt(n,e){if(!n)return n;if(dt(n)){const t={_placeholder:!0,num:e.length};return e.push(n),t}else if(Array.isArray(n)){const t=new Array(n.length);for(let s=0;s<n.length;s++)t[s]=nt(n[s],e);return t}else if(typeof n=="object"&&!(n instanceof Date)){const t={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=nt(n[s],e));return t}return n}function mr(n,e){return n.data=st(n.data,e),delete n.attachments,n}function st(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=st(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=st(n[t],e));return n}const Ht=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gr=5;var B;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));class vr{constructor(e){this.replacer=e}encode(e){return(e.type===B.EVENT||e.type===B.ACK)&&Pe(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=pr(e),s=this.encodeAsString(t.packet),o=t.buffers;return o.unshift(s),o}}class ht extends H{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===B.BINARY_EVENT;s||t.type===B.BINARY_ACK?(t.type=s?B.EVENT:B.ACK,this.reconstructor=new yr(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(dt(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(B[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===B.BINARY_EVENT||s.type===B.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const a=e.substring(r,t);if(a!=Number(a)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(a)}if(e.charAt(t+1)==="/"){const r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(r,t)}else s.nsp="/";const o=e.charAt(t+1);if(o!==""&&Number(o)==o){const r=t+1;for(;++t;){const a=e.charAt(t);if(a==null||Number(a)!=a){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(ht.isPayloadValid(s.type,r))s.data=r;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case B.CONNECT:return Me(t);case B.DISCONNECT:return t===void 0;case B.CONNECT_ERROR:return typeof t=="string"||Me(t);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Ht.indexOf(t[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yr{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=mr(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function _r(n){return typeof n=="string"}const br=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function xr(n){return n===void 0||br(n)}function Me(n){return Object.prototype.toString.call(n)==="[object Object]"}function wr(n,e){switch(n){case B.CONNECT:return e===void 0||Me(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Ht.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||Me(e);default:return!1}}function kr(n){return _r(n.nsp)&&xr(n.id)&&wr(n.type,n.data)}const Cr=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ht,Encoder:vr,get PacketType(){return B},isPacketValid:kr,protocol:gr},Symbol.toStringTag,{value:"Module"}));function G(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const Sr=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ft extends H{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[G(e,"open",this.onopen.bind(this)),G(e,"packet",this.onpacket.bind(this)),G(e,"error",this.onerror.bind(this)),G(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,o,r;if(Sr.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const a={type:B.EVENT,data:t};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,u=t.pop();this._registerAckCallback(f,u),a.id=f}const i=(o=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||o===void 0?void 0:o.writable,l=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!i||(l?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var s;const o=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(o===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let i=0;i<this.sendBuffer.length;i++)this.sendBuffer[i].id===e&&this.sendBuffer.splice(i,1);t.call(this,new Error("operation has timed out"))},o),a=(...i)=>{this.io.clearTimeoutFn(r),t.apply(this,i)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...t){return new Promise((s,o)=>{const r=(a,i)=>a?o(a):s(i);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...r)=>(this._queue[0],o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(o)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...o){s||(s=!0,t.packet({type:B.ACK,id:e,data:o}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function ge(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}ge.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=(Math.floor(e*10)&1)==0?n-t:n+t}return Math.min(n,this.max)|0};ge.prototype.reset=function(){this.attempts=0};ge.prototype.setMin=function(n){this.ms=n};ge.prototype.setMax=function(n){this.max=n};ge.prototype.setJitter=function(n){this.jitter=n};class ot extends H{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,Ve(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new ge({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const o=t.parser||Cr;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new cr(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=G(t,"open",function(){s.onopen(),e&&e()}),r=i=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",i),e?e(i):this.maybeReconnectOnOpen()},a=G(t,"error",r);if(this._timeout!==!1){const i=this._timeout,l=this.setTimeoutFn(()=>{o(),r(new Error("timeout")),t.close()},i);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(G(e,"ping",this.onping.bind(this)),G(e,"data",this.ondata.bind(this)),G(e,"error",this.onerror.bind(this)),G(e,"close",this.onclose.bind(this)),G(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){qe(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Ft(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t)if(this.nsps[s].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Se={};function De(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=lr(n,e.path||"/socket.io"),s=t.source,o=t.id,r=t.path,a=Se[o]&&r in Se[o].nsps,i=e.forceNew||e["force new connection"]||e.multiplex===!1||a;let l;return i?l=new ot(s,e):(Se[o]||(Se[o]=new ot(s,e)),l=Se[o]),t.query&&!e.query&&(e.query=t.queryKey),l.socket(t.path,e)}Object.assign(De,{Manager:ot,Socket:Ft,io:De,connect:De});const Ar="/__claude_devtools_socket",Qe="claude-devtools-user-id",me="claude-devtools-nickname",Ne="oro_share",$e="oro_share_nickname";function Er(n){const{getSocketUrl:e,log:t=()=>{},onDocsReceived:s,onCommandsReceived:o,getCurrentUserId:r,onDisconnected:a}=n,i=T(null),l=T([]),m=T([]),f=T(null),u=T(!1),g=T(!1),S=T(!1),b=T(!1),A=T(new Map),$=P(()=>u.value?S.value?"Processing...":"Ready":"Disconnected"),x=P(()=>u.value?S.value?"blue":"green":"red");function k(){return Math.random().toString(36).substring(2,9)}function I(c,p,C=!1){const O={id:k(),role:c,content:p,timestamp:new Date,streaming:C};return l.value.push(O),O}function D(){const c=e();t("Connecting to socket at",c),i.value=De(c,{path:Ar,transports:["websocket","polling"],reconnection:!0,reconnectionAttempts:5}),V()}function V(){i.value&&(i.value.on("connect",()=>{t("Connected to socket"),u.value=!0,i.value?.emit("docs:list"),i.value?.emit("commands:list")}),i.value.on("disconnect",()=>{t("Disconnected from socket"),u.value=!1,g.value=!1,S.value=!1,a?.()}),i.value.on("session:status",c=>{t("Session status:",c),g.value=c.active,S.value=c.processing}),i.value.on("history:loaded",c=>{t("History loaded:",c.id,c.messages.length,"messages"),f.value=c.id,l.value=c.messages.map(p=>({...p,timestamp:new Date(p.timestamp)}))}),i.value.on("history:list",c=>{t("Conversations list:",c.length),m.value=c}),i.value.on("history:switched",c=>{t("Switched to conversation:",c.id),f.value=c.id,l.value=c.messages.map(p=>({...p,timestamp:new Date(p.timestamp)})),b.value=!1}),i.value.on("history:deleted",c=>{t("Conversation deleted:",c)}),i.value.on("docs:list",c=>{t("Docs list received:",c.length),s?.(c)}),i.value.on("commands:list",c=>{t("Commands list received:",c.length),o?.(c)}),i.value.on("stream:message_start",c=>{t("Message start:",c.id),A.value.clear();const p=l.value[l.value.length-1];(!p||p.role!=="assistant"||!p.streaming)&&I("assistant","",!0);const C=l.value.findLast(O=>O.role==="assistant"&&O.streaming);C&&!C.contentBlocks&&(C.contentBlocks=[])}),i.value.on("stream:tool_use",c=>{t("Tool use:",c.name);const p={type:"tool_use",id:c.id,name:c.name,input:c.input};A.value.set(c.id,p);const C=l.value.findLast(O=>O.role==="assistant"&&O.streaming)||l.value.findLast(O=>O.role==="assistant");C&&(C.contentBlocks||(C.contentBlocks=[]),C.contentBlocks.push(p))}),i.value.on("stream:tool_result",c=>{t("Tool result:",c.tool_use_id,c.is_error?"ERROR":"OK");const p={type:"tool_result",tool_use_id:c.tool_use_id,content:c.content,is_error:c.is_error},C=l.value.findLast(O=>O.role==="assistant"&&O.streaming)||l.value.findLast(O=>O.role==="assistant");C&&(C.contentBlocks||(C.contentBlocks=[]),C.contentBlocks.push(p))}),i.value.on("stream:text_delta",c=>{const p=l.value.findLast(C=>C.role==="assistant"&&C.streaming);if(p){p.content+=c.text,p.contentBlocks||(p.contentBlocks=[]);const C=p.contentBlocks[p.contentBlocks.length-1];if(C&&C.type==="text")C.text=(C.text||"")+c.text;else{const O=p.contentBlocks.length>0?`
|
|
3
|
+
`:"";p.contentBlocks.push({type:"text",text:O+c.text})}}}),i.value.on("stream:message_complete",c=>{t("Message complete:",c.id);const p=l.value.findLast(C=>C.role==="assistant"&&C.streaming)||l.value.findLast(C=>C.role==="assistant");p&&(p.streaming=!1,p.content=c.content,p.contentBlocks=c.contentBlocks,p.model=c.model),A.value.clear()}),i.value.on("stream:stopped",c=>{t("Generation stopped:",c.message),S.value=!1;const p=l.value.findLast(C=>C.role==="assistant"&&C.streaming);p&&(p.streaming=!1,c.partialContent&&(p.content=c.partialContent+`
|
|
4
|
+
|
|
5
|
+
*[Generation stopped by user]*`))}),i.value.on("stream:result",c=>{t("Result:",c.subtype,"cost:",c.cost_usd,"duration:",c.duration_ms)}),i.value.on("output:chunk",c=>{t("Output chunk:",c.length);const p=l.value.findLast(C=>C.role==="assistant"&&C.streaming);p&&(p.content+=c)}),i.value.on("output:complete",()=>{t("Output complete");const c=l.value.findLast(p=>p.role==="assistant");c&&(c.streaming=!1)}),i.value.on("output:error",c=>{t("Output error:",c),I("system",`Error: ${c}`)}),i.value.on("session:error",c=>{t("Session error:",c),I("system",`Session error: ${c}`)}),i.value.on("session:closed",c=>{t("Session closed:",c),I("system",`Session ended (exit code: ${c.exitCode})`)}),i.value.on("stream:critical_file_warning",c=>{t("Critical file warning:",c.file_name),I("system",c.message)}),i.value.on("stream:system_message",c=>{t("System message:",c.type,c.message),I("system",c.message)}),i.value.on("stream:user_message",c=>{const p=r?.();if(t("User message from:",c.senderId,"current:",p,"nickname:",c.senderNickname),p&&c.senderId===p||l.value.find(X=>X.id===c.id))return;const O=l.value.findIndex(X=>X.role==="assistant"&&X.streaming),_e={...c,timestamp:new Date(c.timestamp)};O>=0?l.value.splice(O,0,_e):(l.value.push(_e),I("assistant","",!0))}))}function j(){i.value&&(i.value.emit("session:reset"),l.value=[],b.value=!1)}function re(c,p,C,O){if(!(c.trim().length>0||O&&O.length>0)||S.value||!u.value)return!1;const X=I("user",c);if(p&&(X.senderId=p,X.senderNickname=C),O&&O.length>0&&(X.attachments=O.map(ce=>({type:"image",path:`pending:${ce.id}`,filename:ce.filename,mimeType:ce.mimeType}))),I("assistant","",!0),i.value){const ce={message:c};p&&(ce.senderId=p),O&&O.length>0&&(ce.attachments=O),i.value.emit("message:send",ce)}return!0}function ie(){return!S.value||!u.value?!1:(t("Stopping generation"),i.value&&i.value.emit("message:stop"),!0)}function z(){b.value=!b.value,b.value&&i.value&&i.value.emit("history:list")}function Y(c){i.value&&i.value.emit("history:switch",c)}function ae(c){i.value&&i.value.emit("history:delete",c)}function ve(){i.value&&i.value.disconnect()}function ye(c,p){if(c)return c.find(C=>C.type==="tool_result"&&C.tool_use_id===p)}return{socket:i,messages:l,conversations:m,activeConversationId:f,isConnected:u,isSessionActive:g,isProcessing:S,isHistoryOpen:b,statusText:$,statusColor:x,connectSocket:D,disconnect:ve,newChat:j,sendMessage:re,stopGeneration:ie,addMessage:I,toggleHistory:z,selectConversation:Y,deleteConversation:ae,findToolResult:ye}}function Rr(n,e={}){const{log:t=console.log,onDocsReceived:s,onCommandsReceived:o,getCurrentUserId:r}=e;function a(){const l=n();return l.isActive&&l.origin?(t("Using tunnel URL:",l.origin),l.origin):window.location.origin}const i=Er({getSocketUrl:a,log:t,onDocsReceived:s,onCommandsReceived:o,getCurrentUserId:r,onDisconnected:()=>{i.addMessage("system","Disconnected from server")}});return{socket:i.socket,messages:i.messages,conversations:i.conversations,activeConversationId:i.activeConversationId,isConnected:i.isConnected,isSessionActive:i.isSessionActive,isProcessing:i.isProcessing,isHistoryOpen:i.isHistoryOpen,statusText:i.statusText,statusColor:i.statusColor,connectSocket:i.connectSocket,disconnect:i.disconnect,newChat:i.newChat,sendMessage:i.sendMessage,stopGeneration:i.stopGeneration,addMessage:i.addMessage,toggleHistory:i.toggleHistory,selectConversation:i.selectConversation,deleteConversation:i.deleteConversation,findToolResult:i.findToolResult}}function Tr(){return typeof window>"u"?null:{width:window.innerWidth,height:window.innerHeight}}function Or(){return typeof window>"u"?null:{path:window.location.pathname,fullPath:window.location.pathname+window.location.search,query:window.location.search?Object.fromEntries(new URLSearchParams(window.location.search)):void 0}}function Br(n){let e="Unknown";n.includes("Firefox/")?e="Firefox":n.includes("Edg/")?e="Edge":n.includes("Chrome/")?e="Chrome":n.includes("Safari/")&&!n.includes("Chrome")&&(e="Safari");let t="Unknown";return n.includes("Windows")?t="Windows":n.includes("Mac OS")?t="macOS":n.includes("Linux")?t="Linux":n.includes("Android")?t="Android":(n.includes("iPhone")||n.includes("iPad"))&&(t="iOS"),{browser:e,os:t}}function Nr(n={}){const{getViewport:e=Tr,getRoute:t=Or,getComponents:s=()=>[],log:o=()=>{}}=n,r=T([{id:"viewport",label:"Viewport",icon:"carbon:fit-to-screen",active:!1},{id:"user-agent",label:"User Agent",icon:"carbon:application-web",active:!1},{id:"routing",label:"Routing",icon:"carbon:location",active:!1}]);function a(u){const g=r.value.find(S=>S.id===u);g&&(g.active=!g.active)}function i(){const u={};let g=!1;if(r.value.find(b=>b.id==="viewport")?.active){const b=e();b&&(u.viewport=b,g=!0)}if(r.value.find(b=>b.id==="user-agent")?.active&&typeof navigator<"u"&&(u.userAgent=navigator.userAgent,g=!0),r.value.find(b=>b.id==="routing")?.active){const b=t();if(b){const A=b.query&&Object.keys(b.query).length>0?Object.fromEntries(Object.entries(b.query).filter(([x,k])=>k!==void 0).map(([x,k])=>[x,Array.isArray(k)?k.filter(Boolean).join(","):k||""])):void 0,$=b.params&&Object.keys(b.params).length>0?Object.fromEntries(Object.entries(b.params).map(([x,k])=>[x,Array.isArray(k)?k.join("/"):k||""])):void 0;u.routing={path:b.path,fullPath:b.fullPath,query:A,params:$,name:b.name,pageComponent:b.pageComponent},g=!0}}const S=s();return S.length>0&&(u.components=S,g=!0),g?u:null}function l(u){const g=[];if(u.viewport&&g.push(`viewport: ${u.viewport.width}x${u.viewport.height}`),u.userAgent){const{browser:S,os:b}=Br(u.userAgent);g.push(`browser: ${S} on ${b}`)}if(u.routing){if(g.push(`route: ${u.routing.path}`),u.routing.query&&Object.keys(u.routing.query).length>0){const S=Object.entries(u.routing.query).map(([b,A])=>`${b}=${Array.isArray(A)?A.join(","):A}`).join("&");g.push(`query: ?${S}`)}if(u.routing.params&&Object.keys(u.routing.params).length>0){const S=Object.entries(u.routing.params).map(([b,A])=>`${b}=${A}`).join(", ");g.push(`params: ${S}`)}u.routing.pageComponent&&g.push(`page: ${u.routing.pageComponent}`)}return u.components&&u.components.length>0&&g.push(`components: ${u.components.join(", ")}`),`[context]
|
|
6
|
+
${g.join(`
|
|
7
|
+
`)}
|
|
8
|
+
[/context]`}function m(u){const g=/^\[context\]\n([\s\S]*?)\n\[\/context\]\n?/,S=u.match(g);if(!S||!S[1])return{context:null,body:u};const b=S[1];let A=u.slice(S[0].length);A=A.replace(/^(@\S+\s+)+/g,"").trim();try{const $={},x=b.match(/viewport:\s*(\d+)x(\d+)/);x&&x[1]&&x[2]&&($.viewport={width:Number.parseInt(x[1]),height:Number.parseInt(x[2])});const k=b.match(/browser:\s*(\w+)\s+on\s+(\w+)/);k&&k[1]&&k[2]&&($.userAgent=`${k[1]} on ${k[2]}`);const I=b.match(/route:\s*(\S+)/);if(I&&I[1]){$.routing={path:I[1]};const V=b.match(/query:\s*\?(.+)/);if(V&&V[1]&&$.routing){$.routing.query={};const ie=V[1].split("&");for(const z of ie){const[Y,ae]=z.split("=");Y&&$.routing.query&&($.routing.query[Y]=ae||"")}}const j=b.match(/params:\s*(.+)/);if(j&&j[1]&&$.routing){$.routing.params={};const ie=j[1].split(",").map(z=>z.trim());for(const z of ie){const[Y,ae]=z.split("=");Y&&$.routing.params&&($.routing.params[Y]=ae||"")}}const re=b.match(/page:\s*(\S+)/);re&&re[1]&&$.routing&&($.routing.pageComponent=re[1])}const D=b.match(/components:\s*(.+)/);return D&&D[1]&&($.components=D[1].split(",").map(V=>V.trim())),{context:Object.keys($).length>0?$:null,body:A}}catch{return{context:null,body:u}}}function f(){const u=i();return u?l(u):null}return{contextChips:r,toggleContextChip:a,collectContext:i,generateContextBlock:l,parseMessageContext:m,collectContextBlock:f}}function $r(n,e){function t(){const r=n.value?.host?.nuxt?.vueApp?.config?.globalProperties?.$route;if(!r)return null;const l=r.matched?.[r.matched.length-1]?.components?.default?.__file;return{path:r.path,fullPath:r.fullPath,query:r.query,params:r.params,name:r.name?.toString(),pageComponent:l}}function s(){try{const r=n.value?.host;if(r){const i=r.nuxt?.vueApp?.config?.globalProperties?.window;if(i?.innerWidth)return{width:i.innerWidth,height:i.innerHeight}}if(window.top&&window.top!==window){const a=window.top.innerWidth;return{width:window.top.innerWidth,height:window.top.innerHeight}}if(window.parent?.parent&&window.parent.parent!==window){const a=window.parent.parent.innerWidth;return{width:window.parent.parent.innerWidth,height:window.parent.parent.innerHeight}}if(window.parent&&window.parent!==window){const a=window.parent.innerWidth;return{width:window.parent.innerWidth,height:window.parent.innerHeight}}}catch{}return null}function o(){return e.value.map(r=>r.filePath)}return Nr({getViewport:s,getRoute:t,getComponents:o})}function Ir(){const n=T(!1),e=T(null),t=T(!1),s=T(!1);if(typeof window<"u"){const l=window.SpeechRecognition||window.webkitSpeechRecognition;t.value=!!l}function o(l){const m=window.SpeechRecognition||window.webkitSpeechRecognition;if(!m){t.value=!1;return}t.value=!0;const f=new m;f.continuous=!0,f.interimResults=!1,f.lang=navigator.language||"en-US";let u=0;f.onresult=g=>{for(let S=g.resultIndex;S<g.results.length;S++){const b=g.results[S];if(b.isFinal&&S>=u){const A=b[0].transcript;A.trim()&&l(A),u=S+1}}},f.onerror=g=>{g.error==="no-speech"||g.error==="aborted"||(console.error("Speech recognition error:",g.error),n.value=!1)},f.onend=()=>{n.value&&!s.value?setTimeout(()=>{if(n.value&&!s.value&&e.value){u=0;try{e.value.start()}catch{n.value=!1}}},100):n.value=!1},f.onstart=()=>{u=0},e.value=f}function r(l){if(e.value||o(l),!e.value){alert("Speech recognition is not supported in this browser. Try Chrome or Edge.");return}if(n.value)s.value=!0,e.value.stop(),n.value=!1;else{s.value=!1;try{e.value.start(),n.value=!0}catch(m){console.error("Failed to start speech recognition:",m)}}}function a(){s.value=!0,n.value&&e.value&&(e.value.stop(),n.value=!1)}function i(){s.value=!0,e.value&&n.value&&e.value.stop()}return{isRecording:n,isSpeechSupported:t,initSpeechRecognition:o,toggleVoiceInput:r,stopRecording:a,cleanup:i}}function Lr(n,e){const t=T([]),s=T([]),o=T(!1),r=T(!1),a=T(0);function i(){const A=e.value;if(!A)return;a.value=A.selectionStart||0;const x=n.value.slice(0,a.value).match(/@docs\/\S*$/);o.value=!!x,o.value&&(r.value=!1)}function l(){const A=e.value;if(!A||o.value)return;a.value=A.selectionStart||0;const x=n.value.slice(0,a.value).match(/(?:^|\s)\/\S*$/);r.value=!!x}function m(A){const $=e.value;if(!$)return;const x=n.value.slice(0,a.value),k=n.value.slice(a.value);if(x.match(/@docs\/\S*$/)){const D=x.lastIndexOf("@docs/"),V=x.slice(0,D)+`@docs/${A}`+k;n.value=V,Ee(()=>{const j=D+`@docs/${A}`.length;$.setSelectionRange(j,j),$.focus()})}o.value=!1}function f(A){const $=e.value;if(!$)return;const x=n.value.slice(0,a.value),k=n.value.slice(a.value),I=x.match(/(?:^|\s)(\/\S*)$/);if(I&&I[1]){const D=x.length-I[1].length,V=x.slice(0,D)+`/${A} `+k;n.value=V,Ee(()=>{const j=D+`/${A} `.length;$.setSelectionRange(j,j),$.focus()})}r.value=!1}function u(){o.value=!1}function g(){r.value=!1}function S(A){t.value=A}function b(A){s.value=A}return{docs:t,commands:s,showDocsAutocomplete:o,showCommandsAutocomplete:r,cursorPosition:a,checkDocsAutocomplete:i,checkCommandsAutocomplete:l,handleDocsSelect:m,handleCommandSelect:f,closeDocsAutocomplete:u,closeCommandsAutocomplete:g,setDocs:S,setCommands:b}}function Pr(n,e){const t=T([]);function s(){if(!n.value?.host?.inspector){console.warn("[claude-client] Inspector not available");return}n.value.host.inspector.toggle()}function o(m){if(e("Component selected:",m),t.value.some(S=>S.filePath===m))return;const f=m.split("/"),g=(f[f.length-1]||m).replace(".vue","");t.value.push({filePath:m,name:g,timestamp:Date.now()})}function r(m){t.value=t.value.filter(f=>f.filePath!==m)}function a(){t.value=[]}function i(){return window.location.pathname.includes(Mn)}function l(m){e("DevTools client connected");const f=m.host.hooks,u=f.callHook.bind(f);f.callHook=async(g,...S)=>{if(g==="host:inspector:click"&&S[0]&&i()){const b=S[0];e("Intercepted callHook:",g,b),o(b),m.host.inspector?.disable();return}return u(g,...S)},e("Monkey-patched hooks.callHook")}return{selectedComponents:t,toggleComponentPicker:s,handleComponentSelected:o,removeComponent:r,clearAllComponents:a,isClaudeTabActive:i,setupInspectorHook:l}}function Dr(n){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(n)}function Ur(){return typeof window>"u"?"":window.location.origin}function Mr(n={}){const{getUrlParam:e=Dr,getBaseUrl:t=Ur,log:s=()=>{}}=n,o=T(null),r=T(null),a=T([]),i=T(!1),l=T(null),m=P(()=>a.value.length>1),f=T(!1),u=T(!1),g=T(!1);function S(){return Math.random().toString(36).substring(2,10)}function b(){return e(Ne)}function A(){return e($e)}function $(){if(!(typeof window>"u")&&(window.location.search.includes(Ne)||window.location.search.includes($e))){const c=new URL(window.location.href);c.searchParams.delete(Ne),c.searchParams.delete($e),window.history.replaceState({},"",c.toString())}}function x(){if(typeof window>"u")return;const c=b(),p=A();if(s("initShare",{urlUserId:c,urlNickname:p}),c)o.value=c,f.value=!0,localStorage.setItem(Qe,c);else{const C=localStorage.getItem(Qe);if(C)o.value=C;else{const O=S();o.value=O,localStorage.setItem(Qe,O)}}if(p)r.value=p,localStorage.setItem(me,p),g.value=!0;else{const C=localStorage.getItem(me);C&&C.trim()&&(r.value=C)}$()}function k(c=!1){if(typeof window>"u")return"";const p=S(),C=t(),O=new URL(C);return O.searchParams.set(Ne,p),c&&r.value&&O.searchParams.set($e,r.value),O.toString()}function I(c){r.value=c,l.value=null,typeof window<"u"&&localStorage.setItem(me,c)}function D(){return f.value&&!r.value&&!g.value}function V(){return u.value&&!r.value}function j(){return!r.value}function re(c){c&&c.emit("share:is_active")}function ie(c){!c||!o.value||!r.value||c.emit("share:sync",{userId:o.value,nickname:r.value})}function z(c){!c||!o.value||!r.value||c.emit("share:register",{userId:o.value,nickname:r.value})}function Y(c){c.on("share:users",p=>{a.value=p,u.value=p.length>0}),c.on("share:is_active",p=>{u.value=p.active}),c.on("share:user_joined",p=>{const C=a.value.findIndex(O=>O.id===p.id);C>=0?a.value[C]=p:a.value.push(p)}),c.on("share:registered",p=>{r.value=p.nickname,l.value=null,i.value=!1,typeof window<"u"&&localStorage.setItem(me,p.nickname)}),c.on("share:nickname_taken",()=>{l.value="This nickname is already taken",i.value=!0}),c.on("share:synced",p=>{p.status==="nickname_conflict"?(r.value=null,typeof window<"u"&&localStorage.removeItem(me),l.value="Your nickname is already used by another user in this project",i.value=!0):p.user&&(r.value=p.user.nickname,typeof window<"u"&&localStorage.setItem(me,p.user.nickname))})}function ae(c){return a.value.find(C=>C.id===c)?.nickname||null}function ve(c){return!c||!o.value?!0:c===o.value}async function ye(c=!1){const p=k(c);try{return await navigator.clipboard.writeText(p),!0}catch{return!1}}return{userId:o,nickname:r,users:a,showNicknameModal:i,nicknameError:l,isShareMode:m,wasInvited:f,sharingActiveOnServer:u,nicknameFromUrl:g,initShare:x,createShareLink:k,setNickname:I,needsNicknameImmediate:D,needsNicknameForMessage:V,needsNicknameForShare:j,checkSharingStatus:re,syncCredentials:ie,registerUser:z,setupSocketListeners:Y,getNicknameById:ae,isOwnMessage:ve,copyShareLink:ye}}function qr(n={}){function e(s){if(typeof window>"u")return null;let o=new URLSearchParams(window.location.search),r=o.get(s);if(r)return r;const a=n.getHostRoute?.();if(a?.query?.[s]&&(r=Array.isArray(a.query[s])?a.query[s][0]:a.query[s],r))return r;if(window.parent!==window)try{if(o=new URLSearchParams(window.parent.location.search),r=o.get(s),r)return r}catch{}return null}function t(){if(typeof window>"u")return"";const s=n.getTunnelUrl?.();if(s?.isActive&&s.origin)return s.origin;if(window.parent!==window)try{return window.parent.location.origin}catch{}return window.location.origin}return Mr({getUrlParam:e,getBaseUrl:t})}const Vr={class:"relative flex flex-col h-screen n-bg-base overflow-hidden"},Hr={class:"flex flex-col h-full"},Fr={class:"flex items-center justify-between p-4"},jr={class:"flex items-center gap-3"},Kr={class:"text-xl font-bold flex items-center gap-2"},Wr={class:"flex items-center gap-2"},zr={class:"relative"},Yr={key:0,class:"px-4 pt-4"},Jr={key:1,class:"flex-1 flex items-center justify-center p-8"},Gr={class:"text-center max-w-md"},Xr={class:"relative inline-block mb-6"},Qr={class:"w-24 h-24 rounded-full bg-gradient-to-br from-orange-500/20 to-red-500/20 flex items-center justify-center"},Zr={class:"flex items-center justify-center gap-2 text-sm text-neutral-400 mb-6"},ei={class:"p-4 rounded-lg bg-neutral-100 dark:bg-neutral-800/50 text-left text-sm"},ti={class:"flex items-start gap-2 text-neutral-500 dark:text-neutral-400"},ni={key:0,class:"text-xs opacity-50 mb-1 flex items-center gap-1"},si={key:0,class:"opacity-50"},oi={key:1,class:"text-xs opacity-50 mb-1"},ri={key:0,class:"ml-1"},ii={key:1,class:"ml-2"},ai={class:"whitespace-pre-wrap font-mono text-sm"},ci={key:2,class:"whitespace-pre-wrap font-mono text-sm"},li={key:3,class:"opacity-50"},ui={class:"text-xs opacity-30 mt-1"},di={key:0,class:"flex items-center justify-center h-full opacity-50"},hi={class:"text-center"},fi={key:3,class:"p-4"},pi={class:"flex items-center justify-between gap-2 mb-2"},mi={class:"flex items-center gap-2"},gi={class:"flex gap-2 items-center"},vi={class:"flex-1 relative"},yi=["disabled"],_i={key:0,class:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 text-red-500"},bi={class:"text-xs opacity-50 mt-2 flex items-center gap-3"},xi={key:0,class:"text-green-500/70"},wi={key:1,class:"text-blue-500/70"},Ni=oe({__name:"index",setup(n){const e=Tt(),t=qn(),{log:s}=Vn("client"),o=T(null),r=T(null),a=T(""),i=T(!1),{selectedComponents:l,toggleComponentPicker:m,removeComponent:f,clearAllComponents:u,setupInspectorHook:g}=Pr(e,s),{contextChips:S,toggleContextChip:b,collectContext:A,generateContextBlock:$,parseMessageContext:x}=$r(e,l),{docs:k,commands:I,showDocsAutocomplete:D,showCommandsAutocomplete:V,cursorPosition:j,checkDocsAutocomplete:re,checkCommandsAutocomplete:ie,handleDocsSelect:z,handleCommandSelect:Y,closeDocsAutocomplete:ae,closeCommandsAutocomplete:ve,setDocs:ye,setCommands:c}=Lr(a,r),{isRecording:p,isSpeechSupported:C,initSpeechRecognition:O,toggleVoiceInput:_e,stopRecording:X,cleanup:ce}=Ir(),{userId:He,nickname:ft,users:jt,showNicknameModal:fe,isShareMode:pt,initShare:Kt,copyShareLink:Wt,setNickname:zt,needsNicknameImmediate:Yt,needsNicknameForMessage:Jt,needsNicknameForShare:Gt,checkSharingStatus:Xt,syncCredentials:Qt,registerUser:Zt,setupSocketListeners:en,isOwnMessage:be}=qr({getTunnelUrl:()=>({isActive:t.isActive.value,origin:t.origin.value}),getHostRoute:()=>e.value?.host?.nuxt?.vueApp?.config?.globalProperties?.$route}),pe=T(!1),Fe=T(""),xe=T(null),{socket:mt,messages:je,conversations:tn,activeConversationId:nn,isConnected:Q,isProcessing:we,isHistoryOpen:gt,statusText:sn,statusColor:on,connectSocket:rn,disconnect:an,newChat:vt,sendMessage:cn,stopGeneration:ln,toggleHistory:un,selectConversation:dn,deleteConversation:hn,findToolResult:fn}=Rr(()=>({isActive:t.isActive.value,origin:t.origin.value}),{log:s,onDocsReceived:ye,onCommandsReceived:c,getCurrentUserId:()=>He.value}),Ke=T(null),We=T(null);function yt(){Ee(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})}function pn(L){return(L instanceof Date?L:new Date(L)).toLocaleTimeString()}function ze(){const L=r.value;L&&(L.style.height="auto",L.style.height=Math.min(L.scrollHeight,200)+"px")}function mn(){ze(),re(),ie()}function gn(L){D.value&&Ke.value&&Ke.value.handleKeydown(L)||V.value&&We.value&&We.value.handleKeydown(L)||L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),_t())}function _t(){if(!a.value.trim()||we.value||!Q.value)return;if(Jt()){xe.value="message",fe.value=!0;return}X();const L=a.value.trim();a.value="",r.value&&(r.value.style.height="auto");const y=A();let ke=L;if(y){const U=$(y);if(ke=`${U}
|
|
9
|
+
${L}`,y.components&&y.components.length>0){const Z=y.components.map(Te=>`@${Te}`).join(" ");ke=`${U}
|
|
10
|
+
${Z}
|
|
11
|
+
|
|
12
|
+
${L}`}}cn(ke,He.value||void 0,ft.value||void 0),yt(),l.value=[]}async function bt(){if(Gt()){xe.value="share",fe.value=!0;return}await Wt()&&(pe.value=!0,setTimeout(()=>{pe.value=!1},2e3))}function vn(L){zt(L),fe.value=!1,Fe.value="",Zt(mt.value);const y=xe.value;xe.value=null,y==="share"?bt():y==="message"&&_t()}function yn(){fe.value=!1,Fe.value="",xe.value=null}function _n(){_e(L=>{a.value+=L,Ee(ze)})}function bn(){ln()}return Re(je,()=>{yt()},{deep:!0}),Rt(L=>{g(L)}),In(()=>{Kt(),rn(),O(L=>{a.value+=L,Ee(ze)}),Re(mt,L=>{L&&(en(L),Xt(L),He.value&&ft.value?Qt(L):Yt()&&(fe.value=!0))},{immediate:!0})}),Ln(()=>{an(),ce()}),(L,y)=>{const ke=es,U=se,Z=rt,Te=Et,de=Pn,xn=Dn,Ye=Un,wn=_s,kn=Es,Cn=qs,Sn=zs,An=Zs,En=co,Rn=_o,Tn=Ro;return h(),_("div",Vr,[v(ke,{"active-id":w(nn),conversations:w(tn),"is-open":w(gt),onClose:y[0]||(y[0]=E=>gt.value=!1),onDelete:w(hn),onNew:w(vt),onSelect:w(dn)},null,8,["active-id","conversations","is-open","onDelete","onNew","onSelect"]),d("div",Hr,[d("div",Fr,[d("div",jr,[v(Z,{n:"gray",title:"Chat History",onClick:w(un)},{default:q(()=>[v(U,{icon:"carbon:recently-viewed"})]),_:1},8,["onClick"]),d("h1",Kr,[v(U,{class:"text-green",icon:"carbon:machine-learning-model"}),y[4]||(y[4]=M(" Claude AI ",-1))]),v(Te,{n:w(on)},{default:q(()=>[M(N(w(sn)),1)]),_:1},8,["n"]),w(pt)?(h(),F(Te,{key:0,n:"purple",class:"flex items-center gap-1"},{default:q(()=>[v(U,{icon:"carbon:collaborate"}),M(" "+N(w(jt).length),1)]),_:1})):R("",!0)]),d("div",Wr,[v(Z,{disabled:!w(Q),n:pe.value?"green":"purple",title:pe.value?"Link copied!":"Share collaborative link",onClick:bt},{default:q(()=>[v(U,{icon:pe.value?"carbon:checkmark":"carbon:share",class:"mr-1"},null,8,["icon"]),M(" "+N(pe.value?"Copied!":"Share"),1)]),_:1},8,["disabled","n","title"]),v(Z,{disabled:!w(Q)||w(we),n:"blue",onClick:w(vt)},{default:q(()=>[v(U,{class:"mr-1",icon:"carbon:add"}),y[5]||(y[5]=M(" New Chat ",-1))]),_:1},8,["disabled","onClick"]),v(de,{to:"/docs"},{default:q(()=>[v(Z,{n:"gray"},{default:q(()=>[v(U,{class:"mr-1",icon:"carbon:document"}),y[6]||(y[6]=M(" Docs ",-1))]),_:1})]),_:1}),d("div",zr,[v(Z,{n:"gray",onClick:y[1]||(y[1]=E=>i.value=!i.value)},{default:q(()=>[v(U,{class:"mr-1",icon:"carbon:overflow-menu-horizontal"}),y[7]||(y[7]=M(" More ",-1)),v(U,{class:ee([{"rotate-180":i.value},"ml-1 transition-transform"]),icon:"carbon:chevron-down"},null,8,["class"])]),_:1}),i.value?(h(),_("div",{key:0,class:"absolute right-0 top-full mt-1 z-50 min-w-[160px] rounded-lg n-bg-base border border-neutral-200 dark:border-neutral-800 shadow-lg overflow-hidden",onClick:y[2]||(y[2]=E=>i.value=!1)},[v(de,{class:"flex items-center gap-2 px-3 py-2 hover:n-bg-active transition-colors",to:"/mcp"},{default:q(()=>[v(U,{class:"text-blue-500",icon:"carbon:plug"}),y[8]||(y[8]=M(" MCP Servers ",-1))]),_:1}),v(de,{class:"flex items-center gap-2 px-3 py-2 hover:n-bg-active transition-colors",to:"/commands"},{default:q(()=>[v(U,{class:"text-green-500",icon:"carbon:terminal"}),y[9]||(y[9]=M(" Commands ",-1))]),_:1}),v(de,{class:"flex items-center gap-2 px-3 py-2 hover:n-bg-active transition-colors",to:"/skills"},{default:q(()=>[v(U,{class:"text-orange-500",icon:"carbon:lightning"}),y[10]||(y[10]=M(" Skills ",-1))]),_:1}),v(de,{class:"flex items-center gap-2 px-3 py-2 hover:n-bg-active transition-colors",to:"/agents"},{default:q(()=>[v(U,{class:"text-purple-500",icon:"carbon:bot"}),y[11]||(y[11]=M(" Agents ",-1))]),_:1}),v(de,{class:"flex items-center gap-2 px-3 py-2 hover:n-bg-active transition-colors",to:"/plugins"},{default:q(()=>[v(U,{class:"text-cyan-500",icon:"carbon:application"}),y[12]||(y[12]=M(" Plugins ",-1))]),_:1}),y[14]||(y[14]=d("div",{class:"border-t border-neutral-200 dark:border-neutral-700 my-1"},null,-1)),v(de,{class:"flex items-center gap-2 px-3 py-2 hover:n-bg-active transition-colors",to:"/settings"},{default:q(()=>[v(U,{class:"text-neutral-500",icon:"carbon:settings"}),y[13]||(y[13]=M(" Settings ",-1))]),_:1})])):R("",!0)])])]),w(e)?R("",!0):(h(),_("div",Yr,[v(xn,{n:"yellow"},{default:q(()=>[...y[15]||(y[15]=[M(" Open this page inside Nuxt DevTools for best experience. ",-1)])]),_:1})])),w(Q)?R("",!0):(h(),_("div",Jr,[d("div",Gr,[d("div",Xr,[d("div",Qr,[v(U,{class:"text-5xl text-orange-500 animate-pulse",icon:"carbon:connection-signal-off"})]),y[16]||(y[16]=d("div",{class:"absolute -bottom-1 -right-1 w-8 h-8 rounded-full bg-red-500/20 flex items-center justify-center"},[d("div",{class:"w-3 h-3 rounded-full bg-red-500 animate-ping"})],-1))]),y[19]||(y[19]=d("h2",{class:"text-2xl font-bold mb-3 bg-gradient-to-r from-orange-400 to-red-400 bg-clip-text text-transparent"}," Connection Lost ",-1)),y[20]||(y[20]=d("p",{class:"text-neutral-500 dark:text-neutral-400 mb-6 leading-relaxed"}," The connection to the server was interrupted. This usually happens when Nuxt restarts after config changes. ",-1)),d("div",Zr,[v(U,{class:"animate-spin",icon:"carbon:renew"}),y[17]||(y[17]=d("span",null,"Attempting to reconnect...",-1))]),d("div",ei,[d("div",ti,[v(U,{class:"mt-0.5 text-blue-500",icon:"carbon:information"}),y[18]||(y[18]=d("div",null,[d("p",{class:"mb-2"}," Your conversation history is preserved. "),d("p",{class:"text-xs opacity-75"}," Once reconnected, you can continue where you left off. ")],-1))])])])])),w(Q)?(h(),_("div",{key:2,ref_key:"messagesContainer",ref:o,class:"flex-1 overflow-auto p-4 space-y-4"},[(h(!0),_(K,null,ue(w(je),E=>(h(),_("div",{key:E.id,class:ee([{"justify-end":E.role==="user"&&w(be)(E.senderId),"justify-start":E.role!=="user"||!w(be)(E.senderId)},"flex"])},[d("div",{class:ee([{"bg-green-500/20 text-green-800 dark:text-green-100":E.role==="user"&&w(be)(E.senderId),"bg-blue-500/20 text-blue-800 dark:text-blue-100":E.role==="user"&&!w(be)(E.senderId),"n-bg-active":E.role==="assistant","bg-yellow-500/20 text-yellow-800 dark:text-yellow-200 text-sm":E.role==="system"},"max-w-[85%] rounded-lg px-4 py-2"])},[E.role==="user"&&w(pt)&&E.senderNickname?(h(),_("div",ni,[v(U,{icon:"carbon:user"}),M(" "+N(E.senderNickname)+" ",1),w(be)(E.senderId)?(h(),_("span",si,"(you)")):R("",!0)])):R("",!0),E.role==="assistant"?(h(),_("div",oi,[y[21]||(y[21]=M(" Claude ",-1)),E.model?(h(),_("span",ri,"("+N(E.model.split("-").slice(0,2).join("-"))+")",1)):R("",!0),E.streaming?(h(),_("span",ii,[v(U,{class:"animate-pulse",icon:"carbon:circle-filled"})])):R("",!0)])):R("",!0),E.contentBlocks&&E.contentBlocks.length>0?(h(),_(K,{key:2},[(h(!0),_(K,null,ue(E.contentBlocks,(J,On)=>(h(),_(K,{key:On},[J.type==="text"&&J.text?(h(),F(Ye,{key:0,content:J.text},null,8,["content"])):J.type==="tool_use"?(h(),F(wn,{key:1,"tool-result":w(fn)(E.contentBlocks,J.id),"tool-use":J},null,8,["tool-result","tool-use"])):J.type==="thinking"&&J.thinking?(h(),F(kn,{key:2,thinking:J.thinking},null,8,["thinking"])):R("",!0)],64))),128)),E.content&&!E.contentBlocks.some(J=>J.type==="text")?(h(),F(Ye,{key:0,content:E.content},null,8,["content"])):R("",!0)],64)):(h(),_(K,{key:3},[E.role==="assistant"&&E.content?(h(),F(Ye,{key:0,content:E.content},null,8,["content"])):E.role==="user"&&E.content?(h(),_(K,{key:1},[w(x)(E.content).context?(h(),F(Cn,{key:0,context:w(x)(E.content).context},null,8,["context"])):R("",!0),d("div",ai,N(w(x)(E.content).body),1)],64)):E.content?(h(),_("div",ci,N(E.content),1)):R("",!0),E.streaming&&!E.content?(h(),_("span",li,"Thinking...")):R("",!0)],64)),d("div",ui,N(pn(E.timestamp)),1)],2)],2))),128)),w(je).length===0?(h(),_("div",di,[d("div",hi,[v(U,{class:"text-4xl mb-2",icon:"carbon:chat"}),y[22]||(y[22]=d("p",null,"Send a message to start chatting with Claude",-1))])])):R("",!0)],512)):R("",!0),w(Q)?(h(),_("div",fi,[v(Sn,{components:w(l),onRemove:w(f),onClearAll:w(u),onTogglePicker:w(m)},null,8,["components","onRemove","onClearAll","onTogglePicker"]),d("div",pi,[d("div",mi,[w(e)?(h(),F(Z,{key:0,disabled:!w(Q),n:"purple",title:"Select a component from the page to add as context",onClick:w(m)},{default:q(()=>[v(U,{class:"mr-1",icon:"carbon:touch-1"}),y[23]||(y[23]=M(" Add Component ",-1))]),_:1},8,["disabled","onClick"])):R("",!0)]),v(An,{chips:w(S),onToggle:w(b)},null,8,["chips","onToggle"])]),d("div",gi,[d("div",vi,[v(En,{ref_key:"docsAutocompleteRef",ref:Ke,"cursor-position":w(j),docs:w(k),"input-value":a.value,visible:w(D),onClose:w(ae),onSelect:w(z)},null,8,["cursor-position","docs","input-value","visible","onClose","onSelect"]),v(Rn,{ref_key:"commandsAutocompleteRef",ref:We,commands:w(I),"cursor-position":w(j),"input-value":a.value,visible:w(V),onClose:w(ve),onSelect:w(Y)},null,8,["commands","cursor-position","input-value","visible","onClose","onSelect"]),St(d("textarea",{ref_key:"textareaRef",ref:r,"onUpdate:modelValue":y[3]||(y[3]=E=>a.value=E),class:ee([{"opacity-50":!w(Q)||w(we)},"w-full px-3 py-2 n-bg-base border border-neutral-200 dark:border-neutral-800 rounded-lg font-mono text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"]),disabled:!w(Q)||w(we),placeholder:"Type your message... (Shift+Enter for new line)",rows:"1",style:{"min-height":"42px","max-height":"200px"},onInput:mn,onKeydown:gn},null,42,yi),[[At,a.value]]),w(p)?(h(),_("div",_i,[...y[24]||(y[24]=[d("span",{class:"w-2 h-2 bg-red-500 rounded-full animate-pulse"},null,-1),d("span",{class:"text-xs"},"Recording...",-1)])])):R("",!0)]),w(we)?(h(),F(Z,{key:0,n:"red",title:"Stop generation",class:"h-[42px] -mt-[6px] animate-pulse",onClick:bn},{default:q(()=>[v(U,{icon:"carbon:stop-filled"}),y[25]||(y[25]=M(" Stop ",-1))]),_:1})):w(C)?(h(),F(Z,{key:1,disabled:!w(Q),n:w(p)?"red":"gray",title:w(p)?"Stop recording":"Start voice input",class:"h-[42px] -mt-[6px]",onClick:_n},{default:q(()=>[v(U,{icon:w(p)?"carbon:stop-filled":"carbon:microphone"},null,8,["icon"])]),_:1},8,["disabled","n","title"])):R("",!0)]),d("div",bi,[d("span",null,"Enter to send | Shift+Enter for new line"+N(w(C)?" | Click mic for voice input":""),1),w(I).length>0?(h(),_("span",xi,[v(U,{class:"mr-1",icon:"carbon:terminal"}),y[26]||(y[26]=M("Type / for commands ",-1))])):R("",!0),w(k).length>0?(h(),_("span",wi,[v(U,{class:"mr-1",icon:"carbon:document"}),y[27]||(y[27]=M("@docs/ for docs ",-1))])):R("",!0)])])):R("",!0)]),v(Tn,{error:Fe.value,visible:w(fe),onCancel:yn,onSubmit:vn},null,8,["error","visible"])])}}});export{Ni as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a}from"./
|
|
1
|
+
import{_ as a}from"./h1c4XpR7.js";import{g as s,c as n,m as t,o as c,b as m,w as _,d as i,t as p,q as l}from"./DFkDlupw.js";const d=s({__name:"FormError",props:{error:{},class:{}},setup(e){return(r,f)=>{const o=a;return e.error?(c(),n("div",{key:0,class:l(r.$props.class)},[m(o,{icon:"carbon:warning",n:"red"},{default:_(()=>[i(p(e.error),1)]),_:1})],2)):t("",!0)}}}),x=Object.assign(d,{__name:"FormError"});export{x as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as V}from"./
|
|
1
|
+
import{_ as V}from"./C6Xm_PzB.js";import{_ as k}from"./BI4BFakr.js";import{_ as C}from"./DRReoGGV.js";import{g as w,K as b,L as g,s as y,c as a,a as o,m as i,b as s,E as u,t as N,n as B,x as T,w as c,F,o as n,d as v}from"./DFkDlupw.js";const $={class:"flex-1 overflow-auto"},E={class:"p-4 border-b border-neutral-200 dark:border-neutral-800"},M={key:0,class:"font-bold mb-4"},U={class:"space-y-4"},D={key:0},S={class:"text-xs opacity-50 mt-1"},W={class:"p-4"},j={key:0,class:"p-4 border-t border-neutral-200 dark:border-neutral-800 flex gap-2 flex-shrink-0"},q=w({__name:"CommandForm",props:b({mode:{},error:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:b(["save","cancel"],["update:modelValue"]),setup(r){const x=r,t=g(r,"modelValue"),m=y(()=>x.mode==="create");return(p,e)=>{const _=V,d=k,f=C;return n(),a(F,null,[o("div",$,[o("div",E,[u(m)?(n(),a("h3",M," Create New Slash Command ")):i("",!0),s(_,{error:r.error||"",class:"mb-4"},null,8,["error"]),o("div",U,[u(m)?(n(),a("div",D,[e[6]||(e[6]=o("label",{class:"block text-sm font-medium mb-1"},"Command Name",-1)),s(d,{modelValue:t.value.name,"onUpdate:modelValue":e[0]||(e[0]=l=>t.value.name=l),class:"w-full font-mono",placeholder:"e.g. review, deploy, test"},null,8,["modelValue"]),o("div",S," Will be invoked as /"+N(t.value.name||"command-name"),1)])):i("",!0),o("div",null,[e[7]||(e[7]=o("label",{class:"block text-sm font-medium mb-1"},"Description (optional)",-1)),s(d,{modelValue:t.value.description,"onUpdate:modelValue":e[1]||(e[1]=l=>t.value.description=l),class:"w-full",placeholder:"Brief description of what this command does"},null,8,["modelValue"])]),o("div",null,[e[8]||(e[8]=o("label",{class:"block text-sm font-medium mb-1"},"Allowed Tools (optional)",-1)),s(d,{modelValue:t.value.allowedTools,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.allowedTools=l),class:"w-full font-mono",placeholder:"e.g. Bash(git:*), Read, Edit"},null,8,["modelValue"]),e[9]||(e[9]=o("div",{class:"text-xs opacity-50 mt-1"}," Comma-separated list of allowed tools ",-1))])])]),o("div",W,[e[10]||(e[10]=o("label",{class:"block text-sm font-medium mb-1"},"Command Prompt",-1)),B(o("textarea",{"onUpdate:modelValue":e[3]||(e[3]=l=>t.value.content=l),class:"w-full min-h-[200px] p-3 font-mono text-sm n-bg-base rounded-lg border border-neutral-200 dark:border-neutral-800 resize-y",placeholder:"Write the prompt for this command..."},null,512),[[T,t.value.content]])])]),u(m)?(n(),a("div",j,[s(f,{n:"green",onClick:e[4]||(e[4]=l=>p.$emit("save"))},{default:c(()=>[...e[11]||(e[11]=[v(" Create Command ",-1)])]),_:1}),s(f,{n:"gray",onClick:e[5]||(e[5]=l=>p.$emit("cancel"))},{default:c(()=>[...e[12]||(e[12]=[v(" Cancel ",-1)])]),_:1})])):i("",!0)],64)}}}),L=Object.assign(q,{__name:"CommandForm"});export{L as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s}from"./
|
|
1
|
+
import{_ as s}from"./D_JyZ6Hh.js";import{g as n,c as a,a as t,b as c,o as i}from"./DFkDlupw.js";const r={class:"flex-1 flex items-center justify-center opacity-50"},l={class:"text-center"},f=n({__name:"index",setup(_){return(p,e)=>{const o=s;return i(),a("div",r,[t("div",l,[c(o,{class:"text-4xl mb-2",icon:"carbon:application"}),e[0]||(e[0]=t("p",null,"Select a plugin to view details",-1))])])}}});export{f as default};
|