sensorium-mcp 2.17.12 → 2.17.13

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.
@@ -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 on(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ue={},Pt=[],tt=()=>{},uo=()=>!1,Ss=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Cs=e=>e.startsWith("onUpdate:"),Te=Object.assign,rn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},xr=Object.prototype.hasOwnProperty,re=(e,t)=>xr.call(e,t),W=Array.isArray,It=e=>rs(e)==="[object Map]",Nt=e=>rs(e)==="[object Set]",An=e=>rs(e)==="[object Date]",Y=e=>typeof e=="function",xe=e=>typeof e=="string",nt=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",fo=e=>(ae(e)||Y(e))&&Y(e.then)&&Y(e.catch),po=Object.prototype.toString,rs=e=>po.call(e),vr=e=>rs(e).slice(8,-1),ho=e=>rs(e)==="[object Object]",ln=e=>xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Wt=on(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ks=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},yr=/-\w/g,De=ks(e=>e.replace(yr,t=>t.slice(1).toUpperCase())),br=/\B([A-Z])/g,vt=ks(e=>e.replace(br,"-$1").toLowerCase()),Ts=ks(e=>e.charAt(0).toUpperCase()+e.slice(1)),js=ks(e=>e?`on${Ts(e)}`:""),et=(e,t)=>!Object.is(e,t),fs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},mo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},$s=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let En;const As=()=>En||(En=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Es(e){if(W(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=xe(n)?Cr(n):Es(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(xe(e)||ae(e))return e}const _r=/;(?![^(]*\))/g,wr=/:([^]+)/,Sr=/\/\*[^]*?\*\//g;function Cr(e){const t={};return e.replace(Sr,"").split(_r).forEach(s=>{if(s){const n=s.split(wr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function G(e){let t="";if(xe(e))t=e;else if(W(e))for(let s=0;s<e.length;s++){const n=G(e[s]);n&&(t+=n+" ")}else if(ae(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const kr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Tr=on(kr);function go(e){return!!e||e===""}function $r(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Lt(e[n],t[n]);return s}function Lt(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=nt(e),n=nt(t),s||n)return e===t;if(s=W(e),n=W(t),s||n)return s&&n?$r(e,t):!1;if(s=ae(e),n=ae(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const a=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(a&&!c||!a&&c||!Lt(e[i],t[i]))return!1}}return String(e)===String(t)}function an(e,t){return e.findIndex(s=>Lt(s,t))}const xo=e=>!!(e&&e.__v_isRef===!0),$=e=>xe(e)?e:e==null?"":W(e)||ae(e)&&(e.toString===po||!Y(e.toString))?xo(e)?$(e.value):JSON.stringify(e,vo,2):String(e),vo=(e,t)=>xo(t)?vo(e,t.value):It(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Ns(n,r)+" =>"]=o,s),{})}:Nt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ns(s))}:nt(t)?Ns(t):ae(t)&&!W(t)&&!ho(t)?String(t):t,Ns=(e,t="")=>{var s;return nt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
52
+ **/function on(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ue={},Pt=[],tt=()=>{},uo=()=>!1,Ss=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Cs=e=>e.startsWith("onUpdate:"),ke=Object.assign,rn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},xr=Object.prototype.hasOwnProperty,re=(e,t)=>xr.call(e,t),z=Array.isArray,It=e=>rs(e)==="[object Map]",Nt=e=>rs(e)==="[object Set]",An=e=>rs(e)==="[object Date]",Y=e=>typeof e=="function",xe=e=>typeof e=="string",nt=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",fo=e=>(ae(e)||Y(e))&&Y(e.then)&&Y(e.catch),po=Object.prototype.toString,rs=e=>po.call(e),vr=e=>rs(e).slice(8,-1),ho=e=>rs(e)==="[object Object]",ln=e=>xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Wt=on(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ts=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},yr=/-\w/g,De=Ts(e=>e.replace(yr,t=>t.slice(1).toUpperCase())),br=/\B([A-Z])/g,yt=Ts(e=>e.replace(br,"-$1").toLowerCase()),ks=Ts(e=>e.charAt(0).toUpperCase()+e.slice(1)),js=Ts(e=>e?`on${ks(e)}`:""),et=(e,t)=>!Object.is(e,t),fs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},mo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},$s=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let En;const As=()=>En||(En=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Es(e){if(z(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=xe(n)?Cr(n):Es(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(xe(e)||ae(e))return e}const _r=/;(?![^(]*\))/g,wr=/:([^]+)/,Sr=/\/\*[^]*?\*\//g;function Cr(e){const t={};return e.replace(Sr,"").split(_r).forEach(s=>{if(s){const n=s.split(wr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function G(e){let t="";if(xe(e))t=e;else if(z(e))for(let s=0;s<e.length;s++){const n=G(e[s]);n&&(t+=n+" ")}else if(ae(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Tr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",kr=on(Tr);function go(e){return!!e||e===""}function $r(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Lt(e[n],t[n]);return s}function Lt(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=nt(e),n=nt(t),s||n)return e===t;if(s=z(e),n=z(t),s||n)return s&&n?$r(e,t):!1;if(s=ae(e),n=ae(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const a=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(a&&!c||!a&&c||!Lt(e[i],t[i]))return!1}}return String(e)===String(t)}function an(e,t){return e.findIndex(s=>Lt(s,t))}const xo=e=>!!(e&&e.__v_isRef===!0),$=e=>xe(e)?e:e==null?"":z(e)||ae(e)&&(e.toString===po||!Y(e.toString))?xo(e)?$(e.value):JSON.stringify(e,vo,2):String(e),vo=(e,t)=>xo(t)?vo(e,t.value):It(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Ns(n,r)+" =>"]=o,s),{})}:Nt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ns(s))}:nt(t)?Ns(t):ae(t)&&!z(t)&&!ho(t)?String(t):t,Ns=(e,t="")=>{var s;return nt(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 Ne;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=Ne,!t&&Ne&&(this.index=(Ne.scopes||(Ne.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=Ne;try{return Ne=this,t()}finally{Ne=s}}}on(){++this._on===1&&(this.prevScope=Ne,Ne=this)}off(){this._on>0&&--this._on===0&&(Ne=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 o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Er(){return Ne}let he;const Ls=new WeakSet;class yo{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,Ne&&Ne.active&&Ne.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ls.has(this)&&(Ls.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_o(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Pn(this),wo(this);const t=he,s=We;he=this,We=!0;try{return this.fn()}finally{So(this),he=t,We=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)dn(t);this.deps=this.depsTail=void 0,Pn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zs(this)&&this.run()}get dirty(){return zs(this)}}let bo=0,zt,Jt;function _o(e,t=!1){if(e.flags|=8,t){e.next=Jt,Jt=e;return}e.next=zt,zt=e}function cn(){bo++}function un(){if(--bo>0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;zt;){let t=zt;for(zt=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 wo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function So(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),dn(n),Pr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function zs(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===Qt)||(e.globalVersion=Qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zs(e))))return;e.flags|=2;const t=e.dep,s=he,n=We;he=e,We=!0;try{wo(e);const o=e.fn(e._value);(t.version===0||et(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{he=s,We=n,So(e),e.flags&=-3}}function dn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)dn(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pr(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 ko=[];function dt(){ko.push(We),We=!1}function ft(){const e=ko.pop();We=e===void 0?!0:e}function Pn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=he;he=void 0;try{t()}finally{he=s}}}let Qt=0;class Ir{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 fn{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(!he||!We||he===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==he)s=this.activeLink=new Ir(he,this),he.deps?(s.prevDep=he.depsTail,he.depsTail.nextDep=s,he.depsTail=s):he.deps=he.depsTail=s,To(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=he.depsTail,s.nextDep=void 0,he.depsTail.nextDep=s,he.depsTail=s,he.deps===s&&(he.deps=n)}return s}trigger(t){this.version++,Qt++,this.notify(t)}notify(t){cn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{un()}}}function To(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)To(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Js=new WeakMap,St=Symbol(""),qs=Symbol(""),Xt=Symbol("");function Ee(e,t,s){if(We&&he){let n=Js.get(e);n||Js.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new fn),o.map=n,o.key=s),o.track()}}function at(e,t,s,n,o,r){const i=Js.get(e);if(!i){Qt++;return}const a=c=>{c&&c.trigger()};if(cn(),t==="clear")i.forEach(a);else{const c=W(e),p=c&&ln(s);if(c&&s==="length"){const u=Number(n);i.forEach((h,x)=>{(x==="length"||x===Xt||!nt(x)&&x>=u)&&a(h)})}else switch((s!==void 0||i.has(void 0))&&a(i.get(s)),p&&a(i.get(Xt)),t){case"add":c?p&&a(i.get("length")):(a(i.get(St)),It(e)&&a(i.get(qs)));break;case"delete":c||(a(i.get(St)),It(e)&&a(i.get(qs)));break;case"set":It(e)&&a(i.get(St));break}}un()}function $t(e){const t=oe(e);return t===e?t:(Ee(t,"iterate",Xt),Ve(e)?t:t.map(ze))}function Ps(e){return Ee(e=oe(e),"iterate",Xt),e}function Qe(e,t){return pt(e)?Rt(Ct(e)?ze(t):t):ze(t)}const Mr={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return $t(this).concat(...e.map(t=>W(t)?$t(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Qe(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Qe(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Qe(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hs(this,"includes",e)},indexOf(...e){return Hs(this,"indexOf",e)},join(e){return $t(this).join(e)},lastIndexOf(...e){return Hs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Vt(this,"pop")},push(...e){return Vt(this,"push",e)},reduce(e,...t){return In(this,"reduce",e,t)},reduceRight(e,...t){return In(this,"reduceRight",e,t)},shift(){return Vt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Vt(this,"splice",e)},toReversed(){return $t(this).toReversed()},toSorted(e){return $t(this).toSorted(e)},toSpliced(...e){return $t(this).toSpliced(...e)},unshift(...e){return Vt(this,"unshift",e)},values(){return Fs(this,"values",e=>Qe(this,e))}};function Fs(e,t,s){const n=Ps(e),o=n[t]();return n!==e&&!Ve(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const Or=Array.prototype;function rt(e,t,s,n,o,r){const i=Ps(e),a=i!==e&&!Ve(e),c=i[t];if(c!==Or[t]){const h=c.apply(e,r);return a?ze(h):h}let p=s;i!==e&&(a?p=function(h,x){return s.call(this,Qe(e,h),x,e)}:s.length>2&&(p=function(h,x){return s.call(this,h,x,e)}));const u=c.call(i,p,n);return a&&o?o(u):u}function In(e,t,s,n){const o=Ps(e),r=o!==e&&!Ve(e);let i=s,a=!1;o!==e&&(r?(a=n.length===0,i=function(p,u,h){return a&&(a=!1,p=Qe(e,p)),s.call(this,p,Qe(e,u),h,e)}):s.length>3&&(i=function(p,u,h){return s.call(this,p,u,h,e)}));const c=o[t](i,...n);return a?Qe(e,c):c}function Hs(e,t,s){const n=oe(e);Ee(n,"iterate",Xt);const o=n[t](...s);return(o===-1||o===!1)&&gn(s[0])?(s[0]=oe(s[0]),n[t](...s)):o}function Vt(e,t,s=[]){dt(),cn();const n=oe(e)[t].apply(e,s);return un(),ft(),n}const Rr=on("__proto__,__v_isRef,__isVue"),$o=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function Dr(e){nt(e)||(e=String(e));const t=oe(this);return Ee(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 o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Wr:Mo:r?Io:Po).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=W(t);if(!o){let c;if(i&&(c=Mr[s]))return c;if(s==="hasOwnProperty")return Dr}const a=Reflect.get(t,s,Ie(t)?t:n);if((nt(s)?$o.has(s):Rr(s))||(o||Ee(t,"get",s),r))return a;if(Ie(a)){const c=i&&ln(s)?a:a.value;return o&&ae(c)?Ys(c):c}return ae(a)?o?Ys(a):hn(a):a}}class Eo extends Ao{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const i=W(t)&&ln(s);if(!this._isShallow){const p=pt(r);if(!Ve(n)&&!pt(n)&&(r=oe(r),n=oe(n)),!i&&Ie(r)&&!Ie(n))return p||(r.value=n),!0}const a=i?Number(s)<t.length:re(t,s),c=Reflect.set(t,s,n,Ie(t)?t:o);return t===oe(o)&&(a?et(n,r)&&at(t,"set",s,n):at(t,"add",s,n)),c}deleteProperty(t,s){const n=re(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&at(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!nt(s)||!$o.has(s))&&Ee(t,"has",s),n}ownKeys(t){return Ee(t,"iterate",W(t)?"length":St),Reflect.ownKeys(t)}}class jr extends Ao{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Nr=new Eo,Lr=new jr,Fr=new Eo(!0);const Gs=e=>e,as=e=>Reflect.getPrototypeOf(e);function Hr(e,t,s){return function(...n){const o=this.__v_raw,r=oe(o),i=It(r),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,p=o[e](...n),u=s?Gs:t?Rt:ze;return!t&&Ee(r,"iterate",c?qs:St),Te(Object.create(p),{next(){const{value:h,done:x}=p.next();return x?{value:h,done:x}:{value:a?[u(h[0]),u(h[1])]:u(h),done:x}}})}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Vr(e,t){const s={get(o){const r=this.__v_raw,i=oe(r),a=oe(o);e||(et(o,a)&&Ee(i,"get",o),Ee(i,"get",a));const{has:c}=as(i),p=t?Gs:e?Rt:ze;if(c.call(i,o))return p(r.get(o));if(c.call(i,a))return p(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ee(oe(o),"iterate",St),o.size},has(o){const r=this.__v_raw,i=oe(r),a=oe(o);return e||(et(o,a)&&Ee(i,"has",o),Ee(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,c=oe(a),p=t?Gs:e?Rt:ze;return!e&&Ee(c,"iterate",St),a.forEach((u,h)=>o.call(r,p(u),p(h),i))}};return Te(s,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(o){const r=oe(this),i=as(r),a=oe(o),c=!t&&!Ve(o)&&!pt(o)?a:o;return i.has.call(r,c)||et(o,c)&&i.has.call(r,o)||et(a,c)&&i.has.call(r,a)||(r.add(c),at(r,"add",c,c)),this},set(o,r){!t&&!Ve(r)&&!pt(r)&&(r=oe(r));const i=oe(this),{has:a,get:c}=as(i);let p=a.call(i,o);p||(o=oe(o),p=a.call(i,o));const u=c.call(i,o);return i.set(o,r),p?et(r,u)&&at(i,"set",o,r):at(i,"add",o,r),this},delete(o){const r=oe(this),{has:i,get:a}=as(r);let c=i.call(r,o);c||(o=oe(o),c=i.call(r,o)),a&&a.call(r,o);const p=r.delete(o);return c&&at(r,"delete",o,void 0),p},clear(){const o=oe(this),r=o.size!==0,i=o.clear();return r&&at(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Hr(o,e,t)}),s}function pn(e,t){const s=Vr(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(re(s,o)&&o in n?s:n,o,r)}const Ur={get:pn(!1,!1)},Br={get:pn(!1,!0)},Kr={get:pn(!0,!1)};const Po=new WeakMap,Io=new WeakMap,Mo=new WeakMap,Wr=new WeakMap;function zr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jr(e){return e.__v_skip||!Object.isExtensible(e)?0:zr(vr(e))}function hn(e){return pt(e)?e:mn(e,!1,Nr,Ur,Po)}function qr(e){return mn(e,!1,Fr,Br,Io)}function Ys(e){return mn(e,!0,Lr,Kr,Mo)}function mn(e,t,s,n,o){if(!ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Jr(e);if(r===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function Ct(e){return pt(e)?Ct(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function Ve(e){return!!(e&&e.__v_isShallow)}function gn(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function Gr(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&mo(e,"__v_skip",!0),e}const ze=e=>ae(e)?hn(e):e,Rt=e=>ae(e)?Ys(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function D(e){return Yr(e,!1)}function Yr(e,t){return Ie(e)?e:new Zr(e,t)}class Zr{constructor(t,s){this.dep=new fn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:oe(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||Ve(t)||pt(t);t=n?t:oe(t),et(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function Qr(e){return Ie(e)?e.value:e}const Xr={get:(e,t,s)=>t==="__v_raw"?e:Qr(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Ie(o)&&!Ie(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Oo(e){return Ct(e)?e:new Proxy(e,Xr)}class ei{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new fn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return _o(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 ti(e,t,s=!1){let n,o;return Y(e)?n=e:(n=e.get,o=e.set),new ei(n,o,s)}const us={},xs=new WeakMap;let wt;function si(e,t=!1,s=wt){if(s){let n=xs.get(s);n||xs.set(s,n=[]),n.push(e)}}function ni(e,t,s=ue){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:a,call:c}=s,p=F=>o?F:Ve(F)||o===!1||o===0?ct(F,1):ct(F);let u,h,x,C,H=!1,j=!1;if(Ie(e)?(h=()=>e.value,H=Ve(e)):Ct(e)?(h=()=>p(e),H=!0):W(e)?(j=!0,H=e.some(F=>Ct(F)||Ve(F)),h=()=>e.map(F=>{if(Ie(F))return F.value;if(Ct(F))return p(F);if(Y(F))return c?c(F,2):F()})):Y(e)?t?h=c?()=>c(e,2):e:h=()=>{if(x){dt();try{x()}finally{ft()}}const F=wt;wt=u;try{return c?c(e,3,[C]):e(C)}finally{wt=F}}:h=tt,t&&o){const F=h,le=o===!0?1/0:o;h=()=>ct(F(),le)}const z=Er(),P=()=>{u.stop(),z&&z.active&&rn(z.effects,u)};if(r&&t){const F=t;t=(...le)=>{F(...le),P()}}let V=j?new Array(e.length).fill(us):us;const Z=F=>{if(!(!(u.flags&1)||!u.dirty&&!F))if(t){const le=u.run();if(o||H||(j?le.some((de,J)=>et(de,V[J])):et(le,V))){x&&x();const de=wt;wt=u;try{const J=[le,V===us?void 0:j&&V[0]===us?[]:V,C];V=le,c?c(t,3,J):t(...J)}finally{wt=de}}}else u.run()};return a&&a(Z),u=new yo(h),u.scheduler=i?()=>i(Z,!1):Z,C=F=>si(F,!1,u),x=u.onStop=()=>{const F=xs.get(u);if(F){if(c)c(F,4);else for(const le of F)le();xs.delete(u)}},t?n?Z(!0):V=u.run():i?i(Z.bind(null,!0),!0):u.run(),P.pause=u.pause.bind(u),P.resume=u.resume.bind(u),P.stop=P,P}function ct(e,t=1/0,s){if(t<=0||!ae(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ie(e))ct(e.value,t,s);else if(W(e))for(let n=0;n<e.length;n++)ct(e[n],t,s);else if(Nt(e)||It(e))e.forEach(n=>{ct(n,t,s)});else if(ho(e)){for(const n in e)ct(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ct(e[n],t,s)}return e}/**
56
+ **/let Ne;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=Ne,!t&&Ne&&(this.index=(Ne.scopes||(Ne.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=Ne;try{return Ne=this,t()}finally{Ne=s}}}on(){++this._on===1&&(this.prevScope=Ne,Ne=this)}off(){this._on>0&&--this._on===0&&(Ne=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 o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Er(){return Ne}let he;const Ls=new WeakSet;class yo{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,Ne&&Ne.active&&Ne.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ls.has(this)&&(Ls.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_o(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Pn(this),wo(this);const t=he,s=We;he=this,We=!0;try{return this.fn()}finally{So(this),he=t,We=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)dn(t);this.deps=this.depsTail=void 0,Pn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zs(this)&&this.run()}get dirty(){return zs(this)}}let bo=0,zt,Jt;function _o(e,t=!1){if(e.flags|=8,t){e.next=Jt,Jt=e;return}e.next=zt,zt=e}function cn(){bo++}function un(){if(--bo>0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;zt;){let t=zt;for(zt=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 wo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function So(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),dn(n),Pr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function zs(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===Qt)||(e.globalVersion=Qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zs(e))))return;e.flags|=2;const t=e.dep,s=he,n=We;he=e,We=!0;try{wo(e);const o=e.fn(e._value);(t.version===0||et(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{he=s,We=n,So(e),e.flags&=-3}}function dn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)dn(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pr(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 dt(){To.push(We),We=!1}function ft(){const e=To.pop();We=e===void 0?!0:e}function Pn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=he;he=void 0;try{t()}finally{he=s}}}let Qt=0;class Ir{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 fn{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(!he||!We||he===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==he)s=this.activeLink=new Ir(he,this),he.deps?(s.prevDep=he.depsTail,he.depsTail.nextDep=s,he.depsTail=s):he.deps=he.depsTail=s,ko(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=he.depsTail,s.nextDep=void 0,he.depsTail.nextDep=s,he.depsTail=s,he.deps===s&&(he.deps=n)}return s}trigger(t){this.version++,Qt++,this.notify(t)}notify(t){cn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{un()}}}function ko(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)ko(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Js=new WeakMap,Ct=Symbol(""),qs=Symbol(""),Xt=Symbol("");function Ee(e,t,s){if(We&&he){let n=Js.get(e);n||Js.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new fn),o.map=n,o.key=s),o.track()}}function at(e,t,s,n,o,r){const i=Js.get(e);if(!i){Qt++;return}const a=c=>{c&&c.trigger()};if(cn(),t==="clear")i.forEach(a);else{const c=z(e),h=c&&ln(s);if(c&&s==="length"){const d=Number(n);i.forEach((p,m)=>{(m==="length"||m===Xt||!nt(m)&&m>=d)&&a(p)})}else switch((s!==void 0||i.has(void 0))&&a(i.get(s)),h&&a(i.get(Xt)),t){case"add":c?h&&a(i.get("length")):(a(i.get(Ct)),It(e)&&a(i.get(qs)));break;case"delete":c||(a(i.get(Ct)),It(e)&&a(i.get(qs)));break;case"set":It(e)&&a(i.get(Ct));break}}un()}function At(e){const t=oe(e);return t===e?t:(Ee(t,"iterate",Xt),He(e)?t:t.map(ze))}function Ps(e){return Ee(e=oe(e),"iterate",Xt),e}function Qe(e,t){return pt(e)?Rt(Tt(e)?ze(t):t):ze(t)}const Mr={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return At(this).concat(...e.map(t=>z(t)?At(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Qe(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Qe(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Qe(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Vs(this,"includes",e)},indexOf(...e){return Vs(this,"indexOf",e)},join(e){return At(this).join(e)},lastIndexOf(...e){return Vs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Ht(this,"pop")},push(...e){return Ht(this,"push",e)},reduce(e,...t){return In(this,"reduce",e,t)},reduceRight(e,...t){return In(this,"reduceRight",e,t)},shift(){return Ht(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Ht(this,"splice",e)},toReversed(){return At(this).toReversed()},toSorted(e){return At(this).toSorted(e)},toSpliced(...e){return At(this).toSpliced(...e)},unshift(...e){return Ht(this,"unshift",e)},values(){return Fs(this,"values",e=>Qe(this,e))}};function Fs(e,t,s){const n=Ps(e),o=n[t]();return n!==e&&!He(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const Or=Array.prototype;function rt(e,t,s,n,o,r){const i=Ps(e),a=i!==e&&!He(e),c=i[t];if(c!==Or[t]){const p=c.apply(e,r);return a?ze(p):p}let h=s;i!==e&&(a?h=function(p,m){return s.call(this,Qe(e,p),m,e)}:s.length>2&&(h=function(p,m){return s.call(this,p,m,e)}));const d=c.call(i,h,n);return a&&o?o(d):d}function In(e,t,s,n){const o=Ps(e),r=o!==e&&!He(e);let i=s,a=!1;o!==e&&(r?(a=n.length===0,i=function(h,d,p){return a&&(a=!1,h=Qe(e,h)),s.call(this,h,Qe(e,d),p,e)}):s.length>3&&(i=function(h,d,p){return s.call(this,h,d,p,e)}));const c=o[t](i,...n);return a?Qe(e,c):c}function Vs(e,t,s){const n=oe(e);Ee(n,"iterate",Xt);const o=n[t](...s);return(o===-1||o===!1)&&gn(s[0])?(s[0]=oe(s[0]),n[t](...s)):o}function Ht(e,t,s=[]){dt(),cn();const n=oe(e)[t].apply(e,s);return un(),ft(),n}const Rr=on("__proto__,__v_isRef,__isVue"),$o=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function Dr(e){nt(e)||(e=String(e));const t=oe(this);return Ee(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 o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Wr:Mo:r?Io:Po).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=z(t);if(!o){let c;if(i&&(c=Mr[s]))return c;if(s==="hasOwnProperty")return Dr}const a=Reflect.get(t,s,Ie(t)?t:n);if((nt(s)?$o.has(s):Rr(s))||(o||Ee(t,"get",s),r))return a;if(Ie(a)){const c=i&&ln(s)?a:a.value;return o&&ae(c)?Ys(c):c}return ae(a)?o?Ys(a):hn(a):a}}class Eo extends Ao{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const i=z(t)&&ln(s);if(!this._isShallow){const h=pt(r);if(!He(n)&&!pt(n)&&(r=oe(r),n=oe(n)),!i&&Ie(r)&&!Ie(n))return h||(r.value=n),!0}const a=i?Number(s)<t.length:re(t,s),c=Reflect.set(t,s,n,Ie(t)?t:o);return t===oe(o)&&(a?et(n,r)&&at(t,"set",s,n):at(t,"add",s,n)),c}deleteProperty(t,s){const n=re(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&at(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!nt(s)||!$o.has(s))&&Ee(t,"has",s),n}ownKeys(t){return Ee(t,"iterate",z(t)?"length":Ct),Reflect.ownKeys(t)}}class jr extends Ao{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Nr=new Eo,Lr=new jr,Fr=new Eo(!0);const Gs=e=>e,as=e=>Reflect.getPrototypeOf(e);function Vr(e,t,s){return function(...n){const o=this.__v_raw,r=oe(o),i=It(r),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,h=o[e](...n),d=s?Gs:t?Rt:ze;return!t&&Ee(r,"iterate",c?qs:Ct),ke(Object.create(h),{next(){const{value:p,done:m}=h.next();return m?{value:p,done:m}:{value:a?[d(p[0]),d(p[1])]:d(p),done:m}}})}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Hr(e,t){const s={get(o){const r=this.__v_raw,i=oe(r),a=oe(o);e||(et(o,a)&&Ee(i,"get",o),Ee(i,"get",a));const{has:c}=as(i),h=t?Gs:e?Rt:ze;if(c.call(i,o))return h(r.get(o));if(c.call(i,a))return h(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ee(oe(o),"iterate",Ct),o.size},has(o){const r=this.__v_raw,i=oe(r),a=oe(o);return e||(et(o,a)&&Ee(i,"has",o),Ee(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,c=oe(a),h=t?Gs:e?Rt:ze;return!e&&Ee(c,"iterate",Ct),a.forEach((d,p)=>o.call(r,h(d),h(p),i))}};return ke(s,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(o){const r=oe(this),i=as(r),a=oe(o),c=!t&&!He(o)&&!pt(o)?a:o;return i.has.call(r,c)||et(o,c)&&i.has.call(r,o)||et(a,c)&&i.has.call(r,a)||(r.add(c),at(r,"add",c,c)),this},set(o,r){!t&&!He(r)&&!pt(r)&&(r=oe(r));const i=oe(this),{has:a,get:c}=as(i);let h=a.call(i,o);h||(o=oe(o),h=a.call(i,o));const d=c.call(i,o);return i.set(o,r),h?et(r,d)&&at(i,"set",o,r):at(i,"add",o,r),this},delete(o){const r=oe(this),{has:i,get:a}=as(r);let c=i.call(r,o);c||(o=oe(o),c=i.call(r,o)),a&&a.call(r,o);const h=r.delete(o);return c&&at(r,"delete",o,void 0),h},clear(){const o=oe(this),r=o.size!==0,i=o.clear();return r&&at(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Vr(o,e,t)}),s}function pn(e,t){const s=Hr(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(re(s,o)&&o in n?s:n,o,r)}const Ur={get:pn(!1,!1)},Br={get:pn(!1,!0)},Kr={get:pn(!0,!1)};const Po=new WeakMap,Io=new WeakMap,Mo=new WeakMap,Wr=new WeakMap;function zr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jr(e){return e.__v_skip||!Object.isExtensible(e)?0:zr(vr(e))}function hn(e){return pt(e)?e:mn(e,!1,Nr,Ur,Po)}function qr(e){return mn(e,!1,Fr,Br,Io)}function Ys(e){return mn(e,!0,Lr,Kr,Mo)}function mn(e,t,s,n,o){if(!ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Jr(e);if(r===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function Tt(e){return pt(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function He(e){return!!(e&&e.__v_isShallow)}function gn(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function Gr(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&mo(e,"__v_skip",!0),e}const ze=e=>ae(e)?hn(e):e,Rt=e=>ae(e)?Ys(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function j(e){return Yr(e,!1)}function Yr(e,t){return Ie(e)?e:new Zr(e,t)}class Zr{constructor(t,s){this.dep=new fn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:oe(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||He(t)||pt(t);t=n?t:oe(t),et(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function Qr(e){return Ie(e)?e.value:e}const Xr={get:(e,t,s)=>t==="__v_raw"?e:Qr(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Ie(o)&&!Ie(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Oo(e){return Tt(e)?e:new Proxy(e,Xr)}class ei{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new fn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return _o(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 ti(e,t,s=!1){let n,o;return Y(e)?n=e:(n=e.get,o=e.set),new ei(n,o,s)}const us={},xs=new WeakMap;let St;function si(e,t=!1,s=St){if(s){let n=xs.get(s);n||xs.set(s,n=[]),n.push(e)}}function ni(e,t,s=ue){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:a,call:c}=s,h=V=>o?V:He(V)||o===!1||o===0?ct(V,1):ct(V);let d,p,m,v,F=!1,D=!1;if(Ie(e)?(p=()=>e.value,F=He(e)):Tt(e)?(p=()=>h(e),F=!0):z(e)?(D=!0,F=e.some(V=>Tt(V)||He(V)),p=()=>e.map(V=>{if(Ie(V))return V.value;if(Tt(V))return h(V);if(Y(V))return c?c(V,2):V()})):Y(e)?t?p=c?()=>c(e,2):e:p=()=>{if(m){dt();try{m()}finally{ft()}}const V=St;St=d;try{return c?c(e,3,[v]):e(v)}finally{St=V}}:p=tt,t&&o){const V=p,le=o===!0?1/0:o;p=()=>ct(V(),le)}const B=Er(),E=()=>{d.stop(),B&&B.active&&rn(B.effects,d)};if(r&&t){const V=t;t=(...le)=>{V(...le),E()}}let H=D?new Array(e.length).fill(us):us;const Z=V=>{if(!(!(d.flags&1)||!d.dirty&&!V))if(t){const le=d.run();if(o||F||(D?le.some((de,J)=>et(de,H[J])):et(le,H))){m&&m();const de=St;St=d;try{const J=[le,H===us?void 0:D&&H[0]===us?[]:H,v];H=le,c?c(t,3,J):t(...J)}finally{St=de}}}else d.run()};return a&&a(Z),d=new yo(p),d.scheduler=i?()=>i(Z,!1):Z,v=V=>si(V,!1,d),m=d.onStop=()=>{const V=xs.get(d);if(V){if(c)c(V,4);else for(const le of V)le();xs.delete(d)}},t?n?Z(!0):H=d.run():i?i(Z.bind(null,!0),!0):d.run(),E.pause=d.pause.bind(d),E.resume=d.resume.bind(d),E.stop=E,E}function ct(e,t=1/0,s){if(t<=0||!ae(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ie(e))ct(e.value,t,s);else if(z(e))for(let n=0;n<e.length;n++)ct(e[n],t,s);else if(Nt(e)||It(e))e.forEach(n=>{ct(n,t,s)});else if(ho(e)){for(const n in e)ct(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ct(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 is(e,t,s,n){try{return n?e(...n):e()}catch(o){Is(o,t,s)}}function ot(e,t,s,n){if(Y(e)){const o=is(e,t,s,n);return o&&fo(o)&&o.catch(r=>{Is(r,t,s)}),o}if(W(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ot(e[r],t,s,n));return o}}function Is(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ue;if(t){let a=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,c,p)===!1)return}a=a.parent}if(r){dt(),is(r,null,10,[e,c,p]),ft();return}}oi(e,s,o,n,i)}function oi(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Re=[];let Ze=-1;const Mt=[];let mt=null,At=0;const Ro=Promise.resolve();let vs=null;function Do(e){const t=vs||Ro;return e?t.then(this?e.bind(this):e):t}function ri(e){let t=Ze+1,s=Re.length;for(;t<s;){const n=t+s>>>1,o=Re[n],r=es(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function xn(e){if(!(e.flags&1)){const t=es(e),s=Re[Re.length-1];!s||!(e.flags&2)&&t>=es(s)?Re.push(e):Re.splice(ri(t),0,e),e.flags|=1,jo()}}function jo(){vs||(vs=Ro.then(Lo))}function ii(e){W(e)?Mt.push(...e):mt&&e.id===-1?mt.splice(At+1,0,e):e.flags&1||(Mt.push(e),e.flags|=1),jo()}function Mn(e,t,s=Ze+1){for(;s<Re.length;s++){const n=Re[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Re.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function No(e){if(Mt.length){const t=[...new Set(Mt)].sort((s,n)=>es(s)-es(n));if(Mt.length=0,mt){mt.push(...t);return}for(mt=t,At=0;At<mt.length;At++){const s=mt[At];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}mt=null,At=0}}const es=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Lo(e){try{for(Ze=0;Ze<Re.length;Ze++){const t=Re[Ze];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),is(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ze<Re.length;Ze++){const t=Re[Ze];t&&(t.flags&=-2)}Ze=-1,Re.length=0,No(),vs=null,(Re.length||Mt.length)&&Lo()}}let Fe=null,Fo=null;function ys(e){const t=Fe;return Fe=e,Fo=e&&e.type.__scopeId||null,t}function li(e,t=Fe,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Kn(-1);const r=ys(t);let i;try{i=e(...o)}finally{ys(r),n._d&&Kn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function me(e,t){if(Fe===null)return e;const s=Ds(Fe),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,c=ue]=t[o];r&&(Y(r)&&(r={mounted:r,updated:r}),r.deep&&ct(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:a,modifiers:c}))}return e}function bt(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let c=a.dir[n];c&&(dt(),ot(c,s,8,[e.el,a,e,t]),ft())}}function ai(e,t){if(Pe){let s=Pe.provides;const n=Pe.parent&&Pe.parent.provides;n===s&&(s=Pe.provides=Object.create(n)),s[e]=t}}function ps(e,t,s=!1){const n=al();if(n||Ot){let o=Ot?Ot._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&Y(t)?t.call(n&&n.proxy):t}}const ci=Symbol.for("v-scx"),ui=()=>ps(ci);function Vs(e,t,s){return Ho(e,t,s)}function Ho(e,t,s=ue){const{immediate:n,deep:o,flush:r,once:i}=s,a=Te({},s),c=t&&n||!t&&r!=="post";let p;if(ss){if(r==="sync"){const C=ui();p=C.__watcherHandles||(C.__watcherHandles=[])}else if(!c){const C=()=>{};return C.stop=tt,C.resume=tt,C.pause=tt,C}}const u=Pe;a.call=(C,H,j)=>ot(C,u,H,j);let h=!1;r==="post"?a.scheduler=C=>{je(C,u&&u.suspense)}:r!=="sync"&&(h=!0,a.scheduler=(C,H)=>{H?C():xn(C)}),a.augmentJob=C=>{t&&(C.flags|=4),h&&(C.flags|=2,u&&(C.id=u.uid,C.i=u))};const x=ni(e,t,a);return ss&&(p?p.push(x):c&&x()),x}function di(e,t,s){const n=this.proxy,o=xe(e)?e.includes(".")?Vo(n,e):()=>n[e]:e.bind(n,n);let r;Y(t)?r=t:(r=t.handler,s=t);const i=ls(this),a=Ho(o,r.bind(n),s);return i(),a}function Vo(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const fi=Symbol("_vte"),pi=e=>e.__isTeleport,hi=Symbol("_leaveCb");function vn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,vn(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 kt(e,t){return Y(e)?Te({name:e.name},t,{setup:e}):e}function Uo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function On(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const bs=new WeakMap;function qt(e,t,s,n,o=!1){if(W(e)){e.forEach((j,z)=>qt(j,t&&(W(t)?t[z]:t),s,n,o));return}if(Gt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&qt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ds(n.component):n.el,i=o?null:r,{i:a,r:c}=e,p=t&&t.r,u=a.refs===ue?a.refs={}:a.refs,h=a.setupState,x=oe(h),C=h===ue?uo:j=>On(u,j)?!1:re(x,j),H=(j,z)=>!(z&&On(u,z));if(p!=null&&p!==c){if(Rn(t),xe(p))u[p]=null,C(p)&&(h[p]=null);else if(Ie(p)){const j=t;H(p,j.k)&&(p.value=null),j.k&&(u[j.k]=null)}}if(Y(c))is(c,a,12,[i,u]);else{const j=xe(c),z=Ie(c);if(j||z){const P=()=>{if(e.f){const V=j?C(c)?h[c]:u[c]:H()||!e.k?c.value:u[e.k];if(o)W(V)&&rn(V,r);else if(W(V))V.includes(r)||V.push(r);else if(j)u[c]=[r],C(c)&&(h[c]=u[c]);else{const Z=[r];H(c,e.k)&&(c.value=Z),e.k&&(u[e.k]=Z)}}else j?(u[c]=i,C(c)&&(h[c]=i)):z&&(H(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const V=()=>{P(),bs.delete(e)};V.id=-1,bs.set(e,V),je(V,s)}else Rn(e),P()}}}function Rn(e){const t=bs.get(e);t&&(t.flags|=8,bs.delete(e))}As().requestIdleCallback;As().cancelIdleCallback;const Gt=e=>!!e.type.__asyncLoader,Bo=e=>e.type.__isKeepAlive;function mi(e,t){Ko(e,"a",t)}function gi(e,t){Ko(e,"da",t)}function Ko(e,t,s=Pe){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ms(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Bo(o.parent.vnode)&&xi(n,t,s,o),o=o.parent}}function xi(e,t,s,n){const o=Ms(t,e,n,!0);yn(()=>{rn(n[t],o)},s)}function Ms(e,t,s=Pe,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{dt();const a=ls(s),c=ot(t,s,e,i);return a(),ft(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=Pe)=>{(!ss||e==="sp")&&Ms(e,(...n)=>t(...n),s)},vi=ht("bm"),yt=ht("m"),yi=ht("bu"),bi=ht("u"),_i=ht("bum"),yn=ht("um"),wi=ht("sp"),Si=ht("rtg"),Ci=ht("rtc");function ki(e,t=Pe){Ms("ec",e,t)}const Ti="components",Wo=Symbol.for("v-ndc");function $i(e){return xe(e)?Ai(Ti,e,!1)||e:e||Wo}function Ai(e,t,s=!0,n=!1){const o=Fe||Pe;if(o){const r=o.type;{const a=pl(r,!1);if(a&&(a===t||a===De(t)||a===Ts(De(t))))return r}const i=Dn(o[e]||r[e],t)||Dn(o.appContext[e],t);return!i&&n?r:i}}function Dn(e,t){return e&&(e[t]||e[De(t)]||e[Ts(De(t))])}function be(e,t,s,n){let o;const r=s,i=W(e);if(i||xe(e)){const a=i&&Ct(e);let c=!1,p=!1;a&&(c=!Ve(e),p=pt(e),e=Ps(e)),o=new Array(e.length);for(let u=0,h=e.length;u<h;u++)o[u]=t(c?p?Rt(ze(e[u])):ze(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(ae(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,p=a.length;c<p;c++){const u=a[c];o[c]=t(e[u],u,c,r)}}else o=[];return o}const Zs=e=>e?pr(e)?Ds(e):Zs(e.parent):null,Yt=Te(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=>Zs(e.parent),$root:e=>Zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Jo(e),$forceUpdate:e=>e.f||(e.f=()=>{xn(e.update)}),$nextTick:e=>e.n||(e.n=Do.bind(e.proxy)),$watch:e=>di.bind(e)}),Us=(e,t)=>e!==ue&&!e.__isScriptSetup&&re(e,t),Ei={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:a,appContext:c}=e;if(t[0]!=="$"){const x=i[t];if(x!==void 0)switch(x){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Us(n,t))return i[t]=1,n[t];if(o!==ue&&re(o,t))return i[t]=2,o[t];if(re(r,t))return i[t]=3,r[t];if(s!==ue&&re(s,t))return i[t]=4,s[t];Qs&&(i[t]=0)}}const p=Yt[t];let u,h;if(p)return t==="$attrs"&&Ee(e.attrs,"get",""),p(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(s!==ue&&re(s,t))return i[t]=4,s[t];if(h=c.config.globalProperties,re(h,t))return h[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Us(o,t)?(o[t]=s,!0):n!==ue&&re(n,t)?(n[t]=s,!0):re(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:i}},a){let c;return!!(s[a]||e!==ue&&a[0]!=="$"&&re(e,a)||Us(t,a)||re(r,a)||re(n,a)||re(Yt,a)||re(o.config.globalProperties,a)||(c=i.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:re(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function jn(e){return W(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Qs=!0;function Pi(e){const t=Jo(e),s=e.proxy,n=e.ctx;Qs=!1,t.beforeCreate&&Nn(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:c,inject:p,created:u,beforeMount:h,mounted:x,beforeUpdate:C,updated:H,activated:j,deactivated:z,beforeDestroy:P,beforeUnmount:V,destroyed:Z,unmounted:F,render:le,renderTracked:de,renderTriggered:J,errorCaptured:N,serverPrefetch:K,expose:fe,inheritAttrs:te,components:we,directives:ye,filters:Ue}=t;if(p&&Ii(p,n,null),i)for(const se in i){const X=i[se];Y(X)&&(n[se]=X.bind(s))}if(o){const se=o.call(s,s);ae(se)&&(e.data=hn(se))}if(Qs=!0,r)for(const se in r){const X=r[se],Me=Y(X)?X.bind(s,s):Y(X.get)?X.get.bind(s,s):tt,L=!Y(X)&&Y(X.set)?X.set.bind(s):tt,y=Ke({get:Me,set:L});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>y.value,set:g=>y.value=g})}if(a)for(const se in a)zo(a[se],n,s,se);if(c){const se=Y(c)?c.call(s):c;Reflect.ownKeys(se).forEach(X=>{ai(X,se[X])})}u&&Nn(u,e,"c");function ge(se,X){W(X)?X.forEach(Me=>se(Me.bind(s))):X&&se(X.bind(s))}if(ge(vi,h),ge(yt,x),ge(yi,C),ge(bi,H),ge(mi,j),ge(gi,z),ge(ki,N),ge(Ci,de),ge(Si,J),ge(_i,V),ge(yn,F),ge(wi,K),W(fe))if(fe.length){const se=e.exposed||(e.exposed={});fe.forEach(X=>{Object.defineProperty(se,X,{get:()=>s[X],set:Me=>s[X]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});le&&e.render===tt&&(e.render=le),te!=null&&(e.inheritAttrs=te),we&&(e.components=we),ye&&(e.directives=ye),K&&Uo(e)}function Ii(e,t,s=tt){W(e)&&(e=Xs(e));for(const n in e){const o=e[n];let r;ae(o)?"default"in o?r=ps(o.from||n,o.default,!0):r=ps(o.from||n):r=ps(o),Ie(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function Nn(e,t,s){ot(W(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function zo(e,t,s,n){let o=n.includes(".")?Vo(s,n):()=>s[n];if(xe(e)){const r=t[e];Y(r)&&Vs(o,r)}else if(Y(e))Vs(o,e.bind(s));else if(ae(e))if(W(e))e.forEach(r=>zo(r,t,s,n));else{const r=Y(e.handler)?e.handler.bind(s):t[e.handler];Y(r)&&Vs(o,r,e)}}function Jo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(p=>_s(c,p,i,!0)),_s(c,t,i)),ae(t)&&r.set(t,c),c}function _s(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&_s(e,r,s,!0),o&&o.forEach(i=>_s(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const a=Mi[i]||s&&s[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Mi={data:Ln,props:Fn,emits:Fn,methods:Kt,computed:Kt,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:Kt,directives:Kt,watch:Ri,provide:Ln,inject:Oi};function Ln(e,t){return t?e?function(){return Te(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function Oi(e,t){return Kt(Xs(e),Xs(t))}function Xs(e){if(W(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Oe(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?Te(Object.create(null),e,t):t}function Fn(e,t){return e?W(e)&&W(t)?[...new Set([...e,...t])]:Te(Object.create(null),jn(e),jn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=Te(Object.create(null),e);for(const n in t)s[n]=Oe(e[n],t[n]);return s}function qo(){return{app:null,config:{isNativeTag:uo,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 Di=0;function ji(e,t){return function(n,o=null){Y(n)||(n=Te({},n)),o!=null&&!ae(o)&&(o=null);const r=qo(),i=new WeakSet,a=[];let c=!1;const p=r.app={_uid:Di++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:ml,get config(){return r.config},set config(u){},use(u,...h){return i.has(u)||(u&&Y(u.install)?(i.add(u),u.install(p,...h)):Y(u)&&(i.add(u),u(p,...h))),p},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),p},component(u,h){return h?(r.components[u]=h,p):r.components[u]},directive(u,h){return h?(r.directives[u]=h,p):r.directives[u]},mount(u,h,x){if(!c){const C=p._ceVNode||st(n,o);return C.appContext=r,x===!0?x="svg":x===!1&&(x=void 0),e(C,u,x),c=!0,p._container=u,u.__vue_app__=p,Ds(C.component)}},onUnmount(u){a.push(u)},unmount(){c&&(ot(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(u,h){return r.provides[u]=h,p},runWithContext(u){const h=Ot;Ot=p;try{return u()}finally{Ot=h}}};return p}}let Ot=null;const Ni=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${De(t)}Modifiers`]||e[`${vt(t)}Modifiers`];function Li(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ue;let o=s;const r=t.startsWith("update:"),i=r&&Ni(n,t.slice(7));i&&(i.trim&&(o=s.map(u=>xe(u)?u.trim():u)),i.number&&(o=s.map($s)));let a,c=n[a=js(t)]||n[a=js(De(t))];!c&&r&&(c=n[a=js(vt(t))]),c&&ot(c,e,6,o);const p=n[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ot(p,e,6,o)}}const Fi=new WeakMap;function Go(e,t,s=!1){const n=s?Fi:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!Y(e)){const c=p=>{const u=Go(p,t,!0);u&&(a=!0,Te(i,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(ae(e)&&n.set(e,null),null):(W(r)?r.forEach(c=>i[c]=null):Te(i,r),ae(e)&&n.set(e,i),i)}function Os(e,t){return!e||!Ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,vt(t))||re(e,t))}function Hn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:c,render:p,renderCache:u,props:h,data:x,setupState:C,ctx:H,inheritAttrs:j}=e,z=ys(e);let P,V;try{if(s.shapeFlag&4){const F=o||n,le=F;P=Xe(p.call(le,F,u,h,C,x,H)),V=a}else{const F=t;P=Xe(F.length>1?F(h,{attrs:a,slots:i,emit:c}):F(h,null)),V=t.props?a:Hi(a)}}catch(F){Zt.length=0,Is(F,e,1),P=st(xt)}let Z=P;if(V&&j!==!1){const F=Object.keys(V),{shapeFlag:le}=Z;F.length&&le&7&&(r&&F.some(Cs)&&(V=Vi(V,r)),Z=Dt(Z,V,!1,!0))}return s.dirs&&(Z=Dt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(s.dirs):s.dirs),s.transition&&vn(Z,s.transition),P=Z,ys(z),P}const Hi=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ss(s))&&((t||(t={}))[s]=e[s]);return t},Vi=(e,t)=>{const s={};for(const n in e)(!Cs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ui(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:a,patchFlag:c}=t,p=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Vn(n,i,p):!!i;if(c&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const x=u[h];if(Yo(i,n,x)&&!Os(p,x))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===i?!1:n?i?Vn(n,i,p):!0:!!i;return!1}function Vn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(Yo(t,e,r)&&!Os(s,r))return!0}return!1}function Yo(e,t,s){const n=e[s],o=t[s];return s==="style"&&ae(n)&&ae(o)?!Lt(n,o):n!==o}function Bi({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Zo={},Qo=()=>Object.create(Zo),Xo=e=>Object.getPrototypeOf(e)===Zo;function Ki(e,t,s,n=!1){const o={},r=Qo();e.propsDefaults=Object.create(null),er(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:qr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Wi(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=oe(o),[c]=e.propsOptions;let p=!1;if((n||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let x=u[h];if(Os(e.emitsOptions,x))continue;const C=t[x];if(c)if(re(r,x))C!==r[x]&&(r[x]=C,p=!0);else{const H=De(x);o[H]=en(c,a,H,C,e,!1)}else C!==r[x]&&(r[x]=C,p=!0)}}}else{er(e,t,o,r)&&(p=!0);let u;for(const h in a)(!t||!re(t,h)&&((u=vt(h))===h||!re(t,u)))&&(c?s&&(s[h]!==void 0||s[u]!==void 0)&&(o[h]=en(c,a,h,void 0,e,!0)):delete o[h]);if(r!==a)for(const h in r)(!t||!re(t,h))&&(delete r[h],p=!0)}p&&at(e.attrs,"set","")}function er(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(Wt(c))continue;const p=t[c];let u;o&&re(o,u=De(c))?!r||!r.includes(u)?s[u]=p:(a||(a={}))[u]=p:Os(e.emitsOptions,c)||(!(c in n)||p!==n[c])&&(n[c]=p,i=!0)}if(r){const c=oe(s),p=a||ue;for(let u=0;u<r.length;u++){const h=r[u];s[h]=en(o,c,h,p[h],e,!re(p,h))}}return i}function en(e,t,s,n,o,r){const i=e[s];if(i!=null){const a=re(i,"default");if(a&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&Y(c)){const{propsDefaults:p}=o;if(s in p)n=p[s];else{const u=ls(o);n=p[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!a?n=!1:i[1]&&(n===""||n===vt(s))&&(n=!0))}return n}const zi=new WeakMap;function tr(e,t,s=!1){const n=s?zi:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},a=[];let c=!1;if(!Y(e)){const u=h=>{c=!0;const[x,C]=tr(h,t,!0);Te(i,x),C&&a.push(...C)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return ae(e)&&n.set(e,Pt),Pt;if(W(r))for(let u=0;u<r.length;u++){const h=De(r[u]);Un(h)&&(i[h]=ue)}else if(r)for(const u in r){const h=De(u);if(Un(h)){const x=r[u],C=i[h]=W(x)||Y(x)?{type:x}:Te({},x),H=C.type;let j=!1,z=!0;if(W(H))for(let P=0;P<H.length;++P){const V=H[P],Z=Y(V)&&V.name;if(Z==="Boolean"){j=!0;break}else Z==="String"&&(z=!1)}else j=Y(H)&&H.name==="Boolean";C[0]=j,C[1]=z,(j||re(C,"default"))&&a.push(h)}}const p=[i,a];return ae(e)&&n.set(e,p),p}function Un(e){return e[0]!=="$"&&!Wt(e)}const bn=e=>e==="_"||e==="_ctx"||e==="$stable",_n=e=>W(e)?e.map(Xe):[Xe(e)],Ji=(e,t,s)=>{if(t._n)return t;const n=li((...o)=>_n(t(...o)),s);return n._c=!1,n},sr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(bn(o))continue;const r=e[o];if(Y(r))t[o]=Ji(o,r,n);else if(r!=null){const i=_n(r);t[o]=()=>i}}},nr=(e,t)=>{const s=_n(t);e.slots.default=()=>s},or=(e,t,s)=>{for(const n in t)(s||!bn(n))&&(e[n]=t[n])},qi=(e,t,s)=>{const n=e.slots=Qo();if(e.vnode.shapeFlag&32){const o=t._;o?(or(n,t,s),s&&mo(n,"_",o,!0)):sr(t,n)}else t&&nr(e,t)},Gi=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=ue;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:or(o,t,s):(r=!t.$stable,sr(t,o)),i=t}else t&&(nr(e,t),i={default:1});if(r)for(const a in o)!bn(a)&&i[a]==null&&delete o[a]},je=el;function Yi(e){return Zi(e)}function Zi(e,t){const s=As();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:a,createComment:c,setText:p,setElementText:u,parentNode:h,nextSibling:x,setScopeId:C=tt,insertStaticContent:H}=e,j=(d,f,m,k=null,v=null,b=null,O=void 0,I=null,A=!!f.dynamicChildren)=>{if(d===f)return;d&&!Ut(d,f)&&(k=ne(d),g(d,v,b,!0),d=null),f.patchFlag===-2&&(A=!1,f.dynamicChildren=null);const{type:_,ref:B,shapeFlag:R}=f;switch(_){case Rs:z(d,f,m,k);break;case xt:P(d,f,m,k);break;case hs:d==null&&V(f,m,k,O);break;case ie:we(d,f,m,k,v,b,O,I,A);break;default:R&1?le(d,f,m,k,v,b,O,I,A):R&6?ye(d,f,m,k,v,b,O,I,A):(R&64||R&128)&&_.process(d,f,m,k,v,b,O,I,A,Ft)}B!=null&&v?qt(B,d&&d.ref,b,f||d,!f):B==null&&d&&d.ref!=null&&qt(d.ref,null,b,d,!0)},z=(d,f,m,k)=>{if(d==null)n(f.el=a(f.children),m,k);else{const v=f.el=d.el;f.children!==d.children&&p(v,f.children)}},P=(d,f,m,k)=>{d==null?n(f.el=c(f.children||""),m,k):f.el=d.el},V=(d,f,m,k)=>{[d.el,d.anchor]=H(d.children,f,m,k,d.el,d.anchor)},Z=({el:d,anchor:f},m,k)=>{let v;for(;d&&d!==f;)v=x(d),n(d,m,k),d=v;n(f,m,k)},F=({el:d,anchor:f})=>{let m;for(;d&&d!==f;)m=x(d),o(d),d=m;o(f)},le=(d,f,m,k,v,b,O,I,A)=>{if(f.type==="svg"?O="svg":f.type==="math"&&(O="mathml"),d==null)de(f,m,k,v,b,O,I,A);else{const _=d.el&&d.el._isVueCE?d.el:null;try{_&&_._beginPatch(),K(d,f,v,b,O,I,A)}finally{_&&_._endPatch()}}},de=(d,f,m,k,v,b,O,I)=>{let A,_;const{props:B,shapeFlag:R,transition:U,dirs:q}=d;if(A=d.el=i(d.type,b,B&&B.is,B),R&8?u(A,d.children):R&16&&N(d.children,A,null,k,v,Bs(d,b),O,I),q&&bt(d,null,k,"created"),J(A,d,d.scopeId,O,k),B){for(const ce in B)ce!=="value"&&!Wt(ce)&&r(A,ce,null,B[ce],b,k);"value"in B&&r(A,"value",null,B.value,b),(_=B.onVnodeBeforeMount)&&Ye(_,k,d)}q&&bt(d,null,k,"beforeMount");const ee=Qi(v,U);ee&&U.beforeEnter(A),n(A,f,m),((_=B&&B.onVnodeMounted)||ee||q)&&je(()=>{try{_&&Ye(_,k,d),ee&&U.enter(A),q&&bt(d,null,k,"mounted")}finally{}},v)},J=(d,f,m,k,v)=>{if(m&&C(d,m),k)for(let b=0;b<k.length;b++)C(d,k[b]);if(v){let b=v.subTree;if(f===b||ar(b.type)&&(b.ssContent===f||b.ssFallback===f)){const O=v.vnode;J(d,O,O.scopeId,O.slotScopeIds,v.parent)}}},N=(d,f,m,k,v,b,O,I,A=0)=>{for(let _=A;_<d.length;_++){const B=d[_]=I?lt(d[_]):Xe(d[_]);j(null,B,f,m,k,v,b,O,I)}},K=(d,f,m,k,v,b,O)=>{const I=f.el=d.el;let{patchFlag:A,dynamicChildren:_,dirs:B}=f;A|=d.patchFlag&16;const R=d.props||ue,U=f.props||ue;let q;if(m&&_t(m,!1),(q=U.onVnodeBeforeUpdate)&&Ye(q,m,f,d),B&&bt(f,d,m,"beforeUpdate"),m&&_t(m,!0),(R.innerHTML&&U.innerHTML==null||R.textContent&&U.textContent==null)&&u(I,""),_?fe(d.dynamicChildren,_,I,m,k,Bs(f,v),b):O||X(d,f,I,null,m,k,Bs(f,v),b,!1),A>0){if(A&16)te(I,R,U,m,v);else if(A&2&&R.class!==U.class&&r(I,"class",null,U.class,v),A&4&&r(I,"style",R.style,U.style,v),A&8){const ee=f.dynamicProps;for(let ce=0;ce<ee.length;ce++){const pe=ee[ce],ve=R[pe],Ce=U[pe];(Ce!==ve||pe==="value")&&r(I,pe,ve,Ce,v,m)}}A&1&&d.children!==f.children&&u(I,f.children)}else!O&&_==null&&te(I,R,U,m,v);((q=U.onVnodeUpdated)||B)&&je(()=>{q&&Ye(q,m,f,d),B&&bt(f,d,m,"updated")},k)},fe=(d,f,m,k,v,b,O)=>{for(let I=0;I<f.length;I++){const A=d[I],_=f[I],B=A.el&&(A.type===ie||!Ut(A,_)||A.shapeFlag&198)?h(A.el):m;j(A,_,B,null,k,v,b,O,!0)}},te=(d,f,m,k,v)=>{if(f!==m){if(f!==ue)for(const b in f)!Wt(b)&&!(b in m)&&r(d,b,f[b],null,v,k);for(const b in m){if(Wt(b))continue;const O=m[b],I=f[b];O!==I&&b!=="value"&&r(d,b,I,O,v,k)}"value"in m&&r(d,"value",f.value,m.value,v)}},we=(d,f,m,k,v,b,O,I,A)=>{const _=f.el=d?d.el:a(""),B=f.anchor=d?d.anchor:a("");let{patchFlag:R,dynamicChildren:U,slotScopeIds:q}=f;q&&(I=I?I.concat(q):q),d==null?(n(_,m,k),n(B,m,k),N(f.children||[],m,B,v,b,O,I,A)):R>0&&R&64&&U&&d.dynamicChildren&&d.dynamicChildren.length===U.length?(fe(d.dynamicChildren,U,m,v,b,O,I),(f.key!=null||v&&f===v.subTree)&&rr(d,f,!0)):X(d,f,m,B,v,b,O,I,A)},ye=(d,f,m,k,v,b,O,I,A)=>{f.slotScopeIds=I,d==null?f.shapeFlag&512?v.ctx.activate(f,m,k,O,A):Ue(f,m,k,v,b,O,A):Tt(d,f,A)},Ue=(d,f,m,k,v,b,O)=>{const I=d.component=ll(d,k,v);if(Bo(d)&&(I.ctx.renderer=Ft),cl(I,!1,O),I.asyncDep){if(v&&v.registerDep(I,ge,O),!d.el){const A=I.subTree=st(xt);P(null,A,f,m),d.placeholder=A.el}}else ge(I,d,f,m,v,b,O)},Tt=(d,f,m)=>{const k=f.component=d.component;if(Ui(d,f,m))if(k.asyncDep&&!k.asyncResolved){se(k,f,m);return}else k.next=f,k.update();else f.el=d.el,k.vnode=f},ge=(d,f,m,k,v,b,O)=>{const I=()=>{if(d.isMounted){let{next:R,bu:U,u:q,parent:ee,vnode:ce}=d;{const qe=ir(d);if(qe){R&&(R.el=ce.el,se(d,R,O)),qe.asyncDep.then(()=>{je(()=>{d.isUnmounted||_()},v)});return}}let pe=R,ve;_t(d,!1),R?(R.el=ce.el,se(d,R,O)):R=ce,U&&fs(U),(ve=R.props&&R.props.onVnodeBeforeUpdate)&&Ye(ve,ee,R,ce),_t(d,!0);const Ce=Hn(d),Je=d.subTree;d.subTree=Ce,j(Je,Ce,h(Je.el),ne(Je),d,v,b),R.el=Ce.el,pe===null&&Bi(d,Ce.el),q&&je(q,v),(ve=R.props&&R.props.onVnodeUpdated)&&je(()=>Ye(ve,ee,R,ce),v)}else{let R;const{el:U,props:q}=f,{bm:ee,m:ce,parent:pe,root:ve,type:Ce}=d,Je=Gt(f);_t(d,!1),ee&&fs(ee),!Je&&(R=q&&q.onVnodeBeforeMount)&&Ye(R,pe,f),_t(d,!0);{ve.ce&&ve.ce._hasShadowRoot()&&ve.ce._injectChildStyle(Ce,d.parent?d.parent.type:void 0);const qe=d.subTree=Hn(d);j(null,qe,m,k,d,v,b),f.el=qe.el}if(ce&&je(ce,v),!Je&&(R=q&&q.onVnodeMounted)){const qe=f;je(()=>Ye(R,pe,qe),v)}(f.shapeFlag&256||pe&&Gt(pe.vnode)&&pe.vnode.shapeFlag&256)&&d.a&&je(d.a,v),d.isMounted=!0,f=m=k=null}};d.scope.on();const A=d.effect=new yo(I);d.scope.off();const _=d.update=A.run.bind(A),B=d.job=A.runIfDirty.bind(A);B.i=d,B.id=d.uid,A.scheduler=()=>xn(B),_t(d,!0),_()},se=(d,f,m)=>{f.component=d;const k=d.vnode.props;d.vnode=f,d.next=null,Wi(d,f.props,k,m),Gi(d,f.children,m),dt(),Mn(d),ft()},X=(d,f,m,k,v,b,O,I,A=!1)=>{const _=d&&d.children,B=d?d.shapeFlag:0,R=f.children,{patchFlag:U,shapeFlag:q}=f;if(U>0){if(U&128){L(_,R,m,k,v,b,O,I,A);return}else if(U&256){Me(_,R,m,k,v,b,O,I,A);return}}q&8?(B&16&&$e(_,v,b),R!==_&&u(m,R)):B&16?q&16?L(_,R,m,k,v,b,O,I,A):$e(_,v,b,!0):(B&8&&u(m,""),q&16&&N(R,m,k,v,b,O,I,A))},Me=(d,f,m,k,v,b,O,I,A)=>{d=d||Pt,f=f||Pt;const _=d.length,B=f.length,R=Math.min(_,B);let U;for(U=0;U<R;U++){const q=f[U]=A?lt(f[U]):Xe(f[U]);j(d[U],q,m,null,v,b,O,I,A)}_>B?$e(d,v,b,!0,!1,R):N(f,m,k,v,b,O,I,A,R)},L=(d,f,m,k,v,b,O,I,A)=>{let _=0;const B=f.length;let R=d.length-1,U=B-1;for(;_<=R&&_<=U;){const q=d[_],ee=f[_]=A?lt(f[_]):Xe(f[_]);if(Ut(q,ee))j(q,ee,m,null,v,b,O,I,A);else break;_++}for(;_<=R&&_<=U;){const q=d[R],ee=f[U]=A?lt(f[U]):Xe(f[U]);if(Ut(q,ee))j(q,ee,m,null,v,b,O,I,A);else break;R--,U--}if(_>R){if(_<=U){const q=U+1,ee=q<B?f[q].el:k;for(;_<=U;)j(null,f[_]=A?lt(f[_]):Xe(f[_]),m,ee,v,b,O,I,A),_++}}else if(_>U)for(;_<=R;)g(d[_],v,b,!0),_++;else{const q=_,ee=_,ce=new Map;for(_=ee;_<=U;_++){const Le=f[_]=A?lt(f[_]):Xe(f[_]);Le.key!=null&&ce.set(Le.key,_)}let pe,ve=0;const Ce=U-ee+1;let Je=!1,qe=0;const Ht=new Array(Ce);for(_=0;_<Ce;_++)Ht[_]=0;for(_=q;_<=R;_++){const Le=d[_];if(ve>=Ce){g(Le,v,b,!0);continue}let Ge;if(Le.key!=null)Ge=ce.get(Le.key);else for(pe=ee;pe<=U;pe++)if(Ht[pe-ee]===0&&Ut(Le,f[pe])){Ge=pe;break}Ge===void 0?g(Le,v,b,!0):(Ht[Ge-ee]=_+1,Ge>=qe?qe=Ge:Je=!0,j(Le,f[Ge],m,null,v,b,O,I,A),ve++)}const kn=Je?Xi(Ht):Pt;for(pe=kn.length-1,_=Ce-1;_>=0;_--){const Le=ee+_,Ge=f[Le],Tn=f[Le+1],$n=Le+1<B?Tn.el||lr(Tn):k;Ht[_]===0?j(null,Ge,m,$n,v,b,O,I,A):Je&&(pe<0||_!==kn[pe]?y(Ge,m,$n,2):pe--)}}},y=(d,f,m,k,v=null)=>{const{el:b,type:O,transition:I,children:A,shapeFlag:_}=d;if(_&6){y(d.component.subTree,f,m,k);return}if(_&128){d.suspense.move(f,m,k);return}if(_&64){O.move(d,f,m,Ft);return}if(O===ie){n(b,f,m);for(let R=0;R<A.length;R++)y(A[R],f,m,k);n(d.anchor,f,m);return}if(O===hs){Z(d,f,m);return}if(k!==2&&_&1&&I)if(k===0)I.beforeEnter(b),n(b,f,m),je(()=>I.enter(b),v);else{const{leave:R,delayLeave:U,afterLeave:q}=I,ee=()=>{d.ctx.isUnmounted?o(b):n(b,f,m)},ce=()=>{b._isLeaving&&b[hi](!0),R(b,()=>{ee(),q&&q()})};U?U(b,ee,ce):ce()}else n(b,f,m)},g=(d,f,m,k=!1,v=!1)=>{const{type:b,props:O,ref:I,children:A,dynamicChildren:_,shapeFlag:B,patchFlag:R,dirs:U,cacheIndex:q,memo:ee}=d;if(R===-2&&(v=!1),I!=null&&(dt(),qt(I,null,m,d,!0),ft()),q!=null&&(f.renderCache[q]=void 0),B&256){f.ctx.deactivate(d);return}const ce=B&1&&U,pe=!Gt(d);let ve;if(pe&&(ve=O&&O.onVnodeBeforeUnmount)&&Ye(ve,f,d),B&6)E(d.component,m,k);else{if(B&128){d.suspense.unmount(m,k);return}ce&&bt(d,null,f,"beforeUnmount"),B&64?d.type.remove(d,f,m,Ft,k):_&&!_.hasOnce&&(b!==ie||R>0&&R&64)?$e(_,f,m,!1,!0):(b===ie&&R&384||!v&&B&16)&&$e(A,f,m),k&&M(d)}const Ce=ee!=null&&q==null;(pe&&(ve=O&&O.onVnodeUnmounted)||ce||Ce)&&je(()=>{ve&&Ye(ve,f,d),ce&&bt(d,null,f,"unmounted"),Ce&&(d.el=null)},m)},M=d=>{const{type:f,el:m,anchor:k,transition:v}=d;if(f===ie){T(m,k);return}if(f===hs){F(d);return}const b=()=>{o(m),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(d.shapeFlag&1&&v&&!v.persisted){const{leave:O,delayLeave:I}=v,A=()=>O(m,b);I?I(d.el,b,A):A()}else b()},T=(d,f)=>{let m;for(;d!==f;)m=x(d),o(d),d=m;o(f)},E=(d,f,m)=>{const{bum:k,scope:v,job:b,subTree:O,um:I,m:A,a:_}=d;Bn(A),Bn(_),k&&fs(k),v.stop(),b&&(b.flags|=8,g(O,d,f,m)),I&&je(I,f),je(()=>{d.isUnmounted=!0},f)},$e=(d,f,m,k=!1,v=!1,b=0)=>{for(let O=b;O<d.length;O++)g(d[O],f,m,k,v)},ne=d=>{if(d.shapeFlag&6)return ne(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const f=x(d.anchor||d.el),m=f&&f[fi];return m?x(m):f};let Ae=!1;const Cn=(d,f,m)=>{let k;d==null?f._vnode&&(g(f._vnode,null,null,!0),k=f._vnode.component):j(f._vnode||null,d,f,null,null,null,m),f._vnode=d,Ae||(Ae=!0,Mn(k),No(),Ae=!1)},Ft={p:j,um:g,m:y,r:M,mt:Ue,mc:N,pc:X,pbc:fe,n:ne,o:e};return{render:Cn,hydrate:void 0,createApp:ji(Cn)}}function Bs({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 _t({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rr(e,t,s=!1){const n=e.children,o=t.children;if(W(n)&&W(o))for(let r=0;r<n.length;r++){const i=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=lt(o[r]),a.el=i.el),!s&&a.patchFlag!==-2&&rr(i,a)),a.type===Rs&&(a.patchFlag===-1&&(a=o[r]=lt(a)),a.el=i.el),a.type===xt&&!a.el&&(a.el=i.el)}}function Xi(e){const t=e.slice(),s=[0];let n,o,r,i,a;const c=e.length;for(n=0;n<c;n++){const p=e[n];if(p!==0){if(o=s[s.length-1],e[o]<p){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)a=r+i>>1,e[s[a]]<p?r=a+1:i=a;p<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function ir(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ir(t)}function Bn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function lr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?lr(t.subTree):null}const ar=e=>e.__isSuspense;function el(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):ii(e)}const ie=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),xt=Symbol.for("v-cmt"),hs=Symbol.for("v-stc"),Zt=[];let He=null;function w(e=!1){Zt.push(He=e?null:[])}function tl(){Zt.pop(),He=Zt[Zt.length-1]||null}let ts=1;function Kn(e,t=!1){ts+=e,e<0&&He&&t&&(He.hasOnce=!0)}function cr(e){return e.dynamicChildren=ts>0?He||Pt:null,tl(),ts>0&&He&&He.push(e),e}function S(e,t,s,n,o,r){return cr(l(e,t,s,n,o,r,!0))}function ur(e,t,s,n,o){return cr(st(e,t,s,n,o,!0))}function dr(e){return e?e.__v_isVNode===!0:!1}function Ut(e,t){return e.type===t.type&&e.key===t.key}const fr=({key:e})=>e??null,ms=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Ie(e)||Y(e)?{i:Fe,r:e,k:t,f:!!s}:e:null);function l(e,t=null,s=null,n=0,o=null,r=e===ie?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&fr(t),ref:t&&ms(t),scopeId:Fo,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Fe};return a?(wn(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=xe(s)?8:16),ts>0&&!i&&He&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&He.push(c),c}const st=sl;function sl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===Wo)&&(e=xt),dr(e)){const a=Dt(e,t,!0);return s&&wn(a,s),ts>0&&!r&&He&&(a.shapeFlag&6?He[He.indexOf(e)]=a:He.push(a)),a.patchFlag=-2,a}if(hl(e)&&(e=e.__vccOpts),t){t=nl(t);let{class:a,style:c}=t;a&&!xe(a)&&(t.class=G(a)),ae(c)&&(gn(c)&&!W(c)&&(c=Te({},c)),t.style=Es(c))}const i=xe(e)?1:ar(e)?128:pi(e)?64:ae(e)?4:Y(e)?2:0;return l(e,t,s,n,o,i,r,!0)}function nl(e){return e?gn(e)||Xo(e)?Te({},e):e:null}function Dt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:c}=e,p=t?ol(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&fr(p),ref:t&&t.ref?s&&r?W(r)?r.concat(ms(t)):[r,ms(t)]:ms(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ie?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dt(e.ssContent),ssFallback:e.ssFallback&&Dt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&vn(u,c.clone(u)),u}function Et(e=" ",t=0){return st(Rs,null,e,t)}function Be(e,t){const s=st(hs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(w(),ur(xt,null,e)):st(xt,null,e)}function Xe(e){return e==null||typeof e=="boolean"?st(xt):W(e)?st(ie,null,e.slice()):dr(e)?lt(e):st(Rs,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dt(e)}function wn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(W(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),wn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Xo(t)?t._ctx=Fe:o===3&&Fe&&(Fe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Y(t)?(t={default:t,_ctx:Fe},s=32):(t=String(t),n&64?(s=16,t=[Et(t)]):s=8);e.children=t,e.shapeFlag|=s}function ol(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=G([t.class,n.class]));else if(o==="style")t.style=Es([t.style,n.style]);else if(Ss(o)){const r=t[o],i=n[o];i&&r!==i&&!(W(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!Cs(o)&&(t[o]=i)}else o!==""&&(t[o]=n[o])}return t}function Ye(e,t,s,n=null){ot(e,t,7,[s,n])}const rl=qo();let il=0;function ll(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||rl,r={uid:il++,vnode:e,type:n,parent:t,appContext:o,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(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:tr(n,o),emitsOptions:Go(n,o),emit:null,emitted:null,propsDefaults:ue,inheritAttrs:n.inheritAttrs,ctx:ue,data:ue,props:ue,attrs:ue,slots:ue,refs:ue,setupState:ue,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Li.bind(null,r),e.ce&&e.ce(r),r}let Pe=null;const al=()=>Pe||Fe;let ws,tn;{const e=As(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};ws=t("__VUE_INSTANCE_SETTERS__",s=>Pe=s),tn=t("__VUE_SSR_SETTERS__",s=>ss=s)}const ls=e=>{const t=Pe;return ws(e),e.scope.on(),()=>{e.scope.off(),ws(t)}},Wn=()=>{Pe&&Pe.scope.off(),ws(null)};function pr(e){return e.vnode.shapeFlag&4}let ss=!1;function cl(e,t=!1,s=!1){t&&tn(t);const{props:n,children:o}=e.vnode,r=pr(e);Ki(e,n,r,t),qi(e,o,s||t);const i=r?ul(e,t):void 0;return t&&tn(!1),i}function ul(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ei);const{setup:n}=s;if(n){dt();const o=e.setupContext=n.length>1?fl(e):null,r=ls(e),i=is(n,e,0,[e.props,o]),a=fo(i);if(ft(),r(),(a||e.sp)&&!Gt(e)&&Uo(e),a){if(i.then(Wn,Wn),t)return i.then(c=>{zn(e,c)}).catch(c=>{Is(c,e,0)});e.asyncDep=i}else zn(e,i)}else hr(e)}function zn(e,t,s){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)&&(e.setupState=Oo(t)),hr(e)}function hr(e,t,s){const n=e.type;e.render||(e.render=n.render||tt);{const o=ls(e);dt();try{Pi(e)}finally{ft(),o()}}}const dl={get(e,t){return Ee(e,"get",""),e[t]}};function fl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,dl),slots:e.slots,emit:e.emit,expose:t}}function Ds(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Oo(Gr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Yt)return Yt[s](e)},has(t,s){return s in t||s in Yt}})):e.proxy}function pl(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function hl(e){return Y(e)&&"__vccOpts"in e}const Ke=(e,t)=>ti(e,t,ss),ml="3.5.31";/**
60
+ **/function is(e,t,s,n){try{return n?e(...n):e()}catch(o){Is(o,t,s)}}function ot(e,t,s,n){if(Y(e)){const o=is(e,t,s,n);return o&&fo(o)&&o.catch(r=>{Is(r,t,s)}),o}if(z(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ot(e[r],t,s,n));return o}}function Is(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ue;if(t){let a=t.parent;const c=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const d=a.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,c,h)===!1)return}a=a.parent}if(r){dt(),is(r,null,10,[e,c,h]),ft();return}}oi(e,s,o,n,i)}function oi(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Re=[];let Ze=-1;const Mt=[];let mt=null,Et=0;const Ro=Promise.resolve();let vs=null;function Do(e){const t=vs||Ro;return e?t.then(this?e.bind(this):e):t}function ri(e){let t=Ze+1,s=Re.length;for(;t<s;){const n=t+s>>>1,o=Re[n],r=es(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function xn(e){if(!(e.flags&1)){const t=es(e),s=Re[Re.length-1];!s||!(e.flags&2)&&t>=es(s)?Re.push(e):Re.splice(ri(t),0,e),e.flags|=1,jo()}}function jo(){vs||(vs=Ro.then(Lo))}function ii(e){z(e)?Mt.push(...e):mt&&e.id===-1?mt.splice(Et+1,0,e):e.flags&1||(Mt.push(e),e.flags|=1),jo()}function Mn(e,t,s=Ze+1){for(;s<Re.length;s++){const n=Re[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Re.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function No(e){if(Mt.length){const t=[...new Set(Mt)].sort((s,n)=>es(s)-es(n));if(Mt.length=0,mt){mt.push(...t);return}for(mt=t,Et=0;Et<mt.length;Et++){const s=mt[Et];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}mt=null,Et=0}}const es=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Lo(e){try{for(Ze=0;Ze<Re.length;Ze++){const t=Re[Ze];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),is(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ze<Re.length;Ze++){const t=Re[Ze];t&&(t.flags&=-2)}Ze=-1,Re.length=0,No(),vs=null,(Re.length||Mt.length)&&Lo()}}let Fe=null,Fo=null;function ys(e){const t=Fe;return Fe=e,Fo=e&&e.type.__scopeId||null,t}function li(e,t=Fe,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Kn(-1);const r=ys(t);let i;try{i=e(...o)}finally{ys(r),n._d&&Kn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function me(e,t){if(Fe===null)return e;const s=Ds(Fe),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,c=ue]=t[o];r&&(Y(r)&&(r={mounted:r,updated:r}),r.deep&&ct(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:a,modifiers:c}))}return e}function _t(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let c=a.dir[n];c&&(dt(),ot(c,s,8,[e.el,a,e,t]),ft())}}function ai(e,t){if(Pe){let s=Pe.provides;const n=Pe.parent&&Pe.parent.provides;n===s&&(s=Pe.provides=Object.create(n)),s[e]=t}}function ps(e,t,s=!1){const n=al();if(n||Ot){let o=Ot?Ot._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&Y(t)?t.call(n&&n.proxy):t}}const ci=Symbol.for("v-scx"),ui=()=>ps(ci);function Hs(e,t,s){return Vo(e,t,s)}function Vo(e,t,s=ue){const{immediate:n,deep:o,flush:r,once:i}=s,a=ke({},s),c=t&&n||!t&&r!=="post";let h;if(ss){if(r==="sync"){const v=ui();h=v.__watcherHandles||(v.__watcherHandles=[])}else if(!c){const v=()=>{};return v.stop=tt,v.resume=tt,v.pause=tt,v}}const d=Pe;a.call=(v,F,D)=>ot(v,d,F,D);let p=!1;r==="post"?a.scheduler=v=>{je(v,d&&d.suspense)}:r!=="sync"&&(p=!0,a.scheduler=(v,F)=>{F?v():xn(v)}),a.augmentJob=v=>{t&&(v.flags|=4),p&&(v.flags|=2,d&&(v.id=d.uid,v.i=d))};const m=ni(e,t,a);return ss&&(h?h.push(m):c&&m()),m}function di(e,t,s){const n=this.proxy,o=xe(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let r;Y(t)?r=t:(r=t.handler,s=t);const i=ls(this),a=Vo(o,r.bind(n),s);return i(),a}function Ho(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const fi=Symbol("_vte"),pi=e=>e.__isTeleport,hi=Symbol("_leaveCb");function vn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,vn(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 kt(e,t){return Y(e)?ke({name:e.name},t,{setup:e}):e}function Uo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function On(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const bs=new WeakMap;function qt(e,t,s,n,o=!1){if(z(e)){e.forEach((D,B)=>qt(D,t&&(z(t)?t[B]:t),s,n,o));return}if(Gt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&qt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ds(n.component):n.el,i=o?null:r,{i:a,r:c}=e,h=t&&t.r,d=a.refs===ue?a.refs={}:a.refs,p=a.setupState,m=oe(p),v=p===ue?uo:D=>On(d,D)?!1:re(m,D),F=(D,B)=>!(B&&On(d,B));if(h!=null&&h!==c){if(Rn(t),xe(h))d[h]=null,v(h)&&(p[h]=null);else if(Ie(h)){const D=t;F(h,D.k)&&(h.value=null),D.k&&(d[D.k]=null)}}if(Y(c))is(c,a,12,[i,d]);else{const D=xe(c),B=Ie(c);if(D||B){const E=()=>{if(e.f){const H=D?v(c)?p[c]:d[c]:F()||!e.k?c.value:d[e.k];if(o)z(H)&&rn(H,r);else if(z(H))H.includes(r)||H.push(r);else if(D)d[c]=[r],v(c)&&(p[c]=d[c]);else{const Z=[r];F(c,e.k)&&(c.value=Z),e.k&&(d[e.k]=Z)}}else D?(d[c]=i,v(c)&&(p[c]=i)):B&&(F(c,e.k)&&(c.value=i),e.k&&(d[e.k]=i))};if(i){const H=()=>{E(),bs.delete(e)};H.id=-1,bs.set(e,H),je(H,s)}else Rn(e),E()}}}function Rn(e){const t=bs.get(e);t&&(t.flags|=8,bs.delete(e))}As().requestIdleCallback;As().cancelIdleCallback;const Gt=e=>!!e.type.__asyncLoader,Bo=e=>e.type.__isKeepAlive;function mi(e,t){Ko(e,"a",t)}function gi(e,t){Ko(e,"da",t)}function Ko(e,t,s=Pe){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ms(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Bo(o.parent.vnode)&&xi(n,t,s,o),o=o.parent}}function xi(e,t,s,n){const o=Ms(t,e,n,!0);yn(()=>{rn(n[t],o)},s)}function Ms(e,t,s=Pe,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{dt();const a=ls(s),c=ot(t,s,e,i);return a(),ft(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=Pe)=>{(!ss||e==="sp")&&Ms(e,(...n)=>t(...n),s)},vi=ht("bm"),bt=ht("m"),yi=ht("bu"),bi=ht("u"),_i=ht("bum"),yn=ht("um"),wi=ht("sp"),Si=ht("rtg"),Ci=ht("rtc");function Ti(e,t=Pe){Ms("ec",e,t)}const ki="components",Wo=Symbol.for("v-ndc");function $i(e){return xe(e)?Ai(ki,e,!1)||e:e||Wo}function Ai(e,t,s=!0,n=!1){const o=Fe||Pe;if(o){const r=o.type;{const a=pl(r,!1);if(a&&(a===t||a===De(t)||a===ks(De(t))))return r}const i=Dn(o[e]||r[e],t)||Dn(o.appContext[e],t);return!i&&n?r:i}}function Dn(e,t){return e&&(e[t]||e[De(t)]||e[ks(De(t))])}function _e(e,t,s,n){let o;const r=s,i=z(e);if(i||xe(e)){const a=i&&Tt(e);let c=!1,h=!1;a&&(c=!He(e),h=pt(e),e=Ps(e)),o=new Array(e.length);for(let d=0,p=e.length;d<p;d++)o[d]=t(c?h?Rt(ze(e[d])):ze(e[d]):e[d],d,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(ae(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,h=a.length;c<h;c++){const d=a[c];o[c]=t(e[d],d,c,r)}}else o=[];return o}const Zs=e=>e?pr(e)?Ds(e):Zs(e.parent):null,Yt=ke(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=>Zs(e.parent),$root:e=>Zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Jo(e),$forceUpdate:e=>e.f||(e.f=()=>{xn(e.update)}),$nextTick:e=>e.n||(e.n=Do.bind(e.proxy)),$watch:e=>di.bind(e)}),Us=(e,t)=>e!==ue&&!e.__isScriptSetup&&re(e,t),Ei={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:a,appContext:c}=e;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Us(n,t))return i[t]=1,n[t];if(o!==ue&&re(o,t))return i[t]=2,o[t];if(re(r,t))return i[t]=3,r[t];if(s!==ue&&re(s,t))return i[t]=4,s[t];Qs&&(i[t]=0)}}const h=Yt[t];let d,p;if(h)return t==="$attrs"&&Ee(e.attrs,"get",""),h(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==ue&&re(s,t))return i[t]=4,s[t];if(p=c.config.globalProperties,re(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Us(o,t)?(o[t]=s,!0):n!==ue&&re(n,t)?(n[t]=s,!0):re(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:i}},a){let c;return!!(s[a]||e!==ue&&a[0]!=="$"&&re(e,a)||Us(t,a)||re(r,a)||re(n,a)||re(Yt,a)||re(o.config.globalProperties,a)||(c=i.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:re(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function jn(e){return z(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Qs=!0;function Pi(e){const t=Jo(e),s=e.proxy,n=e.ctx;Qs=!1,t.beforeCreate&&Nn(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:c,inject:h,created:d,beforeMount:p,mounted:m,beforeUpdate:v,updated:F,activated:D,deactivated:B,beforeDestroy:E,beforeUnmount:H,destroyed:Z,unmounted:V,render:le,renderTracked:de,renderTriggered:J,errorCaptured:N,serverPrefetch:W,expose:fe,inheritAttrs:te,components:Se,directives:be,filters:Ue}=t;if(h&&Ii(h,n,null),i)for(const se in i){const X=i[se];Y(X)&&(n[se]=X.bind(s))}if(o){const se=o.call(s,s);ae(se)&&(e.data=hn(se))}if(Qs=!0,r)for(const se in r){const X=r[se],Me=Y(X)?X.bind(s,s):Y(X.get)?X.get.bind(s,s):tt,L=!Y(X)&&Y(X.set)?X.set.bind(s):tt,b=Ke({get:Me,set:L});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>b.value,set:x=>b.value=x})}if(a)for(const se in a)zo(a[se],n,s,se);if(c){const se=Y(c)?c.call(s):c;Reflect.ownKeys(se).forEach(X=>{ai(X,se[X])})}d&&Nn(d,e,"c");function ge(se,X){z(X)?X.forEach(Me=>se(Me.bind(s))):X&&se(X.bind(s))}if(ge(vi,p),ge(bt,m),ge(yi,v),ge(bi,F),ge(mi,D),ge(gi,B),ge(Ti,N),ge(Ci,de),ge(Si,J),ge(_i,H),ge(yn,V),ge(wi,W),z(fe))if(fe.length){const se=e.exposed||(e.exposed={});fe.forEach(X=>{Object.defineProperty(se,X,{get:()=>s[X],set:Me=>s[X]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});le&&e.render===tt&&(e.render=le),te!=null&&(e.inheritAttrs=te),Se&&(e.components=Se),be&&(e.directives=be),W&&Uo(e)}function Ii(e,t,s=tt){z(e)&&(e=Xs(e));for(const n in e){const o=e[n];let r;ae(o)?"default"in o?r=ps(o.from||n,o.default,!0):r=ps(o.from||n):r=ps(o),Ie(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function Nn(e,t,s){ot(z(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function zo(e,t,s,n){let o=n.includes(".")?Ho(s,n):()=>s[n];if(xe(e)){const r=t[e];Y(r)&&Hs(o,r)}else if(Y(e))Hs(o,e.bind(s));else if(ae(e))if(z(e))e.forEach(r=>zo(r,t,s,n));else{const r=Y(e.handler)?e.handler.bind(s):t[e.handler];Y(r)&&Hs(o,r,e)}}function Jo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(h=>_s(c,h,i,!0)),_s(c,t,i)),ae(t)&&r.set(t,c),c}function _s(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&_s(e,r,s,!0),o&&o.forEach(i=>_s(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const a=Mi[i]||s&&s[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Mi={data:Ln,props:Fn,emits:Fn,methods:Kt,computed:Kt,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:Kt,directives:Kt,watch:Ri,provide:Ln,inject:Oi};function Ln(e,t){return t?e?function(){return ke(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function Oi(e,t){return Kt(Xs(e),Xs(t))}function Xs(e){if(z(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Oe(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?ke(Object.create(null),e,t):t}function Fn(e,t){return e?z(e)&&z(t)?[...new Set([...e,...t])]:ke(Object.create(null),jn(e),jn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=ke(Object.create(null),e);for(const n in t)s[n]=Oe(e[n],t[n]);return s}function qo(){return{app:null,config:{isNativeTag:uo,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 Di=0;function ji(e,t){return function(n,o=null){Y(n)||(n=ke({},n)),o!=null&&!ae(o)&&(o=null);const r=qo(),i=new WeakSet,a=[];let c=!1;const h=r.app={_uid:Di++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:ml,get config(){return r.config},set config(d){},use(d,...p){return i.has(d)||(d&&Y(d.install)?(i.add(d),d.install(h,...p)):Y(d)&&(i.add(d),d(h,...p))),h},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),h},component(d,p){return p?(r.components[d]=p,h):r.components[d]},directive(d,p){return p?(r.directives[d]=p,h):r.directives[d]},mount(d,p,m){if(!c){const v=h._ceVNode||st(n,o);return v.appContext=r,m===!0?m="svg":m===!1&&(m=void 0),e(v,d,m),c=!0,h._container=d,d.__vue_app__=h,Ds(v.component)}},onUnmount(d){a.push(d)},unmount(){c&&(ot(a,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(d,p){return r.provides[d]=p,h},runWithContext(d){const p=Ot;Ot=h;try{return d()}finally{Ot=p}}};return h}}let Ot=null;const Ni=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${De(t)}Modifiers`]||e[`${yt(t)}Modifiers`];function Li(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ue;let o=s;const r=t.startsWith("update:"),i=r&&Ni(n,t.slice(7));i&&(i.trim&&(o=s.map(d=>xe(d)?d.trim():d)),i.number&&(o=s.map($s)));let a,c=n[a=js(t)]||n[a=js(De(t))];!c&&r&&(c=n[a=js(yt(t))]),c&&ot(c,e,6,o);const h=n[a+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ot(h,e,6,o)}}const Fi=new WeakMap;function Go(e,t,s=!1){const n=s?Fi:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!Y(e)){const c=h=>{const d=Go(h,t,!0);d&&(a=!0,ke(i,d))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(ae(e)&&n.set(e,null),null):(z(r)?r.forEach(c=>i[c]=null):ke(i,r),ae(e)&&n.set(e,i),i)}function Os(e,t){return!e||!Ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,yt(t))||re(e,t))}function Vn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:c,render:h,renderCache:d,props:p,data:m,setupState:v,ctx:F,inheritAttrs:D}=e,B=ys(e);let E,H;try{if(s.shapeFlag&4){const V=o||n,le=V;E=Xe(h.call(le,V,d,p,v,m,F)),H=a}else{const V=t;E=Xe(V.length>1?V(p,{attrs:a,slots:i,emit:c}):V(p,null)),H=t.props?a:Vi(a)}}catch(V){Zt.length=0,Is(V,e,1),E=st(vt)}let Z=E;if(H&&D!==!1){const V=Object.keys(H),{shapeFlag:le}=Z;V.length&&le&7&&(r&&V.some(Cs)&&(H=Hi(H,r)),Z=Dt(Z,H,!1,!0))}return s.dirs&&(Z=Dt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(s.dirs):s.dirs),s.transition&&vn(Z,s.transition),E=Z,ys(B),E}const Vi=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ss(s))&&((t||(t={}))[s]=e[s]);return t},Hi=(e,t)=>{const s={};for(const n in e)(!Cs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ui(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:a,patchFlag:c}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Hn(n,i,h):!!i;if(c&8){const d=t.dynamicProps;for(let p=0;p<d.length;p++){const m=d[p];if(Yo(i,n,m)&&!Os(h,m))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===i?!1:n?i?Hn(n,i,h):!0:!!i;return!1}function Hn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(Yo(t,e,r)&&!Os(s,r))return!0}return!1}function Yo(e,t,s){const n=e[s],o=t[s];return s==="style"&&ae(n)&&ae(o)?!Lt(n,o):n!==o}function Bi({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Zo={},Qo=()=>Object.create(Zo),Xo=e=>Object.getPrototypeOf(e)===Zo;function Ki(e,t,s,n=!1){const o={},r=Qo();e.propsDefaults=Object.create(null),er(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:qr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Wi(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=oe(o),[c]=e.propsOptions;let h=!1;if((n||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let m=d[p];if(Os(e.emitsOptions,m))continue;const v=t[m];if(c)if(re(r,m))v!==r[m]&&(r[m]=v,h=!0);else{const F=De(m);o[F]=en(c,a,F,v,e,!1)}else v!==r[m]&&(r[m]=v,h=!0)}}}else{er(e,t,o,r)&&(h=!0);let d;for(const p in a)(!t||!re(t,p)&&((d=yt(p))===p||!re(t,d)))&&(c?s&&(s[p]!==void 0||s[d]!==void 0)&&(o[p]=en(c,a,p,void 0,e,!0)):delete o[p]);if(r!==a)for(const p in r)(!t||!re(t,p))&&(delete r[p],h=!0)}h&&at(e.attrs,"set","")}function er(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(Wt(c))continue;const h=t[c];let d;o&&re(o,d=De(c))?!r||!r.includes(d)?s[d]=h:(a||(a={}))[d]=h:Os(e.emitsOptions,c)||(!(c in n)||h!==n[c])&&(n[c]=h,i=!0)}if(r){const c=oe(s),h=a||ue;for(let d=0;d<r.length;d++){const p=r[d];s[p]=en(o,c,p,h[p],e,!re(h,p))}}return i}function en(e,t,s,n,o,r){const i=e[s];if(i!=null){const a=re(i,"default");if(a&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&Y(c)){const{propsDefaults:h}=o;if(s in h)n=h[s];else{const d=ls(o);n=h[s]=c.call(null,t),d()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!a?n=!1:i[1]&&(n===""||n===yt(s))&&(n=!0))}return n}const zi=new WeakMap;function tr(e,t,s=!1){const n=s?zi:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},a=[];let c=!1;if(!Y(e)){const d=p=>{c=!0;const[m,v]=tr(p,t,!0);ke(i,m),v&&a.push(...v)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!c)return ae(e)&&n.set(e,Pt),Pt;if(z(r))for(let d=0;d<r.length;d++){const p=De(r[d]);Un(p)&&(i[p]=ue)}else if(r)for(const d in r){const p=De(d);if(Un(p)){const m=r[d],v=i[p]=z(m)||Y(m)?{type:m}:ke({},m),F=v.type;let D=!1,B=!0;if(z(F))for(let E=0;E<F.length;++E){const H=F[E],Z=Y(H)&&H.name;if(Z==="Boolean"){D=!0;break}else Z==="String"&&(B=!1)}else D=Y(F)&&F.name==="Boolean";v[0]=D,v[1]=B,(D||re(v,"default"))&&a.push(p)}}const h=[i,a];return ae(e)&&n.set(e,h),h}function Un(e){return e[0]!=="$"&&!Wt(e)}const bn=e=>e==="_"||e==="_ctx"||e==="$stable",_n=e=>z(e)?e.map(Xe):[Xe(e)],Ji=(e,t,s)=>{if(t._n)return t;const n=li((...o)=>_n(t(...o)),s);return n._c=!1,n},sr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(bn(o))continue;const r=e[o];if(Y(r))t[o]=Ji(o,r,n);else if(r!=null){const i=_n(r);t[o]=()=>i}}},nr=(e,t)=>{const s=_n(t);e.slots.default=()=>s},or=(e,t,s)=>{for(const n in t)(s||!bn(n))&&(e[n]=t[n])},qi=(e,t,s)=>{const n=e.slots=Qo();if(e.vnode.shapeFlag&32){const o=t._;o?(or(n,t,s),s&&mo(n,"_",o,!0)):sr(t,n)}else t&&nr(e,t)},Gi=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=ue;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:or(o,t,s):(r=!t.$stable,sr(t,o)),i=t}else t&&(nr(e,t),i={default:1});if(r)for(const a in o)!bn(a)&&i[a]==null&&delete o[a]},je=el;function Yi(e){return Zi(e)}function Zi(e,t){const s=As();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:a,createComment:c,setText:h,setElementText:d,parentNode:p,nextSibling:m,setScopeId:v=tt,insertStaticContent:F}=e,D=(u,f,g,T=null,y=null,_=null,O=void 0,I=null,A=!!f.dynamicChildren)=>{if(u===f)return;u&&!Ut(u,f)&&(T=ne(u),x(u,y,_,!0),u=null),f.patchFlag===-2&&(A=!1,f.dynamicChildren=null);const{type:w,ref:K,shapeFlag:R}=f;switch(w){case Rs:B(u,f,g,T);break;case vt:E(u,f,g,T);break;case hs:u==null&&H(f,g,T,O);break;case ie:Se(u,f,g,T,y,_,O,I,A);break;default:R&1?le(u,f,g,T,y,_,O,I,A):R&6?be(u,f,g,T,y,_,O,I,A):(R&64||R&128)&&w.process(u,f,g,T,y,_,O,I,A,Ft)}K!=null&&y?qt(K,u&&u.ref,_,f||u,!f):K==null&&u&&u.ref!=null&&qt(u.ref,null,_,u,!0)},B=(u,f,g,T)=>{if(u==null)n(f.el=a(f.children),g,T);else{const y=f.el=u.el;f.children!==u.children&&h(y,f.children)}},E=(u,f,g,T)=>{u==null?n(f.el=c(f.children||""),g,T):f.el=u.el},H=(u,f,g,T)=>{[u.el,u.anchor]=F(u.children,f,g,T,u.el,u.anchor)},Z=({el:u,anchor:f},g,T)=>{let y;for(;u&&u!==f;)y=m(u),n(u,g,T),u=y;n(f,g,T)},V=({el:u,anchor:f})=>{let g;for(;u&&u!==f;)g=m(u),o(u),u=g;o(f)},le=(u,f,g,T,y,_,O,I,A)=>{if(f.type==="svg"?O="svg":f.type==="math"&&(O="mathml"),u==null)de(f,g,T,y,_,O,I,A);else{const w=u.el&&u.el._isVueCE?u.el:null;try{w&&w._beginPatch(),W(u,f,y,_,O,I,A)}finally{w&&w._endPatch()}}},de=(u,f,g,T,y,_,O,I)=>{let A,w;const{props:K,shapeFlag:R,transition:U,dirs:q}=u;if(A=u.el=i(u.type,_,K&&K.is,K),R&8?d(A,u.children):R&16&&N(u.children,A,null,T,y,Bs(u,_),O,I),q&&_t(u,null,T,"created"),J(A,u,u.scopeId,O,T),K){for(const ce in K)ce!=="value"&&!Wt(ce)&&r(A,ce,null,K[ce],_,T);"value"in K&&r(A,"value",null,K.value,_),(w=K.onVnodeBeforeMount)&&Ye(w,T,u)}q&&_t(u,null,T,"beforeMount");const ee=Qi(y,U);ee&&U.beforeEnter(A),n(A,f,g),((w=K&&K.onVnodeMounted)||ee||q)&&je(()=>{try{w&&Ye(w,T,u),ee&&U.enter(A),q&&_t(u,null,T,"mounted")}finally{}},y)},J=(u,f,g,T,y)=>{if(g&&v(u,g),T)for(let _=0;_<T.length;_++)v(u,T[_]);if(y){let _=y.subTree;if(f===_||ar(_.type)&&(_.ssContent===f||_.ssFallback===f)){const O=y.vnode;J(u,O,O.scopeId,O.slotScopeIds,y.parent)}}},N=(u,f,g,T,y,_,O,I,A=0)=>{for(let w=A;w<u.length;w++){const K=u[w]=I?lt(u[w]):Xe(u[w]);D(null,K,f,g,T,y,_,O,I)}},W=(u,f,g,T,y,_,O)=>{const I=f.el=u.el;let{patchFlag:A,dynamicChildren:w,dirs:K}=f;A|=u.patchFlag&16;const R=u.props||ue,U=f.props||ue;let q;if(g&&wt(g,!1),(q=U.onVnodeBeforeUpdate)&&Ye(q,g,f,u),K&&_t(f,u,g,"beforeUpdate"),g&&wt(g,!0),(R.innerHTML&&U.innerHTML==null||R.textContent&&U.textContent==null)&&d(I,""),w?fe(u.dynamicChildren,w,I,g,T,Bs(f,y),_):O||X(u,f,I,null,g,T,Bs(f,y),_,!1),A>0){if(A&16)te(I,R,U,g,y);else if(A&2&&R.class!==U.class&&r(I,"class",null,U.class,y),A&4&&r(I,"style",R.style,U.style,y),A&8){const ee=f.dynamicProps;for(let ce=0;ce<ee.length;ce++){const pe=ee[ce],ve=R[pe],Te=U[pe];(Te!==ve||pe==="value")&&r(I,pe,ve,Te,y,g)}}A&1&&u.children!==f.children&&d(I,f.children)}else!O&&w==null&&te(I,R,U,g,y);((q=U.onVnodeUpdated)||K)&&je(()=>{q&&Ye(q,g,f,u),K&&_t(f,u,g,"updated")},T)},fe=(u,f,g,T,y,_,O)=>{for(let I=0;I<f.length;I++){const A=u[I],w=f[I],K=A.el&&(A.type===ie||!Ut(A,w)||A.shapeFlag&198)?p(A.el):g;D(A,w,K,null,T,y,_,O,!0)}},te=(u,f,g,T,y)=>{if(f!==g){if(f!==ue)for(const _ in f)!Wt(_)&&!(_ in g)&&r(u,_,f[_],null,y,T);for(const _ in g){if(Wt(_))continue;const O=g[_],I=f[_];O!==I&&_!=="value"&&r(u,_,I,O,y,T)}"value"in g&&r(u,"value",f.value,g.value,y)}},Se=(u,f,g,T,y,_,O,I,A)=>{const w=f.el=u?u.el:a(""),K=f.anchor=u?u.anchor:a("");let{patchFlag:R,dynamicChildren:U,slotScopeIds:q}=f;q&&(I=I?I.concat(q):q),u==null?(n(w,g,T),n(K,g,T),N(f.children||[],g,K,y,_,O,I,A)):R>0&&R&64&&U&&u.dynamicChildren&&u.dynamicChildren.length===U.length?(fe(u.dynamicChildren,U,g,y,_,O,I),(f.key!=null||y&&f===y.subTree)&&rr(u,f,!0)):X(u,f,g,K,y,_,O,I,A)},be=(u,f,g,T,y,_,O,I,A)=>{f.slotScopeIds=I,u==null?f.shapeFlag&512?y.ctx.activate(f,g,T,O,A):Ue(f,g,T,y,_,O,A):$t(u,f,A)},Ue=(u,f,g,T,y,_,O)=>{const I=u.component=ll(u,T,y);if(Bo(u)&&(I.ctx.renderer=Ft),cl(I,!1,O),I.asyncDep){if(y&&y.registerDep(I,ge,O),!u.el){const A=I.subTree=st(vt);E(null,A,f,g),u.placeholder=A.el}}else ge(I,u,f,g,y,_,O)},$t=(u,f,g)=>{const T=f.component=u.component;if(Ui(u,f,g))if(T.asyncDep&&!T.asyncResolved){se(T,f,g);return}else T.next=f,T.update();else f.el=u.el,T.vnode=f},ge=(u,f,g,T,y,_,O)=>{const I=()=>{if(u.isMounted){let{next:R,bu:U,u:q,parent:ee,vnode:ce}=u;{const qe=ir(u);if(qe){R&&(R.el=ce.el,se(u,R,O)),qe.asyncDep.then(()=>{je(()=>{u.isUnmounted||w()},y)});return}}let pe=R,ve;wt(u,!1),R?(R.el=ce.el,se(u,R,O)):R=ce,U&&fs(U),(ve=R.props&&R.props.onVnodeBeforeUpdate)&&Ye(ve,ee,R,ce),wt(u,!0);const Te=Vn(u),Je=u.subTree;u.subTree=Te,D(Je,Te,p(Je.el),ne(Je),u,y,_),R.el=Te.el,pe===null&&Bi(u,Te.el),q&&je(q,y),(ve=R.props&&R.props.onVnodeUpdated)&&je(()=>Ye(ve,ee,R,ce),y)}else{let R;const{el:U,props:q}=f,{bm:ee,m:ce,parent:pe,root:ve,type:Te}=u,Je=Gt(f);wt(u,!1),ee&&fs(ee),!Je&&(R=q&&q.onVnodeBeforeMount)&&Ye(R,pe,f),wt(u,!0);{ve.ce&&ve.ce._hasShadowRoot()&&ve.ce._injectChildStyle(Te,u.parent?u.parent.type:void 0);const qe=u.subTree=Vn(u);D(null,qe,g,T,u,y,_),f.el=qe.el}if(ce&&je(ce,y),!Je&&(R=q&&q.onVnodeMounted)){const qe=f;je(()=>Ye(R,pe,qe),y)}(f.shapeFlag&256||pe&&Gt(pe.vnode)&&pe.vnode.shapeFlag&256)&&u.a&&je(u.a,y),u.isMounted=!0,f=g=T=null}};u.scope.on();const A=u.effect=new yo(I);u.scope.off();const w=u.update=A.run.bind(A),K=u.job=A.runIfDirty.bind(A);K.i=u,K.id=u.uid,A.scheduler=()=>xn(K),wt(u,!0),w()},se=(u,f,g)=>{f.component=u;const T=u.vnode.props;u.vnode=f,u.next=null,Wi(u,f.props,T,g),Gi(u,f.children,g),dt(),Mn(u),ft()},X=(u,f,g,T,y,_,O,I,A=!1)=>{const w=u&&u.children,K=u?u.shapeFlag:0,R=f.children,{patchFlag:U,shapeFlag:q}=f;if(U>0){if(U&128){L(w,R,g,T,y,_,O,I,A);return}else if(U&256){Me(w,R,g,T,y,_,O,I,A);return}}q&8?(K&16&&$e(w,y,_),R!==w&&d(g,R)):K&16?q&16?L(w,R,g,T,y,_,O,I,A):$e(w,y,_,!0):(K&8&&d(g,""),q&16&&N(R,g,T,y,_,O,I,A))},Me=(u,f,g,T,y,_,O,I,A)=>{u=u||Pt,f=f||Pt;const w=u.length,K=f.length,R=Math.min(w,K);let U;for(U=0;U<R;U++){const q=f[U]=A?lt(f[U]):Xe(f[U]);D(u[U],q,g,null,y,_,O,I,A)}w>K?$e(u,y,_,!0,!1,R):N(f,g,T,y,_,O,I,A,R)},L=(u,f,g,T,y,_,O,I,A)=>{let w=0;const K=f.length;let R=u.length-1,U=K-1;for(;w<=R&&w<=U;){const q=u[w],ee=f[w]=A?lt(f[w]):Xe(f[w]);if(Ut(q,ee))D(q,ee,g,null,y,_,O,I,A);else break;w++}for(;w<=R&&w<=U;){const q=u[R],ee=f[U]=A?lt(f[U]):Xe(f[U]);if(Ut(q,ee))D(q,ee,g,null,y,_,O,I,A);else break;R--,U--}if(w>R){if(w<=U){const q=U+1,ee=q<K?f[q].el:T;for(;w<=U;)D(null,f[w]=A?lt(f[w]):Xe(f[w]),g,ee,y,_,O,I,A),w++}}else if(w>U)for(;w<=R;)x(u[w],y,_,!0),w++;else{const q=w,ee=w,ce=new Map;for(w=ee;w<=U;w++){const Le=f[w]=A?lt(f[w]):Xe(f[w]);Le.key!=null&&ce.set(Le.key,w)}let pe,ve=0;const Te=U-ee+1;let Je=!1,qe=0;const Vt=new Array(Te);for(w=0;w<Te;w++)Vt[w]=0;for(w=q;w<=R;w++){const Le=u[w];if(ve>=Te){x(Le,y,_,!0);continue}let Ge;if(Le.key!=null)Ge=ce.get(Le.key);else for(pe=ee;pe<=U;pe++)if(Vt[pe-ee]===0&&Ut(Le,f[pe])){Ge=pe;break}Ge===void 0?x(Le,y,_,!0):(Vt[Ge-ee]=w+1,Ge>=qe?qe=Ge:Je=!0,D(Le,f[Ge],g,null,y,_,O,I,A),ve++)}const Tn=Je?Xi(Vt):Pt;for(pe=Tn.length-1,w=Te-1;w>=0;w--){const Le=ee+w,Ge=f[Le],kn=f[Le+1],$n=Le+1<K?kn.el||lr(kn):T;Vt[w]===0?D(null,Ge,g,$n,y,_,O,I,A):Je&&(pe<0||w!==Tn[pe]?b(Ge,g,$n,2):pe--)}}},b=(u,f,g,T,y=null)=>{const{el:_,type:O,transition:I,children:A,shapeFlag:w}=u;if(w&6){b(u.component.subTree,f,g,T);return}if(w&128){u.suspense.move(f,g,T);return}if(w&64){O.move(u,f,g,Ft);return}if(O===ie){n(_,f,g);for(let R=0;R<A.length;R++)b(A[R],f,g,T);n(u.anchor,f,g);return}if(O===hs){Z(u,f,g);return}if(T!==2&&w&1&&I)if(T===0)I.beforeEnter(_),n(_,f,g),je(()=>I.enter(_),y);else{const{leave:R,delayLeave:U,afterLeave:q}=I,ee=()=>{u.ctx.isUnmounted?o(_):n(_,f,g)},ce=()=>{_._isLeaving&&_[hi](!0),R(_,()=>{ee(),q&&q()})};U?U(_,ee,ce):ce()}else n(_,f,g)},x=(u,f,g,T=!1,y=!1)=>{const{type:_,props:O,ref:I,children:A,dynamicChildren:w,shapeFlag:K,patchFlag:R,dirs:U,cacheIndex:q,memo:ee}=u;if(R===-2&&(y=!1),I!=null&&(dt(),qt(I,null,g,u,!0),ft()),q!=null&&(f.renderCache[q]=void 0),K&256){f.ctx.deactivate(u);return}const ce=K&1&&U,pe=!Gt(u);let ve;if(pe&&(ve=O&&O.onVnodeBeforeUnmount)&&Ye(ve,f,u),K&6)P(u.component,g,T);else{if(K&128){u.suspense.unmount(g,T);return}ce&&_t(u,null,f,"beforeUnmount"),K&64?u.type.remove(u,f,g,Ft,T):w&&!w.hasOnce&&(_!==ie||R>0&&R&64)?$e(w,f,g,!1,!0):(_===ie&&R&384||!y&&K&16)&&$e(A,f,g),T&&M(u)}const Te=ee!=null&&q==null;(pe&&(ve=O&&O.onVnodeUnmounted)||ce||Te)&&je(()=>{ve&&Ye(ve,f,u),ce&&_t(u,null,f,"unmounted"),Te&&(u.el=null)},g)},M=u=>{const{type:f,el:g,anchor:T,transition:y}=u;if(f===ie){k(g,T);return}if(f===hs){V(u);return}const _=()=>{o(g),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(u.shapeFlag&1&&y&&!y.persisted){const{leave:O,delayLeave:I}=y,A=()=>O(g,_);I?I(u.el,_,A):A()}else _()},k=(u,f)=>{let g;for(;u!==f;)g=m(u),o(u),u=g;o(f)},P=(u,f,g)=>{const{bum:T,scope:y,job:_,subTree:O,um:I,m:A,a:w}=u;Bn(A),Bn(w),T&&fs(T),y.stop(),_&&(_.flags|=8,x(O,u,f,g)),I&&je(I,f),je(()=>{u.isUnmounted=!0},f)},$e=(u,f,g,T=!1,y=!1,_=0)=>{for(let O=_;O<u.length;O++)x(u[O],f,g,T,y)},ne=u=>{if(u.shapeFlag&6)return ne(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=m(u.anchor||u.el),g=f&&f[fi];return g?m(g):f};let Ae=!1;const Cn=(u,f,g)=>{let T;u==null?f._vnode&&(x(f._vnode,null,null,!0),T=f._vnode.component):D(f._vnode||null,u,f,null,null,null,g),f._vnode=u,Ae||(Ae=!0,Mn(T),No(),Ae=!1)},Ft={p:D,um:x,m:b,r:M,mt:Ue,mc:N,pc:X,pbc:fe,n:ne,o:e};return{render:Cn,hydrate:void 0,createApp:ji(Cn)}}function Bs({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 wt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rr(e,t,s=!1){const n=e.children,o=t.children;if(z(n)&&z(o))for(let r=0;r<n.length;r++){const i=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=lt(o[r]),a.el=i.el),!s&&a.patchFlag!==-2&&rr(i,a)),a.type===Rs&&(a.patchFlag===-1&&(a=o[r]=lt(a)),a.el=i.el),a.type===vt&&!a.el&&(a.el=i.el)}}function Xi(e){const t=e.slice(),s=[0];let n,o,r,i,a;const c=e.length;for(n=0;n<c;n++){const h=e[n];if(h!==0){if(o=s[s.length-1],e[o]<h){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)a=r+i>>1,e[s[a]]<h?r=a+1:i=a;h<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function ir(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ir(t)}function Bn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function lr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?lr(t.subTree):null}const ar=e=>e.__isSuspense;function el(e,t){t&&t.pendingBranch?z(e)?t.effects.push(...e):t.effects.push(e):ii(e)}const ie=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),hs=Symbol.for("v-stc"),Zt=[];let Ve=null;function S(e=!1){Zt.push(Ve=e?null:[])}function tl(){Zt.pop(),Ve=Zt[Zt.length-1]||null}let ts=1;function Kn(e,t=!1){ts+=e,e<0&&Ve&&t&&(Ve.hasOnce=!0)}function cr(e){return e.dynamicChildren=ts>0?Ve||Pt:null,tl(),ts>0&&Ve&&Ve.push(e),e}function C(e,t,s,n,o,r){return cr(l(e,t,s,n,o,r,!0))}function ur(e,t,s,n,o){return cr(st(e,t,s,n,o,!0))}function dr(e){return e?e.__v_isVNode===!0:!1}function Ut(e,t){return e.type===t.type&&e.key===t.key}const fr=({key:e})=>e??null,ms=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Ie(e)||Y(e)?{i:Fe,r:e,k:t,f:!!s}:e:null);function l(e,t=null,s=null,n=0,o=null,r=e===ie?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&fr(t),ref:t&&ms(t),scopeId:Fo,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Fe};return a?(wn(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=xe(s)?8:16),ts>0&&!i&&Ve&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Ve.push(c),c}const st=sl;function sl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===Wo)&&(e=vt),dr(e)){const a=Dt(e,t,!0);return s&&wn(a,s),ts>0&&!r&&Ve&&(a.shapeFlag&6?Ve[Ve.indexOf(e)]=a:Ve.push(a)),a.patchFlag=-2,a}if(hl(e)&&(e=e.__vccOpts),t){t=nl(t);let{class:a,style:c}=t;a&&!xe(a)&&(t.class=G(a)),ae(c)&&(gn(c)&&!z(c)&&(c=ke({},c)),t.style=Es(c))}const i=xe(e)?1:ar(e)?128:pi(e)?64:ae(e)?4:Y(e)?2:0;return l(e,t,s,n,o,i,r,!0)}function nl(e){return e?gn(e)||Xo(e)?ke({},e):e:null}function Dt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:c}=e,h=t?ol(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&fr(h),ref:t&&t.ref?s&&r?z(r)?r.concat(ms(t)):[r,ms(t)]:ms(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ie?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dt(e.ssContent),ssFallback:e.ssFallback&&Dt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&vn(d,c.clone(d)),d}function gt(e=" ",t=0){return st(Rs,null,e,t)}function Be(e,t){const s=st(hs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(S(),ur(vt,null,e)):st(vt,null,e)}function Xe(e){return e==null||typeof e=="boolean"?st(vt):z(e)?st(ie,null,e.slice()):dr(e)?lt(e):st(Rs,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dt(e)}function wn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(z(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),wn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Xo(t)?t._ctx=Fe:o===3&&Fe&&(Fe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Y(t)?(t={default:t,_ctx:Fe},s=32):(t=String(t),n&64?(s=16,t=[gt(t)]):s=8);e.children=t,e.shapeFlag|=s}function ol(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=G([t.class,n.class]));else if(o==="style")t.style=Es([t.style,n.style]);else if(Ss(o)){const r=t[o],i=n[o];i&&r!==i&&!(z(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!Cs(o)&&(t[o]=i)}else o!==""&&(t[o]=n[o])}return t}function Ye(e,t,s,n=null){ot(e,t,7,[s,n])}const rl=qo();let il=0;function ll(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||rl,r={uid:il++,vnode:e,type:n,parent:t,appContext:o,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(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:tr(n,o),emitsOptions:Go(n,o),emit:null,emitted:null,propsDefaults:ue,inheritAttrs:n.inheritAttrs,ctx:ue,data:ue,props:ue,attrs:ue,slots:ue,refs:ue,setupState:ue,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Li.bind(null,r),e.ce&&e.ce(r),r}let Pe=null;const al=()=>Pe||Fe;let ws,tn;{const e=As(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};ws=t("__VUE_INSTANCE_SETTERS__",s=>Pe=s),tn=t("__VUE_SSR_SETTERS__",s=>ss=s)}const ls=e=>{const t=Pe;return ws(e),e.scope.on(),()=>{e.scope.off(),ws(t)}},Wn=()=>{Pe&&Pe.scope.off(),ws(null)};function pr(e){return e.vnode.shapeFlag&4}let ss=!1;function cl(e,t=!1,s=!1){t&&tn(t);const{props:n,children:o}=e.vnode,r=pr(e);Ki(e,n,r,t),qi(e,o,s||t);const i=r?ul(e,t):void 0;return t&&tn(!1),i}function ul(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ei);const{setup:n}=s;if(n){dt();const o=e.setupContext=n.length>1?fl(e):null,r=ls(e),i=is(n,e,0,[e.props,o]),a=fo(i);if(ft(),r(),(a||e.sp)&&!Gt(e)&&Uo(e),a){if(i.then(Wn,Wn),t)return i.then(c=>{zn(e,c)}).catch(c=>{Is(c,e,0)});e.asyncDep=i}else zn(e,i)}else hr(e)}function zn(e,t,s){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)&&(e.setupState=Oo(t)),hr(e)}function hr(e,t,s){const n=e.type;e.render||(e.render=n.render||tt);{const o=ls(e);dt();try{Pi(e)}finally{ft(),o()}}}const dl={get(e,t){return Ee(e,"get",""),e[t]}};function fl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,dl),slots:e.slots,emit:e.emit,expose:t}}function Ds(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Oo(Gr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Yt)return Yt[s](e)},has(t,s){return s in t||s in Yt}})):e.proxy}function pl(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function hl(e){return Y(e)&&"__vccOpts"in e}const Ke=(e,t)=>ti(e,t,ss),ml="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 sn;const Jn=typeof window<"u"&&window.trustedTypes;if(Jn)try{sn=Jn.createPolicy("vue",{createHTML:e=>e})}catch{}const mr=sn?e=>sn.createHTML(e):e=>e,gl="http://www.w3.org/2000/svg",xl="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,qn=it&&it.createElement("template"),vl={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 o=t==="svg"?it.createElementNS(gl,e):t==="mathml"?it.createElementNS(xl,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},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,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{qn.innerHTML=mr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=qn.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},yl=Symbol("_vtc");function bl(e,t,s){const n=e[yl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Gn=Symbol("_vod"),_l=Symbol("_vsh"),wl=Symbol(""),Sl=/(?:^|;)\s*display\s*:/;function Cl(e,t,s){const n=e.style,o=xe(s);let r=!1;if(s&&!o){if(t)if(xe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();s[a]==null&&gs(n,a,"")}else for(const i in t)s[i]==null&&gs(n,i,"");for(const i in s)i==="display"&&(r=!0),gs(n,i,s[i])}else if(o){if(t!==s){const i=n[wl];i&&(s+=";"+i),n.cssText=s,r=Sl.test(s)}}else t&&e.removeAttribute("style");Gn in e&&(e[Gn]=r?n.display:"",e[_l]&&(n.display="none"))}const Yn=/\s*!important$/;function gs(e,t,s){if(W(s))s.forEach(n=>gs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=kl(e,t);Yn.test(s)?e.setProperty(vt(n),s.replace(Yn,""),"important"):e[n]=s}}const Zn=["Webkit","Moz","ms"],Ks={};function kl(e,t){const s=Ks[t];if(s)return s;let n=De(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=Ts(n);for(let o=0;o<Zn.length;o++){const r=Zn[o]+n;if(r in e)return Ks[t]=r}return t}const Qn="http://www.w3.org/1999/xlink";function Xn(e,t,s,n,o,r=Tr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Qn,t.slice(6,t.length)):e.setAttributeNS(Qn,t,s):s==null||r&&!go(s)?e.removeAttribute(t):e.setAttribute(t,r?"":nt(s)?String(s):s)}function eo(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?mr(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=go(s):s==null&&a==="string"?(s="",i=!0):a==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function gt(e,t,s,n){e.addEventListener(t,s,n)}function Tl(e,t,s,n){e.removeEventListener(t,s,n)}const to=Symbol("_vei");function $l(e,t,s,n,o=null){const r=e[to]||(e[to]={}),i=r[t];if(n&&i)i.value=n;else{const[a,c]=Al(t);if(n){const p=r[t]=Il(n,o);gt(e,a,p,c)}else i&&(Tl(e,a,i,c),r[t]=void 0)}}const so=/(?:Once|Passive|Capture)$/;function Al(e){let t;if(so.test(e)){t={};let n;for(;n=e.match(so);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vt(e.slice(2)),t]}let Ws=0;const El=Promise.resolve(),Pl=()=>Ws||(El.then(()=>Ws=0),Ws=Date.now());function Il(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ot(Ml(n,s.value),t,5,[n])};return s.value=e,s.attached=Pl(),s}function Ml(e,t){if(W(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const no=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ol=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?bl(e,n,i):t==="style"?Cl(e,s,n):Ss(t)?Cs(t)||$l(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rl(e,t,n,i))?(eo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xn(e,t,n,i,r,t!=="value")):e._isVueCE&&(Dl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!xe(n)))?eo(e,De(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Xn(e,t,n,i))};function Rl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&no(t)&&Y(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return no(t)&&xe(s)?!1:t in e}function Dl(e,t){const s=e._def.props;if(!s)return!1;const n=De(t);return Array.isArray(s)?s.some(o=>De(o)===n):Object.keys(s).some(o=>De(o)===n)}const jt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?s=>fs(t,s):t};function jl(e){e.target.composing=!0}function oo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign");function ro(e,t,s){return t&&(e=e.trim()),s&&(e=$s(e)),e}const ke={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ut]=jt(o);const r=n||o.props&&o.props.type==="number";gt(e,t?"change":"input",i=>{i.target.composing||e[ut](ro(e.value,s,r))}),(s||r)&&gt(e,"change",()=>{e.value=ro(e.value,s,r)}),t||(gt(e,"compositionstart",jl),gt(e,"compositionend",oo),gt(e,"change",oo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ut]=jt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?$s(e.value):e.value,c=t??"";if(a===c)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},io={deep:!0,created(e,t,s){e[ut]=jt(s),gt(e,"change",()=>{const n=e._modelValue,o=os(e),r=e.checked,i=e[ut];if(W(n)){const a=an(n,o),c=a!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const p=[...n];p.splice(a,1),i(p)}}else if(Nt(n)){const a=new Set(n);r?a.add(o):a.delete(o),i(a)}else i(gr(e,r))})},mounted:lo,beforeUpdate(e,t,s){e[ut]=jt(s),lo(e,t,s)}};function lo(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(W(t))o=an(t,n.props.value)>-1;else if(Nt(t))o=t.has(n.props.value);else{if(t===s)return;o=Lt(t,gr(e,!0))}e.checked!==o&&(e.checked=o)}const ns={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Nt(t);gt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?$s(os(i)):os(i));e[ut](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Do(()=>{e._assigning=!1})}),e[ut]=jt(n)},mounted(e,{value:t}){ao(e,t)},beforeUpdate(e,t,s){e[ut]=jt(s)},updated(e,{value:t}){e._assigning||ao(e,t)}};function ao(e,t){const s=e.multiple,n=W(t);if(!(s&&!n&&!Nt(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=os(i);if(s)if(n){const c=typeof a;c==="string"||c==="number"?i.selected=t.some(p=>String(p)===String(a)):i.selected=an(t,a)>-1}else i.selected=t.has(a);else if(Lt(os(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(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 Nl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},nn=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=vt(o.key);if(t.some(i=>i===r||Nl[i]===r))return e(o)}))},Ll=Te({patchProp:Ol},vl);let co;function Fl(){return co||(co=Yi(Ll))}const Hl=((...e)=>{const t=Fl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Ul(n);if(!o)return;const r=t._component;!Y(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Vl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Vl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ul(e){return xe(e)?document.querySelector(e):e}let Sn="";function Bt(e){Sn=e}function Se(){return Sn}async function _e(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${Sn}`,"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 Bl={class:"animate-fade-in"},Kl={key:0,class:"text-center py-12 text-textSecondary"},Wl={key:1,class:"text-center text-textSecondary py-12"},zl={key:2,class:"space-y-3"},Jl={class:"flex items-center justify-between"},ql={class:"flex items-center gap-3"},Gl={class:"font-medium"},Yl={class:"text-accentLight"},Zl={class:"text-textSecondary text-xs"},Ql={key:2,class:"text-muted italic"},Xl={class:"text-xs text-textSecondary font-mono"},ea={class:"text-right"},ta={class:"flex items-center gap-2 justify-end"},sa={class:"text-xs text-textSecondary"},na=kt({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=D([]),n=D(!0);async function o(){n.value=!0;try{const p=await _e("/api/status");s.value=(p.sessions||[]).slice().sort((u,h)=>u.status==="active"&&h.status!=="active"?-1:u.status!=="active"&&h.status==="active"?1:h.lastActivity-u.lastActivity)}finally{n.value=!1}}const r=Ke(()=>{var u;return(((u=t.status)==null?void 0:u.sessions)??s.value).slice().sort((h,x)=>h.status==="active"&&x.status!=="active"?-1:h.status!=="active"&&x.status==="active"?1:x.lastActivity-h.lastActivity)});function i(p){const u=Math.floor((Date.now()-p.lastActivity)/6e4);return p.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 a(p){if(!p.lastWaitCallAt)return"";const u=Math.floor((Date.now()-p.lastWaitCallAt)/6e4);return u<5?`Polling — ${u===0?"just now":u+"m ago"}`:`Last poll — ${u}m ago`}function c(p){return p.lastWaitCallAt?Math.floor((Date.now()-p.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return yt(o),(p,u)=>(w(),S("div",Bl,[n.value&&r.value.length===0?(w(),S("div",Kl,"Loading sessions...")):r.value.length===0?(w(),S("div",Wl,"No sessions")):(w(),S("div",zl,[(w(!0),S(ie,null,be(r.value,h=>(w(),S("div",{key:h.mcpSessionId,class:G(["glass rounded-xl p-4 animate-slide-up",h.status==="disconnected"?"opacity-60":""])},[l("div",Jl,[l("div",ql,[l("span",{class:G(["w-2.5 h-2.5 rounded-full",h.status==="disconnected"?"bg-muted":Math.floor((Date.now()-h.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-h.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),l("div",null,[l("div",Gl,[h.topicName?(w(),S(ie,{key:0},[l("span",Yl,$(h.topicName),1),l("span",Zl," (thread "+$(h.threadId)+")",1)],64)):h.threadId!=null?(w(),S(ie,{key:1},[Et("Thread "+$(h.threadId),1)],64)):(w(),S("span",Ql,"Awaiting start_session…"))]),l("div",Xl,$(h.mcpSessionId.slice(0,12))+"...",1)])]),l("div",ea,[l("div",ta,[l("span",{class:G(["text-sm font-medium",i(h).color])},$(i(h).label),3),a(h)?(w(),S("span",{key:0,class:G(["text-xs ml-2",c(h)])},$(a(h)),3)):Q("",!0)]),l("div",sa,$(h.transportType),1)])])],2))),128))]))]))}}),oa={class:"animate-fade-in"},ra={class:"flex flex-wrap items-center gap-3 mb-4"},ia={key:0,class:"text-center py-12 text-textSecondary"},la={key:1,class:"text-center py-12 text-textSecondary"},aa={key:2,class:"space-y-2"},ca={class:"flex items-start justify-between gap-3"},ua={class:"flex-1 min-w-0"},da={class:"flex items-center gap-2 mb-1"},fa={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},pa={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ha={class:"text-xs text-textSecondary"},ma={class:"text-sm text-textPrimary leading-relaxed"},ga={class:"flex flex-wrap gap-1.5 mt-2"},xa={class:"text-right shrink-0"},va={class:"text-sm font-mono text-textSecondary"},ya={class:"text-xs text-muted"},ba={class:"text-xs text-muted"},_a=kt({__name:"MemoryNotesTab",setup(e){const t=D([]),s=D(!1),n=D(""),o=D("created_at"),r=D("");let i=null;async function a(){s.value=!0;try{const u=r.value.trim();let h;if(u)h=await _e(`/api/search?q=${encodeURIComponent(u)}&limit=50`);else{const x=new URLSearchParams({limit:"50",sort:o.value});n.value&&x.set("type",n.value),h=await _e(`/api/notes?${x}`)}t.value=h}finally{s.value=!1}}function c(){i&&clearTimeout(i),i=setTimeout(a,300)}function p(u){if(!u)return"never";const h=Date.now()-new Date(u).getTime(),x=Math.floor(h/6e4);if(x<1)return"just now";if(x<60)return`${x}m ago`;const C=Math.floor(x/60);return C<24?`${C}h ago`:`${Math.floor(C/24)}d ago`}return yt(a),(u,h)=>(w(),S("div",oa,[l("div",ra,[me(l("input",{"onUpdate:modelValue":h[0]||(h[0]=x=>r.value=x),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),[[ke,r.value]]),me(l("select",{"onUpdate:modelValue":h[1]||(h[1]=x=>n.value=x),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...h[3]||(h[3]=[Be('<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),[[ns,n.value]]),me(l("select",{"onUpdate:modelValue":h[2]||(h[2]=x=>o.value=x),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...h[4]||(h[4]=[l("option",{value:"created_at"},"Newest",-1),l("option",{value:"confidence"},"Confidence",-1),l("option",{value:"access_count"},"Most accessed",-1)])],544),[[ns,o.value]])]),s.value?(w(),S("div",ia,"Loading notes...")):t.value.length===0?(w(),S("div",la,"No notes found")):(w(),S("div",aa,[(w(!0),S(ie,null,be(t.value,x=>(w(),S("div",{key:x.noteId,class:G(["glass rounded-xl p-4 animate-fade-in",`priority-${x.priority||0}`])},[l("div",ca,[l("div",ua,[l("div",da,[l("span",{class:G(["type-badge",`type-${x.type}`])},$(x.type),3),x.priority>=2?(w(),S("span",fa,"HIGH IMPORTANCE")):x.priority===1?(w(),S("span",pa,"NOTABLE")):Q("",!0),l("span",ha,$(x.noteId),1)]),l("p",ma,$(x.content),1),l("div",ga,[(w(!0),S(ie,null,be(x.keywords||[],C=>(w(),S("span",{key:C,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(C),1))),128))])]),l("div",xa,[l("div",va,$(((Number(x.confidence)||0)*100).toFixed(0))+"%",1),l("div",ya,$(p(x.createdAt)),1),l("div",ba,$(x.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),wa={class:"animate-fade-in space-y-6"},Sa={class:"glass rounded-xl p-4"},Ca={class:"flex flex-wrap items-center gap-4 mb-4"},ka={key:0,class:"text-sm text-success"},Ta={class:"flex flex-wrap items-center gap-3"},$a={key:0,class:"text-sm text-success"},Aa={class:"flex flex-wrap items-center gap-3 mb-4"},Ea={key:0,class:"text-sm text-success"},Pa={class:"glass rounded-xl p-6"},Ia={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ma={class:"flex items-center gap-2"},Oa={key:0,class:"text-sm text-success"},Ra={key:0,class:"mb-3"},Da={class:"mt-4"},ja=["innerHTML"],Na={class:"glass rounded-xl p-6"},La={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Fa={class:"flex items-center gap-2"},Ha={key:0,class:"text-sm text-success"},Va={class:"flex gap-2 mb-4"},Ua=["onClick"],Ba={key:0,class:"mb-3"},Ka=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},za={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ja={class:"flex items-center gap-2"},qa={key:0,class:"text-sm text-success"},Ga={class:"mb-4 flex flex-wrap items-center gap-3"},Ya={class:"flex items-center gap-2"},Za={class:"font-mono text-sm text-textPrimary"},Qa={key:0,class:"mb-3"},Xa={class:"flex flex-wrap gap-2 mb-3"},ec=["onClick"],tc={class:"mt-4"},sc=["innerHTML"],nc=kt({__name:"TemplatesTab",setup(e){function t(M){return M.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").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=D("copilot"),n=D(""),o=D(""),r=D(""),i=D(50),a=D(""),c=D(""),p=D(!0),u=D(""),h=D(!1),x=D({}),C=D("copilot"),H=D(""),j=D(""),z=D(!0),P=D(""),V=D(!1),Z=D([]),F=D("");async function le(){await Promise.all([de(),J(),N(),K(),fe()])}async function de(){try{const M=await _e("/api/settings/agent-type");s.value=M.agentType||"copilot"}catch{}}async function J(){try{const M=await _e("/api/settings/claude-mcp-config");o.value=M.path||""}catch{}}async function N(){try{const M=await _e("/api/settings/bootstrap-message-count");i.value=M.count??50}catch{}}async function K(){try{const M=await _e("/api/templates");if(M.templates&&M.templates.length>0){const T=M.templates[0];c.value=T.content||"",p.value=T.isDefault??!0}M.agentReminders&&(x.value=M.agentReminders)}catch{}}async function fe(){try{const[M,T,E]=await Promise.all([_e("/api/templates/drive"),_e("/api/templates/drive-presets"),_e("/api/settings/dmn-activation-hours")]);Z.value=T.presets||[],F.value=String(E.value??"not set"),M.custom?(j.value=M.custom,z.value=!1):(j.value=M.default||"",z.value=!0)}catch{}}async function te(){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 K()}catch(M){n.value="Error: "+M.message}}async function we(){try{await _e("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:i.value})}),a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3)}catch(M){a.value="Error: "+M.message}}async function ye(){const M=o.value.trim();if(!M){r.value="Path is empty",setTimeout(()=>{r.value=""},3e3);return}try{await _e("/api/settings/claude-mcp-config",{method:"POST",body:JSON.stringify({path:M})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(T){r.value="Error: "+T.message}}async function Ue(){try{const M=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:c.value})});if(!M.ok)throw new Error(M.statusText);p.value=!1,u.value="Saved ✓",setTimeout(()=>{u.value=""},3e3)}catch(M){u.value="Error: "+M.message}}async function Tt(){if(confirm("Reset to default template? Your customizations will be lost."))try{const M=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!M.ok)throw new Error(M.statusText);await K(),u.value="Reset to default ✓",setTimeout(()=>{u.value=""},3e3)}catch(M){u.value="Error: "+M.message}}async function ge(){var E;const M=C.value,T=((E=x.value[M])==null?void 0:E.content)??"";try{const $e=await fetch(`/api/templates/reminders-${M}`,{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:T})});if(!$e.ok)throw new Error($e.statusText);x.value[M]={content:T,isDefault:!1},H.value=`Saved ${M} ✓`,setTimeout(()=>{H.value=""},3e3)}catch($e){H.value="Error: "+$e.message}}async function se(){const M=C.value;if(confirm(`Reset ${M} agent reminder? The custom template will be removed.`))try{const T=await fetch(`/api/templates/reminders-${M}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!T.ok)throw new Error(T.statusText);await K(),H.value=`Reset ${M} ✓`,setTimeout(()=>{H.value=""},3e3)}catch(T){H.value="Error: "+T.message}}async function X(){const M=j.value;if(!M.trim()){P.value="Template is empty — load a preset first",setTimeout(()=>{P.value=""},3e3);return}try{const T=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:M})});if(!T.ok)throw new Error(T.statusText);z.value=!1,P.value="Saved ✓",setTimeout(()=>{P.value=""},3e3)}catch(T){P.value="Error: "+T.message}}async function Me(){if(confirm("Reset drive template? The custom template will be removed."))try{const M=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!M.ok)throw new Error(M.statusText);await fe(),P.value="Reset to default ✓",setTimeout(()=>{P.value=""},3e3)}catch(M){P.value="Error: "+M.message}}function L(M){j.value=M.content,z.value=!1}const y=Ke(()=>t(c.value)),g=Ke(()=>j.value?t(j.value):'<span style="color:#6b7280">(no template loaded)</span>');return yt(le),(M,T)=>{var E,$e;return w(),S("div",wa,[l("div",Sa,[l("div",Ca,[T[9]||(T[9]=l("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),me(l("select",{"onUpdate:modelValue":T[0]||(T[0]=ne=>s.value=ne),onChange:te,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...T[8]||(T[8]=[Be('<option value="copilot">Copilot</option><option value="copilot_claude">Copilot (Claude)</option><option value="copilot_codex">Copilot (Codex)</option><option value="claude">Claude</option><option value="cursor">Cursor</option><option value="codex">Codex</option><option value="openai_codex">OpenAI Codex</option>',7)])],544),[[ns,s.value]]),n.value?(w(),S("span",ka,$(n.value),1)):Q("",!0),T[10]||(T[10]=l("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),l("div",Ta,[T[11]||(T[11]=l("label",{class:"text-sm font-medium text-textSecondary"},"Claude MCP Config Path",-1)),me(l("input",{"onUpdate:modelValue":T[1]||(T[1]=ne=>o.value=ne),type:"text",placeholder:"~/.claude/settings.json",class:"flex-1 min-w-[260px] px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted font-mono focus:outline-none focus:border-accent transition"},null,512),[[ke,o.value]]),l("button",{onClick:ye,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save"),r.value?(w(),S("span",$a,$(r.value),1)):Q("",!0)]),l("div",Aa,[T[12]||(T[12]=l("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),me(l("input",{"onUpdate:modelValue":T[2]||(T[2]=ne=>i.value=ne),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),[[ke,i.value,void 0,{number:!0}]]),l("button",{onClick:we,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),a.value?(w(),S("span",Ea,$(a.value),1)):Q("",!0),T[13]||(T[13]=l("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),l("div",Pa,[l("div",Ia,[T[14]||(T[14]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Reminders Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),l("div",Ma,[u.value?(w(),S("span",Oa,$(u.value),1)):Q("",!0),l("button",{onClick:Tt,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"),l("button",{onClick:Ue,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),p.value?(w(),S("div",Ra,[...T[15]||(T[15]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):Q("",!0),me(l("textarea",{"onUpdate:modelValue":T[3]||(T[3]=ne=>c.value=ne),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),[[ke,c.value]]),l("div",Da,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:T[4]||(T[4]=ne=>h.value=!h.value)},[(w(),S("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",h.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...T[16]||(T[16]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),T[17]||(T[17]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),h.value?(w(),S("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:y.value},null,8,ja)):Q("",!0)]),T[18]||(T[18]=Be('<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">— &quot;autonomous&quot; or &quot;standard&quot;</span></div></div></details>',1))]),l("div",Na,[l("div",La,[T[19]||(T[19]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),l("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),l("div",Fa,[H.value?(w(),S("span",Ha,$(H.value),1)):Q("",!0),l("button",{onClick:se,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"),l("button",{onClick:ge,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Va,[(w(),S(ie,null,be(["copilot","claude","cursor","codex"],ne=>l("button",{key:ne,onClick:Ae=>C.value=ne,class:G(["px-4 py-2 rounded-xl text-sm font-medium transition",C.value===ne?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},$(ne.charAt(0).toUpperCase()+ne.slice(1)),11,Ua)),64))]),((E=x.value[C.value])==null?void 0:E.isDefault)!==!1?(w(),S("div",Ba,[...T[20]||(T[20]=[l("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)])])):Q("",!0),l("textarea",{value:(($e=x.value[C.value])==null?void 0:$e.content)??"",onInput:T[5]||(T[5]=ne=>{const Ae=ne.target;x.value[C.value]={content:Ae.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 ${C.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ka)]),l("div",Wa,[l("div",za,[T[21]||(T[21]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),l("div",Ja,[P.value?(w(),S("span",qa,$(P.value),1)):Q("",!0),l("button",{onClick:Me,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"),l("button",{onClick:X,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ga,[T[23]||(T[23]=l("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),l("div",Ya,[l("span",Za,$(F.value),1),T[22]||(T[22]=l("span",{class:"text-sm text-textSecondary"},"hours",-1))]),T[24]||(T[24]=l("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),z.value?(w(),S("div",Qa,[...T[25]||(T[25]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),l("div",Xa,[T[26]||(T[26]=l("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(w(!0),S(ie,null,be(Z.value,ne=>(w(),S("button",{key:ne.key,onClick:Ae=>L(ne),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"},$(ne.label),9,ec))),128))]),me(l("textarea",{"onUpdate:modelValue":T[6]||(T[6]=ne=>j.value=ne),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),[[ke,j.value]]),l("div",tc,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:T[7]||(T[7]=ne=>V.value=!V.value)},[(w(),S("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",V.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...T[27]||(T[27]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),T[28]||(T[28]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),V.value?(w(),S("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:g.value},null,8,sc)):Q("",!0)]),T[29]||(T[29]=Be('<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"},ic={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},lc={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},ac={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"},hc={key:2,class:"text-center text-textSecondary py-12"},mc={key:3,class:"space-y-2"},gc=["onClick"],xc={class:"flex items-start justify-between gap-3"},vc={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"},Sc=["title"],Cc={key:0,class:"glass rounded-xl p-6"},kc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Tc={class:"text-lg font-semibold"},$c={class:"text-sm text-textSecondary mt-1"},Ac={class:"flex items-center gap-2"},Ec={key:0,class:"text-sm text-success"},Pc={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"},Rc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=kt({__name:"SkillsTab",setup(e){const t=D([]),s=D(!0),n=D(null),o=D(""),r=D(""),i=D(!1),a=D(""),c=D(""),p=D(!1),u=D(""),h=D(""),x=D(!1),C=D("");async function H(){s.value=!0;try{const J=await _e("/api/skills");t.value=J.skills||[]}finally{s.value=!1}}function j(J){return J?J.includes(".remote-copilot-mcp")&&J.includes("skills")?"user":J.endsWith(".default.md")?"default":J.endsWith(".skill.md")?"project":"unknown":"unknown"}function z(J){const N={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 N[J]||N.unknown}function P(J){n.value=J,o.value=J.content,r.value=(J.triggers||[]).join(", "),i.value=!!J.replacesOrchestrator,p.value=!1}function V(){n.value=null,c.value=""}function Z(J,N,K,fe){let te=`---
64
+ **/let sn;const Jn=typeof window<"u"&&window.trustedTypes;if(Jn)try{sn=Jn.createPolicy("vue",{createHTML:e=>e})}catch{}const mr=sn?e=>sn.createHTML(e):e=>e,gl="http://www.w3.org/2000/svg",xl="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,qn=it&&it.createElement("template"),vl={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 o=t==="svg"?it.createElementNS(gl,e):t==="mathml"?it.createElementNS(xl,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},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,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{qn.innerHTML=mr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=qn.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},yl=Symbol("_vtc");function bl(e,t,s){const n=e[yl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Gn=Symbol("_vod"),_l=Symbol("_vsh"),wl=Symbol(""),Sl=/(?:^|;)\s*display\s*:/;function Cl(e,t,s){const n=e.style,o=xe(s);let r=!1;if(s&&!o){if(t)if(xe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();s[a]==null&&gs(n,a,"")}else for(const i in t)s[i]==null&&gs(n,i,"");for(const i in s)i==="display"&&(r=!0),gs(n,i,s[i])}else if(o){if(t!==s){const i=n[wl];i&&(s+=";"+i),n.cssText=s,r=Sl.test(s)}}else t&&e.removeAttribute("style");Gn in e&&(e[Gn]=r?n.display:"",e[_l]&&(n.display="none"))}const Yn=/\s*!important$/;function gs(e,t,s){if(z(s))s.forEach(n=>gs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Tl(e,t);Yn.test(s)?e.setProperty(yt(n),s.replace(Yn,""),"important"):e[n]=s}}const Zn=["Webkit","Moz","ms"],Ks={};function Tl(e,t){const s=Ks[t];if(s)return s;let n=De(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=ks(n);for(let o=0;o<Zn.length;o++){const r=Zn[o]+n;if(r in e)return Ks[t]=r}return t}const Qn="http://www.w3.org/1999/xlink";function Xn(e,t,s,n,o,r=kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Qn,t.slice(6,t.length)):e.setAttributeNS(Qn,t,s):s==null||r&&!go(s)?e.removeAttribute(t):e.setAttribute(t,r?"":nt(s)?String(s):s)}function eo(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?mr(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=go(s):s==null&&a==="string"?(s="",i=!0):a==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function xt(e,t,s,n){e.addEventListener(t,s,n)}function kl(e,t,s,n){e.removeEventListener(t,s,n)}const to=Symbol("_vei");function $l(e,t,s,n,o=null){const r=e[to]||(e[to]={}),i=r[t];if(n&&i)i.value=n;else{const[a,c]=Al(t);if(n){const h=r[t]=Il(n,o);xt(e,a,h,c)}else i&&(kl(e,a,i,c),r[t]=void 0)}}const so=/(?:Once|Passive|Capture)$/;function Al(e){let t;if(so.test(e)){t={};let n;for(;n=e.match(so);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):yt(e.slice(2)),t]}let Ws=0;const El=Promise.resolve(),Pl=()=>Ws||(El.then(()=>Ws=0),Ws=Date.now());function Il(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ot(Ml(n,s.value),t,5,[n])};return s.value=e,s.attached=Pl(),s}function Ml(e,t){if(z(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const no=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ol=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?bl(e,n,i):t==="style"?Cl(e,s,n):Ss(t)?Cs(t)||$l(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rl(e,t,n,i))?(eo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xn(e,t,n,i,r,t!=="value")):e._isVueCE&&(Dl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!xe(n)))?eo(e,De(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Xn(e,t,n,i))};function Rl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&no(t)&&Y(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return no(t)&&xe(s)?!1:t in e}function Dl(e,t){const s=e._def.props;if(!s)return!1;const n=De(t);return Array.isArray(s)?s.some(o=>De(o)===n):Object.keys(s).some(o=>De(o)===n)}const jt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return z(t)?s=>fs(t,s):t};function jl(e){e.target.composing=!0}function oo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign");function ro(e,t,s){return t&&(e=e.trim()),s&&(e=$s(e)),e}const we={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ut]=jt(o);const r=n||o.props&&o.props.type==="number";xt(e,t?"change":"input",i=>{i.target.composing||e[ut](ro(e.value,s,r))}),(s||r)&&xt(e,"change",()=>{e.value=ro(e.value,s,r)}),t||(xt(e,"compositionstart",jl),xt(e,"compositionend",oo),xt(e,"change",oo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ut]=jt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?$s(e.value):e.value,c=t??"";if(a===c)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},io={deep:!0,created(e,t,s){e[ut]=jt(s),xt(e,"change",()=>{const n=e._modelValue,o=os(e),r=e.checked,i=e[ut];if(z(n)){const a=an(n,o),c=a!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const h=[...n];h.splice(a,1),i(h)}}else if(Nt(n)){const a=new Set(n);r?a.add(o):a.delete(o),i(a)}else i(gr(e,r))})},mounted:lo,beforeUpdate(e,t,s){e[ut]=jt(s),lo(e,t,s)}};function lo(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(z(t))o=an(t,n.props.value)>-1;else if(Nt(t))o=t.has(n.props.value);else{if(t===s)return;o=Lt(t,gr(e,!0))}e.checked!==o&&(e.checked=o)}const ns={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Nt(t);xt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?$s(os(i)):os(i));e[ut](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Do(()=>{e._assigning=!1})}),e[ut]=jt(n)},mounted(e,{value:t}){ao(e,t)},beforeUpdate(e,t,s){e[ut]=jt(s)},updated(e,{value:t}){e._assigning||ao(e,t)}};function ao(e,t){const s=e.multiple,n=z(t);if(!(s&&!n&&!Nt(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=os(i);if(s)if(n){const c=typeof a;c==="string"||c==="number"?i.selected=t.some(h=>String(h)===String(a)):i.selected=an(t,a)>-1}else i.selected=t.has(a);else if(Lt(os(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(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 Nl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},nn=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=yt(o.key);if(t.some(i=>i===r||Nl[i]===r))return e(o)}))},Ll=ke({patchProp:Ol},vl);let co;function Fl(){return co||(co=Yi(Ll))}const Vl=((...e)=>{const t=Fl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Ul(n);if(!o)return;const r=t._component;!Y(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Hl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Hl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ul(e){return xe(e)?document.querySelector(e):e}let Sn="";function Bt(e){Sn=e}function Ce(){return Sn}async function ye(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${Sn}`,"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 Bl={class:"animate-fade-in"},Kl={key:0,class:"text-center py-12 text-textSecondary"},Wl={key:1,class:"text-center text-textSecondary py-12"},zl={key:2,class:"space-y-3"},Jl={class:"flex items-center justify-between"},ql={class:"flex items-center gap-3"},Gl={class:"font-medium"},Yl={class:"text-accentLight"},Zl={class:"text-textSecondary text-xs"},Ql={key:2,class:"text-muted italic"},Xl={class:"text-xs text-textSecondary font-mono"},ea={class:"text-right"},ta={class:"flex items-center gap-2 justify-end"},sa={class:"text-xs text-textSecondary"},na=kt({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=j([]),n=j(!0);async function o(){n.value=!0;try{const h=await ye("/api/status");s.value=(h.sessions||[]).slice().sort((d,p)=>d.status==="active"&&p.status!=="active"?-1:d.status!=="active"&&p.status==="active"?1:p.lastActivity-d.lastActivity)}finally{n.value=!1}}const r=Ke(()=>{var d;return(((d=t.status)==null?void 0:d.sessions)??s.value).slice().sort((p,m)=>p.status==="active"&&m.status!=="active"?-1:p.status!=="active"&&m.status==="active"?1:m.lastActivity-p.lastActivity)});function i(h){const d=Math.floor((Date.now()-h.lastActivity)/6e4);return h.status==="disconnected"?{label:`Disconnected${d>0?` — ${d}m ago`:""}`,color:"text-muted"}:d<5?{label:"Active",color:"text-success"}:d<30?{label:`Idle ${d}m`,color:"text-warn"}:{label:`Dormant ${d}m`,color:"text-danger"}}function a(h){if(!h.lastWaitCallAt)return"";const d=Math.floor((Date.now()-h.lastWaitCallAt)/6e4);return d<5?`Polling — ${d===0?"just now":d+"m ago"}`:`Last poll — ${d}m ago`}function c(h){return h.lastWaitCallAt?Math.floor((Date.now()-h.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return bt(o),(h,d)=>(S(),C("div",Bl,[n.value&&r.value.length===0?(S(),C("div",Kl,"Loading sessions...")):r.value.length===0?(S(),C("div",Wl,"No sessions")):(S(),C("div",zl,[(S(!0),C(ie,null,_e(r.value,p=>(S(),C("div",{key:p.mcpSessionId,class:G(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[l("div",Jl,[l("div",ql,[l("span",{class:G(["w-2.5 h-2.5 rounded-full",p.status==="disconnected"?"bg-muted":Math.floor((Date.now()-p.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-p.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),l("div",null,[l("div",Gl,[p.topicName?(S(),C(ie,{key:0},[l("span",Yl,$(p.topicName),1),l("span",Zl," (thread "+$(p.threadId)+")",1)],64)):p.threadId!=null?(S(),C(ie,{key:1},[gt("Thread "+$(p.threadId),1)],64)):(S(),C("span",Ql,"Awaiting start_session…"))]),l("div",Xl,$(p.mcpSessionId.slice(0,12))+"...",1)])]),l("div",ea,[l("div",ta,[l("span",{class:G(["text-sm font-medium",i(p).color])},$(i(p).label),3),a(p)?(S(),C("span",{key:0,class:G(["text-xs ml-2",c(p)])},$(a(p)),3)):Q("",!0)]),l("div",sa,$(p.transportType),1)])])],2))),128))]))]))}}),oa={class:"animate-fade-in"},ra={class:"flex flex-wrap items-center gap-3 mb-4"},ia={key:0,class:"text-center py-12 text-textSecondary"},la={key:1,class:"text-center py-12 text-textSecondary"},aa={key:2,class:"space-y-2"},ca={class:"flex items-start justify-between gap-3"},ua={class:"flex-1 min-w-0"},da={class:"flex items-center gap-2 mb-1"},fa={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},pa={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ha={class:"text-xs text-textSecondary"},ma={class:"text-sm text-textPrimary leading-relaxed"},ga={class:"flex flex-wrap gap-1.5 mt-2"},xa={class:"text-right shrink-0"},va={class:"text-sm font-mono text-textSecondary"},ya={class:"text-xs text-muted"},ba={class:"text-xs text-muted"},_a=kt({__name:"MemoryNotesTab",setup(e){const t=j([]),s=j(!1),n=j(""),o=j("created_at"),r=j("");let i=null;async function a(){s.value=!0;try{const d=r.value.trim();let p;if(d)p=await ye(`/api/search?q=${encodeURIComponent(d)}&limit=50`);else{const m=new URLSearchParams({limit:"50",sort:o.value});n.value&&m.set("type",n.value),p=await ye(`/api/notes?${m}`)}t.value=p}finally{s.value=!1}}function c(){i&&clearTimeout(i),i=setTimeout(a,300)}function h(d){if(!d)return"never";const p=Date.now()-new Date(d).getTime(),m=Math.floor(p/6e4);if(m<1)return"just now";if(m<60)return`${m}m ago`;const v=Math.floor(m/60);return v<24?`${v}h ago`:`${Math.floor(v/24)}d ago`}return bt(a),(d,p)=>(S(),C("div",oa,[l("div",ra,[me(l("input",{"onUpdate:modelValue":p[0]||(p[0]=m=>r.value=m),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),[[we,r.value]]),me(l("select",{"onUpdate:modelValue":p[1]||(p[1]=m=>n.value=m),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[3]||(p[3]=[Be('<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),[[ns,n.value]]),me(l("select",{"onUpdate:modelValue":p[2]||(p[2]=m=>o.value=m),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[4]||(p[4]=[l("option",{value:"created_at"},"Newest",-1),l("option",{value:"confidence"},"Confidence",-1),l("option",{value:"access_count"},"Most accessed",-1)])],544),[[ns,o.value]])]),s.value?(S(),C("div",ia,"Loading notes...")):t.value.length===0?(S(),C("div",la,"No notes found")):(S(),C("div",aa,[(S(!0),C(ie,null,_e(t.value,m=>(S(),C("div",{key:m.noteId,class:G(["glass rounded-xl p-4 animate-fade-in",`priority-${m.priority||0}`])},[l("div",ca,[l("div",ua,[l("div",da,[l("span",{class:G(["type-badge",`type-${m.type}`])},$(m.type),3),m.priority>=2?(S(),C("span",fa,"HIGH IMPORTANCE")):m.priority===1?(S(),C("span",pa,"NOTABLE")):Q("",!0),l("span",ha,$(m.noteId),1)]),l("p",ma,$(m.content),1),l("div",ga,[(S(!0),C(ie,null,_e(m.keywords||[],v=>(S(),C("span",{key:v,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(v),1))),128))])]),l("div",xa,[l("div",va,$(((Number(m.confidence)||0)*100).toFixed(0))+"%",1),l("div",ya,$(h(m.createdAt)),1),l("div",ba,$(m.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),wa={class:"animate-fade-in space-y-6"},Sa={class:"glass rounded-xl p-4"},Ca={class:"flex flex-wrap items-center gap-4 mb-4"},Ta={key:0,class:"text-sm text-success"},ka={class:"flex flex-wrap items-center gap-3"},$a={key:0,class:"text-sm text-success"},Aa={class:"flex flex-wrap items-center gap-3 mb-4"},Ea={key:0,class:"text-sm text-success"},Pa={class:"glass rounded-xl p-6"},Ia={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ma={class:"flex items-center gap-2"},Oa={key:0,class:"text-sm text-success"},Ra={key:0,class:"mb-3"},Da={class:"mt-4"},ja=["innerHTML"],Na={class:"glass rounded-xl p-6"},La={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Fa={class:"flex items-center gap-2"},Va={key:0,class:"text-sm text-success"},Ha={class:"flex gap-2 mb-4"},Ua=["onClick"],Ba={key:0,class:"mb-3"},Ka=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},za={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ja={class:"flex items-center gap-2"},qa={key:0,class:"text-sm text-success"},Ga={class:"mb-4 flex flex-wrap items-center gap-3"},Ya={class:"flex items-center gap-2"},Za={class:"font-mono text-sm text-textPrimary"},Qa={key:0,class:"mb-3"},Xa={class:"flex flex-wrap gap-2 mb-3"},ec=["onClick"],tc={class:"mt-4"},sc=["innerHTML"],nc=kt({__name:"TemplatesTab",setup(e){function t(M){return M.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").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=j("copilot"),n=j(""),o=j(""),r=j(""),i=j(50),a=j(""),c=j(""),h=j(!0),d=j(""),p=j(!1),m=j({}),v=j("copilot"),F=j(""),D=j(""),B=j(!0),E=j(""),H=j(!1),Z=j([]),V=j("");async function le(){await Promise.all([de(),J(),N(),W(),fe()])}async function de(){try{const M=await ye("/api/settings/agent-type");s.value=M.agentType||"copilot"}catch{}}async function J(){try{const M=await ye("/api/settings/claude-mcp-config");o.value=M.path||""}catch{}}async function N(){try{const M=await ye("/api/settings/bootstrap-message-count");i.value=M.count??50}catch{}}async function W(){try{const M=await ye("/api/templates");if(M.templates&&M.templates.length>0){const k=M.templates[0];c.value=k.content||"",h.value=k.isDefault??!0}M.agentReminders&&(m.value=M.agentReminders)}catch{}}async function fe(){try{const[M,k,P]=await Promise.all([ye("/api/templates/drive"),ye("/api/templates/drive-presets"),ye("/api/settings/dmn-activation-hours")]);Z.value=k.presets||[],V.value=String(P.value??"not set"),M.custom?(D.value=M.custom,B.value=!1):(D.value=M.default||"",B.value=!0)}catch{}}async function te(){try{await ye("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await ye("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await W()}catch(M){n.value="Error: "+M.message}}async function Se(){try{await ye("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:i.value})}),a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3)}catch(M){a.value="Error: "+M.message}}async function be(){const M=o.value.trim();if(!M){r.value="Path is empty",setTimeout(()=>{r.value=""},3e3);return}try{await ye("/api/settings/claude-mcp-config",{method:"POST",body:JSON.stringify({path:M})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(k){r.value="Error: "+k.message}}async function Ue(){try{const M=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:c.value})});if(!M.ok)throw new Error(M.statusText);h.value=!1,d.value="Saved ✓",setTimeout(()=>{d.value=""},3e3)}catch(M){d.value="Error: "+M.message}}async function $t(){if(confirm("Reset to default template? Your customizations will be lost."))try{const M=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!M.ok)throw new Error(M.statusText);await W(),d.value="Reset to default ✓",setTimeout(()=>{d.value=""},3e3)}catch(M){d.value="Error: "+M.message}}async function ge(){var P;const M=v.value,k=((P=m.value[M])==null?void 0:P.content)??"";try{const $e=await fetch(`/api/templates/reminders-${M}`,{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:k})});if(!$e.ok)throw new Error($e.statusText);m.value[M]={content:k,isDefault:!1},F.value=`Saved ${M} ✓`,setTimeout(()=>{F.value=""},3e3)}catch($e){F.value="Error: "+$e.message}}async function se(){const M=v.value;if(confirm(`Reset ${M} agent reminder? The custom template will be removed.`))try{const k=await fetch(`/api/templates/reminders-${M}`,{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!k.ok)throw new Error(k.statusText);await W(),F.value=`Reset ${M} ✓`,setTimeout(()=>{F.value=""},3e3)}catch(k){F.value="Error: "+k.message}}async function X(){const M=D.value;if(!M.trim()){E.value="Template is empty — load a preset first",setTimeout(()=>{E.value=""},3e3);return}try{const k=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:M})});if(!k.ok)throw new Error(k.statusText);B.value=!1,E.value="Saved ✓",setTimeout(()=>{E.value=""},3e3)}catch(k){E.value="Error: "+k.message}}async function Me(){if(confirm("Reset drive template? The custom template will be removed."))try{const M=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!M.ok)throw new Error(M.statusText);await fe(),E.value="Reset to default ✓",setTimeout(()=>{E.value=""},3e3)}catch(M){E.value="Error: "+M.message}}function L(M){D.value=M.content,B.value=!1}const b=Ke(()=>t(c.value)),x=Ke(()=>D.value?t(D.value):'<span style="color:#6b7280">(no template loaded)</span>');return bt(le),(M,k)=>{var P,$e;return S(),C("div",wa,[l("div",Sa,[l("div",Ca,[k[9]||(k[9]=l("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),me(l("select",{"onUpdate:modelValue":k[0]||(k[0]=ne=>s.value=ne),onChange:te,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...k[8]||(k[8]=[Be('<option value="copilot">Copilot</option><option value="copilot_claude">Copilot (Claude)</option><option value="copilot_codex">Copilot (Codex)</option><option value="claude">Claude</option><option value="cursor">Cursor</option><option value="codex">Codex</option><option value="openai_codex">OpenAI Codex</option>',7)])],544),[[ns,s.value]]),n.value?(S(),C("span",Ta,$(n.value),1)):Q("",!0),k[10]||(k[10]=l("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),l("div",ka,[k[11]||(k[11]=l("label",{class:"text-sm font-medium text-textSecondary"},"Claude MCP Config Path",-1)),me(l("input",{"onUpdate:modelValue":k[1]||(k[1]=ne=>o.value=ne),type:"text",placeholder:"~/.claude/settings.json",class:"flex-1 min-w-[260px] px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted font-mono focus:outline-none focus:border-accent transition"},null,512),[[we,o.value]]),l("button",{onClick:be,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save"),r.value?(S(),C("span",$a,$(r.value),1)):Q("",!0)]),l("div",Aa,[k[12]||(k[12]=l("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),me(l("input",{"onUpdate:modelValue":k[2]||(k[2]=ne=>i.value=ne),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),[[we,i.value,void 0,{number:!0}]]),l("button",{onClick:Se,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),a.value?(S(),C("span",Ea,$(a.value),1)):Q("",!0),k[13]||(k[13]=l("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),l("div",Pa,[l("div",Ia,[k[14]||(k[14]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Reminders Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),l("div",Ma,[d.value?(S(),C("span",Oa,$(d.value),1)):Q("",!0),l("button",{onClick:$t,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"),l("button",{onClick:Ue,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),h.value?(S(),C("div",Ra,[...k[15]||(k[15]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):Q("",!0),me(l("textarea",{"onUpdate:modelValue":k[3]||(k[3]=ne=>c.value=ne),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),[[we,c.value]]),l("div",Da,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:k[4]||(k[4]=ne=>p.value=!p.value)},[(S(),C("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",p.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...k[16]||(k[16]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),k[17]||(k[17]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),p.value?(S(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:b.value},null,8,ja)):Q("",!0)]),k[18]||(k[18]=Be('<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">— &quot;autonomous&quot; or &quot;standard&quot;</span></div></div></details>',1))]),l("div",Na,[l("div",La,[k[19]||(k[19]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),l("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),l("div",Fa,[F.value?(S(),C("span",Va,$(F.value),1)):Q("",!0),l("button",{onClick:se,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"),l("button",{onClick:ge,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ha,[(S(),C(ie,null,_e(["copilot","claude","cursor","codex"],ne=>l("button",{key:ne,onClick:Ae=>v.value=ne,class:G(["px-4 py-2 rounded-xl text-sm font-medium transition",v.value===ne?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},$(ne.charAt(0).toUpperCase()+ne.slice(1)),11,Ua)),64))]),((P=m.value[v.value])==null?void 0:P.isDefault)!==!1?(S(),C("div",Ba,[...k[20]||(k[20]=[l("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)])])):Q("",!0),l("textarea",{value:(($e=m.value[v.value])==null?void 0:$e.content)??"",onInput:k[5]||(k[5]=ne=>{const Ae=ne.target;m.value[v.value]={content:Ae.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 ${v.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ka)]),l("div",Wa,[l("div",za,[k[21]||(k[21]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),l("div",Ja,[E.value?(S(),C("span",qa,$(E.value),1)):Q("",!0),l("button",{onClick:Me,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"),l("button",{onClick:X,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ga,[k[23]||(k[23]=l("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),l("div",Ya,[l("span",Za,$(V.value),1),k[22]||(k[22]=l("span",{class:"text-sm text-textSecondary"},"hours",-1))]),k[24]||(k[24]=l("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),B.value?(S(),C("div",Qa,[...k[25]||(k[25]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),l("div",Xa,[k[26]||(k[26]=l("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(S(!0),C(ie,null,_e(Z.value,ne=>(S(),C("button",{key:ne.key,onClick:Ae=>L(ne),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"},$(ne.label),9,ec))),128))]),me(l("textarea",{"onUpdate:modelValue":k[6]||(k[6]=ne=>D.value=ne),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),[[we,D.value]]),l("div",tc,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:k[7]||(k[7]=ne=>H.value=!H.value)},[(S(),C("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",H.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...k[27]||(k[27]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),k[28]||(k[28]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),H.value?(S(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:x.value},null,8,sc)):Q("",!0)]),k[29]||(k[29]=Be('<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"},ic={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},lc={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},ac={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"},hc={key:2,class:"text-center text-textSecondary py-12"},mc={key:3,class:"space-y-2"},gc=["onClick"],xc={class:"flex items-start justify-between gap-3"},vc={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"},Sc=["title"],Cc={key:0,class:"glass rounded-xl p-6"},Tc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},kc={class:"text-lg font-semibold"},$c={class:"text-sm text-textSecondary mt-1"},Ac={class:"flex items-center gap-2"},Ec={key:0,class:"text-sm text-success"},Pc={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"},Rc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=kt({__name:"SkillsTab",setup(e){const t=j([]),s=j(!0),n=j(null),o=j(""),r=j(""),i=j(!1),a=j(""),c=j(""),h=j(!1),d=j(""),p=j(""),m=j(!1),v=j("");async function F(){s.value=!0;try{const J=await ye("/api/skills");t.value=J.skills||[]}finally{s.value=!1}}function D(J){return J?J.includes(".remote-copilot-mcp")&&J.includes("skills")?"user":J.endsWith(".default.md")?"default":J.endsWith(".skill.md")?"project":"unknown":"unknown"}function B(J){const N={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 N[J]||N.unknown}function E(J){n.value=J,o.value=J.content,r.value=(J.triggers||[]).join(", "),i.value=!!J.replacesOrchestrator,h.value=!1}function H(){n.value=null,c.value=""}function Z(J,N,W,fe){let te=`---
65
65
  name: ${J}
66
66
  triggers:
67
- `;return N.forEach(we=>{te+=` - ${we.trim()}
68
- `}),K&&(te+=`replaces_orchestrator: true
67
+ `;return N.forEach(Se=>{te+=` - ${Se.trim()}
68
+ `}),W&&(te+=`replaces_orchestrator: true
69
69
  `),te+=`---
70
70
 
71
- `,te+fe}async function F(){if(!n.value)return;const J=n.value.name;try{const N=r.value.split(",").map(we=>we.trim()).filter(Boolean),K=o.value;let fe;K.trimStart().startsWith("---")?fe=K:fe=Z(J,N,i.value,K);const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:fe})});if(!te.ok)throw new Error(te.statusText);a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3),await H()}catch(N){a.value="Error: "+N.message}}async function le(){if(!n.value)return;const J=n.value.name;try{const N=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!N.ok)throw new Error(N.statusText);V(),await H()}catch(N){c.value="Error: "+N.message}}async function de(){const J=u.value.trim(),N=h.value;if(!J){C.value="Name is required";return}const K=N.split(",").map(te=>te.trim()).filter(Boolean);if(!K.length){C.value="At least one trigger is required";return}const fe=Z(J,K,x.value,`\x3C!-- Write your skill instructions here -->
72
- `);try{const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:fe})});if(!te.ok)throw new Error(te.statusText);C.value="Created ✓",p.value=!1,await H();const we=t.value.find(ye=>ye.name===J);we&&P(we)}catch(te){C.value="Error: "+te.message}}return yt(H),(J,N)=>(w(),S("div",oc,[l("div",rc,[l("div",ic,[N[8]||(N[8]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Skill Library"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),l("button",{onClick:N[0]||(N[0]=K=>{p.value=!p.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 ")]),p.value?(w(),S("div",lc,[N[12]||(N[12]=l("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),l("div",ac,[l("div",null,[N[9]||(N[9]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":N[1]||(N[1]=K=>u.value=K),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),[[ke,u.value]])]),l("div",null,[N[10]||(N[10]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[2]||(N[2]=K=>h.value=K),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),[[ke,h.value]])])]),l("div",cc,[l("label",uc,[me(l("input",{"onUpdate:modelValue":N[3]||(N[3]=K=>x.value=K),type:"checkbox",class:"rounded"},null,512),[[io,x.value]]),N[11]||(N[11]=l("span",null,"Replaces orchestrator",-1))])]),l("div",dc,[l("button",{onClick:de,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),l("button",{onClick:N[4]||(N[4]=K=>p.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?(w(),S("span",fc,$(C.value),1)):Q("",!0)])])):Q("",!0),s.value?(w(),S("div",pc,"Loading...")):t.value.length===0?(w(),S("div",hc,"No skills loaded")):(w(),S("div",mc,[(w(!0),S(ie,null,be(t.value,K=>{var fe;return w(),S("div",{key:K.name,onClick:te=>P(K),class:G(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((fe=n.value)==null?void 0:fe.name)===K.name?"border-accent":"border-transparent"])},[l("div",xc,[l("div",vc,[l("div",yc,[l("span",bc,$(K.name),1),l("span",{class:"type-badge",style:Es(z(j(K.source)))},$(j(K.source)),5),K.replacesOrchestrator?(w(),S("span",_c,"REPLACES ORCH")):Q("",!0)]),l("div",wc,[(w(!0),S(ie,null,be(K.triggers||[],te=>(w(),S("span",{key:te,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(te),1))),128))])]),l("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:K.source||""},$((K.source||"").split(/[\\/]/).pop()||""),9,Sc)])],10,gc)}),128))]))]),n.value?(w(),S("div",Cc,[l("div",kc,[l("div",null,[l("h3",Tc,"Edit: "+$(n.value.name),1),l("p",$c,$(n.value.source||"(unknown source)"),1)]),l("div",Ac,[a.value?(w(),S("span",Ec,$(a.value),1)):Q("",!0),c.value?(w(),S("span",Pc,$(c.value),1)):Q("",!0),j(n.value.source)==="user"?(w(),S("button",{key:2,onClick:le,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")):Q("",!0),l("button",{onClick:V,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"),l("button",{onClick:F,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ic,[l("div",null,[N[13]||(N[13]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),l("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)]),l("div",null,[N[14]||(N[14]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[5]||(N[5]=K=>r.value=K),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),[[ke,r.value]])]),l("div",Oc,[l("label",Rc,[me(l("input",{"onUpdate:modelValue":N[6]||(N[6]=K=>i.value=K),type:"checkbox",class:"rounded"},null,512),[[io,i.value]]),N[15]||(N[15]=l("span",null,"Replaces orchestrator",-1))])])]),me(l("textarea",{"onUpdate:modelValue":N[7]||(N[7]=K=>o.value=K),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),[[ke,o.value]])])):Q("",!0)]))}}),jc={class:"animate-fade-in space-y-6"},Nc={class:"glass rounded-xl p-6"},Lc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Fc={class:"flex items-center gap-3"},Hc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Vc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Uc=["value"],Bc={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={class:"text-xs text-muted"},ou={class:"ml-auto flex items-center gap-3"},ru={class:"flex items-center gap-1.5"},iu=["onClick"],lu={class:"flex items-center gap-1.5"},au=["onClick"],cu={class:"flex items-center gap-1.5"},uu=["onClick"],du=["onClick"],fu=["onClick"],pu=["onClick"],hu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},mu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},gu=["value"],xu={class:"flex items-center gap-2"},vu=["onClick","disabled"],yu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},bu={key:0,class:"text-xs text-muted py-1"},_u={class:"text-sm font-medium"},wu={class:"text-xs text-muted font-mono"},Su=["value","onChange"],Cu=["value"],ku={class:"text-xs text-muted"},Tu={class:"ml-auto flex items-center gap-3"},$u={key:0,class:"flex items-center gap-1.5"},Au=["onClick"],Eu={key:1,class:"flex items-center gap-1.5"},Pu=["onClick"],Iu=["onClick"],Mu={key:4},Ou={class:"space-y-2"},Ru={class:"font-medium"},Du={class:"text-xs text-muted font-mono"},ju={class:"text-xs text-textSecondary"},Nu={class:"text-xs text-muted"},Lu=["onClick"],Fu={key:5},Hu={class:"space-y-2"},Vu={class:"font-medium"},Uu={class:"text-xs text-muted font-mono"},Bu=["value","onChange"],Ku=["value"],Wu={class:"text-xs text-muted"},zu={class:"ml-auto flex items-center gap-3"},Ju={class:"flex items-center gap-1.5"},qu=["onClick"],Gu={class:"flex items-center gap-1.5"},Yu=["onClick"],Zu=["onClick"],Qu={key:6},Xu={class:"space-y-2"},ed={class:"font-medium"},td={class:"text-xs text-muted font-mono"},sd=["value","onChange"],nd=["value"],od={class:"text-xs text-muted"},rd=["onClick"],id=kt({__name:"ThreadsTab",setup(e){const t=D([]),s=D(!0),n=D(""),o=D({}),r=D(new Set),i=D(!1),a=D({name:"",threadId:0,client:"claude"}),c=D(""),p=D(!1),u=D(null),h=D(""),x=D(null),C=D({name:"",threadId:0,client:"claude"}),H=D(""),j=D(!1),z=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],P={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"}},V=Ke(()=>t.value.filter(L=>L.type==="root")),Z=Ke(()=>t.value.filter(L=>L.type==="daily")),F=Ke(()=>t.value.filter(L=>L.type==="branch")),le=Ke(()=>t.value.filter(L=>L.type==="worker"));async function de(){s.value=!0,n.value="";try{const L=await _e("/api/threads");t.value=L.threads??[]}catch(L){n.value=L.message||"Failed to load threads"}finally{s.value=!1}}async function J(L){try{const y=await _e(`/api/threads/${L}/children`);o.value[L]=y.threads??[]}catch{o.value[L]=[]}}function N(L){r.value.has(L)?r.value.delete(L):(r.value.add(L),J(L))}async function K(){if(!(!a.value.name.trim()||!a.value.threadId)){p.value=!0,c.value="";try{const L=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:a.value.threadId,name:a.value.name.trim(),type:"root",client:a.value.client,keepAlive:!1})});if(!L.ok){const y=await L.json().catch(()=>({error:L.statusText}));throw new Error(y.error??L.statusText)}c.value="Created ✓",a.value={name:"",threadId:0,client:"claude"},i.value=!1,setTimeout(()=>{c.value=""},3e3),await de()}catch(L){c.value="Error: "+L.message}finally{p.value=!1}}}async function fe(L){if(!(!C.value.name.trim()||!C.value.threadId)){j.value=!0,H.value="";try{const y=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:C.value.threadId,name:C.value.name.trim(),type:"branch",rootThreadId:L,client:C.value.client})});if(!y.ok){const g=await y.json().catch(()=>({error:y.statusText}));throw new Error(g.error??y.statusText)}H.value="Branch created ✓",C.value={name:"",threadId:0,client:"claude"},x.value=null,setTimeout(()=>{H.value=""},3e3),await de(),J(L)}catch(y){H.value="Error: "+y.message}finally{j.value=!1}}}function te(L){u.value=L.threadId,h.value=L.name}async function we(L){const y=h.value.trim();if(u.value=null,!!y)try{const g=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({name:y})});if(!g.ok)throw new Error(g.statusText);await de()}catch(g){n.value="Failed to rename thread: "+g.message}}async function ye(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!L.keepAlive})});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to toggle keep-alive: "+y.message}}async function Ue(L,y){try{const g=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({client:y})});if(!g.ok)throw new Error(g.statusText);await de()}catch(g){n.value="Failed to change agent type: "+g.message}}async function Tt(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!L.dailyRotation})});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to toggle daily rotation: "+y.message}}async function ge(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!L.autonomousMode})});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to toggle autonomous mode: "+y.message}}async function se(L){if(confirm(`Archive thread "${L.name}" (${L.threadId})?`))try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to archive: "+y.message}}function X(L){if(!L)return"—";const y=new Date(L),M=Date.now()-y.getTime();return M<6e4?"just now":M<36e5?`${Math.floor(M/6e4)}m ago`:M<864e5?`${Math.floor(M/36e5)}h ago`:y.toLocaleDateString()}function Me(L){return L==="active"?"text-success":L==="archived"?"text-muted":"text-warn"}return yt(de),(L,y)=>(w(),S("div",jc,[l("div",Nc,[l("div",Lc,[y[10]||(y[10]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Thread Registry"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),l("div",Fc,[c.value?(w(),S("span",{key:0,class:G([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(c.value),3)):Q("",!0),l("button",{onClick:y[0]||(y[0]=g=>i.value=!i.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},$(i.value?"Cancel":"+ New Root Thread"),1),l("button",{onClick:de,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),i.value?(w(),S("div",Hc,[l("div",Vc,[l("div",null,[y[11]||(y[11]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":y[1]||(y[1]=g=>a.value.name=g),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),[[ke,a.value.name]])]),l("div",null,[y[12]||(y[12]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),me(l("input",{"onUpdate:modelValue":y[2]||(y[2]=g=>a.value.threadId=g),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),[[ke,a.value.threadId,void 0,{number:!0}]])]),l("div",null,[y[13]||(y[13]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),me(l("select",{"onUpdate:modelValue":y[3]||(y[3]=g=>a.value.client=g),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"},[(w(),S(ie,null,be(z,g=>l("option",{key:g,value:g},$(g),9,Uc)),64))],512),[[ns,a.value.client]])])]),l("div",Bc,[l("button",{onClick:K,disabled:p.value||!a.value.name.trim()||!a.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(p.value?"Creating…":"Create Root Thread"),9,Kc)])])):Q("",!0)]),s.value&&t.value.length===0?(w(),S("div",Wc,"Loading threads…")):n.value?(w(),S("div",zc,$(n.value),1)):t.value.length===0?(w(),S("div",Jc,"No threads registered")):Q("",!0),V.value.length>0?(w(),S("div",qc,[y[19]||(y[19]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),l("div",Gc,[(w(!0),S(ie,null,be(V.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl overflow-hidden"},[l("div",Yc,[l("div",Zc,[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),u.value===g.threadId?me((w(),S("input",{key:0,"onUpdate:modelValue":y[4]||(y[4]=E=>h.value=E),onBlur:E=>we(g.threadId),onKeyup:[y[5]||(y[5]=nn(E=>E.target.blur(),["enter"])),y[6]||(y[6]=nn(E=>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)),[[ke,h.value]]):(w(),S("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:E=>te(g),title:"Double-click to rename"},$(g.name),41,Xc)),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",eu,"ID: "+$(g.threadId),1),l("select",{value:g.client,onChange:E=>Ue(g,E.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"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,su)),64))],40,tu),l("span",nu,$(X(g.lastActiveAt)),1),l("div",ou,[l("div",ru,[l("button",{onClick:E=>ye(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,iu),y[14]||(y[14]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",lu,[l("button",{onClick:E=>Tt(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,au),y[15]||(y[15]=l("span",{class:"text-xs text-muted"},"Daily",-1))]),l("div",cu,[l("button",{onClick:E=>ge(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,uu),y[16]||(y[16]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:E=>N(g.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},$(r.value.has(g.threadId)?"▾ Children":"▸ Children"),9,du),l("button",{onClick:E=>{x.value=x.value===g.threadId?null:g.threadId,C.value={name:"",threadId:0,client:"claude"},H.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,fu),l("button",{onClick:E=>se(g),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,pu)])]),x.value===g.threadId?(w(),S("div",hu,[l("div",mu,[me(l("input",{"onUpdate:modelValue":y[7]||(y[7]=E=>C.value.name=E),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),[[ke,C.value.name]]),me(l("input",{"onUpdate:modelValue":y[8]||(y[8]=E=>C.value.threadId=E),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),[[ke,C.value.threadId,void 0,{number:!0}]]),me(l("select",{"onUpdate:modelValue":y[9]||(y[9]=E=>C.value.client=E),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"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,gu)),64))],512),[[ns,C.value.client]])]),l("div",xu,[l("button",{onClick:E=>fe(g.threadId),disabled:j.value||!C.value.name.trim()||!C.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"},$(j.value?"Creating…":"Create Branch"),9,vu),H.value?(w(),S("span",{key:0,class:G([H.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},$(H.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(g.threadId)&&o.value[g.threadId]?(w(),S("div",yu,[o.value[g.threadId].length===0?(w(),S("div",bu,"No children")):Q("",!0),(w(!0),S(ie,null,be(o.value[g.threadId],E=>{var $e,ne;return w(),S("div",{key:E.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[l("span",{class:G(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",($e=P[E.type])==null?void 0:$e.classes])},$((ne=P[E.type])==null?void 0:ne.emoji)+" "+$(E.type.toUpperCase()),3),l("span",_u,$(E.name),1),l("span",{class:G(["text-xs",Me(E.status)])},$(E.status),3),l("span",wu,"ID: "+$(E.threadId),1),l("select",{value:E.client,onChange:Ae=>Ue(E,Ae.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"},[(w(),S(ie,null,be(z,Ae=>l("option",{key:Ae,value:Ae},$(Ae),9,Cu)),64))],40,Su),l("span",ku,$(X(E.lastActiveAt)),1),l("div",Tu,[E.type==="branch"?(w(),S("div",$u,[l("button",{onClick:Ae=>ye(E),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",E.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",E.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Au),y[17]||(y[17]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),E.type==="branch"?(w(),S("div",Eu,[l("button",{onClick:Ae=>ge(E),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",E.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",E.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Pu),y[18]||(y[18]=l("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),E.type!=="root"?(w(),S("button",{key:2,onClick:Ae=>se(E),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,Iu)):Q("",!0)])])}),128))])):Q("",!0)])}),128))])])):Q("",!0),Z.value.length>0?(w(),S("div",Mu,[y[20]||(y[20]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),l("div",Ou,[(w(!0),S(ie,null,be(Z.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),l("span",Ru,$(g.name),1),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",Du,"ID: "+$(g.threadId),1),l("span",ju,$(g.client),1),l("span",Nu,$(X(g.lastActiveAt)),1),l("button",{onClick:E=>se(g),class:"ml-auto 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,Lu)])}),128))])])):Q("",!0),F.value.length>0?(w(),S("div",Fu,[y[23]||(y[23]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),l("div",Hu,[(w(!0),S(ie,null,be(F.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),l("span",Vu,$(g.name),1),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",Uu,"ID: "+$(g.threadId),1),l("select",{value:g.client,onChange:E=>Ue(g,E.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"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,Ku)),64))],40,Bu),l("span",Wu,$(X(g.lastActiveAt)),1),l("div",zu,[l("div",Ju,[l("button",{onClick:E=>ye(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,qu),y[21]||(y[21]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",Gu,[l("button",{onClick:E=>ge(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Yu),y[22]||(y[22]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:E=>se(g),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,Zu)])])}),128))])])):Q("",!0),le.value.length>0?(w(),S("div",Qu,[y[24]||(y[24]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),l("div",Xu,[(w(!0),S(ie,null,be(le.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),l("span",ed,$(g.name),1),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",td,"ID: "+$(g.threadId),1),l("select",{value:g.client,onChange:E=>Ue(g,E.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"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,nd)),64))],40,sd),l("span",od,$(X(g.lastActiveAt)),1),l("button",{onClick:E=>se(g),class:"ml-auto 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,rd)])}),128))])])):Q("",!0)]))}}),ld={class:"animate-fade-in"},ad={class:"glass rounded-xl p-6 mb-6"},cd={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},ud={class:"flex items-center gap-3"},dd=["disabled"],fd={key:0,class:"text-center py-8 text-textSecondary text-sm"},pd={key:1,class:"space-y-6"},hd={class:"glass rounded-xl p-4 border border-gray-700/50"},md={class:"flex items-center gap-4"},gd={class:"flex justify-between text-xs text-muted mt-2"},xd={class:"font-mono"},vd={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},yd={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},bd={class:"grid grid-cols-2 gap-4"},_d=kt({__name:"SettingsTab",setup(e){const t=D(!0),s=D(!1),n=D(""),o=D(50),r=D(50),i=Ke(()=>o.value!==r.value);async function a(){t.value=!0;try{const p=await _e("/api/settings/bootstrap-message-count");o.value=p.count,r.value=p.count}finally{t.value=!1}}async function c(){s.value=!0,n.value="";try{const p=await fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({count:o.value})});if(!p.ok){const h=await p.json().catch(()=>({error:p.statusText}));throw new Error(h.error??p.statusText)}const u=await p.json();r.value=u.count,o.value=u.count,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(p){n.value="Error: "+p.message}finally{s.value=!1}}return yt(a),(p,u)=>(w(),S("div",ld,[l("div",ad,[l("div",cd,[u[2]||(u[2]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Settings"),l("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),l("div",ud,[n.value?(w(),S("span",{key:0,class:G([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(n.value),3)):Q("",!0),l("button",{onClick:c,disabled:s.value||t.value||!i.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,dd)])]),t.value?(w(),S("div",fd,"Loading…")):(w(),S("div",pd,[l("div",hd,[u[6]||(u[6]=l("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),u[7]||(u[7]=l("p",{class:"text-xs text-textSecondary mb-3"},[Et(" Number of recent messages injected into the agent's bootstrap context. Set to "),l("span",{class:"font-mono text-accentLight"},"0"),Et(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),l("div",md,[me(l("input",{"onUpdate:modelValue":u[0]||(u[0]=h=>o.value=h),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[ke,o.value,void 0,{number:!0}]]),me(l("input",{"onUpdate:modelValue":u[1]||(u[1]=h=>o.value=h),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),[[ke,o.value,void 0,{number:!0}]])]),l("div",gd,[u[3]||(u[3]=l("span",null,"Off",-1)),l("span",xd,$(o.value)+" messages",1),u[4]||(u[4]=l("span",null,"Max",-1))]),o.value===0?(w(),S("div",vd,[...u[5]||(u[5]=[Et(" Message buffer injection is ",-1),l("strong",null,"disabled",-1),Et(". 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)])])):Q("",!0)]),l("div",yd,[u[10]||(u[10]=l("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),l("div",bd,[l("div",null,[u[8]||(u[8]=l("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),l("span",{class:G(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},$(r.value>0?`${r.value} messages`:"Disabled"),3)]),l("div",null,[u[9]||(u[9]=l("div",{class:"text-xs text-muted mb-1"},"Status",-1)),l("span",{class:G(["text-sm font-medium",i.value?"text-warn":"text-textSecondary"])},$(i.value?"Unsaved changes":"Saved"),3)])])])]))])]))}}),wd={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Sd={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Cd=["disabled"],kd={key:0,class:"mt-3 text-sm text-danger"},Td={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},$d={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Ad={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Ed={class:"flex items-center gap-4"},Pd={class:"text-sm text-textSecondary font-mono"},Id={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Md={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Od={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Rd={class:"text-2xl font-bold font-mono"},Dd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},jd={class:"text-2xl font-bold font-mono"},Nd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Ld={class:"text-2xl font-bold font-mono"},Fd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Hd={class:"flex items-center gap-2 mb-2"},Vd={class:"text-2xl font-bold font-mono"},Ud={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Bd={class:"text-2xl font-bold font-mono"},Kd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Wd={class:"text-2xl font-bold font-mono"},zd={class:"max-w-7xl mx-auto px-4 sm:px-6"},Jd={class:"flex gap-6 border-b border-gray-800/50 mb-6"},qd=["onClick"],Gd={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ds="sensorium_token",Yd=kt({__name:"App",setup(e){const t=D(!1),s=D(""),n=D(""),o=D(!1),r=D(null),i=D("sessions");let a=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:"settings",label:"Settings"}],p={sessions:na,notes:_a,templates:nc,skills:Dc,threads:id,settings:_d},u=Ke(()=>p[i.value]),h=Ke(()=>{if(!r.value)return"—";const z=Math.floor(r.value.uptime),P=Math.floor(z/86400),V=Math.floor(z%86400/3600),Z=Math.floor(z%3600/60);return P>0?`${P}d ${V}h`:V>0?`${V}h ${Z}m`:`${Z}m`});async function x(){const z=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Bt(z),await H(),localStorage.setItem(ds,z),t.value=!0,j()}catch(P){const V=P;V.status===401?n.value="Invalid token":n.value=V.message??"Connection failed",Bt("")}finally{o.value=!1}}function C(){localStorage.removeItem(ds),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Bt("")}async function H(){r.value=await _e("/api/status")}function j(){a&&clearInterval(a),a=setInterval(H,3e4)}return yt(async()=>{const z=localStorage.getItem(ds);if(z){s.value=z;try{Bt(z),await H(),t.value=!0,j()}catch{localStorage.removeItem(ds),Bt("")}}}),yn(()=>{a&&clearInterval(a)}),(z,P)=>{var V,Z,F,le,de,J,N,K,fe,te,we;return t.value?(w(),S("div",Td,[l("header",$d,[l("div",Ad,[P[3]||(P[3]=Be('<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)),l("div",Ed,[P[2]||(P[2]=l("div",{class:"flex items-center gap-2 text-sm"},[l("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),l("span",{class:"text-textSecondary"},"Connected")],-1)),l("div",Pd,$(h.value),1),l("button",{onClick:C,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),l("div",Id,[l("div",Md,[l("div",Od,[P[4]||(P[4]=Be('<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)),l("div",Rd,$(((V=r.value)==null?void 0:V.activeSessions)??0),1)]),l("div",Dd,[P[5]||(P[5]=Be('<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)),l("div",jd,$(((F=(Z=r.value)==null?void 0:Z.memory)==null?void 0:F.totalSemanticNotes)??0),1)]),l("div",Nd,[P[6]||(P[6]=Be('<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)),l("div",Ld,$(((de=(le=r.value)==null?void 0:le.memory)==null?void 0:de.totalEpisodes)??0),1)]),l("div",Fd,[l("div",Hd,[l("span",{class:G((((N=(J=r.value)==null?void 0:J.memory)==null?void 0:N.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...P[7]||(P[7]=[l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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]=l("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),l("div",Vd,$(((fe=(K=r.value)==null?void 0:K.memory)==null?void 0:fe.unconsolidatedEpisodes)??0),1)]),l("div",Ud,[P[9]||(P[9]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-accent"><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="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Procedures</span></div>',1)),l("div",Bd,$(((we=(te=r.value)==null?void 0:te.memory)==null?void 0:we.totalProcedures)??0),1)]),l("div",Kd,[P[10]||(P[10]=Be('<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)),l("div",Wd,$(h.value),1)])])]),l("div",zd,[l("nav",Jd,[(w(),S(ie,null,be(c,ye=>l("button",{key:ye.id,onClick:Ue=>i.value=ye.id,class:G(["pb-3 text-sm font-medium transition",i.value===ye.id?"tab-active":"tab-inactive"])},$(ye.label),11,qd)),64))])]),l("div",Gd,[(w(),ur($i(u.value),{status:r.value},null,8,["status"]))])])):(w(),S("div",wd,[l("div",Sd,[P[1]||(P[1]=Be('<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)),me(l("input",{"onUpdate:modelValue":P[0]||(P[0]=ye=>s.value=ye),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:nn(x,["enter"])},null,544),[[ke,s.value]]),l("button",{onClick:x,disabled:o.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"},$(o.value?"Connecting...":"Connect"),9,Cd),n.value?(w(),S("p",kd,$(n.value),1)):Q("",!0)])]))}}});Hl(Yd).mount("#app");</script>
71
+ `,te+fe}async function V(){if(!n.value)return;const J=n.value.name;try{const N=r.value.split(",").map(Se=>Se.trim()).filter(Boolean),W=o.value;let fe;W.trimStart().startsWith("---")?fe=W:fe=Z(J,N,i.value,W);const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:fe})});if(!te.ok)throw new Error(te.statusText);a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3),await F()}catch(N){a.value="Error: "+N.message}}async function le(){if(!n.value)return;const J=n.value.name;try{const N=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!N.ok)throw new Error(N.statusText);H(),await F()}catch(N){c.value="Error: "+N.message}}async function de(){const J=d.value.trim(),N=p.value;if(!J){v.value="Name is required";return}const W=N.split(",").map(te=>te.trim()).filter(Boolean);if(!W.length){v.value="At least one trigger is required";return}const fe=Z(J,W,m.value,`\x3C!-- Write your skill instructions here -->
72
+ `);try{const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:fe})});if(!te.ok)throw new Error(te.statusText);v.value="Created ✓",h.value=!1,await F();const Se=t.value.find(be=>be.name===J);Se&&E(Se)}catch(te){v.value="Error: "+te.message}}return bt(F),(J,N)=>(S(),C("div",oc,[l("div",rc,[l("div",ic,[N[8]||(N[8]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Skill Library"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),l("button",{onClick:N[0]||(N[0]=W=>{h.value=!h.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 ")]),h.value?(S(),C("div",lc,[N[12]||(N[12]=l("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),l("div",ac,[l("div",null,[N[9]||(N[9]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":N[1]||(N[1]=W=>d.value=W),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),[[we,d.value]])]),l("div",null,[N[10]||(N[10]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[2]||(N[2]=W=>p.value=W),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),[[we,p.value]])])]),l("div",cc,[l("label",uc,[me(l("input",{"onUpdate:modelValue":N[3]||(N[3]=W=>m.value=W),type:"checkbox",class:"rounded"},null,512),[[io,m.value]]),N[11]||(N[11]=l("span",null,"Replaces orchestrator",-1))])]),l("div",dc,[l("button",{onClick:de,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),l("button",{onClick:N[4]||(N[4]=W=>h.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"),v.value?(S(),C("span",fc,$(v.value),1)):Q("",!0)])])):Q("",!0),s.value?(S(),C("div",pc,"Loading...")):t.value.length===0?(S(),C("div",hc,"No skills loaded")):(S(),C("div",mc,[(S(!0),C(ie,null,_e(t.value,W=>{var fe;return S(),C("div",{key:W.name,onClick:te=>E(W),class:G(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((fe=n.value)==null?void 0:fe.name)===W.name?"border-accent":"border-transparent"])},[l("div",xc,[l("div",vc,[l("div",yc,[l("span",bc,$(W.name),1),l("span",{class:"type-badge",style:Es(B(D(W.source)))},$(D(W.source)),5),W.replacesOrchestrator?(S(),C("span",_c,"REPLACES ORCH")):Q("",!0)]),l("div",wc,[(S(!0),C(ie,null,_e(W.triggers||[],te=>(S(),C("span",{key:te,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(te),1))),128))])]),l("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:W.source||""},$((W.source||"").split(/[\\/]/).pop()||""),9,Sc)])],10,gc)}),128))]))]),n.value?(S(),C("div",Cc,[l("div",Tc,[l("div",null,[l("h3",kc,"Edit: "+$(n.value.name),1),l("p",$c,$(n.value.source||"(unknown source)"),1)]),l("div",Ac,[a.value?(S(),C("span",Ec,$(a.value),1)):Q("",!0),c.value?(S(),C("span",Pc,$(c.value),1)):Q("",!0),D(n.value.source)==="user"?(S(),C("button",{key:2,onClick:le,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")):Q("",!0),l("button",{onClick:H,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"),l("button",{onClick:V,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ic,[l("div",null,[N[13]||(N[13]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),l("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)]),l("div",null,[N[14]||(N[14]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[5]||(N[5]=W=>r.value=W),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),[[we,r.value]])]),l("div",Oc,[l("label",Rc,[me(l("input",{"onUpdate:modelValue":N[6]||(N[6]=W=>i.value=W),type:"checkbox",class:"rounded"},null,512),[[io,i.value]]),N[15]||(N[15]=l("span",null,"Replaces orchestrator",-1))])])]),me(l("textarea",{"onUpdate:modelValue":N[7]||(N[7]=W=>o.value=W),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),[[we,o.value]])])):Q("",!0)]))}}),jc={class:"animate-fade-in space-y-6"},Nc={class:"glass rounded-xl p-6"},Lc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Fc={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"},Hc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Uc=["value"],Bc={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={class:"text-xs text-muted"},ou={class:"ml-auto flex items-center gap-3"},ru={class:"flex items-center gap-1.5"},iu=["onClick"],lu={class:"flex items-center gap-1.5"},au=["onClick"],cu={class:"flex items-center gap-1.5"},uu=["onClick"],du=["onClick"],fu=["onClick"],pu=["onClick"],hu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},mu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},gu=["value"],xu={class:"flex items-center gap-2"},vu=["onClick","disabled"],yu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},bu={key:0,class:"text-xs text-muted py-1"},_u={class:"text-sm font-medium"},wu={class:"text-xs text-muted font-mono"},Su=["value","onChange"],Cu=["value"],Tu={class:"text-xs text-muted"},ku={class:"ml-auto flex items-center gap-3"},$u={key:0,class:"flex items-center gap-1.5"},Au=["onClick"],Eu={key:1,class:"flex items-center gap-1.5"},Pu=["onClick"],Iu=["onClick"],Mu={key:4},Ou={class:"space-y-2"},Ru={class:"font-medium"},Du={class:"text-xs text-muted font-mono"},ju={class:"text-xs text-textSecondary"},Nu={class:"text-xs text-muted"},Lu=["onClick"],Fu={key:5},Vu={class:"space-y-2"},Hu={class:"font-medium"},Uu={class:"text-xs text-muted font-mono"},Bu=["value","onChange"],Ku=["value"],Wu={class:"text-xs text-muted"},zu={class:"ml-auto flex items-center gap-3"},Ju={class:"flex items-center gap-1.5"},qu=["onClick"],Gu={class:"flex items-center gap-1.5"},Yu=["onClick"],Zu=["onClick"],Qu={key:6},Xu={class:"space-y-2"},ed={class:"font-medium"},td={class:"text-xs text-muted font-mono"},sd=["value","onChange"],nd=["value"],od={class:"text-xs text-muted"},rd=["onClick"],id=kt({__name:"ThreadsTab",setup(e){const t=j([]),s=j(!0),n=j(""),o=j({}),r=j(new Set),i=j(!1),a=j({name:"",threadId:0,client:"claude"}),c=j(""),h=j(!1),d=j(null),p=j(""),m=j(null),v=j({name:"",threadId:0,client:"claude"}),F=j(""),D=j(!1),B=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],E={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"}},H=Ke(()=>t.value.filter(L=>L.type==="root")),Z=Ke(()=>t.value.filter(L=>L.type==="daily")),V=Ke(()=>t.value.filter(L=>L.type==="branch")),le=Ke(()=>t.value.filter(L=>L.type==="worker"));async function de(){s.value=!0,n.value="";try{const L=await ye("/api/threads");t.value=L.threads??[]}catch(L){n.value=L.message||"Failed to load threads"}finally{s.value=!1}}async function J(L){try{const b=await ye(`/api/threads/${L}/children`);o.value[L]=b.threads??[]}catch{o.value[L]=[]}}function N(L){r.value.has(L)?r.value.delete(L):(r.value.add(L),J(L))}async function W(){if(!(!a.value.name.trim()||!a.value.threadId)){h.value=!0,c.value="";try{const L=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:a.value.threadId,name:a.value.name.trim(),type:"root",client:a.value.client,keepAlive:!1})});if(!L.ok){const b=await L.json().catch(()=>({error:L.statusText}));throw new Error(b.error??L.statusText)}c.value="Created ✓",a.value={name:"",threadId:0,client:"claude"},i.value=!1,setTimeout(()=>{c.value=""},3e3),await de()}catch(L){c.value="Error: "+L.message}finally{h.value=!1}}}async function fe(L){if(!(!v.value.name.trim()||!v.value.threadId)){D.value=!0,F.value="";try{const b=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:v.value.threadId,name:v.value.name.trim(),type:"branch",rootThreadId:L,client:v.value.client})});if(!b.ok){const x=await b.json().catch(()=>({error:b.statusText}));throw new Error(x.error??b.statusText)}F.value="Branch created ✓",v.value={name:"",threadId:0,client:"claude"},m.value=null,setTimeout(()=>{F.value=""},3e3),await de(),J(L)}catch(b){F.value="Error: "+b.message}finally{D.value=!1}}}function te(L){d.value=L.threadId,p.value=L.name}async function Se(L){const b=p.value.trim();if(d.value=null,!!b)try{const x=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({name:b})});if(!x.ok)throw new Error(x.statusText);await de()}catch(x){n.value="Failed to rename thread: "+x.message}}async function be(L){try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!L.keepAlive})});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to toggle keep-alive: "+b.message}}async function Ue(L,b){try{const x=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({client:b})});if(!x.ok)throw new Error(x.statusText);await de()}catch(x){n.value="Failed to change agent type: "+x.message}}async function $t(L){try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!L.dailyRotation})});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to toggle daily rotation: "+b.message}}async function ge(L){try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!L.autonomousMode})});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to toggle autonomous mode: "+b.message}}async function se(L){if(confirm(`Archive thread "${L.name}" (${L.threadId})?`))try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to archive: "+b.message}}function X(L){if(!L)return"—";const b=new Date(L),M=Date.now()-b.getTime();return M<6e4?"just now":M<36e5?`${Math.floor(M/6e4)}m ago`:M<864e5?`${Math.floor(M/36e5)}h ago`:b.toLocaleDateString()}function Me(L){return L==="active"?"text-success":L==="archived"?"text-muted":"text-warn"}return bt(de),(L,b)=>(S(),C("div",jc,[l("div",Nc,[l("div",Lc,[b[10]||(b[10]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Thread Registry"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),l("div",Fc,[c.value?(S(),C("span",{key:0,class:G([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(c.value),3)):Q("",!0),l("button",{onClick:b[0]||(b[0]=x=>i.value=!i.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},$(i.value?"Cancel":"+ New Root Thread"),1),l("button",{onClick:de,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),i.value?(S(),C("div",Vc,[l("div",Hc,[l("div",null,[b[11]||(b[11]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":b[1]||(b[1]=x=>a.value.name=x),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),[[we,a.value.name]])]),l("div",null,[b[12]||(b[12]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),me(l("input",{"onUpdate:modelValue":b[2]||(b[2]=x=>a.value.threadId=x),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),[[we,a.value.threadId,void 0,{number:!0}]])]),l("div",null,[b[13]||(b[13]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),me(l("select",{"onUpdate:modelValue":b[3]||(b[3]=x=>a.value.client=x),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"},[(S(),C(ie,null,_e(B,x=>l("option",{key:x,value:x},$(x),9,Uc)),64))],512),[[ns,a.value.client]])])]),l("div",Bc,[l("button",{onClick:W,disabled:h.value||!a.value.name.trim()||!a.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(h.value?"Creating…":"Create Root Thread"),9,Kc)])])):Q("",!0)]),s.value&&t.value.length===0?(S(),C("div",Wc,"Loading threads…")):n.value?(S(),C("div",zc,$(n.value),1)):t.value.length===0?(S(),C("div",Jc,"No threads registered")):Q("",!0),H.value.length>0?(S(),C("div",qc,[b[19]||(b[19]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),l("div",Gc,[(S(!0),C(ie,null,_e(H.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl overflow-hidden"},[l("div",Yc,[l("div",Zc,[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),d.value===x.threadId?me((S(),C("input",{key:0,"onUpdate:modelValue":b[4]||(b[4]=P=>p.value=P),onBlur:P=>Se(x.threadId),onKeyup:[b[5]||(b[5]=nn(P=>P.target.blur(),["enter"])),b[6]||(b[6]=nn(P=>d.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)),[[we,p.value]]):(S(),C("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:P=>te(x),title:"Double-click to rename"},$(x.name),41,Xc)),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",eu,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>Ue(x,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"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,su)),64))],40,tu),l("span",nu,$(X(x.lastActiveAt)),1),l("div",ou,[l("div",ru,[l("button",{onClick:P=>be(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,iu),b[14]||(b[14]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",lu,[l("button",{onClick:P=>$t(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,au),b[15]||(b[15]=l("span",{class:"text-xs text-muted"},"Daily",-1))]),l("div",cu,[l("button",{onClick:P=>ge(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,uu),b[16]||(b[16]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:P=>N(x.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},$(r.value.has(x.threadId)?"▾ Children":"▸ Children"),9,du),l("button",{onClick:P=>{m.value=m.value===x.threadId?null:x.threadId,v.value={name:"",threadId:0,client:"claude"},F.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,fu),l("button",{onClick:P=>se(x),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,pu)])]),m.value===x.threadId?(S(),C("div",hu,[l("div",mu,[me(l("input",{"onUpdate:modelValue":b[7]||(b[7]=P=>v.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),[[we,v.value.name]]),me(l("input",{"onUpdate:modelValue":b[8]||(b[8]=P=>v.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),[[we,v.value.threadId,void 0,{number:!0}]]),me(l("select",{"onUpdate:modelValue":b[9]||(b[9]=P=>v.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"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,gu)),64))],512),[[ns,v.value.client]])]),l("div",xu,[l("button",{onClick:P=>fe(x.threadId),disabled:D.value||!v.value.name.trim()||!v.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"},$(D.value?"Creating…":"Create Branch"),9,vu),F.value?(S(),C("span",{key:0,class:G([F.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},$(F.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(x.threadId)&&o.value[x.threadId]?(S(),C("div",yu,[o.value[x.threadId].length===0?(S(),C("div",bu,"No children")):Q("",!0),(S(!0),C(ie,null,_e(o.value[x.threadId],P=>{var $e,ne;return S(),C("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"},[l("span",{class:G(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",($e=E[P.type])==null?void 0:$e.classes])},$((ne=E[P.type])==null?void 0:ne.emoji)+" "+$(P.type.toUpperCase()),3),l("span",_u,$(P.name),1),l("span",{class:G(["text-xs",Me(P.status)])},$(P.status),3),l("span",wu,"ID: "+$(P.threadId),1),l("select",{value:P.client,onChange:Ae=>Ue(P,Ae.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"},[(S(),C(ie,null,_e(B,Ae=>l("option",{key:Ae,value:Ae},$(Ae),9,Cu)),64))],40,Su),l("span",Tu,$(X(P.lastActiveAt)),1),l("div",ku,[P.type==="branch"?(S(),C("div",$u,[l("button",{onClick:Ae=>be(P),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",P.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["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,Au),b[17]||(b[17]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),P.type==="branch"?(S(),C("div",Eu,[l("button",{onClick:Ae=>ge(P),class:G(["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"},[l("span",{class:G(["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,Pu),b[18]||(b[18]=l("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),P.type!=="root"?(S(),C("button",{key:2,onClick:Ae=>se(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,Iu)):Q("",!0)])])}),128))])):Q("",!0)])}),128))])])):Q("",!0),Z.value.length>0?(S(),C("div",Mu,[b[20]||(b[20]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),l("div",Ou,[(S(!0),C(ie,null,_e(Z.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),l("span",Ru,$(x.name),1),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",Du,"ID: "+$(x.threadId),1),l("span",ju,$(x.client),1),l("span",Nu,$(X(x.lastActiveAt)),1),l("button",{onClick:P=>se(x),class:"ml-auto 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,Lu)])}),128))])])):Q("",!0),V.value.length>0?(S(),C("div",Fu,[b[23]||(b[23]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),l("div",Vu,[(S(!0),C(ie,null,_e(V.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),l("span",Hu,$(x.name),1),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",Uu,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>Ue(x,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"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,Ku)),64))],40,Bu),l("span",Wu,$(X(x.lastActiveAt)),1),l("div",zu,[l("div",Ju,[l("button",{onClick:P=>be(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,qu),b[21]||(b[21]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",Gu,[l("button",{onClick:P=>ge(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Yu),b[22]||(b[22]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:P=>se(x),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,Zu)])])}),128))])])):Q("",!0),le.value.length>0?(S(),C("div",Qu,[b[24]||(b[24]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),l("div",Xu,[(S(!0),C(ie,null,_e(le.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),l("span",ed,$(x.name),1),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",td,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>Ue(x,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"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,nd)),64))],40,sd),l("span",od,$(X(x.lastActiveAt)),1),l("button",{onClick:P=>se(x),class:"ml-auto 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,rd)])}),128))])])):Q("",!0)]))}}),ld={class:"animate-fade-in"},ad={class:"glass rounded-xl p-6 mb-6"},cd={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},ud={class:"flex items-center gap-3"},dd=["disabled"],fd={key:0,class:"text-center py-8 text-textSecondary text-sm"},pd={key:1,class:"space-y-6"},hd={class:"glass rounded-xl p-4 border border-gray-700/50"},md={class:"flex items-center gap-4"},gd={class:"flex justify-between text-xs text-muted mt-2"},xd={class:"font-mono"},vd={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},yd={class:"glass rounded-xl p-4 border border-gray-700/50"},bd={class:"flex items-center gap-4"},_d={class:"flex justify-between text-xs text-muted mt-2"},wd={class:"font-mono"},Sd={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Cd={class:"grid grid-cols-3 gap-4"},Td={class:"text-sm font-medium text-textSecondary"},kd=kt({__name:"SettingsTab",setup(e){const t=j(!0),s=j(!1),n=j(""),o=j(50),r=j(50),i=j(1440),a=j(1440),c=Ke(()=>o.value!==r.value||i.value!==a.value);async function h(){t.value=!0;try{const[p,m]=await Promise.all([ye("/api/settings/bootstrap-message-count"),ye("/api/settings/wait-timeout")]);o.value=p.count,r.value=p.count,i.value=m.minutes,a.value=m.minutes}finally{t.value=!1}}async function d(){s.value=!0,n.value="";try{const p={Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},[m,v]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:p,body:JSON.stringify({count:o.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:p,body:JSON.stringify({minutes:i.value})})]);for(const B of[m,v])if(!B.ok){const E=await B.json().catch(()=>({error:B.statusText}));throw new Error(E.error??B.statusText)}const F=await m.json(),D=await v.json();r.value=F.count,o.value=F.count,a.value=D.minutes,i.value=D.minutes,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(p){n.value="Error: "+p.message}finally{s.value=!1}}return bt(h),(p,m)=>(S(),C("div",ld,[l("div",ad,[l("div",cd,[m[4]||(m[4]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Settings"),l("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),l("div",ud,[n.value?(S(),C("span",{key:0,class:G([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(n.value),3)):Q("",!0),l("button",{onClick:d,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,dd)])]),t.value?(S(),C("div",fd,"Loading…")):(S(),C("div",pd,[l("div",hd,[m[8]||(m[8]=l("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),m[9]||(m[9]=l("p",{class:"text-xs text-textSecondary mb-3"},[gt(" Number of recent messages injected into the agent's bootstrap context. Set to "),l("span",{class:"font-mono text-accentLight"},"0"),gt(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),l("div",md,[me(l("input",{"onUpdate:modelValue":m[0]||(m[0]=v=>o.value=v),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[we,o.value,void 0,{number:!0}]]),me(l("input",{"onUpdate:modelValue":m[1]||(m[1]=v=>o.value=v),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),[[we,o.value,void 0,{number:!0}]])]),l("div",gd,[m[5]||(m[5]=l("span",null,"Off",-1)),l("span",xd,$(o.value)+" messages",1),m[6]||(m[6]=l("span",null,"Max",-1))]),o.value===0?(S(),C("div",vd,[...m[7]||(m[7]=[gt(" Message buffer injection is ",-1),l("strong",null,"disabled",-1),gt(". 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)])])):Q("",!0)]),l("div",yd,[m[12]||(m[12]=l("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),m[13]||(m[13]=l("p",{class:"text-xs text-textSecondary mb-3"},[gt(" Maximum time (in minutes) a single "),l("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),gt(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),l("div",bd,[me(l("input",{"onUpdate:modelValue":m[2]||(m[2]=v=>i.value=v),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[we,i.value,void 0,{number:!0}]]),me(l("input",{"onUpdate:modelValue":m[3]||(m[3]=v=>i.value=v),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),[[we,i.value,void 0,{number:!0}]])]),l("div",_d,[m[10]||(m[10]=l("span",null,"1 min",-1)),l("span",wd,$(i.value>=60?Math.floor(i.value/60)+"h "+i.value%60+"m":i.value+" min"),1),m[11]||(m[11]=l("span",null,"24h",-1))])]),l("div",Sd,[m[17]||(m[17]=l("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),l("div",Cd,[l("div",null,[m[14]||(m[14]=l("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),l("span",{class:G(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},$(r.value>0?`${r.value} messages`:"Disabled"),3)]),l("div",null,[m[15]||(m[15]=l("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),l("span",Td,$(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1)]),l("div",null,[m[16]||(m[16]=l("div",{class:"text-xs text-muted mb-1"},"Status",-1)),l("span",{class:G(["text-sm font-medium",c.value?"text-warn":"text-textSecondary"])},$(c.value?"Unsaved changes":"Saved"),3)])])])]))])]))}}),$d={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Ad={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Ed=["disabled"],Pd={key:0,class:"mt-3 text-sm text-danger"},Id={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},Md={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Od={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Rd={class:"flex items-center gap-4"},Dd={class:"text-sm text-textSecondary font-mono"},jd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Nd={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Ld={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Fd={class:"text-2xl font-bold font-mono"},Vd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Hd={class:"text-2xl font-bold font-mono"},Ud={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Bd={class:"text-2xl font-bold font-mono"},Kd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Wd={class:"flex items-center gap-2 mb-2"},zd={class:"text-2xl font-bold font-mono"},Jd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},qd={class:"text-2xl font-bold font-mono"},Gd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Yd={class:"text-2xl font-bold font-mono"},Zd={class:"max-w-7xl mx-auto px-4 sm:px-6"},Qd={class:"flex gap-6 border-b border-gray-800/50 mb-6"},Xd=["onClick"],ef={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ds="sensorium_token",tf=kt({__name:"App",setup(e){const t=j(!1),s=j(""),n=j(""),o=j(!1),r=j(null),i=j("sessions");let a=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:"settings",label:"Settings"}],h={sessions:na,notes:_a,templates:nc,skills:Dc,threads:id,settings:kd},d=Ke(()=>h[i.value]),p=Ke(()=>{if(!r.value)return"—";const B=Math.floor(r.value.uptime),E=Math.floor(B/86400),H=Math.floor(B%86400/3600),Z=Math.floor(B%3600/60);return E>0?`${E}d ${H}h`:H>0?`${H}h ${Z}m`:`${Z}m`});async function m(){const B=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Bt(B),await F(),localStorage.setItem(ds,B),t.value=!0,D()}catch(E){const H=E;H.status===401?n.value="Invalid token":n.value=H.message??"Connection failed",Bt("")}finally{o.value=!1}}function v(){localStorage.removeItem(ds),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Bt("")}async function F(){r.value=await ye("/api/status")}function D(){a&&clearInterval(a),a=setInterval(F,3e4)}return bt(async()=>{const B=localStorage.getItem(ds);if(B){s.value=B;try{Bt(B),await F(),t.value=!0,D()}catch{localStorage.removeItem(ds),Bt("")}}}),yn(()=>{a&&clearInterval(a)}),(B,E)=>{var H,Z,V,le,de,J,N,W,fe,te,Se;return t.value?(S(),C("div",Id,[l("header",Md,[l("div",Od,[E[3]||(E[3]=Be('<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)),l("div",Rd,[E[2]||(E[2]=l("div",{class:"flex items-center gap-2 text-sm"},[l("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),l("span",{class:"text-textSecondary"},"Connected")],-1)),l("div",Dd,$(p.value),1),l("button",{onClick:v,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),l("div",jd,[l("div",Nd,[l("div",Ld,[E[4]||(E[4]=Be('<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)),l("div",Fd,$(((H=r.value)==null?void 0:H.activeSessions)??0),1)]),l("div",Vd,[E[5]||(E[5]=Be('<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)),l("div",Hd,$(((V=(Z=r.value)==null?void 0:Z.memory)==null?void 0:V.totalSemanticNotes)??0),1)]),l("div",Ud,[E[6]||(E[6]=Be('<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)),l("div",Bd,$(((de=(le=r.value)==null?void 0:le.memory)==null?void 0:de.totalEpisodes)??0),1)]),l("div",Kd,[l("div",Wd,[l("span",{class:G((((N=(J=r.value)==null?void 0:J.memory)==null?void 0:N.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...E[7]||(E[7]=[l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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),E[8]||(E[8]=l("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),l("div",zd,$(((fe=(W=r.value)==null?void 0:W.memory)==null?void 0:fe.unconsolidatedEpisodes)??0),1)]),l("div",Jd,[E[9]||(E[9]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-accent"><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="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Procedures</span></div>',1)),l("div",qd,$(((Se=(te=r.value)==null?void 0:te.memory)==null?void 0:Se.totalProcedures)??0),1)]),l("div",Gd,[E[10]||(E[10]=Be('<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)),l("div",Yd,$(p.value),1)])])]),l("div",Zd,[l("nav",Qd,[(S(),C(ie,null,_e(c,be=>l("button",{key:be.id,onClick:Ue=>i.value=be.id,class:G(["pb-3 text-sm font-medium transition",i.value===be.id?"tab-active":"tab-inactive"])},$(be.label),11,Xd)),64))])]),l("div",ef,[(S(),ur($i(d.value),{status:r.value},null,8,["status"]))])])):(S(),C("div",$d,[l("div",Ad,[E[1]||(E[1]=Be('<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)),me(l("input",{"onUpdate:modelValue":E[0]||(E[0]=be=>s.value=be),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:nn(m,["enter"])},null,544),[[we,s.value]]),l("button",{onClick:m,disabled:o.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"},$(o.value?"Connecting...":"Connect"),9,Ed),n.value?(S(),C("p",Pd,$(n.value),1)):Q("",!0)])]))}}});Vl(tf).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">