sensorium-mcp 3.0.79 → 3.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +20 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +131 -1
- package/dist/config.js.map +1 -1
- package/dist/dashboard/routes/threads.d.ts +6 -0
- package/dist/dashboard/routes/threads.d.ts.map +1 -1
- package/dist/dashboard/routes/threads.js +164 -9
- package/dist/dashboard/routes/threads.js.map +1 -1
- package/dist/dashboard/routes.d.ts.map +1 -1
- package/dist/dashboard/routes.js +13 -1
- package/dist/dashboard/routes.js.map +1 -1
- package/dist/dashboard/spa.html +10 -10
- package/dist/data/memory/semantic.d.ts +6 -0
- package/dist/data/memory/semantic.d.ts.map +1 -1
- package/dist/data/memory/semantic.js +19 -0
- package/dist/data/memory/semantic.js.map +1 -1
- package/dist/http-server.js +1 -1
- package/dist/http-server.js.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +2 -1
- package/dist/logger.js.map +1 -1
- package/dist/services/claude-spawn.service.d.ts.map +1 -1
- package/dist/services/claude-spawn.service.js +4 -1
- package/dist/services/claude-spawn.service.js.map +1 -1
- package/dist/services/codex-spawn.service.js +2 -2
- package/dist/services/codex-spawn.service.js.map +1 -1
- package/dist/services/copilot-spawn.service.js +1 -1
- package/dist/services/copilot-spawn.service.js.map +1 -1
- package/dist/services/mcp-config.service.d.ts +14 -2
- package/dist/services/mcp-config.service.d.ts.map +1 -1
- package/dist/services/mcp-config.service.js +65 -5
- package/dist/services/mcp-config.service.js.map +1 -1
- package/dist/services/process.service.js +1 -1
- package/dist/services/process.service.js.map +1 -1
- package/dist/services/worker-cleanup.service.js +3 -3
- package/dist/services/worker-cleanup.service.js.map +1 -1
- package/dist/tools/delegate-tool.js +1 -1
- package/dist/tools/delegate-tool.js.map +1 -1
- package/package.json +1 -1
- package/templates/playwright.default.md +18 -6
- package/templates/sensorium-repair.default.md +17 -5
package/dist/dashboard/spa.html
CHANGED
|
@@ -49,27 +49,27 @@
|
|
|
49
49
|
* @vue/shared v3.5.31
|
|
50
50
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
51
51
|
* @license MIT
|
|
52
|
-
**/function
|
|
52
|
+
**/function un(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ke={},Rt=[],nt=()=>{},po=()=>!1,Es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),As=e=>e.startsWith("onUpdate:"),Oe=Object.assign,dn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},yr=Object.prototype.hasOwnProperty,ge=(e,t)=>yr.call(e,t),ne=Array.isArray,jt=e=>ds(e)==="[object Map]",Ht=e=>ds(e)==="[object Set]",An=e=>ds(e)==="[object Date]",ae=e=>typeof e=="function",Ee=e=>typeof e=="string",rt=e=>typeof e=="symbol",we=e=>e!==null&&typeof e=="object",mo=e=>(we(e)||ae(e))&&ae(e.then)&&ae(e.catch),xo=Object.prototype.toString,ds=e=>xo.call(e),br=e=>ds(e).slice(8,-1),vo=e=>ds(e)==="[object Object]",fn=e=>Ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qt=un(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Is=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},_r=/-\w/g,Ue=Is(e=>e.replace(_r,t=>t.slice(1).toUpperCase())),wr=/\B([A-Z])/g,wt=Is(e=>e.replace(wr,"-$1").toLowerCase()),Ms=Is(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fs=Is(e=>e?`on${Ms(e)}`:""),st=(e,t)=>!Object.is(e,t),gs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},ho=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Os=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let In;const Ds=()=>In||(In=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ut(e){if(ne(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=Ee(n)?Cr(n):Ut(n);if(r)for(const l in r)t[l]=r[l]}return t}else if(Ee(e)||we(e))return e}const kr=/;(?![^(]*\))/g,Sr=/:([^]+)/,$r=/\/\*[^]*?\*\//g;function Cr(e){const t={};return e.replace($r,"").split(kr).forEach(s=>{if(s){const n=s.split(Sr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Y(e){let t="";if(Ee(e))t=e;else if(ne(e))for(let s=0;s<e.length;s++){const n=Y(e[s]);n&&(t+=n+" ")}else if(we(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Tr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pr=un(Tr);function go(e){return!!e||e===""}function Er(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Kt(e[n],t[n]);return s}function Kt(e,t){if(e===t)return!0;let s=An(e),n=An(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=rt(e),n=rt(t),s||n)return e===t;if(s=ne(e),n=ne(t),s||n)return s&&n?Er(e,t):!1;if(s=we(e),n=we(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,l=Object.keys(t).length;if(r!==l)return!1;for(const a in e){const i=e.hasOwnProperty(a),c=t.hasOwnProperty(a);if(i&&!c||!i&&c||!Kt(e[a],t[a]))return!1}}return String(e)===String(t)}function pn(e,t){return e.findIndex(s=>Kt(s,t))}const yo=e=>!!(e&&e.__v_isRef===!0),_=e=>Ee(e)?e:e==null?"":ne(e)||we(e)&&(e.toString===xo||!ae(e.toString))?yo(e)?_(e.value):JSON.stringify(e,bo,2):String(e),bo=(e,t)=>yo(t)?bo(e,t.value):jt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],l)=>(s[Hs(n,l)+" =>"]=r,s),{})}:Ht(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Hs(s))}:rt(t)?Hs(t):we(t)&&!ne(t)&&!vo(t)?String(t):t,Hs=(e,t="")=>{var s;return rt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
53
53
|
* @vue/reactivity v3.5.31
|
|
54
54
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
55
55
|
* @license MIT
|
|
56
|
-
**/let Le;class Ar{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Le,!t&&Le&&(this.index=(Le.scopes||(Le.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Le;try{return Le=this,t()}finally{Le=s}}}on(){++this._on===1&&(this.prevScope=Le,Le=this)}off(){this._on>0&&--this._on===0&&(Le=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Ir(){return Le}let be;const Fs=new WeakSet;class _o{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Le&&Le.active&&Le.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Fs.has(this)&&(Fs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ko(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,On(this),So(this);const t=be,s=We;be=this,We=!0;try{return this.fn()}finally{$o(this),be=t,We=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mn(t);this.deps=this.depsTail=void 0,On(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Fs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ys(this)&&this.run()}get dirty(){return Ys(this)}}let wo=0,Qt,Xt;function ko(e,t=!1){if(e.flags|=8,t){e.next=Xt,Xt=e;return}e.next=Qt,Qt=e}function fn(){wo++}function pn(){if(--wo>0)return;if(Xt){let t=Xt;for(Xt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Qt;){let t=Qt;for(Qt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function So(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $o(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),mn(n),Or(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function Ys(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Co(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Co(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===os)||(e.globalVersion=os,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ys(e))))return;e.flags|=2;const t=e.dep,s=be,n=We;be=e,We=!0;try{So(e);const r=e.fn(e._value);(t.version===0||st(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{be=s,We=n,$o(e),e.flags&=-3}}function mn(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let l=s.computed.deps;l;l=l.nextDep)mn(l,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Or(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let We=!0;const To=[];function xt(){To.push(We),We=!1}function vt(){const e=To.pop();We=e===void 0?!0:e}function On(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=be;be=void 0;try{t()}finally{be=s}}}let os=0;class Mr{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!be||!We||be===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==be)s=this.activeLink=new Mr(be,this),be.deps?(s.prevDep=be.depsTail,be.depsTail.nextDep=s,be.depsTail=s):be.deps=be.depsTail=s,Po(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=be.depsTail,s.nextDep=void 0,be.depsTail.nextDep=s,be.depsTail=s,be.deps===s&&(be.deps=n)}return s}trigger(t){this.version++,os++,this.notify(t)}notify(t){fn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{pn()}}}function Po(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Po(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Zs=new WeakMap,Pt=Symbol(""),Qs=Symbol(""),rs=Symbol("");function Ae(e,t,s){if(We&&be){let n=Zs.get(e);n||Zs.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new xn),r.map=n,r.key=s),r.track()}}function ft(e,t,s,n,r,l){const a=Zs.get(e);if(!a){os++;return}const u=d=>{d&&d.trigger()};if(fn(),t==="clear")a.forEach(u);else{const d=X(e),x=d&&un(s);if(d&&s==="length"){const f=Number(n);a.forEach((m,v)=>{(v==="length"||v===rs||!rt(v)&&v>=f)&&u(m)})}else switch((s!==void 0||a.has(void 0))&&u(a.get(s)),x&&u(a.get(rs)),t){case"add":d?x&&u(a.get("length")):(u(a.get(Pt)),Rt(e)&&u(a.get(Qs)));break;case"delete":d||(u(a.get(Pt)),Rt(e)&&u(a.get(Qs)));break;case"set":Rt(e)&&u(a.get(Pt));break}}pn()}function Ot(e){const t=ce(e);return t===e?t:(Ae(t,"iterate",rs),Fe(e)?t:t.map(ze))}function Ds(e){return Ae(e=ce(e),"iterate",rs),e}function et(e,t){return ht(e)?Nt(Et(e)?ze(t):t):ze(t)}const Dr={__proto__:null,[Symbol.iterator](){return Hs(this,Symbol.iterator,e=>et(this,e))},concat(...e){return Ot(this).concat(...e.map(t=>X(t)?Ot(t):t))},entries(){return Hs(this,"entries",e=>(e[1]=et(this,e[1]),e))},every(e,t){return it(this,"every",e,t,void 0,arguments)},filter(e,t){return it(this,"filter",e,t,s=>s.map(n=>et(this,n)),arguments)},find(e,t){return it(this,"find",e,t,s=>et(this,s),arguments)},findIndex(e,t){return it(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return it(this,"findLast",e,t,s=>et(this,s),arguments)},findLastIndex(e,t){return it(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return it(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ks(this,"includes",e)},indexOf(...e){return Ks(this,"indexOf",e)},join(e){return Ot(this).join(e)},lastIndexOf(...e){return Ks(this,"lastIndexOf",e)},map(e,t){return it(this,"map",e,t,void 0,arguments)},pop(){return zt(this,"pop")},push(...e){return zt(this,"push",e)},reduce(e,...t){return Mn(this,"reduce",e,t)},reduceRight(e,...t){return Mn(this,"reduceRight",e,t)},shift(){return zt(this,"shift")},some(e,t){return it(this,"some",e,t,void 0,arguments)},splice(...e){return zt(this,"splice",e)},toReversed(){return Ot(this).toReversed()},toSorted(e){return Ot(this).toSorted(e)},toSpliced(...e){return Ot(this).toSpliced(...e)},unshift(...e){return zt(this,"unshift",e)},values(){return Hs(this,"values",e=>et(this,e))}};function Hs(e,t,s){const n=Ds(e),r=n[t]();return n!==e&&!Fe(e)&&(r._next=r.next,r.next=()=>{const l=r._next();return l.done||(l.value=s(l.value)),l}),r}const Rr=Array.prototype;function it(e,t,s,n,r,l){const a=Ds(e),u=a!==e&&!Fe(e),d=a[t];if(d!==Rr[t]){const m=d.apply(e,l);return u?ze(m):m}let x=s;a!==e&&(u?x=function(m,v){return s.call(this,et(e,m),v,e)}:s.length>2&&(x=function(m,v){return s.call(this,m,v,e)}));const f=d.call(a,x,n);return u&&r?r(f):f}function Mn(e,t,s,n){const r=Ds(e),l=r!==e&&!Fe(e);let a=s,u=!1;r!==e&&(l?(u=n.length===0,a=function(x,f,m){return u&&(u=!1,x=et(e,x)),s.call(this,x,et(e,f),m,e)}):s.length>3&&(a=function(x,f,m){return s.call(this,x,f,m,e)}));const d=r[t](a,...n);return u?et(e,d):d}function Ks(e,t,s){const n=ce(e);Ae(n,"iterate",rs);const r=n[t](...s);return(r===-1||r===!1)&&yn(s[0])?(s[0]=ce(s[0]),n[t](...s)):r}function zt(e,t,s=[]){xt(),fn();const n=ce(e)[t].apply(e,s);return pn(),vt(),n}const jr=an("__proto__,__v_isRef,__isVue"),Eo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(rt));function Lr(e){rt(e)||(e=String(e));const t=ce(this);return Ae(t,"has",e),t.hasOwnProperty(e)}class Ao{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,l=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return l;if(s==="__v_raw")return n===(r?l?Jr:Do:l?Mo:Oo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const a=X(t);if(!r){let d;if(a&&(d=Dr[s]))return d;if(s==="hasOwnProperty")return Lr}const u=Reflect.get(t,s,Oe(t)?t:n);if((rt(s)?Eo.has(s):jr(s))||(r||Ae(t,"get",s),l))return u;if(Oe(u)){const d=a&&un(s)?u:u.value;return r&&pe(d)?en(d):d}return pe(u)?r?en(u):hn(u):u}}class Io extends Ao{constructor(t=!1){super(!1,t)}set(t,s,n,r){let l=t[s];const a=X(t)&&un(s);if(!this._isShallow){const x=ht(l);if(!Fe(n)&&!ht(n)&&(l=ce(l),n=ce(n)),!a&&Oe(l)&&!Oe(n))return x||(l.value=n),!0}const u=a?Number(s)<t.length:ue(t,s),d=Reflect.set(t,s,n,Oe(t)?t:r);return t===ce(r)&&(u?st(n,l)&&ft(t,"set",s,n):ft(t,"add",s,n)),d}deleteProperty(t,s){const n=ue(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&ft(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!rt(s)||!Eo.has(s))&&Ae(t,"has",s),n}ownKeys(t){return Ae(t,"iterate",X(t)?"length":Pt),Reflect.ownKeys(t)}}class Ur extends Ao{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Nr=new Io,Vr=new Ur,Br=new Io(!0);const Xs=e=>e,ps=e=>Reflect.getPrototypeOf(e);function Fr(e,t,s){return function(...n){const r=this.__v_raw,l=ce(r),a=Rt(l),u=e==="entries"||e===Symbol.iterator&&a,d=e==="keys"&&a,x=r[e](...n),f=s?Xs:t?Nt:ze;return!t&&Ae(l,"iterate",d?Qs:Pt),Ee(Object.create(x),{next(){const{value:m,done:v}=x.next();return v?{value:m,done:v}:{value:u?[f(m[0]),f(m[1])]:f(m),done:v}}})}}function ms(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Hr(e,t){const s={get(r){const l=this.__v_raw,a=ce(l),u=ce(r);e||(st(r,u)&&Ae(a,"get",r),Ae(a,"get",u));const{has:d}=ps(a),x=t?Xs:e?Nt:ze;if(d.call(a,r))return x(l.get(r));if(d.call(a,u))return x(l.get(u));l!==a&&l.get(r)},get size(){const r=this.__v_raw;return!e&&Ae(ce(r),"iterate",Pt),r.size},has(r){const l=this.__v_raw,a=ce(l),u=ce(r);return e||(st(r,u)&&Ae(a,"has",r),Ae(a,"has",u)),r===u?l.has(r):l.has(r)||l.has(u)},forEach(r,l){const a=this,u=a.__v_raw,d=ce(u),x=t?Xs:e?Nt:ze;return!e&&Ae(d,"iterate",Pt),u.forEach((f,m)=>r.call(l,x(f),x(m),a))}};return Ee(s,e?{add:ms("add"),set:ms("set"),delete:ms("delete"),clear:ms("clear")}:{add(r){const l=ce(this),a=ps(l),u=ce(r),d=!t&&!Fe(r)&&!ht(r)?u:r;return a.has.call(l,d)||st(r,d)&&a.has.call(l,r)||st(u,d)&&a.has.call(l,u)||(l.add(d),ft(l,"add",d,d)),this},set(r,l){!t&&!Fe(l)&&!ht(l)&&(l=ce(l));const a=ce(this),{has:u,get:d}=ps(a);let x=u.call(a,r);x||(r=ce(r),x=u.call(a,r));const f=d.call(a,r);return a.set(r,l),x?st(l,f)&&ft(a,"set",r,l):ft(a,"add",r,l),this},delete(r){const l=ce(this),{has:a,get:u}=ps(l);let d=a.call(l,r);d||(r=ce(r),d=a.call(l,r)),u&&u.call(l,r);const x=l.delete(r);return d&&ft(l,"delete",r,void 0),x},clear(){const r=ce(this),l=r.size!==0,a=r.clear();return l&&ft(r,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Fr(r,e,t)}),s}function vn(e,t){const s=Hr(e,t);return(n,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(ue(s,r)&&r in n?s:n,r,l)}const Kr={get:vn(!1,!1)},Wr={get:vn(!1,!0)},zr={get:vn(!0,!1)};const Oo=new WeakMap,Mo=new WeakMap,Do=new WeakMap,Jr=new WeakMap;function qr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Gr(e){return e.__v_skip||!Object.isExtensible(e)?0:qr(br(e))}function hn(e){return ht(e)?e:gn(e,!1,Nr,Kr,Oo)}function Yr(e){return gn(e,!1,Br,Wr,Mo)}function en(e){return gn(e,!0,Vr,zr,Do)}function gn(e,t,s,n,r){if(!pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const l=Gr(e);if(l===0)return e;const a=r.get(e);if(a)return a;const u=new Proxy(e,l===2?n:s);return r.set(e,u),u}function Et(e){return ht(e)?Et(e.__v_raw):!!(e&&e.__v_isReactive)}function ht(e){return!!(e&&e.__v_isReadonly)}function Fe(e){return!!(e&&e.__v_isShallow)}function yn(e){return e?!!e.__v_raw:!1}function ce(e){const t=e&&e.__v_raw;return t?ce(t):e}function Zr(e){return!ue(e,"__v_skip")&&Object.isExtensible(e)&&ho(e,"__v_skip",!0),e}const ze=e=>pe(e)?hn(e):e,Nt=e=>pe(e)?en(e):e;function Oe(e){return e?e.__v_isRef===!0:!1}function w(e){return Qr(e,!1)}function Qr(e,t){return Oe(e)?e:new Xr(e,t)}class Xr{constructor(t,s){this.dep=new xn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ce(t),this._value=s?t:ze(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Fe(t)||ht(t);t=n?t:ce(t),st(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function el(e){return Oe(e)?e.value:e}const tl={get:(e,t,s)=>t==="__v_raw"?e:el(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return Oe(r)&&!Oe(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function Ro(e){return Et(e)?e:new Proxy(e,tl)}class sl{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new xn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=os-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&be!==this)return ko(this,!0),!0}get value(){const t=this.dep.track();return Co(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function nl(e,t,s=!1){let n,r;return oe(e)?n=e:(n=e.get,r=e.set),new sl(n,r,s)}const xs={},ws=new WeakMap;let Tt;function ol(e,t=!1,s=Tt){if(s){let n=ws.get(s);n||ws.set(s,n=[]),n.push(e)}}function rl(e,t,s=ge){const{immediate:n,deep:r,once:l,scheduler:a,augmentJob:u,call:d}=s,x=I=>r?I:Fe(I)||r===!1||r===0?pt(I,1):pt(I);let f,m,v,k,F=!1,$=!1;if(Oe(e)?(m=()=>e.value,F=Fe(e)):Et(e)?(m=()=>x(e),F=!0):X(e)?($=!0,F=e.some(I=>Et(I)||Fe(I)),m=()=>e.map(I=>{if(Oe(I))return I.value;if(Et(I))return x(I);if(oe(I))return d?d(I,2):I()})):oe(e)?t?m=d?()=>d(e,2):e:m=()=>{if(v){xt();try{v()}finally{vt()}}const I=Tt;Tt=f;try{return d?d(e,3,[k]):e(k)}finally{Tt=I}}:m=nt,t&&r){const I=m,U=r===!0?1/0:r;m=()=>pt(I(),U)}const N=Ir(),C=()=>{f.stop(),N&&N.active&&cn(N.effects,f)};if(l&&t){const I=t;t=(...U)=>{I(...U),C()}}let P=$?new Array(e.length).fill(xs):xs;const j=I=>{if(!(!(f.flags&1)||!f.dirty&&!I))if(t){const U=f.run();if(r||F||($?U.some((y,S)=>st(y,P[S])):st(U,P))){v&&v();const y=Tt;Tt=f;try{const S=[U,P===xs?void 0:$&&P[0]===xs?[]:P,k];P=U,d?d(t,3,S):t(...S)}finally{Tt=y}}}else f.run()};return u&&u(j),f=new _o(m),f.scheduler=a?()=>a(j,!1):j,k=I=>ol(I,!1,f),v=f.onStop=()=>{const I=ws.get(f);if(I){if(d)d(I,4);else for(const U of I)U();ws.delete(f)}},t?n?j(!0):P=f.run():a?a(j.bind(null,!0),!0):f.run(),C.pause=f.pause.bind(f),C.resume=f.resume.bind(f),C.stop=C,C}function pt(e,t=1/0,s){if(t<=0||!pe(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Oe(e))pt(e.value,t,s);else if(X(e))for(let n=0;n<e.length;n++)pt(e[n],t,s);else if(Ft(e)||Rt(e))e.forEach(n=>{pt(n,t,s)});else if(vo(e)){for(const n in e)pt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&pt(e[n],t,s)}return e}/**
|
|
56
|
+
**/let Fe;class Ar{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Fe,!t&&Fe&&(this.index=(Fe.scopes||(Fe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Fe;try{return Fe=this,t()}finally{Fe=s}}}on(){++this._on===1&&(this.prevScope=Fe,Fe=this)}off(){this._on>0&&--this._on===0&&(Fe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Ir(){return Fe}let Ce;const Ks=new WeakSet;class _o{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Fe&&Fe.active&&Fe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ks.has(this)&&(Ks.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ko(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Mn(this),So(this);const t=Ce,s=Ge;Ce=this,Ge=!0;try{return this.fn()}finally{$o(this),Ce=t,Ge=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)vn(t);this.deps=this.depsTail=void 0,Mn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ks.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Qs(this)&&this.run()}get dirty(){return Qs(this)}}let wo=0,Xt,es;function ko(e,t=!1){if(e.flags|=8,t){e.next=es,es=e;return}e.next=Xt,Xt=e}function mn(){wo++}function xn(){if(--wo>0)return;if(es){let t=es;for(es=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Xt;){let t=Xt;for(Xt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function So(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $o(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),vn(n),Mr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function Qs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Co(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Co(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===rs)||(e.globalVersion=rs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Qs(e))))return;e.flags|=2;const t=e.dep,s=Ce,n=Ge;Ce=e,Ge=!0;try{So(e);const r=e.fn(e._value);(t.version===0||st(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ce=s,Ge=n,$o(e),e.flags&=-3}}function vn(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let l=s.computed.deps;l;l=l.nextDep)vn(l,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Mr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ge=!0;const To=[];function mt(){To.push(Ge),Ge=!1}function xt(){const e=To.pop();Ge=e===void 0?!0:e}function Mn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Ce;Ce=void 0;try{t()}finally{Ce=s}}}let rs=0;class Or{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ce||!Ge||Ce===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Ce)s=this.activeLink=new Or(Ce,this),Ce.deps?(s.prevDep=Ce.depsTail,Ce.depsTail.nextDep=s,Ce.depsTail=s):Ce.deps=Ce.depsTail=s,Po(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=Ce.depsTail,s.nextDep=void 0,Ce.depsTail.nextDep=s,Ce.depsTail=s,Ce.deps===s&&(Ce.deps=n)}return s}trigger(t){this.version++,rs++,this.notify(t)}notify(t){mn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{xn()}}}function Po(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Po(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Xs=new WeakMap,Et=Symbol(""),en=Symbol(""),ls=Symbol("");function De(e,t,s){if(Ge&&Ce){let n=Xs.get(e);n||Xs.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new hn),r.map=n,r.key=s),r.track()}}function dt(e,t,s,n,r,l){const a=Xs.get(e);if(!a){rs++;return}const i=c=>{c&&c.trigger()};if(mn(),t==="clear")a.forEach(i);else{const c=ne(e),m=c&&fn(s);if(c&&s==="length"){const u=Number(n);a.forEach((f,g)=>{(g==="length"||g===ls||!rt(g)&&g>=u)&&i(f)})}else switch((s!==void 0||a.has(void 0))&&i(a.get(s)),m&&i(a.get(ls)),t){case"add":c?m&&i(a.get("length")):(i(a.get(Et)),jt(e)&&i(a.get(en)));break;case"delete":c||(i(a.get(Et)),jt(e)&&i(a.get(en)));break;case"set":jt(e)&&i(a.get(Et));break}}xn()}function Ot(e){const t=he(e);return t===e?t:(De(t,"iterate",ls),Je(e)?t:t.map(Ye))}function Rs(e){return De(e=he(e),"iterate",ls),e}function et(e,t){return vt(e)?Vt(At(e)?Ye(t):t):Ye(t)}const Dr={__proto__:null,[Symbol.iterator](){return Ws(this,Symbol.iterator,e=>et(this,e))},concat(...e){return Ot(this).concat(...e.map(t=>ne(t)?Ot(t):t))},entries(){return Ws(this,"entries",e=>(e[1]=et(this,e[1]),e))},every(e,t){return at(this,"every",e,t,void 0,arguments)},filter(e,t){return at(this,"filter",e,t,s=>s.map(n=>et(this,n)),arguments)},find(e,t){return at(this,"find",e,t,s=>et(this,s),arguments)},findIndex(e,t){return at(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return at(this,"findLast",e,t,s=>et(this,s),arguments)},findLastIndex(e,t){return at(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return at(this,"forEach",e,t,void 0,arguments)},includes(...e){return zs(this,"includes",e)},indexOf(...e){return zs(this,"indexOf",e)},join(e){return Ot(this).join(e)},lastIndexOf(...e){return zs(this,"lastIndexOf",e)},map(e,t){return at(this,"map",e,t,void 0,arguments)},pop(){return Jt(this,"pop")},push(...e){return Jt(this,"push",e)},reduce(e,...t){return On(this,"reduce",e,t)},reduceRight(e,...t){return On(this,"reduceRight",e,t)},shift(){return Jt(this,"shift")},some(e,t){return at(this,"some",e,t,void 0,arguments)},splice(...e){return Jt(this,"splice",e)},toReversed(){return Ot(this).toReversed()},toSorted(e){return Ot(this).toSorted(e)},toSpliced(...e){return Ot(this).toSpliced(...e)},unshift(...e){return Jt(this,"unshift",e)},values(){return Ws(this,"values",e=>et(this,e))}};function Ws(e,t,s){const n=Rs(e),r=n[t]();return n!==e&&!Je(e)&&(r._next=r.next,r.next=()=>{const l=r._next();return l.done||(l.value=s(l.value)),l}),r}const Rr=Array.prototype;function at(e,t,s,n,r,l){const a=Rs(e),i=a!==e&&!Je(e),c=a[t];if(c!==Rr[t]){const f=c.apply(e,l);return i?Ye(f):f}let m=s;a!==e&&(i?m=function(f,g){return s.call(this,et(e,f),g,e)}:s.length>2&&(m=function(f,g){return s.call(this,f,g,e)}));const u=c.call(a,m,n);return i&&r?r(u):u}function On(e,t,s,n){const r=Rs(e),l=r!==e&&!Je(e);let a=s,i=!1;r!==e&&(l?(i=n.length===0,a=function(m,u,f){return i&&(i=!1,m=et(e,m)),s.call(this,m,et(e,u),f,e)}):s.length>3&&(a=function(m,u,f){return s.call(this,m,u,f,e)}));const c=r[t](a,...n);return i?et(e,c):c}function zs(e,t,s){const n=he(e);De(n,"iterate",ls);const r=n[t](...s);return(r===-1||r===!1)&&_n(s[0])?(s[0]=he(s[0]),n[t](...s)):r}function Jt(e,t,s=[]){mt(),mn();const n=he(e)[t].apply(e,s);return xn(),xt(),n}const jr=un("__proto__,__v_isRef,__isVue"),Eo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(rt));function Lr(e){rt(e)||(e=String(e));const t=he(this);return De(t,"has",e),t.hasOwnProperty(e)}class Ao{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,l=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return l;if(s==="__v_raw")return n===(r?l?Jr:Do:l?Oo:Mo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const a=ne(t);if(!r){let c;if(a&&(c=Dr[s]))return c;if(s==="hasOwnProperty")return Lr}const i=Reflect.get(t,s,je(t)?t:n);if((rt(s)?Eo.has(s):jr(s))||(r||De(t,"get",s),l))return i;if(je(i)){const c=a&&fn(s)?i:i.value;return r&&we(c)?sn(c):c}return we(i)?r?sn(i):yn(i):i}}class Io extends Ao{constructor(t=!1){super(!1,t)}set(t,s,n,r){let l=t[s];const a=ne(t)&&fn(s);if(!this._isShallow){const m=vt(l);if(!Je(n)&&!vt(n)&&(l=he(l),n=he(n)),!a&&je(l)&&!je(n))return m||(l.value=n),!0}const i=a?Number(s)<t.length:ge(t,s),c=Reflect.set(t,s,n,je(t)?t:r);return t===he(r)&&(i?st(n,l)&&dt(t,"set",s,n):dt(t,"add",s,n)),c}deleteProperty(t,s){const n=ge(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&dt(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!rt(s)||!Eo.has(s))&&De(t,"has",s),n}ownKeys(t){return De(t,"iterate",ne(t)?"length":Et),Reflect.ownKeys(t)}}class Nr extends Ao{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Ur=new Io,Vr=new Nr,Br=new Io(!0);const tn=e=>e,ms=e=>Reflect.getPrototypeOf(e);function Fr(e,t,s){return function(...n){const r=this.__v_raw,l=he(r),a=jt(l),i=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,m=r[e](...n),u=s?tn:t?Vt:Ye;return!t&&De(l,"iterate",c?en:Et),Oe(Object.create(m),{next(){const{value:f,done:g}=m.next();return g?{value:f,done:g}:{value:i?[u(f[0]),u(f[1])]:u(f),done:g}}})}}function xs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Hr(e,t){const s={get(r){const l=this.__v_raw,a=he(l),i=he(r);e||(st(r,i)&&De(a,"get",r),De(a,"get",i));const{has:c}=ms(a),m=t?tn:e?Vt:Ye;if(c.call(a,r))return m(l.get(r));if(c.call(a,i))return m(l.get(i));l!==a&&l.get(r)},get size(){const r=this.__v_raw;return!e&&De(he(r),"iterate",Et),r.size},has(r){const l=this.__v_raw,a=he(l),i=he(r);return e||(st(r,i)&&De(a,"has",r),De(a,"has",i)),r===i?l.has(r):l.has(r)||l.has(i)},forEach(r,l){const a=this,i=a.__v_raw,c=he(i),m=t?tn:e?Vt:Ye;return!e&&De(c,"iterate",Et),i.forEach((u,f)=>r.call(l,m(u),m(f),a))}};return Oe(s,e?{add:xs("add"),set:xs("set"),delete:xs("delete"),clear:xs("clear")}:{add(r){const l=he(this),a=ms(l),i=he(r),c=!t&&!Je(r)&&!vt(r)?i:r;return a.has.call(l,c)||st(r,c)&&a.has.call(l,r)||st(i,c)&&a.has.call(l,i)||(l.add(c),dt(l,"add",c,c)),this},set(r,l){!t&&!Je(l)&&!vt(l)&&(l=he(l));const a=he(this),{has:i,get:c}=ms(a);let m=i.call(a,r);m||(r=he(r),m=i.call(a,r));const u=c.call(a,r);return a.set(r,l),m?st(l,u)&&dt(a,"set",r,l):dt(a,"add",r,l),this},delete(r){const l=he(this),{has:a,get:i}=ms(l);let c=a.call(l,r);c||(r=he(r),c=a.call(l,r)),i&&i.call(l,r);const m=l.delete(r);return c&&dt(l,"delete",r,void 0),m},clear(){const r=he(this),l=r.size!==0,a=r.clear();return l&&dt(r,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Fr(r,e,t)}),s}function gn(e,t){const s=Hr(e,t);return(n,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(ge(s,r)&&r in n?s:n,r,l)}const Kr={get:gn(!1,!1)},Wr={get:gn(!1,!0)},zr={get:gn(!0,!1)};const Mo=new WeakMap,Oo=new WeakMap,Do=new WeakMap,Jr=new WeakMap;function qr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Gr(e){return e.__v_skip||!Object.isExtensible(e)?0:qr(br(e))}function yn(e){return vt(e)?e:bn(e,!1,Ur,Kr,Mo)}function Yr(e){return bn(e,!1,Br,Wr,Oo)}function sn(e){return bn(e,!0,Vr,zr,Do)}function bn(e,t,s,n,r){if(!we(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const l=Gr(e);if(l===0)return e;const a=r.get(e);if(a)return a;const i=new Proxy(e,l===2?n:s);return r.set(e,i),i}function At(e){return vt(e)?At(e.__v_raw):!!(e&&e.__v_isReactive)}function vt(e){return!!(e&&e.__v_isReadonly)}function Je(e){return!!(e&&e.__v_isShallow)}function _n(e){return e?!!e.__v_raw:!1}function he(e){const t=e&&e.__v_raw;return t?he(t):e}function Zr(e){return!ge(e,"__v_skip")&&Object.isExtensible(e)&&ho(e,"__v_skip",!0),e}const Ye=e=>we(e)?yn(e):e,Vt=e=>we(e)?sn(e):e;function je(e){return e?e.__v_isRef===!0:!1}function w(e){return Qr(e,!1)}function Qr(e,t){return je(e)?e:new Xr(e,t)}class Xr{constructor(t,s){this.dep=new hn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:he(t),this._value=s?t:Ye(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Je(t)||vt(t);t=n?t:he(t),st(t,s)&&(this._rawValue=t,this._value=n?t:Ye(t),this.dep.trigger())}}function el(e){return je(e)?e.value:e}const tl={get:(e,t,s)=>t==="__v_raw"?e:el(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return je(r)&&!je(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function Ro(e){return At(e)?e:new Proxy(e,tl)}class sl{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new hn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=rs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Ce!==this)return ko(this,!0),!0}get value(){const t=this.dep.track();return Co(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function nl(e,t,s=!1){let n,r;return ae(e)?n=e:(n=e.get,r=e.set),new sl(n,r,s)}const vs={},ks=new WeakMap;let Pt;function ol(e,t=!1,s=Pt){if(s){let n=ks.get(s);n||ks.set(s,n=[]),n.push(e)}}function rl(e,t,s=ke){const{immediate:n,deep:r,once:l,scheduler:a,augmentJob:i,call:c}=s,m=R=>r?R:Je(R)||r===!1||r===0?ft(R,1):ft(R);let u,f,g,C,K=!1,I=!1;if(je(e)?(f=()=>e.value,K=Je(e)):At(e)?(f=()=>m(e),K=!0):ne(e)?(I=!0,K=e.some(R=>At(R)||Je(R)),f=()=>e.map(R=>{if(je(R))return R.value;if(At(R))return m(R);if(ae(R))return c?c(R,2):R()})):ae(e)?t?f=c?()=>c(e,2):e:f=()=>{if(g){mt();try{g()}finally{xt()}}const R=Pt;Pt=u;try{return c?c(e,3,[C]):e(C)}finally{Pt=R}}:f=nt,t&&r){const R=f,F=r===!0?1/0:r;f=()=>ft(R(),F)}const z=Ir(),P=()=>{u.stop(),z&&z.active&&dn(z.effects,u)};if(l&&t){const R=t;t=(...F)=>{R(...F),P()}}let O=I?new Array(e.length).fill(vs):vs;const V=R=>{if(!(!(u.flags&1)||!u.dirty&&!R))if(t){const F=u.run();if(r||K||(I?F.some((b,k)=>st(b,O[k])):st(F,O))){g&&g();const b=Pt;Pt=u;try{const k=[F,O===vs?void 0:I&&O[0]===vs?[]:O,C];O=F,c?c(t,3,k):t(...k)}finally{Pt=b}}}else u.run()};return i&&i(V),u=new _o(f),u.scheduler=a?()=>a(V,!1):V,C=R=>ol(R,!1,u),g=u.onStop=()=>{const R=ks.get(u);if(R){if(c)c(R,4);else for(const F of R)F();ks.delete(u)}},t?n?V(!0):O=u.run():a?a(V.bind(null,!0),!0):u.run(),P.pause=u.pause.bind(u),P.resume=u.resume.bind(u),P.stop=P,P}function ft(e,t=1/0,s){if(t<=0||!we(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,je(e))ft(e.value,t,s);else if(ne(e))for(let n=0;n<e.length;n++)ft(e[n],t,s);else if(Ht(e)||jt(e))e.forEach(n=>{ft(n,t,s)});else if(vo(e)){for(const n in e)ft(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ft(e[n],t,s)}return e}/**
|
|
57
57
|
* @vue/runtime-core v3.5.31
|
|
58
58
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
59
59
|
* @license MIT
|
|
60
|
-
**/function ds(e,t,s,n){try{return n?e(...n):e()}catch(r){Rs(r,t,s)}}function lt(e,t,s,n){if(oe(e)){const r=ds(e,t,s,n);return r&&mo(r)&&r.catch(l=>{Rs(l,t,s)}),r}if(X(e)){const r=[];for(let l=0;l<e.length;l++)r.push(lt(e[l],t,s,n));return r}}function Rs(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||ge;if(t){let u=t.parent;const d=t.proxy,x=`https://vuejs.org/error-reference/#runtime-${s}`;for(;u;){const f=u.ec;if(f){for(let m=0;m<f.length;m++)if(f[m](e,d,x)===!1)return}u=u.parent}if(l){xt(),ds(l,null,10,[e,d,x]),vt();return}}ll(e,s,r,n,a)}function ll(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const De=[];let Qe=-1;const jt=[];let _t=null,Mt=0;const jo=Promise.resolve();let ks=null;function Lo(e){const t=ks||jo;return e?t.then(this?e.bind(this):e):t}function al(e){let t=Qe+1,s=De.length;for(;t<s;){const n=t+s>>>1,r=De[n],l=ls(r);l<e||l===e&&r.flags&2?t=n+1:s=n}return t}function bn(e){if(!(e.flags&1)){const t=ls(e),s=De[De.length-1];!s||!(e.flags&2)&&t>=ls(s)?De.push(e):De.splice(al(t),0,e),e.flags|=1,Uo()}}function Uo(){ks||(ks=jo.then(Vo))}function il(e){X(e)?jt.push(...e):_t&&e.id===-1?_t.splice(Mt+1,0,e):e.flags&1||(jt.push(e),e.flags|=1),Uo()}function Dn(e,t,s=Qe+1){for(;s<De.length;s++){const n=De[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;De.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function No(e){if(jt.length){const t=[...new Set(jt)].sort((s,n)=>ls(s)-ls(n));if(jt.length=0,_t){_t.push(...t);return}for(_t=t,Mt=0;Mt<_t.length;Mt++){const s=_t[Mt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}_t=null,Mt=0}}const ls=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vo(e){try{for(Qe=0;Qe<De.length;Qe++){const t=De[Qe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ds(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Qe<De.length;Qe++){const t=De[Qe];t&&(t.flags&=-2)}Qe=-1,De.length=0,No(),ks=null,(De.length||jt.length)&&Vo()}}let Ne=null,Bo=null;function Ss(e){const t=Ne;return Ne=e,Bo=e&&e.type.__scopeId||null,t}function cl(e,t=Ne,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&zn(-1);const l=Ss(t);let a;try{a=e(...r)}finally{Ss(l),n._d&&zn(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function Z(e,t){if(Ne===null)return e;const s=Ns(Ne),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[l,a,u,d=ge]=t[r];l&&(oe(l)&&(l={mounted:l,updated:l}),l.deep&&pt(a),n.push({dir:l,instance:s,value:a,oldValue:void 0,arg:u,modifiers:d}))}return e}function $t(e,t,s,n){const r=e.dirs,l=t&&t.dirs;for(let a=0;a<r.length;a++){const u=r[a];l&&(u.oldValue=l[a].value);let d=u.dir[n];d&&(xt(),lt(d,s,8,[e.el,u,e,t]),vt())}}function ul(e,t){if(Ie){let s=Ie.provides;const n=Ie.parent&&Ie.parent.provides;n===s&&(s=Ie.provides=Object.create(n)),s[e]=t}}function gs(e,t,s=!1){const n=ua();if(n||Lt){let r=Lt?Lt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&oe(t)?t.call(n&&n.proxy):t}}const dl=Symbol.for("v-scx"),fl=()=>gs(dl);function Ws(e,t,s){return Fo(e,t,s)}function Fo(e,t,s=ge){const{immediate:n,deep:r,flush:l,once:a}=s,u=Ee({},s),d=t&&n||!t&&l!=="post";let x;if(is){if(l==="sync"){const k=fl();x=k.__watcherHandles||(k.__watcherHandles=[])}else if(!d){const k=()=>{};return k.stop=nt,k.resume=nt,k.pause=nt,k}}const f=Ie;u.call=(k,F,$)=>lt(k,f,F,$);let m=!1;l==="post"?u.scheduler=k=>{je(k,f&&f.suspense)}:l!=="sync"&&(m=!0,u.scheduler=(k,F)=>{F?k():bn(k)}),u.augmentJob=k=>{t&&(k.flags|=4),m&&(k.flags|=2,f&&(k.id=f.uid,k.i=f))};const v=rl(e,t,u);return is&&(x?x.push(v):d&&v()),v}function pl(e,t,s){const n=this.proxy,r=Se(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let l;oe(t)?l=t:(l=t.handler,s=t);const a=fs(this),u=Fo(r,l.bind(n),s);return a(),u}function Ho(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const ml=Symbol("_vte"),xl=e=>e.__isTeleport,vl=Symbol("_leaveCb");function _n(e,t){e.shapeFlag&6&&e.component?(e.transition=t,_n(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function He(e,t){return oe(e)?Ee({name:e.name},t,{setup:e}):e}function Ko(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Rn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const $s=new WeakMap;function es(e,t,s,n,r=!1){if(X(e)){e.forEach(($,N)=>es($,t&&(X(t)?t[N]:t),s,n,r));return}if(ts(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&es(e,t,s,n.component.subTree);return}const l=n.shapeFlag&4?Ns(n.component):n.el,a=r?null:l,{i:u,r:d}=e,x=t&&t.r,f=u.refs===ge?u.refs={}:u.refs,m=u.setupState,v=ce(m),k=m===ge?po:$=>Rn(f,$)?!1:ue(v,$),F=($,N)=>!(N&&Rn(f,N));if(x!=null&&x!==d){if(jn(t),Se(x))f[x]=null,k(x)&&(m[x]=null);else if(Oe(x)){const $=t;F(x,$.k)&&(x.value=null),$.k&&(f[$.k]=null)}}if(oe(d))ds(d,u,12,[a,f]);else{const $=Se(d),N=Oe(d);if($||N){const C=()=>{if(e.f){const P=$?k(d)?m[d]:f[d]:F()||!e.k?d.value:f[e.k];if(r)X(P)&&cn(P,l);else if(X(P))P.includes(l)||P.push(l);else if($)f[d]=[l],k(d)&&(m[d]=f[d]);else{const j=[l];F(d,e.k)&&(d.value=j),e.k&&(f[e.k]=j)}}else $?(f[d]=a,k(d)&&(m[d]=a)):N&&(F(d,e.k)&&(d.value=a),e.k&&(f[e.k]=a))};if(a){const P=()=>{C(),$s.delete(e)};P.id=-1,$s.set(e,P),je(P,s)}else jn(e),C()}}}function jn(e){const t=$s.get(e);t&&(t.flags|=8,$s.delete(e))}Ms().requestIdleCallback;Ms().cancelIdleCallback;const ts=e=>!!e.type.__asyncLoader,Wo=e=>e.type.__isKeepAlive;function hl(e,t){zo(e,"a",t)}function gl(e,t){zo(e,"da",t)}function zo(e,t,s=Ie){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(js(t,n,s),s){let r=s.parent;for(;r&&r.parent;)Wo(r.parent.vnode)&&yl(n,t,s,r),r=r.parent}}function yl(e,t,s,n){const r=js(t,e,n,!0);wn(()=>{cn(n[t],r)},s)}function js(e,t,s=Ie,n=!1){if(s){const r=s[e]||(s[e]=[]),l=t.__weh||(t.__weh=(...a)=>{xt();const u=fs(s),d=lt(t,s,e,a);return u(),vt(),d});return n?r.unshift(l):r.push(l),l}}const gt=e=>(t,s=Ie)=>{(!is||e==="sp")&&js(e,(...n)=>t(...n),s)},bl=gt("bm"),Be=gt("m"),_l=gt("bu"),wl=gt("u"),kl=gt("bum"),wn=gt("um"),Sl=gt("sp"),$l=gt("rtg"),Cl=gt("rtc");function Tl(e,t=Ie){js("ec",e,t)}const Pl="components",Jo=Symbol.for("v-ndc");function El(e){return Se(e)?Al(Pl,e,!1)||e:e||Jo}function Al(e,t,s=!0,n=!1){const r=Ne||Ie;if(r){const l=r.type;{const u=xa(l,!1);if(u&&(u===t||u===Re(t)||u===Is(Re(t))))return l}const a=Ln(r[e]||l[e],t)||Ln(r.appContext[e],t);return!a&&n?l:a}}function Ln(e,t){return e&&(e[t]||e[Re(t)]||e[Is(Re(t))])}function ve(e,t,s,n){let r;const l=s,a=X(e);if(a||Se(e)){const u=a&&Et(e);let d=!1,x=!1;u&&(d=!Fe(e),x=ht(e),e=Ds(e)),r=new Array(e.length);for(let f=0,m=e.length;f<m;f++)r[f]=t(d?x?Nt(ze(e[f])):ze(e[f]):e[f],f,void 0,l)}else if(typeof e=="number"){r=new Array(e);for(let u=0;u<e;u++)r[u]=t(u+1,u,void 0,l)}else if(pe(e))if(e[Symbol.iterator])r=Array.from(e,(u,d)=>t(u,d,void 0,l));else{const u=Object.keys(e);r=new Array(u.length);for(let d=0,x=u.length;d<x;d++){const f=u[d];r[d]=t(e[f],f,d,l)}}else r=[];return r}const tn=e=>e?xr(e)?Ns(e):tn(e.parent):null,ss=Ee(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>tn(e.parent),$root:e=>tn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Go(e),$forceUpdate:e=>e.f||(e.f=()=>{bn(e.update)}),$nextTick:e=>e.n||(e.n=Lo.bind(e.proxy)),$watch:e=>pl.bind(e)}),zs=(e,t)=>e!==ge&&!e.__isScriptSetup&&ue(e,t),Il={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:l,accessCache:a,type:u,appContext:d}=e;if(t[0]!=="$"){const v=a[t];if(v!==void 0)switch(v){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return l[t]}else{if(zs(n,t))return a[t]=1,n[t];if(r!==ge&&ue(r,t))return a[t]=2,r[t];if(ue(l,t))return a[t]=3,l[t];if(s!==ge&&ue(s,t))return a[t]=4,s[t];sn&&(a[t]=0)}}const x=ss[t];let f,m;if(x)return t==="$attrs"&&Ae(e.attrs,"get",""),x(e);if((f=u.__cssModules)&&(f=f[t]))return f;if(s!==ge&&ue(s,t))return a[t]=4,s[t];if(m=d.config.globalProperties,ue(m,t))return m[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:l}=e;return zs(r,t)?(r[t]=s,!0):n!==ge&&ue(n,t)?(n[t]=s,!0):ue(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:l,type:a}},u){let d;return!!(s[u]||e!==ge&&u[0]!=="$"&&ue(e,u)||zs(t,u)||ue(l,u)||ue(n,u)||ue(ss,u)||ue(r.config.globalProperties,u)||(d=a.__cssModules)&&d[u])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ue(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Un(e){return X(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let sn=!0;function Ol(e){const t=Go(e),s=e.proxy,n=e.ctx;sn=!1,t.beforeCreate&&Nn(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:a,watch:u,provide:d,inject:x,created:f,beforeMount:m,mounted:v,beforeUpdate:k,updated:F,activated:$,deactivated:N,beforeDestroy:C,beforeUnmount:P,destroyed:j,unmounted:I,render:U,renderTracked:y,renderTriggered:S,errorCaptured:D,serverPrefetch:G,expose:ae,inheritAttrs:J,components:O,directives:q,filters:re}=t;if(x&&Ml(x,n,null),a)for(const me in a){const ie=a[me];oe(ie)&&(n[me]=ie.bind(s))}if(r){const me=r.call(s,s);pe(me)&&(e.data=hn(me))}if(sn=!0,l)for(const me in l){const ie=l[me],z=oe(ie)?ie.bind(s,s):oe(ie.get)?ie.get.bind(s,s):nt,R=!oe(ie)&&oe(ie.set)?ie.set.bind(s):nt,Ce=Pe({get:z,set:R});Object.defineProperty(n,me,{enumerable:!0,configurable:!0,get:()=>Ce.value,set:we=>Ce.value=we})}if(u)for(const me in u)qo(u[me],n,s,me);if(d){const me=oe(d)?d.call(s):d;Reflect.ownKeys(me).forEach(ie=>{ul(ie,me[ie])})}f&&Nn(f,e,"c");function ke(me,ie){X(ie)?ie.forEach(z=>me(z.bind(s))):ie&&me(ie.bind(s))}if(ke(bl,m),ke(Be,v),ke(_l,k),ke(wl,F),ke(hl,$),ke(gl,N),ke(Tl,D),ke(Cl,y),ke($l,S),ke(kl,P),ke(wn,I),ke(Sl,G),X(ae))if(ae.length){const me=e.exposed||(e.exposed={});ae.forEach(ie=>{Object.defineProperty(me,ie,{get:()=>s[ie],set:z=>s[ie]=z,enumerable:!0})})}else e.exposed||(e.exposed={});U&&e.render===nt&&(e.render=U),J!=null&&(e.inheritAttrs=J),O&&(e.components=O),q&&(e.directives=q),G&&Ko(e)}function Ml(e,t,s=nt){X(e)&&(e=nn(e));for(const n in e){const r=e[n];let l;pe(r)?"default"in r?l=gs(r.from||n,r.default,!0):l=gs(r.from||n):l=gs(r),Oe(l)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:a=>l.value=a}):t[n]=l}}function Nn(e,t,s){lt(X(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function qo(e,t,s,n){let r=n.includes(".")?Ho(s,n):()=>s[n];if(Se(e)){const l=t[e];oe(l)&&Ws(r,l)}else if(oe(e))Ws(r,e.bind(s));else if(pe(e))if(X(e))e.forEach(l=>qo(l,t,s,n));else{const l=oe(e.handler)?e.handler.bind(s):t[e.handler];oe(l)&&Ws(r,l,e)}}function Go(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:a}}=e.appContext,u=l.get(t);let d;return u?d=u:!r.length&&!s&&!n?d=t:(d={},r.length&&r.forEach(x=>Cs(d,x,a,!0)),Cs(d,t,a)),pe(t)&&l.set(t,d),d}function Cs(e,t,s,n=!1){const{mixins:r,extends:l}=t;l&&Cs(e,l,s,!0),r&&r.forEach(a=>Cs(e,a,s,!0));for(const a in t)if(!(n&&a==="expose")){const u=Dl[a]||s&&s[a];e[a]=u?u(e[a],t[a]):t[a]}return e}const Dl={data:Vn,props:Bn,emits:Bn,methods:Yt,computed:Yt,beforeCreate:Me,created:Me,beforeMount:Me,mounted:Me,beforeUpdate:Me,updated:Me,beforeDestroy:Me,beforeUnmount:Me,destroyed:Me,unmounted:Me,activated:Me,deactivated:Me,errorCaptured:Me,serverPrefetch:Me,components:Yt,directives:Yt,watch:jl,provide:Vn,inject:Rl};function Vn(e,t){return t?e?function(){return Ee(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function Rl(e,t){return Yt(nn(e),nn(t))}function nn(e){if(X(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Me(e,t){return e?[...new Set([].concat(e,t))]:t}function Yt(e,t){return e?Ee(Object.create(null),e,t):t}function Bn(e,t){return e?X(e)&&X(t)?[...new Set([...e,...t])]:Ee(Object.create(null),Un(e),Un(t??{})):t}function jl(e,t){if(!e)return t;if(!t)return e;const s=Ee(Object.create(null),e);for(const n in t)s[n]=Me(e[n],t[n]);return s}function Yo(){return{app:null,config:{isNativeTag:po,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ll=0;function Ul(e,t){return function(n,r=null){oe(n)||(n=Ee({},n)),r!=null&&!pe(r)&&(r=null);const l=Yo(),a=new WeakSet,u=[];let d=!1;const x=l.app={_uid:Ll++,_component:n,_props:r,_container:null,_context:l,_instance:null,version:ha,get config(){return l.config},set config(f){},use(f,...m){return a.has(f)||(f&&oe(f.install)?(a.add(f),f.install(x,...m)):oe(f)&&(a.add(f),f(x,...m))),x},mixin(f){return l.mixins.includes(f)||l.mixins.push(f),x},component(f,m){return m?(l.components[f]=m,x):l.components[f]},directive(f,m){return m?(l.directives[f]=m,x):l.directives[f]},mount(f,m,v){if(!d){const k=x._ceVNode||ot(n,r);return k.appContext=l,v===!0?v="svg":v===!1&&(v=void 0),e(k,f,v),d=!0,x._container=f,f.__vue_app__=x,Ns(k.component)}},onUnmount(f){u.push(f)},unmount(){d&&(lt(u,x._instance,16),e(null,x._container),delete x._container.__vue_app__)},provide(f,m){return l.provides[f]=m,x},runWithContext(f){const m=Lt;Lt=x;try{return f()}finally{Lt=m}}};return x}}let Lt=null;const Nl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Re(t)}Modifiers`]||e[`${St(t)}Modifiers`];function Vl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ge;let r=s;const l=t.startsWith("update:"),a=l&&Nl(n,t.slice(7));a&&(a.trim&&(r=s.map(f=>Se(f)?f.trim():f)),a.number&&(r=s.map(Os)));let u,d=n[u=Vs(t)]||n[u=Vs(Re(t))];!d&&l&&(d=n[u=Vs(St(t))]),d&<(d,e,6,r);const x=n[u+"Once"];if(x){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,lt(x,e,6,r)}}const Bl=new WeakMap;function Zo(e,t,s=!1){const n=s?Bl:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const l=e.emits;let a={},u=!1;if(!oe(e)){const d=x=>{const f=Zo(x,t,!0);f&&(u=!0,Ee(a,f))};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!l&&!u?(pe(e)&&n.set(e,null),null):(X(l)?l.forEach(d=>a[d]=null):Ee(a,l),pe(e)&&n.set(e,a),a)}function Ls(e,t){return!e||!Ps(t)?!1:(t=t.slice(2).replace(/Once$/,""),ue(e,t[0].toLowerCase()+t.slice(1))||ue(e,St(t))||ue(e,t))}function Fn(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[l],slots:a,attrs:u,emit:d,render:x,renderCache:f,props:m,data:v,setupState:k,ctx:F,inheritAttrs:$}=e,N=Ss(e);let C,P;try{if(s.shapeFlag&4){const I=r||n,U=I;C=tt(x.call(U,I,f,m,k,v,F)),P=u}else{const I=t;C=tt(I.length>1?I(m,{attrs:u,slots:a,emit:d}):I(m,null)),P=t.props?u:Fl(u)}}catch(I){ns.length=0,Rs(I,e,1),C=ot(kt)}let j=C;if(P&&$!==!1){const I=Object.keys(P),{shapeFlag:U}=j;I.length&&U&7&&(l&&I.some(Es)&&(P=Hl(P,l)),j=Vt(j,P,!1,!0))}return s.dirs&&(j=Vt(j,null,!1,!0),j.dirs=j.dirs?j.dirs.concat(s.dirs):s.dirs),s.transition&&_n(j,s.transition),C=j,Ss(N),C}const Fl=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ps(s))&&((t||(t={}))[s]=e[s]);return t},Hl=(e,t)=>{const s={};for(const n in e)(!Es(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Kl(e,t,s){const{props:n,children:r,component:l}=e,{props:a,children:u,patchFlag:d}=t,x=l.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&d>=0){if(d&1024)return!0;if(d&16)return n?Hn(n,a,x):!!a;if(d&8){const f=t.dynamicProps;for(let m=0;m<f.length;m++){const v=f[m];if(Qo(a,n,v)&&!Ls(x,v))return!0}}}else return(r||u)&&(!u||!u.$stable)?!0:n===a?!1:n?a?Hn(n,a,x):!0:!!a;return!1}function Hn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const l=n[r];if(Qo(t,e,l)&&!Ls(s,l))return!0}return!1}function Qo(e,t,s){const n=e[s],r=t[s];return s==="style"&&pe(n)&&pe(r)?!Ht(n,r):n!==r}function Wl({vnode:e,parent:t,suspense:s},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=n,e=r),r===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Xo={},er=()=>Object.create(Xo),tr=e=>Object.getPrototypeOf(e)===Xo;function zl(e,t,s,n=!1){const r={},l=er();e.propsDefaults=Object.create(null),sr(e,t,r,l);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);s?e.props=n?r:Yr(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function Jl(e,t,s,n){const{props:r,attrs:l,vnode:{patchFlag:a}}=e,u=ce(r),[d]=e.propsOptions;let x=!1;if((n||a>0)&&!(a&16)){if(a&8){const f=e.vnode.dynamicProps;for(let m=0;m<f.length;m++){let v=f[m];if(Ls(e.emitsOptions,v))continue;const k=t[v];if(d)if(ue(l,v))k!==l[v]&&(l[v]=k,x=!0);else{const F=Re(v);r[F]=on(d,u,F,k,e,!1)}else k!==l[v]&&(l[v]=k,x=!0)}}}else{sr(e,t,r,l)&&(x=!0);let f;for(const m in u)(!t||!ue(t,m)&&((f=St(m))===m||!ue(t,f)))&&(d?s&&(s[m]!==void 0||s[f]!==void 0)&&(r[m]=on(d,u,m,void 0,e,!0)):delete r[m]);if(l!==u)for(const m in l)(!t||!ue(t,m))&&(delete l[m],x=!0)}x&&ft(e.attrs,"set","")}function sr(e,t,s,n){const[r,l]=e.propsOptions;let a=!1,u;if(t)for(let d in t){if(Zt(d))continue;const x=t[d];let f;r&&ue(r,f=Re(d))?!l||!l.includes(f)?s[f]=x:(u||(u={}))[f]=x:Ls(e.emitsOptions,d)||(!(d in n)||x!==n[d])&&(n[d]=x,a=!0)}if(l){const d=ce(s),x=u||ge;for(let f=0;f<l.length;f++){const m=l[f];s[m]=on(r,d,m,x[m],e,!ue(x,m))}}return a}function on(e,t,s,n,r,l){const a=e[s];if(a!=null){const u=ue(a,"default");if(u&&n===void 0){const d=a.default;if(a.type!==Function&&!a.skipFactory&&oe(d)){const{propsDefaults:x}=r;if(s in x)n=x[s];else{const f=fs(r);n=x[s]=d.call(null,t),f()}}else n=d;r.ce&&r.ce._setProp(s,n)}a[0]&&(l&&!u?n=!1:a[1]&&(n===""||n===St(s))&&(n=!0))}return n}const ql=new WeakMap;function nr(e,t,s=!1){const n=s?ql:t.propsCache,r=n.get(e);if(r)return r;const l=e.props,a={},u=[];let d=!1;if(!oe(e)){const f=m=>{d=!0;const[v,k]=nr(m,t,!0);Ee(a,v),k&&u.push(...k)};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!l&&!d)return pe(e)&&n.set(e,Dt),Dt;if(X(l))for(let f=0;f<l.length;f++){const m=Re(l[f]);Kn(m)&&(a[m]=ge)}else if(l)for(const f in l){const m=Re(f);if(Kn(m)){const v=l[f],k=a[m]=X(v)||oe(v)?{type:v}:Ee({},v),F=k.type;let $=!1,N=!0;if(X(F))for(let C=0;C<F.length;++C){const P=F[C],j=oe(P)&&P.name;if(j==="Boolean"){$=!0;break}else j==="String"&&(N=!1)}else $=oe(F)&&F.name==="Boolean";k[0]=$,k[1]=N,($||ue(k,"default"))&&u.push(m)}}const x=[a,u];return pe(e)&&n.set(e,x),x}function Kn(e){return e[0]!=="$"&&!Zt(e)}const kn=e=>e==="_"||e==="_ctx"||e==="$stable",Sn=e=>X(e)?e.map(tt):[tt(e)],Gl=(e,t,s)=>{if(t._n)return t;const n=cl((...r)=>Sn(t(...r)),s);return n._c=!1,n},or=(e,t,s)=>{const n=e._ctx;for(const r in e){if(kn(r))continue;const l=e[r];if(oe(l))t[r]=Gl(r,l,n);else if(l!=null){const a=Sn(l);t[r]=()=>a}}},rr=(e,t)=>{const s=Sn(t);e.slots.default=()=>s},lr=(e,t,s)=>{for(const n in t)(s||!kn(n))&&(e[n]=t[n])},Yl=(e,t,s)=>{const n=e.slots=er();if(e.vnode.shapeFlag&32){const r=t._;r?(lr(n,t,s),s&&ho(n,"_",r,!0)):or(t,n)}else t&&rr(e,t)},Zl=(e,t,s)=>{const{vnode:n,slots:r}=e;let l=!0,a=ge;if(n.shapeFlag&32){const u=t._;u?s&&u===1?l=!1:lr(r,t,s):(l=!t.$stable,or(t,r)),a=t}else t&&(rr(e,t),a={default:1});if(l)for(const u in r)!kn(u)&&a[u]==null&&delete r[u]},je=sa;function Ql(e){return Xl(e)}function Xl(e,t){const s=Ms();s.__VUE__=!0;const{insert:n,remove:r,patchProp:l,createElement:a,createText:u,createComment:d,setText:x,setElementText:f,parentNode:m,nextSibling:v,setScopeId:k=nt,insertStaticContent:F}=e,$=(i,c,_,T=null,p=null,E=null,B=void 0,M=null,L=!!c.dynamicChildren)=>{if(i===c)return;i&&!Jt(i,c)&&(T=yt(i),we(i,p,E,!0),i=null),c.patchFlag===-2&&(L=!1,c.dynamicChildren=null);const{type:A,ref:Q,shapeFlag:H}=c;switch(A){case Us:N(i,c,_,T);break;case kt:C(i,c,_,T);break;case ys:i==null&&P(c,_,T,B);break;case se:O(i,c,_,T,p,E,B,M,L);break;default:H&1?U(i,c,_,T,p,E,B,M,L):H&6?q(i,c,_,T,p,E,B,M,L):(H&64||H&128)&&A.process(i,c,_,T,p,E,B,M,L,Ke)}Q!=null&&p?es(Q,i&&i.ref,E,c||i,!c):Q==null&&i&&i.ref!=null&&es(i.ref,null,E,i,!0)},N=(i,c,_,T)=>{if(i==null)n(c.el=u(c.children),_,T);else{const p=c.el=i.el;c.children!==i.children&&x(p,c.children)}},C=(i,c,_,T)=>{i==null?n(c.el=d(c.children||""),_,T):c.el=i.el},P=(i,c,_,T)=>{[i.el,i.anchor]=F(i.children,c,_,T,i.el,i.anchor)},j=({el:i,anchor:c},_,T)=>{let p;for(;i&&i!==c;)p=v(i),n(i,_,T),i=p;n(c,_,T)},I=({el:i,anchor:c})=>{let _;for(;i&&i!==c;)_=v(i),r(i),i=_;r(c)},U=(i,c,_,T,p,E,B,M,L)=>{if(c.type==="svg"?B="svg":c.type==="math"&&(B="mathml"),i==null)y(c,_,T,p,E,B,M,L);else{const A=i.el&&i.el._isVueCE?i.el:null;try{A&&A._beginPatch(),G(i,c,p,E,B,M,L)}finally{A&&A._endPatch()}}},y=(i,c,_,T,p,E,B,M)=>{let L,A;const{props:Q,shapeFlag:H,transition:Y,dirs:ee}=i;if(L=i.el=a(i.type,E,Q&&Q.is,Q),H&8?f(L,i.children):H&16&&D(i.children,L,null,T,p,Js(i,E),B,M),ee&&$t(i,null,T,"created"),S(L,i,i.scopeId,B,T),Q){for(const xe in Q)xe!=="value"&&!Zt(xe)&&l(L,xe,null,Q[xe],E,T);"value"in Q&&l(L,"value",null,Q.value,E),(A=Q.onVnodeBeforeMount)&&Ze(A,T,i)}ee&&$t(i,null,T,"beforeMount");const le=ea(p,Y);le&&Y.beforeEnter(L),n(L,c,_),((A=Q&&Q.onVnodeMounted)||le||ee)&&je(()=>{try{A&&Ze(A,T,i),le&&Y.enter(L),ee&&$t(i,null,T,"mounted")}finally{}},p)},S=(i,c,_,T,p)=>{if(_&&k(i,_),T)for(let E=0;E<T.length;E++)k(i,T[E]);if(p){let E=p.subTree;if(c===E||ur(E.type)&&(E.ssContent===c||E.ssFallback===c)){const B=p.vnode;S(i,B,B.scopeId,B.slotScopeIds,p.parent)}}},D=(i,c,_,T,p,E,B,M,L=0)=>{for(let A=L;A<i.length;A++){const Q=i[A]=M?dt(i[A]):tt(i[A]);$(null,Q,c,_,T,p,E,B,M)}},G=(i,c,_,T,p,E,B)=>{const M=c.el=i.el;let{patchFlag:L,dynamicChildren:A,dirs:Q}=c;L|=i.patchFlag&16;const H=i.props||ge,Y=c.props||ge;let ee;if(_&&Ct(_,!1),(ee=Y.onVnodeBeforeUpdate)&&Ze(ee,_,c,i),Q&&$t(c,i,_,"beforeUpdate"),_&&Ct(_,!0),(H.innerHTML&&Y.innerHTML==null||H.textContent&&Y.textContent==null)&&f(M,""),A?ae(i.dynamicChildren,A,M,_,T,Js(c,p),E):B||ie(i,c,M,null,_,T,Js(c,p),E,!1),L>0){if(L&16)J(M,H,Y,_,p);else if(L&2&&H.class!==Y.class&&l(M,"class",null,Y.class,p),L&4&&l(M,"style",H.style,Y.style,p),L&8){const le=c.dynamicProps;for(let xe=0;xe<le.length;xe++){const ye=le[xe],$e=H[ye],Te=Y[ye];(Te!==$e||ye==="value")&&l(M,ye,$e,Te,p,_)}}L&1&&i.children!==c.children&&f(M,c.children)}else!B&&A==null&&J(M,H,Y,_,p);((ee=Y.onVnodeUpdated)||Q)&&je(()=>{ee&&Ze(ee,_,c,i),Q&&$t(c,i,_,"updated")},T)},ae=(i,c,_,T,p,E,B)=>{for(let M=0;M<c.length;M++){const L=i[M],A=c[M],Q=L.el&&(L.type===se||!Jt(L,A)||L.shapeFlag&198)?m(L.el):_;$(L,A,Q,null,T,p,E,B,!0)}},J=(i,c,_,T,p)=>{if(c!==_){if(c!==ge)for(const E in c)!Zt(E)&&!(E in _)&&l(i,E,c[E],null,p,T);for(const E in _){if(Zt(E))continue;const B=_[E],M=c[E];B!==M&&E!=="value"&&l(i,E,M,B,p,T)}"value"in _&&l(i,"value",c.value,_.value,p)}},O=(i,c,_,T,p,E,B,M,L)=>{const A=c.el=i?i.el:u(""),Q=c.anchor=i?i.anchor:u("");let{patchFlag:H,dynamicChildren:Y,slotScopeIds:ee}=c;ee&&(M=M?M.concat(ee):ee),i==null?(n(A,_,T),n(Q,_,T),D(c.children||[],_,Q,p,E,B,M,L)):H>0&&H&64&&Y&&i.dynamicChildren&&i.dynamicChildren.length===Y.length?(ae(i.dynamicChildren,Y,_,p,E,B,M),(c.key!=null||p&&c===p.subTree)&&ar(i,c,!0)):ie(i,c,_,Q,p,E,B,M,L)},q=(i,c,_,T,p,E,B,M,L)=>{c.slotScopeIds=M,i==null?c.shapeFlag&512?p.ctx.activate(c,_,T,B,L):re(c,_,T,p,E,B,L):_e(i,c,L)},re=(i,c,_,T,p,E,B)=>{const M=i.component=ca(i,T,p);if(Wo(i)&&(M.ctx.renderer=Ke),da(M,!1,B),M.asyncDep){if(p&&p.registerDep(M,ke,B),!i.el){const L=M.subTree=ot(kt);C(null,L,c,_),i.placeholder=L.el}}else ke(M,i,c,_,p,E,B)},_e=(i,c,_)=>{const T=c.component=i.component;if(Kl(i,c,_))if(T.asyncDep&&!T.asyncResolved){me(T,c,_);return}else T.next=c,T.update();else c.el=i.el,T.vnode=c},ke=(i,c,_,T,p,E,B)=>{const M=()=>{if(i.isMounted){let{next:H,bu:Y,u:ee,parent:le,vnode:xe}=i;{const Ge=ir(i);if(Ge){H&&(H.el=xe.el,me(i,H,B)),Ge.asyncDep.then(()=>{je(()=>{i.isUnmounted||A()},p)});return}}let ye=H,$e;Ct(i,!1),H?(H.el=xe.el,me(i,H,B)):H=xe,Y&&hs(Y),($e=H.props&&H.props.onVnodeBeforeUpdate)&&Ze($e,le,H,xe),Ct(i,!0);const Te=Fn(i),qe=i.subTree;i.subTree=Te,$(qe,Te,m(qe.el),yt(qe),i,p,E),H.el=Te.el,ye===null&&Wl(i,Te.el),ee&&je(ee,p),($e=H.props&&H.props.onVnodeUpdated)&&je(()=>Ze($e,le,H,xe),p)}else{let H;const{el:Y,props:ee}=c,{bm:le,m:xe,parent:ye,root:$e,type:Te}=i,qe=ts(c);Ct(i,!1),le&&hs(le),!qe&&(H=ee&&ee.onVnodeBeforeMount)&&Ze(H,ye,c),Ct(i,!0);{$e.ce&&$e.ce._hasShadowRoot()&&$e.ce._injectChildStyle(Te,i.parent?i.parent.type:void 0);const Ge=i.subTree=Fn(i);$(null,Ge,_,T,i,p,E),c.el=Ge.el}if(xe&&je(xe,p),!qe&&(H=ee&&ee.onVnodeMounted)){const Ge=c;je(()=>Ze(H,ye,Ge),p)}(c.shapeFlag&256||ye&&ts(ye.vnode)&&ye.vnode.shapeFlag&256)&&i.a&&je(i.a,p),i.isMounted=!0,c=_=T=null}};i.scope.on();const L=i.effect=new _o(M);i.scope.off();const A=i.update=L.run.bind(L),Q=i.job=L.runIfDirty.bind(L);Q.i=i,Q.id=i.uid,L.scheduler=()=>bn(Q),Ct(i,!0),A()},me=(i,c,_)=>{c.component=i;const T=i.vnode.props;i.vnode=c,i.next=null,Jl(i,c.props,T,_),Zl(i,c.children,_),xt(),Dn(i),vt()},ie=(i,c,_,T,p,E,B,M,L=!1)=>{const A=i&&i.children,Q=i?i.shapeFlag:0,H=c.children,{patchFlag:Y,shapeFlag:ee}=c;if(Y>0){if(Y&128){R(A,H,_,T,p,E,B,M,L);return}else if(Y&256){z(A,H,_,T,p,E,B,M,L);return}}ee&8?(Q&16&&Je(A,p,E),H!==A&&f(_,H)):Q&16?ee&16?R(A,H,_,T,p,E,B,M,L):Je(A,p,E,!0):(Q&8&&f(_,""),ee&16&&D(H,_,T,p,E,B,M,L))},z=(i,c,_,T,p,E,B,M,L)=>{i=i||Dt,c=c||Dt;const A=i.length,Q=c.length,H=Math.min(A,Q);let Y;for(Y=0;Y<H;Y++){const ee=c[Y]=L?dt(c[Y]):tt(c[Y]);$(i[Y],ee,_,null,p,E,B,M,L)}A>Q?Je(i,p,E,!0,!1,H):D(c,_,T,p,E,B,M,L,H)},R=(i,c,_,T,p,E,B,M,L)=>{let A=0;const Q=c.length;let H=i.length-1,Y=Q-1;for(;A<=H&&A<=Y;){const ee=i[A],le=c[A]=L?dt(c[A]):tt(c[A]);if(Jt(ee,le))$(ee,le,_,null,p,E,B,M,L);else break;A++}for(;A<=H&&A<=Y;){const ee=i[H],le=c[Y]=L?dt(c[Y]):tt(c[Y]);if(Jt(ee,le))$(ee,le,_,null,p,E,B,M,L);else break;H--,Y--}if(A>H){if(A<=Y){const ee=Y+1,le=ee<Q?c[ee].el:T;for(;A<=Y;)$(null,c[A]=L?dt(c[A]):tt(c[A]),_,le,p,E,B,M,L),A++}}else if(A>Y)for(;A<=H;)we(i[A],p,E,!0),A++;else{const ee=A,le=A,xe=new Map;for(A=le;A<=Y;A++){const Ue=c[A]=L?dt(c[A]):tt(c[A]);Ue.key!=null&&xe.set(Ue.key,A)}let ye,$e=0;const Te=Y-le+1;let qe=!1,Ge=0;const Wt=new Array(Te);for(A=0;A<Te;A++)Wt[A]=0;for(A=ee;A<=H;A++){const Ue=i[A];if($e>=Te){we(Ue,p,E,!0);continue}let Ye;if(Ue.key!=null)Ye=xe.get(Ue.key);else for(ye=le;ye<=Y;ye++)if(Wt[ye-le]===0&&Jt(Ue,c[ye])){Ye=ye;break}Ye===void 0?we(Ue,p,E,!0):(Wt[Ye-le]=A+1,Ye>=Ge?Ge=Ye:qe=!0,$(Ue,c[Ye],_,null,p,E,B,M,L),$e++)}const Tn=qe?ta(Wt):Dt;for(ye=Tn.length-1,A=Te-1;A>=0;A--){const Ue=le+A,Ye=c[Ue],Pn=c[Ue+1],En=Ue+1<Q?Pn.el||cr(Pn):T;Wt[A]===0?$(null,Ye,_,En,p,E,B,M,L):qe&&(ye<0||A!==Tn[ye]?Ce(Ye,_,En,2):ye--)}}},Ce=(i,c,_,T,p=null)=>{const{el:E,type:B,transition:M,children:L,shapeFlag:A}=i;if(A&6){Ce(i.component.subTree,c,_,T);return}if(A&128){i.suspense.move(c,_,T);return}if(A&64){B.move(i,c,_,Ke);return}if(B===se){n(E,c,_);for(let H=0;H<L.length;H++)Ce(L[H],c,_,T);n(i.anchor,c,_);return}if(B===ys){j(i,c,_);return}if(T!==2&&A&1&&M)if(T===0)M.beforeEnter(E),n(E,c,_),je(()=>M.enter(E),p);else{const{leave:H,delayLeave:Y,afterLeave:ee}=M,le=()=>{i.ctx.isUnmounted?r(E):n(E,c,_)},xe=()=>{E._isLeaving&&E[vl](!0),H(E,()=>{le(),ee&&ee()})};Y?Y(E,le,xe):xe()}else n(E,c,_)},we=(i,c,_,T=!1,p=!1)=>{const{type:E,props:B,ref:M,children:L,dynamicChildren:A,shapeFlag:Q,patchFlag:H,dirs:Y,cacheIndex:ee,memo:le}=i;if(H===-2&&(p=!1),M!=null&&(xt(),es(M,null,_,i,!0),vt()),ee!=null&&(c.renderCache[ee]=void 0),Q&256){c.ctx.deactivate(i);return}const xe=Q&1&&Y,ye=!ts(i);let $e;if(ye&&($e=B&&B.onVnodeBeforeUnmount)&&Ze($e,c,i),Q&6)It(i.component,_,T);else{if(Q&128){i.suspense.unmount(_,T);return}xe&&$t(i,null,c,"beforeUnmount"),Q&64?i.type.remove(i,c,_,Ke,T):A&&!A.hasOnce&&(E!==se||H>0&&H&64)?Je(A,c,_,!1,!0):(E===se&&H&384||!p&&Q&16)&&Je(L,c,_),T&&fe(i)}const Te=le!=null&&ee==null;(ye&&($e=B&&B.onVnodeUnmounted)||xe||Te)&&je(()=>{$e&&Ze($e,c,i),xe&&$t(i,null,c,"unmounted"),Te&&(i.el=null)},_)},fe=i=>{const{type:c,el:_,anchor:T,transition:p}=i;if(c===se){at(_,T);return}if(c===ys){I(i);return}const E=()=>{r(_),p&&!p.persisted&&p.afterLeave&&p.afterLeave()};if(i.shapeFlag&1&&p&&!p.persisted){const{leave:B,delayLeave:M}=p,L=()=>B(_,E);M?M(i.el,E,L):L()}else E()},at=(i,c)=>{let _;for(;i!==c;)_=v(i),r(i),i=_;r(c)},It=(i,c,_)=>{const{bum:T,scope:p,job:E,subTree:B,um:M,m:L,a:A}=i;Wn(L),Wn(A),T&&hs(T),p.stop(),E&&(E.flags|=8,we(B,i,c,_)),M&&je(M,c),je(()=>{i.isUnmounted=!0},c)},Je=(i,c,_,T=!1,p=!1,E=0)=>{for(let B=E;B<i.length;B++)we(i[B],c,_,T,p)},yt=i=>{if(i.shapeFlag&6)return yt(i.component.subTree);if(i.shapeFlag&128)return i.suspense.next();const c=v(i.anchor||i.el),_=c&&c[ml];return _?v(_):c};let Kt=!1;const bt=(i,c,_)=>{let T;i==null?c._vnode&&(we(c._vnode,null,null,!0),T=c._vnode.component):$(c._vnode||null,i,c,null,null,null,_),c._vnode=i,Kt||(Kt=!0,Dn(T),No(),Kt=!1)},Ke={p:$,um:we,m:Ce,r:fe,mt:re,mc:D,pc:ie,pbc:ae,n:yt,o:e};return{render:bt,hydrate:void 0,createApp:Ul(bt)}}function Js({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Ct({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ea(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ar(e,t,s=!1){const n=e.children,r=t.children;if(X(n)&&X(r))for(let l=0;l<n.length;l++){const a=n[l];let u=r[l];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=r[l]=dt(r[l]),u.el=a.el),!s&&u.patchFlag!==-2&&ar(a,u)),u.type===Us&&(u.patchFlag===-1&&(u=r[l]=dt(u)),u.el=a.el),u.type===kt&&!u.el&&(u.el=a.el)}}function ta(e){const t=e.slice(),s=[0];let n,r,l,a,u;const d=e.length;for(n=0;n<d;n++){const x=e[n];if(x!==0){if(r=s[s.length-1],e[r]<x){t[n]=r,s.push(n);continue}for(l=0,a=s.length-1;l<a;)u=l+a>>1,e[s[u]]<x?l=u+1:a=u;x<e[s[l]]&&(l>0&&(t[n]=s[l-1]),s[l]=n)}}for(l=s.length,a=s[l-1];l-- >0;)s[l]=a,a=t[a];return s}function ir(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ir(t)}function Wn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function cr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?cr(t.subTree):null}const ur=e=>e.__isSuspense;function sa(e,t){t&&t.pendingBranch?X(e)?t.effects.push(...e):t.effects.push(e):il(e)}const se=Symbol.for("v-fgt"),Us=Symbol.for("v-txt"),kt=Symbol.for("v-cmt"),ys=Symbol.for("v-stc"),ns=[];let Ve=null;function h(e=!1){ns.push(Ve=e?null:[])}function na(){ns.pop(),Ve=ns[ns.length-1]||null}let as=1;function zn(e,t=!1){as+=e,e<0&&Ve&&t&&(Ve.hasOnce=!0)}function dr(e){return e.dynamicChildren=as>0?Ve||Dt:null,na(),as>0&&Ve&&Ve.push(e),e}function g(e,t,s,n,r,l){return dr(o(e,t,s,n,r,l,!0))}function fr(e,t,s,n,r){return dr(ot(e,t,s,n,r,!0))}function pr(e){return e?e.__v_isVNode===!0:!1}function Jt(e,t){return e.type===t.type&&e.key===t.key}const mr=({key:e})=>e??null,bs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Se(e)||Oe(e)||oe(e)?{i:Ne,r:e,k:t,f:!!s}:e:null);function o(e,t=null,s=null,n=0,r=null,l=e===se?0:1,a=!1,u=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mr(t),ref:t&&bs(t),scopeId:Bo,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ne};return u?($n(d,s),l&128&&e.normalize(d)):s&&(d.shapeFlag|=Se(s)?8:16),as>0&&!a&&Ve&&(d.patchFlag>0||l&6)&&d.patchFlag!==32&&Ve.push(d),d}const ot=oa;function oa(e,t=null,s=null,n=0,r=null,l=!1){if((!e||e===Jo)&&(e=kt),pr(e)){const u=Vt(e,t,!0);return s&&$n(u,s),as>0&&!l&&Ve&&(u.shapeFlag&6?Ve[Ve.indexOf(e)]=u:Ve.push(u)),u.patchFlag=-2,u}if(va(e)&&(e=e.__vccOpts),t){t=ra(t);let{class:u,style:d}=t;u&&!Se(u)&&(t.class=W(u)),pe(d)&&(yn(d)&&!X(d)&&(d=Ee({},d)),t.style=Ut(d))}const a=Se(e)?1:ur(e)?128:xl(e)?64:pe(e)?4:oe(e)?2:0;return o(e,t,s,n,r,a,l,!0)}function ra(e){return e?yn(e)||tr(e)?Ee({},e):e:null}function Vt(e,t,s=!1,n=!1){const{props:r,ref:l,patchFlag:a,children:u,transition:d}=e,x=t?la(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:x,key:x&&mr(x),ref:t&&t.ref?s&&l?X(l)?l.concat(bs(t)):[l,bs(t)]:bs(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==se?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vt(e.ssContent),ssFallback:e.ssFallback&&Vt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&n&&_n(f,d.clone(f)),f}function te(e=" ",t=0){return ot(Us,null,e,t)}function ut(e,t){const s=ot(ys,null,e);return s.staticCount=t,s}function K(e="",t=!1){return t?(h(),fr(kt,null,e)):ot(kt,null,e)}function tt(e){return e==null||typeof e=="boolean"?ot(kt):X(e)?ot(se,null,e.slice()):pr(e)?dt(e):ot(Us,null,String(e))}function dt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vt(e)}function $n(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(X(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),$n(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!tr(t)?t._ctx=Ne:r===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:Ne},s=32):(t=String(t),n&64?(s=16,t=[te(t)]):s=8);e.children=t,e.shapeFlag|=s}function la(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=W([t.class,n.class]));else if(r==="style")t.style=Ut([t.style,n.style]);else if(Ps(r)){const l=t[r],a=n[r];a&&l!==a&&!(X(l)&&l.includes(a))?t[r]=l?[].concat(l,a):a:a==null&&l==null&&!Es(r)&&(t[r]=a)}else r!==""&&(t[r]=n[r])}return t}function Ze(e,t,s,n=null){lt(e,t,7,[s,n])}const aa=Yo();let ia=0;function ca(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||aa,l={uid:ia++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ar(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:nr(n,r),emitsOptions:Zo(n,r),emit:null,emitted:null,propsDefaults:ge,inheritAttrs:n.inheritAttrs,ctx:ge,data:ge,props:ge,attrs:ge,slots:ge,refs:ge,setupState:ge,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=Vl.bind(null,l),e.ce&&e.ce(l),l}let Ie=null;const ua=()=>Ie||Ne;let Ts,rn;{const e=Ms(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),l=>{r.length>1?r.forEach(a=>a(l)):r[0](l)}};Ts=t("__VUE_INSTANCE_SETTERS__",s=>Ie=s),rn=t("__VUE_SSR_SETTERS__",s=>is=s)}const fs=e=>{const t=Ie;return Ts(e),e.scope.on(),()=>{e.scope.off(),Ts(t)}},Jn=()=>{Ie&&Ie.scope.off(),Ts(null)};function xr(e){return e.vnode.shapeFlag&4}let is=!1;function da(e,t=!1,s=!1){t&&rn(t);const{props:n,children:r}=e.vnode,l=xr(e);zl(e,n,l,t),Yl(e,r,s||t);const a=l?fa(e,t):void 0;return t&&rn(!1),a}function fa(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Il);const{setup:n}=s;if(n){xt();const r=e.setupContext=n.length>1?ma(e):null,l=fs(e),a=ds(n,e,0,[e.props,r]),u=mo(a);if(vt(),l(),(u||e.sp)&&!ts(e)&&Ko(e),u){if(a.then(Jn,Jn),t)return a.then(d=>{qn(e,d)}).catch(d=>{Rs(d,e,0)});e.asyncDep=a}else qn(e,a)}else vr(e)}function qn(e,t,s){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:pe(t)&&(e.setupState=Ro(t)),vr(e)}function vr(e,t,s){const n=e.type;e.render||(e.render=n.render||nt);{const r=fs(e);xt();try{Ol(e)}finally{vt(),r()}}}const pa={get(e,t){return Ae(e,"get",""),e[t]}};function ma(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,pa),slots:e.slots,emit:e.emit,expose:t}}function Ns(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ro(Zr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ss)return ss[s](e)},has(t,s){return s in t||s in ss}})):e.proxy}function xa(e,t=!0){return oe(e)?e.displayName||e.name:e.name||t&&e.__name}function va(e){return oe(e)&&"__vccOpts"in e}const Pe=(e,t)=>nl(e,t,is),ha="3.5.31";/**
|
|
60
|
+
**/function fs(e,t,s,n){try{return n?e(...n):e()}catch(r){js(r,t,s)}}function lt(e,t,s,n){if(ae(e)){const r=fs(e,t,s,n);return r&&mo(r)&&r.catch(l=>{js(l,t,s)}),r}if(ne(e)){const r=[];for(let l=0;l<e.length;l++)r.push(lt(e[l],t,s,n));return r}}function js(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||ke;if(t){let i=t.parent;const c=t.proxy,m=`https://vuejs.org/error-reference/#runtime-${s}`;for(;i;){const u=i.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,c,m)===!1)return}i=i.parent}if(l){mt(),fs(l,null,10,[e,c,m]),xt();return}}ll(e,s,r,n,a)}function ll(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const Ne=[];let Xe=-1;const Lt=[];let yt=null,Dt=0;const jo=Promise.resolve();let Ss=null;function Lo(e){const t=Ss||jo;return e?t.then(this?e.bind(this):e):t}function al(e){let t=Xe+1,s=Ne.length;for(;t<s;){const n=t+s>>>1,r=Ne[n],l=as(r);l<e||l===e&&r.flags&2?t=n+1:s=n}return t}function wn(e){if(!(e.flags&1)){const t=as(e),s=Ne[Ne.length-1];!s||!(e.flags&2)&&t>=as(s)?Ne.push(e):Ne.splice(al(t),0,e),e.flags|=1,No()}}function No(){Ss||(Ss=jo.then(Vo))}function il(e){ne(e)?Lt.push(...e):yt&&e.id===-1?yt.splice(Dt+1,0,e):e.flags&1||(Lt.push(e),e.flags|=1),No()}function Dn(e,t,s=Xe+1){for(;s<Ne.length;s++){const n=Ne[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ne.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Uo(e){if(Lt.length){const t=[...new Set(Lt)].sort((s,n)=>as(s)-as(n));if(Lt.length=0,yt){yt.push(...t);return}for(yt=t,Dt=0;Dt<yt.length;Dt++){const s=yt[Dt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}yt=null,Dt=0}}const as=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vo(e){try{for(Xe=0;Xe<Ne.length;Xe++){const t=Ne[Xe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),fs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Xe<Ne.length;Xe++){const t=Ne[Xe];t&&(t.flags&=-2)}Xe=-1,Ne.length=0,Uo(),Ss=null,(Ne.length||Lt.length)&&Vo()}}let Ke=null,Bo=null;function $s(e){const t=Ke;return Ke=e,Bo=e&&e.type.__scopeId||null,t}function cl(e,t=Ke,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&zn(-1);const l=$s(t);let a;try{a=e(...r)}finally{$s(l),n._d&&zn(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function te(e,t){if(Ke===null)return e;const s=Vs(Ke),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[l,a,i,c=ke]=t[r];l&&(ae(l)&&(l={mounted:l,updated:l}),l.deep&&ft(a),n.push({dir:l,instance:s,value:a,oldValue:void 0,arg:i,modifiers:c}))}return e}function Ct(e,t,s,n){const r=e.dirs,l=t&&t.dirs;for(let a=0;a<r.length;a++){const i=r[a];l&&(i.oldValue=l[a].value);let c=i.dir[n];c&&(mt(),lt(c,s,8,[e.el,i,e,t]),xt())}}function ul(e,t){if(Re){let s=Re.provides;const n=Re.parent&&Re.parent.provides;n===s&&(s=Re.provides=Object.create(n)),s[e]=t}}function ys(e,t,s=!1){const n=ua();if(n||Nt){let r=Nt?Nt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&ae(t)?t.call(n&&n.proxy):t}}const dl=Symbol.for("v-scx"),fl=()=>ys(dl);function Js(e,t,s){return Fo(e,t,s)}function Fo(e,t,s=ke){const{immediate:n,deep:r,flush:l,once:a}=s,i=Oe({},s),c=t&&n||!t&&l!=="post";let m;if(cs){if(l==="sync"){const C=fl();m=C.__watcherHandles||(C.__watcherHandles=[])}else if(!c){const C=()=>{};return C.stop=nt,C.resume=nt,C.pause=nt,C}}const u=Re;i.call=(C,K,I)=>lt(C,u,K,I);let f=!1;l==="post"?i.scheduler=C=>{Be(C,u&&u.suspense)}:l!=="sync"&&(f=!0,i.scheduler=(C,K)=>{K?C():wn(C)}),i.augmentJob=C=>{t&&(C.flags|=4),f&&(C.flags|=2,u&&(C.id=u.uid,C.i=u))};const g=rl(e,t,i);return cs&&(m?m.push(g):c&&g()),g}function pl(e,t,s){const n=this.proxy,r=Ee(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let l;ae(t)?l=t:(l=t.handler,s=t);const a=ps(this),i=Fo(r,l.bind(n),s);return a(),i}function Ho(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const ml=Symbol("_vte"),xl=e=>e.__isTeleport,vl=Symbol("_leaveCb");function kn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,kn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function qe(e,t){return ae(e)?Oe({name:e.name},t,{setup:e}):e}function Ko(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Rn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Cs=new WeakMap;function ts(e,t,s,n,r=!1){if(ne(e)){e.forEach((I,z)=>ts(I,t&&(ne(t)?t[z]:t),s,n,r));return}if(ss(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ts(e,t,s,n.component.subTree);return}const l=n.shapeFlag&4?Vs(n.component):n.el,a=r?null:l,{i,r:c}=e,m=t&&t.r,u=i.refs===ke?i.refs={}:i.refs,f=i.setupState,g=he(f),C=f===ke?po:I=>Rn(u,I)?!1:ge(g,I),K=(I,z)=>!(z&&Rn(u,z));if(m!=null&&m!==c){if(jn(t),Ee(m))u[m]=null,C(m)&&(f[m]=null);else if(je(m)){const I=t;K(m,I.k)&&(m.value=null),I.k&&(u[I.k]=null)}}if(ae(c))fs(c,i,12,[a,u]);else{const I=Ee(c),z=je(c);if(I||z){const P=()=>{if(e.f){const O=I?C(c)?f[c]:u[c]:K()||!e.k?c.value:u[e.k];if(r)ne(O)&&dn(O,l);else if(ne(O))O.includes(l)||O.push(l);else if(I)u[c]=[l],C(c)&&(f[c]=u[c]);else{const V=[l];K(c,e.k)&&(c.value=V),e.k&&(u[e.k]=V)}}else I?(u[c]=a,C(c)&&(f[c]=a)):z&&(K(c,e.k)&&(c.value=a),e.k&&(u[e.k]=a))};if(a){const O=()=>{P(),Cs.delete(e)};O.id=-1,Cs.set(e,O),Be(O,s)}else jn(e),P()}}}function jn(e){const t=Cs.get(e);t&&(t.flags|=8,Cs.delete(e))}Ds().requestIdleCallback;Ds().cancelIdleCallback;const ss=e=>!!e.type.__asyncLoader,Wo=e=>e.type.__isKeepAlive;function hl(e,t){zo(e,"a",t)}function gl(e,t){zo(e,"da",t)}function zo(e,t,s=Re){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Ls(t,n,s),s){let r=s.parent;for(;r&&r.parent;)Wo(r.parent.vnode)&&yl(n,t,s,r),r=r.parent}}function yl(e,t,s,n){const r=Ls(t,e,n,!0);Sn(()=>{dn(n[t],r)},s)}function Ls(e,t,s=Re,n=!1){if(s){const r=s[e]||(s[e]=[]),l=t.__weh||(t.__weh=(...a)=>{mt();const i=ps(s),c=lt(t,s,e,a);return i(),xt(),c});return n?r.unshift(l):r.push(l),l}}const ht=e=>(t,s=Re)=>{(!cs||e==="sp")&&Ls(e,(...n)=>t(...n),s)},bl=ht("bm"),ze=ht("m"),_l=ht("bu"),wl=ht("u"),kl=ht("bum"),Sn=ht("um"),Sl=ht("sp"),$l=ht("rtg"),Cl=ht("rtc");function Tl(e,t=Re){Ls("ec",e,t)}const Pl="components",Jo=Symbol.for("v-ndc");function El(e){return Ee(e)?Al(Pl,e,!1)||e:e||Jo}function Al(e,t,s=!0,n=!1){const r=Ke||Re;if(r){const l=r.type;{const i=xa(l,!1);if(i&&(i===t||i===Ue(t)||i===Ms(Ue(t))))return l}const a=Ln(r[e]||l[e],t)||Ln(r.appContext[e],t);return!a&&n?l:a}}function Ln(e,t){return e&&(e[t]||e[Ue(t)]||e[Ms(Ue(t))])}function be(e,t,s,n){let r;const l=s,a=ne(e);if(a||Ee(e)){const i=a&&At(e);let c=!1,m=!1;i&&(c=!Je(e),m=vt(e),e=Rs(e)),r=new Array(e.length);for(let u=0,f=e.length;u<f;u++)r[u]=t(c?m?Vt(Ye(e[u])):Ye(e[u]):e[u],u,void 0,l)}else if(typeof e=="number"){r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,l)}else if(we(e))if(e[Symbol.iterator])r=Array.from(e,(i,c)=>t(i,c,void 0,l));else{const i=Object.keys(e);r=new Array(i.length);for(let c=0,m=i.length;c<m;c++){const u=i[c];r[c]=t(e[u],u,c,l)}}else r=[];return r}const nn=e=>e?xr(e)?Vs(e):nn(e.parent):null,ns=Oe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>nn(e.parent),$root:e=>nn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Go(e),$forceUpdate:e=>e.f||(e.f=()=>{wn(e.update)}),$nextTick:e=>e.n||(e.n=Lo.bind(e.proxy)),$watch:e=>pl.bind(e)}),qs=(e,t)=>e!==ke&&!e.__isScriptSetup&&ge(e,t),Il={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:l,accessCache:a,type:i,appContext:c}=e;if(t[0]!=="$"){const g=a[t];if(g!==void 0)switch(g){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return l[t]}else{if(qs(n,t))return a[t]=1,n[t];if(r!==ke&&ge(r,t))return a[t]=2,r[t];if(ge(l,t))return a[t]=3,l[t];if(s!==ke&&ge(s,t))return a[t]=4,s[t];on&&(a[t]=0)}}const m=ns[t];let u,f;if(m)return t==="$attrs"&&De(e.attrs,"get",""),m(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(s!==ke&&ge(s,t))return a[t]=4,s[t];if(f=c.config.globalProperties,ge(f,t))return f[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:l}=e;return qs(r,t)?(r[t]=s,!0):n!==ke&&ge(n,t)?(n[t]=s,!0):ge(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:l,type:a}},i){let c;return!!(s[i]||e!==ke&&i[0]!=="$"&&ge(e,i)||qs(t,i)||ge(l,i)||ge(n,i)||ge(ns,i)||ge(r.config.globalProperties,i)||(c=a.__cssModules)&&c[i])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ge(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Nn(e){return ne(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let on=!0;function Ml(e){const t=Go(e),s=e.proxy,n=e.ctx;on=!1,t.beforeCreate&&Un(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:a,watch:i,provide:c,inject:m,created:u,beforeMount:f,mounted:g,beforeUpdate:C,updated:K,activated:I,deactivated:z,beforeDestroy:P,beforeUnmount:O,destroyed:V,unmounted:R,render:F,renderTracked:b,renderTriggered:k,errorCaptured:L,serverPrefetch:Q,expose:ie,inheritAttrs:G,components:N,directives:q,filters:ce}=t;if(m&&Ol(m,n,null),a)for(const ye in a){const ve=a[ye];ae(ve)&&(n[ye]=ve.bind(s))}if(r){const ye=r.call(s,s);we(ye)&&(e.data=yn(ye))}if(on=!0,l)for(const ye in l){const ve=l[ye],Z=ae(ve)?ve.bind(s,s):ae(ve.get)?ve.get.bind(s,s):nt,j=!ae(ve)&&ae(ve.set)?ve.set.bind(s):nt,Ie=Me({get:Z,set:j});Object.defineProperty(n,ye,{enumerable:!0,configurable:!0,get:()=>Ie.value,set:Ae=>Ie.value=Ae})}if(i)for(const ye in i)qo(i[ye],n,s,ye);if(c){const ye=ae(c)?c.call(s):c;Reflect.ownKeys(ye).forEach(ve=>{ul(ve,ye[ve])})}u&&Un(u,e,"c");function Te(ye,ve){ne(ve)?ve.forEach(Z=>ye(Z.bind(s))):ve&&ye(ve.bind(s))}if(Te(bl,f),Te(ze,g),Te(_l,C),Te(wl,K),Te(hl,I),Te(gl,z),Te(Tl,L),Te(Cl,b),Te($l,k),Te(kl,O),Te(Sn,R),Te(Sl,Q),ne(ie))if(ie.length){const ye=e.exposed||(e.exposed={});ie.forEach(ve=>{Object.defineProperty(ye,ve,{get:()=>s[ve],set:Z=>s[ve]=Z,enumerable:!0})})}else e.exposed||(e.exposed={});F&&e.render===nt&&(e.render=F),G!=null&&(e.inheritAttrs=G),N&&(e.components=N),q&&(e.directives=q),Q&&Ko(e)}function Ol(e,t,s=nt){ne(e)&&(e=rn(e));for(const n in e){const r=e[n];let l;we(r)?"default"in r?l=ys(r.from||n,r.default,!0):l=ys(r.from||n):l=ys(r),je(l)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:a=>l.value=a}):t[n]=l}}function Un(e,t,s){lt(ne(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function qo(e,t,s,n){let r=n.includes(".")?Ho(s,n):()=>s[n];if(Ee(e)){const l=t[e];ae(l)&&Js(r,l)}else if(ae(e))Js(r,e.bind(s));else if(we(e))if(ne(e))e.forEach(l=>qo(l,t,s,n));else{const l=ae(e.handler)?e.handler.bind(s):t[e.handler];ae(l)&&Js(r,l,e)}}function Go(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:a}}=e.appContext,i=l.get(t);let c;return i?c=i:!r.length&&!s&&!n?c=t:(c={},r.length&&r.forEach(m=>Ts(c,m,a,!0)),Ts(c,t,a)),we(t)&&l.set(t,c),c}function Ts(e,t,s,n=!1){const{mixins:r,extends:l}=t;l&&Ts(e,l,s,!0),r&&r.forEach(a=>Ts(e,a,s,!0));for(const a in t)if(!(n&&a==="expose")){const i=Dl[a]||s&&s[a];e[a]=i?i(e[a],t[a]):t[a]}return e}const Dl={data:Vn,props:Bn,emits:Bn,methods:Zt,computed:Zt,beforeCreate:Le,created:Le,beforeMount:Le,mounted:Le,beforeUpdate:Le,updated:Le,beforeDestroy:Le,beforeUnmount:Le,destroyed:Le,unmounted:Le,activated:Le,deactivated:Le,errorCaptured:Le,serverPrefetch:Le,components:Zt,directives:Zt,watch:jl,provide:Vn,inject:Rl};function Vn(e,t){return t?e?function(){return Oe(ae(e)?e.call(this,this):e,ae(t)?t.call(this,this):t)}:t:e}function Rl(e,t){return Zt(rn(e),rn(t))}function rn(e){if(ne(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Le(e,t){return e?[...new Set([].concat(e,t))]:t}function Zt(e,t){return e?Oe(Object.create(null),e,t):t}function Bn(e,t){return e?ne(e)&&ne(t)?[...new Set([...e,...t])]:Oe(Object.create(null),Nn(e),Nn(t??{})):t}function jl(e,t){if(!e)return t;if(!t)return e;const s=Oe(Object.create(null),e);for(const n in t)s[n]=Le(e[n],t[n]);return s}function Yo(){return{app:null,config:{isNativeTag:po,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ll=0;function Nl(e,t){return function(n,r=null){ae(n)||(n=Oe({},n)),r!=null&&!we(r)&&(r=null);const l=Yo(),a=new WeakSet,i=[];let c=!1;const m=l.app={_uid:Ll++,_component:n,_props:r,_container:null,_context:l,_instance:null,version:ha,get config(){return l.config},set config(u){},use(u,...f){return a.has(u)||(u&&ae(u.install)?(a.add(u),u.install(m,...f)):ae(u)&&(a.add(u),u(m,...f))),m},mixin(u){return l.mixins.includes(u)||l.mixins.push(u),m},component(u,f){return f?(l.components[u]=f,m):l.components[u]},directive(u,f){return f?(l.directives[u]=f,m):l.directives[u]},mount(u,f,g){if(!c){const C=m._ceVNode||ot(n,r);return C.appContext=l,g===!0?g="svg":g===!1&&(g=void 0),e(C,u,g),c=!0,m._container=u,u.__vue_app__=m,Vs(C.component)}},onUnmount(u){i.push(u)},unmount(){c&&(lt(i,m._instance,16),e(null,m._container),delete m._container.__vue_app__)},provide(u,f){return l.provides[u]=f,m},runWithContext(u){const f=Nt;Nt=m;try{return u()}finally{Nt=f}}};return m}}let Nt=null;const Ul=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ue(t)}Modifiers`]||e[`${wt(t)}Modifiers`];function Vl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ke;let r=s;const l=t.startsWith("update:"),a=l&&Ul(n,t.slice(7));a&&(a.trim&&(r=s.map(u=>Ee(u)?u.trim():u)),a.number&&(r=s.map(Os)));let i,c=n[i=Fs(t)]||n[i=Fs(Ue(t))];!c&&l&&(c=n[i=Fs(wt(t))]),c&<(c,e,6,r);const m=n[i+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,lt(m,e,6,r)}}const Bl=new WeakMap;function Zo(e,t,s=!1){const n=s?Bl:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const l=e.emits;let a={},i=!1;if(!ae(e)){const c=m=>{const u=Zo(m,t,!0);u&&(i=!0,Oe(a,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!l&&!i?(we(e)&&n.set(e,null),null):(ne(l)?l.forEach(c=>a[c]=null):Oe(a,l),we(e)&&n.set(e,a),a)}function Ns(e,t){return!e||!Es(t)?!1:(t=t.slice(2).replace(/Once$/,""),ge(e,t[0].toLowerCase()+t.slice(1))||ge(e,wt(t))||ge(e,t))}function Fn(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[l],slots:a,attrs:i,emit:c,render:m,renderCache:u,props:f,data:g,setupState:C,ctx:K,inheritAttrs:I}=e,z=$s(e);let P,O;try{if(s.shapeFlag&4){const R=r||n,F=R;P=tt(m.call(F,R,u,f,C,g,K)),O=i}else{const R=t;P=tt(R.length>1?R(f,{attrs:i,slots:a,emit:c}):R(f,null)),O=t.props?i:Fl(i)}}catch(R){os.length=0,js(R,e,1),P=ot(_t)}let V=P;if(O&&I!==!1){const R=Object.keys(O),{shapeFlag:F}=V;R.length&&F&7&&(l&&R.some(As)&&(O=Hl(O,l)),V=Bt(V,O,!1,!0))}return s.dirs&&(V=Bt(V,null,!1,!0),V.dirs=V.dirs?V.dirs.concat(s.dirs):s.dirs),s.transition&&kn(V,s.transition),P=V,$s(z),P}const Fl=e=>{let t;for(const s in e)(s==="class"||s==="style"||Es(s))&&((t||(t={}))[s]=e[s]);return t},Hl=(e,t)=>{const s={};for(const n in e)(!As(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Kl(e,t,s){const{props:n,children:r,component:l}=e,{props:a,children:i,patchFlag:c}=t,m=l.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Hn(n,a,m):!!a;if(c&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const g=u[f];if(Qo(a,n,g)&&!Ns(m,g))return!0}}}else return(r||i)&&(!i||!i.$stable)?!0:n===a?!1:n?a?Hn(n,a,m):!0:!!a;return!1}function Hn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const l=n[r];if(Qo(t,e,l)&&!Ns(s,l))return!0}return!1}function Qo(e,t,s){const n=e[s],r=t[s];return s==="style"&&we(n)&&we(r)?!Kt(n,r):n!==r}function Wl({vnode:e,parent:t,suspense:s},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=n,e=r),r===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Xo={},er=()=>Object.create(Xo),tr=e=>Object.getPrototypeOf(e)===Xo;function zl(e,t,s,n=!1){const r={},l=er();e.propsDefaults=Object.create(null),sr(e,t,r,l);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);s?e.props=n?r:Yr(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function Jl(e,t,s,n){const{props:r,attrs:l,vnode:{patchFlag:a}}=e,i=he(r),[c]=e.propsOptions;let m=!1;if((n||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let g=u[f];if(Ns(e.emitsOptions,g))continue;const C=t[g];if(c)if(ge(l,g))C!==l[g]&&(l[g]=C,m=!0);else{const K=Ue(g);r[K]=ln(c,i,K,C,e,!1)}else C!==l[g]&&(l[g]=C,m=!0)}}}else{sr(e,t,r,l)&&(m=!0);let u;for(const f in i)(!t||!ge(t,f)&&((u=wt(f))===f||!ge(t,u)))&&(c?s&&(s[f]!==void 0||s[u]!==void 0)&&(r[f]=ln(c,i,f,void 0,e,!0)):delete r[f]);if(l!==i)for(const f in l)(!t||!ge(t,f))&&(delete l[f],m=!0)}m&&dt(e.attrs,"set","")}function sr(e,t,s,n){const[r,l]=e.propsOptions;let a=!1,i;if(t)for(let c in t){if(Qt(c))continue;const m=t[c];let u;r&&ge(r,u=Ue(c))?!l||!l.includes(u)?s[u]=m:(i||(i={}))[u]=m:Ns(e.emitsOptions,c)||(!(c in n)||m!==n[c])&&(n[c]=m,a=!0)}if(l){const c=he(s),m=i||ke;for(let u=0;u<l.length;u++){const f=l[u];s[f]=ln(r,c,f,m[f],e,!ge(m,f))}}return a}function ln(e,t,s,n,r,l){const a=e[s];if(a!=null){const i=ge(a,"default");if(i&&n===void 0){const c=a.default;if(a.type!==Function&&!a.skipFactory&&ae(c)){const{propsDefaults:m}=r;if(s in m)n=m[s];else{const u=ps(r);n=m[s]=c.call(null,t),u()}}else n=c;r.ce&&r.ce._setProp(s,n)}a[0]&&(l&&!i?n=!1:a[1]&&(n===""||n===wt(s))&&(n=!0))}return n}const ql=new WeakMap;function nr(e,t,s=!1){const n=s?ql:t.propsCache,r=n.get(e);if(r)return r;const l=e.props,a={},i=[];let c=!1;if(!ae(e)){const u=f=>{c=!0;const[g,C]=nr(f,t,!0);Oe(a,g),C&&i.push(...C)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!l&&!c)return we(e)&&n.set(e,Rt),Rt;if(ne(l))for(let u=0;u<l.length;u++){const f=Ue(l[u]);Kn(f)&&(a[f]=ke)}else if(l)for(const u in l){const f=Ue(u);if(Kn(f)){const g=l[u],C=a[f]=ne(g)||ae(g)?{type:g}:Oe({},g),K=C.type;let I=!1,z=!0;if(ne(K))for(let P=0;P<K.length;++P){const O=K[P],V=ae(O)&&O.name;if(V==="Boolean"){I=!0;break}else V==="String"&&(z=!1)}else I=ae(K)&&K.name==="Boolean";C[0]=I,C[1]=z,(I||ge(C,"default"))&&i.push(f)}}const m=[a,i];return we(e)&&n.set(e,m),m}function Kn(e){return e[0]!=="$"&&!Qt(e)}const $n=e=>e==="_"||e==="_ctx"||e==="$stable",Cn=e=>ne(e)?e.map(tt):[tt(e)],Gl=(e,t,s)=>{if(t._n)return t;const n=cl((...r)=>Cn(t(...r)),s);return n._c=!1,n},or=(e,t,s)=>{const n=e._ctx;for(const r in e){if($n(r))continue;const l=e[r];if(ae(l))t[r]=Gl(r,l,n);else if(l!=null){const a=Cn(l);t[r]=()=>a}}},rr=(e,t)=>{const s=Cn(t);e.slots.default=()=>s},lr=(e,t,s)=>{for(const n in t)(s||!$n(n))&&(e[n]=t[n])},Yl=(e,t,s)=>{const n=e.slots=er();if(e.vnode.shapeFlag&32){const r=t._;r?(lr(n,t,s),s&&ho(n,"_",r,!0)):or(t,n)}else t&&rr(e,t)},Zl=(e,t,s)=>{const{vnode:n,slots:r}=e;let l=!0,a=ke;if(n.shapeFlag&32){const i=t._;i?s&&i===1?l=!1:lr(r,t,s):(l=!t.$stable,or(t,r)),a=t}else t&&(rr(e,t),a={default:1});if(l)for(const i in r)!$n(i)&&a[i]==null&&delete r[i]},Be=sa;function Ql(e){return Xl(e)}function Xl(e,t){const s=Ds();s.__VUE__=!0;const{insert:n,remove:r,patchProp:l,createElement:a,createText:i,createComment:c,setText:m,setElementText:u,parentNode:f,nextSibling:g,setScopeId:C=nt,insertStaticContent:K}=e,I=(d,v,$,D=null,E=null,M=null,H=void 0,B=null,U=!!v.dynamicChildren)=>{if(d===v)return;d&&!qt(d,v)&&(D=gt(d),Ae(d,E,M,!0),d=null),v.patchFlag===-2&&(U=!1,v.dynamicChildren=null);const{type:A,ref:ee,shapeFlag:W}=v;switch(A){case Us:z(d,v,$,D);break;case _t:P(d,v,$,D);break;case bs:d==null&&O(v,$,D,H);break;case le:N(d,v,$,D,E,M,H,B,U);break;default:W&1?F(d,v,$,D,E,M,H,B,U):W&6?q(d,v,$,D,E,M,H,B,U):(W&64||W&128)&&A.process(d,v,$,D,E,M,H,B,U,$t)}ee!=null&&E?ts(ee,d&&d.ref,M,v||d,!v):ee==null&&d&&d.ref!=null&&ts(d.ref,null,M,d,!0)},z=(d,v,$,D)=>{if(d==null)n(v.el=i(v.children),$,D);else{const E=v.el=d.el;v.children!==d.children&&m(E,v.children)}},P=(d,v,$,D)=>{d==null?n(v.el=c(v.children||""),$,D):v.el=d.el},O=(d,v,$,D)=>{[d.el,d.anchor]=K(d.children,v,$,D,d.el,d.anchor)},V=({el:d,anchor:v},$,D)=>{let E;for(;d&&d!==v;)E=g(d),n(d,$,D),d=E;n(v,$,D)},R=({el:d,anchor:v})=>{let $;for(;d&&d!==v;)$=g(d),r(d),d=$;r(v)},F=(d,v,$,D,E,M,H,B,U)=>{if(v.type==="svg"?H="svg":v.type==="math"&&(H="mathml"),d==null)b(v,$,D,E,M,H,B,U);else{const A=d.el&&d.el._isVueCE?d.el:null;try{A&&A._beginPatch(),Q(d,v,E,M,H,B,U)}finally{A&&A._endPatch()}}},b=(d,v,$,D,E,M,H,B)=>{let U,A;const{props:ee,shapeFlag:W,transition:X,dirs:se}=d;if(U=d.el=a(d.type,M,ee&&ee.is,ee),W&8?u(U,d.children):W&16&&L(d.children,U,null,D,E,Gs(d,M),H,B),se&&Ct(d,null,D,"created"),k(U,d,d.scopeId,H,D),ee){for(const me in ee)me!=="value"&&!Qt(me)&&l(U,me,null,ee[me],M,D);"value"in ee&&l(U,"value",null,ee.value,M),(A=ee.onVnodeBeforeMount)&&Qe(A,D,d)}se&&Ct(d,null,D,"beforeMount");const ue=ea(E,X);ue&&X.beforeEnter(U),n(U,v,$),((A=ee&&ee.onVnodeMounted)||ue||se)&&Be(()=>{try{A&&Qe(A,D,d),ue&&X.enter(U),se&&Ct(d,null,D,"mounted")}finally{}},E)},k=(d,v,$,D,E)=>{if($&&C(d,$),D)for(let M=0;M<D.length;M++)C(d,D[M]);if(E){let M=E.subTree;if(v===M||ur(M.type)&&(M.ssContent===v||M.ssFallback===v)){const H=E.vnode;k(d,H,H.scopeId,H.slotScopeIds,E.parent)}}},L=(d,v,$,D,E,M,H,B,U=0)=>{for(let A=U;A<d.length;A++){const ee=d[A]=B?ut(d[A]):tt(d[A]);I(null,ee,v,$,D,E,M,H,B)}},Q=(d,v,$,D,E,M,H)=>{const B=v.el=d.el;let{patchFlag:U,dynamicChildren:A,dirs:ee}=v;U|=d.patchFlag&16;const W=d.props||ke,X=v.props||ke;let se;if($&&Tt($,!1),(se=X.onVnodeBeforeUpdate)&&Qe(se,$,v,d),ee&&Ct(v,d,$,"beforeUpdate"),$&&Tt($,!0),(W.innerHTML&&X.innerHTML==null||W.textContent&&X.textContent==null)&&u(B,""),A?ie(d.dynamicChildren,A,B,$,D,Gs(v,E),M):H||ve(d,v,B,null,$,D,Gs(v,E),M,!1),U>0){if(U&16)G(B,W,X,$,E);else if(U&2&&W.class!==X.class&&l(B,"class",null,X.class,E),U&4&&l(B,"style",W.style,X.style,E),U&8){const ue=v.dynamicProps;for(let me=0;me<ue.length;me++){const S=ue[me],y=W[S],p=X[S];(p!==y||S==="value")&&l(B,S,y,p,E,$)}}U&1&&d.children!==v.children&&u(B,v.children)}else!H&&A==null&&G(B,W,X,$,E);((se=X.onVnodeUpdated)||ee)&&Be(()=>{se&&Qe(se,$,v,d),ee&&Ct(v,d,$,"updated")},D)},ie=(d,v,$,D,E,M,H)=>{for(let B=0;B<v.length;B++){const U=d[B],A=v[B],ee=U.el&&(U.type===le||!qt(U,A)||U.shapeFlag&198)?f(U.el):$;I(U,A,ee,null,D,E,M,H,!0)}},G=(d,v,$,D,E)=>{if(v!==$){if(v!==ke)for(const M in v)!Qt(M)&&!(M in $)&&l(d,M,v[M],null,E,D);for(const M in $){if(Qt(M))continue;const H=$[M],B=v[M];H!==B&&M!=="value"&&l(d,M,B,H,E,D)}"value"in $&&l(d,"value",v.value,$.value,E)}},N=(d,v,$,D,E,M,H,B,U)=>{const A=v.el=d?d.el:i(""),ee=v.anchor=d?d.anchor:i("");let{patchFlag:W,dynamicChildren:X,slotScopeIds:se}=v;se&&(B=B?B.concat(se):se),d==null?(n(A,$,D),n(ee,$,D),L(v.children||[],$,ee,E,M,H,B,U)):W>0&&W&64&&X&&d.dynamicChildren&&d.dynamicChildren.length===X.length?(ie(d.dynamicChildren,X,$,E,M,H,B),(v.key!=null||E&&v===E.subTree)&&ar(d,v,!0)):ve(d,v,$,ee,E,M,H,B,U)},q=(d,v,$,D,E,M,H,B,U)=>{v.slotScopeIds=B,d==null?v.shapeFlag&512?E.ctx.activate(v,$,D,H,U):ce(v,$,D,E,M,H,U):pe(d,v,U)},ce=(d,v,$,D,E,M,H)=>{const B=d.component=ca(d,D,E);if(Wo(d)&&(B.ctx.renderer=$t),da(B,!1,H),B.asyncDep){if(E&&E.registerDep(B,Te,H),!d.el){const U=B.subTree=ot(_t);P(null,U,v,$),d.placeholder=U.el}}else Te(B,d,v,$,E,M,H)},pe=(d,v,$)=>{const D=v.component=d.component;if(Kl(d,v,$))if(D.asyncDep&&!D.asyncResolved){ye(D,v,$);return}else D.next=v,D.update();else v.el=d.el,D.vnode=v},Te=(d,v,$,D,E,M,H)=>{const B=()=>{if(d.isMounted){let{next:W,bu:X,u:se,parent:ue,vnode:me}=d;{const $e=ir(d);if($e){W&&(W.el=me.el,ye(d,W,H)),$e.asyncDep.then(()=>{Be(()=>{d.isUnmounted||A()},E)});return}}let S=W,y;Tt(d,!1),W?(W.el=me.el,ye(d,W,H)):W=me,X&&gs(X),(y=W.props&&W.props.onVnodeBeforeUpdate)&&Qe(y,ue,W,me),Tt(d,!0);const p=Fn(d),de=d.subTree;d.subTree=p,I(de,p,f(de.el),gt(de),d,E,M),W.el=p.el,S===null&&Wl(d,p.el),se&&Be(se,E),(y=W.props&&W.props.onVnodeUpdated)&&Be(()=>Qe(y,ue,W,me),E)}else{let W;const{el:X,props:se}=v,{bm:ue,m:me,parent:S,root:y,type:p}=d,de=ss(v);Tt(d,!1),ue&&gs(ue),!de&&(W=se&&se.onVnodeBeforeMount)&&Qe(W,S,v),Tt(d,!0);{y.ce&&y.ce._hasShadowRoot()&&y.ce._injectChildStyle(p,d.parent?d.parent.type:void 0);const $e=d.subTree=Fn(d);I(null,$e,$,D,d,E,M),v.el=$e.el}if(me&&Be(me,E),!de&&(W=se&&se.onVnodeMounted)){const $e=v;Be(()=>Qe(W,S,$e),E)}(v.shapeFlag&256||S&&ss(S.vnode)&&S.vnode.shapeFlag&256)&&d.a&&Be(d.a,E),d.isMounted=!0,v=$=D=null}};d.scope.on();const U=d.effect=new _o(B);d.scope.off();const A=d.update=U.run.bind(U),ee=d.job=U.runIfDirty.bind(U);ee.i=d,ee.id=d.uid,U.scheduler=()=>wn(ee),Tt(d,!0),A()},ye=(d,v,$)=>{v.component=d;const D=d.vnode.props;d.vnode=v,d.next=null,Jl(d,v.props,D,$),Zl(d,v.children,$),mt(),Dn(d),xt()},ve=(d,v,$,D,E,M,H,B,U=!1)=>{const A=d&&d.children,ee=d?d.shapeFlag:0,W=v.children,{patchFlag:X,shapeFlag:se}=v;if(X>0){if(X&128){j(A,W,$,D,E,M,H,B,U);return}else if(X&256){Z(A,W,$,D,E,M,H,B,U);return}}se&8?(ee&16&&St(A,E,M),W!==A&&u($,W)):ee&16?se&16?j(A,W,$,D,E,M,H,B,U):St(A,E,M,!0):(ee&8&&u($,""),se&16&&L(W,$,D,E,M,H,B,U))},Z=(d,v,$,D,E,M,H,B,U)=>{d=d||Rt,v=v||Rt;const A=d.length,ee=v.length,W=Math.min(A,ee);let X;for(X=0;X<W;X++){const se=v[X]=U?ut(v[X]):tt(v[X]);I(d[X],se,$,null,E,M,H,B,U)}A>ee?St(d,E,M,!0,!1,W):L(v,$,D,E,M,H,B,U,W)},j=(d,v,$,D,E,M,H,B,U)=>{let A=0;const ee=v.length;let W=d.length-1,X=ee-1;for(;A<=W&&A<=X;){const se=d[A],ue=v[A]=U?ut(v[A]):tt(v[A]);if(qt(se,ue))I(se,ue,$,null,E,M,H,B,U);else break;A++}for(;A<=W&&A<=X;){const se=d[W],ue=v[X]=U?ut(v[X]):tt(v[X]);if(qt(se,ue))I(se,ue,$,null,E,M,H,B,U);else break;W--,X--}if(A>W){if(A<=X){const se=X+1,ue=se<ee?v[se].el:D;for(;A<=X;)I(null,v[A]=U?ut(v[A]):tt(v[A]),$,ue,E,M,H,B,U),A++}}else if(A>X)for(;A<=W;)Ae(d[A],E,M,!0),A++;else{const se=A,ue=A,me=new Map;for(A=ue;A<=X;A++){const T=v[A]=U?ut(v[A]):tt(v[A]);T.key!=null&&me.set(T.key,A)}let S,y=0;const p=X-ue+1;let de=!1,$e=0;const fe=new Array(p);for(A=0;A<p;A++)fe[A]=0;for(A=se;A<=W;A++){const T=d[A];if(y>=p){Ae(T,E,M,!0);continue}let Ve;if(T.key!=null)Ve=me.get(T.key);else for(S=ue;S<=X;S++)if(fe[S-ue]===0&&qt(T,v[S])){Ve=S;break}Ve===void 0?Ae(T,E,M,!0):(fe[Ve-ue]=A+1,Ve>=$e?$e=Ve:de=!0,I(T,v[Ve],$,null,E,M,H,B,U),y++)}const Wt=de?ta(fe):Rt;for(S=Wt.length-1,A=p-1;A>=0;A--){const T=ue+A,Ve=v[T],zt=v[T+1],Pe=T+1<ee?zt.el||cr(zt):D;fe[A]===0?I(null,Ve,$,Pe,E,M,H,B,U):de&&(S<0||A!==Wt[S]?Ie(Ve,$,Pe,2):S--)}}},Ie=(d,v,$,D,E=null)=>{const{el:M,type:H,transition:B,children:U,shapeFlag:A}=d;if(A&6){Ie(d.component.subTree,v,$,D);return}if(A&128){d.suspense.move(v,$,D);return}if(A&64){H.move(d,v,$,$t);return}if(H===le){n(M,v,$);for(let W=0;W<U.length;W++)Ie(U[W],v,$,D);n(d.anchor,v,$);return}if(H===bs){V(d,v,$);return}if(D!==2&&A&1&&B)if(D===0)B.beforeEnter(M),n(M,v,$),Be(()=>B.enter(M),E);else{const{leave:W,delayLeave:X,afterLeave:se}=B,ue=()=>{d.ctx.isUnmounted?r(M):n(M,v,$)},me=()=>{M._isLeaving&&M[vl](!0),W(M,()=>{ue(),se&&se()})};X?X(M,ue,me):me()}else n(M,v,$)},Ae=(d,v,$,D=!1,E=!1)=>{const{type:M,props:H,ref:B,children:U,dynamicChildren:A,shapeFlag:ee,patchFlag:W,dirs:X,cacheIndex:se,memo:ue}=d;if(W===-2&&(E=!1),B!=null&&(mt(),ts(B,null,$,d,!0),xt()),se!=null&&(v.renderCache[se]=void 0),ee&256){v.ctx.deactivate(d);return}const me=ee&1&&X,S=!ss(d);let y;if(S&&(y=H&&H.onVnodeBeforeUnmount)&&Qe(y,v,d),ee&6)Bs(d.component,$,D);else{if(ee&128){d.suspense.unmount($,D);return}me&&Ct(d,null,v,"beforeUnmount"),ee&64?d.type.remove(d,v,$,$t,D):A&&!A.hasOnce&&(M!==le||W>0&&W&64)?St(A,v,$,!1,!0):(M===le&&W&384||!E&&ee&16)&&St(U,v,$),D&&Se(d)}const p=ue!=null&&se==null;(S&&(y=H&&H.onVnodeUnmounted)||me||p)&&Be(()=>{y&&Qe(y,v,d),me&&Ct(d,null,v,"unmounted"),p&&(d.el=null)},$)},Se=d=>{const{type:v,el:$,anchor:D,transition:E}=d;if(v===le){kt($,D);return}if(v===bs){R(d);return}const M=()=>{r($),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(d.shapeFlag&1&&E&&!E.persisted){const{leave:H,delayLeave:B}=E,U=()=>H($,M);B?B(d.el,M,U):U()}else M()},kt=(d,v)=>{let $;for(;d!==v;)$=g(d),r(d),d=$;r(v)},Bs=(d,v,$)=>{const{bum:D,scope:E,job:M,subTree:H,um:B,m:U,a:A}=d;Wn(U),Wn(A),D&&gs(D),E.stop(),M&&(M.flags|=8,Ae(H,d,v,$)),B&&Be(B,v),Be(()=>{d.isUnmounted=!0},v)},St=(d,v,$,D=!1,E=!1,M=0)=>{for(let H=M;H<d.length;H++)Ae(d[H],v,$,D,E)},gt=d=>{if(d.shapeFlag&6)return gt(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const v=g(d.anchor||d.el),$=v&&v[ml];return $?g($):v};let Ze=!1;const Mt=(d,v,$)=>{let D;d==null?v._vnode&&(Ae(v._vnode,null,null,!0),D=v._vnode.component):I(v._vnode||null,d,v,null,null,null,$),v._vnode=d,Ze||(Ze=!0,Dn(D),Uo(),Ze=!1)},$t={p:I,um:Ae,m:Ie,r:Se,mt:ce,mc:L,pc:ve,pbc:ie,n:gt,o:e};return{render:Mt,hydrate:void 0,createApp:Nl(Mt)}}function Gs({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Tt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ea(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ar(e,t,s=!1){const n=e.children,r=t.children;if(ne(n)&&ne(r))for(let l=0;l<n.length;l++){const a=n[l];let i=r[l];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=r[l]=ut(r[l]),i.el=a.el),!s&&i.patchFlag!==-2&&ar(a,i)),i.type===Us&&(i.patchFlag===-1&&(i=r[l]=ut(i)),i.el=a.el),i.type===_t&&!i.el&&(i.el=a.el)}}function ta(e){const t=e.slice(),s=[0];let n,r,l,a,i;const c=e.length;for(n=0;n<c;n++){const m=e[n];if(m!==0){if(r=s[s.length-1],e[r]<m){t[n]=r,s.push(n);continue}for(l=0,a=s.length-1;l<a;)i=l+a>>1,e[s[i]]<m?l=i+1:a=i;m<e[s[l]]&&(l>0&&(t[n]=s[l-1]),s[l]=n)}}for(l=s.length,a=s[l-1];l-- >0;)s[l]=a,a=t[a];return s}function ir(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ir(t)}function Wn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function cr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?cr(t.subTree):null}const ur=e=>e.__isSuspense;function sa(e,t){t&&t.pendingBranch?ne(e)?t.effects.push(...e):t.effects.push(e):il(e)}const le=Symbol.for("v-fgt"),Us=Symbol.for("v-txt"),_t=Symbol.for("v-cmt"),bs=Symbol.for("v-stc"),os=[];let We=null;function x(e=!1){os.push(We=e?null:[])}function na(){os.pop(),We=os[os.length-1]||null}let is=1;function zn(e,t=!1){is+=e,e<0&&We&&t&&(We.hasOnce=!0)}function dr(e){return e.dynamicChildren=is>0?We||Rt:null,na(),is>0&&We&&We.push(e),e}function h(e,t,s,n,r,l){return dr(o(e,t,s,n,r,l,!0))}function fr(e,t,s,n,r){return dr(ot(e,t,s,n,r,!0))}function pr(e){return e?e.__v_isVNode===!0:!1}function qt(e,t){return e.type===t.type&&e.key===t.key}const mr=({key:e})=>e??null,_s=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ee(e)||je(e)||ae(e)?{i:Ke,r:e,k:t,f:!!s}:e:null);function o(e,t=null,s=null,n=0,r=null,l=e===le?0:1,a=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mr(t),ref:t&&_s(t),scopeId:Bo,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ke};return i?(Tn(c,s),l&128&&e.normalize(c)):s&&(c.shapeFlag|=Ee(s)?8:16),is>0&&!a&&We&&(c.patchFlag>0||l&6)&&c.patchFlag!==32&&We.push(c),c}const ot=oa;function oa(e,t=null,s=null,n=0,r=null,l=!1){if((!e||e===Jo)&&(e=_t),pr(e)){const i=Bt(e,t,!0);return s&&Tn(i,s),is>0&&!l&&We&&(i.shapeFlag&6?We[We.indexOf(e)]=i:We.push(i)),i.patchFlag=-2,i}if(va(e)&&(e=e.__vccOpts),t){t=ra(t);let{class:i,style:c}=t;i&&!Ee(i)&&(t.class=Y(i)),we(c)&&(_n(c)&&!ne(c)&&(c=Oe({},c)),t.style=Ut(c))}const a=Ee(e)?1:ur(e)?128:xl(e)?64:we(e)?4:ae(e)?2:0;return o(e,t,s,n,r,a,l,!0)}function ra(e){return e?_n(e)||tr(e)?Oe({},e):e:null}function Bt(e,t,s=!1,n=!1){const{props:r,ref:l,patchFlag:a,children:i,transition:c}=e,m=t?la(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&mr(m),ref:t&&t.ref?s&&l?ne(l)?l.concat(_s(t)):[l,_s(t)]:_s(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==le?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bt(e.ssContent),ssFallback:e.ssFallback&&Bt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&kn(u,c.clone(u)),u}function oe(e=" ",t=0){return ot(Us,null,e,t)}function ct(e,t){const s=ot(bs,null,e);return s.staticCount=t,s}function J(e="",t=!1){return t?(x(),fr(_t,null,e)):ot(_t,null,e)}function tt(e){return e==null||typeof e=="boolean"?ot(_t):ne(e)?ot(le,null,e.slice()):pr(e)?ut(e):ot(Us,null,String(e))}function ut(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bt(e)}function Tn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(ne(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),Tn(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!tr(t)?t._ctx=Ke:r===3&&Ke&&(Ke.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ae(t)?(t={default:t,_ctx:Ke},s=32):(t=String(t),n&64?(s=16,t=[oe(t)]):s=8);e.children=t,e.shapeFlag|=s}function la(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=Y([t.class,n.class]));else if(r==="style")t.style=Ut([t.style,n.style]);else if(Es(r)){const l=t[r],a=n[r];a&&l!==a&&!(ne(l)&&l.includes(a))?t[r]=l?[].concat(l,a):a:a==null&&l==null&&!As(r)&&(t[r]=a)}else r!==""&&(t[r]=n[r])}return t}function Qe(e,t,s,n=null){lt(e,t,7,[s,n])}const aa=Yo();let ia=0;function ca(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||aa,l={uid:ia++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ar(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:nr(n,r),emitsOptions:Zo(n,r),emit:null,emitted:null,propsDefaults:ke,inheritAttrs:n.inheritAttrs,ctx:ke,data:ke,props:ke,attrs:ke,slots:ke,refs:ke,setupState:ke,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=Vl.bind(null,l),e.ce&&e.ce(l),l}let Re=null;const ua=()=>Re||Ke;let Ps,an;{const e=Ds(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),l=>{r.length>1?r.forEach(a=>a(l)):r[0](l)}};Ps=t("__VUE_INSTANCE_SETTERS__",s=>Re=s),an=t("__VUE_SSR_SETTERS__",s=>cs=s)}const ps=e=>{const t=Re;return Ps(e),e.scope.on(),()=>{e.scope.off(),Ps(t)}},Jn=()=>{Re&&Re.scope.off(),Ps(null)};function xr(e){return e.vnode.shapeFlag&4}let cs=!1;function da(e,t=!1,s=!1){t&&an(t);const{props:n,children:r}=e.vnode,l=xr(e);zl(e,n,l,t),Yl(e,r,s||t);const a=l?fa(e,t):void 0;return t&&an(!1),a}function fa(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Il);const{setup:n}=s;if(n){mt();const r=e.setupContext=n.length>1?ma(e):null,l=ps(e),a=fs(n,e,0,[e.props,r]),i=mo(a);if(xt(),l(),(i||e.sp)&&!ss(e)&&Ko(e),i){if(a.then(Jn,Jn),t)return a.then(c=>{qn(e,c)}).catch(c=>{js(c,e,0)});e.asyncDep=a}else qn(e,a)}else vr(e)}function qn(e,t,s){ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:we(t)&&(e.setupState=Ro(t)),vr(e)}function vr(e,t,s){const n=e.type;e.render||(e.render=n.render||nt);{const r=ps(e);mt();try{Ml(e)}finally{xt(),r()}}}const pa={get(e,t){return De(e,"get",""),e[t]}};function ma(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,pa),slots:e.slots,emit:e.emit,expose:t}}function Vs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ro(Zr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ns)return ns[s](e)},has(t,s){return s in t||s in ns}})):e.proxy}function xa(e,t=!0){return ae(e)?e.displayName||e.name:e.name||t&&e.__name}function va(e){return ae(e)&&"__vccOpts"in e}const Me=(e,t)=>nl(e,t,cs),ha="3.5.31";/**
|
|
61
61
|
* @vue/runtime-dom v3.5.31
|
|
62
62
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
63
63
|
* @license MIT
|
|
64
|
-
**/let ln;const Gn=typeof window<"u"&&window.trustedTypes;if(Gn)try{ln=Gn.createPolicy("vue",{createHTML:e=>e})}catch{}const hr=ln?e=>ln.createHTML(e):e=>e,ga="http://www.w3.org/2000/svg",ya="http://www.w3.org/1998/Math/MathML",ct=typeof document<"u"?document:null,Yn=ct&&ct.createElement("template"),ba={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?ct.createElementNS(ga,e):t==="mathml"?ct.createElementNS(ya,e):s?ct.createElement(e,{is:s}):ct.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>ct.createTextNode(e),createComment:e=>ct.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ct.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,l){const a=s?s.previousSibling:t.lastChild;if(r&&(r===l||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===l||!(r=r.nextSibling)););else{Yn.innerHTML=hr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const u=Yn.content;if(n==="svg"||n==="mathml"){const d=u.firstChild;for(;d.firstChild;)u.appendChild(d.firstChild);u.removeChild(d)}t.insertBefore(u,s)}return[a?a.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},_a=Symbol("_vtc");function wa(e,t,s){const n=e[_a];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Zn=Symbol("_vod"),ka=Symbol("_vsh"),Sa=Symbol(""),$a=/(?:^|;)\s*display\s*:/;function Ca(e,t,s){const n=e.style,r=Se(s);let l=!1;if(s&&!r){if(t)if(Se(t))for(const a of t.split(";")){const u=a.slice(0,a.indexOf(":")).trim();s[u]==null&&_s(n,u,"")}else for(const a in t)s[a]==null&&_s(n,a,"");for(const a in s)a==="display"&&(l=!0),_s(n,a,s[a])}else if(r){if(t!==s){const a=n[Sa];a&&(s+=";"+a),n.cssText=s,l=$a.test(s)}}else t&&e.removeAttribute("style");Zn in e&&(e[Zn]=l?n.display:"",e[ka]&&(n.display="none"))}const Qn=/\s*!important$/;function _s(e,t,s){if(X(s))s.forEach(n=>_s(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Ta(e,t);Qn.test(s)?e.setProperty(St(n),s.replace(Qn,""),"important"):e[n]=s}}const Xn=["Webkit","Moz","ms"],qs={};function Ta(e,t){const s=qs[t];if(s)return s;let n=Re(t);if(n!=="filter"&&n in e)return qs[t]=n;n=Is(n);for(let r=0;r<Xn.length;r++){const l=Xn[r]+n;if(l in e)return qs[t]=l}return t}const eo="http://www.w3.org/1999/xlink";function to(e,t,s,n,r,l=Pr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(eo,t.slice(6,t.length)):e.setAttributeNS(eo,t,s):s==null||l&&!go(s)?e.removeAttribute(t):e.setAttribute(t,l?"":rt(s)?String(s):s)}function so(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?hr(s):s);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const u=l==="OPTION"?e.getAttribute("value")||"":e.value,d=s==null?e.type==="checkbox"?"on":"":String(s);(u!==d||!("_value"in e))&&(e.value=d),s==null&&e.removeAttribute(t),e._value=s;return}let a=!1;if(s===""||s==null){const u=typeof e[t];u==="boolean"?s=go(s):s==null&&u==="string"?(s="",a=!0):u==="number"&&(s=0,a=!0)}try{e[t]=s}catch{}a&&e.removeAttribute(r||t)}function wt(e,t,s,n){e.addEventListener(t,s,n)}function Pa(e,t,s,n){e.removeEventListener(t,s,n)}const no=Symbol("_vei");function Ea(e,t,s,n,r=null){const l=e[no]||(e[no]={}),a=l[t];if(n&&a)a.value=n;else{const[u,d]=Aa(t);if(n){const x=l[t]=Ma(n,r);wt(e,u,x,d)}else a&&(Pa(e,u,a,d),l[t]=void 0)}}const oo=/(?:Once|Passive|Capture)$/;function Aa(e){let t;if(oo.test(e)){t={};let n;for(;n=e.match(oo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):St(e.slice(2)),t]}let Gs=0;const Ia=Promise.resolve(),Oa=()=>Gs||(Ia.then(()=>Gs=0),Gs=Date.now());function Ma(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;lt(Da(n,s.value),t,5,[n])};return s.value=e,s.attached=Oa(),s}function Da(e,t){if(X(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const ro=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ra=(e,t,s,n,r,l)=>{const a=r==="svg";t==="class"?wa(e,n,a):t==="style"?Ca(e,s,n):Ps(t)?Es(t)||Ea(e,t,s,n,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ja(e,t,n,a))?(so(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&to(e,t,n,a,l,t!=="value")):e._isVueCE&&(La(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Se(n)))?so(e,Re(t),n,l,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),to(e,t,n,a))};function ja(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&ro(t)&&oe(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ro(t)&&Se(s)?!1:t in e}function La(e,t){const s=e._def.props;if(!s)return!1;const n=Re(t);return Array.isArray(s)?s.some(r=>Re(r)===n):Object.keys(s).some(r=>Re(r)===n)}const Bt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return X(t)?s=>hs(t,s):t};function Ua(e){e.target.composing=!0}function lo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const mt=Symbol("_assign");function ao(e,t,s){return t&&(e=e.trim()),s&&(e=Os(e)),e}const ne={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[mt]=Bt(r);const l=n||r.props&&r.props.type==="number";wt(e,t?"change":"input",a=>{a.target.composing||e[mt](ao(e.value,s,l))}),(s||l)&&wt(e,"change",()=>{e.value=ao(e.value,s,l)}),t||(wt(e,"compositionstart",Ua),wt(e,"compositionend",lo),wt(e,"change",lo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:l}},a){if(e[mt]=Bt(a),e.composing)return;const u=(l||e.type==="number")&&!/^0\d/.test(e.value)?Os(e.value):e.value,d=t??"";if(u===d)return;const x=e.getRootNode();(x instanceof Document||x instanceof ShadowRoot)&&x.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===d)||(e.value=d)}},io={deep:!0,created(e,t,s){e[mt]=Bt(s),wt(e,"change",()=>{const n=e._modelValue,r=cs(e),l=e.checked,a=e[mt];if(X(n)){const u=dn(n,r),d=u!==-1;if(l&&!d)a(n.concat(r));else if(!l&&d){const x=[...n];x.splice(u,1),a(x)}}else if(Ft(n)){const u=new Set(n);l?u.add(r):u.delete(r),a(u)}else a(gr(e,l))})},mounted:co,beforeUpdate(e,t,s){e[mt]=Bt(s),co(e,t,s)}};function co(e,{value:t,oldValue:s},n){e._modelValue=t;let r;if(X(t))r=dn(t,n.props.value)>-1;else if(Ft(t))r=t.has(n.props.value);else{if(t===s)return;r=Ht(t,gr(e,!0))}e.checked!==r&&(e.checked=r)}const At={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=Ft(t);wt(e,"change",()=>{const l=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>s?Os(cs(a)):cs(a));e[mt](e.multiple?r?new Set(l):l:l[0]),e._assigning=!0,Lo(()=>{e._assigning=!1})}),e[mt]=Bt(n)},mounted(e,{value:t}){uo(e,t)},beforeUpdate(e,t,s){e[mt]=Bt(s)},updated(e,{value:t}){e._assigning||uo(e,t)}};function uo(e,t){const s=e.multiple,n=X(t);if(!(s&&!n&&!Ft(t))){for(let r=0,l=e.options.length;r<l;r++){const a=e.options[r],u=cs(a);if(s)if(n){const d=typeof u;d==="string"||d==="number"?a.selected=t.some(x=>String(x)===String(u)):a.selected=dn(t,u)>-1}else a.selected=t.has(u);else if(Ht(cs(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cs(e){return"_value"in e?e._value:e.value}function gr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Na={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Xe=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(r=>{if(!("key"in r))return;const l=St(r.key);if(t.some(a=>a===l||Na[a]===l))return e(r)}))},Va=Ee({patchProp:Ra},ba);let fo;function Ba(){return fo||(fo=Ql(Va))}const Fa=((...e)=>{const t=Ba().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=Ka(n);if(!r)return;const l=t._component;!oe(l)&&!l.render&&!l.template&&(l.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=s(r,!1,Ha(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t});function Ha(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ka(e){return Se(e)?document.querySelector(e):e}let Cn="";function qt(e){Cn=e}function de(){return Cn}async function he(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${Cn}`,"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!s.ok){const n=new Error(s.statusText);throw n.status=s.status,n}return s.json()}const Wa={class:"animate-fade-in"},za={key:0,class:"text-center py-12 text-textSecondary"},Ja={key:1,class:"text-center text-textSecondary py-12"},qa={key:2,class:"space-y-3"},Ga={class:"flex items-center justify-between"},Ya={class:"flex items-center gap-3"},Za={class:"font-medium"},Qa={class:"text-accentLight"},Xa={class:"text-textSecondary text-xs"},ei={key:2,class:"text-muted italic"},ti={class:"text-xs text-textSecondary font-mono"},si={class:"text-right"},ni={class:"flex items-center gap-2 justify-end"},oi={class:"text-xs text-textSecondary"},ri=He({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=w([]),n=w(!0);async function r(){n.value=!0;try{const x=await he("/api/status");s.value=(x.sessions||[]).slice().sort((f,m)=>f.status==="active"&&m.status!=="active"?-1:f.status!=="active"&&m.status==="active"?1:m.lastActivity-f.lastActivity)}finally{n.value=!1}}const l=Pe(()=>{var f;return(((f=t.status)==null?void 0:f.sessions)??s.value).slice().sort((m,v)=>m.status==="active"&&v.status!=="active"?-1:m.status!=="active"&&v.status==="active"?1:v.lastActivity-m.lastActivity)});function a(x){const f=Math.floor((Date.now()-x.lastActivity)/6e4);return x.status==="disconnected"?{label:`Disconnected${f>0?` — ${f}m ago`:""}`,color:"text-muted"}:f<5?{label:"Active",color:"text-success"}:f<30?{label:`Idle ${f}m`,color:"text-warn"}:{label:`Dormant ${f}m`,color:"text-danger"}}function u(x){if(!x.lastWaitCallAt)return"";const f=Math.floor((Date.now()-x.lastWaitCallAt)/6e4);return f<5?`Polling — ${f===0?"just now":f+"m ago"}`:`Last poll — ${f}m ago`}function d(x){return x.lastWaitCallAt?Math.floor((Date.now()-x.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return Be(r),(x,f)=>(h(),g("div",Wa,[n.value&&l.value.length===0?(h(),g("div",za,"Loading sessions...")):l.value.length===0?(h(),g("div",Ja,"No sessions")):(h(),g("div",qa,[(h(!0),g(se,null,ve(l.value,m=>(h(),g("div",{key:m.mcpSessionId,class:W(["glass rounded-xl p-4 animate-slide-up",m.status==="disconnected"?"opacity-60":""])},[o("div",Ga,[o("div",Ya,[o("span",{class:W(["w-2.5 h-2.5 rounded-full",m.status==="disconnected"?"bg-muted":Math.floor((Date.now()-m.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-m.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),o("div",null,[o("div",Za,[m.topicName?(h(),g(se,{key:0},[o("span",Qa,b(m.topicName),1),o("span",Xa," (thread "+b(m.threadId)+")",1)],64)):m.threadId!=null?(h(),g(se,{key:1},[te("Thread "+b(m.threadId),1)],64)):(h(),g("span",ei,"Awaiting start_session…"))]),o("div",ti,b(m.mcpSessionId.slice(0,12))+"...",1)])]),o("div",si,[o("div",ni,[o("span",{class:W(["text-sm font-medium",a(m).color])},b(a(m).label),3),u(m)?(h(),g("span",{key:0,class:W(["text-xs ml-2",d(m)])},b(u(m)),3)):K("",!0)]),o("div",oi,b(m.transportType),1)])])],2))),128))]))]))}}),li={class:"animate-fade-in"},ai={class:"flex flex-wrap items-center gap-3 mb-4"},ii={key:0,class:"text-center py-12 text-textSecondary"},ci={key:1,class:"text-center py-12 text-textSecondary"},ui={key:2,class:"space-y-2"},di={class:"flex items-start justify-between gap-3"},fi={class:"flex-1 min-w-0"},pi={class:"flex items-center gap-2 mb-1"},mi={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},xi={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},vi={class:"text-xs text-textSecondary"},hi={class:"text-sm text-textPrimary leading-relaxed"},gi={class:"flex flex-wrap gap-1.5 mt-2"},yi={class:"text-right shrink-0"},bi={class:"text-sm font-mono text-textSecondary"},_i={class:"text-xs text-muted"},wi={class:"text-xs text-muted"},ki=He({__name:"MemoryNotesTab",setup(e){const t=w([]),s=w(!1),n=w(""),r=w("created_at"),l=w("");let a=null;async function u(){s.value=!0;try{const f=l.value.trim();let m;if(f)m=await he(`/api/search?q=${encodeURIComponent(f)}&limit=50`);else{const v=new URLSearchParams({limit:"50",sort:r.value});n.value&&v.set("type",n.value),m=await he(`/api/notes?${v}`)}t.value=m}finally{s.value=!1}}function d(){a&&clearTimeout(a),a=setTimeout(u,300)}function x(f){if(!f)return"never";const m=Date.now()-new Date(f).getTime(),v=Math.floor(m/6e4);if(v<1)return"just now";if(v<60)return`${v}m ago`;const k=Math.floor(v/60);return k<24?`${k}h ago`:`${Math.floor(k/24)}d ago`}return Be(u),(f,m)=>(h(),g("div",li,[o("div",ai,[Z(o("input",{"onUpdate:modelValue":m[0]||(m[0]=v=>l.value=v),onInput:d,type:"text",placeholder:"Search notes...",class:"flex-1 min-w-[200px] px-4 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,544),[[ne,l.value]]),Z(o("select",{"onUpdate:modelValue":m[1]||(m[1]=v=>n.value=v),onChange:u,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...m[3]||(m[3]=[ut('<option value="">All types</option><option value="fact">Facts</option><option value="preference">Preferences</option><option value="pattern">Patterns</option><option value="entity">Entities</option><option value="relationship">Relationships</option>',6)])],544),[[At,n.value]]),Z(o("select",{"onUpdate:modelValue":m[2]||(m[2]=v=>r.value=v),onChange:u,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...m[4]||(m[4]=[o("option",{value:"created_at"},"Newest",-1),o("option",{value:"confidence"},"Confidence",-1),o("option",{value:"access_count"},"Most accessed",-1)])],544),[[At,r.value]])]),s.value?(h(),g("div",ii,"Loading notes...")):t.value.length===0?(h(),g("div",ci,"No notes found")):(h(),g("div",ui,[(h(!0),g(se,null,ve(t.value,v=>(h(),g("div",{key:v.noteId,class:W(["glass rounded-xl p-4 animate-fade-in",`priority-${v.priority||0}`])},[o("div",di,[o("div",fi,[o("div",pi,[o("span",{class:W(["type-badge",`type-${v.type}`])},b(v.type),3),v.priority>=2?(h(),g("span",mi,"HIGH IMPORTANCE")):v.priority===1?(h(),g("span",xi,"NOTABLE")):K("",!0),o("span",vi,b(v.noteId),1)]),o("p",hi,b(v.content),1),o("div",gi,[(h(!0),g(se,null,ve(v.keywords||[],k=>(h(),g("span",{key:k,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},b(k),1))),128))])]),o("div",yi,[o("div",bi,b(((Number(v.confidence)||0)*100).toFixed(0))+"%",1),o("div",_i,b(x(v.createdAt)),1),o("div",wi,b(v.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),Si={class:"animate-fade-in space-y-6"},$i={class:"glass rounded-xl p-4"},Ci={class:"flex flex-wrap items-center gap-4 mb-4"},Ti={key:0,class:"text-sm text-success"},Pi={class:"flex flex-wrap items-center gap-3 mb-4"},Ei={key:0,class:"text-sm text-success"},Ai={class:"glass rounded-xl p-6"},Ii={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Oi={class:"flex items-center gap-2"},Mi={key:0,class:"text-sm text-success"},Di={key:0,class:"mb-3"},Ri={class:"mt-4"},ji=["innerHTML"],Li={class:"glass rounded-xl p-6"},Ui={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ni={class:"flex items-center gap-2"},Vi={key:0,class:"text-sm text-success"},Bi={class:"flex gap-2 mb-4"},Fi=["onClick"],Hi={key:0,class:"mb-3"},Ki=["value","placeholder"],Wi={class:"glass rounded-xl p-6"},zi={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ji={class:"flex items-center gap-2"},qi={key:0,class:"text-sm text-success"},Gi={class:"mb-4 flex flex-wrap items-center gap-3"},Yi={class:"flex items-center gap-2"},Zi={class:"font-mono text-sm text-textPrimary"},Qi={key:0,class:"mb-3"},Xi={class:"flex flex-wrap gap-2 mb-3"},ec=["onClick"],tc={class:"mt-4"},sc=["innerHTML"],nc=He({__name:"TemplatesTab",setup(e){function t(z){return z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\{\{([A-Z_]+)\}\}/g,'<span class="text-accentLight" style="background:rgba(99,102,241,0.1);padding:0 2px;border-radius:3px">{{$1}}</span>')}const s=w("copilot"),n=w(""),r=w(50),l=w(""),a=w(""),u=w(!0),d=w(""),x=w(!1),f=w({}),m=w("copilot"),v=w(""),k=w(""),F=w(!0),$=w(""),N=w(!1),C=w([]),P=w("");async function j(){await Promise.all([I(),U(),y(),S()])}async function I(){try{const z=await he("/api/settings/agent-type");s.value=z.agentType||"copilot"}catch{}}async function U(){try{const z=await he("/api/settings/bootstrap-message-count");r.value=z.count??50}catch{}}async function y(){try{const z=await he("/api/templates");if(z.templates&&z.templates.length>0){const R=z.templates[0];a.value=R.content||"",u.value=R.isDefault??!0}z.agentReminders&&(f.value=z.agentReminders)}catch{}}async function S(){try{const[z,R,Ce]=await Promise.all([he("/api/templates/drive"),he("/api/templates/drive-presets"),he("/api/settings/dmn-activation-hours")]);C.value=R.presets||[],P.value=String(Ce.value??"not set"),z.custom?(k.value=z.custom,F.value=!1):(k.value=z.default||"",F.value=!0)}catch{}}async function D(){try{await he("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await he("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await y()}catch(z){n.value="Error: "+z.message}}async function G(){try{await he("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:r.value})}),l.value="Saved ✓",setTimeout(()=>{l.value=""},3e3)}catch(z){l.value="Error: "+z.message}}async function ae(){try{const z=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({content:a.value})});if(!z.ok)throw new Error(z.statusText);u.value=!1,d.value="Saved ✓",setTimeout(()=>{d.value=""},3e3)}catch(z){d.value="Error: "+z.message}}async function J(){if(confirm("Reset to default template? Your customizations will be lost."))try{const z=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${de()}`}});if(!z.ok)throw new Error(z.statusText);await y(),d.value="Reset to default ✓",setTimeout(()=>{d.value=""},3e3)}catch(z){d.value="Error: "+z.message}}async function O(){var Ce;const z=m.value,R=((Ce=f.value[z])==null?void 0:Ce.content)??"";try{const we=await fetch(`/api/templates/reminders-${z}`,{method:"POST",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({content:R})});if(!we.ok)throw new Error(we.statusText);f.value[z]={content:R,isDefault:!1},v.value=`Saved ${z} ✓`,setTimeout(()=>{v.value=""},3e3)}catch(we){v.value="Error: "+we.message}}async function q(){const z=m.value;if(confirm(`Reset ${z} agent reminder? The custom template will be removed.`))try{const R=await fetch(`/api/templates/reminders-${z}`,{method:"DELETE",headers:{Authorization:`Bearer ${de()}`}});if(!R.ok)throw new Error(R.statusText);await y(),v.value=`Reset ${z} ✓`,setTimeout(()=>{v.value=""},3e3)}catch(R){v.value="Error: "+R.message}}async function re(){const z=k.value;if(!z.trim()){$.value="Template is empty — load a preset first",setTimeout(()=>{$.value=""},3e3);return}try{const R=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({content:z})});if(!R.ok)throw new Error(R.statusText);F.value=!1,$.value="Saved ✓",setTimeout(()=>{$.value=""},3e3)}catch(R){$.value="Error: "+R.message}}async function _e(){if(confirm("Reset drive template? The custom template will be removed."))try{const z=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${de()}`}});if(!z.ok)throw new Error(z.statusText);await S(),$.value="Reset to default ✓",setTimeout(()=>{$.value=""},3e3)}catch(z){$.value="Error: "+z.message}}function ke(z){k.value=z.content,F.value=!1}const me=Pe(()=>t(a.value)),ie=Pe(()=>k.value?t(k.value):'<span style="color:#6b7280">(no template loaded)</span>');return Be(j),(z,R)=>{var Ce,we;return h(),g("div",Si,[o("div",$i,[o("div",Ci,[R[8]||(R[8]=o("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),Z(o("select",{"onUpdate:modelValue":R[0]||(R[0]=fe=>s.value=fe),onChange:D,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...R[7]||(R[7]=[o("option",{value:"claude"},"Claude",-1),o("option",{value:"copilot"},"Copilot",-1),o("option",{value:"codex"},"Codex",-1)])],544),[[At,s.value]]),n.value?(h(),g("span",Ti,b(n.value),1)):K("",!0),R[9]||(R[9]=o("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),o("div",Pi,[R[10]||(R[10]=o("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),Z(o("input",{"onUpdate:modelValue":R[1]||(R[1]=fe=>r.value=fe),type:"number",min:"0",max:"500",class:"w-24 px-3 py-2 rounded-xl bg-card border border-gray-700 text-text text-sm focus:border-accent focus:outline-none"},null,512),[[ne,r.value,void 0,{number:!0}]]),o("button",{onClick:G,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),l.value?(h(),g("span",Ei,b(l.value),1)):K("",!0),R[11]||(R[11]=o("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),o("div",Ai,[o("div",Ii,[R[12]||(R[12]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Reminders Template"),o("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),o("div",Oi,[d.value?(h(),g("span",Mi,b(d.value),1)):K("",!0),o("button",{onClick:J,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),o("button",{onClick:ae,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),u.value?(h(),g("div",Di,[...R[13]||(R[13]=[o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):K("",!0),Z(o("textarea",{"onUpdate:modelValue":R[2]||(R[2]=fe=>a.value=fe),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Loading..."},null,512),[[ne,a.value]]),o("div",Ri,[o("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:R[3]||(R[3]=fe=>x.value=!x.value)},[(h(),g("svg",{class:W(["w-4 h-4 text-textSecondary transition-transform",x.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...R[14]||(R[14]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),R[15]||(R[15]=o("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),x.value?(h(),g("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:me.value},null,8,ji)):K("",!0)]),R[16]||(R[16]=ut('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{OPERATOR_MESSAGE}}</code> <span class="text-textSecondary">— latest operator message</span></div><div><code class="text-accentLight">{{THREAD_ID}}</code> <span class="text-textSecondary">— Telegram thread ID</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— formatted timestamp</span></div><div><code class="text-accentLight">{{UPTIME}}</code> <span class="text-textSecondary">— session uptime</span></div><div><code class="text-accentLight">{{VERSION}}</code> <span class="text-textSecondary">— package version</span></div><div><code class="text-accentLight">{{MODE}}</code> <span class="text-textSecondary">— "autonomous" or "standard"</span></div></div></details>',1))]),o("div",Li,[o("div",Ui,[R[17]||(R[17]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),o("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),o("div",Ni,[v.value?(h(),g("span",Vi,b(v.value),1)):K("",!0),o("button",{onClick:q,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset"),o("button",{onClick:O,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),o("div",Bi,[(h(),g(se,null,ve(["claude","copilot","codex"],fe=>o("button",{key:fe,onClick:at=>m.value=fe,class:W(["px-4 py-2 rounded-xl text-sm font-medium transition",m.value===fe?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},b(fe.charAt(0).toUpperCase()+fe.slice(1)),11,Fi)),64))]),((Ce=f.value[m.value])==null?void 0:Ce.isDefault)!==!1?(h(),g("div",Hi,[...R[18]||(R[18]=[o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"NO CUSTOM OVERRIDE — this agent uses only the base reminders",-1)])])):K("",!0),o("textarea",{value:((we=f.value[m.value])==null?void 0:we.content)??"",onInput:R[4]||(R[4]=fe=>{const at=fe.target;f.value[m.value]={content:at.value,isDefault:!1}}),rows:"8",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:`Add ${m.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ki)]),o("div",Wi,[o("div",zi,[R[19]||(R[19]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),o("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),o("div",Ji,[$.value?(h(),g("span",qi,b($.value),1)):K("",!0),o("button",{onClick:_e,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),o("button",{onClick:re,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),o("div",Gi,[R[21]||(R[21]=o("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),o("div",Yi,[o("span",Zi,b(P.value),1),R[20]||(R[20]=o("span",{class:"text-sm text-textSecondary"},"hours",-1))]),R[22]||(R[22]=o("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),F.value?(h(),g("div",Qi,[...R[23]||(R[23]=[o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):K("",!0),o("div",Xi,[R[24]||(R[24]=o("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(h(!0),g(se,null,ve(C.value,fe=>(h(),g("button",{key:fe.key,onClick:at=>ke(fe),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},b(fe.label),9,ec))),128))]),Z(o("textarea",{"onUpdate:modelValue":R[5]||(R[5]=fe=>k.value=fe),rows:"15",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Load a preset or type a custom drive template..."},null,512),[[ne,k.value]]),o("div",tc,[o("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:R[6]||(R[6]=fe=>N.value=!N.value)},[(h(),g("svg",{class:W(["w-4 h-4 text-textSecondary transition-transform",N.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...R[25]||(R[25]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),R[26]||(R[26]=o("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),N.value?(h(),g("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:ie.value},null,8,sc)):K("",!0)]),R[27]||(R[27]=ut('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{IDLE_HOURS}}</code> <span class="text-textSecondary">— hours since last operator interaction</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— ISO timestamp</span></div><div><code class="text-accentLight">{{PROBABILITY}}</code> <span class="text-textSecondary">— drive activation probability (0.2–1.0)</span></div></div></details>',1))])])}}}),oc={class:"animate-fade-in"},rc={class:"glass rounded-xl p-6 mb-6"},lc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},ac={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},ic={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},cc={class:"flex items-center gap-4 mb-3"},uc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},dc={class:"flex items-center gap-2"},fc={key:0,class:"text-sm text-warn"},pc={key:1,class:"text-center py-8 text-textSecondary text-sm"},mc={key:2,class:"text-center text-textSecondary py-12"},xc={key:3,class:"space-y-2"},vc=["onClick"],hc={class:"flex items-start justify-between gap-3"},gc={class:"flex-1 min-w-0"},yc={class:"flex items-center gap-2 mb-1"},bc={class:"font-medium text-sm"},_c={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},wc={class:"flex flex-wrap gap-1.5 mt-1"},kc=["title"],Sc={key:0,class:"glass rounded-xl p-6"},$c={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Cc={class:"text-lg font-semibold"},Tc={class:"text-sm text-textSecondary mt-1"},Pc={class:"flex items-center gap-2"},Ec={key:0,class:"text-sm text-success"},Ac={key:1,class:"text-sm text-warn"},Ic={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Oc=["value"],Mc={class:"flex items-end"},Dc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Rc=He({__name:"SkillsTab",setup(e){const t=w([]),s=w(!0),n=w(null),r=w(""),l=w(""),a=w(!1),u=w(""),d=w(""),x=w(!1),f=w(""),m=w(""),v=w(!1),k=w("");async function F(){s.value=!0;try{const S=await he("/api/skills");t.value=S.skills||[]}finally{s.value=!1}}function $(S){return S?S.includes(".remote-copilot-mcp")&&S.includes("skills")?"user":S.endsWith(".default.md")?"default":S.endsWith(".skill.md")?"project":"unknown":"unknown"}function N(S){const D={user:"background:rgba(99,102,241,0.15);color:#818cf8",default:"background:rgba(107,114,128,0.15);color:#9ca3af",project:"background:rgba(34,197,94,0.15);color:#4ade80",unknown:"background:rgba(107,114,128,0.15);color:#9ca3af"};return D[S]||D.unknown}function C(S){n.value=S,r.value=S.content,l.value=(S.triggers||[]).join(", "),a.value=!!S.replacesOrchestrator,x.value=!1}function P(){n.value=null,d.value=""}function j(S,D,G,ae){let J=`---
|
|
65
|
-
name: ${
|
|
64
|
+
**/let cn;const Gn=typeof window<"u"&&window.trustedTypes;if(Gn)try{cn=Gn.createPolicy("vue",{createHTML:e=>e})}catch{}const hr=cn?e=>cn.createHTML(e):e=>e,ga="http://www.w3.org/2000/svg",ya="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,Yn=it&&it.createElement("template"),ba={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?it.createElementNS(ga,e):t==="mathml"?it.createElementNS(ya,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,l){const a=s?s.previousSibling:t.lastChild;if(r&&(r===l||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===l||!(r=r.nextSibling)););else{Yn.innerHTML=hr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const i=Yn.content;if(n==="svg"||n==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,s)}return[a?a.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},_a=Symbol("_vtc");function wa(e,t,s){const n=e[_a];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Zn=Symbol("_vod"),ka=Symbol("_vsh"),Sa=Symbol(""),$a=/(?:^|;)\s*display\s*:/;function Ca(e,t,s){const n=e.style,r=Ee(s);let l=!1;if(s&&!r){if(t)if(Ee(t))for(const a of t.split(";")){const i=a.slice(0,a.indexOf(":")).trim();s[i]==null&&ws(n,i,"")}else for(const a in t)s[a]==null&&ws(n,a,"");for(const a in s)a==="display"&&(l=!0),ws(n,a,s[a])}else if(r){if(t!==s){const a=n[Sa];a&&(s+=";"+a),n.cssText=s,l=$a.test(s)}}else t&&e.removeAttribute("style");Zn in e&&(e[Zn]=l?n.display:"",e[ka]&&(n.display="none"))}const Qn=/\s*!important$/;function ws(e,t,s){if(ne(s))s.forEach(n=>ws(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Ta(e,t);Qn.test(s)?e.setProperty(wt(n),s.replace(Qn,""),"important"):e[n]=s}}const Xn=["Webkit","Moz","ms"],Ys={};function Ta(e,t){const s=Ys[t];if(s)return s;let n=Ue(t);if(n!=="filter"&&n in e)return Ys[t]=n;n=Ms(n);for(let r=0;r<Xn.length;r++){const l=Xn[r]+n;if(l in e)return Ys[t]=l}return t}const eo="http://www.w3.org/1999/xlink";function to(e,t,s,n,r,l=Pr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(eo,t.slice(6,t.length)):e.setAttributeNS(eo,t,s):s==null||l&&!go(s)?e.removeAttribute(t):e.setAttribute(t,l?"":rt(s)?String(s):s)}function so(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?hr(s):s);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const i=l==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(i!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let a=!1;if(s===""||s==null){const i=typeof e[t];i==="boolean"?s=go(s):s==null&&i==="string"?(s="",a=!0):i==="number"&&(s=0,a=!0)}try{e[t]=s}catch{}a&&e.removeAttribute(r||t)}function bt(e,t,s,n){e.addEventListener(t,s,n)}function Pa(e,t,s,n){e.removeEventListener(t,s,n)}const no=Symbol("_vei");function Ea(e,t,s,n,r=null){const l=e[no]||(e[no]={}),a=l[t];if(n&&a)a.value=n;else{const[i,c]=Aa(t);if(n){const m=l[t]=Oa(n,r);bt(e,i,m,c)}else a&&(Pa(e,i,a,c),l[t]=void 0)}}const oo=/(?:Once|Passive|Capture)$/;function Aa(e){let t;if(oo.test(e)){t={};let n;for(;n=e.match(oo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):wt(e.slice(2)),t]}let Zs=0;const Ia=Promise.resolve(),Ma=()=>Zs||(Ia.then(()=>Zs=0),Zs=Date.now());function Oa(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;lt(Da(n,s.value),t,5,[n])};return s.value=e,s.attached=Ma(),s}function Da(e,t){if(ne(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const ro=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ra=(e,t,s,n,r,l)=>{const a=r==="svg";t==="class"?wa(e,n,a):t==="style"?Ca(e,s,n):Es(t)?As(t)||Ea(e,t,s,n,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ja(e,t,n,a))?(so(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&to(e,t,n,a,l,t!=="value")):e._isVueCE&&(La(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ee(n)))?so(e,Ue(t),n,l,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),to(e,t,n,a))};function ja(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&ro(t)&&ae(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ro(t)&&Ee(s)?!1:t in e}function La(e,t){const s=e._def.props;if(!s)return!1;const n=Ue(t);return Array.isArray(s)?s.some(r=>Ue(r)===n):Object.keys(s).some(r=>Ue(r)===n)}const Ft=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ne(t)?s=>gs(t,s):t};function Na(e){e.target.composing=!0}function lo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const pt=Symbol("_assign");function ao(e,t,s){return t&&(e=e.trim()),s&&(e=Os(e)),e}const re={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[pt]=Ft(r);const l=n||r.props&&r.props.type==="number";bt(e,t?"change":"input",a=>{a.target.composing||e[pt](ao(e.value,s,l))}),(s||l)&&bt(e,"change",()=>{e.value=ao(e.value,s,l)}),t||(bt(e,"compositionstart",Na),bt(e,"compositionend",lo),bt(e,"change",lo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:l}},a){if(e[pt]=Ft(a),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?Os(e.value):e.value,c=t??"";if(i===c)return;const m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===c)||(e.value=c)}},io={deep:!0,created(e,t,s){e[pt]=Ft(s),bt(e,"change",()=>{const n=e._modelValue,r=us(e),l=e.checked,a=e[pt];if(ne(n)){const i=pn(n,r),c=i!==-1;if(l&&!c)a(n.concat(r));else if(!l&&c){const m=[...n];m.splice(i,1),a(m)}}else if(Ht(n)){const i=new Set(n);l?i.add(r):i.delete(r),a(i)}else a(gr(e,l))})},mounted:co,beforeUpdate(e,t,s){e[pt]=Ft(s),co(e,t,s)}};function co(e,{value:t,oldValue:s},n){e._modelValue=t;let r;if(ne(t))r=pn(t,n.props.value)>-1;else if(Ht(t))r=t.has(n.props.value);else{if(t===s)return;r=Kt(t,gr(e,!0))}e.checked!==r&&(e.checked=r)}const It={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=Ht(t);bt(e,"change",()=>{const l=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>s?Os(us(a)):us(a));e[pt](e.multiple?r?new Set(l):l:l[0]),e._assigning=!0,Lo(()=>{e._assigning=!1})}),e[pt]=Ft(n)},mounted(e,{value:t}){uo(e,t)},beforeUpdate(e,t,s){e[pt]=Ft(s)},updated(e,{value:t}){e._assigning||uo(e,t)}};function uo(e,t){const s=e.multiple,n=ne(t);if(!(s&&!n&&!Ht(t))){for(let r=0,l=e.options.length;r<l;r++){const a=e.options[r],i=us(a);if(s)if(n){const c=typeof i;c==="string"||c==="number"?a.selected=t.some(m=>String(m)===String(i)):a.selected=pn(t,i)>-1}else a.selected=t.has(i);else if(Kt(us(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function us(e){return"_value"in e?e._value:e.value}function gr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Ua={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},He=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(r=>{if(!("key"in r))return;const l=wt(r.key);if(t.some(a=>a===l||Ua[a]===l))return e(r)}))},Va=Oe({patchProp:Ra},ba);let fo;function Ba(){return fo||(fo=Ql(Va))}const Fa=((...e)=>{const t=Ba().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=Ka(n);if(!r)return;const l=t._component;!ae(l)&&!l.render&&!l.template&&(l.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=s(r,!1,Ha(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t});function Ha(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ka(e){return Ee(e)?document.querySelector(e):e}let Pn="";function Gt(e){Pn=e}function xe(){return Pn}async function _e(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${Pn}`,"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!s.ok){const n=new Error(s.statusText);throw n.status=s.status,n}return s.json()}const Wa={class:"animate-fade-in"},za={key:0,class:"text-center py-12 text-textSecondary"},Ja={key:1,class:"text-center text-textSecondary py-12"},qa={key:2,class:"space-y-3"},Ga={class:"flex items-center justify-between"},Ya={class:"flex items-center gap-3"},Za={class:"font-medium"},Qa={class:"text-accentLight"},Xa={class:"text-textSecondary text-xs"},ei={key:2,class:"text-muted italic"},ti={class:"text-xs text-textSecondary font-mono"},si={class:"text-right"},ni={class:"flex items-center gap-2 justify-end"},oi={class:"text-xs text-textSecondary"},ri=qe({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=w([]),n=w(!0);async function r(){n.value=!0;try{const m=await _e("/api/status");s.value=(m.sessions||[]).slice().sort((u,f)=>u.status==="active"&&f.status!=="active"?-1:u.status!=="active"&&f.status==="active"?1:f.lastActivity-u.lastActivity)}finally{n.value=!1}}const l=Me(()=>{var u;return(((u=t.status)==null?void 0:u.sessions)??s.value).slice().sort((f,g)=>f.status==="active"&&g.status!=="active"?-1:f.status!=="active"&&g.status==="active"?1:g.lastActivity-f.lastActivity)});function a(m){const u=Math.floor((Date.now()-m.lastActivity)/6e4);return m.status==="disconnected"?{label:`Disconnected${u>0?` — ${u}m ago`:""}`,color:"text-muted"}:u<5?{label:"Active",color:"text-success"}:u<30?{label:`Idle ${u}m`,color:"text-warn"}:{label:`Dormant ${u}m`,color:"text-danger"}}function i(m){if(!m.lastWaitCallAt)return"";const u=Math.floor((Date.now()-m.lastWaitCallAt)/6e4);return u<5?`Polling — ${u===0?"just now":u+"m ago"}`:`Last poll — ${u}m ago`}function c(m){return m.lastWaitCallAt?Math.floor((Date.now()-m.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return ze(r),(m,u)=>(x(),h("div",Wa,[n.value&&l.value.length===0?(x(),h("div",za,"Loading sessions...")):l.value.length===0?(x(),h("div",Ja,"No sessions")):(x(),h("div",qa,[(x(!0),h(le,null,be(l.value,f=>(x(),h("div",{key:f.mcpSessionId,class:Y(["glass rounded-xl p-4 animate-slide-up",f.status==="disconnected"?"opacity-60":""])},[o("div",Ga,[o("div",Ya,[o("span",{class:Y(["w-2.5 h-2.5 rounded-full",f.status==="disconnected"?"bg-muted":Math.floor((Date.now()-f.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-f.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),o("div",null,[o("div",Za,[f.topicName?(x(),h(le,{key:0},[o("span",Qa,_(f.topicName),1),o("span",Xa," (thread "+_(f.threadId)+")",1)],64)):f.threadId!=null?(x(),h(le,{key:1},[oe("Thread "+_(f.threadId),1)],64)):(x(),h("span",ei,"Awaiting start_session…"))]),o("div",ti,_(f.mcpSessionId.slice(0,12))+"...",1)])]),o("div",si,[o("div",ni,[o("span",{class:Y(["text-sm font-medium",a(f).color])},_(a(f).label),3),i(f)?(x(),h("span",{key:0,class:Y(["text-xs ml-2",c(f)])},_(i(f)),3)):J("",!0)]),o("div",oi,_(f.transportType),1)])])],2))),128))]))]))}}),li={class:"animate-fade-in"},ai={class:"flex flex-wrap items-center gap-3 mb-4"},ii={key:0,class:"text-center py-12 text-textSecondary"},ci={key:1,class:"text-center py-12 text-textSecondary"},ui={key:2,class:"space-y-2"},di={class:"flex items-start justify-between gap-3"},fi={class:"flex-1 min-w-0"},pi={class:"flex items-center gap-2 mb-1"},mi={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},xi={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},vi={class:"text-xs text-textSecondary"},hi={class:"text-sm text-textPrimary leading-relaxed"},gi={class:"flex flex-wrap gap-1.5 mt-2"},yi={class:"text-right shrink-0"},bi={class:"text-sm font-mono text-textSecondary"},_i={class:"text-xs text-muted"},wi={class:"text-xs text-muted"},ki=qe({__name:"MemoryNotesTab",setup(e){const t=w([]),s=w(!1),n=w(""),r=w("created_at"),l=w("");let a=null;async function i(){s.value=!0;try{const u=l.value.trim();let f;if(u)f=await _e(`/api/search?q=${encodeURIComponent(u)}&limit=50`);else{const g=new URLSearchParams({limit:"50",sort:r.value});n.value&&g.set("type",n.value),f=await _e(`/api/notes?${g}`)}t.value=f}finally{s.value=!1}}function c(){a&&clearTimeout(a),a=setTimeout(i,300)}function m(u){if(!u)return"never";const f=Date.now()-new Date(u).getTime(),g=Math.floor(f/6e4);if(g<1)return"just now";if(g<60)return`${g}m ago`;const C=Math.floor(g/60);return C<24?`${C}h ago`:`${Math.floor(C/24)}d ago`}return ze(i),(u,f)=>(x(),h("div",li,[o("div",ai,[te(o("input",{"onUpdate:modelValue":f[0]||(f[0]=g=>l.value=g),onInput:c,type:"text",placeholder:"Search notes...",class:"flex-1 min-w-[200px] px-4 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,544),[[re,l.value]]),te(o("select",{"onUpdate:modelValue":f[1]||(f[1]=g=>n.value=g),onChange:i,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...f[3]||(f[3]=[ct('<option value="">All types</option><option value="fact">Facts</option><option value="preference">Preferences</option><option value="pattern">Patterns</option><option value="entity">Entities</option><option value="relationship">Relationships</option>',6)])],544),[[It,n.value]]),te(o("select",{"onUpdate:modelValue":f[2]||(f[2]=g=>r.value=g),onChange:i,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...f[4]||(f[4]=[o("option",{value:"created_at"},"Newest",-1),o("option",{value:"confidence"},"Confidence",-1),o("option",{value:"access_count"},"Most accessed",-1)])],544),[[It,r.value]])]),s.value?(x(),h("div",ii,"Loading notes...")):t.value.length===0?(x(),h("div",ci,"No notes found")):(x(),h("div",ui,[(x(!0),h(le,null,be(t.value,g=>(x(),h("div",{key:g.noteId,class:Y(["glass rounded-xl p-4 animate-fade-in",`priority-${g.priority||0}`])},[o("div",di,[o("div",fi,[o("div",pi,[o("span",{class:Y(["type-badge",`type-${g.type}`])},_(g.type),3),g.priority>=2?(x(),h("span",mi,"HIGH IMPORTANCE")):g.priority===1?(x(),h("span",xi,"NOTABLE")):J("",!0),o("span",vi,_(g.noteId),1)]),o("p",hi,_(g.content),1),o("div",gi,[(x(!0),h(le,null,be(g.keywords||[],C=>(x(),h("span",{key:C,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},_(C),1))),128))])]),o("div",yi,[o("div",bi,_(((Number(g.confidence)||0)*100).toFixed(0))+"%",1),o("div",_i,_(m(g.createdAt)),1),o("div",wi,_(g.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),Si={class:"animate-fade-in space-y-6"},$i={class:"glass rounded-xl p-4"},Ci={class:"flex flex-wrap items-center gap-4 mb-4"},Ti={key:0,class:"text-sm text-success"},Pi={class:"flex flex-wrap items-center gap-3 mb-4"},Ei={key:0,class:"text-sm text-success"},Ai={class:"glass rounded-xl p-6"},Ii={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Mi={class:"flex items-center gap-2"},Oi={key:0,class:"text-sm text-success"},Di={key:0,class:"mb-3"},Ri={class:"mt-4"},ji=["innerHTML"],Li={class:"glass rounded-xl p-6"},Ni={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ui={class:"flex items-center gap-2"},Vi={key:0,class:"text-sm text-success"},Bi={class:"flex gap-2 mb-4"},Fi=["onClick"],Hi={key:0,class:"mb-3"},Ki=["value","placeholder"],Wi={class:"glass rounded-xl p-6"},zi={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ji={class:"flex items-center gap-2"},qi={key:0,class:"text-sm text-success"},Gi={class:"mb-4 flex flex-wrap items-center gap-3"},Yi={class:"flex items-center gap-2"},Zi={class:"font-mono text-sm text-textPrimary"},Qi={key:0,class:"mb-3"},Xi={class:"flex flex-wrap gap-2 mb-3"},ec=["onClick"],tc={class:"mt-4"},sc=["innerHTML"],nc=qe({__name:"TemplatesTab",setup(e){function t(Z){return Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\{\{([A-Z_]+)\}\}/g,'<span class="text-accentLight" style="background:rgba(99,102,241,0.1);padding:0 2px;border-radius:3px">{{$1}}</span>')}const s=w("copilot"),n=w(""),r=w(50),l=w(""),a=w(""),i=w(!0),c=w(""),m=w(!1),u=w({}),f=w("copilot"),g=w(""),C=w(""),K=w(!0),I=w(""),z=w(!1),P=w([]),O=w("");async function V(){await Promise.all([R(),F(),b(),k()])}async function R(){try{const Z=await _e("/api/settings/agent-type");s.value=Z.agentType||"copilot"}catch{}}async function F(){try{const Z=await _e("/api/settings/bootstrap-message-count");r.value=Z.count??50}catch{}}async function b(){try{const Z=await _e("/api/templates");if(Z.templates&&Z.templates.length>0){const j=Z.templates[0];a.value=j.content||"",i.value=j.isDefault??!0}Z.agentReminders&&(u.value=Z.agentReminders)}catch{}}async function k(){try{const[Z,j,Ie]=await Promise.all([_e("/api/templates/drive"),_e("/api/templates/drive-presets"),_e("/api/settings/dmn-activation-hours")]);P.value=j.presets||[],O.value=String(Ie.value??"not set"),Z.custom?(C.value=Z.custom,K.value=!1):(C.value=Z.default||"",K.value=!0)}catch{}}async function L(){try{await _e("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await _e("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await b()}catch(Z){n.value="Error: "+Z.message}}async function Q(){try{await _e("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:r.value})}),l.value="Saved ✓",setTimeout(()=>{l.value=""},3e3)}catch(Z){l.value="Error: "+Z.message}}async function ie(){try{const Z=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:a.value})});if(!Z.ok)throw new Error(Z.statusText);i.value=!1,c.value="Saved ✓",setTimeout(()=>{c.value=""},3e3)}catch(Z){c.value="Error: "+Z.message}}async function G(){if(confirm("Reset to default template? Your customizations will be lost."))try{const Z=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!Z.ok)throw new Error(Z.statusText);await b(),c.value="Reset to default ✓",setTimeout(()=>{c.value=""},3e3)}catch(Z){c.value="Error: "+Z.message}}async function N(){var Ie;const Z=f.value,j=((Ie=u.value[Z])==null?void 0:Ie.content)??"";try{const Ae=await fetch(`/api/templates/reminders-${Z}`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:j})});if(!Ae.ok)throw new Error(Ae.statusText);u.value[Z]={content:j,isDefault:!1},g.value=`Saved ${Z} ✓`,setTimeout(()=>{g.value=""},3e3)}catch(Ae){g.value="Error: "+Ae.message}}async function q(){const Z=f.value;if(confirm(`Reset ${Z} agent reminder? The custom template will be removed.`))try{const j=await fetch(`/api/templates/reminders-${Z}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!j.ok)throw new Error(j.statusText);await b(),g.value=`Reset ${Z} ✓`,setTimeout(()=>{g.value=""},3e3)}catch(j){g.value="Error: "+j.message}}async function ce(){const Z=C.value;if(!Z.trim()){I.value="Template is empty — load a preset first",setTimeout(()=>{I.value=""},3e3);return}try{const j=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:Z})});if(!j.ok)throw new Error(j.statusText);K.value=!1,I.value="Saved ✓",setTimeout(()=>{I.value=""},3e3)}catch(j){I.value="Error: "+j.message}}async function pe(){if(confirm("Reset drive template? The custom template will be removed."))try{const Z=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!Z.ok)throw new Error(Z.statusText);await k(),I.value="Reset to default ✓",setTimeout(()=>{I.value=""},3e3)}catch(Z){I.value="Error: "+Z.message}}function Te(Z){C.value=Z.content,K.value=!1}const ye=Me(()=>t(a.value)),ve=Me(()=>C.value?t(C.value):'<span style="color:#6b7280">(no template loaded)</span>');return ze(V),(Z,j)=>{var Ie,Ae;return x(),h("div",Si,[o("div",$i,[o("div",Ci,[j[8]||(j[8]=o("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),te(o("select",{"onUpdate:modelValue":j[0]||(j[0]=Se=>s.value=Se),onChange:L,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...j[7]||(j[7]=[o("option",{value:"claude"},"Claude",-1),o("option",{value:"copilot"},"Copilot",-1),o("option",{value:"codex"},"Codex",-1)])],544),[[It,s.value]]),n.value?(x(),h("span",Ti,_(n.value),1)):J("",!0),j[9]||(j[9]=o("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),o("div",Pi,[j[10]||(j[10]=o("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),te(o("input",{"onUpdate:modelValue":j[1]||(j[1]=Se=>r.value=Se),type:"number",min:"0",max:"500",class:"w-24 px-3 py-2 rounded-xl bg-card border border-gray-700 text-text text-sm focus:border-accent focus:outline-none"},null,512),[[re,r.value,void 0,{number:!0}]]),o("button",{onClick:Q,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),l.value?(x(),h("span",Ei,_(l.value),1)):J("",!0),j[11]||(j[11]=o("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),o("div",Ai,[o("div",Ii,[j[12]||(j[12]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Reminders Template"),o("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),o("div",Mi,[c.value?(x(),h("span",Oi,_(c.value),1)):J("",!0),o("button",{onClick:G,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),o("button",{onClick:ie,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i.value?(x(),h("div",Di,[...j[13]||(j[13]=[o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):J("",!0),te(o("textarea",{"onUpdate:modelValue":j[2]||(j[2]=Se=>a.value=Se),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Loading..."},null,512),[[re,a.value]]),o("div",Ri,[o("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:j[3]||(j[3]=Se=>m.value=!m.value)},[(x(),h("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",m.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...j[14]||(j[14]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),j[15]||(j[15]=o("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),m.value?(x(),h("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:ye.value},null,8,ji)):J("",!0)]),j[16]||(j[16]=ct('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{OPERATOR_MESSAGE}}</code> <span class="text-textSecondary">— latest operator message</span></div><div><code class="text-accentLight">{{THREAD_ID}}</code> <span class="text-textSecondary">— Telegram thread ID</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— formatted timestamp</span></div><div><code class="text-accentLight">{{UPTIME}}</code> <span class="text-textSecondary">— session uptime</span></div><div><code class="text-accentLight">{{VERSION}}</code> <span class="text-textSecondary">— package version</span></div><div><code class="text-accentLight">{{MODE}}</code> <span class="text-textSecondary">— "autonomous" or "standard"</span></div></div></details>',1))]),o("div",Li,[o("div",Ni,[j[17]||(j[17]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),o("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),o("div",Ui,[g.value?(x(),h("span",Vi,_(g.value),1)):J("",!0),o("button",{onClick:q,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset"),o("button",{onClick:N,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),o("div",Bi,[(x(),h(le,null,be(["claude","copilot","codex"],Se=>o("button",{key:Se,onClick:kt=>f.value=Se,class:Y(["px-4 py-2 rounded-xl text-sm font-medium transition",f.value===Se?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},_(Se.charAt(0).toUpperCase()+Se.slice(1)),11,Fi)),64))]),((Ie=u.value[f.value])==null?void 0:Ie.isDefault)!==!1?(x(),h("div",Hi,[...j[18]||(j[18]=[o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"NO CUSTOM OVERRIDE — this agent uses only the base reminders",-1)])])):J("",!0),o("textarea",{value:((Ae=u.value[f.value])==null?void 0:Ae.content)??"",onInput:j[4]||(j[4]=Se=>{const kt=Se.target;u.value[f.value]={content:kt.value,isDefault:!1}}),rows:"8",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:`Add ${f.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ki)]),o("div",Wi,[o("div",zi,[j[19]||(j[19]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),o("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),o("div",Ji,[I.value?(x(),h("span",qi,_(I.value),1)):J("",!0),o("button",{onClick:pe,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),o("button",{onClick:ce,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),o("div",Gi,[j[21]||(j[21]=o("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),o("div",Yi,[o("span",Zi,_(O.value),1),j[20]||(j[20]=o("span",{class:"text-sm text-textSecondary"},"hours",-1))]),j[22]||(j[22]=o("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),K.value?(x(),h("div",Qi,[...j[23]||(j[23]=[o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):J("",!0),o("div",Xi,[j[24]||(j[24]=o("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(x(!0),h(le,null,be(P.value,Se=>(x(),h("button",{key:Se.key,onClick:kt=>Te(Se),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},_(Se.label),9,ec))),128))]),te(o("textarea",{"onUpdate:modelValue":j[5]||(j[5]=Se=>C.value=Se),rows:"15",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Load a preset or type a custom drive template..."},null,512),[[re,C.value]]),o("div",tc,[o("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:j[6]||(j[6]=Se=>z.value=!z.value)},[(x(),h("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",z.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...j[25]||(j[25]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),j[26]||(j[26]=o("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),z.value?(x(),h("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:ve.value},null,8,sc)):J("",!0)]),j[27]||(j[27]=ct('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{IDLE_HOURS}}</code> <span class="text-textSecondary">— hours since last operator interaction</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— ISO timestamp</span></div><div><code class="text-accentLight">{{PROBABILITY}}</code> <span class="text-textSecondary">— drive activation probability (0.2–1.0)</span></div></div></details>',1))])])}}}),oc={class:"animate-fade-in"},rc={class:"glass rounded-xl p-6 mb-6"},lc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},ac={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},ic={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},cc={class:"flex items-center gap-4 mb-3"},uc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},dc={class:"flex items-center gap-2"},fc={key:0,class:"text-sm text-warn"},pc={key:1,class:"text-center py-8 text-textSecondary text-sm"},mc={key:2,class:"text-center text-textSecondary py-12"},xc={key:3,class:"space-y-2"},vc=["onClick"],hc={class:"flex items-start justify-between gap-3"},gc={class:"flex-1 min-w-0"},yc={class:"flex items-center gap-2 mb-1"},bc={class:"font-medium text-sm"},_c={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},wc={class:"flex flex-wrap gap-1.5 mt-1"},kc=["title"],Sc={key:0,class:"glass rounded-xl p-6"},$c={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Cc={class:"text-lg font-semibold"},Tc={class:"text-sm text-textSecondary mt-1"},Pc={class:"flex items-center gap-2"},Ec={key:0,class:"text-sm text-success"},Ac={key:1,class:"text-sm text-warn"},Ic={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Mc=["value"],Oc={class:"flex items-end"},Dc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Rc=qe({__name:"SkillsTab",setup(e){const t=w([]),s=w(!0),n=w(null),r=w(""),l=w(""),a=w(!1),i=w(""),c=w(""),m=w(!1),u=w(""),f=w(""),g=w(!1),C=w("");async function K(){s.value=!0;try{const k=await _e("/api/skills");t.value=k.skills||[]}finally{s.value=!1}}function I(k){return k?k.includes(".remote-copilot-mcp")&&k.includes("skills")?"user":k.endsWith(".default.md")?"default":k.endsWith(".skill.md")?"project":"unknown":"unknown"}function z(k){const L={user:"background:rgba(99,102,241,0.15);color:#818cf8",default:"background:rgba(107,114,128,0.15);color:#9ca3af",project:"background:rgba(34,197,94,0.15);color:#4ade80",unknown:"background:rgba(107,114,128,0.15);color:#9ca3af"};return L[k]||L.unknown}function P(k){n.value=k,r.value=k.content,l.value=(k.triggers||[]).join(", "),a.value=!!k.replacesOrchestrator,m.value=!1}function O(){n.value=null,c.value=""}function V(k,L,Q,ie){let G=`---
|
|
65
|
+
name: ${k}
|
|
66
66
|
triggers:
|
|
67
|
-
`;return
|
|
68
|
-
`}),
|
|
69
|
-
`),
|
|
67
|
+
`;return L.forEach(N=>{G+=` - ${N.trim()}
|
|
68
|
+
`}),Q&&(G+=`replaces_orchestrator: true
|
|
69
|
+
`),G+=`---
|
|
70
70
|
|
|
71
|
-
`,
|
|
72
|
-
`);try{const J=await fetch(`/api/skills/${encodeURIComponent(S)}`,{method:"PUT",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({content:ae})});if(!J.ok)throw new Error(J.statusText);k.value="Created ✓",x.value=!1,await F();const O=t.value.find(q=>q.name===S);O&&C(O)}catch(J){k.value="Error: "+J.message}}return Be(F),(S,D)=>(h(),g("div",oc,[o("div",rc,[o("div",lc,[D[8]||(D[8]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Skill Library"),o("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),o("button",{onClick:D[0]||(D[0]=G=>{x.value=!x.value,n.value=null}),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + New Skill ")]),x.value?(h(),g("div",ac,[D[12]||(D[12]=o("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),o("div",ic,[o("div",null,[D[9]||(D[9]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),Z(o("input",{"onUpdate:modelValue":D[1]||(D[1]=G=>f.value=G),type:"text",placeholder:"my-skill",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,f.value]])]),o("div",null,[D[10]||(D[10]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),Z(o("input",{"onUpdate:modelValue":D[2]||(D[2]=G=>m.value=G),type:"text",placeholder:"trigger1, trigger2",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[ne,m.value]])])]),o("div",cc,[o("label",uc,[Z(o("input",{"onUpdate:modelValue":D[3]||(D[3]=G=>v.value=G),type:"checkbox",class:"rounded"},null,512),[[io,v.value]]),D[11]||(D[11]=o("span",null,"Replaces orchestrator",-1))])]),o("div",dc,[o("button",{onClick:y,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),o("button",{onClick:D[4]||(D[4]=G=>x.value=!1),class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel"),k.value?(h(),g("span",fc,b(k.value),1)):K("",!0)])])):K("",!0),s.value?(h(),g("div",pc,"Loading...")):t.value.length===0?(h(),g("div",mc,"No skills loaded")):(h(),g("div",xc,[(h(!0),g(se,null,ve(t.value,G=>{var ae;return h(),g("div",{key:G.name,onClick:J=>C(G),class:W(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((ae=n.value)==null?void 0:ae.name)===G.name?"border-accent":"border-transparent"])},[o("div",hc,[o("div",gc,[o("div",yc,[o("span",bc,b(G.name),1),o("span",{class:"type-badge",style:Ut(N($(G.source)))},b($(G.source)),5),G.replacesOrchestrator?(h(),g("span",_c,"REPLACES ORCH")):K("",!0)]),o("div",wc,[(h(!0),g(se,null,ve(G.triggers||[],J=>(h(),g("span",{key:J,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},b(J),1))),128))])]),o("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:G.source||""},b((G.source||"").split(/[\\/]/).pop()||""),9,kc)])],10,vc)}),128))]))]),n.value?(h(),g("div",Sc,[o("div",$c,[o("div",null,[o("h3",Cc,"Edit: "+b(n.value.name),1),o("p",Tc,b(n.value.source||"(unknown source)"),1)]),o("div",Pc,[u.value?(h(),g("span",Ec,b(u.value),1)):K("",!0),d.value?(h(),g("span",Ac,b(d.value),1)):K("",!0),$(n.value.source)==="user"?(h(),g("button",{key:2,onClick:U,class:"px-4 py-2 rounded-xl bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-sm text-textSecondary hover:text-red-400 transition",title:"Remove user override (reverts to default)"},"Remove override")):K("",!0),o("button",{onClick:P,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Close"),o("button",{onClick:I,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),o("div",Ic,[o("div",null,[D[13]||(D[13]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),o("input",{value:n.value.name,type:"text",readonly:"",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono opacity-60 cursor-not-allowed"},null,8,Oc)]),o("div",null,[D[14]||(D[14]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),Z(o("input",{"onUpdate:modelValue":D[5]||(D[5]=G=>l.value=G),type:"text",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[ne,l.value]])]),o("div",Mc,[o("label",Dc,[Z(o("input",{"onUpdate:modelValue":D[6]||(D[6]=G=>a.value=G),type:"checkbox",class:"rounded"},null,512),[[io,a.value]]),D[15]||(D[15]=o("span",null,"Replaces orchestrator",-1))])])]),Z(o("textarea",{"onUpdate:modelValue":D[7]||(D[7]=G=>r.value=G),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Skill body (markdown)..."},null,512),[[ne,r.value]])])):K("",!0)]))}}),jc={class:"animate-fade-in space-y-6"},Lc={class:"glass rounded-xl p-6"},Uc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Nc={class:"flex items-center gap-3"},Vc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Bc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Fc=["value"],Hc={class:"flex justify-end"},Kc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},zc={key:1,class:"text-center py-8 text-danger text-sm"},Jc={key:2,class:"text-center py-12 text-textSecondary"},qc={key:3},Gc={class:"space-y-3"},Yc={class:"p-4"},Zc={class:"flex flex-wrap items-center gap-3"},Qc=["onBlur"],Xc=["onDblclick"],eu={class:"text-xs text-muted font-mono"},tu=["value","onChange"],su=["value"],nu=["value"],ou={class:"text-xs text-muted"},ru=["onKeyup","onBlur"],lu=["title","onDblclick"],au={class:"ml-auto flex items-center gap-3"},iu=["onClick","disabled"],cu={class:"flex items-center gap-1.5"},uu=["onClick"],du={class:"flex items-center gap-1.5"},fu=["onClick"],pu={class:"flex items-center gap-1.5"},mu=["onClick"],xu=["onClick"],vu=["onClick"],hu=["onClick"],gu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},yu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},bu=["value"],_u={class:"flex items-center gap-2"},wu=["onClick","disabled"],ku={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},Su={key:0,class:"text-xs text-muted py-1"},$u={class:"text-sm font-medium"},Cu={class:"text-xs text-muted font-mono"},Tu=["value","onChange"],Pu=["value"],Eu=["value"],Au={class:"text-xs text-muted"},Iu=["onBlur","onKeyup"],Ou=["title","onDblclick"],Mu={class:"ml-auto flex items-center gap-3"},Du=["onClick","disabled"],Ru=["onClick","disabled"],ju=["onClick","disabled"],Lu={key:2,class:"flex items-center gap-1.5"},Uu=["onClick"],Nu={key:3,class:"flex items-center gap-1.5"},Vu=["onClick"],Bu={key:4,class:"flex items-center gap-1.5"},Fu=["onClick"],Hu=["onClick"],Ku={key:4},Wu={class:"space-y-2"},zu={class:"font-medium"},Ju={class:"text-xs text-muted font-mono"},qu={class:"text-xs text-textSecondary"},Gu={class:"text-xs text-muted"},Yu={class:"ml-auto flex items-center gap-2"},Zu=["onClick","disabled"],Qu=["onClick","disabled"],Xu=["onClick"],ed={key:5},td={class:"space-y-2"},sd={class:"font-medium"},nd={class:"text-xs text-muted font-mono"},od=["value","onChange"],rd=["value"],ld=["value"],ad={class:"text-xs text-muted"},id=["onBlur","onKeyup"],cd=["title","onDblclick"],ud={class:"ml-auto flex items-center gap-3"},dd=["onClick","disabled"],fd=["onClick","disabled"],pd={class:"flex items-center gap-1.5"},md=["onClick"],xd={class:"flex items-center gap-1.5"},vd=["onClick"],hd={class:"flex items-center gap-1.5"},gd=["onClick"],yd=["onClick"],bd={key:6},_d={class:"space-y-2"},wd={class:"font-medium"},kd={class:"text-xs text-muted font-mono"},Sd=["value","onChange"],$d=["value"],Cd=["value"],Td={class:"text-xs text-muted"},Pd=He({__name:"ThreadsTab",setup(e){const t=w([]),s=w(!0),n=w(""),r=w({}),l=w(new Set),a=w(!1),u=w({name:"",threadId:0,client:"claude",workingDirectory:""}),d=w(""),x=w(!1),f=w(null),m=w(""),v=w(null),k=w(""),F=w(null),$=w({name:"",threadId:0,client:"claude",workingDirectory:""}),N=w(""),C=w(!1),P=w(null),j=w(null),I=w(null),U=["claude","copilot","codex"];function y(V){return U.includes(V)}const S={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"},worker:{emoji:"🟡",classes:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30"}},D=Pe(()=>t.value.filter(V=>V.type==="root")),G=Pe(()=>t.value.filter(V=>V.type==="daily")),ae=Pe(()=>t.value.filter(V=>V.type==="branch")),J=Pe(()=>t.value.filter(V=>V.type==="worker"));async function O(){s.value=!0,n.value="";try{const V=await he("/api/threads");t.value=V.threads??[]}catch(V){n.value=V.message||"Failed to load threads"}finally{s.value=!1}}async function q(V){try{const i=await he(`/api/threads/${V}/children`);r.value[V]=i.threads??[]}catch{r.value[V]=[]}}function re(V){l.value.has(V)?l.value.delete(V):(l.value.add(V),q(V))}async function _e(){if(!(!u.value.name.trim()||!u.value.threadId)){x.value=!0,d.value="";try{const V=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:u.value.threadId,name:u.value.name.trim(),type:"root",client:u.value.client,keepAlive:!0,...u.value.workingDirectory.trim()?{workingDirectory:u.value.workingDirectory.trim()}:{}})});if(!V.ok){const i=await V.json().catch(()=>({error:V.statusText}));throw new Error(i.error??V.statusText)}d.value="Created ✓",u.value={name:"",threadId:0,client:"claude",workingDirectory:""},a.value=!1,setTimeout(()=>{d.value=""},3e3),await O()}catch(V){d.value="Error: "+V.message}finally{x.value=!1}}}async function ke(V){if(!(!$.value.name.trim()||!$.value.threadId)){C.value=!0,N.value="";try{const i=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:$.value.threadId,name:$.value.name.trim(),type:"branch",rootThreadId:V,client:$.value.client,...$.value.workingDirectory.trim()?{workingDirectory:$.value.workingDirectory.trim()}:{}})});if(!i.ok){const c=await i.json().catch(()=>({error:i.statusText}));throw new Error(c.error??i.statusText)}N.value="Branch created ✓",$.value={name:"",threadId:0,client:"claude",workingDirectory:""},F.value=null,setTimeout(()=>{N.value=""},3e3),await O(),q(V)}catch(i){N.value="Error: "+i.message}finally{C.value=!1}}}function me(V){f.value=V.threadId,m.value=V.name}async function ie(V){const i=m.value.trim();if(f.value=null,!!i)try{const c=await fetch(`/api/threads/${V}`,{method:"PATCH",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({name:i})});if(!c.ok)throw new Error(c.statusText);await O()}catch(c){n.value="Failed to rename thread: "+c.message}}function z(V){v.value=V.threadId,k.value=V.workingDirectory??""}async function R(V){const i=k.value.trim();v.value=null;try{const c=await fetch(`/api/threads/${V}`,{method:"PATCH",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({workingDirectory:i||null})});if(!c.ok)throw new Error(c.statusText);await O()}catch(c){n.value="Failed to update working directory: "+c.message}}async function Ce(V){try{const i=await fetch(`/api/threads/${V.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!V.keepAlive})});if(!i.ok)throw new Error(i.statusText);await O()}catch(i){n.value="Failed to toggle keep-alive: "+i.message}}async function we(V,i){try{const c=await fetch(`/api/threads/${V.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({client:i})});if(!c.ok)throw new Error(c.statusText);await O()}catch(c){n.value="Failed to change agent type: "+c.message}}async function fe(V){try{const i=await fetch(`/api/threads/${V.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!V.dailyRotation})});if(!i.ok)throw new Error(i.statusText);await O()}catch(i){n.value="Failed to toggle daily rotation: "+i.message}}async function at(V){try{const i=await fetch(`/api/threads/${V.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!V.autonomousMode})});if(!i.ok)throw new Error(i.statusText);await O()}catch(i){n.value="Failed to toggle autonomous mode: "+i.message}}async function It(V){if(confirm(`Archive thread "${V.name}" (${V.threadId})?`))try{const i=await fetch(`/api/threads/${V.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${de()}`}});if(!i.ok)throw new Error(i.statusText);await O()}catch(i){n.value="Failed to archive: "+i.message}}async function Je(V){if(confirm(`Start thread "${V.name}" (${V.threadId})?`)){P.value=V.threadId;try{const i=await fetch(`/api/threads/${V.threadId}/start`,{method:"POST",headers:{Authorization:`Bearer ${de()}`}});if(!i.ok){const c=await i.json().catch(()=>({error:i.statusText}));throw new Error(c.error??i.statusText)}await O()}catch(i){n.value="Failed to start thread: "+i.message}finally{P.value=null}}}function yt(V){d.value="Sync to Root — not yet implemented",setTimeout(()=>{d.value=""},3e3)}async function Kt(V){if(confirm(`Convert "${V.name}" to a root thread? This will detach it from its parent.`)){I.value=V.threadId;try{const i=await fetch(`/api/threads/${V.threadId}/convert-to-root`,{method:"POST",headers:{Authorization:`Bearer ${de()}`}});if(!i.ok){const c=await i.json().catch(()=>({error:i.statusText}));throw new Error(c.error??i.statusText)}n.value="",d.value=`Converted "${V.name}" to root ✓`,setTimeout(()=>{d.value=""},3e3),await O()}catch(i){n.value="Failed to convert: "+i.message}finally{I.value=null}}}function bt(V){if(!V)return"—";const i=new Date(V),_=Date.now()-i.getTime();return _<6e4?"just now":_<36e5?`${Math.floor(_/6e4)}m ago`:_<864e5?`${Math.floor(_/36e5)}h ago`:i.toLocaleDateString()}function Ke(V){return V==="active"?"text-success":V==="archived"?"text-muted":"text-warn"}return Be(O),(V,i)=>(h(),g("div",jc,[o("div",Lc,[o("div",Uc,[i[18]||(i[18]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Thread Registry"),o("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),o("div",Nc,[d.value?(h(),g("span",{key:0,class:W([d.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},b(d.value),3)):K("",!0),o("button",{onClick:i[0]||(i[0]=c=>a.value=!a.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},b(a.value?"Cancel":"+ New Root Thread"),1),o("button",{onClick:O,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),a.value?(h(),g("div",Vc,[o("div",Bc,[o("div",null,[i[19]||(i[19]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),Z(o("input",{"onUpdate:modelValue":i[1]||(i[1]=c=>u.value.name=c),type:"text",placeholder:"e.g. Main Workspace",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ne,u.value.name]])]),o("div",null,[i[20]||(i[20]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),Z(o("input",{"onUpdate:modelValue":i[2]||(i[2]=c=>u.value.threadId=c),type:"number",min:"1",placeholder:"Telegram thread ID",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ne,u.value.threadId,void 0,{number:!0}]])]),o("div",null,[i[21]||(i[21]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),Z(o("select",{"onUpdate:modelValue":i[3]||(i[3]=c=>u.value.client=c),class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(h(),g(se,null,ve(U,c=>o("option",{key:c,value:c},b(c),9,Fc)),64))],512),[[At,u.value.client]])])]),o("div",null,[i[22]||(i[22]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Working Directory (optional)",-1)),Z(o("input",{"onUpdate:modelValue":i[4]||(i[4]=c=>u.value.workingDirectory=c),type:"text",placeholder:"e.g. C:\\src\\my-project",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition font-mono"},null,512),[[ne,u.value.workingDirectory]])]),o("div",Hc,[o("button",{onClick:_e,disabled:x.value||!u.value.name.trim()||!u.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(x.value?"Creating…":"Create Root Thread"),9,Kc)])])):K("",!0)]),s.value&&t.value.length===0?(h(),g("div",Wc,"Loading threads…")):n.value?(h(),g("div",zc,b(n.value),1)):t.value.length===0?(h(),g("div",Jc,"No threads registered")):K("",!0),D.value.length>0?(h(),g("div",qc,[i[29]||(i[29]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),o("div",Gc,[(h(!0),g(se,null,ve(D.value,c=>{var _,T;return h(),g("div",{key:c.id,class:"glass rounded-xl overflow-hidden"},[o("div",Yc,[o("div",Zc,[o("span",{class:W(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(_=S[c.type])==null?void 0:_.classes])},b((T=S[c.type])==null?void 0:T.emoji)+" "+b(c.type.toUpperCase()),3),f.value===c.threadId?Z((h(),g("input",{key:0,"onUpdate:modelValue":i[5]||(i[5]=p=>m.value=p),onBlur:p=>ie(c.threadId),onKeyup:[i[6]||(i[6]=Xe(p=>p.target.blur(),["enter"])),i[7]||(i[7]=Xe(p=>f.value=null,["escape"]))],class:"font-semibold bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-40",ref_for:!0,ref:"nameInput"},null,40,Qc)),[[ne,m.value]]):(h(),g("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:p=>me(c),title:"Double-click to rename"},b(c.name),41,Xc)),o("span",{class:W(["text-xs font-medium",Ke(c.status)])},b(c.status),3),o("span",eu,"ID: "+b(c.threadId),1),o("select",{value:c.client,onChange:p=>we(c,p.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[y(c.client)?K("",!0):(h(),g("option",{key:0,value:c.client,disabled:""},b(c.client)+" (legacy)",9,su)),(h(),g(se,null,ve(U,p=>o("option",{key:p,value:p},b(p),9,nu)),64))],40,tu),o("span",ou,b(bt(c.lastActiveAt)),1),v.value===c.threadId?Z((h(),g("input",{key:2,"onUpdate:modelValue":i[8]||(i[8]=p=>k.value=p),onKeyup:[Xe(p=>R(c.threadId),["enter"]),i[9]||(i[9]=Xe(p=>v.value=null,["escape"]))],onBlur:p=>R(c.threadId),type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,ru)),[[ne,k.value]]):(h(),g("span",{key:3,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(c.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:p=>z(c)},"📁 "+b(c.workingDirectory??"—"),41,lu)),o("div",au,[o("button",{onClick:p=>Je(c),disabled:P.value===c.threadId||c.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(P.value===c.threadId?"Starting…":"▶ Start"),9,iu),o("div",cu,[o("button",{onClick:p=>Ce(c),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,uu),i[23]||(i[23]=o("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),o("div",du,[o("button",{onClick:p=>fe(c),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,fu),i[24]||(i[24]=o("span",{class:"text-xs text-muted"},"Daily",-1))]),o("div",pu,[o("button",{onClick:p=>at(c),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,mu),i[25]||(i[25]=o("span",{class:"text-xs text-muted"},"Auto",-1))]),o("button",{onClick:p=>re(c.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},b(l.value.has(c.threadId)?"▾ Children":"▸ Children"),9,xu),o("button",{onClick:p=>{F.value=F.value===c.threadId?null:c.threadId,$.value={name:"",threadId:0,client:"claude",workingDirectory:""},N.value=""},class:"px-2 py-1 rounded-lg text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 hover:bg-purple-500/30 transition"}," + Branch ",8,vu),o("button",{onClick:p=>It(c),class:"px-2 py-1 rounded-lg text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition"}," Archive ",8,hu)])]),F.value===c.threadId?(h(),g("div",gu,[o("div",yu,[Z(o("input",{"onUpdate:modelValue":i[10]||(i[10]=p=>$.value.name=p),type:"text",placeholder:"Branch name",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ne,$.value.name]]),Z(o("input",{"onUpdate:modelValue":i[11]||(i[11]=p=>$.value.threadId=p),type:"number",min:"1",placeholder:"Thread ID",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ne,$.value.threadId,void 0,{number:!0}]]),Z(o("select",{"onUpdate:modelValue":i[12]||(i[12]=p=>$.value.client=p),class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(h(),g(se,null,ve(U,p=>o("option",{key:p,value:p},b(p),9,bu)),64))],512),[[At,$.value.client]])]),Z(o("input",{"onUpdate:modelValue":i[13]||(i[13]=p=>$.value.workingDirectory=p),type:"text",placeholder:"Working directory (optional)",class:"w-full px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition font-mono"},null,512),[[ne,$.value.workingDirectory]]),o("div",_u,[o("button",{onClick:p=>ke(c.threadId),disabled:C.value||!$.value.name.trim()||!$.value.threadId,class:"px-3 py-1.5 rounded-lg bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-xs font-medium transition"},b(C.value?"Creating…":"Create Branch"),9,wu),N.value?(h(),g("span",{key:0,class:W([N.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},b(N.value),3)):K("",!0)])])):K("",!0)]),l.value.has(c.threadId)&&r.value[c.threadId]?(h(),g("div",ku,[r.value[c.threadId].length===0?(h(),g("div",Su,"No children")):K("",!0),(h(!0),g(se,null,ve(r.value[c.threadId],p=>{var E,B;return h(),g("div",{key:p.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[o("span",{class:W(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(E=S[p.type])==null?void 0:E.classes])},b((B=S[p.type])==null?void 0:B.emoji)+" "+b(p.type.toUpperCase()),3),o("span",$u,b(p.name),1),o("span",{class:W(["text-xs",Ke(p.status)])},b(p.status),3),o("span",Cu,"ID: "+b(p.threadId),1),o("select",{value:p.client,onChange:M=>we(p,M.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[y(p.client)?K("",!0):(h(),g("option",{key:0,value:p.client,disabled:""},b(p.client)+" (legacy)",9,Pu)),(h(),g(se,null,ve(U,M=>o("option",{key:M,value:M},b(M),9,Eu)),64))],40,Tu),o("span",Au,b(bt(p.lastActiveAt)),1),p.type==="branch"&&v.value===p.threadId?Z((h(),g("input",{key:0,"onUpdate:modelValue":i[14]||(i[14]=M=>k.value=M),onBlur:M=>R(p.threadId),onKeyup:[Xe(M=>R(p.threadId),["enter"]),i[15]||(i[15]=Xe(M=>v.value=null,["escape"]))],type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,Iu)),[[ne,k.value]]):p.type==="branch"?(h(),g("span",{key:1,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(p.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:M=>z(p)},"📁 "+b(p.workingDirectory??"—"),41,Ou)):K("",!0),o("div",Mu,[o("button",{onClick:M=>Je(p),disabled:P.value===p.threadId||p.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(P.value===p.threadId?"Starting…":"▶ Start"),9,Du),p.rootThreadId?(h(),g("button",{key:0,onClick:M=>yt(),disabled:j.value===p.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},b(j.value===p.threadId?"Syncing…":"⟳ Sync to Root"),9,Ru)):K("",!0),p.type==="branch"||p.type==="daily"?(h(),g("button",{key:1,onClick:M=>Kt(p),disabled:I.value===p.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Convert to independent root thread"},b(I.value===p.threadId?"Converting…":"↑ To Root"),9,ju)):K("",!0),p.type==="branch"?(h(),g("div",Lu,[o("button",{onClick:M=>Ce(p),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Uu),i[26]||(i[26]=o("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):K("",!0),p.type==="branch"?(h(),g("div",Nu,[o("button",{onClick:M=>fe(p),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,Vu),i[27]||(i[27]=o("span",{class:"text-xs text-muted"},"Daily",-1))])):K("",!0),p.type==="branch"?(h(),g("div",Bu,[o("button",{onClick:M=>at(p),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Fu),i[28]||(i[28]=o("span",{class:"text-xs text-muted"},"Auto",-1))])):K("",!0),p.type!=="root"?(h(),g("button",{key:5,onClick:M=>It(p),class:"px-2 py-0.5 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Hu)):K("",!0)])])}),128))])):K("",!0)])}),128))])])):K("",!0),G.value.length>0?(h(),g("div",Ku,[i[30]||(i[30]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),o("div",Wu,[(h(!0),g(se,null,ve(G.value,c=>{var _,T;return h(),g("div",{key:c.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[o("span",{class:W(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(_=S[c.type])==null?void 0:_.classes])},b((T=S[c.type])==null?void 0:T.emoji)+" "+b(c.type.toUpperCase()),3),o("span",zu,b(c.name),1),o("span",{class:W(["text-xs font-medium",Ke(c.status)])},b(c.status),3),o("span",Ju,"ID: "+b(c.threadId),1),o("span",qu,b(c.client),1),o("span",Gu,b(bt(c.lastActiveAt)),1),o("div",Yu,[o("button",{onClick:p=>Je(c),disabled:P.value===c.threadId||c.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(P.value===c.threadId?"Starting…":"▶ Start"),9,Zu),c.rootThreadId?(h(),g("button",{key:0,onClick:p=>yt(),disabled:j.value===c.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},b(j.value===c.threadId?"Syncing…":"⟳ Sync to Root"),9,Qu)):K("",!0),o("button",{onClick:p=>It(c),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Xu)])])}),128))])])):K("",!0),ae.value.length>0?(h(),g("div",ed,[i[34]||(i[34]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),o("div",td,[(h(!0),g(se,null,ve(ae.value,c=>{var _,T;return h(),g("div",{key:c.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[o("span",{class:W(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(_=S[c.type])==null?void 0:_.classes])},b((T=S[c.type])==null?void 0:T.emoji)+" "+b(c.type.toUpperCase()),3),o("span",sd,b(c.name),1),o("span",{class:W(["text-xs font-medium",Ke(c.status)])},b(c.status),3),o("span",nd,"ID: "+b(c.threadId),1),o("select",{value:c.client,onChange:p=>we(c,p.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[y(c.client)?K("",!0):(h(),g("option",{key:0,value:c.client,disabled:""},b(c.client)+" (legacy)",9,rd)),(h(),g(se,null,ve(U,p=>o("option",{key:p,value:p},b(p),9,ld)),64))],40,od),o("span",ad,b(bt(c.lastActiveAt)),1),v.value===c.threadId?Z((h(),g("input",{key:0,"onUpdate:modelValue":i[16]||(i[16]=p=>k.value=p),onBlur:p=>R(c.threadId),onKeyup:[Xe(p=>R(c.threadId),["enter"]),i[17]||(i[17]=Xe(p=>v.value=null,["escape"]))],type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,id)),[[ne,k.value]]):(h(),g("span",{key:1,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(c.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:p=>z(c)},"📁 "+b(c.workingDirectory??"—"),41,cd)),o("div",ud,[o("button",{onClick:p=>Je(c),disabled:P.value===c.threadId||c.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(P.value===c.threadId?"Starting…":"▶ Start"),9,dd),c.rootThreadId?(h(),g("button",{key:0,onClick:p=>yt(),disabled:j.value===c.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},b(j.value===c.threadId?"Syncing…":"⟳ Sync to Root"),9,fd)):K("",!0),o("div",pd,[o("button",{onClick:p=>Ce(c),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,md),i[31]||(i[31]=o("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),o("div",xd,[o("button",{onClick:p=>fe(c),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,vd),i[32]||(i[32]=o("span",{class:"text-xs text-muted"},"Daily",-1))]),o("div",hd,[o("button",{onClick:p=>at(c),class:W(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[o("span",{class:W(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,gd),i[33]||(i[33]=o("span",{class:"text-xs text-muted"},"Auto",-1))]),o("button",{onClick:p=>It(c),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,yd)])])}),128))])])):K("",!0),J.value.length>0?(h(),g("div",bd,[i[36]||(i[36]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),o("div",_d,[(h(!0),g(se,null,ve(J.value,c=>{var _,T;return h(),g("div",{key:c.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[o("span",{class:W(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(_=S[c.type])==null?void 0:_.classes])},b((T=S[c.type])==null?void 0:T.emoji)+" "+b(c.type.toUpperCase()),3),o("span",wd,b(c.name),1),o("span",{class:W(["text-xs font-medium",Ke(c.status)])},b(c.status),3),o("span",kd,"ID: "+b(c.threadId),1),o("select",{value:c.client,onChange:p=>we(c,p.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[y(c.client)?K("",!0):(h(),g("option",{key:0,value:c.client,disabled:""},b(c.client)+" (legacy)",9,$d)),(h(),g(se,null,ve(U,p=>o("option",{key:p,value:p},b(p),9,Cd)),64))],40,Sd),o("span",Td,b(bt(c.lastActiveAt)),1),i[35]||(i[35]=o("span",{class:"ml-auto text-xs text-muted italic"},"auto-managed",-1))])}),128))])])):K("",!0)]))}}),Ed={class:"animate-fade-in"},Ad={class:"glass rounded-xl p-6 mb-6"},Id={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Od={class:"flex items-center gap-3"},Md={key:0,class:"text-center py-8 text-textSecondary text-sm"},Dd={key:1,class:"text-center py-8 text-danger text-sm"},Rd={key:2,class:"text-center text-textSecondary py-12"},jd={key:3,class:"space-y-2"},Ld={key:0,class:"glass rounded-xl p-4 border border-gray-700/50 opacity-75"},Ud={class:"flex items-center justify-between gap-3"},Nd={class:"flex items-center gap-2 min-w-0"},Vd={class:"flex items-center justify-between gap-3"},Bd={class:"flex-1 min-w-0"},Fd={class:"flex items-center gap-2 mb-1"},Hd={class:"font-medium text-sm font-mono"},Kd={class:"text-xs text-muted font-mono truncate"},Wd={class:"flex items-center gap-2 shrink-0"},zd=["onClick"],Jd=["onClick","disabled"],qd={key:0,class:"glass rounded-xl p-6 border border-accent/30"},Gd={class:"text-lg font-semibold mb-4"},Yd={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4"},Zd=["readonly"],Qd={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4"},Xd={class:"mb-4"},ef={class:"flex items-center justify-between mb-2"},tf=["onUpdate:modelValue"],sf=["onUpdate:modelValue"],nf=["onClick"],of={key:0,class:"text-xs text-muted italic"},rf={class:"mb-4"},lf={class:"mb-4"},af={class:"flex items-center justify-between mb-2"},cf=["onUpdate:modelValue"],uf=["onUpdate:modelValue"],df=["onClick"],ff={key:0,class:"text-xs text-muted italic"},pf={class:"flex items-center gap-3 flex-wrap"},mf=["disabled"],xf={key:0,class:"text-sm text-danger"},Gt="sensorium-mcp",vf=He({__name:"McpServersTab",setup(e){const t=w({}),s=w(!0),n=w(""),r=w(""),l=w(!0),a=w(!1),u=w(null),d=w(!1),x=w(null),f=w(""),m=w("stdio"),v=w(""),k=w(""),F=w(""),$=w([]),N=w([]),C=w(""),P=Pe(()=>Object.entries(t.value).filter(([J])=>J!==Gt));async function j(){s.value=!0,n.value="";try{const J=await he("/api/mcp-servers");t.value=J.servers||{}}catch(J){n.value="Failed to load MCP servers: "+J.message}finally{s.value=!1}}function I(J){return J==="stdio"?"background:rgba(99,102,241,0.15);color:#818cf8":"background:rgba(34,197,94,0.15);color:#4ade80"}function U(){x.value=null,f.value="",m.value="stdio",v.value="",k.value="",F.value="",$.value=[],N.value=[],C.value="",d.value=!0}function y(J,O){x.value=J,f.value=J,m.value=O.type,v.value=O.command||"",k.value=(O.args||[]).join(" "),F.value=O.url||"",$.value=Object.entries(O.env||{}).map(([q,re])=>({k:q,v:re})),N.value=Object.entries(O.headers||{}).map(([q,re])=>({k:q,v:re})),C.value="",d.value=!0}function S(){d.value=!1,x.value=null}function D(){if(C.value="",!f.value.trim())return C.value="Name is required",!1;if(m.value==="stdio"&&!v.value.trim())return C.value="Command is required for stdio type",!1;if(m.value==="http"){const J=F.value.trim();if(!J)return C.value="URL is required for http type",!1;if(!/^https?:\/\/.+/.test(J))return C.value="URL must start with http:// or https://",!1}return!0}async function G(){if(!D()||a.value)return;a.value=!0;const J=f.value.trim(),O={type:m.value};if(m.value==="stdio"){O.command=v.value.trim();const q=k.value.trim();q&&(O.args=q.split(/\s+/));const re=Object.fromEntries($.value.filter(_e=>_e.k.trim()).map(_e=>[_e.k.trim(),_e.v]));Object.keys(re).length&&(O.env=re)}else{O.url=F.value.trim();const q=Object.fromEntries(N.value.filter(re=>re.k.trim()).map(re=>[re.k.trim(),re.v]));Object.keys(q).length&&(O.headers=q)}try{const q=await fetch("/api/mcp-servers",{method:"POST",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify({name:J,config:O})});if(!q.ok)throw new Error(q.statusText);r.value="Saved ✓",l.value=!0,setTimeout(()=>{r.value=""},3e3),S(),await j()}catch(q){C.value="Error: "+q.message}finally{a.value=!1}}async function ae(J){if(confirm(`Delete MCP server "${J}"?`)&&!u.value){u.value=J;try{const O=await fetch(`/api/mcp-servers/${encodeURIComponent(J)}`,{method:"DELETE",headers:{Authorization:`Bearer ${de()}`}});if(!O.ok)throw new Error(O.statusText);r.value="Deleted ✓",l.value=!0,setTimeout(()=>{r.value=""},3e3),await j()}catch(O){r.value="Error: "+O.message,l.value=!1}finally{u.value=null}}}return Be(j),(J,O)=>(h(),g("div",Ed,[o("div",Ad,[o("div",Id,[O[7]||(O[7]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"MCP Servers"),o("p",{class:"text-sm text-textSecondary mt-1"},"Manage external MCP server connections (stdio and HTTP)")],-1)),o("div",Od,[r.value?(h(),g("span",{key:0,class:W(["text-sm",l.value?"text-success":"text-danger"])},b(r.value),3)):K("",!0),o("button",{onClick:U,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + Add Server ")])]),s.value?(h(),g("div",Md,"Loading...")):n.value?(h(),g("div",Dd,b(n.value),1)):Object.keys(t.value).length===0?(h(),g("div",Rd,"No MCP servers configured")):(h(),g("div",jd,[t.value[Gt]?(h(),g("div",Ld,[o("div",Ud,[o("div",Nd,[o("span",{class:"font-medium text-sm font-mono"},b(Gt)),o("span",{class:"type-badge",style:Ut(I(t.value[Gt].type))},b(t.value[Gt].type),5),O[8]||(O[8]=o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"built-in",-1))]),O[9]||(O[9]=o("span",{class:"text-xs text-muted italic"},"read-only",-1))])])):K("",!0),(h(!0),g(se,null,ve(P.value,([q,re])=>{var _e;return h(),g("div",{key:q,class:"glass rounded-xl p-4 border border-transparent hover:border-gray-700 transition"},[o("div",Vd,[o("div",Bd,[o("div",Fd,[o("span",Hd,b(q),1),o("span",{class:"type-badge",style:Ut(I(re.type))},b(re.type),5)]),o("div",Kd,[re.type==="stdio"?(h(),g(se,{key:0},[te(b(re.command)+b((_e=re.args)!=null&&_e.length?" "+re.args.join(" "):""),1)],64)):(h(),g(se,{key:1},[te(b(re.url),1)],64))])]),o("div",Wd,[o("button",{onClick:ke=>y(q,re),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},"Edit",8,zd),o("button",{onClick:ke=>ae(q),disabled:u.value===q,class:"px-3 py-1.5 rounded-lg bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-xs text-textSecondary hover:text-red-400 transition disabled:opacity-50"},b(u.value===q?"…":"Delete"),9,Jd)])])])}),128))]))]),d.value?(h(),g("div",qd,[o("h3",Gd,b(x.value?`Edit: ${x.value}`:"Add MCP Server"),1),o("div",Yd,[o("div",null,[O[10]||(O[10]=o("label",{class:"text-xs text-textSecondary block mb-1"},[te("Name "),o("span",{class:"text-danger"},"*")],-1)),Z(o("input",{"onUpdate:modelValue":O[0]||(O[0]=q=>f.value=q),type:"text",readonly:!!x.value,placeholder:"my-server",class:W(["w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition",x.value?"opacity-60 cursor-not-allowed":""])},null,10,Zd),[[ne,f.value]])]),o("div",null,[O[12]||(O[12]=o("label",{class:"text-xs text-textSecondary block mb-1"},[te("Type "),o("span",{class:"text-danger"},"*")],-1)),Z(o("select",{"onUpdate:modelValue":O[1]||(O[1]=q=>m.value=q),class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...O[11]||(O[11]=[o("option",{value:"stdio"},"stdio",-1),o("option",{value:"http"},"http",-1)])],512),[[At,m.value]])])]),m.value==="stdio"?(h(),g(se,{key:0},[o("div",Qd,[o("div",null,[O[13]||(O[13]=o("label",{class:"text-xs text-textSecondary block mb-1"},[te("Command "),o("span",{class:"text-danger"},"*")],-1)),Z(o("input",{"onUpdate:modelValue":O[2]||(O[2]=q=>v.value=q),type:"text",placeholder:"node",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,v.value]])]),o("div",null,[O[14]||(O[14]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Args (space-separated)",-1)),Z(o("input",{"onUpdate:modelValue":O[3]||(O[3]=q=>k.value=q),type:"text",placeholder:"./server.js --port 3000",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,k.value]])])]),o("div",Xd,[o("div",ef,[O[15]||(O[15]=o("label",{class:"text-xs text-textSecondary"},"Environment Variables",-1)),o("button",{onClick:O[4]||(O[4]=q=>$.value.push({k:"",v:""})),class:"text-xs text-accent hover:text-accentLight transition"},"+ Add")]),(h(!0),g(se,null,ve($.value,(q,re)=>(h(),g("div",{key:re,class:"flex items-center gap-2 mb-2"},[Z(o("input",{"onUpdate:modelValue":_e=>q.k=_e,type:"text",placeholder:"KEY",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,tf),[[ne,q.k]]),O[16]||(O[16]=o("span",{class:"text-muted text-xs"},"=",-1)),Z(o("input",{"onUpdate:modelValue":_e=>q.v=_e,type:"text",placeholder:"value",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,sf),[[ne,q.v]]),o("button",{onClick:_e=>$.value.splice(re,1),class:"text-muted hover:text-danger transition text-xs px-2"},"✕",8,nf)]))),128)),$.value.length===0?(h(),g("div",of,"No env vars")):K("",!0)])],64)):(h(),g(se,{key:1},[o("div",rf,[O[17]||(O[17]=o("label",{class:"text-xs text-textSecondary block mb-1"},[te("URL "),o("span",{class:"text-danger"},"*")],-1)),Z(o("input",{"onUpdate:modelValue":O[5]||(O[5]=q=>F.value=q),type:"text",placeholder:"http://localhost:3000/mcp",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,F.value]])]),o("div",lf,[o("div",af,[O[18]||(O[18]=o("label",{class:"text-xs text-textSecondary"},"Headers",-1)),o("button",{onClick:O[6]||(O[6]=q=>N.value.push({k:"",v:""})),class:"text-xs text-accent hover:text-accentLight transition"},"+ Add")]),(h(!0),g(se,null,ve(N.value,(q,re)=>(h(),g("div",{key:re,class:"flex items-center gap-2 mb-2"},[Z(o("input",{"onUpdate:modelValue":_e=>q.k=_e,type:"text",placeholder:"Header-Name",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,cf),[[ne,q.k]]),O[19]||(O[19]=o("span",{class:"text-muted text-xs"},":",-1)),Z(o("input",{"onUpdate:modelValue":_e=>q.v=_e,type:"text",placeholder:"value",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,uf),[[ne,q.v]]),o("button",{onClick:_e=>N.value.splice(re,1),class:"text-muted hover:text-danger transition text-xs px-2"},"✕",8,df)]))),128)),N.value.length===0?(h(),g("div",ff,"No headers")):K("",!0)])],64)),o("div",pf,[o("button",{onClick:G,disabled:a.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(a.value?"Saving…":x.value?"Save Changes":"Add Server"),9,mf),o("button",{onClick:S,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"}," Cancel "),C.value?(h(),g("span",xf,b(C.value),1)):K("",!0)])])):K("",!0)]))}}),hf={class:"animate-fade-in"},gf={class:"glass rounded-xl p-6 mb-6"},yf={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},bf={class:"flex items-center gap-3"},_f=["disabled"],wf={key:0,class:"text-center py-8 text-textSecondary text-sm"},kf={key:1,class:"space-y-6"},Sf={class:"glass rounded-xl p-4 border border-gray-700/50"},$f={class:"glass rounded-xl p-4 border border-gray-700/50"},Cf={class:"glass rounded-xl p-4 border border-gray-700/50"},Tf={class:"glass rounded-xl p-4 border border-gray-700/50"},Pf={class:"glass rounded-xl p-4 border border-gray-700/50"},Ef={class:"glass rounded-xl p-4 border border-gray-700/50"},Af={class:"text-xs text-textSecondary mb-3"},If={class:"flex items-center gap-2"},Of=["placeholder"],Mf=["disabled"],Df={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Rf={class:"grid grid-cols-2 gap-4"},jf={class:"text-sm font-medium font-mono text-textSecondary"},Lf={class:"text-sm font-medium font-mono text-textSecondary"},Uf={class:"mt-3"},Nf=He({__name:"ClaudeTab",setup(e){const t=w(!0),s=w(!1),n=w(""),r=w("claude-opus-4-6"),l=w("claude-opus-4-6"),a=w("claude-sonnet-4-5"),u=w("claude-sonnet-4-5"),d=w(!1),x=w(""),f=w(""),m=w(""),v=w(""),k=w(20),F=w(20),$=w(""),N=w(!1),C=Pe(()=>r.value!==l.value||a.value!==u.value||x.value!==f.value||m.value!==v.value||k.value!==F.value||$.value.length>0);async function P(){t.value=!0;try{const[U,y,S]=await Promise.all([he("/api/settings/default-thread-model"),he("/api/settings/default-worker-model"),he("/api/settings/claude")]);r.value=U.defaultThreadModel,l.value=U.defaultThreadModel,a.value=y.defaultWorkerModel,u.value=y.defaultWorkerModel,x.value=S.cliPath,f.value=S.cliPath,m.value=S.gitBashPath,v.value=S.gitBashPath,k.value=S.maxConcurrentThreads,F.value=S.maxConcurrentThreads,N.value=S.oauthTokenSet,$.value=""}finally{t.value=!1}}async function j(){if(s.value=!0,n.value="",!r.value){n.value="Error: Thread model cannot be empty",s.value=!1;return}if(!a.value){n.value="Error: Worker model cannot be empty",s.value=!1;return}if(!Number.isFinite(k.value)||k.value<1){n.value="Error: Max concurrent threads must be at least 1",s.value=!1;return}try{const U={Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},y={cliPath:x.value,gitBashPath:m.value,maxConcurrentThreads:k.value};$.value.length>0&&(y.oauthToken=$.value);const[S,D,G]=await Promise.all([fetch("/api/settings/default-thread-model",{method:"POST",headers:U,body:JSON.stringify({model:r.value})}),fetch("/api/settings/default-worker-model",{method:"POST",headers:U,body:JSON.stringify({model:a.value})}),fetch("/api/settings/claude",{method:"POST",headers:U,body:JSON.stringify(y)})]);for(const q of[S,D,G])if(!q.ok){const re=await q.json().catch(()=>({error:q.statusText}));throw new Error(re.error??q.statusText)}const ae=await S.json(),J=await D.json(),O=await G.json();l.value=ae.defaultThreadModel,r.value=ae.defaultThreadModel,u.value=J.defaultWorkerModel,a.value=J.defaultWorkerModel,x.value=O.cliPath,f.value=O.cliPath,m.value=O.gitBashPath,v.value=O.gitBashPath,k.value=O.maxConcurrentThreads,F.value=O.maxConcurrentThreads,N.value=O.oauthTokenSet,$.value="",n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(U){n.value="Error: "+U.message}finally{s.value=!1}}async function I(){d.value=!0,n.value="";try{const U={Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},y=await fetch("/api/settings/claude",{method:"POST",headers:U,body:JSON.stringify({clearOauthToken:!0})});if(!y.ok){const D=await y.json().catch(()=>({error:y.statusText}));throw new Error(D.error??y.statusText)}const S=await y.json();N.value=S.oauthTokenSet,$.value="",n.value="Token cleared ✓",setTimeout(()=>{n.value=""},3e3)}catch(U){n.value="Error: "+U.message}finally{d.value=!1}}return Be(P),(U,y)=>(h(),g("div",hf,[o("div",gf,[o("div",yf,[y[6]||(y[6]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Claude"),o("p",{class:"text-sm text-textSecondary mt-1"},"Default models for Claude Code threads and workers")],-1)),o("div",bf,[n.value?(h(),g("span",{key:0,class:W([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},b(n.value),3)):K("",!0),o("button",{onClick:j,disabled:s.value||t.value||!C.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(s.value?"Saving…":"Save"),9,_f)])]),t.value?(h(),g("div",wf,"Loading…")):(h(),g("div",kf,[o("div",Sf,[y[7]||(y[7]=o("label",{class:"block text-sm font-medium mb-1"},"Default Thread Model",-1)),y[8]||(y[8]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Model used when spawning a normal (orchestrator) Claude thread. Overridden by the "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_MODEL"),te(" env var if set. ")],-1)),Z(o("input",{"onUpdate:modelValue":y[0]||(y[0]=S=>r.value=S),type:"text",placeholder:"claude-opus-4-6",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,r.value,void 0,{trim:!0}]])]),o("div",$f,[y[9]||(y[9]=o("label",{class:"block text-sm font-medium mb-1"},"Default Worker Model",-1)),y[10]||(y[10]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Model used when spawning a worker Claude thread. Overridden by the "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_WORKER_MODEL"),te(" env var if set. ")],-1)),Z(o("input",{"onUpdate:modelValue":y[1]||(y[1]=S=>a.value=S),type:"text",placeholder:"claude-sonnet-4-5",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,a.value,void 0,{trim:!0}]])]),o("div",Cf,[y[11]||(y[11]=o("label",{class:"block text-sm font-medium mb-1"},"Claude CLI Path",-1)),y[12]||(y[12]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Explicit path to the Claude binary. Leave empty to auto-detect. Overridden by the "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_CLI_CMD"),te(" env var if set. ")],-1)),Z(o("input",{"onUpdate:modelValue":y[2]||(y[2]=S=>x.value=S),type:"text",placeholder:"(auto-detect)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,x.value,void 0,{trim:!0}]])]),o("div",Tf,[y[13]||(y[13]=o("label",{class:"block text-sm font-medium mb-1"},"Git Bash Path (Windows)",-1)),y[14]||(y[14]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Path to "),o("span",{class:"font-mono text-accentLight"},"bash.exe"),te(" passed to Claude via "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_CODE_GIT_BASH_PATH"),te(". Leave empty to auto-detect. ")],-1)),Z(o("input",{"onUpdate:modelValue":y[3]||(y[3]=S=>m.value=S),type:"text",placeholder:"(auto-detect)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,m.value,void 0,{trim:!0}]])]),o("div",Pf,[y[15]||(y[15]=o("label",{class:"block text-sm font-medium mb-1"},"Max Concurrent Threads",-1)),y[16]||(y[16]=o("p",{class:"text-xs text-textSecondary mb-3"}," Upper limit on simultaneously spawned agent processes. Raising this increases memory and CPU load. ",-1)),Z(o("input",{"onUpdate:modelValue":y[4]||(y[4]=S=>k.value=S),type:"number",min:"1",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,k.value,void 0,{number:!0}]])]),o("div",Ef,[y[20]||(y[20]=o("label",{class:"block text-sm font-medium mb-1"},"Claude OAuth Token",-1)),o("p",Af,[y[17]||(y[17]=te(" Long-lived setup token used instead of the OAuth refresh flow. Overridden by the ",-1)),y[18]||(y[18]=o("span",{class:"font-mono text-accentLight"},"CLAUDE_CODE_OAUTH_TOKEN",-1)),y[19]||(y[19]=te(" env var if set. ",-1)),o("span",{class:W(N.value?"text-success":"text-muted")},b(N.value?"A token is currently stored.":"No token stored."),3)]),o("div",If,[Z(o("input",{"onUpdate:modelValue":y[5]||(y[5]=S=>$.value=S),type:"password",placeholder:N.value?"•••••••• (leave empty to keep)":"Paste token to store",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,Of),[[ne,$.value]]),N.value?(h(),g("button",{key:0,onClick:I,disabled:d.value,class:"px-3 py-2 rounded-lg border border-gray-700 hover:border-danger hover:text-danger disabled:opacity-50 text-sm transition whitespace-nowrap"},b(d.value?"Clearing…":"Clear"),9,Mf)):K("",!0)])]),o("div",Df,[y[23]||(y[23]=o("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),o("div",Rf,[o("div",null,[y[21]||(y[21]=o("div",{class:"text-xs text-muted mb-1"},"Thread Model",-1)),o("span",jf,b(l.value),1)]),o("div",null,[y[22]||(y[22]=o("div",{class:"text-xs text-muted mb-1"},"Worker Model",-1)),o("span",Lf,b(u.value),1)])]),o("div",Uf,[o("span",{class:W(["text-sm font-medium",C.value?"text-warn":"text-textSecondary"])},b(C.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),Vf={class:"animate-fade-in"},Bf={class:"glass rounded-xl p-6 mb-6"},Ff={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},Hf={class:"flex items-center gap-3"},Kf=["disabled"],Wf={key:0,class:"text-center py-8 text-textSecondary text-sm"},zf={key:1,class:"space-y-6"},Jf={class:"glass rounded-xl p-4 border border-gray-700/50"},qf={id:"copilot-models"},Gf=["value"],Yf={key:0,class:"text-xs text-success mt-2"},Zf={class:"glass rounded-xl p-4 border border-gray-700/50"},Qf={class:"flex items-center justify-between"},Xf={class:"glass rounded-xl p-4 border border-gray-700/50"},ep=["disabled"],tp={class:"glass rounded-xl p-4 border border-gray-700/50"},sp=["disabled"],np={class:"glass rounded-xl p-4 border border-gray-700/50"},op={class:"text-xs text-textSecondary mb-3"},rp={key:0,class:"text-success"},lp={key:1,class:"text-warn"},ap=["disabled","placeholder"],ip={class:"glass rounded-xl p-4 border border-gray-700/50"},cp={key:0,class:"mt-4 space-y-4"},up={class:"text-xs text-textSecondary mb-2"},dp=["disabled"],fp={class:"text-xs text-textSecondary mb-2"},pp=["disabled"],mp={class:"glass rounded-xl p-4 border border-gray-700/50"},xp={class:"flex items-center justify-between gap-3"},vp=["disabled"],hp={key:1,class:"mt-3 max-h-48 overflow-y-auto rounded-lg bg-surface/50 border border-gray-700/50 p-3"},gp={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},yp={class:"grid grid-cols-2 gap-4"},bp={class:"text-sm font-medium font-mono text-textSecondary"},_p=He({__name:"CopilotTab",setup(e){const t=w(!0),s=w(!1),n=w(""),r=w(""),l=w(!1),a=w("openai"),u=w(""),d=w(""),x=w(""),f=w(""),m=w(!1),v=w(!1),k=w(!1),F=w(""),$=w([]);async function N(){t.value=!0;try{const U=await he("/api/settings/copilot");C(U),l.value&&m.value&&I(!0)}finally{t.value=!1}}function C(U){r.value=U.model,l.value=U.byok.enabled,a.value=U.byok.providerType,u.value=U.byok.baseUrl,d.value=U.byok.modelId,x.value=U.byok.wireModel,m.value=U.byok.apiKeySet,f.value=""}const P=Pe(()=>!(!r.value.trim()||l.value&&(!u.value.trim()||!m.value&&!f.value.trim())));async function j(){if(s.value=!0,n.value="",!r.value.trim()){n.value="Error: Model cannot be empty",s.value=!1;return}try{const U={enabled:l.value,providerType:a.value,baseUrl:u.value.trim(),modelId:d.value.trim(),wireModel:x.value.trim()};f.value.trim()&&(U.apiKey=f.value.trim());const y={Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},S=await fetch("/api/settings/copilot",{method:"POST",headers:y,body:JSON.stringify({model:r.value.trim(),byok:U})});if(!S.ok){const G=await S.json().catch(()=>({error:S.statusText}));throw new Error(G.error??S.statusText)}const D=await S.json();C(D),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(U){n.value="Error: "+U.message}finally{s.value=!1}}async function I(U=!1){k.value=!0,F.value="",$.value=[];try{const y={baseUrl:u.value.trim(),providerType:a.value};f.value.trim()&&(y.apiKey=f.value.trim());const S=await fetch("/api/settings/copilot/models",{method:"POST",headers:{Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},body:JSON.stringify(y)}),D=await S.json();if(!S.ok||!D.ok)throw new Error(D.error??S.statusText);$.value=D.models??[],F.value=`OK — ${D.count??$.value.length} models`}catch(y){U||(F.value="Error: "+y.message)}finally{k.value=!1}}return Be(N),(U,y)=>(h(),g("div",Vf,[o("div",Bf,[o("div",Ff,[y[9]||(y[9]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Copilot"),o("p",{class:"text-sm text-textSecondary mt-1"},"Model and bring-your-own-key provider (OpenRouter, DeepSeek, Kimi)")],-1)),o("div",Hf,[n.value?(h(),g("span",{key:0,class:W([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},b(n.value),3)):K("",!0),o("button",{onClick:j,disabled:s.value||t.value||!P.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(s.value?"Saving…":"Save"),9,Kf)])]),t.value?(h(),g("div",Wf,"Loading…")):(h(),g("div",zf,[o("div",Jf,[y[10]||(y[10]=o("label",{class:"block text-sm font-medium mb-1"},"Copilot Model",-1)),y[11]||(y[11]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Model passed to the Copilot CLI via "),o("span",{class:"font-mono text-accentLight"},"--model"),te(" / "),o("span",{class:"font-mono text-accentLight"},"COPILOT_MODEL"),te(". ")],-1)),Z(o("input",{"onUpdate:modelValue":y[0]||(y[0]=S=>r.value=S),type:"text",list:"copilot-models",placeholder:"claude-opus-4-6",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ne,r.value,void 0,{trim:!0}]]),o("datalist",qf,[(h(!0),g(se,null,ve($.value,S=>(h(),g("option",{key:S,value:S},null,8,Gf))),128))]),$.value.length?(h(),g("p",Yf,b($.value.length)+" models loaded from provider — pick one from the dropdown. ",1)):K("",!0)]),o("div",Zf,[o("div",Qf,[y[12]||(y[12]=o("div",null,[o("div",{class:"text-sm font-medium"},"Custom Provider (BYOK)"),o("p",{class:"text-xs text-textSecondary mt-1"}," Route Copilot through an OpenAI-compatible endpoint. GitHub auth is not used while enabled. ")],-1)),o("button",{onClick:y[1]||(y[1]=S=>l.value=!l.value),class:W(["relative inline-flex h-6 w-11 items-center rounded-full transition-colors shrink-0",l.value?"bg-accent":"bg-gray-700"])},[o("span",{class:W(["inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform",l.value?"translate-x-6":"translate-x-1"])},null,2)],2)])]),o("div",{class:W(["space-y-4 transition",l.value?"":"opacity-40 pointer-events-none select-none"])},[o("div",Xf,[y[14]||(y[14]=o("label",{class:"block text-sm font-medium mb-1"},"Provider Type",-1)),y[15]||(y[15]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Wire protocol of the endpoint ("),o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_TYPE"),te("). ")],-1)),Z(o("select",{"onUpdate:modelValue":y[2]||(y[2]=S=>a.value=S),disabled:!l.value,class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...y[13]||(y[13]=[o("option",{value:"openai"},"openai",-1),o("option",{value:"azure"},"azure",-1),o("option",{value:"anthropic"},"anthropic",-1)])],8,ep),[[At,a.value]])]),o("div",tp,[y[16]||(y[16]=o("label",{class:"block text-sm font-medium mb-1"},"Base URL",-1)),y[17]||(y[17]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" e.g. "),o("span",{class:"font-mono text-accentLight"},"https://openrouter.ai/api/v1"),te(" ("),o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_BASE_URL"),te("). ")],-1)),Z(o("input",{"onUpdate:modelValue":y[3]||(y[3]=S=>u.value=S),type:"text",disabled:!l.value,placeholder:"https://openrouter.ai/api/v1",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,sp),[[ne,u.value,void 0,{trim:!0}]])]),o("div",np,[y[21]||(y[21]=o("label",{class:"block text-sm font-medium mb-1"},"API Key",-1)),o("p",op,[y[18]||(y[18]=te(" Stored server-side and never echoed back (",-1)),y[19]||(y[19]=o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_API_KEY",-1)),y[20]||(y[20]=te("). ",-1)),m.value?(h(),g("span",rp,"A key is currently set — leave blank to keep it.")):(h(),g("span",lp,"No key set."))]),Z(o("input",{"onUpdate:modelValue":y[4]||(y[4]=S=>f.value=S),type:"password",disabled:!l.value,placeholder:m.value?"•••••••• (unchanged)":"sk-…",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,ap),[[ne,f.value]])]),o("div",ip,[o("button",{type:"button",onClick:y[5]||(y[5]=S=>v.value=!v.value),class:"text-sm font-medium text-textSecondary hover:text-textPrimary transition flex items-center gap-2"},[o("span",null,b(v.value?"▾":"▸"),1),y[22]||(y[22]=te(" Advanced (model mapping) ",-1))]),v.value?(h(),g("div",cp,[o("div",null,[y[25]||(y[25]=o("label",{class:"block text-sm font-medium mb-1"},"Model ID",-1)),o("p",up,[y[23]||(y[23]=te(" Well-known base model for tool config (",-1)),y[24]||(y[24]=o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_MODEL_ID",-1)),te("). Defaults to Copilot Model. "+b($.value.length?"Pick from the tested provider models below.":"Run Test to load the provider’s model list."),1)]),Z(o("input",{"onUpdate:modelValue":y[6]||(y[6]=S=>d.value=S),type:"text",list:"copilot-models",disabled:!l.value,placeholder:"(defaults to Copilot Model)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,dp),[[ne,d.value,void 0,{trim:!0}]])]),o("div",null,[y[28]||(y[28]=o("label",{class:"block text-sm font-medium mb-1"},"Wire Model",-1)),o("p",fp,[y[26]||(y[26]=te(" Exact model name sent to the provider (",-1)),y[27]||(y[27]=o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_WIRE_MODEL",-1)),te("). Defaults to Copilot Model. "+b($.value.length?"Pick from the tested provider models below.":"Run Test to load the provider’s model list."),1)]),Z(o("input",{"onUpdate:modelValue":y[7]||(y[7]=S=>x.value=S),type:"text",list:"copilot-models",disabled:!l.value,placeholder:"(defaults to Copilot Model)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,pp),[[ne,x.value,void 0,{trim:!0}]])])])):K("",!0)]),o("div",mp,[o("div",xp,[y[29]||(y[29]=o("div",null,[o("div",{class:"text-sm font-medium"},"Test Connection"),o("p",{class:"text-xs text-textSecondary mt-1"}," Lists models from the endpoint above using the values entered here — no need to save first. Uses the right auth for the selected Provider Type (openai/azure/anthropic). ")],-1)),o("button",{onClick:y[8]||(y[8]=S=>I()),disabled:k.value||!l.value,class:"px-4 py-2 rounded-xl bg-surface border border-gray-700 hover:border-accent disabled:opacity-50 text-sm font-medium transition whitespace-nowrap"},b(k.value?"Testing…":"Test"),9,vp)]),F.value?(h(),g("div",{key:0,class:W([F.value.startsWith("Error")?"text-danger":"text-success","text-sm mt-3"])},b(F.value),3)):K("",!0),$.value.length?(h(),g("div",hp,[(h(!0),g(se,null,ve($.value,S=>(h(),g("div",{key:S,class:"text-xs font-mono text-textSecondary py-0.5"},b(S),1))),128))])):K("",!0)])],2),o("div",gp,[y[32]||(y[32]=o("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),o("div",yp,[o("div",null,[y[30]||(y[30]=o("div",{class:"text-xs text-muted mb-1"},"Model",-1)),o("span",bp,b(r.value||"—"),1)]),o("div",null,[y[31]||(y[31]=o("div",{class:"text-xs text-muted mb-1"},"Custom Provider",-1)),o("span",{class:W(["text-sm font-medium",l.value?"text-success":"text-textSecondary"])},b(l.value?"Enabled":"Disabled"),3)])])])]))])]))}}),wp={class:"animate-fade-in"},kp={class:"glass rounded-xl p-6 mb-6"},Sp={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},$p={class:"flex items-center gap-3"},Cp=["disabled"],Tp={key:0,class:"text-center py-8 text-textSecondary text-sm"},Pp={key:1,class:"space-y-6"},Ep={class:"glass rounded-xl p-4 border border-gray-700/50"},Ap={class:"flex items-center gap-4"},Ip={class:"flex justify-between text-xs text-muted mt-2"},Op={class:"font-mono"},Mp={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},Dp={class:"glass rounded-xl p-4 border border-gray-700/50"},Rp={class:"flex items-center gap-4"},jp={class:"flex justify-between text-xs text-muted mt-2"},Lp={class:"font-mono"},Up={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Np={class:"grid grid-cols-2 gap-4"},Vp={class:"text-sm font-medium text-textSecondary"},Bp={class:"mt-3"},Fp=He({__name:"SettingsTab",setup(e){const t=w(!0),s=w(!1),n=w(""),r=w(50),l=w(50),a=w(1440),u=w(1440),d=Pe(()=>r.value!==l.value||a.value!==u.value);async function x(){t.value=!0;try{const[m,v]=await Promise.all([he("/api/settings/bootstrap-message-count"),he("/api/settings/wait-timeout")]);r.value=m.count,l.value=m.count,a.value=v.minutes,u.value=v.minutes}finally{t.value=!1}}async function f(){s.value=!0,n.value="";try{const m={Authorization:`Bearer ${de()}`,"Content-Type":"application/json"},[v,k]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:m,body:JSON.stringify({count:r.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:m,body:JSON.stringify({minutes:a.value})})]);for(const N of[v,k])if(!N.ok){const C=await N.json().catch(()=>({error:N.statusText}));throw new Error(C.error??N.statusText)}const F=await v.json(),$=await k.json();l.value=F.count,r.value=F.count,u.value=$.minutes,a.value=$.minutes,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(m){n.value="Error: "+m.message}finally{s.value=!1}}return Be(x),(m,v)=>(h(),g("div",wp,[o("div",kp,[o("div",Sp,[v[4]||(v[4]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Settings"),o("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),o("div",$p,[n.value?(h(),g("span",{key:0,class:W([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},b(n.value),3)):K("",!0),o("button",{onClick:f,disabled:s.value||t.value||!d.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(s.value?"Saving…":"Save"),9,Cp)])]),t.value?(h(),g("div",Tp,"Loading…")):(h(),g("div",Pp,[o("div",Ep,[v[8]||(v[8]=o("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),v[9]||(v[9]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Number of recent messages injected into the agent's bootstrap context. Set to "),o("span",{class:"font-mono text-accentLight"},"0"),te(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),o("div",Ap,[Z(o("input",{"onUpdate:modelValue":v[0]||(v[0]=k=>r.value=k),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[ne,r.value,void 0,{number:!0}]]),Z(o("input",{"onUpdate:modelValue":v[1]||(v[1]=k=>r.value=k),type:"number",min:"0",max:"200",class:"w-20 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[ne,r.value,void 0,{number:!0}]])]),o("div",Ip,[v[5]||(v[5]=o("span",null,"Off",-1)),o("span",Op,b(r.value)+" messages",1),v[6]||(v[6]=o("span",null,"Max",-1))]),r.value===0?(h(),g("div",Mp,[...v[7]||(v[7]=[te(" Message buffer injection is ",-1),o("strong",null,"disabled",-1),te(". The agent will not see recent conversation history in its bootstrap context. Use this when VS Code (or another IDE) already provides conversation history. ",-1)])])):K("",!0)]),o("div",Dp,[v[12]||(v[12]=o("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),v[13]||(v[13]=o("p",{class:"text-xs text-textSecondary mb-3"},[te(" Maximum time (in minutes) a single "),o("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),te(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),o("div",Rp,[Z(o("input",{"onUpdate:modelValue":v[2]||(v[2]=k=>a.value=k),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[ne,a.value,void 0,{number:!0}]]),Z(o("input",{"onUpdate:modelValue":v[3]||(v[3]=k=>a.value=k),type:"number",min:"1",max:"10080",class:"w-24 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[ne,a.value,void 0,{number:!0}]])]),o("div",jp,[v[10]||(v[10]=o("span",null,"1 min",-1)),o("span",Lp,b(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1),v[11]||(v[11]=o("span",null,"24h",-1))])]),o("div",Up,[v[16]||(v[16]=o("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),o("div",Np,[o("div",null,[v[14]||(v[14]=o("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),o("span",{class:W(["text-sm font-medium",l.value>0?"text-success":"text-textSecondary"])},b(l.value>0?`${l.value} messages`:"Disabled"),3)]),o("div",null,[v[15]||(v[15]=o("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),o("span",Vp,b(u.value>=60?Math.floor(u.value/60)+"h "+u.value%60+"m":u.value+" min"),1)])]),o("div",Bp,[o("span",{class:W(["text-sm font-medium",d.value?"text-warn":"text-textSecondary"])},b(d.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),Hp={class:"animate-fade-in"},Kp={class:"glass rounded-xl p-6 mb-6"},Wp={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},zp={class:"flex flex-wrap gap-3 items-center"},Jp=["disabled"],qp={key:0,class:"flex items-center gap-2"},Gp={key:1},Yp={class:"glass rounded-xl p-6"},Zp={key:0,class:"text-center py-8 text-textSecondary text-sm"},Qp={key:1,class:"text-center py-12 text-textSecondary text-sm"},Xp={key:2,class:"space-y-2"},em={class:"flex items-center justify-between gap-3"},tm={class:"flex-1 min-w-0"},sm={class:"flex flex-wrap items-center gap-2 mb-1"},nm={class:"font-medium text-sm font-mono"},om={class:"type-badge",style:{background:"rgba(99,102,241,0.15)",color:"#818cf8"}},rm={class:"text-xs text-muted"},lm={class:"text-xs text-muted"},am=["onClick","disabled"],im={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/80 backdrop-blur-sm"},cm={class:"glass rounded-2xl p-6 max-w-sm w-full mx-4"},um={class:"text-sm text-textSecondary mb-4"},dm={class:"font-mono text-textPrimary"},fm=He({__name:"SnapshotsTab",setup(e){const t=w([]),s=w(!0),n=w(!1),r=w(null),l=w(""),a=w(""),u=w(!0),d=w(null);function x(C){return C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/(1024*1024)).toFixed(1)} MB`}function f(C){try{return new Date(C).toLocaleString()}catch{return C}}function m(C,P){a.value=C,u.value=P,setTimeout(()=>{a.value=""},4e3)}async function v(){s.value=!0;try{const C=await he("/api/snapshots");t.value=C.snapshots}catch(C){m("Failed to load snapshots: "+C.message,!1)}finally{s.value=!1}}async function k(){if(!n.value){n.value=!0;try{await he("/api/snapshots",{method:"POST",body:JSON.stringify({description:l.value})}),l.value="",m("Snapshot created ✓",!0),await v()}catch(C){m("Error: "+C.message,!1)}finally{n.value=!1}}}function F(C){d.value=C}function $(){d.value=null}async function N(){const C=d.value;if(!(!C||r.value)){d.value=null,r.value=C;try{await he(`/api/snapshots/${encodeURIComponent(C)}`,{method:"DELETE"}),m("Deleted ✓",!0),await v()}catch(P){m("Error: "+P.message,!1)}finally{r.value=null}}}return Be(v),(C,P)=>(h(),g("div",Hp,[o("div",Kp,[o("div",Wp,[P[1]||(P[1]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Snapshots"),o("p",{class:"text-sm text-textSecondary mt-1"},"Create and manage data directory snapshots")],-1)),a.value?(h(),g("span",{key:0,class:W(["text-sm",u.value?"text-success":"text-danger"])},b(a.value),3)):K("",!0)]),o("div",zp,[Z(o("input",{"onUpdate:modelValue":P[0]||(P[0]=j=>l.value=j),type:"text",placeholder:"Description (optional)",class:"flex-1 min-w-48 px-3 py-2 rounded-xl bg-surface border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition",onKeydown:Xe(k,["enter"])},null,544),[[ne,l.value]]),o("button",{onClick:k,disabled:n.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition whitespace-nowrap"},[n.value?(h(),g("span",qp,[...P[2]||(P[2]=[o("svg",{class:"w-4 h-4 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 12a8 8 0 018-8v8H4z"})],-1),te(" Creating… ",-1)])])):(h(),g("span",Gp,"+ Create Snapshot"))],8,Jp)])]),o("div",Yp,[s.value?(h(),g("div",Zp,"Loading…")):t.value.length===0?(h(),g("div",Qp,"No snapshots yet")):(h(),g("div",Xp,[(h(!0),g(se,null,ve(t.value,j=>(h(),g("div",{key:j.name,class:"glass rounded-xl p-4 border border-transparent hover:border-gray-700 transition"},[o("div",em,[o("div",tm,[o("div",sm,[o("span",nm,b(j.name),1),o("span",om,"v"+b(j.mcpVersion),1),o("span",rm,b(x(j.sizeBytes)),1)]),o("div",lm,[te(b(f(j.createdAt)),1),j.description?(h(),g(se,{key:0},[te(" · "+b(j.description),1)],64)):K("",!0)])]),o("button",{onClick:I=>F(j.name),disabled:r.value===j.name,class:"px-3 py-1.5 rounded-lg bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-xs text-textSecondary hover:text-red-400 transition disabled:opacity-50 shrink-0"},b(r.value===j.name?"…":"Delete"),9,am)])]))),128))]))]),d.value?(h(),g("div",im,[o("div",cm,[P[5]||(P[5]=o("h3",{class:"text-base font-semibold mb-2"},"Delete Snapshot",-1)),o("p",um,[P[3]||(P[3]=te(" Delete ",-1)),o("span",dm,b(d.value),1),P[4]||(P[4]=te("? This cannot be undone. ",-1))]),o("div",{class:"flex gap-3"},[o("button",{onClick:N,class:"flex-1 px-4 py-2 rounded-xl bg-danger hover:opacity-80 text-white text-sm font-medium transition"},"Delete"),o("button",{onClick:$,class:"flex-1 px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel")])])])):K("",!0)]))}}),pm={class:"animate-fade-in space-y-6"},mm={class:"glass rounded-xl p-6"},xm={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},vm={class:"text-sm text-textSecondary mt-1"},hm={class:"flex items-center gap-3"},gm={key:0,class:"text-xs text-accentLight animate-pulse"},ym={key:0,class:"flex flex-wrap gap-2 mt-3"},bm=["onClick"],_m={class:"ml-1 opacity-60"},wm={key:0,class:"text-center py-12 text-textSecondary"},km={key:1,class:"text-center py-8 text-danger text-sm"},Sm={key:2,class:"text-center py-12 text-textSecondary"},$m={key:3,class:"space-y-3"},Cm={class:"flex flex-wrap items-start gap-3"},Tm={class:"flex-1 min-w-0 space-y-2"},Pm={class:"flex flex-wrap items-center gap-2"},Em={class:"font-semibold truncate"},Am={class:"text-xs text-muted font-mono"},Im={class:"flex flex-wrap items-center gap-4 text-xs text-textSecondary"},Om={title:"Created"},Mm={title:"Archived"},Dm={key:0,class:"text-muted"},Rm={key:0,class:"text-sm text-textSecondary mt-1 leading-relaxed"},jm={key:1,class:"text-sm text-muted mt-1 italic animate-pulse"},Lm={class:"flex items-center gap-2 shrink-0"},Um=["onClick","disabled"],Nm=3,Vm=He({__name:"ArchivedThreadsTab",setup(e){const t=w([]),s=w(!0),n=w(""),r=w({}),l=w({}),a=w({done:0,total:0}),u=w(null),d=w("all");let x=0;const f={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"}},m=Pe(()=>d.value==="all"?t.value:t.value.filter(P=>P.type===d.value)),v=Pe(()=>{const P={all:t.value.length};for(const j of t.value)P[j.type]=(P[j.type]??0)+1;return P}),k=Pe(()=>Object.values(l.value).some(Boolean));async function F(){s.value=!0,n.value="";try{const P=await he("/api/threads/archived");t.value=P.threads??[],r.value={},l.value={},t.value.length>0&&$()}catch(P){n.value=P.message||"Failed to load archived threads"}finally{s.value=!1}}async function $(){const P=++x,j=[...t.value];a.value={done:0,total:j.length};async function I(){for(;j.length>0&&P===x;){const y=j.shift();l.value={...l.value,[y.threadId]:!0};try{const S=await fetch(`/api/threads/${y.threadId}/summary`,{method:"POST",headers:{Authorization:`Bearer ${de()}`}});if(P!==x)return;if(S.ok){const D=await S.json();D.summary&&(r.value={...r.value,[y.threadId]:D.summary})}}catch{}finally{if(P===x){const{[y.threadId]:S,...D}=l.value;l.value=D,a.value={...a.value,done:a.value.done+1}}}}}const U=Array.from({length:Math.min(Nm,j.length)},()=>I());await Promise.all(U)}function N(P){if(!P)return"—";const j=new Date(P),U=Date.now()-j.getTime(),y=Math.floor(U/6e4),S=Math.floor(U/36e5),D=Math.floor(U/864e5),G=Math.floor(D/30);return y<1?"just now":y<60?`${y}m ago`:S<24?`${S}h ago`:D<30?`${D}d ago`:G<12?`${G}mo ago`:`${Math.floor(G/12)}y ago`}async function C(P){if(confirm(`Unarchive thread "${P.name}" (${P.threadId})?`)){u.value=P.threadId;try{const j=await fetch(`/api/threads/${P.threadId}/unarchive`,{method:"POST",headers:{Authorization:`Bearer ${de()}`}});if(!j.ok){const I=await j.json().catch(()=>({error:j.statusText}));throw new Error(I.error??j.statusText)}await F()}catch(j){n.value="Failed to unarchive: "+j.message}finally{u.value=null}}}return Be(F),(P,j)=>(h(),g("div",pm,[o("div",mm,[o("div",xm,[o("div",null,[j[0]||(j[0]=o("h3",{class:"text-lg font-semibold"},"Archived Threads",-1)),o("p",vm,b(t.value.length)+" archived thread"+b(t.value.length!==1?"s":"")+" — auto-purged after 180 days",1)]),o("div",hm,[k.value?(h(),g("span",gm," Building summaries… "+b(a.value.done)+"/"+b(a.value.total),1)):K("",!0),o("button",{onClick:F,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),t.value.length>0?(h(),g("div",ym,[(h(),g(se,null,ve(["all","root","branch","daily"],I=>o("button",{key:I,onClick:U=>d.value=I,class:W(["px-3 py-1 rounded-full text-xs font-medium border transition",d.value===I?"bg-accent/20 text-accent border-accent/30":"bg-card border-gray-700 text-textSecondary hover:border-gray-600"])},[te(b(I==="all"?"All":I.charAt(0).toUpperCase()+I.slice(1))+" ",1),o("span",_m,"("+b(v.value[I]??0)+")",1)],10,bm)),64))])):K("",!0)]),s.value&&t.value.length===0?(h(),g("div",wm,"Loading archived threads…")):n.value?(h(),g("div",km,b(n.value),1)):t.value.length===0?(h(),g("div",Sm,"No archived threads")):K("",!0),m.value.length>0?(h(),g("div",$m,[(h(!0),g(se,null,ve(m.value,I=>{var U,y;return h(),g("div",{key:I.id,class:"glass rounded-xl p-4"},[o("div",Cm,[o("div",Tm,[o("div",Pm,[o("span",{class:W(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(U=f[I.type])==null?void 0:U.classes])},b((y=f[I.type])==null?void 0:y.emoji)+" "+b(I.type.toUpperCase()),3),o("span",Em,b(I.name),1),o("span",Am,"ID: "+b(I.threadId),1)]),o("div",Im,[o("span",Om,"Created "+b(N(I.createdAt)),1),o("span",Mm,"Archived "+b(N(I.archivedAt??I.lastActiveAt)),1),I.client?(h(),g("span",Dm,b(I.client),1)):K("",!0)]),r.value[I.threadId]?(h(),g("div",Rm,b(r.value[I.threadId]),1)):l.value[I.threadId]?(h(),g("div",jm," Generating summary… ")):K("",!0)]),o("div",Lm,[o("button",{onClick:S=>C(I),disabled:u.value===I.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition"},b(u.value===I.threadId?"Restoring…":"↩ Unarchive"),9,Um)])])])}),128))])):K("",!0)]))}}),Bm={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Fm={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Hm=["disabled"],Km={key:0,class:"mt-3 text-sm text-danger"},Wm={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},zm={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Jm={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},qm={class:"flex items-center gap-4"},Gm={class:"text-sm text-textSecondary font-mono"},Ym={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Zm={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Qm={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Xm={class:"text-2xl font-bold font-mono"},ex={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},tx={class:"text-2xl font-bold font-mono"},sx={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},nx={class:"text-2xl font-bold font-mono"},ox={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},rx={class:"flex items-center gap-2 mb-2"},lx={class:"text-2xl font-bold font-mono"},ax={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},ix={class:"text-2xl font-bold font-mono"},cx={class:"max-w-7xl mx-auto px-4 sm:px-6"},ux={class:"flex gap-6 border-b border-gray-800/50 mb-6"},dx=["onClick"],fx={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},vs="sensorium_token",px=He({__name:"App",setup(e){const t=w(!1),s=w(""),n=w(""),r=w(!1),l=w(null),a=w("sessions");let u=null;const d=[{id:"sessions",label:"Sessions"},{id:"notes",label:"Memory Notes"},{id:"templates",label:"Templates"},{id:"skills",label:"Skills"},{id:"threads",label:"Threads"},{id:"archived",label:"Archived"},{id:"mcp",label:"MCP Servers"},{id:"snapshots",label:"Snapshots"},{id:"claude",label:"Claude"},{id:"copilot",label:"Copilot"},{id:"settings",label:"Settings"}],x={sessions:ri,notes:ki,templates:nc,skills:Rc,threads:Pd,archived:Vm,mcp:vf,snapshots:fm,claude:Nf,copilot:_p,settings:Fp},f=Pe(()=>x[a.value]),m=Pe(()=>{if(!l.value)return"—";const N=Math.floor(l.value.uptime),C=Math.floor(N/86400),P=Math.floor(N%86400/3600),j=Math.floor(N%3600/60);return C>0?`${C}d ${P}h`:P>0?`${P}h ${j}m`:`${j}m`});async function v(){const N=s.value.trim()||"no-auth";r.value=!0,n.value="";try{qt(N),await F(),localStorage.setItem(vs,N),t.value=!0,$()}catch(C){const P=C;P.status===401?n.value="Invalid token":n.value=P.message??"Connection failed",qt("")}finally{r.value=!1}}function k(){localStorage.removeItem(vs),t.value=!1,s.value="",l.value=null,u&&clearInterval(u),qt("")}async function F(){l.value=await he("/api/status")}function $(){u&&clearInterval(u),u=setInterval(F,3e4)}return Be(async()=>{const N=localStorage.getItem(vs);if(N){s.value=N;try{qt(N),await F(),t.value=!0,$()}catch{localStorage.removeItem(vs),qt("")}}}),wn(()=>{u&&clearInterval(u)}),(N,C)=>{var P,j,I,U,y,S,D,G,ae;return t.value?(h(),g("div",Wm,[o("header",zm,[o("div",Jm,[C[3]||(C[3]=ut('<div class="flex items-center gap-3"><div class="w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-purple-500 flex items-center justify-center"><span class="text-white text-sm font-bold">S</span></div><div><h1 class="text-lg font-semibold tracking-tight">Sensorium MCP</h1><p class="text-xs text-textSecondary">Agent Dashboard</p></div></div>',1)),o("div",qm,[C[2]||(C[2]=o("div",{class:"flex items-center gap-2 text-sm"},[o("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),o("span",{class:"text-textSecondary"},"Connected")],-1)),o("div",Gm,b(m.value),1),o("button",{onClick:k,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),o("div",Ym,[o("div",Zm,[o("div",Qm,[C[4]||(C[4]=ut('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Sessions</span></div>',1)),o("div",Xm,b(((P=l.value)==null?void 0:P.activeSessions)??0),1)]),o("div",ex,[C[5]||(C[5]=ut('<div class="flex items-center gap-2 mb-2"><span class="text-accentLight"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Notes</span></div>',1)),o("div",tx,b(((I=(j=l.value)==null?void 0:j.memory)==null?void 0:I.totalSemanticNotes)??0),1)]),o("div",sx,[C[6]||(C[6]=ut('<div class="flex items-center gap-2 mb-2"><span class="text-warn"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Episodes</span></div>',1)),o("div",nx,b(((y=(U=l.value)==null?void 0:U.memory)==null?void 0:y.totalEpisodes)??0),1)]),o("div",ox,[o("div",rx,[o("span",{class:W((((D=(S=l.value)==null?void 0:S.memory)==null?void 0:D.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...C[7]||(C[7]=[o("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),C[8]||(C[8]=o("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),o("div",lx,b(((ae=(G=l.value)==null?void 0:G.memory)==null?void 0:ae.unconsolidatedEpisodes)??0),1)]),o("div",ax,[C[9]||(C[9]=ut('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M12 5l7 7-7 7"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Uptime</span></div>',1)),o("div",ix,b(m.value),1)])])]),o("div",cx,[o("nav",ux,[(h(),g(se,null,ve(d,J=>o("button",{key:J.id,onClick:O=>a.value=J.id,class:W(["pb-3 text-sm font-medium transition",a.value===J.id?"tab-active":"tab-inactive"])},b(J.label),11,dx)),64))])]),o("div",fx,[(h(),fr(El(f.value),{status:l.value},null,8,["status"]))])])):(h(),g("div",Bm,[o("div",Fm,[C[1]||(C[1]=ut('<div class="flex items-center gap-3 mb-6"><div class="w-10 h-10 rounded-xl bg-accent/20 flex items-center justify-center"><svg class="w-5 h-5 text-accent" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></div><div><h2 class="text-lg font-semibold">Sensorium MCP</h2><p class="text-sm text-textSecondary">Enter your API token</p></div></div>',1)),Z(o("input",{"onUpdate:modelValue":C[0]||(C[0]=J=>s.value=J),type:"password",placeholder:"MCP_HTTP_SECRET",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary placeholder-muted focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition font-mono text-sm",onKeydown:Xe(v,["enter"])},null,544),[[ne,s.value]]),o("button",{onClick:v,disabled:r.value,class:"w-full mt-4 px-4 py-3 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white font-medium transition"},b(r.value?"Connecting...":"Connect"),9,Hm),n.value?(h(),g("p",Km,b(n.value),1)):K("",!0)])]))}}});Fa(px).mount("#app");</script>
|
|
71
|
+
`,G+ie}async function R(){if(!n.value)return;const k=n.value.name;try{const L=l.value.split(",").map(N=>N.trim()).filter(Boolean),Q=r.value;let ie;Q.trimStart().startsWith("---")?ie=Q:ie=V(k,L,a.value,Q);const G=await fetch(`/api/skills/${encodeURIComponent(k)}`,{method:"PUT",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:ie})});if(!G.ok)throw new Error(G.statusText);i.value="Saved ✓",setTimeout(()=>{i.value=""},3e3),await K()}catch(L){i.value="Error: "+L.message}}async function F(){if(!n.value)return;const k=n.value.name;try{const L=await fetch(`/api/skills/${encodeURIComponent(k)}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!L.ok)throw new Error(L.statusText);O(),await K()}catch(L){c.value="Error: "+L.message}}async function b(){const k=u.value.trim(),L=f.value;if(!k){C.value="Name is required";return}const Q=L.split(",").map(G=>G.trim()).filter(Boolean);if(!Q.length){C.value="At least one trigger is required";return}const ie=V(k,Q,g.value,`\x3C!-- Write your skill instructions here -->
|
|
72
|
+
`);try{const G=await fetch(`/api/skills/${encodeURIComponent(k)}`,{method:"PUT",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:ie})});if(!G.ok)throw new Error(G.statusText);C.value="Created ✓",m.value=!1,await K();const N=t.value.find(q=>q.name===k);N&&P(N)}catch(G){C.value="Error: "+G.message}}return ze(K),(k,L)=>(x(),h("div",oc,[o("div",rc,[o("div",lc,[L[8]||(L[8]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Skill Library"),o("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),o("button",{onClick:L[0]||(L[0]=Q=>{m.value=!m.value,n.value=null}),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + New Skill ")]),m.value?(x(),h("div",ac,[L[12]||(L[12]=o("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),o("div",ic,[o("div",null,[L[9]||(L[9]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),te(o("input",{"onUpdate:modelValue":L[1]||(L[1]=Q=>u.value=Q),type:"text",placeholder:"my-skill",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,u.value]])]),o("div",null,[L[10]||(L[10]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),te(o("input",{"onUpdate:modelValue":L[2]||(L[2]=Q=>f.value=Q),type:"text",placeholder:"trigger1, trigger2",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[re,f.value]])])]),o("div",cc,[o("label",uc,[te(o("input",{"onUpdate:modelValue":L[3]||(L[3]=Q=>g.value=Q),type:"checkbox",class:"rounded"},null,512),[[io,g.value]]),L[11]||(L[11]=o("span",null,"Replaces orchestrator",-1))])]),o("div",dc,[o("button",{onClick:b,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),o("button",{onClick:L[4]||(L[4]=Q=>m.value=!1),class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel"),C.value?(x(),h("span",fc,_(C.value),1)):J("",!0)])])):J("",!0),s.value?(x(),h("div",pc,"Loading...")):t.value.length===0?(x(),h("div",mc,"No skills loaded")):(x(),h("div",xc,[(x(!0),h(le,null,be(t.value,Q=>{var ie;return x(),h("div",{key:Q.name,onClick:G=>P(Q),class:Y(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((ie=n.value)==null?void 0:ie.name)===Q.name?"border-accent":"border-transparent"])},[o("div",hc,[o("div",gc,[o("div",yc,[o("span",bc,_(Q.name),1),o("span",{class:"type-badge",style:Ut(z(I(Q.source)))},_(I(Q.source)),5),Q.replacesOrchestrator?(x(),h("span",_c,"REPLACES ORCH")):J("",!0)]),o("div",wc,[(x(!0),h(le,null,be(Q.triggers||[],G=>(x(),h("span",{key:G,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},_(G),1))),128))])]),o("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:Q.source||""},_((Q.source||"").split(/[\\/]/).pop()||""),9,kc)])],10,vc)}),128))]))]),n.value?(x(),h("div",Sc,[o("div",$c,[o("div",null,[o("h3",Cc,"Edit: "+_(n.value.name),1),o("p",Tc,_(n.value.source||"(unknown source)"),1)]),o("div",Pc,[i.value?(x(),h("span",Ec,_(i.value),1)):J("",!0),c.value?(x(),h("span",Ac,_(c.value),1)):J("",!0),I(n.value.source)==="user"?(x(),h("button",{key:2,onClick:F,class:"px-4 py-2 rounded-xl bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-sm text-textSecondary hover:text-red-400 transition",title:"Remove user override (reverts to default)"},"Remove override")):J("",!0),o("button",{onClick:O,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Close"),o("button",{onClick:R,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),o("div",Ic,[o("div",null,[L[13]||(L[13]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),o("input",{value:n.value.name,type:"text",readonly:"",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono opacity-60 cursor-not-allowed"},null,8,Mc)]),o("div",null,[L[14]||(L[14]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),te(o("input",{"onUpdate:modelValue":L[5]||(L[5]=Q=>l.value=Q),type:"text",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[re,l.value]])]),o("div",Oc,[o("label",Dc,[te(o("input",{"onUpdate:modelValue":L[6]||(L[6]=Q=>a.value=Q),type:"checkbox",class:"rounded"},null,512),[[io,a.value]]),L[15]||(L[15]=o("span",null,"Replaces orchestrator",-1))])])]),te(o("textarea",{"onUpdate:modelValue":L[7]||(L[7]=Q=>r.value=Q),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Skill body (markdown)..."},null,512),[[re,r.value]])])):J("",!0)]))}}),jc={class:"animate-fade-in space-y-6"},Lc={class:"glass rounded-xl p-6"},Nc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Uc={class:"flex items-center gap-3"},Vc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Bc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Fc=["value"],Hc={class:"flex justify-end"},Kc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},zc={key:1,class:"text-center py-8 text-danger text-sm"},Jc={key:2,class:"text-center py-12 text-textSecondary"},qc={key:3},Gc={class:"space-y-3"},Yc={class:"p-4"},Zc={class:"flex flex-wrap items-center gap-3"},Qc=["onBlur"],Xc=["onDblclick"],eu={class:"text-xs text-muted font-mono"},tu=["value","onChange"],su=["value"],nu=["value"],ou={class:"text-xs text-muted"},ru=["onKeyup","onBlur"],lu=["title","onDblclick"],au=["onBlur"],iu=["title","onDblclick"],cu=["onBlur"],uu=["title","onDblclick"],du=["onClick"],fu={class:"ml-auto flex items-center gap-3"},pu=["onClick","disabled"],mu={class:"flex items-center gap-1.5"},xu=["onClick"],vu={class:"flex items-center gap-1.5"},hu=["onClick"],gu={class:"flex items-center gap-1.5"},yu=["onClick"],bu=["onClick"],_u=["onClick"],wu=["onClick"],ku={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-amber-500/20 space-y-2"},Su={key:0,class:"text-xs text-muted"},$u={key:1,class:"text-xs text-muted"},Cu={key:2,class:"space-y-1"},Tu={class:"text-xs text-textPrimary flex-1"},Pu=["onClick"],Eu={class:"flex items-center gap-2"},Au=["onKeyup"],Iu=["onClick","disabled"],Mu={key:1,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},Ou={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},Du=["value"],Ru={class:"flex items-center gap-2"},ju=["onClick","disabled"],Lu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},Nu={key:0,class:"text-xs text-muted py-1"},Uu={class:"text-sm font-medium"},Vu={class:"text-xs text-muted font-mono"},Bu=["value","onChange"],Fu=["value"],Hu=["value"],Ku={class:"text-xs text-muted"},Wu=["onBlur","onKeyup"],zu=["title","onDblclick"],Ju={class:"ml-auto flex items-center gap-3"},qu=["onClick","disabled"],Gu=["onClick","disabled"],Yu=["onClick","disabled"],Zu={key:2,class:"flex items-center gap-1.5"},Qu=["onClick"],Xu={key:3,class:"flex items-center gap-1.5"},ed=["onClick"],td={key:4,class:"flex items-center gap-1.5"},sd=["onClick"],nd=["onClick"],od={key:4},rd={class:"space-y-2"},ld={class:"font-medium"},ad={class:"text-xs text-muted font-mono"},id={class:"text-xs text-textSecondary"},cd={class:"text-xs text-muted"},ud={class:"ml-auto flex items-center gap-2"},dd=["onClick","disabled"],fd=["onClick","disabled"],pd=["onClick"],md={key:5},xd={class:"space-y-2"},vd={class:"font-medium"},hd={class:"text-xs text-muted font-mono"},gd=["value","onChange"],yd=["value"],bd=["value"],_d={class:"text-xs text-muted"},wd=["onBlur","onKeyup"],kd=["title","onDblclick"],Sd={class:"ml-auto flex items-center gap-3"},$d=["onClick","disabled"],Cd=["onClick","disabled"],Td={class:"flex items-center gap-1.5"},Pd=["onClick"],Ed={class:"flex items-center gap-1.5"},Ad=["onClick"],Id={class:"flex items-center gap-1.5"},Md=["onClick"],Od=["onClick"],Dd={key:6},Rd={class:"space-y-2"},jd={class:"font-medium"},Ld={class:"text-xs text-muted font-mono"},Nd=["value","onChange"],Ud=["value"],Vd=["value"],Bd={class:"text-xs text-muted"},Fd=qe({__name:"ThreadsTab",setup(e){const t=w([]),s=w(!0),n=w(""),r=w({}),l=w(new Set),a=w(!1),i=w({name:"",threadId:0,client:"claude",workingDirectory:""}),c=w(""),m=w(!1),u=w(null),f=w(""),g=w(null),C=w(""),K=w(null),I=w(""),z=w(null),P=w(""),O=w(null),V=w({}),R=w(!1),F=w(""),b=w(null),k=w({name:"",threadId:0,client:"claude",workingDirectory:""}),L=w(""),Q=w(!1),ie=w(null),G=w(null),N=w(null),q=["claude","copilot","codex"];function ce(S){return q.includes(S)}const pe={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"},worker:{emoji:"🟡",classes:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30"}},Te=Me(()=>t.value.filter(S=>S.type==="root")),ye=Me(()=>t.value.filter(S=>S.type==="daily")),ve=Me(()=>t.value.filter(S=>S.type==="branch")),Z=Me(()=>t.value.filter(S=>S.type==="worker"));async function j(){s.value=!0,n.value="";try{const S=await _e("/api/threads");t.value=S.threads??[]}catch(S){n.value=S.message||"Failed to load threads"}finally{s.value=!1}}async function Ie(S){try{const y=await _e(`/api/threads/${S}/children`);r.value[S]=y.threads??[]}catch{r.value[S]=[]}}function Ae(S){l.value.has(S)?l.value.delete(S):(l.value.add(S),Ie(S))}async function Se(){if(!(!i.value.name.trim()||!i.value.threadId)){m.value=!0,c.value="";try{const S=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:i.value.threadId,name:i.value.name.trim(),type:"root",client:i.value.client,keepAlive:!0,...i.value.workingDirectory.trim()?{workingDirectory:i.value.workingDirectory.trim()}:{}})});if(!S.ok){const y=await S.json().catch(()=>({error:S.statusText}));throw new Error(y.error??S.statusText)}c.value="Created ✓",i.value={name:"",threadId:0,client:"claude",workingDirectory:""},a.value=!1,setTimeout(()=>{c.value=""},3e3),await j()}catch(S){c.value="Error: "+S.message}finally{m.value=!1}}}async function kt(S){if(!(!k.value.name.trim()||!k.value.threadId)){Q.value=!0,L.value="";try{const y=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:k.value.threadId,name:k.value.name.trim(),type:"branch",rootThreadId:S,client:k.value.client,...k.value.workingDirectory.trim()?{workingDirectory:k.value.workingDirectory.trim()}:{}})});if(!y.ok){const p=await y.json().catch(()=>({error:y.statusText}));throw new Error(p.error??y.statusText)}L.value="Branch created ✓",k.value={name:"",threadId:0,client:"claude",workingDirectory:""},b.value=null,setTimeout(()=>{L.value=""},3e3),await j(),Ie(S)}catch(y){L.value="Error: "+y.message}finally{Q.value=!1}}}function Bs(S){u.value=S.threadId,f.value=S.name}async function St(S){const y=f.value.trim();if(u.value=null,!!y)try{const p=await fetch(`/api/threads/${S}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({name:y})});if(!p.ok)throw new Error(p.statusText);await j()}catch(p){n.value="Failed to rename thread: "+p.message}}function gt(S){g.value=S.threadId,C.value=S.workingDirectory??""}async function Ze(S){const y=C.value.trim();g.value=null;try{const p=await fetch(`/api/threads/${S}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({workingDirectory:y||null})});if(!p.ok)throw new Error(p.statusText);await j()}catch(p){n.value="Failed to update working directory: "+p.message}}function Mt(S){return S.mcpServers?Object.keys(S.mcpServers).length:0}function $t(S){K.value=S.threadId,I.value=S.mcpServers?JSON.stringify(S.mcpServers,null,2):""}async function En(S){const y=I.value.trim();K.value=null;let p=null;if(y)try{p=JSON.parse(y)}catch{n.value="Invalid MCP servers JSON";return}try{const de=await fetch(`/api/threads/${S}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({mcpServers:p})});if(!de.ok){const $e=await de.json().catch(()=>null);throw new Error(($e==null?void 0:$e.error)||de.statusText)}await j()}catch(de){n.value="Failed to update MCP servers: "+de.message}}function d(S){z.value=S.threadId,P.value=S.identityPrompt??""}async function v(S){const y=P.value.trim();z.value=null;try{const p=await fetch(`/api/threads/${S}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({identityPrompt:y||null})});if(!p.ok)throw new Error(p.statusText);await j()}catch(p){n.value="Failed to update system prompt: "+p.message}}async function $(S){R.value=!0;try{const y=await _e(`/api/threads/${S}/pinned-notes`);V.value[S]=y.notes??[]}catch{V.value[S]=[]}finally{R.value=!1}}function D(S){if(O.value===S){O.value=null;return}O.value=S,F.value="",$(S)}async function E(S){const y=F.value.trim();if(y)try{const p=await fetch(`/api/threads/${S}/pinned-notes`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:y})});if(!p.ok){const de=await p.json().catch(()=>null);throw new Error((de==null?void 0:de.error)||p.statusText)}F.value="",await $(S)}catch(p){n.value="Failed to add pinned note: "+p.message}}async function M(S,y){try{const p=await fetch(`/api/threads/${S}/pinned-notes/${y}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!p.ok)throw new Error(p.statusText);await $(S)}catch(p){n.value="Failed to remove pinned note: "+p.message}}async function H(S){try{const y=await fetch(`/api/threads/${S.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!S.keepAlive})});if(!y.ok)throw new Error(y.statusText);await j()}catch(y){n.value="Failed to toggle keep-alive: "+y.message}}async function B(S,y){try{const p=await fetch(`/api/threads/${S.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({client:y})});if(!p.ok)throw new Error(p.statusText);await j()}catch(p){n.value="Failed to change agent type: "+p.message}}async function U(S){try{const y=await fetch(`/api/threads/${S.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!S.dailyRotation})});if(!y.ok)throw new Error(y.statusText);await j()}catch(y){n.value="Failed to toggle daily rotation: "+y.message}}async function A(S){try{const y=await fetch(`/api/threads/${S.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!S.autonomousMode})});if(!y.ok)throw new Error(y.statusText);await j()}catch(y){n.value="Failed to toggle autonomous mode: "+y.message}}async function ee(S){if(confirm(`Archive thread "${S.name}" (${S.threadId})?`))try{const y=await fetch(`/api/threads/${S.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!y.ok)throw new Error(y.statusText);await j()}catch(y){n.value="Failed to archive: "+y.message}}async function W(S){if(confirm(`Start thread "${S.name}" (${S.threadId})?`)){ie.value=S.threadId;try{const y=await fetch(`/api/threads/${S.threadId}/start`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`}});if(!y.ok){const p=await y.json().catch(()=>({error:y.statusText}));throw new Error(p.error??y.statusText)}await j()}catch(y){n.value="Failed to start thread: "+y.message}finally{ie.value=null}}}function X(S){c.value="Sync to Root — not yet implemented",setTimeout(()=>{c.value=""},3e3)}async function se(S){if(confirm(`Convert "${S.name}" to a root thread? This will detach it from its parent.`)){N.value=S.threadId;try{const y=await fetch(`/api/threads/${S.threadId}/convert-to-root`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`}});if(!y.ok){const p=await y.json().catch(()=>({error:y.statusText}));throw new Error(p.error??y.statusText)}n.value="",c.value=`Converted "${S.name}" to root ✓`,setTimeout(()=>{c.value=""},3e3),await j()}catch(y){n.value="Failed to convert: "+y.message}finally{N.value=null}}}function ue(S){if(!S)return"—";const y=new Date(S),de=Date.now()-y.getTime();return de<6e4?"just now":de<36e5?`${Math.floor(de/6e4)}m ago`:de<864e5?`${Math.floor(de/36e5)}h ago`:y.toLocaleDateString()}function me(S){return S==="active"?"text-success":S==="archived"?"text-muted":"text-warn"}return ze(j),(S,y)=>(x(),h("div",jc,[o("div",Lc,[o("div",Nc,[y[23]||(y[23]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Thread Registry"),o("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),o("div",Uc,[c.value?(x(),h("span",{key:0,class:Y([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},_(c.value),3)):J("",!0),o("button",{onClick:y[0]||(y[0]=p=>a.value=!a.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},_(a.value?"Cancel":"+ New Root Thread"),1),o("button",{onClick:j,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),a.value?(x(),h("div",Vc,[o("div",Bc,[o("div",null,[y[24]||(y[24]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),te(o("input",{"onUpdate:modelValue":y[1]||(y[1]=p=>i.value.name=p),type:"text",placeholder:"e.g. Main Workspace",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[re,i.value.name]])]),o("div",null,[y[25]||(y[25]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),te(o("input",{"onUpdate:modelValue":y[2]||(y[2]=p=>i.value.threadId=p),type:"number",min:"1",placeholder:"Telegram thread ID",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[re,i.value.threadId,void 0,{number:!0}]])]),o("div",null,[y[26]||(y[26]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),te(o("select",{"onUpdate:modelValue":y[3]||(y[3]=p=>i.value.client=p),class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(x(),h(le,null,be(q,p=>o("option",{key:p,value:p},_(p),9,Fc)),64))],512),[[It,i.value.client]])])]),o("div",null,[y[27]||(y[27]=o("label",{class:"block text-xs text-textSecondary mb-1"},"Working Directory (optional)",-1)),te(o("input",{"onUpdate:modelValue":y[4]||(y[4]=p=>i.value.workingDirectory=p),type:"text",placeholder:"e.g. C:\\src\\my-project",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition font-mono"},null,512),[[re,i.value.workingDirectory]])]),o("div",Hc,[o("button",{onClick:Se,disabled:m.value||!i.value.name.trim()||!i.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},_(m.value?"Creating…":"Create Root Thread"),9,Kc)])])):J("",!0)]),s.value&&t.value.length===0?(x(),h("div",Wc,"Loading threads…")):n.value?(x(),h("div",zc,_(n.value),1)):t.value.length===0?(x(),h("div",Jc,"No threads registered")):J("",!0),Te.value.length>0?(x(),h("div",qc,[y[35]||(y[35]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),o("div",Gc,[(x(!0),h(le,null,be(Te.value,p=>{var de,$e,fe,Wt;return x(),h("div",{key:p.id,class:"glass rounded-xl overflow-hidden"},[o("div",Yc,[o("div",Zc,[o("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(de=pe[p.type])==null?void 0:de.classes])},_(($e=pe[p.type])==null?void 0:$e.emoji)+" "+_(p.type.toUpperCase()),3),u.value===p.threadId?te((x(),h("input",{key:0,"onUpdate:modelValue":y[5]||(y[5]=T=>f.value=T),onBlur:T=>St(p.threadId),onKeyup:[y[6]||(y[6]=He(T=>T.target.blur(),["enter"])),y[7]||(y[7]=He(T=>u.value=null,["escape"]))],class:"font-semibold bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-40",ref_for:!0,ref:"nameInput"},null,40,Qc)),[[re,f.value]]):(x(),h("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:T=>Bs(p),title:"Double-click to rename"},_(p.name),41,Xc)),o("span",{class:Y(["text-xs font-medium",me(p.status)])},_(p.status),3),o("span",eu,"ID: "+_(p.threadId),1),o("select",{value:p.client,onChange:T=>B(p,T.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[ce(p.client)?J("",!0):(x(),h("option",{key:0,value:p.client,disabled:""},_(p.client)+" (legacy)",9,su)),(x(),h(le,null,be(q,T=>o("option",{key:T,value:T},_(T),9,nu)),64))],40,tu),o("span",ou,_(ue(p.lastActiveAt)),1),g.value===p.threadId?te((x(),h("input",{key:2,"onUpdate:modelValue":y[8]||(y[8]=T=>C.value=T),onKeyup:[He(T=>Ze(p.threadId),["enter"]),y[9]||(y[9]=He(T=>g.value=null,["escape"]))],onBlur:T=>Ze(p.threadId),type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,ru)),[[re,C.value]]):(x(),h("span",{key:3,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(p.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:T=>gt(p)},"📁 "+_(p.workingDirectory??"—"),41,lu)),K.value===p.threadId?te((x(),h("textarea",{key:4,"onUpdate:modelValue":y[10]||(y[10]=T=>I.value=T),onKeyup:y[11]||(y[11]=He(T=>K.value=null,["escape"])),onBlur:T=>En(p.threadId),rows:"4",placeholder:'{"youtube-rag":{"type":"http","url":"https://…","headers":{"Authorization":"Bearer …"}}}',class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-72"},null,40,au)),[[re,I.value]]):(x(),h("span",{key:5,class:"text-xs text-muted font-mono truncate max-w-[160px] cursor-pointer hover:text-accent transition",title:(Mt(p)?Mt(p)+" custom MCP server(s) attached":"Click to attach an http MCP server")+" (dblclick to edit)",onDblclick:T=>$t(p)},"🔌 "+_(Mt(p)||"—"),41,iu)),z.value===p.threadId?te((x(),h("textarea",{key:6,"onUpdate:modelValue":y[12]||(y[12]=T=>P.value=T),onKeyup:y[13]||(y[13]=He(T=>z.value=null,["escape"])),onBlur:T=>v(p.threadId),rows:"4",placeholder:"System prompt / identity for this thread…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-72"},null,40,cu)),[[re,P.value]]):(x(),h("span",{key:7,class:"text-xs text-muted font-mono truncate max-w-[160px] cursor-pointer hover:text-accent transition",title:(p.identityPrompt?"System prompt set":"Click to set a system prompt")+" (dblclick to edit)",onDblclick:T=>d(p)},"📝 "+_(p.identityPrompt?"set":"—"),41,uu)),o("span",{class:"text-xs text-muted font-mono cursor-pointer hover:text-accent transition",title:"Pinned long-term context notes (click to manage)",onClick:T=>D(p.threadId)},"📌 "+_(((fe=V.value[p.threadId])==null?void 0:fe.length)??""),9,du),o("div",fu,[o("button",{onClick:T=>W(p),disabled:ie.value===p.threadId||p.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(ie.value===p.threadId?"Starting…":"▶ Start"),9,pu),o("div",mu,[o("button",{onClick:T=>H(p),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,xu),y[28]||(y[28]=o("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),o("div",vu,[o("button",{onClick:T=>U(p),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,hu),y[29]||(y[29]=o("span",{class:"text-xs text-muted"},"Daily",-1))]),o("div",gu,[o("button",{onClick:T=>A(p),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,yu),y[30]||(y[30]=o("span",{class:"text-xs text-muted"},"Auto",-1))]),o("button",{onClick:T=>Ae(p.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},_(l.value.has(p.threadId)?"▾ Children":"▸ Children"),9,bu),o("button",{onClick:T=>{b.value=b.value===p.threadId?null:p.threadId,k.value={name:"",threadId:0,client:"claude",workingDirectory:""},L.value=""},class:"px-2 py-1 rounded-lg text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 hover:bg-purple-500/30 transition"}," + Branch ",8,_u),o("button",{onClick:T=>ee(p),class:"px-2 py-1 rounded-lg text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition"}," Archive ",8,wu)])]),O.value===p.threadId?(x(),h("div",ku,[y[31]||(y[31]=o("div",{class:"text-xs text-textSecondary"},"📌 Pinned long-term context — always injected into this thread at spawn.",-1)),R.value?(x(),h("div",Su,"Loading…")):(((Wt=V.value[p.threadId])==null?void 0:Wt.length)??0)===0?(x(),h("div",$u,"No pinned notes yet.")):(x(),h("div",Cu,[(x(!0),h(le,null,be(V.value[p.threadId],T=>(x(),h("div",{key:T.noteId,class:"flex items-start gap-2 px-2 py-1 rounded-lg bg-card/50 border border-gray-700/30"},[o("span",Tu,_(T.content),1),o("button",{onClick:Ve=>M(p.threadId,T.noteId),class:"px-1.5 rounded text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition",title:"Remove pinned note"},"✕",8,Pu)]))),128))])),o("div",Eu,[te(o("input",{"onUpdate:modelValue":y[14]||(y[14]=T=>F.value=T),onKeyup:He(T=>E(p.threadId),["enter"]),type:"text",placeholder:"New pinned note…",class:"flex-1 px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,40,Au),[[re,F.value]]),o("button",{onClick:T=>E(p.threadId),disabled:!F.value.trim(),class:"px-3 py-1.5 rounded-lg bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-xs font-medium transition"},"Pin",8,Iu)])])):J("",!0),b.value===p.threadId?(x(),h("div",Mu,[o("div",Ou,[te(o("input",{"onUpdate:modelValue":y[15]||(y[15]=T=>k.value.name=T),type:"text",placeholder:"Branch name",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[re,k.value.name]]),te(o("input",{"onUpdate:modelValue":y[16]||(y[16]=T=>k.value.threadId=T),type:"number",min:"1",placeholder:"Thread ID",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[re,k.value.threadId,void 0,{number:!0}]]),te(o("select",{"onUpdate:modelValue":y[17]||(y[17]=T=>k.value.client=T),class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(x(),h(le,null,be(q,T=>o("option",{key:T,value:T},_(T),9,Du)),64))],512),[[It,k.value.client]])]),te(o("input",{"onUpdate:modelValue":y[18]||(y[18]=T=>k.value.workingDirectory=T),type:"text",placeholder:"Working directory (optional)",class:"w-full px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition font-mono"},null,512),[[re,k.value.workingDirectory]]),o("div",Ru,[o("button",{onClick:T=>kt(p.threadId),disabled:Q.value||!k.value.name.trim()||!k.value.threadId,class:"px-3 py-1.5 rounded-lg bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-xs font-medium transition"},_(Q.value?"Creating…":"Create Branch"),9,ju),L.value?(x(),h("span",{key:0,class:Y([L.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},_(L.value),3)):J("",!0)])])):J("",!0)]),l.value.has(p.threadId)&&r.value[p.threadId]?(x(),h("div",Lu,[r.value[p.threadId].length===0?(x(),h("div",Nu,"No children")):J("",!0),(x(!0),h(le,null,be(r.value[p.threadId],T=>{var Ve,zt;return x(),h("div",{key:T.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[o("span",{class:Y(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(Ve=pe[T.type])==null?void 0:Ve.classes])},_((zt=pe[T.type])==null?void 0:zt.emoji)+" "+_(T.type.toUpperCase()),3),o("span",Uu,_(T.name),1),o("span",{class:Y(["text-xs",me(T.status)])},_(T.status),3),o("span",Vu,"ID: "+_(T.threadId),1),o("select",{value:T.client,onChange:Pe=>B(T,Pe.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[ce(T.client)?J("",!0):(x(),h("option",{key:0,value:T.client,disabled:""},_(T.client)+" (legacy)",9,Fu)),(x(),h(le,null,be(q,Pe=>o("option",{key:Pe,value:Pe},_(Pe),9,Hu)),64))],40,Bu),o("span",Ku,_(ue(T.lastActiveAt)),1),T.type==="branch"&&g.value===T.threadId?te((x(),h("input",{key:0,"onUpdate:modelValue":y[19]||(y[19]=Pe=>C.value=Pe),onBlur:Pe=>Ze(T.threadId),onKeyup:[He(Pe=>Ze(T.threadId),["enter"]),y[20]||(y[20]=He(Pe=>g.value=null,["escape"]))],type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,Wu)),[[re,C.value]]):T.type==="branch"?(x(),h("span",{key:1,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(T.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:Pe=>gt(T)},"📁 "+_(T.workingDirectory??"—"),41,zu)):J("",!0),o("div",Ju,[o("button",{onClick:Pe=>W(T),disabled:ie.value===T.threadId||T.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(ie.value===T.threadId?"Starting…":"▶ Start"),9,qu),T.rootThreadId?(x(),h("button",{key:0,onClick:Pe=>X(),disabled:G.value===T.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},_(G.value===T.threadId?"Syncing…":"⟳ Sync to Root"),9,Gu)):J("",!0),T.type==="branch"||T.type==="daily"?(x(),h("button",{key:1,onClick:Pe=>se(T),disabled:N.value===T.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Convert to independent root thread"},_(N.value===T.threadId?"Converting…":"↑ To Root"),9,Yu)):J("",!0),T.type==="branch"?(x(),h("div",Zu,[o("button",{onClick:Pe=>H(T),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",T.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",T.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Qu),y[32]||(y[32]=o("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):J("",!0),T.type==="branch"?(x(),h("div",Xu,[o("button",{onClick:Pe=>U(T),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",T.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",T.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,ed),y[33]||(y[33]=o("span",{class:"text-xs text-muted"},"Daily",-1))])):J("",!0),T.type==="branch"?(x(),h("div",td,[o("button",{onClick:Pe=>A(T),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",T.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",T.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,sd),y[34]||(y[34]=o("span",{class:"text-xs text-muted"},"Auto",-1))])):J("",!0),T.type!=="root"?(x(),h("button",{key:5,onClick:Pe=>ee(T),class:"px-2 py-0.5 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,nd)):J("",!0)])])}),128))])):J("",!0)])}),128))])])):J("",!0),ye.value.length>0?(x(),h("div",od,[y[36]||(y[36]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),o("div",rd,[(x(!0),h(le,null,be(ye.value,p=>{var de,$e;return x(),h("div",{key:p.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[o("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(de=pe[p.type])==null?void 0:de.classes])},_(($e=pe[p.type])==null?void 0:$e.emoji)+" "+_(p.type.toUpperCase()),3),o("span",ld,_(p.name),1),o("span",{class:Y(["text-xs font-medium",me(p.status)])},_(p.status),3),o("span",ad,"ID: "+_(p.threadId),1),o("span",id,_(p.client),1),o("span",cd,_(ue(p.lastActiveAt)),1),o("div",ud,[o("button",{onClick:fe=>W(p),disabled:ie.value===p.threadId||p.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(ie.value===p.threadId?"Starting…":"▶ Start"),9,dd),p.rootThreadId?(x(),h("button",{key:0,onClick:fe=>X(),disabled:G.value===p.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},_(G.value===p.threadId?"Syncing…":"⟳ Sync to Root"),9,fd)):J("",!0),o("button",{onClick:fe=>ee(p),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,pd)])])}),128))])])):J("",!0),ve.value.length>0?(x(),h("div",md,[y[40]||(y[40]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),o("div",xd,[(x(!0),h(le,null,be(ve.value,p=>{var de,$e;return x(),h("div",{key:p.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[o("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(de=pe[p.type])==null?void 0:de.classes])},_(($e=pe[p.type])==null?void 0:$e.emoji)+" "+_(p.type.toUpperCase()),3),o("span",vd,_(p.name),1),o("span",{class:Y(["text-xs font-medium",me(p.status)])},_(p.status),3),o("span",hd,"ID: "+_(p.threadId),1),o("select",{value:p.client,onChange:fe=>B(p,fe.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[ce(p.client)?J("",!0):(x(),h("option",{key:0,value:p.client,disabled:""},_(p.client)+" (legacy)",9,yd)),(x(),h(le,null,be(q,fe=>o("option",{key:fe,value:fe},_(fe),9,bd)),64))],40,gd),o("span",_d,_(ue(p.lastActiveAt)),1),g.value===p.threadId?te((x(),h("input",{key:0,"onUpdate:modelValue":y[21]||(y[21]=fe=>C.value=fe),onBlur:fe=>Ze(p.threadId),onKeyup:[He(fe=>Ze(p.threadId),["enter"]),y[22]||(y[22]=He(fe=>g.value=null,["escape"]))],type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,wd)),[[re,C.value]]):(x(),h("span",{key:1,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(p.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:fe=>gt(p)},"📁 "+_(p.workingDirectory??"—"),41,kd)),o("div",Sd,[o("button",{onClick:fe=>W(p),disabled:ie.value===p.threadId||p.status==="active",class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(ie.value===p.threadId?"Starting…":"▶ Start"),9,$d),p.rootThreadId?(x(),h("button",{key:0,onClick:fe=>X(),disabled:G.value===p.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},_(G.value===p.threadId?"Syncing…":"⟳ Sync to Root"),9,Cd)):J("",!0),o("div",Td,[o("button",{onClick:fe=>H(p),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Pd),y[37]||(y[37]=o("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),o("div",Ed,[o("button",{onClick:fe=>U(p),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,Ad),y[38]||(y[38]=o("span",{class:"text-xs text-muted"},"Daily",-1))]),o("div",Id,[o("button",{onClick:fe=>A(p),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",p.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[o("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",p.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Md),y[39]||(y[39]=o("span",{class:"text-xs text-muted"},"Auto",-1))]),o("button",{onClick:fe=>ee(p),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Od)])])}),128))])])):J("",!0),Z.value.length>0?(x(),h("div",Dd,[y[42]||(y[42]=o("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),o("div",Rd,[(x(!0),h(le,null,be(Z.value,p=>{var de,$e;return x(),h("div",{key:p.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[o("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(de=pe[p.type])==null?void 0:de.classes])},_(($e=pe[p.type])==null?void 0:$e.emoji)+" "+_(p.type.toUpperCase()),3),o("span",jd,_(p.name),1),o("span",{class:Y(["text-xs font-medium",me(p.status)])},_(p.status),3),o("span",Ld,"ID: "+_(p.threadId),1),o("select",{value:p.client,onChange:fe=>B(p,fe.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[ce(p.client)?J("",!0):(x(),h("option",{key:0,value:p.client,disabled:""},_(p.client)+" (legacy)",9,Ud)),(x(),h(le,null,be(q,fe=>o("option",{key:fe,value:fe},_(fe),9,Vd)),64))],40,Nd),o("span",Bd,_(ue(p.lastActiveAt)),1),y[41]||(y[41]=o("span",{class:"ml-auto text-xs text-muted italic"},"auto-managed",-1))])}),128))])])):J("",!0)]))}}),Hd={class:"animate-fade-in"},Kd={class:"glass rounded-xl p-6 mb-6"},Wd={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},zd={class:"flex items-center gap-3"},Jd={key:0,class:"text-center py-8 text-textSecondary text-sm"},qd={key:1,class:"text-center py-8 text-danger text-sm"},Gd={key:2,class:"text-center text-textSecondary py-12"},Yd={key:3,class:"space-y-2"},Zd={key:0,class:"glass rounded-xl p-4 border border-gray-700/50 opacity-75"},Qd={class:"flex items-center justify-between gap-3"},Xd={class:"flex items-center gap-2 min-w-0"},ef={class:"flex items-center justify-between gap-3"},tf={class:"flex-1 min-w-0"},sf={class:"flex items-center gap-2 mb-1"},nf={class:"font-medium text-sm font-mono"},of={class:"text-xs text-muted font-mono truncate"},rf={class:"flex items-center gap-2 shrink-0"},lf=["onClick"],af=["onClick","disabled"],cf={key:0,class:"glass rounded-xl p-6 border border-accent/30"},uf={class:"text-lg font-semibold mb-4"},df={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4"},ff=["readonly"],pf={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4"},mf={class:"mb-4"},xf={class:"flex items-center justify-between mb-2"},vf=["onUpdate:modelValue"],hf=["onUpdate:modelValue"],gf=["onClick"],yf={key:0,class:"text-xs text-muted italic"},bf={class:"mb-4"},_f={class:"mb-4"},wf={class:"flex items-center justify-between mb-2"},kf=["onUpdate:modelValue"],Sf=["onUpdate:modelValue"],$f=["onClick"],Cf={key:0,class:"text-xs text-muted italic"},Tf={class:"flex items-center gap-3 flex-wrap"},Pf=["disabled"],Ef={key:0,class:"text-sm text-danger"},Yt="sensorium-mcp",Af=qe({__name:"McpServersTab",setup(e){const t=w({}),s=w(!0),n=w(""),r=w(""),l=w(!0),a=w(!1),i=w(null),c=w(!1),m=w(null),u=w(""),f=w("stdio"),g=w(""),C=w(""),K=w(""),I=w([]),z=w([]),P=w(""),O=Me(()=>Object.entries(t.value).filter(([G])=>G!==Yt));async function V(){s.value=!0,n.value="";try{const G=await _e("/api/mcp-servers");t.value=G.servers||{}}catch(G){n.value="Failed to load MCP servers: "+G.message}finally{s.value=!1}}function R(G){return G==="stdio"?"background:rgba(99,102,241,0.15);color:#818cf8":"background:rgba(34,197,94,0.15);color:#4ade80"}function F(){m.value=null,u.value="",f.value="stdio",g.value="",C.value="",K.value="",I.value=[],z.value=[],P.value="",c.value=!0}function b(G,N){m.value=G,u.value=G,f.value=N.type,g.value=N.command||"",C.value=(N.args||[]).join(" "),K.value=N.url||"",I.value=Object.entries(N.env||{}).map(([q,ce])=>({k:q,v:ce})),z.value=Object.entries(N.headers||{}).map(([q,ce])=>({k:q,v:ce})),P.value="",c.value=!0}function k(){c.value=!1,m.value=null}function L(){if(P.value="",!u.value.trim())return P.value="Name is required",!1;if(f.value==="stdio"&&!g.value.trim())return P.value="Command is required for stdio type",!1;if(f.value==="http"){const G=K.value.trim();if(!G)return P.value="URL is required for http type",!1;if(!/^https?:\/\/.+/.test(G))return P.value="URL must start with http:// or https://",!1}return!0}async function Q(){if(!L()||a.value)return;a.value=!0;const G=u.value.trim(),N={type:f.value};if(f.value==="stdio"){N.command=g.value.trim();const q=C.value.trim();q&&(N.args=q.split(/\s+/));const ce=Object.fromEntries(I.value.filter(pe=>pe.k.trim()).map(pe=>[pe.k.trim(),pe.v]));Object.keys(ce).length&&(N.env=ce)}else{N.url=K.value.trim();const q=Object.fromEntries(z.value.filter(ce=>ce.k.trim()).map(ce=>[ce.k.trim(),ce.v]));Object.keys(q).length&&(N.headers=q)}try{const q=await fetch("/api/mcp-servers",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({name:G,config:N})});if(!q.ok)throw new Error(q.statusText);r.value="Saved ✓",l.value=!0,setTimeout(()=>{r.value=""},3e3),k(),await V()}catch(q){P.value="Error: "+q.message}finally{a.value=!1}}async function ie(G){if(confirm(`Delete MCP server "${G}"?`)&&!i.value){i.value=G;try{const N=await fetch(`/api/mcp-servers/${encodeURIComponent(G)}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!N.ok)throw new Error(N.statusText);r.value="Deleted ✓",l.value=!0,setTimeout(()=>{r.value=""},3e3),await V()}catch(N){r.value="Error: "+N.message,l.value=!1}finally{i.value=null}}}return ze(V),(G,N)=>(x(),h("div",Hd,[o("div",Kd,[o("div",Wd,[N[7]||(N[7]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"MCP Servers"),o("p",{class:"text-sm text-textSecondary mt-1"},"Manage external MCP server connections (stdio and HTTP)")],-1)),o("div",zd,[r.value?(x(),h("span",{key:0,class:Y(["text-sm",l.value?"text-success":"text-danger"])},_(r.value),3)):J("",!0),o("button",{onClick:F,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + Add Server ")])]),s.value?(x(),h("div",Jd,"Loading...")):n.value?(x(),h("div",qd,_(n.value),1)):Object.keys(t.value).length===0?(x(),h("div",Gd,"No MCP servers configured")):(x(),h("div",Yd,[t.value[Yt]?(x(),h("div",Zd,[o("div",Qd,[o("div",Xd,[o("span",{class:"font-medium text-sm font-mono"},_(Yt)),o("span",{class:"type-badge",style:Ut(R(t.value[Yt].type))},_(t.value[Yt].type),5),N[8]||(N[8]=o("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"built-in",-1))]),N[9]||(N[9]=o("span",{class:"text-xs text-muted italic"},"read-only",-1))])])):J("",!0),(x(!0),h(le,null,be(O.value,([q,ce])=>{var pe;return x(),h("div",{key:q,class:"glass rounded-xl p-4 border border-transparent hover:border-gray-700 transition"},[o("div",ef,[o("div",tf,[o("div",sf,[o("span",nf,_(q),1),o("span",{class:"type-badge",style:Ut(R(ce.type))},_(ce.type),5)]),o("div",of,[ce.type==="stdio"?(x(),h(le,{key:0},[oe(_(ce.command)+_((pe=ce.args)!=null&&pe.length?" "+ce.args.join(" "):""),1)],64)):(x(),h(le,{key:1},[oe(_(ce.url),1)],64))])]),o("div",rf,[o("button",{onClick:Te=>b(q,ce),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},"Edit",8,lf),o("button",{onClick:Te=>ie(q),disabled:i.value===q,class:"px-3 py-1.5 rounded-lg bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-xs text-textSecondary hover:text-red-400 transition disabled:opacity-50"},_(i.value===q?"…":"Delete"),9,af)])])])}),128))]))]),c.value?(x(),h("div",cf,[o("h3",uf,_(m.value?`Edit: ${m.value}`:"Add MCP Server"),1),o("div",df,[o("div",null,[N[10]||(N[10]=o("label",{class:"text-xs text-textSecondary block mb-1"},[oe("Name "),o("span",{class:"text-danger"},"*")],-1)),te(o("input",{"onUpdate:modelValue":N[0]||(N[0]=q=>u.value=q),type:"text",readonly:!!m.value,placeholder:"my-server",class:Y(["w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition",m.value?"opacity-60 cursor-not-allowed":""])},null,10,ff),[[re,u.value]])]),o("div",null,[N[12]||(N[12]=o("label",{class:"text-xs text-textSecondary block mb-1"},[oe("Type "),o("span",{class:"text-danger"},"*")],-1)),te(o("select",{"onUpdate:modelValue":N[1]||(N[1]=q=>f.value=q),class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...N[11]||(N[11]=[o("option",{value:"stdio"},"stdio",-1),o("option",{value:"http"},"http",-1)])],512),[[It,f.value]])])]),f.value==="stdio"?(x(),h(le,{key:0},[o("div",pf,[o("div",null,[N[13]||(N[13]=o("label",{class:"text-xs text-textSecondary block mb-1"},[oe("Command "),o("span",{class:"text-danger"},"*")],-1)),te(o("input",{"onUpdate:modelValue":N[2]||(N[2]=q=>g.value=q),type:"text",placeholder:"node",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,g.value]])]),o("div",null,[N[14]||(N[14]=o("label",{class:"text-xs text-textSecondary block mb-1"},"Args (space-separated)",-1)),te(o("input",{"onUpdate:modelValue":N[3]||(N[3]=q=>C.value=q),type:"text",placeholder:"./server.js --port 3000",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,C.value]])])]),o("div",mf,[o("div",xf,[N[15]||(N[15]=o("label",{class:"text-xs text-textSecondary"},"Environment Variables",-1)),o("button",{onClick:N[4]||(N[4]=q=>I.value.push({k:"",v:""})),class:"text-xs text-accent hover:text-accentLight transition"},"+ Add")]),(x(!0),h(le,null,be(I.value,(q,ce)=>(x(),h("div",{key:ce,class:"flex items-center gap-2 mb-2"},[te(o("input",{"onUpdate:modelValue":pe=>q.k=pe,type:"text",placeholder:"KEY",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,vf),[[re,q.k]]),N[16]||(N[16]=o("span",{class:"text-muted text-xs"},"=",-1)),te(o("input",{"onUpdate:modelValue":pe=>q.v=pe,type:"text",placeholder:"value",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,hf),[[re,q.v]]),o("button",{onClick:pe=>I.value.splice(ce,1),class:"text-muted hover:text-danger transition text-xs px-2"},"✕",8,gf)]))),128)),I.value.length===0?(x(),h("div",yf,"No env vars")):J("",!0)])],64)):(x(),h(le,{key:1},[o("div",bf,[N[17]||(N[17]=o("label",{class:"text-xs text-textSecondary block mb-1"},[oe("URL "),o("span",{class:"text-danger"},"*")],-1)),te(o("input",{"onUpdate:modelValue":N[5]||(N[5]=q=>K.value=q),type:"text",placeholder:"http://localhost:3000/mcp",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,K.value]])]),o("div",_f,[o("div",wf,[N[18]||(N[18]=o("label",{class:"text-xs text-textSecondary"},"Headers",-1)),o("button",{onClick:N[6]||(N[6]=q=>z.value.push({k:"",v:""})),class:"text-xs text-accent hover:text-accentLight transition"},"+ Add")]),(x(!0),h(le,null,be(z.value,(q,ce)=>(x(),h("div",{key:ce,class:"flex items-center gap-2 mb-2"},[te(o("input",{"onUpdate:modelValue":pe=>q.k=pe,type:"text",placeholder:"Header-Name",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,kf),[[re,q.k]]),N[19]||(N[19]=o("span",{class:"text-muted text-xs"},":",-1)),te(o("input",{"onUpdate:modelValue":pe=>q.v=pe,type:"text",placeholder:"value",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,Sf),[[re,q.v]]),o("button",{onClick:pe=>z.value.splice(ce,1),class:"text-muted hover:text-danger transition text-xs px-2"},"✕",8,$f)]))),128)),z.value.length===0?(x(),h("div",Cf,"No headers")):J("",!0)])],64)),o("div",Tf,[o("button",{onClick:Q,disabled:a.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},_(a.value?"Saving…":m.value?"Save Changes":"Add Server"),9,Pf),o("button",{onClick:k,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"}," Cancel "),P.value?(x(),h("span",Ef,_(P.value),1)):J("",!0)])])):J("",!0)]))}}),If={class:"animate-fade-in"},Mf={class:"glass rounded-xl p-6 mb-6"},Of={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},Df={class:"flex items-center gap-3"},Rf=["disabled"],jf={key:0,class:"text-center py-8 text-textSecondary text-sm"},Lf={key:1,class:"space-y-6"},Nf={class:"glass rounded-xl p-4 border border-gray-700/50"},Uf={class:"glass rounded-xl p-4 border border-gray-700/50"},Vf={class:"glass rounded-xl p-4 border border-gray-700/50"},Bf={class:"glass rounded-xl p-4 border border-gray-700/50"},Ff={class:"glass rounded-xl p-4 border border-gray-700/50"},Hf={class:"glass rounded-xl p-4 border border-gray-700/50"},Kf={class:"text-xs text-textSecondary mb-3"},Wf={class:"flex items-center gap-2"},zf=["placeholder"],Jf=["disabled"],qf={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Gf={class:"grid grid-cols-2 gap-4"},Yf={class:"text-sm font-medium font-mono text-textSecondary"},Zf={class:"text-sm font-medium font-mono text-textSecondary"},Qf={class:"mt-3"},Xf=qe({__name:"ClaudeTab",setup(e){const t=w(!0),s=w(!1),n=w(""),r=w("claude-opus-4-6"),l=w("claude-opus-4-6"),a=w("claude-sonnet-4-5"),i=w("claude-sonnet-4-5"),c=w(!1),m=w(""),u=w(""),f=w(""),g=w(""),C=w(20),K=w(20),I=w(""),z=w(!1),P=Me(()=>r.value!==l.value||a.value!==i.value||m.value!==u.value||f.value!==g.value||C.value!==K.value||I.value.length>0);async function O(){t.value=!0;try{const[F,b,k]=await Promise.all([_e("/api/settings/default-thread-model"),_e("/api/settings/default-worker-model"),_e("/api/settings/claude")]);r.value=F.defaultThreadModel,l.value=F.defaultThreadModel,a.value=b.defaultWorkerModel,i.value=b.defaultWorkerModel,m.value=k.cliPath,u.value=k.cliPath,f.value=k.gitBashPath,g.value=k.gitBashPath,C.value=k.maxConcurrentThreads,K.value=k.maxConcurrentThreads,z.value=k.oauthTokenSet,I.value=""}finally{t.value=!1}}async function V(){if(s.value=!0,n.value="",!r.value){n.value="Error: Thread model cannot be empty",s.value=!1;return}if(!a.value){n.value="Error: Worker model cannot be empty",s.value=!1;return}if(!Number.isFinite(C.value)||C.value<1){n.value="Error: Max concurrent threads must be at least 1",s.value=!1;return}try{const F={Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},b={cliPath:m.value,gitBashPath:f.value,maxConcurrentThreads:C.value};I.value.length>0&&(b.oauthToken=I.value);const[k,L,Q]=await Promise.all([fetch("/api/settings/default-thread-model",{method:"POST",headers:F,body:JSON.stringify({model:r.value})}),fetch("/api/settings/default-worker-model",{method:"POST",headers:F,body:JSON.stringify({model:a.value})}),fetch("/api/settings/claude",{method:"POST",headers:F,body:JSON.stringify(b)})]);for(const q of[k,L,Q])if(!q.ok){const ce=await q.json().catch(()=>({error:q.statusText}));throw new Error(ce.error??q.statusText)}const ie=await k.json(),G=await L.json(),N=await Q.json();l.value=ie.defaultThreadModel,r.value=ie.defaultThreadModel,i.value=G.defaultWorkerModel,a.value=G.defaultWorkerModel,m.value=N.cliPath,u.value=N.cliPath,f.value=N.gitBashPath,g.value=N.gitBashPath,C.value=N.maxConcurrentThreads,K.value=N.maxConcurrentThreads,z.value=N.oauthTokenSet,I.value="",n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(F){n.value="Error: "+F.message}finally{s.value=!1}}async function R(){c.value=!0,n.value="";try{const F={Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},b=await fetch("/api/settings/claude",{method:"POST",headers:F,body:JSON.stringify({clearOauthToken:!0})});if(!b.ok){const L=await b.json().catch(()=>({error:b.statusText}));throw new Error(L.error??b.statusText)}const k=await b.json();z.value=k.oauthTokenSet,I.value="",n.value="Token cleared ✓",setTimeout(()=>{n.value=""},3e3)}catch(F){n.value="Error: "+F.message}finally{c.value=!1}}return ze(O),(F,b)=>(x(),h("div",If,[o("div",Mf,[o("div",Of,[b[6]||(b[6]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Claude"),o("p",{class:"text-sm text-textSecondary mt-1"},"Default models for Claude Code threads and workers")],-1)),o("div",Df,[n.value?(x(),h("span",{key:0,class:Y([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},_(n.value),3)):J("",!0),o("button",{onClick:V,disabled:s.value||t.value||!P.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},_(s.value?"Saving…":"Save"),9,Rf)])]),t.value?(x(),h("div",jf,"Loading…")):(x(),h("div",Lf,[o("div",Nf,[b[7]||(b[7]=o("label",{class:"block text-sm font-medium mb-1"},"Default Thread Model",-1)),b[8]||(b[8]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Model used when spawning a normal (orchestrator) Claude thread. Overridden by the "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_MODEL"),oe(" env var if set. ")],-1)),te(o("input",{"onUpdate:modelValue":b[0]||(b[0]=k=>r.value=k),type:"text",placeholder:"claude-opus-4-6",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,r.value,void 0,{trim:!0}]])]),o("div",Uf,[b[9]||(b[9]=o("label",{class:"block text-sm font-medium mb-1"},"Default Worker Model",-1)),b[10]||(b[10]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Model used when spawning a worker Claude thread. Overridden by the "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_WORKER_MODEL"),oe(" env var if set. ")],-1)),te(o("input",{"onUpdate:modelValue":b[1]||(b[1]=k=>a.value=k),type:"text",placeholder:"claude-sonnet-4-5",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,a.value,void 0,{trim:!0}]])]),o("div",Vf,[b[11]||(b[11]=o("label",{class:"block text-sm font-medium mb-1"},"Claude CLI Path",-1)),b[12]||(b[12]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Explicit path to the Claude binary. Leave empty to auto-detect. Overridden by the "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_CLI_CMD"),oe(" env var if set. ")],-1)),te(o("input",{"onUpdate:modelValue":b[2]||(b[2]=k=>m.value=k),type:"text",placeholder:"(auto-detect)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,m.value,void 0,{trim:!0}]])]),o("div",Bf,[b[13]||(b[13]=o("label",{class:"block text-sm font-medium mb-1"},"Git Bash Path (Windows)",-1)),b[14]||(b[14]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Path to "),o("span",{class:"font-mono text-accentLight"},"bash.exe"),oe(" passed to Claude via "),o("span",{class:"font-mono text-accentLight"},"CLAUDE_CODE_GIT_BASH_PATH"),oe(". Leave empty to auto-detect. ")],-1)),te(o("input",{"onUpdate:modelValue":b[3]||(b[3]=k=>f.value=k),type:"text",placeholder:"(auto-detect)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,f.value,void 0,{trim:!0}]])]),o("div",Ff,[b[15]||(b[15]=o("label",{class:"block text-sm font-medium mb-1"},"Max Concurrent Threads",-1)),b[16]||(b[16]=o("p",{class:"text-xs text-textSecondary mb-3"}," Upper limit on simultaneously spawned agent processes. Raising this increases memory and CPU load. ",-1)),te(o("input",{"onUpdate:modelValue":b[4]||(b[4]=k=>C.value=k),type:"number",min:"1",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,C.value,void 0,{number:!0}]])]),o("div",Hf,[b[20]||(b[20]=o("label",{class:"block text-sm font-medium mb-1"},"Claude OAuth Token",-1)),o("p",Kf,[b[17]||(b[17]=oe(" Long-lived setup token used instead of the OAuth refresh flow. Overridden by the ",-1)),b[18]||(b[18]=o("span",{class:"font-mono text-accentLight"},"CLAUDE_CODE_OAUTH_TOKEN",-1)),b[19]||(b[19]=oe(" env var if set. ",-1)),o("span",{class:Y(z.value?"text-success":"text-muted")},_(z.value?"A token is currently stored.":"No token stored."),3)]),o("div",Wf,[te(o("input",{"onUpdate:modelValue":b[5]||(b[5]=k=>I.value=k),type:"password",placeholder:z.value?"•••••••• (leave empty to keep)":"Paste token to store",class:"flex-1 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,zf),[[re,I.value]]),z.value?(x(),h("button",{key:0,onClick:R,disabled:c.value,class:"px-3 py-2 rounded-lg border border-gray-700 hover:border-danger hover:text-danger disabled:opacity-50 text-sm transition whitespace-nowrap"},_(c.value?"Clearing…":"Clear"),9,Jf)):J("",!0)])]),o("div",qf,[b[23]||(b[23]=o("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),o("div",Gf,[o("div",null,[b[21]||(b[21]=o("div",{class:"text-xs text-muted mb-1"},"Thread Model",-1)),o("span",Yf,_(l.value),1)]),o("div",null,[b[22]||(b[22]=o("div",{class:"text-xs text-muted mb-1"},"Worker Model",-1)),o("span",Zf,_(i.value),1)])]),o("div",Qf,[o("span",{class:Y(["text-sm font-medium",P.value?"text-warn":"text-textSecondary"])},_(P.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),ep={class:"animate-fade-in"},tp={class:"glass rounded-xl p-6 mb-6"},sp={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},np={class:"flex items-center gap-3"},op=["disabled"],rp={key:0,class:"text-center py-8 text-textSecondary text-sm"},lp={key:1,class:"space-y-6"},ap={class:"glass rounded-xl p-4 border border-gray-700/50"},ip={id:"copilot-models"},cp=["value"],up={key:0,class:"text-xs text-success mt-2"},dp={class:"glass rounded-xl p-4 border border-gray-700/50"},fp={class:"flex items-center justify-between"},pp={class:"glass rounded-xl p-4 border border-gray-700/50"},mp=["disabled"],xp={class:"glass rounded-xl p-4 border border-gray-700/50"},vp=["disabled"],hp={class:"glass rounded-xl p-4 border border-gray-700/50"},gp={class:"text-xs text-textSecondary mb-3"},yp={key:0,class:"text-success"},bp={key:1,class:"text-warn"},_p=["disabled","placeholder"],wp={class:"glass rounded-xl p-4 border border-gray-700/50"},kp={key:0,class:"mt-4 space-y-4"},Sp={class:"text-xs text-textSecondary mb-2"},$p=["disabled"],Cp={class:"text-xs text-textSecondary mb-2"},Tp=["disabled"],Pp={class:"glass rounded-xl p-4 border border-gray-700/50"},Ep={class:"flex items-center justify-between gap-3"},Ap=["disabled"],Ip={key:1,class:"mt-3 max-h-48 overflow-y-auto rounded-lg bg-surface/50 border border-gray-700/50 p-3"},Mp={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Op={class:"grid grid-cols-2 gap-4"},Dp={class:"text-sm font-medium font-mono text-textSecondary"},Rp=qe({__name:"CopilotTab",setup(e){const t=w(!0),s=w(!1),n=w(""),r=w(""),l=w(!1),a=w("openai"),i=w(""),c=w(""),m=w(""),u=w(""),f=w(!1),g=w(!1),C=w(!1),K=w(""),I=w([]);async function z(){t.value=!0;try{const F=await _e("/api/settings/copilot");P(F),l.value&&f.value&&R(!0)}finally{t.value=!1}}function P(F){r.value=F.model,l.value=F.byok.enabled,a.value=F.byok.providerType,i.value=F.byok.baseUrl,c.value=F.byok.modelId,m.value=F.byok.wireModel,f.value=F.byok.apiKeySet,u.value=""}const O=Me(()=>!(!r.value.trim()||l.value&&(!i.value.trim()||!f.value&&!u.value.trim())));async function V(){if(s.value=!0,n.value="",!r.value.trim()){n.value="Error: Model cannot be empty",s.value=!1;return}try{const F={enabled:l.value,providerType:a.value,baseUrl:i.value.trim(),modelId:c.value.trim(),wireModel:m.value.trim()};u.value.trim()&&(F.apiKey=u.value.trim());const b={Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},k=await fetch("/api/settings/copilot",{method:"POST",headers:b,body:JSON.stringify({model:r.value.trim(),byok:F})});if(!k.ok){const Q=await k.json().catch(()=>({error:k.statusText}));throw new Error(Q.error??k.statusText)}const L=await k.json();P(L),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(F){n.value="Error: "+F.message}finally{s.value=!1}}async function R(F=!1){C.value=!0,K.value="",I.value=[];try{const b={baseUrl:i.value.trim(),providerType:a.value};u.value.trim()&&(b.apiKey=u.value.trim());const k=await fetch("/api/settings/copilot/models",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify(b)}),L=await k.json();if(!k.ok||!L.ok)throw new Error(L.error??k.statusText);I.value=L.models??[],K.value=`OK — ${L.count??I.value.length} models`}catch(b){F||(K.value="Error: "+b.message)}finally{C.value=!1}}return ze(z),(F,b)=>(x(),h("div",ep,[o("div",tp,[o("div",sp,[b[9]||(b[9]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Copilot"),o("p",{class:"text-sm text-textSecondary mt-1"},"Model and bring-your-own-key provider (OpenRouter, DeepSeek, Kimi)")],-1)),o("div",np,[n.value?(x(),h("span",{key:0,class:Y([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},_(n.value),3)):J("",!0),o("button",{onClick:V,disabled:s.value||t.value||!O.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},_(s.value?"Saving…":"Save"),9,op)])]),t.value?(x(),h("div",rp,"Loading…")):(x(),h("div",lp,[o("div",ap,[b[10]||(b[10]=o("label",{class:"block text-sm font-medium mb-1"},"Copilot Model",-1)),b[11]||(b[11]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Model passed to the Copilot CLI via "),o("span",{class:"font-mono text-accentLight"},"--model"),oe(" / "),o("span",{class:"font-mono text-accentLight"},"COPILOT_MODEL"),oe(". ")],-1)),te(o("input",{"onUpdate:modelValue":b[0]||(b[0]=k=>r.value=k),type:"text",list:"copilot-models",placeholder:"claude-opus-4-6",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[re,r.value,void 0,{trim:!0}]]),o("datalist",ip,[(x(!0),h(le,null,be(I.value,k=>(x(),h("option",{key:k,value:k},null,8,cp))),128))]),I.value.length?(x(),h("p",up,_(I.value.length)+" models loaded from provider — pick one from the dropdown. ",1)):J("",!0)]),o("div",dp,[o("div",fp,[b[12]||(b[12]=o("div",null,[o("div",{class:"text-sm font-medium"},"Custom Provider (BYOK)"),o("p",{class:"text-xs text-textSecondary mt-1"}," Route Copilot through an OpenAI-compatible endpoint. GitHub auth is not used while enabled. ")],-1)),o("button",{onClick:b[1]||(b[1]=k=>l.value=!l.value),class:Y(["relative inline-flex h-6 w-11 items-center rounded-full transition-colors shrink-0",l.value?"bg-accent":"bg-gray-700"])},[o("span",{class:Y(["inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform",l.value?"translate-x-6":"translate-x-1"])},null,2)],2)])]),o("div",{class:Y(["space-y-4 transition",l.value?"":"opacity-40 pointer-events-none select-none"])},[o("div",pp,[b[14]||(b[14]=o("label",{class:"block text-sm font-medium mb-1"},"Provider Type",-1)),b[15]||(b[15]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Wire protocol of the endpoint ("),o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_TYPE"),oe("). ")],-1)),te(o("select",{"onUpdate:modelValue":b[2]||(b[2]=k=>a.value=k),disabled:!l.value,class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...b[13]||(b[13]=[o("option",{value:"openai"},"openai",-1),o("option",{value:"azure"},"azure",-1),o("option",{value:"anthropic"},"anthropic",-1)])],8,mp),[[It,a.value]])]),o("div",xp,[b[16]||(b[16]=o("label",{class:"block text-sm font-medium mb-1"},"Base URL",-1)),b[17]||(b[17]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" e.g. "),o("span",{class:"font-mono text-accentLight"},"https://openrouter.ai/api/v1"),oe(" ("),o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_BASE_URL"),oe("). ")],-1)),te(o("input",{"onUpdate:modelValue":b[3]||(b[3]=k=>i.value=k),type:"text",disabled:!l.value,placeholder:"https://openrouter.ai/api/v1",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,vp),[[re,i.value,void 0,{trim:!0}]])]),o("div",hp,[b[21]||(b[21]=o("label",{class:"block text-sm font-medium mb-1"},"API Key",-1)),o("p",gp,[b[18]||(b[18]=oe(" Stored server-side and never echoed back (",-1)),b[19]||(b[19]=o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_API_KEY",-1)),b[20]||(b[20]=oe("). ",-1)),f.value?(x(),h("span",yp,"A key is currently set — leave blank to keep it.")):(x(),h("span",bp,"No key set."))]),te(o("input",{"onUpdate:modelValue":b[4]||(b[4]=k=>u.value=k),type:"password",disabled:!l.value,placeholder:f.value?"•••••••• (unchanged)":"sk-…",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,_p),[[re,u.value]])]),o("div",wp,[o("button",{type:"button",onClick:b[5]||(b[5]=k=>g.value=!g.value),class:"text-sm font-medium text-textSecondary hover:text-textPrimary transition flex items-center gap-2"},[o("span",null,_(g.value?"▾":"▸"),1),b[22]||(b[22]=oe(" Advanced (model mapping) ",-1))]),g.value?(x(),h("div",kp,[o("div",null,[b[25]||(b[25]=o("label",{class:"block text-sm font-medium mb-1"},"Model ID",-1)),o("p",Sp,[b[23]||(b[23]=oe(" Well-known base model for tool config (",-1)),b[24]||(b[24]=o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_MODEL_ID",-1)),oe("). Defaults to Copilot Model. "+_(I.value.length?"Pick from the tested provider models below.":"Run Test to load the provider’s model list."),1)]),te(o("input",{"onUpdate:modelValue":b[6]||(b[6]=k=>c.value=k),type:"text",list:"copilot-models",disabled:!l.value,placeholder:"(defaults to Copilot Model)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,$p),[[re,c.value,void 0,{trim:!0}]])]),o("div",null,[b[28]||(b[28]=o("label",{class:"block text-sm font-medium mb-1"},"Wire Model",-1)),o("p",Cp,[b[26]||(b[26]=oe(" Exact model name sent to the provider (",-1)),b[27]||(b[27]=o("span",{class:"font-mono text-accentLight"},"COPILOT_PROVIDER_WIRE_MODEL",-1)),oe("). Defaults to Copilot Model. "+_(I.value.length?"Pick from the tested provider models below.":"Run Test to load the provider’s model list."),1)]),te(o("input",{"onUpdate:modelValue":b[7]||(b[7]=k=>m.value=k),type:"text",list:"copilot-models",disabled:!l.value,placeholder:"(defaults to Copilot Model)",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,8,Tp),[[re,m.value,void 0,{trim:!0}]])])])):J("",!0)]),o("div",Pp,[o("div",Ep,[b[29]||(b[29]=o("div",null,[o("div",{class:"text-sm font-medium"},"Test Connection"),o("p",{class:"text-xs text-textSecondary mt-1"}," Lists models from the endpoint above using the values entered here — no need to save first. Uses the right auth for the selected Provider Type (openai/azure/anthropic). ")],-1)),o("button",{onClick:b[8]||(b[8]=k=>R()),disabled:C.value||!l.value,class:"px-4 py-2 rounded-xl bg-surface border border-gray-700 hover:border-accent disabled:opacity-50 text-sm font-medium transition whitespace-nowrap"},_(C.value?"Testing…":"Test"),9,Ap)]),K.value?(x(),h("div",{key:0,class:Y([K.value.startsWith("Error")?"text-danger":"text-success","text-sm mt-3"])},_(K.value),3)):J("",!0),I.value.length?(x(),h("div",Ip,[(x(!0),h(le,null,be(I.value,k=>(x(),h("div",{key:k,class:"text-xs font-mono text-textSecondary py-0.5"},_(k),1))),128))])):J("",!0)])],2),o("div",Mp,[b[32]||(b[32]=o("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),o("div",Op,[o("div",null,[b[30]||(b[30]=o("div",{class:"text-xs text-muted mb-1"},"Model",-1)),o("span",Dp,_(r.value||"—"),1)]),o("div",null,[b[31]||(b[31]=o("div",{class:"text-xs text-muted mb-1"},"Custom Provider",-1)),o("span",{class:Y(["text-sm font-medium",l.value?"text-success":"text-textSecondary"])},_(l.value?"Enabled":"Disabled"),3)])])])]))])]))}}),jp={class:"animate-fade-in"},Lp={class:"glass rounded-xl p-6 mb-6"},Np={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},Up={class:"flex items-center gap-3"},Vp=["disabled"],Bp={key:0,class:"text-center py-8 text-textSecondary text-sm"},Fp={key:1,class:"space-y-6"},Hp={class:"glass rounded-xl p-4 border border-gray-700/50"},Kp={class:"flex items-center gap-4"},Wp={class:"flex justify-between text-xs text-muted mt-2"},zp={class:"font-mono"},Jp={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},qp={class:"glass rounded-xl p-4 border border-gray-700/50"},Gp={class:"flex items-center gap-4"},Yp={class:"flex justify-between text-xs text-muted mt-2"},Zp={class:"font-mono"},Qp={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Xp={class:"grid grid-cols-2 gap-4"},em={class:"text-sm font-medium text-textSecondary"},tm={class:"mt-3"},sm=qe({__name:"SettingsTab",setup(e){const t=w(!0),s=w(!1),n=w(""),r=w(50),l=w(50),a=w(1440),i=w(1440),c=Me(()=>r.value!==l.value||a.value!==i.value);async function m(){t.value=!0;try{const[f,g]=await Promise.all([_e("/api/settings/bootstrap-message-count"),_e("/api/settings/wait-timeout")]);r.value=f.count,l.value=f.count,a.value=g.minutes,i.value=g.minutes}finally{t.value=!1}}async function u(){s.value=!0,n.value="";try{const f={Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},[g,C]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:f,body:JSON.stringify({count:r.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:f,body:JSON.stringify({minutes:a.value})})]);for(const z of[g,C])if(!z.ok){const P=await z.json().catch(()=>({error:z.statusText}));throw new Error(P.error??z.statusText)}const K=await g.json(),I=await C.json();l.value=K.count,r.value=K.count,i.value=I.minutes,a.value=I.minutes,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(f){n.value="Error: "+f.message}finally{s.value=!1}}return ze(m),(f,g)=>(x(),h("div",jp,[o("div",Lp,[o("div",Np,[g[4]||(g[4]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Settings"),o("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),o("div",Up,[n.value?(x(),h("span",{key:0,class:Y([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},_(n.value),3)):J("",!0),o("button",{onClick:u,disabled:s.value||t.value||!c.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},_(s.value?"Saving…":"Save"),9,Vp)])]),t.value?(x(),h("div",Bp,"Loading…")):(x(),h("div",Fp,[o("div",Hp,[g[8]||(g[8]=o("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),g[9]||(g[9]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Number of recent messages injected into the agent's bootstrap context. Set to "),o("span",{class:"font-mono text-accentLight"},"0"),oe(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),o("div",Kp,[te(o("input",{"onUpdate:modelValue":g[0]||(g[0]=C=>r.value=C),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[re,r.value,void 0,{number:!0}]]),te(o("input",{"onUpdate:modelValue":g[1]||(g[1]=C=>r.value=C),type:"number",min:"0",max:"200",class:"w-20 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[re,r.value,void 0,{number:!0}]])]),o("div",Wp,[g[5]||(g[5]=o("span",null,"Off",-1)),o("span",zp,_(r.value)+" messages",1),g[6]||(g[6]=o("span",null,"Max",-1))]),r.value===0?(x(),h("div",Jp,[...g[7]||(g[7]=[oe(" Message buffer injection is ",-1),o("strong",null,"disabled",-1),oe(". The agent will not see recent conversation history in its bootstrap context. Use this when VS Code (or another IDE) already provides conversation history. ",-1)])])):J("",!0)]),o("div",qp,[g[12]||(g[12]=o("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),g[13]||(g[13]=o("p",{class:"text-xs text-textSecondary mb-3"},[oe(" Maximum time (in minutes) a single "),o("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),oe(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),o("div",Gp,[te(o("input",{"onUpdate:modelValue":g[2]||(g[2]=C=>a.value=C),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[re,a.value,void 0,{number:!0}]]),te(o("input",{"onUpdate:modelValue":g[3]||(g[3]=C=>a.value=C),type:"number",min:"1",max:"10080",class:"w-24 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[re,a.value,void 0,{number:!0}]])]),o("div",Yp,[g[10]||(g[10]=o("span",null,"1 min",-1)),o("span",Zp,_(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1),g[11]||(g[11]=o("span",null,"24h",-1))])]),o("div",Qp,[g[16]||(g[16]=o("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),o("div",Xp,[o("div",null,[g[14]||(g[14]=o("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),o("span",{class:Y(["text-sm font-medium",l.value>0?"text-success":"text-textSecondary"])},_(l.value>0?`${l.value} messages`:"Disabled"),3)]),o("div",null,[g[15]||(g[15]=o("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),o("span",em,_(i.value>=60?Math.floor(i.value/60)+"h "+i.value%60+"m":i.value+" min"),1)])]),o("div",tm,[o("span",{class:Y(["text-sm font-medium",c.value?"text-warn":"text-textSecondary"])},_(c.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),nm={class:"animate-fade-in"},om={class:"glass rounded-xl p-6 mb-6"},rm={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},lm={class:"flex flex-wrap gap-3 items-center"},am=["disabled"],im={key:0,class:"flex items-center gap-2"},cm={key:1},um={class:"glass rounded-xl p-6"},dm={key:0,class:"text-center py-8 text-textSecondary text-sm"},fm={key:1,class:"text-center py-12 text-textSecondary text-sm"},pm={key:2,class:"space-y-2"},mm={class:"flex items-center justify-between gap-3"},xm={class:"flex-1 min-w-0"},vm={class:"flex flex-wrap items-center gap-2 mb-1"},hm={class:"font-medium text-sm font-mono"},gm={class:"type-badge",style:{background:"rgba(99,102,241,0.15)",color:"#818cf8"}},ym={class:"text-xs text-muted"},bm={class:"text-xs text-muted"},_m=["onClick","disabled"],wm={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/80 backdrop-blur-sm"},km={class:"glass rounded-2xl p-6 max-w-sm w-full mx-4"},Sm={class:"text-sm text-textSecondary mb-4"},$m={class:"font-mono text-textPrimary"},Cm=qe({__name:"SnapshotsTab",setup(e){const t=w([]),s=w(!0),n=w(!1),r=w(null),l=w(""),a=w(""),i=w(!0),c=w(null);function m(P){return P<1024?`${P} B`:P<1024*1024?`${(P/1024).toFixed(1)} KB`:`${(P/(1024*1024)).toFixed(1)} MB`}function u(P){try{return new Date(P).toLocaleString()}catch{return P}}function f(P,O){a.value=P,i.value=O,setTimeout(()=>{a.value=""},4e3)}async function g(){s.value=!0;try{const P=await _e("/api/snapshots");t.value=P.snapshots}catch(P){f("Failed to load snapshots: "+P.message,!1)}finally{s.value=!1}}async function C(){if(!n.value){n.value=!0;try{await _e("/api/snapshots",{method:"POST",body:JSON.stringify({description:l.value})}),l.value="",f("Snapshot created ✓",!0),await g()}catch(P){f("Error: "+P.message,!1)}finally{n.value=!1}}}function K(P){c.value=P}function I(){c.value=null}async function z(){const P=c.value;if(!(!P||r.value)){c.value=null,r.value=P;try{await _e(`/api/snapshots/${encodeURIComponent(P)}`,{method:"DELETE"}),f("Deleted ✓",!0),await g()}catch(O){f("Error: "+O.message,!1)}finally{r.value=null}}}return ze(g),(P,O)=>(x(),h("div",nm,[o("div",om,[o("div",rm,[O[1]||(O[1]=o("div",null,[o("h3",{class:"text-lg font-semibold"},"Snapshots"),o("p",{class:"text-sm text-textSecondary mt-1"},"Create and manage data directory snapshots")],-1)),a.value?(x(),h("span",{key:0,class:Y(["text-sm",i.value?"text-success":"text-danger"])},_(a.value),3)):J("",!0)]),o("div",lm,[te(o("input",{"onUpdate:modelValue":O[0]||(O[0]=V=>l.value=V),type:"text",placeholder:"Description (optional)",class:"flex-1 min-w-48 px-3 py-2 rounded-xl bg-surface border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition",onKeydown:He(C,["enter"])},null,544),[[re,l.value]]),o("button",{onClick:C,disabled:n.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition whitespace-nowrap"},[n.value?(x(),h("span",im,[...O[2]||(O[2]=[o("svg",{class:"w-4 h-4 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 12a8 8 0 018-8v8H4z"})],-1),oe(" Creating… ",-1)])])):(x(),h("span",cm,"+ Create Snapshot"))],8,am)])]),o("div",um,[s.value?(x(),h("div",dm,"Loading…")):t.value.length===0?(x(),h("div",fm,"No snapshots yet")):(x(),h("div",pm,[(x(!0),h(le,null,be(t.value,V=>(x(),h("div",{key:V.name,class:"glass rounded-xl p-4 border border-transparent hover:border-gray-700 transition"},[o("div",mm,[o("div",xm,[o("div",vm,[o("span",hm,_(V.name),1),o("span",gm,"v"+_(V.mcpVersion),1),o("span",ym,_(m(V.sizeBytes)),1)]),o("div",bm,[oe(_(u(V.createdAt)),1),V.description?(x(),h(le,{key:0},[oe(" · "+_(V.description),1)],64)):J("",!0)])]),o("button",{onClick:R=>K(V.name),disabled:r.value===V.name,class:"px-3 py-1.5 rounded-lg bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-xs text-textSecondary hover:text-red-400 transition disabled:opacity-50 shrink-0"},_(r.value===V.name?"…":"Delete"),9,_m)])]))),128))]))]),c.value?(x(),h("div",wm,[o("div",km,[O[5]||(O[5]=o("h3",{class:"text-base font-semibold mb-2"},"Delete Snapshot",-1)),o("p",Sm,[O[3]||(O[3]=oe(" Delete ",-1)),o("span",$m,_(c.value),1),O[4]||(O[4]=oe("? This cannot be undone. ",-1))]),o("div",{class:"flex gap-3"},[o("button",{onClick:z,class:"flex-1 px-4 py-2 rounded-xl bg-danger hover:opacity-80 text-white text-sm font-medium transition"},"Delete"),o("button",{onClick:I,class:"flex-1 px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel")])])])):J("",!0)]))}}),Tm={class:"animate-fade-in space-y-6"},Pm={class:"glass rounded-xl p-6"},Em={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Am={class:"text-sm text-textSecondary mt-1"},Im={class:"flex items-center gap-3"},Mm={key:0,class:"text-xs text-accentLight animate-pulse"},Om={key:0,class:"flex flex-wrap gap-2 mt-3"},Dm=["onClick"],Rm={class:"ml-1 opacity-60"},jm={key:0,class:"text-center py-12 text-textSecondary"},Lm={key:1,class:"text-center py-8 text-danger text-sm"},Nm={key:2,class:"text-center py-12 text-textSecondary"},Um={key:3,class:"space-y-3"},Vm={class:"flex flex-wrap items-start gap-3"},Bm={class:"flex-1 min-w-0 space-y-2"},Fm={class:"flex flex-wrap items-center gap-2"},Hm={class:"font-semibold truncate"},Km={class:"text-xs text-muted font-mono"},Wm={class:"flex flex-wrap items-center gap-4 text-xs text-textSecondary"},zm={title:"Created"},Jm={title:"Archived"},qm={key:0,class:"text-muted"},Gm={key:0,class:"text-sm text-textSecondary mt-1 leading-relaxed"},Ym={key:1,class:"text-sm text-muted mt-1 italic animate-pulse"},Zm={class:"flex items-center gap-2 shrink-0"},Qm=["onClick","disabled"],Xm=3,ex=qe({__name:"ArchivedThreadsTab",setup(e){const t=w([]),s=w(!0),n=w(""),r=w({}),l=w({}),a=w({done:0,total:0}),i=w(null),c=w("all");let m=0;const u={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"}},f=Me(()=>c.value==="all"?t.value:t.value.filter(O=>O.type===c.value)),g=Me(()=>{const O={all:t.value.length};for(const V of t.value)O[V.type]=(O[V.type]??0)+1;return O}),C=Me(()=>Object.values(l.value).some(Boolean));async function K(){s.value=!0,n.value="";try{const O=await _e("/api/threads/archived");t.value=O.threads??[],r.value={},l.value={},t.value.length>0&&I()}catch(O){n.value=O.message||"Failed to load archived threads"}finally{s.value=!1}}async function I(){const O=++m,V=[...t.value];a.value={done:0,total:V.length};async function R(){for(;V.length>0&&O===m;){const b=V.shift();l.value={...l.value,[b.threadId]:!0};try{const k=await fetch(`/api/threads/${b.threadId}/summary`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`}});if(O!==m)return;if(k.ok){const L=await k.json();L.summary&&(r.value={...r.value,[b.threadId]:L.summary})}}catch{}finally{if(O===m){const{[b.threadId]:k,...L}=l.value;l.value=L,a.value={...a.value,done:a.value.done+1}}}}}const F=Array.from({length:Math.min(Xm,V.length)},()=>R());await Promise.all(F)}function z(O){if(!O)return"—";const V=new Date(O),F=Date.now()-V.getTime(),b=Math.floor(F/6e4),k=Math.floor(F/36e5),L=Math.floor(F/864e5),Q=Math.floor(L/30);return b<1?"just now":b<60?`${b}m ago`:k<24?`${k}h ago`:L<30?`${L}d ago`:Q<12?`${Q}mo ago`:`${Math.floor(Q/12)}y ago`}async function P(O){if(confirm(`Unarchive thread "${O.name}" (${O.threadId})?`)){i.value=O.threadId;try{const V=await fetch(`/api/threads/${O.threadId}/unarchive`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`}});if(!V.ok){const R=await V.json().catch(()=>({error:V.statusText}));throw new Error(R.error??V.statusText)}await K()}catch(V){n.value="Failed to unarchive: "+V.message}finally{i.value=null}}}return ze(K),(O,V)=>(x(),h("div",Tm,[o("div",Pm,[o("div",Em,[o("div",null,[V[0]||(V[0]=o("h3",{class:"text-lg font-semibold"},"Archived Threads",-1)),o("p",Am,_(t.value.length)+" archived thread"+_(t.value.length!==1?"s":"")+" — auto-purged after 180 days",1)]),o("div",Im,[C.value?(x(),h("span",Mm," Building summaries… "+_(a.value.done)+"/"+_(a.value.total),1)):J("",!0),o("button",{onClick:K,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),t.value.length>0?(x(),h("div",Om,[(x(),h(le,null,be(["all","root","branch","daily"],R=>o("button",{key:R,onClick:F=>c.value=R,class:Y(["px-3 py-1 rounded-full text-xs font-medium border transition",c.value===R?"bg-accent/20 text-accent border-accent/30":"bg-card border-gray-700 text-textSecondary hover:border-gray-600"])},[oe(_(R==="all"?"All":R.charAt(0).toUpperCase()+R.slice(1))+" ",1),o("span",Rm,"("+_(g.value[R]??0)+")",1)],10,Dm)),64))])):J("",!0)]),s.value&&t.value.length===0?(x(),h("div",jm,"Loading archived threads…")):n.value?(x(),h("div",Lm,_(n.value),1)):t.value.length===0?(x(),h("div",Nm,"No archived threads")):J("",!0),f.value.length>0?(x(),h("div",Um,[(x(!0),h(le,null,be(f.value,R=>{var F,b;return x(),h("div",{key:R.id,class:"glass rounded-xl p-4"},[o("div",Vm,[o("div",Bm,[o("div",Fm,[o("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(F=u[R.type])==null?void 0:F.classes])},_((b=u[R.type])==null?void 0:b.emoji)+" "+_(R.type.toUpperCase()),3),o("span",Hm,_(R.name),1),o("span",Km,"ID: "+_(R.threadId),1)]),o("div",Wm,[o("span",zm,"Created "+_(z(R.createdAt)),1),o("span",Jm,"Archived "+_(z(R.archivedAt??R.lastActiveAt)),1),R.client?(x(),h("span",qm,_(R.client),1)):J("",!0)]),r.value[R.threadId]?(x(),h("div",Gm,_(r.value[R.threadId]),1)):l.value[R.threadId]?(x(),h("div",Ym," Generating summary… ")):J("",!0)]),o("div",Zm,[o("button",{onClick:k=>P(R),disabled:i.value===R.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition"},_(i.value===R.threadId?"Restoring…":"↩ Unarchive"),9,Qm)])])])}),128))])):J("",!0)]))}}),tx={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},sx={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},nx=["disabled"],ox={key:0,class:"mt-3 text-sm text-danger"},rx={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},lx={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},ax={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},ix={class:"flex items-center gap-4"},cx={class:"text-sm text-textSecondary font-mono"},ux={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},dx={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},fx={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},px={class:"text-2xl font-bold font-mono"},mx={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},xx={class:"text-2xl font-bold font-mono"},vx={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},hx={class:"text-2xl font-bold font-mono"},gx={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},yx={class:"flex items-center gap-2 mb-2"},bx={class:"text-2xl font-bold font-mono"},_x={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},wx={class:"text-2xl font-bold font-mono"},kx={class:"max-w-7xl mx-auto px-4 sm:px-6"},Sx={class:"flex gap-6 border-b border-gray-800/50 mb-6"},$x=["onClick"],Cx={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},hs="sensorium_token",Tx=qe({__name:"App",setup(e){const t=w(!1),s=w(""),n=w(""),r=w(!1),l=w(null),a=w("sessions");let i=null;const c=[{id:"sessions",label:"Sessions"},{id:"notes",label:"Memory Notes"},{id:"templates",label:"Templates"},{id:"skills",label:"Skills"},{id:"threads",label:"Threads"},{id:"archived",label:"Archived"},{id:"mcp",label:"MCP Servers"},{id:"snapshots",label:"Snapshots"},{id:"claude",label:"Claude"},{id:"copilot",label:"Copilot"},{id:"settings",label:"Settings"}],m={sessions:ri,notes:ki,templates:nc,skills:Rc,threads:Fd,archived:ex,mcp:Af,snapshots:Cm,claude:Xf,copilot:Rp,settings:sm},u=Me(()=>m[a.value]),f=Me(()=>{if(!l.value)return"—";const z=Math.floor(l.value.uptime),P=Math.floor(z/86400),O=Math.floor(z%86400/3600),V=Math.floor(z%3600/60);return P>0?`${P}d ${O}h`:O>0?`${O}h ${V}m`:`${V}m`});async function g(){const z=s.value.trim()||"no-auth";r.value=!0,n.value="";try{Gt(z),await K(),localStorage.setItem(hs,z),t.value=!0,I()}catch(P){const O=P;O.status===401?n.value="Invalid token":n.value=O.message??"Connection failed",Gt("")}finally{r.value=!1}}function C(){localStorage.removeItem(hs),t.value=!1,s.value="",l.value=null,i&&clearInterval(i),Gt("")}async function K(){l.value=await _e("/api/status")}function I(){i&&clearInterval(i),i=setInterval(K,3e4)}return ze(async()=>{const z=localStorage.getItem(hs);if(z){s.value=z;try{Gt(z),await K(),t.value=!0,I()}catch{localStorage.removeItem(hs),Gt("")}}}),Sn(()=>{i&&clearInterval(i)}),(z,P)=>{var O,V,R,F,b,k,L,Q,ie;return t.value?(x(),h("div",rx,[o("header",lx,[o("div",ax,[P[3]||(P[3]=ct('<div class="flex items-center gap-3"><div class="w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-purple-500 flex items-center justify-center"><span class="text-white text-sm font-bold">S</span></div><div><h1 class="text-lg font-semibold tracking-tight">Sensorium MCP</h1><p class="text-xs text-textSecondary">Agent Dashboard</p></div></div>',1)),o("div",ix,[P[2]||(P[2]=o("div",{class:"flex items-center gap-2 text-sm"},[o("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),o("span",{class:"text-textSecondary"},"Connected")],-1)),o("div",cx,_(f.value),1),o("button",{onClick:C,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),o("div",ux,[o("div",dx,[o("div",fx,[P[4]||(P[4]=ct('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Sessions</span></div>',1)),o("div",px,_(((O=l.value)==null?void 0:O.activeSessions)??0),1)]),o("div",mx,[P[5]||(P[5]=ct('<div class="flex items-center gap-2 mb-2"><span class="text-accentLight"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Notes</span></div>',1)),o("div",xx,_(((R=(V=l.value)==null?void 0:V.memory)==null?void 0:R.totalSemanticNotes)??0),1)]),o("div",vx,[P[6]||(P[6]=ct('<div class="flex items-center gap-2 mb-2"><span class="text-warn"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Episodes</span></div>',1)),o("div",hx,_(((b=(F=l.value)==null?void 0:F.memory)==null?void 0:b.totalEpisodes)??0),1)]),o("div",gx,[o("div",yx,[o("span",{class:Y((((L=(k=l.value)==null?void 0:k.memory)==null?void 0:L.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...P[7]||(P[7]=[o("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),P[8]||(P[8]=o("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),o("div",bx,_(((ie=(Q=l.value)==null?void 0:Q.memory)==null?void 0:ie.unconsolidatedEpisodes)??0),1)]),o("div",_x,[P[9]||(P[9]=ct('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M12 5l7 7-7 7"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Uptime</span></div>',1)),o("div",wx,_(f.value),1)])])]),o("div",kx,[o("nav",Sx,[(x(),h(le,null,be(c,G=>o("button",{key:G.id,onClick:N=>a.value=G.id,class:Y(["pb-3 text-sm font-medium transition",a.value===G.id?"tab-active":"tab-inactive"])},_(G.label),11,$x)),64))])]),o("div",Cx,[(x(),fr(El(u.value),{status:l.value},null,8,["status"]))])])):(x(),h("div",tx,[o("div",sx,[P[1]||(P[1]=ct('<div class="flex items-center gap-3 mb-6"><div class="w-10 h-10 rounded-xl bg-accent/20 flex items-center justify-center"><svg class="w-5 h-5 text-accent" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></div><div><h2 class="text-lg font-semibold">Sensorium MCP</h2><p class="text-sm text-textSecondary">Enter your API token</p></div></div>',1)),te(o("input",{"onUpdate:modelValue":P[0]||(P[0]=G=>s.value=G),type:"password",placeholder:"MCP_HTTP_SECRET",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary placeholder-muted focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition font-mono text-sm",onKeydown:He(g,["enter"])},null,544),[[re,s.value]]),o("button",{onClick:g,disabled:r.value,class:"w-full mt-4 px-4 py-3 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white font-medium transition"},_(r.value?"Connecting...":"Connect"),9,nx),n.value?(x(),h("p",ox,_(n.value),1)):J("",!0)])]))}}});Fa(Tx).mount("#app");</script>
|
|
73
73
|
<style rel="stylesheet" crossorigin>body{background:#0f1419}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:#1a1f2e}::-webkit-scrollbar-thumb{background:#374151;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#4b5563}.glass{background:#1a1f2ecc;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid rgba(99,102,241,.1)}.stat-glow{box-shadow:0 0 20px #6366f114}.priority-2{border-left:3px solid #ef4444}.priority-1{border-left:3px solid #f59e0b}.priority-0{border-left:3px solid transparent}.type-badge{font-size:.65rem;padding:2px 6px;border-radius:9999px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.type-fact{background:#3b82f626;color:#60a5fa}.type-preference{background:#a855f726;color:#c084fc}.type-pattern{background:#22c55e26;color:#4ade80}.type-entity{background:#fbbf2426;color:#fbbf24}.type-relationship{background:#f472b626;color:#f472b6}.tab-active{border-bottom:2px solid #6366f1;color:#e5e7eb}.tab-inactive{border-bottom:2px solid transparent;color:#6b7280}.tab-inactive:hover{color:#9ca3af}</style>
|
|
74
74
|
</head>
|
|
75
75
|
<body class="font-sans text-textPrimary min-h-screen">
|