@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./
|
|
1
|
+
import{_ as C}from"./C6Xm_PzB.js";import{_}from"./BI4BFakr.js";import{_ as S}from"./CrhTgxiU.js";import{_ as N}from"./DRReoGGV.js";import{g as $,K as v,L as B,s as U,c as s,a as l,m as i,b as a,E as p,F as f,p as F,n as M,x as D,w as k,o as n,q as O,t as T,d as x}from"./DFkDlupw.js";const A={class:"flex-1 overflow-auto"},E={class:"p-4 border-b border-neutral-200 dark:border-neutral-800"},L={key:0,class:"font-bold mb-4"},q={class:"space-y-4"},z={key:0},G={key:1},j={class:"flex flex-wrap gap-2"},H=["onClick"],I={class:"p-4"},K={key:0,class:"p-4 border-t border-neutral-200 dark:border-neutral-800 flex gap-2 flex-shrink-0"},P=$({__name:"AgentForm",props:v({mode:{},error:{},availableSkills:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:v(["save","cancel"],["update:modelValue"]),setup(r){const c=r,o=B(r,"modelValue"),g=[{value:"",label:"Default"},{value:"sonnet",label:"Sonnet (fast)"},{value:"opus",label:"Opus (powerful)"},{value:"haiku",label:"Haiku (fastest)"}],m=U(()=>c.mode==="create");function V(d){const e=o.value.skills.indexOf(d);e>=0?o.value.skills.splice(e,1):o.value.skills.push(d)}return(d,e)=>{const w=C,u=_,y=S,b=N;return n(),s(f,null,[l("div",A,[l("div",E,[p(m)?(n(),s("h3",L," Create New Subagent ")):i("",!0),a(w,{error:r.error||"",class:"mb-4"},null,8,["error"]),l("div",q,[p(m)?(n(),s("div",z,[e[7]||(e[7]=l("label",{class:"block text-sm font-medium mb-1"},"Name",-1)),a(u,{modelValue:o.value.name,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value.name=t),class:"w-full font-mono",placeholder:"e.g. reviewer, test-runner, docs-writer"},null,8,["modelValue"]),e[8]||(e[8]=l("div",{class:"text-xs opacity-50 mt-1"}," Use lowercase with hyphens (kebab-case) ",-1))])):i("",!0),l("div",null,[e[9]||(e[9]=l("label",{class:"block text-sm font-medium mb-1"},"Description",-1)),a(u,{modelValue:o.value.description,"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.description=t),class:"w-full",placeholder:"Brief description of what this agent does"},null,8,["modelValue"])]),l("div",null,[e[10]||(e[10]=l("label",{class:"block text-sm font-medium mb-1"},"Model (optional)",-1)),a(y,{modelValue:o.value.model,"onUpdate:modelValue":e[2]||(e[2]=t=>o.value.model=t),options:g,class:"w-full"},null,8,["modelValue"])]),l("div",null,[e[11]||(e[11]=l("label",{class:"block text-sm font-medium mb-1"},"Tools (optional)",-1)),a(u,{modelValue:o.value.tools,"onUpdate:modelValue":e[3]||(e[3]=t=>o.value.tools=t),class:"w-full font-mono",placeholder:"e.g. Read, Grep, Glob, Bash"},null,8,["modelValue"]),e[12]||(e[12]=l("div",{class:"text-xs opacity-50 mt-1"}," Comma-separated list. Leave empty for all tools. ",-1))]),r.availableSkills&&r.availableSkills.length>0?(n(),s("div",G,[e[13]||(e[13]=l("label",{class:"block text-sm font-medium mb-1"},"Skills",-1)),l("div",j,[(n(!0),s(f,null,F(r.availableSkills,t=>(n(),s("button",{key:t,class:O([o.value.skills.includes(t)?"bg-orange-500 text-white":"n-bg-base","px-2 py-1 rounded text-sm border border-neutral-200 dark:border-neutral-700"]),type:"button",onClick:R=>V(t)},T(t),11,H))),128))]),e[14]||(e[14]=l("div",{class:"text-xs opacity-50 mt-1"}," Click to add/remove skills. Skills will be preloaded for the agent. ",-1))])):i("",!0)])]),l("div",I,[e[15]||(e[15]=l("label",{class:"block text-sm font-medium mb-1"},"System Prompt",-1)),M(l("textarea",{"onUpdate:modelValue":e[4]||(e[4]=t=>o.value.prompt=t),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 system prompt for this agent..."},null,512),[[D,o.value.prompt]])])]),p(m)?(n(),s("div",K,[a(b,{n:"purple",onClick:e[5]||(e[5]=t=>d.$emit("save"))},{default:k(()=>[...e[16]||(e[16]=[x(" Create Agent ",-1)])]),_:1}),a(b,{n:"gray",onClick:e[6]||(e[6]=t=>d.$emit("cancel"))},{default:k(()=>[...e[17]||(e[17]=[x(" Cancel ",-1)])]),_:1})])):i("",!0)],64)}}}),Z=Object.assign(P,{__name:"AgentForm"});export{Z as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const y=Object.create(null);y.open="0";y.close="1";y.ping="2";y.pong="3";y.message="4";y.upgrade="5";y.noop="6";const T=Object.create(null);Object.keys(y).forEach(n=>{T[y[n]]=n});const q={type:"error",data:"parser error"},Q=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",j=typeof ArrayBuffer=="function",G=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,M=({type:n,data:e},t,s)=>Q&&e instanceof Blob?t?s(e):Y(e,s):j&&(e instanceof ArrayBuffer||G(e))?t?s(e):Y(new Blob([e]),s):s(y[n]+(e||"")),Y=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function z(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let N;function ue(n,e){if(Q&&n.data instanceof Blob)return n.data.arrayBuffer().then(z).then(e);if(j&&(n.data instanceof ArrayBuffer||G(n.data)))return e(z(n.data));M(n,!1,t=>{N||(N=new TextEncoder),e(N.encode(t))})}const J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<J.length;n++)v[J.charCodeAt(n)]=n;const fe=n=>{let e=n.length*.75,t=n.length,s,i=0,r,o,c,h;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const g=new ArrayBuffer(e),f=new Uint8Array(g);for(s=0;s<t;s+=4)r=v[n.charCodeAt(s)],o=v[n.charCodeAt(s+1)],c=v[n.charCodeAt(s+2)],h=v[n.charCodeAt(s+3)],f[i++]=r<<2|o>>4,f[i++]=(o&15)<<4|c>>2,f[i++]=(c&3)<<6|h&63;return g},le=typeof ArrayBuffer=="function",H=(n,e)=>{if(typeof n!="string")return{type:"message",data:Z(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:pe(n.substring(1),e)}:T[t]?n.length>1?{type:T[t],data:n.substring(1)}:{type:T[t]}:q},pe=(n,e)=>{if(le){const t=fe(n);return Z(t,e)}else return{base64:!0,data:n}},Z=(n,e)=>e==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,ee="",de=(n,e)=>{const t=n.length,s=new Array(t);let i=0;n.forEach((r,o)=>{M(r,!1,c=>{s[o]=c,++i===t&&e(s.join(ee))})})},ye=(n,e)=>{const t=n.split(ee),s=[];for(let i=0;i<t.length;i++){const r=H(t[i],e);if(s.push(r),r.type==="error")break}return s};function ge(){return new TransformStream({transform(n,e){ue(n,t=>{const s=t.length;let i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);const r=new DataView(i.buffer);r.setUint8(0,126),r.setUint16(1,s)}else{i=new Uint8Array(9);const r=new DataView(i.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let x;function k(n){return n.reduce((e,t)=>e+t.length,0)}function A(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let i=0;i<e;i++)t[i]=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 me(n,e){x||(x=new TextDecoder);const t=[];let s=0,i=-1,r=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(k(t)<1)break;const h=A(t,1);r=(h[0]&128)===128,i=h[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(k(t)<2)break;const h=A(t,2);i=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),s=3}else if(s===2){if(k(t)<8)break;const h=A(t,8),g=new DataView(h.buffer,h.byteOffset,h.length),f=g.getUint32(0);if(f>Math.pow(2,21)-1){c.enqueue(q);break}i=f*Math.pow(2,32)+g.getUint32(4),s=3}else{if(k(t)<i)break;const h=A(t,i);c.enqueue(H(r?h:x.decode(h),e)),s=0}if(i===0||i>n){c.enqueue(q);break}}}})}const te=4;function u(n){if(n)return _e(n)}function _e(n){for(var e in u.prototype)n[e]=u.prototype[e];return n}u.prototype.on=u.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};u.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.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,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+n],this};u.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,i=t.length;s<i;++s)t[s].apply(this,e)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};u.prototype.hasListeners=function(n){return!!this.listeners(n).length};const S=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),l=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),be="arraybuffer";function se(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const we=l.setTimeout,Ee=l.clearTimeout;function B(n,e){e.useNativeTimers?(n.setTimeoutFn=we.bind(l),n.clearTimeoutFn=Ee.bind(l)):(n.setTimeoutFn=l.setTimeout.bind(l),n.clearTimeoutFn=l.clearTimeout.bind(l))}const ve=1.33;function ke(n){return typeof n=="string"?Ae(n):Math.ceil((n.byteLength||n.size)*ve)}function Ae(n){let e=0,t=0;for(let s=0,i=n.length;s<i;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 ne(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Te(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function Re(n){let e={},t=n.split("&");for(let s=0,i=t.length;s<i;s++){let r=t[s].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class Oe extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class K extends u{constructor(e){super(),this.writable=!1,B(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 Oe(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=H(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=Te(e);return t.length?"?"+t:""}}class Ce extends K{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)};ye(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,de(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]=ne()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let ie=!1;try{ie=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Se=ie;function Be(){}class Ne extends Ce{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",(i,r)=>{this.onError("xhr post error",i,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 d extends u{constructor(e,t,s){super(),this.createRequest=e,B(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=se(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 i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this._opts.extraHeaders[i])}}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 i;s.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.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(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=d.requestsCount++,d.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=Be,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete d.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()}}d.requestsCount=0;d.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",X);else if(typeof addEventListener=="function"){const n="onpagehide"in l?"pagehide":"unload";addEventListener(n,X,!1)}}function X(){for(let n in d.requests)d.requests.hasOwnProperty(n)&&d.requests[n].abort()}const xe=(function(){const n=re({xdomain:!1});return n&&n.responseType!==null})();class Le extends Ne{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=xe&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new d(re,this.uri(),e)}}function re(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Se))return new XMLHttpRequest}catch{}if(!e)try{return new l[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const oe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Pe extends K{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=oe?{}:se(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(i){return this.emitReserved("error",i)}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],i=t===e.length-1;M(s,this.supportsBinary,r=>{try{this.doWrite(s,r)}catch{}i&&S(()=>{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]=ne()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const L=l.WebSocket||l.MozWebSocket;class qe extends Pe{createSocket(e,t,s){return oe?new L(e,t,s):t?new L(e,t):new L(e)}doWrite(e,t){this.ws.send(t)}}class De extends K{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=me(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=ge();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const r=()=>{s.read().then(({done:c,value:h})=>{c||(this.onPacket(h),r())}).catch(c=>{})};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Ie={websocket:qe,webtransport:De,polling:Le},Ue=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ve=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function D(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 i=Ue.exec(n||""),r={},o=14;for(;o--;)r[Ve[o]]=i[o]||"";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=Fe(r,r.path),r.queryKey=Me(r,r.query),r}function Fe(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 Me(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,r){i&&(t[i]=r)}),t}const I=typeof addEventListener=="function"&&typeof removeEventListener=="function",R=[];I&&addEventListener("offline",()=>{R.forEach(n=>n())},!1);class _ extends u{constructor(e,t){if(super(),this.binaryType=be,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=D(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=D(t.host).host);B(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 i=s.prototype.name;this.transports.push(i),this._transportsByName[i]=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=Re(this.opts.query)),I&&(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"})},R.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=te,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&&_.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",_.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 i=this.writeBuffer[s].data;if(i&&(t+=ke(i)),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,S(()=>{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,i){if(typeof t=="function"&&(i=t,t=void 0),typeof s=="function"&&(i=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),i&&this.once("flush",i),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(_.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(),I&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=R.indexOf(this._offlineEventListener);s!==-1&&R.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}_.protocol=te;class He extends _{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;_.priorWebsocketSuccess=!1;const i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",m=>{if(!s)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;_.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 w=new Error("probe error");w.transport=t.name,this.emitReserved("upgradeError",w)}}))};function r(){s||(s=!0,f(),t.close(),t=null)}const o=m=>{const w=new Error("probe error: "+m);w.transport=t.name,r(),this.emitReserved("upgradeError",w)};function c(){o("transport closed")}function h(){o("socket closed")}function g(m){t&&m.name!==t.name&&r()}const f=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",h),this.off("upgrading",g)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",h),this.once("upgrading",g),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 Ke=class extends He{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(i=>Ie[i]).filter(i=>!!i)),super(e,s)}};function We(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=D(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 $e=typeof ArrayBuffer=="function",Ye=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,ae=Object.prototype.toString,ze=typeof Blob=="function"||typeof Blob<"u"&&ae.call(Blob)==="[object BlobConstructor]",Je=typeof File=="function"||typeof File<"u"&&ae.call(File)==="[object FileConstructor]";function W(n){return $e&&(n instanceof ArrayBuffer||Ye(n))||ze&&n instanceof Blob||Je&&n instanceof File}function O(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(O(n[t]))return!0;return!1}if(W(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return O(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&O(n[t]))return!0;return!1}function Xe(n){const e=[],t=n.data,s=n;return s.data=U(t,e),s.attachments=e.length,{packet:s,buffers:e}}function U(n,e){if(!n)return n;if(W(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]=U(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]=U(n[s],e));return t}return n}function Qe(n,e){return n.data=V(n.data,e),delete n.attachments,n}function V(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]=V(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=V(n[t],e));return n}const ce=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],je=5;var a;(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"})(a||(a={}));class Ge{constructor(e){this.replacer=e}encode(e){return(e.type===a.EVENT||e.type===a.ACK)&&O(e)?this.encodeAsBinary({type:e.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===a.BINARY_EVENT||e.type===a.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=Xe(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}}class $ extends u{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===a.BINARY_EVENT;s||t.type===a.BINARY_ACK?(t.type=s?a.EVENT:a.ACK,this.reconstructor=new Ze(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(W(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(a[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===a.BINARY_EVENT||s.type===a.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}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 i=e.charAt(t+1);if(i!==""&&Number(i)==i){const r=t+1;for(;++t;){const o=e.charAt(t);if(o==null||Number(o)!=o){--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($.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 a.CONNECT:return C(t);case a.DISCONNECT:return t===void 0;case a.CONNECT_ERROR:return typeof t=="string"||C(t);case a.EVENT:case a.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&ce.indexOf(t[0])===-1);case a.ACK:case a.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ze{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=Qe(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function et(n){return typeof n=="string"}const tt=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function st(n){return n===void 0||tt(n)}function C(n){return Object.prototype.toString.call(n)==="[object Object]"}function nt(n,e){switch(n){case a.CONNECT:return e===void 0||C(e);case a.DISCONNECT:return e===void 0;case a.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&ce.indexOf(e[0])===-1);case a.ACK:return Array.isArray(e);case a.CONNECT_ERROR:return typeof e=="string"||C(e);default:return!1}}function it(n){return et(n.nsp)&&st(n.id)&&nt(n.type,n.data)}const rt=Object.freeze(Object.defineProperty({__proto__:null,Decoder:$,Encoder:Ge,get PacketType(){return a},isPacketValid:it,protocol:je},Symbol.toStringTag,{value:"Module"}));function p(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const ot=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class he extends u{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=[p(e,"open",this.onopen.bind(this)),p(e,"packet",this.onpacket.bind(this)),p(e,"error",this.onerror.bind(this)),p(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,i,r;if(ot.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 o={type:a.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,m=t.pop();this._registerAckCallback(f,m),o.id=f}const c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,h=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!c||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;const i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(r),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{const r=(o,c)=>o?i(o):s(c);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((i,...r)=>(this._queue[0],i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(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:a.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 a.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 a.EVENT:case a.BINARY_EVENT:this.onevent(e);break;case a.ACK:case a.BINARY_ACK:this.onack(e);break;case a.DISCONNECT:this.ondisconnect();break;case a.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(...i){s||(s=!0,t.packet({type:a.ACK,id:e,data:i}))}}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:a.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 b(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}b.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};b.prototype.reset=function(){this.attempts=0};b.prototype.setMin=function(n){this.ms=n};b.prototype.setMax=function(n){this.max=n};b.prototype.setJitter=function(n){this.jitter=n};class F extends u{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,B(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 b({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||rt;this.encoder=new i.Encoder,this.decoder=new i.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 Ke(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=p(t,"open",function(){s.onopen(),e&&e()}),r=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=p(t,"error",r);if(this._timeout!==!1){const c=this._timeout,h=this.setTimeoutFn(()=>{i(),r(new Error("timeout")),t.close()},c);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(p(e,"ping",this.onping.bind(this)),p(e,"data",this.ondata.bind(this)),p(e,"error",this.onerror.bind(this)),p(e,"close",this.onclose.bind(this)),p(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){S(()=>{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 he(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(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):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 E={};function P(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=We(n,e.path||"/socket.io"),s=t.source,i=t.id,r=t.path,o=E[i]&&r in E[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let h;return c?h=new F(s,e):(E[i]||(E[i]=new F(s,e)),h=E[i]),t.query&&!e.query&&(e.query=t.queryKey),h.socket(t.path,e)}Object.assign(P,{Manager:F,Socket:he,io:P,connect:P});export{P as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as p}from"./
|
|
1
|
+
import{_ as p}from"./D_JyZ6Hh.js";import{_ as v}from"./B5vRr8Ti.js";import{_ as C}from"./DG-9quB_.js";import{_ as x}from"./DRReoGGV.js";import{g as $,c as r,a as y,m as c,M as B,q as k,l as m,d as s,t as u,w as a,F as N,b as n,o}from"./DFkDlupw.js";const _={class:"p-4 border-b border-neutral-200 dark:border-neutral-800 flex items-center justify-between"},E={key:0,class:"text-sm opacity-70"},w={key:0,class:"flex gap-2"},V=$({__name:"CrudEditorHeader",props:{title:{},description:{},isEditing:{type:Boolean},icon:{},iconColor:{default:""},showIcon:{type:Boolean,default:!1},monoTitle:{type:Boolean},readonly:{type:Boolean,default:!1},source:{}},emits:["edit","save","cancel"],setup(e){return(i,t)=>{const l=p,b=v,g=C,d=x;return o(),r("div",_,[y("div",null,[y("h3",{class:k([{"font-mono":e.monoTitle},"font-bold flex items-center gap-2"])},[e.showIcon&&e.icon?(o(),m(l,{key:0,class:k([e.iconColor]),icon:e.icon},null,8,["class","icon"])):c("",!0),s(" "+u(e.title)+" ",1),e.source&&e.source!=="project"?(o(),m(g,{key:1,to:`/plugins/${e.source}`,class:"hover:opacity-80 transition-opacity"},{default:a(()=>[n(b,{class:"text-xs cursor-pointer",n:"cyan"},{default:a(()=>[n(l,{class:"mr-1",icon:"carbon:application"}),s(" "+u(e.source),1)]),_:1})]),_:1},8,["to"])):c("",!0)],2),e.description?(o(),r("div",E,u(e.description),1)):c("",!0),B(i.$slots,"subtitle")]),e.readonly?c("",!0):(o(),r("div",w,[e.isEditing?(o(),r(N,{key:0},[n(d,{n:"green",onClick:t[0]||(t[0]=f=>i.$emit("save"))},{default:a(()=>[n(l,{class:"mr-1",icon:"carbon:save"}),t[3]||(t[3]=s(" Save ",-1))]),_:1}),n(d,{n:"gray",onClick:t[1]||(t[1]=f=>i.$emit("cancel"))},{default:a(()=>[...t[4]||(t[4]=[s(" Cancel ",-1)])]),_:1})],64)):(o(),m(d,{key:1,n:"blue",onClick:t[2]||(t[2]=f=>i.$emit("edit"))},{default:a(()=>[n(l,{class:"mr-1",icon:"carbon:edit"}),t[5]||(t[5]=s(" Edit ",-1))]),_:1}))]))])}}}),H=Object.assign(V,{__name:"CrudEditorHeader"});export{H as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as P,_ as T,a as G}from"./D8DUrd91.js";import{_ as J}from"./Bf779K50.js";import{g as K,s as U,l as a,w as g,E as t,G as j,H as z,o as r,I as A,J as M,c as _,m as O,a as f,d as S,F as Q,p as W}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";import"./CrhTgxiU.js";const X={key:0,class:"n-bg-active rounded-lg p-4 opacity-50 text-sm"},Y={class:"space-y-1"},ge=K({__name:"skills",setup(Z){const k=j(),l=z(),{isConnected:v,isLoading:c,items:i,isEditing:w,showNewForm:m,formError:d,newForm:s,editForm:h,load:C,select:N,startEditing:x,save:u,cancelEditing:y,deleteItem:F,showNew:E,formatDate:b}=P({resourceName:"skills",loggerName:"skills",createDefaultForm:()=>({name:"",description:"",content:"",argumentHint:"",model:""}),resourceToForm:e=>({name:e.name,description:e.description,content:e.content,argumentHint:e.argumentHint||"",model:e.model||""}),validateForm:e=>e.name?e.description?e.content?null:"Content is required":"Description is required":"Name is required",transformFormForSave:e=>({name:e.name,description:e.description,content:e.content,argumentHint:e.argumentHint||void 0,model:e.model||void 0})}),p=U(()=>{const e=k.params.name;return e&&i.value.find(o=>o.name===e)||null});function D(e){N(e),l.push(`/skills/${e.name}`)}function H(e){F(e,`Delete skill "${e}"?`)}function L(){E(),l.push("/skills")}function R(){m.value=!1}return(e,o)=>{const V=G,B=J,I=M,$=T;return r(),a($,{title:"Skills",icon:"carbon:lightning",color:"orange","is-connected":t(v),"is-loading":t(c),"info-tip":"Skills extend Claude's capabilities with custom knowledge.","storage-path":".claude/skills/<name>/SKILL.md","empty-message":"No skills configured yet. Create one to get started.","empty-editor-message":"Select a skill or create a new one","new-button-label":"New Skill",onNew:L,onRefresh:t(C)},{list:g(()=>[t(i).length===0&&!t(c)?(r(),_("div",X,[...o[1]||(o[1]=[S(" No skills configured yet. ",-1),f("br",null,null,-1),S(" Create one to get started. ",-1)])])):O("",!0),f("div",Y,[(r(!0),_(Q,null,W(t(i),n=>(r(),a(V,{key:n.name,selected:p.value?.name===n.name,name:n.name,description:n.description,source:n.source,icon:"carbon:lightning",color:"orange",onSelect:q=>D(n),onDelete:q=>H(n.name)},null,8,["selected","name","description","source","onSelect","onDelete"]))),128))])]),editor:g(()=>[t(m)?(r(),a(B,{key:0,modelValue:t(s),"onUpdate:modelValue":o[0]||(o[0]=n=>A(s)?s.value=n:null),mode:"create",error:t(d),onSave:t(u),onCancel:R},null,8,["modelValue","error","onSave"])):(r(),a(I,{key:1,skill:p.value,"is-editing":t(w),"edit-form":t(h),"form-error":t(d),"format-date":t(b),onStartEditing:t(x),onSave:t(u),onCancel:t(y)},null,8,["skill","is-editing","edit-form","form-error","format-date","onStartEditing","onSave","onCancel"]))]),_:1},8,["is-connected","is-loading","onRefresh"])}}});export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as x}from"./
|
|
1
|
+
import{_ as x}from"./D_JyZ6Hh.js";import{g as V,r as u,s as d,c as n,o as l,a as m,b as p,q as r,t as v,w,m as C,F as N,p as B,T as O}from"./DFkDlupw.js";import{o as S}from"./BI4BFakr.js";const j={key:0,class:"absolute z-50 mt-1 w-full border n-border-base rounded n-bg-base shadow-lg max-h-60 overflow-auto"},z=["onClick"],F=V({__name:"NSelect",props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(o,{emit:f}){const a=o,b=f,e=u(!1),c=u(null),y=d(()=>a.options.find(i=>i.value===a.modelValue)?.label||a.placeholder||""),_=d(()=>!a.options.find(t=>t.value===a.modelValue));function h(){a.disabled||(e.value=!e.value)}function g(t){b("update:modelValue",t.value),e.value=!1}return S(c,()=>{e.value=!1}),(t,i)=>{const k=x;return l(),n("div",{ref_key:"selectRef",ref:c,class:"n-select relative"},[m("div",{class:r(["flex items-center justify-between border n-border-base rounded n-bg-base py-1 px-2 cursor-pointer",e.value?"border-context n-focus-base":"hover:border-neutral-400 dark:hover:border-neutral-600",o.disabled?"opacity-50 cursor-not-allowed":""]),onClick:h},[m("span",{class:r(_.value?"opacity-50":"")},v(y.value),3),p(k,{class:r(["transition-transform duration-150 op50 ml-2 flex-shrink-0",e.value?"rotate-180":""]),icon:"carbon:chevron-down"},null,8,["class"])],2),p(O,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition duration-75 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:w(()=>[e.value?(l(),n("div",j,[(l(!0),n(N,null,B(o.options,s=>(l(),n("div",{key:s.value,class:r(["px-3 py-1.5 cursor-pointer","hover:n-bg-active",s.value===o.modelValue?"n-bg-active font-medium":""]),onClick:L=>g(s)},v(s.label),11,z))),128))])):C("",!0)]),_:1})],512)}}}),q=Object.assign(F,{__name:"NSelect"});export{q as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s}from"./
|
|
1
|
+
import{_ as s}from"./DG-9quB_.js";import{_ as a,c as i,o as u,a as t,t as n,b as c,w as l,d}from"./DFkDlupw.js";import{u as f}from"./DSMailoF.js";const p={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"},m={class:"max-w-520px text-center"},h=["textContent"],g=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return f({title:`${r.statusCode} - ${r.statusMessage} | ${r.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}a{color:inherit;text-decoration: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: }'}]}),(k,_)=>{const o=s;return u(),i("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.statusCode)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusMessage)},null,8,g),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,b),t("div",x,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},N=a(y,[["__scopeId","data-v-8c88d9ea"]]);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as n}from"./
|
|
1
|
+
import{_ as n}from"./D_JyZ6Hh.js";import{g as s,c as a,a as t,b as c,o as r}from"./DFkDlupw.js";const _={class:"flex-1 flex items-center justify-center opacity-50"},i={class:"text-center"},f=s({__name:"index",setup(l){return(m,e)=>{const o=n;return r(),a("div",_,[t("div",i,[c(o,{class:"text-4xl mb-2",icon:"carbon:bot"}),e[0]||(e[0]=t("p",null,"Select an agent or create a new one",-1))])])}}});export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as A}from"./D_JyZ6Hh.js";import{_ as R}from"./DRReoGGV.js";import{_ as j}from"./B5vRr8Ti.js";import{g as E,r as d,s as F,B as H,j as I,k as U,l as k,w as a,G as q,H as z,o as l,a as o,c as y,m as b,b as c,d as p,t as m,F as G,p as J,q as C,J as K}from"./DFkDlupw.js";import{_ as M}from"./n4TwJfzb.js";import{l as O}from"./CG1tBJBN.js";import{u as Q,a as W,S as X}from"./kN0L7CSs.js";import"./DG-9quB_.js";const Y={class:"flex gap-4 h-full"},Z={class:"w-72 flex-shrink-0 space-y-4 overflow-hidden"},ee={class:"text-sm font-medium opacity-50 mb-2 flex items-center gap-2"},te={key:0,class:"text-xs opacity-50"},ne={class:"space-y-1 px-1"},se=["onClick"],oe={class:"flex items-center gap-2"},ae={class:"font-medium truncate"},le={class:"flex flex-wrap gap-1 mt-1 pl-6"},ce={class:"flex-1 flex flex-col n-bg-active rounded-lg overflow-hidden"},xe=E({__name:"plugins",setup(ie){const v=Q(),{log:i}=W("plugins"),N=q(),B=z(),t=d(null),f=d(!1),u=d(!1),r=d([]),_=d(null),g=F(()=>{const e=N.params.id;return e&&r.value.find(n=>n.id===e||n.name===e)||null});function S(){return v.isActive.value&&v.origin.value?v.origin.value:window.location.origin}function $(){const e=S();i("Connecting to socket at",e),t.value=O(e,{path:X,transports:["websocket","polling"],reconnection:!0,reconnectionAttempts:5}),t.value.on("connect",()=>{i("Connected to socket"),f.value=!0,w()}),t.value.on("disconnect",()=>{i("Disconnected from socket"),f.value=!1}),t.value.on("plugins:list",n=>{i("Plugins list received",n),r.value=n,u.value=!1}),t.value.on("plugins:get",n=>{i("Plugin details received",n),_.value=n})}function w(){t.value&&(u.value=!0,t.value.emit("plugins:list"))}function D(e){_.value=null,B.push(`/plugins/${e.id}`),t.value&&e.cachePath&&t.value.emit("plugins:get",e.id)}function P(e){switch(e){case"user":return"purple";case"project":return"green";case"local":return"blue";case"managed":return"gray";default:return"gray"}}return H(g,e=>{e&&t.value&&e.cachePath&&(_.value=null,t.value.emit("plugins:get",e.id))}),I(()=>{$()}),U(()=>{t.value&&t.value.disconnect()}),(e,n)=>{const x=A,L=R,h=j,T=K,V=M;return l(),k(V,{color:"cyan",icon:"carbon:application",title:"Plugins"},{actions:a(()=>[c(L,{disabled:!f.value||u.value,n:"gray",onClick:w},{default:a(()=>[c(x,{class:C([{"animate-spin":u.value},"mr-1"]),icon:"carbon:restart"},null,8,["class"]),n[0]||(n[0]=p(" Refresh ",-1))]),_:1},8,["disabled"])]),default:a(()=>[o("div",Y,[o("div",Z,[o("div",null,[o("div",ee,[c(x,{icon:"carbon:application"}),p(" Installed Plugins ("+m(r.value.length)+") ",1)]),r.value.length===0&&!u.value?(l(),y("div",te," No plugins installed ")):b("",!0),o("div",ne,[(l(!0),y(G,null,J(r.value,s=>(l(),y("div",{key:s.id,class:C([[g.value?.id===s.id?"n-bg-active ring-1 ring-cyan-500":"hover:n-bg-active",!s.enabled&&"opacity-50"],"rounded-lg p-2 cursor-pointer"]),onClick:ue=>D(s)},[o("div",oe,[c(x,{class:C(s.enabled?"text-cyan-500":"text-gray-400"),icon:"carbon:application"},null,8,["class"]),o("span",ae,m(s.name),1)]),o("div",le,[c(h,{n:P(s.scope),class:"text-xs"},{default:a(()=>[p(m(s.scope),1)]),_:2},1032,["n"]),s.enabled?b("",!0):(l(),k(h,{key:0,class:"text-xs",n:"red"},{default:a(()=>[...n[1]||(n[1]=[p(" disabled ",-1)])]),_:1})),s.manifest?.version?(l(),k(h,{key:1,class:"text-xs",n:"gray"},{default:a(()=>[p(" v"+m(s.manifest.version),1)]),_:2},1024)):b("",!0)])],10,se))),128))])])]),o("div",ce,[c(T,{plugin:g.value,"plugin-details":_.value,"get-scope-color":P},null,8,["plugin","plugin-details"])])])]),_:1})}}});export{xe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as H}from"./D_JyZ6Hh.js";import{_ as K}from"./DRReoGGV.js";import{_ as ne}from"./B5vRr8Ti.js";import{_ as oe}from"./DG-9quB_.js";import{g as R,s as se,c as B,o as y,a as g,m as b,M as T,l as I,b as v,q as D,t as $,E as A,w,y as O,d as M,r as f,j as ae,k as ce}from"./DFkDlupw.js";import{_ as le}from"./h1c4XpR7.js";import{_ as ie}from"./n4TwJfzb.js";import{l as re}from"./CG1tBJBN.js";import{u as ue,a as de,S as me}from"./kN0L7CSs.js";const fe={class:"flex items-center justify-between"},ve={class:"flex items-center gap-2 truncate"},ge={key:0,class:"text-xs opacity-50 pl-6 truncate line-clamp-2"},ye={key:1,class:"pl-6 mt-1"},$e=R({__name:"CrudListItem",props:{selected:{type:Boolean},icon:{},color:{},name:{},description:{},monoName:{type:Boolean},namePrefix:{},source:{},readonly:{type:Boolean}},emits:["select","delete"],setup(e){const o=e,c=se(()=>o.source&&o.source!=="project");return(l,s)=>{const i=H,u=K,n=ne,p=oe;return y(),B("div",{class:D([[e.selected?`n-bg-active ring-1 ring-${e.color}-500`:"hover:n-bg-active"],"rounded-lg p-2 cursor-pointer group w-full overflow-hidden"]),onClick:s[2]||(s[2]=C=>l.$emit("select"))},[g("div",fe,[g("div",ve,[v(i,{class:D(`opacity-50 text-${e.color}-500`),icon:e.icon},null,8,["class","icon"]),g("span",{class:D({"font-mono":e.monoName,"font-medium":!e.monoName})},$(e.namePrefix)+$(e.name),3)]),!e.readonly&&!A(c)?(y(),I(u,{key:0,class:"opacity-0 group-hover:opacity-100",n:"red xs",onClick:s[0]||(s[0]=O(C=>l.$emit("delete"),["stop"]))},{default:w(()=>[v(i,{icon:"carbon:trash-can"})]),_:1})):b("",!0)]),e.description?(y(),B("div",ge,$(e.description),1)):b("",!0),A(c)?(y(),B("div",ye,[v(p,{to:`/plugins/${e.source}`,onClick:s[1]||(s[1]=O(()=>{},["stop"]))},{default:w(()=>[v(n,{class:"text-xs cursor-pointer hover:opacity-80 transition-opacity",n:"cyan"},{default:w(()=>[v(i,{class:"mr-1",icon:"carbon:application"}),M(" "+$(e.source),1)]),_:1})]),_:1},8,["to"])])):b("",!0),T(l.$slots,"extra")],2)}}}),Ie=Object.assign($e,{__name:"CrudListItem"}),pe={class:"flex gap-4 h-full"},xe={class:"w-68 max-w-68 flex-shrink-0 space-y-4 overflow-hidden px-1 overflow-y-auto"},we={key:0},Ce={key:1,class:"font-mono"},he={key:0,class:"n-bg-active rounded-lg p-4 opacity-50 text-sm"},ke={class:"flex-1 flex flex-col n-bg-active rounded-lg overflow-hidden overflow-y-auto"},be={class:"flex-1 flex items-center justify-center opacity-50"},Ne={class:"text-center"},_e=R({__name:"CrudPageLayout",props:{title:{},icon:{},color:{},isConnected:{type:Boolean},isLoading:{type:Boolean},infoTip:{},storagePath:{},emptyMessage:{},emptyEditorMessage:{},newButtonLabel:{}},emits:["new","refresh"],setup(e){return(o,c)=>{const l=H,s=K,i=le,u=ie;return y(),I(u,{color:e.color,icon:e.icon,title:e.title},{actions:w(()=>[T(o.$slots,"header-actions",{},()=>[v(s,{disabled:!e.isConnected,n:e.color,onClick:c[0]||(c[0]=n=>o.$emit("new"))},{default:w(()=>[v(l,{class:"mr-1",icon:"carbon:add"}),M(" "+$(e.newButtonLabel||"New"),1)]),_:1},8,["disabled","n"]),v(s,{disabled:!e.isConnected||e.isLoading,n:"gray",onClick:c[1]||(c[1]=n=>o.$emit("refresh"))},{default:w(()=>[v(l,{class:D([{"animate-spin":e.isLoading},"mr-1"]),icon:"carbon:restart"},null,8,["class"]),c[2]||(c[2]=M(" Refresh ",-1))]),_:1},8,["disabled"])])]),default:w(()=>[g("div",pe,[g("div",xe,[e.infoTip?(y(),I(i,{key:0,n:e.color,class:"text-xs",icon:"carbon:information"},{default:w(()=>[M($(e.infoTip)+" ",1),e.storagePath?(y(),B("br",we)):b("",!0),e.storagePath?(y(),B("code",Ce,$(e.storagePath),1)):b("",!0)]),_:1},8,["n"])):b("",!0),T(o.$slots,"list",{},()=>[e.emptyMessage?(y(),B("div",he,$(e.emptyMessage),1)):b("",!0)])]),g("div",ke,[T(o.$slots,"editor",{},()=>[g("div",be,[g("div",Ne,[v(l,{icon:e.icon,class:"text-4xl mb-2"},null,8,["icon"]),g("p",null,$(e.emptyEditorMessage||"Select an item or create a new one"),1)])])])])])]),_:3},8,["color","icon","title"])}}}),Ve=Object.assign(_e,{__name:"CrudPageLayout"});function Le(e={}){const{loggerName:o="socket",onConnect:c,onDisconnect:l,autoConnect:s=!0}=e,i=ue(),{log:u}=de(o),n=f(null),p=f(!1),C=[];function r(){return i.isActive.value&&i.origin.value?i.origin.value:window.location.origin}function d(){if(n.value?.connected)return;const a=r();u("Connecting to socket at",a),n.value=re(a,{path:me,transports:["websocket","polling"],reconnection:!0,reconnectionAttempts:5});for(const{event:m,handler:N}of C)n.value.on(m,N);n.value.on("connect",()=>{u("Connected"),p.value=!0,c?.()}),n.value.on("disconnect",()=>{u("Disconnected"),p.value=!1,l?.()})}function h(){n.value&&(n.value.disconnect(),n.value=null,p.value=!1)}function E(a,m){n.value&&n.value.emit(a,m)}function x(a,m){const N=m;n.value?n.value.on(a,N):C.push({event:a,handler:N})}function F(a,m){n.value&&n.value.off(a,m)}return s&&(ae(()=>d()),ce(()=>h())),{socket:n,isConnected:p,connect:d,disconnect:h,emit:E,on:x,off:F,log:u}}function Ae(e){const{resourceName:o,loggerName:c=o,createDefaultForm:l,resourceToForm:s,validateForm:i,transformFormForSave:u,onConnect:n,setupListeners:p}=e,C=f([]),r=f(null),d=f(!1),h=f(!1),E=f(!1),x=f(""),F=f(l()),a=f(l()),m=`${o}:list`,N=`${o}:saved`,U=`${o}:deleted`,q=`${o}:save`,z=`${o}:delete`,{socket:G,isConnected:J,emit:_,on:L,log:P}=Le({loggerName:c,onConnect:()=>{V(),n?.({emit:_,on:L,log:P})},autoConnect:!0});L(m,t=>{P(`${o} list received`,t.length),C.value=t,E.value=!1}),L(N,t=>{const k=o.slice(0,-1);t.success&&t[k]?(r.value=t[k],d.value=!1,h.value=!1,j(),x.value=""):x.value=t.error||`Failed to save ${k}`}),L(U,t=>{t.success&&r.value?.name===t.name&&(r.value=null)}),p?.({emit:_,on:L,log:P});function V(){E.value=!0,_(m)}function Q(t){r.value=t,a.value=s(t),d.value=!1,h.value=!1}function W(){r.value&&(a.value=s(r.value),d.value=!0)}function X(){const t=d.value?a.value:F.value;if(i){const S=i(t);if(S){x.value=S;return}}const k=u?u(t,d.value):t;_(q,k)}function Y(){r.value&&(a.value=s(r.value)),d.value=!1,x.value=""}function Z(t,k){const S=k||`Delete "${t}"?`;confirm(S)&&_(z,t)}function j(){F.value=l(),x.value=""}function ee(){h.value=!0,r.value=null,j()}function te(t){return new Date(t).toLocaleDateString()}return{socket:G,isConnected:J,isLoading:E,items:C,selectedItem:r,isEditing:d,showNewForm:h,formError:x,newForm:F,editForm:a,load:V,select:Q,startEditing:W,save:X,cancelEditing:Y,deleteItem:Z,resetNewForm:j,showNew:ee,emit:_,on:L,log:P,formatDate:te}}export{Ve as _,Ie as a,Ae as u};
|