codexapp 0.1.4

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.
@@ -0,0 +1,38 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/**
2
+ * @vue/shared v3.5.28
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function Io(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const st={},dr=[],sn=()=>{},Oa=()=>!1,ys=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ro=e=>e.startsWith("onUpdate:"),wt=Object.assign,$o=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Hc=Object.prototype.hasOwnProperty,Qe=(e,t)=>Hc.call(e,t),$e=Array.isArray,fr=e=>Kr(e)==="[object Map]",ja=e=>Kr(e)==="[object Set]",ci=e=>Kr(e)==="[object Date]",je=e=>typeof e=="function",ft=e=>typeof e=="string",Gt=e=>typeof e=="symbol",Je=e=>e!==null&&typeof e=="object",La=e=>(Je(e)||je(e))&&je(e.then)&&je(e.catch),Da=Object.prototype.toString,Kr=e=>Da.call(e),Uc=e=>Kr(e).slice(8,-1),Ba=e=>Kr(e)==="[object Object]",Po=e=>ft(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ir=Io(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ws=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Vc=/-\w/g,Ft=ws(e=>e.replace(Vc,t=>t.slice(1).toUpperCase())),qc=/\B([A-Z])/g,Mn=ws(e=>e.replace(qc,"-$1").toLowerCase()),bs=ws(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ns=ws(e=>e?`on${bs(e)}`:""),In=(e,t)=>!Object.is(e,t),os=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Fa=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Mo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Wc=e=>{const t=ft(e)?Number(e):NaN;return isNaN(t)?e:t};let ui;const _s=()=>ui||(ui=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Jn(e){if($e(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=ft(r)?Yc(r):Jn(r);if(s)for(const o in s)t[o]=s[o]}return t}else if(ft(e)||Je(e))return e}const Kc=/;(?![^(]*\))/g,Gc=/:([^]+)/,zc=/\/\*[^]*?\*\//g;function Yc(e){const t={};return e.replace(zc,"").split(Kc).forEach(n=>{if(n){const r=n.split(Gc);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ut(e){let t="";if(ft(e))t=e;else if($e(e))for(let n=0;n<e.length;n++){const r=ut(e[n]);r&&(t+=r+" ")}else if(Je(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Qc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Jc=Io(Qc);function Ha(e){return!!e||e===""}function Xc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=No(e[r],t[r]);return n}function No(e,t){if(e===t)return!0;let n=ci(e),r=ci(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Gt(e),r=Gt(t),n||r)return e===t;if(n=$e(e),r=$e(t),n||r)return n&&r?Xc(e,t):!1;if(n=Je(e),r=Je(t),n||r){if(!n||!r)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const i in e){const a=e.hasOwnProperty(i),l=t.hasOwnProperty(i);if(a&&!l||!a&&l||!No(e[i],t[i]))return!1}}return String(e)===String(t)}const Ua=e=>!!(e&&e.__v_isRef===!0),Te=e=>ft(e)?e:e==null?"":$e(e)||Je(e)&&(e.toString===Da||!je(e.toString))?Ua(e)?Te(e.value):JSON.stringify(e,Va,2):String(e),Va=(e,t)=>Ua(t)?Va(e,t.value):fr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[Os(r,o)+" =>"]=s,n),{})}:ja(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Os(n))}:Gt(t)?Os(t):Je(t)&&!$e(t)&&!Ba(t)?String(t):t,Os=(e,t="")=>{var n;return Gt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
+ * @vue/reactivity v3.5.28
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let Mt;class Zc{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=Mt,!t&&Mt&&(this.index=(Mt.scopes||(Mt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Mt;try{return Mt=this,t()}finally{Mt=n}}}on(){++this._on===1&&(this.prevScope=Mt,Mt=this)}off(){this._on>0&&--this._on===0&&(Mt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function eu(){return Mt}let it;const js=new WeakSet;class qa{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,Mt&&Mt.active&&Mt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,js.has(this)&&(js.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ka(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,di(this),Ga(this);const t=it,n=qt;it=this,qt=!0;try{return this.fn()}finally{za(this),it=t,qt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Lo(t);this.deps=this.depsTail=void 0,di(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?js.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){oo(this)&&this.run()}get dirty(){return oo(this)}}let Wa=0,Rr,$r;function Ka(e,t=!1){if(e.flags|=8,t){e.next=$r,$r=e;return}e.next=Rr,Rr=e}function Oo(){Wa++}function jo(){if(--Wa>0)return;if($r){let t=$r;for($r=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Rr;){let t=Rr;for(Rr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function Ga(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function za(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Lo(r),tu(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function oo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ya(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ya(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Lr)||(e.globalVersion=Lr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!oo(e))))return;e.flags|=2;const t=e.dep,n=it,r=qt;it=e,qt=!0;try{Ga(e);const s=e.fn(e._value);(t.version===0||In(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{it=n,qt=r,za(e),e.flags&=-3}}function Lo(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Lo(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function tu(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let qt=!0;const Qa=[];function gn(){Qa.push(qt),qt=!1}function vn(){const e=Qa.pop();qt=e===void 0?!0:e}function di(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=it;it=void 0;try{t()}finally{it=n}}}let Lr=0;class nu{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Do{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(!it||!qt||it===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==it)n=this.activeLink=new nu(it,this),it.deps?(n.prevDep=it.depsTail,it.depsTail.nextDep=n,it.depsTail=n):it.deps=it.depsTail=n,Ja(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=it.depsTail,n.nextDep=void 0,it.depsTail.nextDep=n,it.depsTail=n,it.deps===n&&(it.deps=r)}return n}trigger(t){this.version++,Lr++,this.notify(t)}notify(t){Oo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{jo()}}}function Ja(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ja(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const io=new WeakMap,Yn=Symbol(""),ao=Symbol(""),Dr=Symbol("");function xt(e,t,n){if(qt&&it){let r=io.get(e);r||io.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Do),s.map=r,s.key=n),s.track()}}function hn(e,t,n,r,s,o){const i=io.get(e);if(!i){Lr++;return}const a=l=>{l&&l.trigger()};if(Oo(),t==="clear")i.forEach(a);else{const l=$e(e),d=l&&Po(n);if(l&&n==="length"){const u=Number(r);i.forEach((f,m)=>{(m==="length"||m===Dr||!Gt(m)&&m>=u)&&a(f)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),d&&a(i.get(Dr)),t){case"add":l?d&&a(i.get("length")):(a(i.get(Yn)),fr(e)&&a(i.get(ao)));break;case"delete":l||(a(i.get(Yn)),fr(e)&&a(i.get(ao)));break;case"set":fr(e)&&a(i.get(Yn));break}}jo()}function ir(e){const t=ze(e);return t===e?t:(xt(t,"iterate",Dr),Bt(e)?t:t.map(zt))}function ks(e){return xt(e=ze(e),"iterate",Dr),e}function xn(e,t){return yn(e)?gr(Qn(e)?zt(t):t):zt(t)}const ru={__proto__:null,[Symbol.iterator](){return Ls(this,Symbol.iterator,e=>xn(this,e))},concat(...e){return ir(this).concat(...e.map(t=>$e(t)?ir(t):t))},entries(){return Ls(this,"entries",e=>(e[1]=xn(this,e[1]),e))},every(e,t){return ln(this,"every",e,t,void 0,arguments)},filter(e,t){return ln(this,"filter",e,t,n=>n.map(r=>xn(this,r)),arguments)},find(e,t){return ln(this,"find",e,t,n=>xn(this,n),arguments)},findIndex(e,t){return ln(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ln(this,"findLast",e,t,n=>xn(this,n),arguments)},findLastIndex(e,t){return ln(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ln(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ds(this,"includes",e)},indexOf(...e){return Ds(this,"indexOf",e)},join(e){return ir(this).join(e)},lastIndexOf(...e){return Ds(this,"lastIndexOf",e)},map(e,t){return ln(this,"map",e,t,void 0,arguments)},pop(){return kr(this,"pop")},push(...e){return kr(this,"push",e)},reduce(e,...t){return fi(this,"reduce",e,t)},reduceRight(e,...t){return fi(this,"reduceRight",e,t)},shift(){return kr(this,"shift")},some(e,t){return ln(this,"some",e,t,void 0,arguments)},splice(...e){return kr(this,"splice",e)},toReversed(){return ir(this).toReversed()},toSorted(e){return ir(this).toSorted(e)},toSpliced(...e){return ir(this).toSpliced(...e)},unshift(...e){return kr(this,"unshift",e)},values(){return Ls(this,"values",e=>xn(this,e))}};function Ls(e,t,n){const r=ks(e),s=r[t]();return r!==e&&!Bt(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const su=Array.prototype;function ln(e,t,n,r,s,o){const i=ks(e),a=i!==e&&!Bt(e),l=i[t];if(l!==su[t]){const f=l.apply(e,o);return a?zt(f):f}let d=n;i!==e&&(a?d=function(f,m){return n.call(this,xn(e,f),m,e)}:n.length>2&&(d=function(f,m){return n.call(this,f,m,e)}));const u=l.call(i,d,r);return a&&s?s(u):u}function fi(e,t,n,r){const s=ks(e);let o=n;return s!==e&&(Bt(e)?n.length>3&&(o=function(i,a,l){return n.call(this,i,a,l,e)}):o=function(i,a,l){return n.call(this,i,xn(e,a),l,e)}),s[t](o,...r)}function Ds(e,t,n){const r=ze(e);xt(r,"iterate",Dr);const s=r[t](...n);return(s===-1||s===!1)&&Ho(n[0])?(n[0]=ze(n[0]),r[t](...n)):s}function kr(e,t,n=[]){gn(),Oo();const r=ze(e)[t].apply(e,n);return jo(),vn(),r}const ou=Io("__proto__,__v_isRef,__isVue"),Xa=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Gt));function iu(e){Gt(e)||(e=String(e));const t=ze(this);return xt(t,"has",e),t.hasOwnProperty(e)}class Za{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?gu:rl:o?nl:tl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=$e(t);if(!s){let l;if(i&&(l=ru[n]))return l;if(n==="hasOwnProperty")return iu}const a=Reflect.get(t,n,At(t)?t:r);if((Gt(n)?Xa.has(n):ou(n))||(s||xt(t,"get",n),o))return a;if(At(a)){const l=i&&Po(n)?a:a.value;return s&&Je(l)?co(l):l}return Je(a)?s?co(a):Ts(a):a}}class el extends Za{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];const i=$e(t)&&Po(n);if(!this._isShallow){const d=yn(o);if(!Bt(r)&&!yn(r)&&(o=ze(o),r=ze(r)),!i&&At(o)&&!At(r))return d||(o.value=r),!0}const a=i?Number(n)<t.length:Qe(t,n),l=Reflect.set(t,n,r,At(t)?t:s);return t===ze(s)&&(a?In(r,o)&&hn(t,"set",n,r):hn(t,"add",n,r)),l}deleteProperty(t,n){const r=Qe(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&hn(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!Gt(n)||!Xa.has(n))&&xt(t,"has",n),r}ownKeys(t){return xt(t,"iterate",$e(t)?"length":Yn),Reflect.ownKeys(t)}}class au extends Za{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const lu=new el,cu=new au,uu=new el(!0);const lo=e=>e,Xr=e=>Reflect.getPrototypeOf(e);function du(e,t,n){return function(...r){const s=this.__v_raw,o=ze(s),i=fr(o),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,d=s[e](...r),u=n?lo:t?gr:zt;return!t&&xt(o,"iterate",l?ao:Yn),wt(Object.create(d),{next(){const{value:f,done:m}=d.next();return m?{value:f,done:m}:{value:a?[u(f[0]),u(f[1])]:u(f),done:m}}})}}function Zr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function fu(e,t){const n={get(s){const o=this.__v_raw,i=ze(o),a=ze(s);e||(In(s,a)&&xt(i,"get",s),xt(i,"get",a));const{has:l}=Xr(i),d=t?lo:e?gr:zt;if(l.call(i,s))return d(o.get(s));if(l.call(i,a))return d(o.get(a));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&xt(ze(s),"iterate",Yn),s.size},has(s){const o=this.__v_raw,i=ze(o),a=ze(s);return e||(In(s,a)&&xt(i,"has",s),xt(i,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const i=this,a=i.__v_raw,l=ze(a),d=t?lo:e?gr:zt;return!e&&xt(l,"iterate",Yn),a.forEach((u,f)=>s.call(o,d(u),d(f),i))}};return wt(n,e?{add:Zr("add"),set:Zr("set"),delete:Zr("delete"),clear:Zr("clear")}:{add(s){!t&&!Bt(s)&&!yn(s)&&(s=ze(s));const o=ze(this);return Xr(o).has.call(o,s)||(o.add(s),hn(o,"add",s,s)),this},set(s,o){!t&&!Bt(o)&&!yn(o)&&(o=ze(o));const i=ze(this),{has:a,get:l}=Xr(i);let d=a.call(i,s);d||(s=ze(s),d=a.call(i,s));const u=l.call(i,s);return i.set(s,o),d?In(o,u)&&hn(i,"set",s,o):hn(i,"add",s,o),this},delete(s){const o=ze(this),{has:i,get:a}=Xr(o);let l=i.call(o,s);l||(s=ze(s),l=i.call(o,s)),a&&a.call(o,s);const d=o.delete(s);return l&&hn(o,"delete",s,void 0),d},clear(){const s=ze(this),o=s.size!==0,i=s.clear();return o&&hn(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=du(s,e,t)}),n}function Bo(e,t){const n=fu(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Qe(n,s)&&s in r?n:r,s,o)}const hu={get:Bo(!1,!1)},pu={get:Bo(!1,!0)},mu={get:Bo(!0,!1)};const tl=new WeakMap,nl=new WeakMap,rl=new WeakMap,gu=new WeakMap;function vu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function yu(e){return e.__v_skip||!Object.isExtensible(e)?0:vu(Uc(e))}function Ts(e){return yn(e)?e:Fo(e,!1,lu,hu,tl)}function sl(e){return Fo(e,!1,uu,pu,nl)}function co(e){return Fo(e,!0,cu,mu,rl)}function Fo(e,t,n,r,s){if(!Je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=yu(e);if(o===0)return e;const i=s.get(e);if(i)return i;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function Qn(e){return yn(e)?Qn(e.__v_raw):!!(e&&e.__v_isReactive)}function yn(e){return!!(e&&e.__v_isReadonly)}function Bt(e){return!!(e&&e.__v_isShallow)}function Ho(e){return e?!!e.__v_raw:!1}function ze(e){const t=e&&e.__v_raw;return t?ze(t):e}function wu(e){return!Qe(e,"__v_skip")&&Object.isExtensible(e)&&Fa(e,"__v_skip",!0),e}const zt=e=>Je(e)?Ts(e):e,gr=e=>Je(e)?co(e):e;function At(e){return e?e.__v_isRef===!0:!1}function V(e){return ol(e,!1)}function bu(e){return ol(e,!0)}function ol(e,t){return At(e)?e:new _u(e,t)}class _u{constructor(t,n){this.dep=new Do,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ze(t),this._value=n?t:zt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Bt(t)||yn(t);t=r?t:ze(t),In(t,n)&&(this._rawValue=t,this._value=r?t:zt(t),this.dep.trigger())}}function Ee(e){return At(e)?e.value:e}const ku={get:(e,t,n)=>t==="__v_raw"?e:Ee(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return At(s)&&!At(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function il(e){return Qn(e)?e:new Proxy(e,ku)}class Tu{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Do(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Lr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&it!==this)return Ka(this,!0),!0}get value(){const t=this.dep.track();return Ya(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Su(e,t,n=!1){let r,s;return je(e)?r=e:(r=e.get,s=e.set),new Tu(r,s,n)}const es={},us=new WeakMap;let Wn;function xu(e,t=!1,n=Wn){if(n){let r=us.get(n);r||us.set(n,r=[]),r.push(e)}}function Cu(e,t,n=st){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:l}=n,d=q=>s?q:Bt(q)||s===!1||s===0?pn(q,1):pn(q);let u,f,m,y,$=!1,C=!1;if(At(e)?(f=()=>e.value,$=Bt(e)):Qn(e)?(f=()=>d(e),$=!0):$e(e)?(C=!0,$=e.some(q=>Qn(q)||Bt(q)),f=()=>e.map(q=>{if(At(q))return q.value;if(Qn(q))return d(q);if(je(q))return l?l(q,2):q()})):je(e)?t?f=l?()=>l(e,2):e:f=()=>{if(m){gn();try{m()}finally{vn()}}const q=Wn;Wn=u;try{return l?l(e,3,[y]):e(y)}finally{Wn=q}}:f=sn,t&&s){const q=f,fe=s===!0?1/0:s;f=()=>pn(q(),fe)}const B=eu(),z=()=>{u.stop(),B&&B.active&&$o(B.effects,u)};if(o&&t){const q=t;t=(...fe)=>{q(...fe),z()}}let M=C?new Array(e.length).fill(es):es;const W=q=>{if(!(!(u.flags&1)||!u.dirty&&!q))if(t){const fe=u.run();if(s||$||(C?fe.some((le,ne)=>In(le,M[ne])):In(fe,M))){m&&m();const le=Wn;Wn=u;try{const ne=[fe,M===es?void 0:C&&M[0]===es?[]:M,y];M=fe,l?l(t,3,ne):t(...ne)}finally{Wn=le}}}else u.run()};return a&&a(W),u=new qa(f),u.scheduler=i?()=>i(W,!1):W,y=q=>xu(q,!1,u),m=u.onStop=()=>{const q=us.get(u);if(q){if(l)l(q,4);else for(const fe of q)fe();us.delete(u)}},t?r?W(!0):M=u.run():i?i(W.bind(null,!0),!0):u.run(),z.pause=u.pause.bind(u),z.resume=u.resume.bind(u),z.stop=z,z}function pn(e,t=1/0,n){if(t<=0||!Je(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,At(e))pn(e.value,t,n);else if($e(e))for(let r=0;r<e.length;r++)pn(e[r],t,n);else if(ja(e)||fr(e))e.forEach(r=>{pn(r,t,n)});else if(Ba(e)){for(const r in e)pn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&pn(e[r],t,n)}return e}/**
10
+ * @vue/runtime-core v3.5.28
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function Gr(e,t,n,r){try{return r?e(...r):e()}catch(s){Ss(s,t,n)}}function Yt(e,t,n,r){if(je(e)){const s=Gr(e,t,n,r);return s&&La(s)&&s.catch(o=>{Ss(o,t,n)}),s}if($e(e)){const s=[];for(let o=0;o<e.length;o++)s.push(Yt(e[o],t,n,r));return s}}function Ss(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||st;if(t){let a=t.parent;const l=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,l,d)===!1)return}a=a.parent}if(o){gn(),Gr(o,null,10,[e,l,d]),vn();return}}Eu(e,n,s,r,i)}function Eu(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const Pt=[];let en=-1;const hr=[];let Cn=null,lr=0;const al=Promise.resolve();let ds=null;function Wt(e){const t=ds||al;return e?t.then(this?e.bind(this):e):t}function Au(e){let t=en+1,n=Pt.length;for(;t<n;){const r=t+n>>>1,s=Pt[r],o=Br(s);o<e||o===e&&s.flags&2?t=r+1:n=r}return t}function Uo(e){if(!(e.flags&1)){const t=Br(e),n=Pt[Pt.length-1];!n||!(e.flags&2)&&t>=Br(n)?Pt.push(e):Pt.splice(Au(t),0,e),e.flags|=1,ll()}}function ll(){ds||(ds=al.then(ul))}function Iu(e){$e(e)?hr.push(...e):Cn&&e.id===-1?Cn.splice(lr+1,0,e):e.flags&1||(hr.push(e),e.flags|=1),ll()}function hi(e,t,n=en+1){for(;n<Pt.length;n++){const r=Pt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Pt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function cl(e){if(hr.length){const t=[...new Set(hr)].sort((n,r)=>Br(n)-Br(r));if(hr.length=0,Cn){Cn.push(...t);return}for(Cn=t,lr=0;lr<Cn.length;lr++){const n=Cn[lr];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Cn=null,lr=0}}const Br=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ul(e){try{for(en=0;en<Pt.length;en++){const t=Pt[en];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Gr(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;en<Pt.length;en++){const t=Pt[en];t&&(t.flags&=-2)}en=-1,Pt.length=0,cl(),ds=null,(Pt.length||hr.length)&&ul()}}let _t=null,dl=null;function fs(e){const t=_t;return _t=e,dl=e&&e.type.__scopeId||null,t}function nt(e,t=_t,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&ms(-1);const o=fs(t);let i;try{i=e(...s)}finally{fs(o),r._d&&ms(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Rn(e,t){if(_t===null)return e;const n=Rs(_t),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,i,a,l=st]=t[s];o&&(je(o)&&(o={mounted:o,updated:o}),o.deep&&pn(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:a,modifiers:l}))}return e}function Fn(e,t,n,r){const s=e.dirs,o=t&&t.dirs;for(let i=0;i<s.length;i++){const a=s[i];o&&(a.oldValue=o[i].value);let l=a.dir[r];l&&(gn(),Yt(l,n,8,[e.el,a,e,t]),vn())}}function is(e,t){if(Et){let n=Et.provides;const r=Et.parent&&Et.parent.provides;r===n&&(n=Et.provides=Object.create(r)),n[e]=t}}function Kt(e,t,n=!1){const r=Go();if(r||mr){let s=mr?mr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&je(t)?t.call(r&&r.proxy):t}}const Ru=Symbol.for("v-scx"),$u=()=>Kt(Ru);function dt(e,t,n){return fl(e,t,n)}function fl(e,t,n=st){const{immediate:r,deep:s,flush:o,once:i}=n,a=wt({},n),l=t&&r||!t&&o!=="post";let d;if(Vr){if(o==="sync"){const y=$u();d=y.__watcherHandles||(y.__watcherHandles=[])}else if(!l){const y=()=>{};return y.stop=sn,y.resume=sn,y.pause=sn,y}}const u=Et;a.call=(y,$,C)=>Yt(y,u,$,C);let f=!1;o==="post"?a.scheduler=y=>{St(y,u&&u.suspense)}:o!=="sync"&&(f=!0,a.scheduler=(y,$)=>{$?y():Uo(y)}),a.augmentJob=y=>{t&&(y.flags|=4),f&&(y.flags|=2,u&&(y.id=u.uid,y.i=u))};const m=Cu(e,t,a);return Vr&&(d?d.push(m):l&&m()),m}function Pu(e,t,n){const r=this.proxy,s=ft(e)?e.includes(".")?hl(r,e):()=>r[e]:e.bind(r,r);let o;je(t)?o=t:(o=t.handler,n=t);const i=zr(this),a=fl(s,o.bind(r),n);return i(),a}function hl(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const pl=Symbol("_vte"),ml=e=>e.__isTeleport,Pr=e=>e&&(e.disabled||e.disabled===""),pi=e=>e&&(e.defer||e.defer===""),mi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,gi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,uo=(e,t)=>{const n=e&&e.to;return ft(n)?t?t(n):null:n},gl={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,a,l,d){const{mc:u,pc:f,pbc:m,o:{insert:y,querySelector:$,createText:C,createComment:B}}=d,z=Pr(t.props);let{shapeFlag:M,children:W,dynamicChildren:q}=t;if(e==null){const fe=t.el=C(""),le=t.anchor=C("");y(fe,n,r),y(le,n,r);const ne=(te,ee)=>{M&16&&u(W,te,ee,s,o,i,a,l)},pe=()=>{const te=t.target=uo(t.props,$),ee=fo(te,t,C,y);te&&(i!=="svg"&&mi(te)?i="svg":i!=="mathml"&&gi(te)&&(i="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(te),z||(ne(te,ee),as(t,!1)))};z&&(ne(n,le),as(t,!0)),pi(t.props)?(t.el.__isMounted=!1,St(()=>{pe(),delete t.el.__isMounted},o)):pe()}else{if(pi(t.props)&&e.el.__isMounted===!1){St(()=>{gl.process(e,t,n,r,s,o,i,a,l,d)},o);return}t.el=e.el,t.targetStart=e.targetStart;const fe=t.anchor=e.anchor,le=t.target=e.target,ne=t.targetAnchor=e.targetAnchor,pe=Pr(e.props),te=pe?n:le,ee=pe?fe:ne;if(i==="svg"||mi(le)?i="svg":(i==="mathml"||gi(le))&&(i="mathml"),q?(m(e.dynamicChildren,q,te,s,o,i,a),Wo(e,t,!0)):l||f(e,t,te,ee,s,o,i,a,!1),z)pe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ts(t,n,fe,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const ue=t.target=uo(t.props,$);ue&&ts(t,ue,null,d,0)}else pe&&ts(t,le,ne,d,1);as(t,z)}},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:a,anchor:l,targetStart:d,targetAnchor:u,target:f,props:m}=e;if(f&&(s(d),s(u)),o&&s(l),i&16){const y=o||!Pr(m);for(let $=0;$<a.length;$++){const C=a[$];r(C,t,n,y,!!C.dynamicChildren)}}},move:ts,hydrate:Mu};function ts(e,t,n,{o:{insert:r},m:s},o=2){o===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:d,props:u}=e,f=o===2;if(f&&r(i,t,n),(!f||Pr(u))&&l&16)for(let m=0;m<d.length;m++)s(d[m],t,n,2);f&&r(a,t,n)}function Mu(e,t,n,r,s,o,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:d,createText:u}},f){function m(B,z){let M=z;for(;M;){if(M&&M.nodeType===8){if(M.data==="teleport start anchor")t.targetStart=M;else if(M.data==="teleport anchor"){t.targetAnchor=M,B._lpa=t.targetAnchor&&i(t.targetAnchor);break}}M=i(M)}}function y(B,z){z.anchor=f(i(B),z,a(B),n,r,s,o)}const $=t.target=uo(t.props,l),C=Pr(t.props);if($){const B=$._lpa||$.firstChild;t.shapeFlag&16&&(C?(y(e,t),m($,B),t.targetAnchor||fo($,t,u,d,a(e)===$?e:null)):(t.anchor=i(e),m($,B),t.targetAnchor||fo($,t,u,d),f(B&&i(B),t,$,n,r,s,o))),as(t,C)}else C&&t.shapeFlag&16&&(y(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const vl=gl;function as(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function fo(e,t,n,r,s=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[pl]=i,e&&(r(o,e,s),r(i,e,s)),i}const tn=Symbol("_leaveCb"),Tr=Symbol("_enterCb");function Nu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Nn(()=>{e.isMounted=!0}),On(()=>{e.isUnmounting=!0}),e}const Dt=[Function,Array],yl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Dt,onEnter:Dt,onAfterEnter:Dt,onEnterCancelled:Dt,onBeforeLeave:Dt,onLeave:Dt,onAfterLeave:Dt,onLeaveCancelled:Dt,onBeforeAppear:Dt,onAppear:Dt,onAfterAppear:Dt,onAppearCancelled:Dt},wl=e=>{const t=e.subTree;return t.component?wl(t.component):t},Ou={name:"BaseTransition",props:yl,setup(e,{slots:t}){const n=Go(),r=Nu();return()=>{const s=t.default&&kl(t.default(),!0);if(!s||!s.length)return;const o=bl(s),i=ze(e),{mode:a}=i;if(r.isLeaving)return Bs(o);const l=vi(o);if(!l)return Bs(o);let d=ho(l,i,r,n,f=>d=f);l.type!==Ct&&Fr(l,d);let u=n.subTree&&vi(n.subTree);if(u&&u.type!==Ct&&!Kn(u,l)&&wl(n).type!==Ct){let f=ho(u,i,r,n);if(Fr(u,f),a==="out-in"&&l.type!==Ct)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},Bs(o);a==="in-out"&&l.type!==Ct?f.delayLeave=(m,y,$)=>{const C=_l(r,u);C[String(u.key)]=u,m[tn]=()=>{y(),m[tn]=void 0,delete d.delayedLeave,u=void 0},d.delayedLeave=()=>{$(),delete d.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function bl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ct){t=n;break}}return t}const ju=Ou;function _l(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ho(e,t,n,r,s){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:d,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:m,onLeave:y,onAfterLeave:$,onLeaveCancelled:C,onBeforeAppear:B,onAppear:z,onAfterAppear:M,onAppearCancelled:W}=t,q=String(e.key),fe=_l(n,e),le=(te,ee)=>{te&&Yt(te,r,9,ee)},ne=(te,ee)=>{const ue=ee[1];le(te,ee),$e(te)?te.every(J=>J.length<=1)&&ue():te.length<=1&&ue()},pe={mode:i,persisted:a,beforeEnter(te){let ee=l;if(!n.isMounted)if(o)ee=B||l;else return;te[tn]&&te[tn](!0);const ue=fe[q];ue&&Kn(e,ue)&&ue.el[tn]&&ue.el[tn](),le(ee,[te])},enter(te){let ee=d,ue=u,J=f;if(!n.isMounted)if(o)ee=z||d,ue=M||u,J=W||f;else return;let Re=!1;te[Tr]=Ze=>{Re||(Re=!0,Ze?le(J,[te]):le(ue,[te]),pe.delayedLeave&&pe.delayedLeave(),te[Tr]=void 0)};const Ue=te[Tr].bind(null,!1);ee?ne(ee,[te,Ue]):Ue()},leave(te,ee){const ue=String(e.key);if(te[Tr]&&te[Tr](!0),n.isUnmounting)return ee();le(m,[te]);let J=!1;te[tn]=Ue=>{J||(J=!0,ee(),Ue?le(C,[te]):le($,[te]),te[tn]=void 0,fe[ue]===e&&delete fe[ue])};const Re=te[tn].bind(null,!1);fe[ue]=e,y?ne(y,[te,Re]):Re()},clone(te){const ee=ho(te,t,n,r,s);return s&&s(ee),ee}};return pe}function Bs(e){if(xs(e))return e=$n(e),e.children=null,e}function vi(e){if(!xs(e))return ml(e.type)&&e.children?bl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&je(n.default))return n.default()}}function Fr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fr(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 kl(e,t=!1,n){let r=[],s=0;for(let o=0;o<e.length;o++){let i=e[o];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===Le?(i.patchFlag&128&&s++,r=r.concat(kl(i.children,t,a))):(t||i.type!==Ct)&&r.push(a!=null?$n(i,{key:a}):i)}if(s>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}function kt(e,t){return je(e)?wt({name:e.name},t,{setup:e}):e}function Tl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function yi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const hs=new WeakMap;function Mr(e,t,n,r,s=!1){if($e(e)){e.forEach((C,B)=>Mr(C,t&&($e(t)?t[B]:t),n,r,s));return}if(pr(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Mr(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Rs(r.component):r.el,i=s?null:o,{i:a,r:l}=e,d=t&&t.r,u=a.refs===st?a.refs={}:a.refs,f=a.setupState,m=ze(f),y=f===st?Oa:C=>yi(u,C)?!1:Qe(m,C),$=(C,B)=>!(B&&yi(u,B));if(d!=null&&d!==l){if(wi(t),ft(d))u[d]=null,y(d)&&(f[d]=null);else if(At(d)){const C=t;$(d,C.k)&&(d.value=null),C.k&&(u[C.k]=null)}}if(je(l))Gr(l,a,12,[i,u]);else{const C=ft(l),B=At(l);if(C||B){const z=()=>{if(e.f){const M=C?y(l)?f[l]:u[l]:$()||!e.k?l.value:u[e.k];if(s)$e(M)&&$o(M,o);else if($e(M))M.includes(o)||M.push(o);else if(C)u[l]=[o],y(l)&&(f[l]=u[l]);else{const W=[o];$(l,e.k)&&(l.value=W),e.k&&(u[e.k]=W)}}else C?(u[l]=i,y(l)&&(f[l]=i)):B&&($(l,e.k)&&(l.value=i),e.k&&(u[e.k]=i))};if(i){const M=()=>{z(),hs.delete(e)};M.id=-1,hs.set(e,M),St(M,n)}else wi(e),z()}}}function wi(e){const t=hs.get(e);t&&(t.flags|=8,hs.delete(e))}_s().requestIdleCallback;_s().cancelIdleCallback;const pr=e=>!!e.type.__asyncLoader,xs=e=>e.type.__isKeepAlive;function Lu(e,t){Sl(e,"a",t)}function Du(e,t){Sl(e,"da",t)}function Sl(e,t,n=Et){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Cs(t,r,n),n){let s=n.parent;for(;s&&s.parent;)xs(s.parent.vnode)&&Bu(r,t,n,s),s=s.parent}}function Bu(e,t,n,r){const s=Cs(t,e,r,!0);Es(()=>{$o(r[t],s)},n)}function Cs(e,t,n=Et,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{gn();const a=zr(n),l=Yt(t,n,e,i);return a(),vn(),l});return r?s.unshift(o):s.push(o),o}}const wn=e=>(t,n=Et)=>{(!Vr||e==="sp")&&Cs(e,(...r)=>t(...r),n)},Fu=wn("bm"),Nn=wn("m"),Hu=wn("bu"),Uu=wn("u"),On=wn("bum"),Es=wn("um"),Vu=wn("sp"),qu=wn("rtg"),Wu=wn("rtc");function Ku(e,t=Et){Cs("ec",e,t)}const Gu="components",xl=Symbol.for("v-ndc");function zu(e){return ft(e)?Yu(Gu,e,!1)||e:e||xl}function Yu(e,t,n=!0,r=!1){const s=_t||Et;if(s){const o=s.type;{const a=Nd(o,!1);if(a&&(a===t||a===Ft(t)||a===bs(Ft(t))))return o}const i=bi(s[e]||o[e],t)||bi(s.appContext[e],t);return!i&&r?o:i}}function bi(e,t){return e&&(e[t]||e[Ft(t)]||e[bs(Ft(t))])}function gt(e,t,n,r){let s;const o=n,i=$e(e);if(i||ft(e)){const a=i&&Qn(e);let l=!1,d=!1;a&&(l=!Bt(e),d=yn(e),e=ks(e)),s=new Array(e.length);for(let u=0,f=e.length;u<f;u++)s[u]=t(l?d?gr(zt(e[u])):zt(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,o)}else if(Je(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,o));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,d=a.length;l<d;l++){const u=a[l];s[l]=t(e[u],u,l,o)}}else s=[];return s}function rn(e,t,n={},r,s){if(_t.ce||_t.parent&&pr(_t.parent)&&_t.parent.ce){const d=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),at(Le,null,[Ae("slot",n,r)],d?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),b();const i=o&&Cl(o(n)),a=n.key||i&&i.key,l=at(Le,{key:(a&&!Gt(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),l}function Cl(e){return e.some(t=>Ur(t)?!(t.type===Ct||t.type===Le&&!Cl(t.children)):!0)?e:null}const po=e=>e?Kl(e)?Rs(e):po(e.parent):null,Nr=wt(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=>po(e.parent),$root:e=>po(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Al(e),$forceUpdate:e=>e.f||(e.f=()=>{Uo(e.update)}),$nextTick:e=>e.n||(e.n=Wt.bind(e.proxy)),$watch:e=>Pu.bind(e)}),Fs=(e,t)=>e!==st&&!e.__isScriptSetup&&Qe(e,t),Qu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:l}=e;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(Fs(r,t))return i[t]=1,r[t];if(s!==st&&Qe(s,t))return i[t]=2,s[t];if(Qe(o,t))return i[t]=3,o[t];if(n!==st&&Qe(n,t))return i[t]=4,n[t];mo&&(i[t]=0)}}const d=Nr[t];let u,f;if(d)return t==="$attrs"&&xt(e.attrs,"get",""),d(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==st&&Qe(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Qe(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return Fs(s,t)?(s[t]=n,!0):r!==st&&Qe(r,t)?(r[t]=n,!0):Qe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:o,type:i}},a){let l;return!!(n[a]||e!==st&&a[0]!=="$"&&Qe(e,a)||Fs(t,a)||Qe(o,a)||Qe(r,a)||Qe(Nr,a)||Qe(s.config.globalProperties,a)||(l=i.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Qe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ju(){return Xu().slots}function Xu(e){const t=Go();return t.setupContext||(t.setupContext=zl(t))}function _i(e){return $e(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let mo=!0;function Zu(e){const t=Al(e),n=e.proxy,r=e.ctx;mo=!1,t.beforeCreate&&ki(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:l,inject:d,created:u,beforeMount:f,mounted:m,beforeUpdate:y,updated:$,activated:C,deactivated:B,beforeDestroy:z,beforeUnmount:M,destroyed:W,unmounted:q,render:fe,renderTracked:le,renderTriggered:ne,errorCaptured:pe,serverPrefetch:te,expose:ee,inheritAttrs:ue,components:J,directives:Re,filters:Ue}=t;if(d&&ed(d,r,null),i)for(const Ne in i){const Ie=i[Ne];je(Ie)&&(r[Ne]=Ie.bind(n))}if(s){const Ne=s.call(n,n);Je(Ne)&&(e.data=Ts(Ne))}if(mo=!0,o)for(const Ne in o){const Ie=o[Ne],et=je(Ie)?Ie.bind(n,n):je(Ie.get)?Ie.get.bind(n,n):sn,tt=!je(Ie)&&je(Ie.set)?Ie.set.bind(n):sn,Xe=ae({get:et,set:tt});Object.defineProperty(r,Ne,{enumerable:!0,configurable:!0,get:()=>Xe.value,set:Fe=>Xe.value=Fe})}if(a)for(const Ne in a)El(a[Ne],r,n,Ne);if(l){const Ne=je(l)?l.call(n):l;Reflect.ownKeys(Ne).forEach(Ie=>{is(Ie,Ne[Ie])})}u&&ki(u,e,"c");function xe(Ne,Ie){$e(Ie)?Ie.forEach(et=>Ne(et.bind(n))):Ie&&Ne(Ie.bind(n))}if(xe(Fu,f),xe(Nn,m),xe(Hu,y),xe(Uu,$),xe(Lu,C),xe(Du,B),xe(Ku,pe),xe(Wu,le),xe(qu,ne),xe(On,M),xe(Es,q),xe(Vu,te),$e(ee))if(ee.length){const Ne=e.exposed||(e.exposed={});ee.forEach(Ie=>{Object.defineProperty(Ne,Ie,{get:()=>n[Ie],set:et=>n[Ie]=et,enumerable:!0})})}else e.exposed||(e.exposed={});fe&&e.render===sn&&(e.render=fe),ue!=null&&(e.inheritAttrs=ue),J&&(e.components=J),Re&&(e.directives=Re),te&&Tl(e)}function ed(e,t,n=sn){$e(e)&&(e=go(e));for(const r in e){const s=e[r];let o;Je(s)?"default"in s?o=Kt(s.from||r,s.default,!0):o=Kt(s.from||r):o=Kt(s),At(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function ki(e,t,n){Yt($e(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function El(e,t,n,r){let s=r.includes(".")?hl(n,r):()=>n[r];if(ft(e)){const o=t[e];je(o)&&dt(s,o)}else if(je(e))dt(s,e.bind(n));else if(Je(e))if($e(e))e.forEach(o=>El(o,t,n,r));else{const o=je(e.handler)?e.handler.bind(n):t[e.handler];je(o)&&dt(s,o,e)}}function Al(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(d=>ps(l,d,i,!0)),ps(l,t,i)),Je(t)&&o.set(t,l),l}function ps(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&ps(e,o,n,!0),s&&s.forEach(i=>ps(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const a=td[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const td={data:Ti,props:Si,emits:Si,methods:Ar,computed:Ar,beforeCreate:Rt,created:Rt,beforeMount:Rt,mounted:Rt,beforeUpdate:Rt,updated:Rt,beforeDestroy:Rt,beforeUnmount:Rt,destroyed:Rt,unmounted:Rt,activated:Rt,deactivated:Rt,errorCaptured:Rt,serverPrefetch:Rt,components:Ar,directives:Ar,watch:rd,provide:Ti,inject:nd};function Ti(e,t){return t?e?function(){return wt(je(e)?e.call(this,this):e,je(t)?t.call(this,this):t)}:t:e}function nd(e,t){return Ar(go(e),go(t))}function go(e){if($e(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Rt(e,t){return e?[...new Set([].concat(e,t))]:t}function Ar(e,t){return e?wt(Object.create(null),e,t):t}function Si(e,t){return e?$e(e)&&$e(t)?[...new Set([...e,...t])]:wt(Object.create(null),_i(e),_i(t??{})):t}function rd(e,t){if(!e)return t;if(!t)return e;const n=wt(Object.create(null),e);for(const r in t)n[r]=Rt(e[r],t[r]);return n}function Il(){return{app:null,config:{isNativeTag:Oa,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 sd=0;function od(e,t){return function(r,s=null){je(r)||(r=wt({},r)),s!=null&&!Je(s)&&(s=null);const o=Il(),i=new WeakSet,a=[];let l=!1;const d=o.app={_uid:sd++,_component:r,_props:s,_container:null,_context:o,_instance:null,version:jd,get config(){return o.config},set config(u){},use(u,...f){return i.has(u)||(u&&je(u.install)?(i.add(u),u.install(d,...f)):je(u)&&(i.add(u),u(d,...f))),d},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),d},component(u,f){return f?(o.components[u]=f,d):o.components[u]},directive(u,f){return f?(o.directives[u]=f,d):o.directives[u]},mount(u,f,m){if(!l){const y=d._ceVNode||Ae(r,s);return y.appContext=o,m===!0?m="svg":m===!1&&(m=void 0),e(y,u,m),l=!0,d._container=u,u.__vue_app__=d,Rs(y.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Yt(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,f){return o.provides[u]=f,d},runWithContext(u){const f=mr;mr=d;try{return u()}finally{mr=f}}};return d}}let mr=null;const id=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ft(t)}Modifiers`]||e[`${Mn(t)}Modifiers`];function ad(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||st;let s=n;const o=t.startsWith("update:"),i=o&&id(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>ft(u)?u.trim():u)),i.number&&(s=n.map(Mo)));let a,l=r[a=Ns(t)]||r[a=Ns(Ft(t))];!l&&o&&(l=r[a=Ns(Mn(t))]),l&&Yt(l,e,6,s);const d=r[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Yt(d,e,6,s)}}const ld=new WeakMap;function Rl(e,t,n=!1){const r=n?ld:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!je(e)){const l=d=>{const u=Rl(d,t,!0);u&&(a=!0,wt(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Je(e)&&r.set(e,null),null):($e(o)?o.forEach(l=>i[l]=null):wt(i,o),Je(e)&&r.set(e,i),i)}function As(e,t){return!e||!ys(t)?!1:(t=t.slice(2).replace(/Once$/,""),Qe(e,t[0].toLowerCase()+t.slice(1))||Qe(e,Mn(t))||Qe(e,t))}function xi(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:l,render:d,renderCache:u,props:f,data:m,setupState:y,ctx:$,inheritAttrs:C}=e,B=fs(e);let z,M;try{if(n.shapeFlag&4){const q=s||r,fe=q;z=nn(d.call(fe,q,u,f,y,m,$)),M=a}else{const q=t;z=nn(q.length>1?q(f,{attrs:a,slots:i,emit:l}):q(f,null)),M=t.props?a:cd(a)}}catch(q){Or.length=0,Ss(q,e,1),z=Ae(Ct)}let W=z;if(M&&C!==!1){const q=Object.keys(M),{shapeFlag:fe}=W;q.length&&fe&7&&(o&&q.some(Ro)&&(M=ud(M,o)),W=$n(W,M,!1,!0))}return n.dirs&&(W=$n(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(n.dirs):n.dirs),n.transition&&Fr(W,n.transition),z=W,fs(B),z}const cd=e=>{let t;for(const n in e)(n==="class"||n==="style"||ys(n))&&((t||(t={}))[n]=e[n]);return t},ud=(e,t)=>{const n={};for(const r in e)(!Ro(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function dd(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:l}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Ci(r,i,d):!!i;if(l&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const m=u[f];if($l(i,r,m)&&!As(d,m))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Ci(r,i,d):!0:!!i;return!1}function Ci(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const o=r[s];if($l(t,e,o)&&!As(n,o))return!0}return!1}function $l(e,t,n){const r=e[n],s=t[n];return n==="style"&&Je(r)&&Je(s)?!No(r,s):r!==s}function fd({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Pl={},Ml=()=>Object.create(Pl),Nl=e=>Object.getPrototypeOf(e)===Pl;function hd(e,t,n,r=!1){const s={},o=Ml();e.propsDefaults=Object.create(null),Ol(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:sl(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function pd(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=ze(s),[l]=e.propsOptions;let d=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let m=u[f];if(As(e.emitsOptions,m))continue;const y=t[m];if(l)if(Qe(o,m))y!==o[m]&&(o[m]=y,d=!0);else{const $=Ft(m);s[$]=vo(l,a,$,y,e,!1)}else y!==o[m]&&(o[m]=y,d=!0)}}}else{Ol(e,t,s,o)&&(d=!0);let u;for(const f in a)(!t||!Qe(t,f)&&((u=Mn(f))===f||!Qe(t,u)))&&(l?n&&(n[f]!==void 0||n[u]!==void 0)&&(s[f]=vo(l,a,f,void 0,e,!0)):delete s[f]);if(o!==a)for(const f in o)(!t||!Qe(t,f))&&(delete o[f],d=!0)}d&&hn(e.attrs,"set","")}function Ol(e,t,n,r){const[s,o]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(Ir(l))continue;const d=t[l];let u;s&&Qe(s,u=Ft(l))?!o||!o.includes(u)?n[u]=d:(a||(a={}))[u]=d:As(e.emitsOptions,l)||(!(l in r)||d!==r[l])&&(r[l]=d,i=!0)}if(o){const l=ze(n),d=a||st;for(let u=0;u<o.length;u++){const f=o[u];n[f]=vo(s,l,f,d[f],e,!Qe(d,f))}}return i}function vo(e,t,n,r,s,o){const i=e[n];if(i!=null){const a=Qe(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&je(l)){const{propsDefaults:d}=s;if(n in d)r=d[n];else{const u=zr(s);r=d[n]=l.call(null,t),u()}}else r=l;s.ce&&s.ce._setProp(n,r)}i[0]&&(o&&!a?r=!1:i[1]&&(r===""||r===Mn(n))&&(r=!0))}return r}const md=new WeakMap;function jl(e,t,n=!1){const r=n?md:t.propsCache,s=r.get(e);if(s)return s;const o=e.props,i={},a=[];let l=!1;if(!je(e)){const u=f=>{l=!0;const[m,y]=jl(f,t,!0);wt(i,m),y&&a.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return Je(e)&&r.set(e,dr),dr;if($e(o))for(let u=0;u<o.length;u++){const f=Ft(o[u]);Ei(f)&&(i[f]=st)}else if(o)for(const u in o){const f=Ft(u);if(Ei(f)){const m=o[u],y=i[f]=$e(m)||je(m)?{type:m}:wt({},m),$=y.type;let C=!1,B=!0;if($e($))for(let z=0;z<$.length;++z){const M=$[z],W=je(M)&&M.name;if(W==="Boolean"){C=!0;break}else W==="String"&&(B=!1)}else C=je($)&&$.name==="Boolean";y[0]=C,y[1]=B,(C||Qe(y,"default"))&&a.push(f)}}const d=[i,a];return Je(e)&&r.set(e,d),d}function Ei(e){return e[0]!=="$"&&!Ir(e)}const Vo=e=>e==="_"||e==="_ctx"||e==="$stable",qo=e=>$e(e)?e.map(nn):[nn(e)],gd=(e,t,n)=>{if(t._n)return t;const r=nt((...s)=>qo(t(...s)),n);return r._c=!1,r},Ll=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Vo(s))continue;const o=e[s];if(je(o))t[s]=gd(s,o,r);else if(o!=null){const i=qo(o);t[s]=()=>i}}},Dl=(e,t)=>{const n=qo(t);e.slots.default=()=>n},Bl=(e,t,n)=>{for(const r in t)(n||!Vo(r))&&(e[r]=t[r])},vd=(e,t,n)=>{const r=e.slots=Ml();if(e.vnode.shapeFlag&32){const s=t._;s?(Bl(r,t,n),n&&Fa(r,"_",s,!0)):Ll(t,r)}else t&&Dl(e,t)},yd=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=st;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:Bl(s,t,n):(o=!t.$stable,Ll(t,s)),i=t}else t&&(Dl(e,t),i={default:1});if(o)for(const a in s)!Vo(a)&&i[a]==null&&delete s[a]},St=Td;function wd(e){return bd(e)}function bd(e,t){const n=_s();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:l,setText:d,setElementText:u,parentNode:f,nextSibling:m,setScopeId:y=sn,insertStaticContent:$}=e,C=(p,g,S,D=null,H=null,L=null,re=void 0,X=null,Z=!!g.dynamicChildren)=>{if(p===g)return;p&&!Kn(p,g)&&(D=E(p),Fe(p,H,L,!0),p=null),g.patchFlag===-2&&(Z=!1,g.dynamicChildren=null);const{type:G,ref:ie,shapeFlag:se}=g;switch(G){case Is:B(p,g,S,D);break;case Ct:z(p,g,S,D);break;case Us:p==null&&M(g,S,D,re);break;case Le:J(p,g,S,D,H,L,re,X,Z);break;default:se&1?fe(p,g,S,D,H,L,re,X,Z):se&6?Re(p,g,S,D,H,L,re,X,Z):(se&64||se&128)&&G.process(p,g,S,D,H,L,re,X,Z,K)}ie!=null&&H?Mr(ie,p&&p.ref,L,g||p,!g):ie==null&&p&&p.ref!=null&&Mr(p.ref,null,L,p,!0)},B=(p,g,S,D)=>{if(p==null)r(g.el=a(g.children),S,D);else{const H=g.el=p.el;g.children!==p.children&&d(H,g.children)}},z=(p,g,S,D)=>{p==null?r(g.el=l(g.children||""),S,D):g.el=p.el},M=(p,g,S,D)=>{[p.el,p.anchor]=$(p.children,g,S,D,p.el,p.anchor)},W=({el:p,anchor:g},S,D)=>{let H;for(;p&&p!==g;)H=m(p),r(p,S,D),p=H;r(g,S,D)},q=({el:p,anchor:g})=>{let S;for(;p&&p!==g;)S=m(p),s(p),p=S;s(g)},fe=(p,g,S,D,H,L,re,X,Z)=>{if(g.type==="svg"?re="svg":g.type==="math"&&(re="mathml"),p==null)le(g,S,D,H,L,re,X,Z);else{const G=p.el&&p.el._isVueCE?p.el:null;try{G&&G._beginPatch(),te(p,g,H,L,re,X,Z)}finally{G&&G._endPatch()}}},le=(p,g,S,D,H,L,re,X)=>{let Z,G;const{props:ie,shapeFlag:se,transition:be,dirs:Se}=p;if(Z=p.el=i(p.type,L,ie&&ie.is,ie),se&8?u(Z,p.children):se&16&&pe(p.children,Z,null,D,H,Hs(p,L),re,X),Se&&Fn(p,null,D,"created"),ne(Z,p,p.scopeId,re,D),ie){for(const Me in ie)Me!=="value"&&!Ir(Me)&&o(Z,Me,null,ie[Me],L,D);"value"in ie&&o(Z,"value",null,ie.value,L),(G=ie.onVnodeBeforeMount)&&Zt(G,D,p)}Se&&Fn(p,null,D,"beforeMount");const Pe=_d(H,be);Pe&&be.beforeEnter(Z),r(Z,g,S),((G=ie&&ie.onVnodeMounted)||Pe||Se)&&St(()=>{G&&Zt(G,D,p),Pe&&be.enter(Z),Se&&Fn(p,null,D,"mounted")},H)},ne=(p,g,S,D,H)=>{if(S&&y(p,S),D)for(let L=0;L<D.length;L++)y(p,D[L]);if(H){let L=H.subTree;if(g===L||Ul(L.type)&&(L.ssContent===g||L.ssFallback===g)){const re=H.vnode;ne(p,re,re.scopeId,re.slotScopeIds,H.parent)}}},pe=(p,g,S,D,H,L,re,X,Z=0)=>{for(let G=Z;G<p.length;G++){const ie=p[G]=X?fn(p[G]):nn(p[G]);C(null,ie,g,S,D,H,L,re,X)}},te=(p,g,S,D,H,L,re)=>{const X=g.el=p.el;let{patchFlag:Z,dynamicChildren:G,dirs:ie}=g;Z|=p.patchFlag&16;const se=p.props||st,be=g.props||st;let Se;if(S&&Hn(S,!1),(Se=be.onVnodeBeforeUpdate)&&Zt(Se,S,g,p),ie&&Fn(g,p,S,"beforeUpdate"),S&&Hn(S,!0),(se.innerHTML&&be.innerHTML==null||se.textContent&&be.textContent==null)&&u(X,""),G?ee(p.dynamicChildren,G,X,S,D,Hs(g,H),L):re||Ie(p,g,X,null,S,D,Hs(g,H),L,!1),Z>0){if(Z&16)ue(X,se,be,S,H);else if(Z&2&&se.class!==be.class&&o(X,"class",null,be.class,H),Z&4&&o(X,"style",se.style,be.style,H),Z&8){const Pe=g.dynamicProps;for(let Me=0;Me<Pe.length;Me++){const De=Pe[Me],Ve=se[De],qe=be[De];(qe!==Ve||De==="value")&&o(X,De,Ve,qe,H,S)}}Z&1&&p.children!==g.children&&u(X,g.children)}else!re&&G==null&&ue(X,se,be,S,H);((Se=be.onVnodeUpdated)||ie)&&St(()=>{Se&&Zt(Se,S,g,p),ie&&Fn(g,p,S,"updated")},D)},ee=(p,g,S,D,H,L,re)=>{for(let X=0;X<g.length;X++){const Z=p[X],G=g[X],ie=Z.el&&(Z.type===Le||!Kn(Z,G)||Z.shapeFlag&198)?f(Z.el):S;C(Z,G,ie,null,D,H,L,re,!0)}},ue=(p,g,S,D,H)=>{if(g!==S){if(g!==st)for(const L in g)!Ir(L)&&!(L in S)&&o(p,L,g[L],null,H,D);for(const L in S){if(Ir(L))continue;const re=S[L],X=g[L];re!==X&&L!=="value"&&o(p,L,X,re,H,D)}"value"in S&&o(p,"value",g.value,S.value,H)}},J=(p,g,S,D,H,L,re,X,Z)=>{const G=g.el=p?p.el:a(""),ie=g.anchor=p?p.anchor:a("");let{patchFlag:se,dynamicChildren:be,slotScopeIds:Se}=g;Se&&(X=X?X.concat(Se):Se),p==null?(r(G,S,D),r(ie,S,D),pe(g.children||[],S,ie,H,L,re,X,Z)):se>0&&se&64&&be&&p.dynamicChildren&&p.dynamicChildren.length===be.length?(ee(p.dynamicChildren,be,S,H,L,re,X),(g.key!=null||H&&g===H.subTree)&&Wo(p,g,!0)):Ie(p,g,S,ie,H,L,re,X,Z)},Re=(p,g,S,D,H,L,re,X,Z)=>{g.slotScopeIds=X,p==null?g.shapeFlag&512?H.ctx.activate(g,S,D,re,Z):Ue(g,S,D,H,L,re,Z):Ze(p,g,Z)},Ue=(p,g,S,D,H,L,re)=>{const X=p.component=Rd(p,D,H);if(xs(p)&&(X.ctx.renderer=K),$d(X,!1,re),X.asyncDep){if(H&&H.registerDep(X,xe,re),!p.el){const Z=X.subTree=Ae(Ct);z(null,Z,g,S),p.placeholder=Z.el}}else xe(X,p,g,S,H,L,re)},Ze=(p,g,S)=>{const D=g.component=p.component;if(dd(p,g,S))if(D.asyncDep&&!D.asyncResolved){Ne(D,g,S);return}else D.next=g,D.update();else g.el=p.el,D.vnode=g},xe=(p,g,S,D,H,L,re)=>{const X=()=>{if(p.isMounted){let{next:se,bu:be,u:Se,parent:Pe,vnode:Me}=p;{const k=Fl(p);if(k){se&&(se.el=Me.el,Ne(p,se,re)),k.asyncDep.then(()=>{St(()=>{p.isUnmounted||G()},H)});return}}let De=se,Ve;Hn(p,!1),se?(se.el=Me.el,Ne(p,se,re)):se=Me,be&&os(be),(Ve=se.props&&se.props.onVnodeBeforeUpdate)&&Zt(Ve,Pe,se,Me),Hn(p,!0);const qe=xi(p),pt=p.subTree;p.subTree=qe,C(pt,qe,f(pt.el),E(pt),p,H,L),se.el=qe.el,De===null&&fd(p,qe.el),Se&&St(Se,H),(Ve=se.props&&se.props.onVnodeUpdated)&&St(()=>Zt(Ve,Pe,se,Me),H)}else{let se;const{el:be,props:Se}=g,{bm:Pe,m:Me,parent:De,root:Ve,type:qe}=p,pt=pr(g);Hn(p,!1),Pe&&os(Pe),!pt&&(se=Se&&Se.onVnodeBeforeMount)&&Zt(se,De,g),Hn(p,!0);{Ve.ce&&Ve.ce._hasShadowRoot()&&Ve.ce._injectChildStyle(qe);const k=p.subTree=xi(p);C(null,k,S,D,p,H,L),g.el=k.el}if(Me&&St(Me,H),!pt&&(se=Se&&Se.onVnodeMounted)){const k=g;St(()=>Zt(se,De,k),H)}(g.shapeFlag&256||De&&pr(De.vnode)&&De.vnode.shapeFlag&256)&&p.a&&St(p.a,H),p.isMounted=!0,g=S=D=null}};p.scope.on();const Z=p.effect=new qa(X);p.scope.off();const G=p.update=Z.run.bind(Z),ie=p.job=Z.runIfDirty.bind(Z);ie.i=p,ie.id=p.uid,Z.scheduler=()=>Uo(ie),Hn(p,!0),G()},Ne=(p,g,S)=>{g.component=p;const D=p.vnode.props;p.vnode=g,p.next=null,pd(p,g.props,D,S),yd(p,g.children,S),gn(),hi(p),vn()},Ie=(p,g,S,D,H,L,re,X,Z=!1)=>{const G=p&&p.children,ie=p?p.shapeFlag:0,se=g.children,{patchFlag:be,shapeFlag:Se}=g;if(be>0){if(be&128){tt(G,se,S,D,H,L,re,X,Z);return}else if(be&256){et(G,se,S,D,H,L,re,X,Z);return}}Se&8?(ie&16&&de(G,H,L),se!==G&&u(S,se)):ie&16?Se&16?tt(G,se,S,D,H,L,re,X,Z):de(G,H,L,!0):(ie&8&&u(S,""),Se&16&&pe(se,S,D,H,L,re,X,Z))},et=(p,g,S,D,H,L,re,X,Z)=>{p=p||dr,g=g||dr;const G=p.length,ie=g.length,se=Math.min(G,ie);let be;for(be=0;be<se;be++){const Se=g[be]=Z?fn(g[be]):nn(g[be]);C(p[be],Se,S,null,H,L,re,X,Z)}G>ie?de(p,H,L,!0,!1,se):pe(g,S,D,H,L,re,X,Z,se)},tt=(p,g,S,D,H,L,re,X,Z)=>{let G=0;const ie=g.length;let se=p.length-1,be=ie-1;for(;G<=se&&G<=be;){const Se=p[G],Pe=g[G]=Z?fn(g[G]):nn(g[G]);if(Kn(Se,Pe))C(Se,Pe,S,null,H,L,re,X,Z);else break;G++}for(;G<=se&&G<=be;){const Se=p[se],Pe=g[be]=Z?fn(g[be]):nn(g[be]);if(Kn(Se,Pe))C(Se,Pe,S,null,H,L,re,X,Z);else break;se--,be--}if(G>se){if(G<=be){const Se=be+1,Pe=Se<ie?g[Se].el:D;for(;G<=be;)C(null,g[G]=Z?fn(g[G]):nn(g[G]),S,Pe,H,L,re,X,Z),G++}}else if(G>be)for(;G<=se;)Fe(p[G],H,L,!0),G++;else{const Se=G,Pe=G,Me=new Map;for(G=Pe;G<=be;G++){const Y=g[G]=Z?fn(g[G]):nn(g[G]);Y.key!=null&&Me.set(Y.key,G)}let De,Ve=0;const qe=be-Pe+1;let pt=!1,k=0;const P=new Array(qe);for(G=0;G<qe;G++)P[G]=0;for(G=Se;G<=se;G++){const Y=p[G];if(Ve>=qe){Fe(Y,H,L,!0);continue}let me;if(Y.key!=null)me=Me.get(Y.key);else for(De=Pe;De<=be;De++)if(P[De-Pe]===0&&Kn(Y,g[De])){me=De;break}me===void 0?Fe(Y,H,L,!0):(P[me-Pe]=G+1,me>=k?k=me:pt=!0,C(Y,g[me],S,null,H,L,re,X,Z),Ve++)}const I=pt?kd(P):dr;for(De=I.length-1,G=qe-1;G>=0;G--){const Y=Pe+G,me=g[Y],Ce=g[Y+1],Ge=Y+1<ie?Ce.el||Hl(Ce):D;P[G]===0?C(null,me,S,Ge,H,L,re,X,Z):pt&&(De<0||G!==I[De]?Xe(me,S,Ge,2):De--)}}},Xe=(p,g,S,D,H=null)=>{const{el:L,type:re,transition:X,children:Z,shapeFlag:G}=p;if(G&6){Xe(p.component.subTree,g,S,D);return}if(G&128){p.suspense.move(g,S,D);return}if(G&64){re.move(p,g,S,K);return}if(re===Le){r(L,g,S);for(let se=0;se<Z.length;se++)Xe(Z[se],g,S,D);r(p.anchor,g,S);return}if(re===Us){W(p,g,S);return}if(D!==2&&G&1&&X)if(D===0)X.beforeEnter(L),r(L,g,S),St(()=>X.enter(L),H);else{const{leave:se,delayLeave:be,afterLeave:Se}=X,Pe=()=>{p.ctx.isUnmounted?s(L):r(L,g,S)},Me=()=>{L._isLeaving&&L[tn](!0),se(L,()=>{Pe(),Se&&Se()})};be?be(L,Pe,Me):Me()}else r(L,g,S)},Fe=(p,g,S,D=!1,H=!1)=>{const{type:L,props:re,ref:X,children:Z,dynamicChildren:G,shapeFlag:ie,patchFlag:se,dirs:be,cacheIndex:Se}=p;if(se===-2&&(H=!1),X!=null&&(gn(),Mr(X,null,S,p,!0),vn()),Se!=null&&(g.renderCache[Se]=void 0),ie&256){g.ctx.deactivate(p);return}const Pe=ie&1&&be,Me=!pr(p);let De;if(Me&&(De=re&&re.onVnodeBeforeUnmount)&&Zt(De,g,p),ie&6)we(p.component,S,D);else{if(ie&128){p.suspense.unmount(S,D);return}Pe&&Fn(p,null,g,"beforeUnmount"),ie&64?p.type.remove(p,g,S,K,D):G&&!G.hasOnce&&(L!==Le||se>0&&se&64)?de(G,g,S,!1,!0):(L===Le&&se&384||!H&&ie&16)&&de(Z,g,S),D&&ct(p)}(Me&&(De=re&&re.onVnodeUnmounted)||Pe)&&St(()=>{De&&Zt(De,g,p),Pe&&Fn(p,null,g,"unmounted")},S)},ct=p=>{const{type:g,el:S,anchor:D,transition:H}=p;if(g===Le){oe(S,D);return}if(g===Us){q(p);return}const L=()=>{s(S),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(p.shapeFlag&1&&H&&!H.persisted){const{leave:re,delayLeave:X}=H,Z=()=>re(S,L);X?X(p.el,L,Z):Z()}else L()},oe=(p,g)=>{let S;for(;p!==g;)S=m(p),s(p),p=S;s(g)},we=(p,g,S)=>{const{bum:D,scope:H,job:L,subTree:re,um:X,m:Z,a:G}=p;Ai(Z),Ai(G),D&&os(D),H.stop(),L&&(L.flags|=8,Fe(re,p,g,S)),X&&St(X,g),St(()=>{p.isUnmounted=!0},g)},de=(p,g,S,D=!1,H=!1,L=0)=>{for(let re=L;re<p.length;re++)Fe(p[re],g,S,D,H)},E=p=>{if(p.shapeFlag&6)return E(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const g=m(p.anchor||p.el),S=g&&g[pl];return S?m(S):g};let A=!1;const O=(p,g,S)=>{let D;p==null?g._vnode&&(Fe(g._vnode,null,null,!0),D=g._vnode.component):C(g._vnode||null,p,g,null,null,null,S),g._vnode=p,A||(A=!0,hi(D),cl(),A=!1)},K={p:C,um:Fe,m:Xe,r:ct,mt:Ue,mc:pe,pc:Ie,pbc:ee,n:E,o:e};return{render:O,hydrate:void 0,createApp:od(O)}}function Hs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Hn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function _d(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wo(e,t,n=!1){const r=e.children,s=t.children;if($e(r)&&$e(s))for(let o=0;o<r.length;o++){const i=r[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=fn(s[o]),a.el=i.el),!n&&a.patchFlag!==-2&&Wo(i,a)),a.type===Is&&(a.patchFlag===-1&&(a=s[o]=fn(a)),a.el=i.el),a.type===Ct&&!a.el&&(a.el=i.el)}}function kd(e){const t=e.slice(),n=[0];let r,s,o,i,a;const l=e.length;for(r=0;r<l;r++){const d=e[r];if(d!==0){if(s=n[n.length-1],e[s]<d){t[r]=s,n.push(r);continue}for(o=0,i=n.length-1;o<i;)a=o+i>>1,e[n[a]]<d?o=a+1:i=a;d<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Fl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fl(t)}function Ai(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Hl(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Hl(t.subTree):null}const Ul=e=>e.__isSuspense;function Td(e,t){t&&t.pendingBranch?$e(e)?t.effects.push(...e):t.effects.push(e):Iu(e)}const Le=Symbol.for("v-fgt"),Is=Symbol.for("v-txt"),Ct=Symbol.for("v-cmt"),Us=Symbol.for("v-stc"),Or=[];let jt=null;function b(e=!1){Or.push(jt=e?null:[])}function Sd(){Or.pop(),jt=Or[Or.length-1]||null}let Hr=1;function ms(e,t=!1){Hr+=e,e<0&&jt&&t&&(jt.hasOnce=!0)}function Vl(e){return e.dynamicChildren=Hr>0?jt||dr:null,Sd(),Hr>0&&jt&&jt.push(e),e}function x(e,t,n,r,s,o){return Vl(w(e,t,n,r,s,o,!0))}function at(e,t,n,r,s){return Vl(Ae(e,t,n,r,s,!0))}function Ur(e){return e?e.__v_isVNode===!0:!1}function Kn(e,t){return e.type===t.type&&e.key===t.key}const ql=({key:e})=>e??null,ls=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ft(e)||At(e)||je(e)?{i:_t,r:e,k:t,f:!!n}:e:null);function w(e,t=null,n=null,r=0,s=null,o=e===Le?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ql(t),ref:t&&ls(t),scopeId:dl,slotScopeIds:null,children:n,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:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:_t};return a?(Ko(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=ft(n)?8:16),Hr>0&&!i&&jt&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&jt.push(l),l}const Ae=xd;function xd(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===xl)&&(e=Ct),Ur(e)){const a=$n(e,t,!0);return n&&Ko(a,n),Hr>0&&!o&&jt&&(a.shapeFlag&6?jt[jt.indexOf(e)]=a:jt.push(a)),a.patchFlag=-2,a}if(Od(e)&&(e=e.__vccOpts),t){t=Cd(t);let{class:a,style:l}=t;a&&!ft(a)&&(t.class=ut(a)),Je(l)&&(Ho(l)&&!$e(l)&&(l=wt({},l)),t.style=Jn(l))}const i=ft(e)?1:Ul(e)?128:ml(e)?64:Je(e)?4:je(e)?2:0;return w(e,t,n,r,s,i,o,!0)}function Cd(e){return e?Ho(e)||Nl(e)?wt({},e):e:null}function $n(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:l}=e,d=t?Wl(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&ql(d),ref:t&&t.ref?n&&o?$e(o)?o.concat(ls(t)):[o,ls(t)]:ls(t):o,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!==Le?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$n(e.ssContent),ssFallback:e.ssFallback&&$n(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Fr(u,l.clone(u)),u}function Ed(e=" ",t=0){return Ae(Is,null,e,t)}function ve(e="",t=!1){return t?(b(),at(Ct,null,e)):Ae(Ct,null,e)}function nn(e){return e==null||typeof e=="boolean"?Ae(Ct):$e(e)?Ae(Le,null,e.slice()):Ur(e)?fn(e):Ae(Is,null,String(e))}function fn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$n(e)}function Ko(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if($e(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),Ko(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Nl(t)?t._ctx=_t:s===3&&_t&&(_t.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else je(t)?(t={default:t,_ctx:_t},n=32):(t=String(t),r&64?(n=16,t=[Ed(t)]):n=8);e.children=t,e.shapeFlag|=n}function Wl(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=ut([t.class,r.class]));else if(s==="style")t.style=Jn([t.style,r.style]);else if(ys(s)){const o=t[s],i=r[s];i&&o!==i&&!($e(o)&&o.includes(i))&&(t[s]=o?[].concat(o,i):i)}else s!==""&&(t[s]=r[s])}return t}function Zt(e,t,n,r=null){Yt(e,t,7,[n,r])}const Ad=Il();let Id=0;function Rd(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Ad,o={uid:Id++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Zc(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:jl(r,s),emitsOptions:Rl(r,s),emit:null,emitted:null,propsDefaults:st,inheritAttrs:r.inheritAttrs,ctx:st,data:st,props:st,attrs:st,slots:st,refs:st,setupState:st,setupContext:null,suspense:n,suspenseId:n?n.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 o.ctx={_:o},o.root=t?t.root:o,o.emit=ad.bind(null,o),e.ce&&e.ce(o),o}let Et=null;const Go=()=>Et||_t;let gs,yo;{const e=_s(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};gs=t("__VUE_INSTANCE_SETTERS__",n=>Et=n),yo=t("__VUE_SSR_SETTERS__",n=>Vr=n)}const zr=e=>{const t=Et;return gs(e),e.scope.on(),()=>{e.scope.off(),gs(t)}},Ii=()=>{Et&&Et.scope.off(),gs(null)};function Kl(e){return e.vnode.shapeFlag&4}let Vr=!1;function $d(e,t=!1,n=!1){t&&yo(t);const{props:r,children:s}=e.vnode,o=Kl(e);hd(e,r,o,t),vd(e,s,n||t);const i=o?Pd(e,t):void 0;return t&&yo(!1),i}function Pd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Qu);const{setup:r}=n;if(r){gn();const s=e.setupContext=r.length>1?zl(e):null,o=zr(e),i=Gr(r,e,0,[e.props,s]),a=La(i);if(vn(),o(),(a||e.sp)&&!pr(e)&&Tl(e),a){if(i.then(Ii,Ii),t)return i.then(l=>{Ri(e,l)}).catch(l=>{Ss(l,e,0)});e.asyncDep=i}else Ri(e,i)}else Gl(e)}function Ri(e,t,n){je(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Je(t)&&(e.setupState=il(t)),Gl(e)}function Gl(e,t,n){const r=e.type;e.render||(e.render=r.render||sn);{const s=zr(e);gn();try{Zu(e)}finally{vn(),s()}}}const Md={get(e,t){return xt(e,"get",""),e[t]}};function zl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Md),slots:e.slots,emit:e.emit,expose:t}}function Rs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(il(wu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Nr)return Nr[n](e)},has(t,n){return n in t||n in Nr}})):e.proxy}function Nd(e,t=!0){return je(e)?e.displayName||e.name:e.name||t&&e.__name}function Od(e){return je(e)&&"__vccOpts"in e}const ae=(e,t)=>Su(e,t,Vr);function zo(e,t,n){try{ms(-1);const r=arguments.length;return r===2?Je(t)&&!$e(t)?Ur(t)?Ae(e,null,[t]):Ae(e,t):Ae(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ur(n)&&(n=[n]),Ae(e,t,n))}finally{ms(1)}}const jd="3.5.28";/**
14
+ * @vue/runtime-dom v3.5.28
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let wo;const $i=typeof window<"u"&&window.trustedTypes;if($i)try{wo=$i.createPolicy("vue",{createHTML:e=>e})}catch{}const Yl=wo?e=>wo.createHTML(e):e=>e,Ld="http://www.w3.org/2000/svg",Dd="http://www.w3.org/1998/Math/MathML",dn=typeof document<"u"?document:null,Pi=dn&&dn.createElement("template"),Bd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?dn.createElementNS(Ld,e):t==="mathml"?dn.createElementNS(Dd,e):n?dn.createElement(e,{is:n}):dn.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>dn.createTextNode(e),createComment:e=>dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{Pi.innerHTML=Yl(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Pi.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},kn="transition",Sr="animation",qr=Symbol("_vtc"),Ql={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fd=wt({},yl,Ql),Hd=e=>(e.displayName="Transition",e.props=Fd,e),Ud=Hd((e,{slots:t})=>zo(ju,Vd(e),t)),Un=(e,t=[])=>{$e(e)?e.forEach(n=>n(...t)):e&&e(...t)},Mi=e=>e?$e(e)?e.some(t=>t.length>1):e.length>1:!1;function Vd(e){const t={};for(const J in e)J in Ql||(t[J]=e[J]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:d=i,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,$=qd(s),C=$&&$[0],B=$&&$[1],{onBeforeEnter:z,onEnter:M,onEnterCancelled:W,onLeave:q,onLeaveCancelled:fe,onBeforeAppear:le=z,onAppear:ne=M,onAppearCancelled:pe=W}=t,te=(J,Re,Ue,Ze)=>{J._enterCancelled=Ze,Vn(J,Re?u:a),Vn(J,Re?d:i),Ue&&Ue()},ee=(J,Re)=>{J._isLeaving=!1,Vn(J,f),Vn(J,y),Vn(J,m),Re&&Re()},ue=J=>(Re,Ue)=>{const Ze=J?ne:M,xe=()=>te(Re,J,Ue);Un(Ze,[Re,xe]),Ni(()=>{Vn(Re,J?l:o),cn(Re,J?u:a),Mi(Ze)||Oi(Re,r,C,xe)})};return wt(t,{onBeforeEnter(J){Un(z,[J]),cn(J,o),cn(J,i)},onBeforeAppear(J){Un(le,[J]),cn(J,l),cn(J,d)},onEnter:ue(!1),onAppear:ue(!0),onLeave(J,Re){J._isLeaving=!0;const Ue=()=>ee(J,Re);cn(J,f),J._enterCancelled?(cn(J,m),Di(J)):(Di(J),cn(J,m)),Ni(()=>{J._isLeaving&&(Vn(J,f),cn(J,y),Mi(q)||Oi(J,r,B,Ue))}),Un(q,[J,Ue])},onEnterCancelled(J){te(J,!1,void 0,!0),Un(W,[J])},onAppearCancelled(J){te(J,!0,void 0,!0),Un(pe,[J])},onLeaveCancelled(J){ee(J),Un(fe,[J])}})}function qd(e){if(e==null)return null;if(Je(e))return[Vs(e.enter),Vs(e.leave)];{const t=Vs(e);return[t,t]}}function Vs(e){return Wc(e)}function cn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[qr]||(e[qr]=new Set)).add(t)}function Vn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[qr];n&&(n.delete(t),n.size||(e[qr]=void 0))}function Ni(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Wd=0;function Oi(e,t,n,r){const s=e._endId=++Wd,o=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:a,propCount:l}=Kd(e,t);if(!i)return r();const d=i+"end";let u=0;const f=()=>{e.removeEventListener(d,m),o()},m=y=>{y.target===e&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),e.addEventListener(d,m)}function Kd(e,t){const n=window.getComputedStyle(e),r=$=>(n[$]||"").split(", "),s=r(`${kn}Delay`),o=r(`${kn}Duration`),i=ji(s,o),a=r(`${Sr}Delay`),l=r(`${Sr}Duration`),d=ji(a,l);let u=null,f=0,m=0;t===kn?i>0&&(u=kn,f=i,m=o.length):t===Sr?d>0&&(u=Sr,f=d,m=l.length):(f=Math.max(i,d),u=f>0?i>d?kn:Sr:null,m=u?u===kn?o.length:l.length:0);const y=u===kn&&/\b(?:transform|all)(?:,|$)/.test(r(`${kn}Property`).toString());return{type:u,timeout:f,propCount:m,hasTransform:y}}function ji(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Li(n)+Li(e[r])))}function Li(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Di(e){return(e?e.ownerDocument:document).body.offsetHeight}function Gd(e,t,n){const r=e[qr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Bi=Symbol("_vod"),zd=Symbol("_vsh"),Yd=Symbol(""),Qd=/(?:^|;)\s*display\s*:/;function Jd(e,t,n){const r=e.style,s=ft(n);let o=!1;if(n&&!s){if(t)if(ft(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&cs(r,a,"")}else for(const i in t)n[i]==null&&cs(r,i,"");for(const i in n)i==="display"&&(o=!0),cs(r,i,n[i])}else if(s){if(t!==n){const i=r[Yd];i&&(n+=";"+i),r.cssText=n,o=Qd.test(n)}}else t&&e.removeAttribute("style");Bi in e&&(e[Bi]=o?r.display:"",e[zd]&&(r.display="none"))}const Fi=/\s*!important$/;function cs(e,t,n){if($e(n))n.forEach(r=>cs(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Xd(e,t);Fi.test(n)?e.setProperty(Mn(r),n.replace(Fi,""),"important"):e[r]=n}}const Hi=["Webkit","Moz","ms"],qs={};function Xd(e,t){const n=qs[t];if(n)return n;let r=Ft(t);if(r!=="filter"&&r in e)return qs[t]=r;r=bs(r);for(let s=0;s<Hi.length;s++){const o=Hi[s]+r;if(o in e)return qs[t]=o}return t}const Ui="http://www.w3.org/1999/xlink";function Vi(e,t,n,r,s,o=Jc(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ui,t.slice(6,t.length)):e.setAttributeNS(Ui,t,n):n==null||o&&!Ha(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Gt(n)?String(n):n)}function qi(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Yl(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Ha(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(s||t)}function cr(e,t,n,r){e.addEventListener(t,n,r)}function Zd(e,t,n,r){e.removeEventListener(t,n,r)}const Wi=Symbol("_vei");function ef(e,t,n,r,s=null){const o=e[Wi]||(e[Wi]={}),i=o[t];if(r&&i)i.value=r;else{const[a,l]=tf(t);if(r){const d=o[t]=sf(r,s);cr(e,a,d,l)}else i&&(Zd(e,a,i,l),o[t]=void 0)}}const Ki=/(?:Once|Passive|Capture)$/;function tf(e){let t;if(Ki.test(e)){t={};let r;for(;r=e.match(Ki);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Mn(e.slice(2)),t]}let Ws=0;const nf=Promise.resolve(),rf=()=>Ws||(nf.then(()=>Ws=0),Ws=Date.now());function sf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Yt(of(r,n.value),t,5,[r])};return n.value=e,n.attached=rf(),n}function of(e,t){if($e(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Gi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,af=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Gd(e,r,i):t==="style"?Jd(e,n,r):ys(t)?Ro(t)||ef(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):lf(e,t,r,i))?(qi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vi(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ft(r))?qi(e,Ft(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Vi(e,t,r,i))};function lf(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Gi(t)&&je(n));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 s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Gi(t)&&ft(n)?!1:t in e}const zi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return $e(t)?n=>os(t,n):t};function cf(e){e.target.composing=!0}function Yi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ks=Symbol("_assign");function Qi(e,t,n){return t&&(e=e.trim()),n&&(e=Mo(e)),e}const Pn={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Ks]=zi(s);const o=r||s.props&&s.props.type==="number";cr(e,t?"change":"input",i=>{i.target.composing||e[Ks](Qi(e.value,n,o))}),(n||o)&&cr(e,"change",()=>{e.value=Qi(e.value,n,o)}),t||(cr(e,"compositionstart",cf),cr(e,"compositionend",Yi),cr(e,"change",Yi))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[Ks]=zi(i),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?Mo(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},uf=["ctrl","shift","alt","meta"],df={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>uf.some(n=>e[`${n}Key`]&&!t.includes(n))},lt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...o)=>{for(let i=0;i<t.length;i++){const a=df[t[i]];if(a&&a(s,t))return}return e(s,...o)}))},ff={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Nt=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;const o=Mn(s.key);if(t.some(i=>i===o||ff[i]===o))return e(s)}))},hf=wt({patchProp:af},Bd);let Ji;function pf(){return Ji||(Ji=wd(hf))}const mf=((...e)=>{const t=pf().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=vf(r);if(!s)return;const o=t._component;!je(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,gf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t});function gf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function vf(e){return ft(e)?document.querySelector(e):e}/*!
18
+ * vue-router v4.6.4
19
+ * (c) 2025 Eduardo San Martin Morote
20
+ * @license MIT
21
+ */const ur=typeof document<"u";function Jl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function yf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Jl(e.default)}const Ye=Object.assign;function Gs(e,t){const n={};for(const r in t){const s=t[r];n[r]=Qt(s)?s.map(e):e(s)}return n}const jr=()=>{},Qt=Array.isArray;function Xi(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const Xl=/#/g,wf=/&/g,bf=/\//g,_f=/=/g,kf=/\?/g,Zl=/\+/g,Tf=/%5B/g,Sf=/%5D/g,ec=/%5E/g,xf=/%60/g,tc=/%7B/g,Cf=/%7C/g,nc=/%7D/g,Ef=/%20/g;function Yo(e){return e==null?"":encodeURI(""+e).replace(Cf,"|").replace(Tf,"[").replace(Sf,"]")}function Af(e){return Yo(e).replace(tc,"{").replace(nc,"}").replace(ec,"^")}function bo(e){return Yo(e).replace(Zl,"%2B").replace(Ef,"+").replace(Xl,"%23").replace(wf,"%26").replace(xf,"`").replace(tc,"{").replace(nc,"}").replace(ec,"^")}function If(e){return bo(e).replace(_f,"%3D")}function Rf(e){return Yo(e).replace(Xl,"%23").replace(kf,"%3F")}function $f(e){return Rf(e).replace(bf,"%2F")}function Wr(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Pf=/\/$/,Mf=e=>e.replace(Pf,"");function zs(e,t,n="/"){let r,s={},o="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(r=t.slice(0,l),o=t.slice(l,a>0?a:t.length),s=e(o.slice(1))),a>=0&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=Lf(r??t,n),{fullPath:r+o+i,path:r,query:s,hash:Wr(i)}}function Nf(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Zi(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Of(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&vr(t.matched[r],n.matched[s])&&rc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function vr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!jf(e[n],t[n]))return!1;return!0}function jf(e,t){return Qt(e)?ea(e,t):Qt(t)?ea(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function ea(e,t){return Qt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Lf(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,a;for(i=0;i<r.length;i++)if(a=r[i],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const Tn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let _o=(function(e){return e.pop="pop",e.push="push",e})({}),Ys=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Df(e){if(!e)if(ur){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Mf(e)}const Bf=/^[^#]+#/;function Ff(e,t){return e.replace(Bf,"#")+t}function Hf(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const $s=()=>({left:window.scrollX,top:window.scrollY});function Uf(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Hf(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ta(e,t){return(history.state?history.state.position-t:-1)+e}const ko=new Map;function Vf(e,t){ko.set(e,t)}function qf(e){const t=ko.get(e);return ko.delete(e),t}function Wf(e){return typeof e=="string"||e&&typeof e=="object"}function sc(e){return typeof e=="string"||typeof e=="symbol"}let ht=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const oc=Symbol("");ht.MATCHER_NOT_FOUND+"",ht.NAVIGATION_GUARD_REDIRECT+"",ht.NAVIGATION_ABORTED+"",ht.NAVIGATION_CANCELLED+"",ht.NAVIGATION_DUPLICATED+"";function yr(e,t){return Ye(new Error,{type:e,[oc]:!0},t)}function un(e,t){return e instanceof Error&&oc in e&&(t==null||!!(e.type&t))}const Kf=["params","query","hash"];function Gf(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Kf)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function zf(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(Zl," "),o=s.indexOf("="),i=Wr(o<0?s:s.slice(0,o)),a=o<0?null:Wr(s.slice(o+1));if(i in t){let l=t[i];Qt(l)||(l=t[i]=[l]),l.push(a)}else t[i]=a}return t}function na(e){let t="";for(let n in e){const r=e[n];if(n=If(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Qt(r)?r.map(s=>s&&bo(s)):[r&&bo(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Yf(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Qt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const Qf=Symbol(""),ra=Symbol(""),Ps=Symbol(""),Qo=Symbol(""),To=Symbol("");function xr(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function En(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const d=m=>{m===!1?l(yr(ht.NAVIGATION_ABORTED,{from:n,to:t})):m instanceof Error?l(m):Wf(m)?l(yr(ht.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(i&&r.enterCallbacks[s]===i&&typeof m=="function"&&i.push(m),a())},u=o(()=>e.call(r&&r.instances[s],t,n,d));let f=Promise.resolve(u);e.length<3&&(f=f.then(d)),f.catch(m=>l(m))})}function Qs(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Jl(l)){const d=(l.__vccOpts||l)[t];d&&o.push(En(d,n,r,i,a,s))}else{let d=l();o.push(()=>d.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const f=yf(u)?u.default:u;i.mods[a]=u,i.components[a]=f;const m=(f.__vccOpts||f)[t];return m&&En(m,n,r,i,a,s)()}))}}return o}function Jf(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;i<o;i++){const a=t.matched[i];a&&(e.matched.find(d=>vr(d,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(d=>vr(d,l))||s.push(l))}return[n,r,s]}/*!
22
+ * vue-router v4.6.4
23
+ * (c) 2025 Eduardo San Martin Morote
24
+ * @license MIT
25
+ */let Xf=()=>location.protocol+"//"+location.host;function ic(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,a=s.slice(i);return a[0]!=="/"&&(a="/"+a),Zi(a,"")}return Zi(n,e)+r+s}function Zf(e,t,n,r){let s=[],o=[],i=null;const a=({state:m})=>{const y=ic(e,location),$=n.value,C=t.value;let B=0;if(m){if(n.value=y,t.value=m,i&&i===$){i=null;return}B=C?m.position-C.position:0}else r(y);s.forEach(z=>{z(n.value,$,{delta:B,type:_o.pop,direction:B?B>0?Ys.forward:Ys.back:Ys.unknown})})};function l(){i=n.value}function d(m){s.push(m);const y=()=>{const $=s.indexOf(m);$>-1&&s.splice($,1)};return o.push(y),y}function u(){if(document.visibilityState==="hidden"){const{history:m}=window;if(!m.state)return;m.replaceState(Ye({},m.state,{scroll:$s()}),"")}}function f(){for(const m of o)m();o=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:d,destroy:f}}function sa(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?$s():null}}function eh(e){const{history:t,location:n}=window,r={value:ic(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,d,u){const f=e.indexOf("#"),m=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Xf()+e+l;try{t[u?"replaceState":"pushState"](d,"",m),s.value=d}catch(y){console.error(y),n[u?"replace":"assign"](m)}}function i(l,d){o(l,Ye({},t.state,sa(s.value.back,l,s.value.forward,!0),d,{position:s.value.position}),!0),r.value=l}function a(l,d){const u=Ye({},s.value,t.state,{forward:l,scroll:$s()});o(u.current,u,!0),o(l,Ye({},sa(r.value,l,null),{position:u.position+1},d),!1),r.value=l}return{location:r,state:s,push:a,replace:i}}function th(e){e=Df(e);const t=eh(e),n=Zf(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=Ye({location:"",base:e,go:r,createHref:Ff.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let zn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var yt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(yt||{});const nh={type:zn.Static,value:""},rh=/[a-zA-Z0-9_]/;function sh(e){if(!e)return[[]];if(e==="/")return[[nh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${n})/"${d}": ${y}`)}let n=yt.Static,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,l,d="",u="";function f(){d&&(n===yt.Static?o.push({type:zn.Static,value:d}):n===yt.Param||n===yt.ParamRegExp||n===yt.ParamRegExpEnd?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:zn.Param,value:d,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),d="")}function m(){d+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==yt.ParamRegExp){r=n,n=yt.EscapeNext;continue}switch(n){case yt.Static:l==="/"?(d&&f(),i()):l===":"?(f(),n=yt.Param):m();break;case yt.EscapeNext:m(),n=r;break;case yt.Param:l==="("?n=yt.ParamRegExp:rh.test(l)?m():(f(),n=yt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case yt.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=yt.ParamRegExpEnd:u+=l;break;case yt.ParamRegExpEnd:f(),n=yt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===yt.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),f(),i(),s}const oa="[^/]+?",oh={sensitive:!1,strict:!1,start:!0,end:!0};var $t=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})($t||{});const ih=/[.+*?^${}()[\]/\\]/g;function ah(e,t){const n=Ye({},oh,t),r=[];let s=n.start?"^":"";const o=[];for(const d of e){const u=d.length?[]:[$t.Root];n.strict&&!d.length&&(s+="/");for(let f=0;f<d.length;f++){const m=d[f];let y=$t.Segment+(n.sensitive?$t.BonusCaseSensitive:0);if(m.type===zn.Static)f||(s+="/"),s+=m.value.replace(ih,"\\$&"),y+=$t.Static;else if(m.type===zn.Param){const{value:$,repeatable:C,optional:B,regexp:z}=m;o.push({name:$,repeatable:C,optional:B});const M=z||oa;if(M!==oa){y+=$t.BonusCustomRegExp;try{`${M}`}catch(q){throw new Error(`Invalid custom RegExp for param "${$}" (${M}): `+q.message)}}let W=C?`((?:${M})(?:/(?:${M}))*)`:`(${M})`;f||(W=B&&d.length<2?`(?:/${W})`:"/"+W),B&&(W+="?"),s+=W,y+=$t.Dynamic,B&&(y+=$t.BonusOptional),C&&(y+=$t.BonusRepeatable),M===".*"&&(y+=$t.BonusWildcard)}u.push(y)}r.push(u)}if(n.strict&&n.end){const d=r.length-1;r[d][r[d].length-1]+=$t.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const i=new RegExp(s,n.sensitive?"":"i");function a(d){const u=d.match(i),f={};if(!u)return null;for(let m=1;m<u.length;m++){const y=u[m]||"",$=o[m-1];f[$.name]=y&&$.repeatable?y.split("/"):y}return f}function l(d){let u="",f=!1;for(const m of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const y of m)if(y.type===zn.Static)u+=y.value;else if(y.type===zn.Param){const{value:$,repeatable:C,optional:B}=y,z=$ in d?d[$]:"";if(Qt(z)&&!C)throw new Error(`Provided param "${$}" is an array but it is not repeatable (* or + modifiers)`);const M=Qt(z)?z.join("/"):z;if(!M)if(B)m.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${$}"`);u+=M}}return u||"/"}return{re:i,score:r,keys:o,parse:a,stringify:l}}function lh(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===$t.Static+$t.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===$t.Static+$t.Segment?1:-1:0}function ac(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const o=lh(r[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-r.length)===1){if(ia(r))return 1;if(ia(s))return-1}return s.length-r.length}function ia(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ch={strict:!1,end:!0,sensitive:!1};function uh(e,t,n){const r=ah(sh(e.path),n),s=Ye(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function dh(e,t){const n=[],r=new Map;t=Xi(ch,t);function s(f){return r.get(f)}function o(f,m,y){const $=!y,C=la(f);C.aliasOf=y&&y.record;const B=Xi(t,f),z=[C];if("alias"in f){const q=typeof f.alias=="string"?[f.alias]:f.alias;for(const fe of q)z.push(la(Ye({},C,{components:y?y.record.components:C.components,path:fe,aliasOf:y?y.record:C})))}let M,W;for(const q of z){const{path:fe}=q;if(m&&fe[0]!=="/"){const le=m.record.path,ne=le[le.length-1]==="/"?"":"/";q.path=m.record.path+(fe&&ne+fe)}if(M=uh(q,m,B),y?y.alias.push(M):(W=W||M,W!==M&&W.alias.push(M),$&&f.name&&!ca(M)&&i(f.name)),lc(M)&&l(M),C.children){const le=C.children;for(let ne=0;ne<le.length;ne++)o(le[ne],M,y&&y.children[ne])}y=y||M}return W?()=>{i(W)}:jr}function i(f){if(sc(f)){const m=r.get(f);m&&(r.delete(f),n.splice(n.indexOf(m),1),m.children.forEach(i),m.alias.forEach(i))}else{const m=n.indexOf(f);m>-1&&(n.splice(m,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function a(){return n}function l(f){const m=ph(f,n);n.splice(m,0,f),f.record.name&&!ca(f)&&r.set(f.record.name,f)}function d(f,m){let y,$={},C,B;if("name"in f&&f.name){if(y=r.get(f.name),!y)throw yr(ht.MATCHER_NOT_FOUND,{location:f});B=y.record.name,$=Ye(aa(m.params,y.keys.filter(W=>!W.optional).concat(y.parent?y.parent.keys.filter(W=>W.optional):[]).map(W=>W.name)),f.params&&aa(f.params,y.keys.map(W=>W.name))),C=y.stringify($)}else if(f.path!=null)C=f.path,y=n.find(W=>W.re.test(C)),y&&($=y.parse(C),B=y.record.name);else{if(y=m.name?r.get(m.name):n.find(W=>W.re.test(m.path)),!y)throw yr(ht.MATCHER_NOT_FOUND,{location:f,currentLocation:m});B=y.record.name,$=Ye({},m.params,f.params),C=y.stringify($)}const z=[];let M=y;for(;M;)z.unshift(M.record),M=M.parent;return{name:B,path:C,params:$,matched:z,meta:hh(z)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:d,removeRoute:i,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function aa(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function la(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:fh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function fh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ca(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hh(e){return e.reduce((t,n)=>Ye(t,n.meta),{})}function ph(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;ac(e,t[o])<0?r=o:n=o+1}const s=mh(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function mh(e){let t=e;for(;t=t.parent;)if(lc(t)&&ac(e,t)===0)return t}function lc({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ua(e){const t=Kt(Ps),n=Kt(Qo),r=ae(()=>{const l=Ee(e.to);return t.resolve(l)}),s=ae(()=>{const{matched:l}=r.value,{length:d}=l,u=l[d-1],f=n.matched;if(!u||!f.length)return-1;const m=f.findIndex(vr.bind(null,u));if(m>-1)return m;const y=da(l[d-2]);return d>1&&da(u)===y&&f[f.length-1].path!==y?f.findIndex(vr.bind(null,l[d-2])):m}),o=ae(()=>s.value>-1&&bh(n.params,r.value.params)),i=ae(()=>s.value>-1&&s.value===n.matched.length-1&&rc(n.params,r.value.params));function a(l={}){if(wh(l)){const d=t[Ee(e.replace)?"replace":"push"](Ee(e.to)).catch(jr);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:r,href:ae(()=>r.value.href),isActive:o,isExactActive:i,navigate:a}}function gh(e){return e.length===1?e[0]:e}const vh=kt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:ua,setup(e,{slots:t}){const n=Ts(ua(e)),{options:r}=Kt(Ps),s=ae(()=>({[fa(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[fa(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&gh(t.default(n));return e.custom?o:zo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),yh=vh;function wh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function bh(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Qt(s)||s.length!==r.length||r.some((o,i)=>o.valueOf()!==s[i].valueOf()))return!1}return!0}function da(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const fa=(e,t,n)=>e??t??n,_h=kt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Kt(To),s=ae(()=>e.route||r.value),o=Kt(ra,0),i=ae(()=>{let d=Ee(o);const{matched:u}=s.value;let f;for(;(f=u[d])&&!f.components;)d++;return d}),a=ae(()=>s.value.matched[i.value]);is(ra,ae(()=>i.value+1)),is(Qf,a),is(To,s);const l=V();return dt(()=>[l.value,a.value,e.name],([d,u,f],[m,y,$])=>{u&&(u.instances[f]=d,y&&y!==u&&d&&d===m&&(u.leaveGuards.size||(u.leaveGuards=y.leaveGuards),u.updateGuards.size||(u.updateGuards=y.updateGuards))),d&&u&&(!y||!vr(u,y)||!m)&&(u.enterCallbacks[f]||[]).forEach(C=>C(d))},{flush:"post"}),()=>{const d=s.value,u=e.name,f=a.value,m=f&&f.components[u];if(!m)return ha(n.default,{Component:m,route:d});const y=f.props[u],$=y?y===!0?d.params:typeof y=="function"?y(d):y:null,B=zo(m,Ye({},$,t,{onVnodeUnmounted:z=>{z.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return ha(n.default,{Component:B,route:d})||B}}});function ha(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const kh=_h;function Th(e){const t=dh(e.routes,e),n=e.parseQuery||zf,r=e.stringifyQuery||na,s=e.history,o=xr(),i=xr(),a=xr(),l=bu(Tn);let d=Tn;ur&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Gs.bind(null,E=>""+E),f=Gs.bind(null,$f),m=Gs.bind(null,Wr);function y(E,A){let O,K;return sc(E)?(O=t.getRecordMatcher(E),K=A):K=E,t.addRoute(K,O)}function $(E){const A=t.getRecordMatcher(E);A&&t.removeRoute(A)}function C(){return t.getRoutes().map(E=>E.record)}function B(E){return!!t.getRecordMatcher(E)}function z(E,A){if(A=Ye({},A||l.value),typeof E=="string"){const S=zs(n,E,A.path),D=t.resolve({path:S.path},A),H=s.createHref(S.fullPath);return Ye(S,D,{params:m(D.params),hash:Wr(S.hash),redirectedFrom:void 0,href:H})}let O;if(E.path!=null)O=Ye({},E,{path:zs(n,E.path,A.path).path});else{const S=Ye({},E.params);for(const D in S)S[D]==null&&delete S[D];O=Ye({},E,{params:f(S)}),A.params=f(A.params)}const K=t.resolve(O,A),_e=E.hash||"";K.params=u(m(K.params));const p=Nf(r,Ye({},E,{hash:Af(_e),path:K.path})),g=s.createHref(p);return Ye({fullPath:p,hash:_e,query:r===na?Yf(E.query):E.query||{}},K,{redirectedFrom:void 0,href:g})}function M(E){return typeof E=="string"?zs(n,E,l.value.path):Ye({},E)}function W(E,A){if(d!==E)return yr(ht.NAVIGATION_CANCELLED,{from:A,to:E})}function q(E){return ne(E)}function fe(E){return q(Ye(M(E),{replace:!0}))}function le(E,A){const O=E.matched[E.matched.length-1];if(O&&O.redirect){const{redirect:K}=O;let _e=typeof K=="function"?K(E,A):K;return typeof _e=="string"&&(_e=_e.includes("?")||_e.includes("#")?_e=M(_e):{path:_e},_e.params={}),Ye({query:E.query,hash:E.hash,params:_e.path!=null?{}:E.params},_e)}}function ne(E,A){const O=d=z(E),K=l.value,_e=E.state,p=E.force,g=E.replace===!0,S=le(O,K);if(S)return ne(Ye(M(S),{state:typeof S=="object"?Ye({},_e,S.state):_e,force:p,replace:g}),A||O);const D=O;D.redirectedFrom=A;let H;return!p&&Of(r,K,O)&&(H=yr(ht.NAVIGATION_DUPLICATED,{to:D,from:K}),Xe(K,K,!0,!1)),(H?Promise.resolve(H):ee(D,K)).catch(L=>un(L)?un(L,ht.NAVIGATION_GUARD_REDIRECT)?L:tt(L):Ie(L,D,K)).then(L=>{if(L){if(un(L,ht.NAVIGATION_GUARD_REDIRECT))return ne(Ye({replace:g},M(L.to),{state:typeof L.to=="object"?Ye({},_e,L.to.state):_e,force:p}),A||D)}else L=J(D,K,!0,g,_e);return ue(D,K,L),L})}function pe(E,A){const O=W(E,A);return O?Promise.reject(O):Promise.resolve()}function te(E){const A=oe.values().next().value;return A&&typeof A.runWithContext=="function"?A.runWithContext(E):E()}function ee(E,A){let O;const[K,_e,p]=Jf(E,A);O=Qs(K.reverse(),"beforeRouteLeave",E,A);for(const S of K)S.leaveGuards.forEach(D=>{O.push(En(D,E,A))});const g=pe.bind(null,E,A);return O.push(g),de(O).then(()=>{O=[];for(const S of o.list())O.push(En(S,E,A));return O.push(g),de(O)}).then(()=>{O=Qs(_e,"beforeRouteUpdate",E,A);for(const S of _e)S.updateGuards.forEach(D=>{O.push(En(D,E,A))});return O.push(g),de(O)}).then(()=>{O=[];for(const S of p)if(S.beforeEnter)if(Qt(S.beforeEnter))for(const D of S.beforeEnter)O.push(En(D,E,A));else O.push(En(S.beforeEnter,E,A));return O.push(g),de(O)}).then(()=>(E.matched.forEach(S=>S.enterCallbacks={}),O=Qs(p,"beforeRouteEnter",E,A,te),O.push(g),de(O))).then(()=>{O=[];for(const S of i.list())O.push(En(S,E,A));return O.push(g),de(O)}).catch(S=>un(S,ht.NAVIGATION_CANCELLED)?S:Promise.reject(S))}function ue(E,A,O){a.list().forEach(K=>te(()=>K(E,A,O)))}function J(E,A,O,K,_e){const p=W(E,A);if(p)return p;const g=A===Tn,S=ur?history.state:{};O&&(K||g?s.replace(E.fullPath,Ye({scroll:g&&S&&S.scroll},_e)):s.push(E.fullPath,_e)),l.value=E,Xe(E,A,O,g),tt()}let Re;function Ue(){Re||(Re=s.listen((E,A,O)=>{if(!we.listening)return;const K=z(E),_e=le(K,we.currentRoute.value);if(_e){ne(Ye(_e,{replace:!0,force:!0}),K).catch(jr);return}d=K;const p=l.value;ur&&Vf(ta(p.fullPath,O.delta),$s()),ee(K,p).catch(g=>un(g,ht.NAVIGATION_ABORTED|ht.NAVIGATION_CANCELLED)?g:un(g,ht.NAVIGATION_GUARD_REDIRECT)?(ne(Ye(M(g.to),{force:!0}),K).then(S=>{un(S,ht.NAVIGATION_ABORTED|ht.NAVIGATION_DUPLICATED)&&!O.delta&&O.type===_o.pop&&s.go(-1,!1)}).catch(jr),Promise.reject()):(O.delta&&s.go(-O.delta,!1),Ie(g,K,p))).then(g=>{g=g||J(K,p,!1),g&&(O.delta&&!un(g,ht.NAVIGATION_CANCELLED)?s.go(-O.delta,!1):O.type===_o.pop&&un(g,ht.NAVIGATION_ABORTED|ht.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),ue(K,p,g)}).catch(jr)}))}let Ze=xr(),xe=xr(),Ne;function Ie(E,A,O){tt(E);const K=xe.list();return K.length?K.forEach(_e=>_e(E,A,O)):console.error(E),Promise.reject(E)}function et(){return Ne&&l.value!==Tn?Promise.resolve():new Promise((E,A)=>{Ze.add([E,A])})}function tt(E){return Ne||(Ne=!E,Ue(),Ze.list().forEach(([A,O])=>E?O(E):A()),Ze.reset()),E}function Xe(E,A,O,K){const{scrollBehavior:_e}=e;if(!ur||!_e)return Promise.resolve();const p=!O&&qf(ta(E.fullPath,0))||(K||!O)&&history.state&&history.state.scroll||null;return Wt().then(()=>_e(E,A,p)).then(g=>g&&Uf(g)).catch(g=>Ie(g,E,A))}const Fe=E=>s.go(E);let ct;const oe=new Set,we={currentRoute:l,listening:!0,addRoute:y,removeRoute:$,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:C,resolve:z,options:e,push:q,replace:fe,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:a.add,onError:xe.add,isReady:et,install(E){E.component("RouterLink",yh),E.component("RouterView",kh),E.config.globalProperties.$router=we,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>Ee(l)}),ur&&!ct&&l.value===Tn&&(ct=!0,q(s.location).catch(K=>{}));const A={};for(const K in Tn)Object.defineProperty(A,K,{get:()=>l.value[K],enumerable:!0});E.provide(Ps,we),E.provide(Qo,sl(A)),E.provide(To,l);const O=E.unmount;oe.add(E),E.unmount=function(){oe.delete(E),oe.size<1&&(d=Tn,Re&&Re(),Re=null,l.value=Tn,ct=!1,Ne=!1),O()}}};function de(E){return E.reduce((A,O)=>A.then(()=>te(O)),Promise.resolve())}return we}function Sh(){return Kt(Ps)}function xh(e){return Kt(Qo)}const pa=768;function cc(){const e=V(typeof window<"u"?window.innerWidth<pa:!1);let t=null;function n(r){e.value=r.matches}return Nn(()=>{t=window.matchMedia(`(max-width: ${pa-1}px)`),e.value=t.matches,t.addEventListener("change",n)}),Es(()=>{t==null||t.removeEventListener("change",n)}),{isMobile:e}}const Ch={key:0,class:"desktop-sidebar"},Eh={class:"desktop-main"},ma="codex-web-local.sidebar-width.v1",Ah=260,Ih=620,ga=320,Rh=kt({__name:"DesktopLayout",props:{isSidebarCollapsed:{type:Boolean,default:!1}},emits:["close-sidebar"],setup(e){const t=e,{isMobile:n}=cc();function r(d){return Math.min(Ih,Math.max(Ah,d))}function s(){if(typeof window>"u")return ga;const d=window.localStorage.getItem(ma),u=Number(d);return Number.isFinite(u)?r(u):ga}const o=V(s()),i=ae(()=>n.value||t.isSidebarCollapsed?{"--sidebar-width":"0px","--layout-columns":"minmax(0, 1fr)"}:{"--sidebar-width":`${o.value}px`,"--layout-columns":"var(--sidebar-width) 1px minmax(0, 1fr)"});function a(d){typeof window>"u"||window.localStorage.setItem(ma,String(d))}function l(d){d.preventDefault();const u=d.clientX,f=o.value,m=$=>{const C=$.clientX-u;o.value=r(f+C)},y=()=>{a(o.value),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)};window.addEventListener("mousemove",m),window.addEventListener("mouseup",y)}return(d,u)=>(b(),x("div",{class:ut(["desktop-layout",{"is-mobile":Ee(n)}]),style:Jn(i.value)},[Ee(n)?(b(),at(vl,{key:0,to:"body"},[Ae(Ud,{name:"drawer"},{default:nt(()=>[e.isSidebarCollapsed?ve("",!0):(b(),x("div",{key:0,class:"mobile-drawer-backdrop",onClick:u[1]||(u[1]=f=>d.$emit("close-sidebar"))},[w("aside",{class:"mobile-drawer",onClick:u[0]||(u[0]=lt(()=>{},["stop"]))},[rn(d.$slots,"sidebar",{},void 0,!0)])]))]),_:3})])):ve("",!0),Ee(n)?ve("",!0):(b(),x(Le,{key:1},[e.isSidebarCollapsed?ve("",!0):(b(),x("aside",Ch,[rn(d.$slots,"sidebar",{},void 0)])),e.isSidebarCollapsed?ve("",!0):(b(),x("button",{key:1,class:"desktop-resize-handle",type:"button","aria-label":"Resize sidebar",onMousedown:l},null,32))],64)),w("section",Eh,[rn(d.$slots,"content",{},void 0)])],6))}}),Ke=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},$h=Ke(Rh,[["__scopeId","data-v-2039d51b"]]),Ph={},Mh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Nh(e,t){return b(),x("svg",Mh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2m2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8m-9 4h4"},null,-1)])])}const Js=Ke(Ph,[["render",Nh]]),Oh={},jh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Lh(e,t){return b(),x("svg",jh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9l6 6l6-6"},null,-1)])])}const Jo=Ke(Oh,[["render",Lh]]),Dh={},Bh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Fh(e,t){return b(),x("svg",Bh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 6l6 6l-6 6"},null,-1)])])}const uc=Ke(Dh,[["render",Fh]]),Hh={},Uh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Vh(e,t){return b(),x("svg",Uh,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M6 12a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const va=Ke(Hh,[["render",Vh]]),qh={},Wh={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Kh(e,t){return b(),x("svg",Wh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 20h4L18.5 9.5a2.828 2.828 0 1 0-4-4L4 16zm9.5-13.5l4 4"},null,-1)])])}const dc=Ke(qh,[["render",Kh]]),Gh={},zh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Yh(e,t){return b(),x("svg",zh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2"},null,-1)])])}const Qh=Ke(Gh,[["render",Yh]]),Jh={},Xh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Zh(e,t){return b(),x("svg",Xh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m5 19l2.757-7.351A1 1 0 0 1 8.693 11H21a1 1 0 0 1 .986 1.164l-.996 5.211A2 2 0 0 1 19.026 19za2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v2"},null,-1)])])}const ep=Ke(Jh,[["render",Zh]]),tp={},np={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function rp(e,t){return b(),x("svg",np,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 18v-6m0 0a4 4 0 0 1 4-4h2m-6 4a4 4 0 0 0-4-4H6m0-4a2 2 0 1 0 0 4a2 2 0 0 0 0-4m12 0a2 2 0 1 0 0 4a2 2 0 0 0 0-4m-6 14a2 2 0 1 0 0 4a2 2 0 0 0 0-4"},null,-1)])])}const Xs=Ke(tp,[["render",rp]]),sp={},op={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function ip(e,t){return b(),x("svg",op,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 4.5l-4 4L7 10l-1.5 1.5l7 7L14 17l1.5-4l4-4M9 15l-4.5 4.5M14.5 4L20 9.5"},null,-1)])])}const Zs=Ke(sp,[["render",ip]]),ap={key:0,class:"sidebar-menu-row-left"},lp={class:"sidebar-menu-row-main"},cp={key:1,class:"sidebar-menu-row-right"},up={key:0,class:"sidebar-menu-row-right-default"},dp={key:1,class:"sidebar-menu-row-right-hover"},fp=kt({inheritAttrs:!1,__name:"SidebarMenuRow",props:{as:{default:"div"},forceRightHover:{type:Boolean,default:!1}},setup(e){const t=e,n=Ju(),r=ae(()=>!!n.left),s=ae(()=>!!n.right),o=ae(()=>!!n["right-hover"]),i=ae(()=>s.value||o.value);return(a,l)=>(b(),at(zu(t.as),Wl({class:"sidebar-menu-row","data-has-left":r.value,"data-has-right":i.value,"data-has-right-hover":o.value,"data-force-right-hover":t.forceRightHover},a.$attrs),{default:nt(()=>[r.value?(b(),x("span",ap,[rn(a.$slots,"left",{},void 0,!0)])):ve("",!0),w("span",lp,[rn(a.$slots,"default",{},void 0,!0)]),i.value?(b(),x("span",cp,[s.value?(b(),x("span",up,[rn(a.$slots,"right",{},void 0,!0)])):ve("",!0),o.value?(b(),x("span",dp,[rn(a.$slots,"right-hover",{},void 0,!0)])):ve("",!0)])):ve("",!0)]),_:3},16,["data-has-left","data-has-right","data-has-right-hover","data-force-right-hover"]))}}),qn=Ke(fp,[["__scopeId","data-v-daeca4df"]]),hp={class:"thread-tree-root"},pp={key:0,class:"pinned-section"},mp={class:"thread-list"},gp={class:"thread-left-stack"},vp=["data-state"],yp=["onClick"],wp=["onClick"],bp={class:"thread-row-title-wrap"},_p={class:"thread-row-title"},kp={class:"thread-row-time"},Tp=["data-confirm","onClick"],Sp={key:0},xp=["aria-expanded"],Cp=["data-active"],Ep={key:0},Ap=["data-active"],Ip={key:0},Rp={key:1,class:"thread-tree-no-results"},$p={key:2,class:"thread-tree-loading"},Pp={key:3,class:"thread-list thread-list-global"},Mp={class:"thread-left-stack"},Np=["data-state"],Op=["onClick"],jp=["onClick"],Lp={class:"thread-row-title-wrap"},Dp={class:"thread-row-title"},Bp={class:"thread-row-time"},Fp=["data-confirm","onClick"],Hp={key:0},Up=["data-project-name","data-expanded","data-dragging"],Vp={class:"project-icon-stack"},qp={class:"project-icon-folder"},Wp={class:"project-icon-chevron"},Kp=["data-dragging-handle","onMousedown"],Gp={class:"project-title"},zp={class:"project-hover-controls"},Yp=["onClick"],Qp=["onClick"],Jp=["onClick"],Xp=["onInput"],Zp=["aria-label","title","onClick"],em={key:0,class:"thread-list"},tm={class:"thread-left-stack"},nm=["data-state"],rm=["onClick"],sm=["onClick"],om={class:"thread-row-title-wrap"},im={class:"thread-row-title"},am={class:"thread-row-time"},lm=["data-confirm","onClick"],cm={key:0},um=["onClick"],dm=4,ya=6,wa="codex-web-local.thread-view-mode.v1",ba="codex-web-local.collapsed-projects.v1",fm=kt({__name:"SidebarThreadTree",props:{groups:{},projectDisplayNameById:{},selectedThreadId:{},isLoading:{type:Boolean},searchQuery:{}},emits:["select","archive","start-new-thread","rename-project","remove-project","reorder-project"],setup(e,{emit:t}){const n=e,r=t,s=V({}),o=V({}),i=V([]),a=V(""),l=V(""),d=V("actions"),u=V(""),f=V(null),m=V(null),y=V(null);let $=null,C=null;const B=V(""),z=V({}),M=new Map,W=new Map,q=new WeakMap,fe=V(null),le=V(!1),ne=V(ee()),pe=typeof window<"u"?new ResizeObserver(_=>{for(const R of _){const N=R.target,Q=q.get(N);Q&&P(Q,N)}}):null;function te(){if(typeof window>"u")return{};try{const _=window.localStorage.getItem(ba);if(!_)return{};const R=JSON.parse(_);return!R||typeof R!="object"||Array.isArray(R)?{}:R}catch{return{}}}function ee(){return typeof window>"u"?"project":window.localStorage.getItem(wa)==="chronological"?"chronological":"project"}o.value=te(),dt(o,_=>{typeof window>"u"||window.localStorage.setItem(ba,JSON.stringify(_))},{deep:!0}),dt(ne,_=>{typeof window>"u"||window.localStorage.setItem(wa,_)});const ue=ae(()=>n.searchQuery.trim().toLowerCase()),J=ae(()=>ue.value.length>0);function Re(_){if(!J.value)return!0;const R=ue.value;return _.title.toLowerCase().includes(R)||_.preview.toLowerCase().includes(R)}const Ue=ae(()=>J.value?n.groups.map(_=>({..._,threads:_.threads.filter(Re)})).filter(_=>_.threads.length>0):n.groups),Ze=ae(()=>ne.value==="chronological"),xe=ae(()=>{const _=Ue.value,R=[];for(const N of _)for(const Q of N.threads)oe(Q.id)||R.push(Q);return R.sort((N,Q)=>{const Be=new Date(N.updatedAtIso||N.createdAtIso).getTime();return new Date(Q.updatedAtIso||Q.createdAtIso).getTime()-Be})}),Ne=ae(()=>{const _=new Map;for(const R of n.groups)for(const N of R.threads)_.set(N.id,N);return _}),Ie=ae(()=>i.value.map(_=>Ne.value.get(_)??null).filter(_=>_!==null).filter(Re)),et=ae(()=>{const _=y.value;if(!_||_.dropTargetIndexFull===null||n.groups.length===0)return null;const R=Math.max(0,Math.min(_.dropTargetIndexFull,n.groups.length)),N=R>_.fromIndex?R-1:R,Q=Math.max(0,Math.min(N,n.groups.length-1));return Q===_.fromIndex?null:Q}),tt=ae(()=>{const R=(J.value?Ue.value:n.groups).map(Ot=>Ot.projectName),N=y.value,Q=et.value;if(!N||Q===null)return R;const Be=[...R],[vt]=Be.splice(N.fromIndex,1);return vt?(Be.splice(Q,0,vt),Be):R}),Xe=ae(()=>{const _={};let R=0;for(const N of tt.value)_[N]=R,R+=Se(N);return _}),Fe=ae(()=>{let _=0;for(const R of tt.value)_+=Se(R);return{height:`${Math.max(0,_)}px`}});function ct(_){const R=new Date(_).getTime();if(Number.isNaN(R))return"n/a";const N=Math.abs(Date.now()-R);if(N<6e4)return"now";const Q=Math.floor(N/6e4);if(Q<60)return`${Q}m`;const Be=Math.floor(Q/60);return Be<24?`${Be}h`:`${Math.floor(Be/24)}d`}function oe(_){return i.value.includes(_)}function we(_){if(oe(_)){i.value=i.value.filter(R=>R!==_);return}i.value=[_,...i.value]}function de(_){r("select",_)}function E(_){if(a.value!==_){a.value=_;return}a.value="",i.value=i.value.filter(R=>R!==_),r("archive",_)}function A(_){return`start new thread ${_e(_)}`}function O(_){r("start-new-thread",_)}function K(_){a.value===_&&(a.value="")}function _e(_){return n.projectDisplayNameById[_]??_}function p(_){return l.value===_}function g(){l.value="",d.value="actions",u.value=""}function S(){le.value=!le.value}function D(_){ne.value=_,le.value=!1}function H(_){if(l.value===_){g();return}l.value=_,d.value="actions",u.value=_e(_)}function L(_){l.value=_,d.value="rename",u.value=_e(_)}function re(_){r("rename-project",{projectName:_,displayName:u.value})}function X(_){r("remove-project",_),g()}function Z(_,R){if(!_.altKey||_.key!=="ArrowUp"&&_.key!=="ArrowDown")return;const N=n.groups.findIndex(vt=>vt.projectName===R);if(N<0)return;const Q=_.key==="ArrowUp"?-1:1,Be=Math.max(0,Math.min(N+Q,n.groups.length-1));Be!==N&&(_.preventDefault(),r("reorder-project",{projectName:R,toIndex:Be}))}function G(_){return s.value[_]===!0}function ie(_){return o.value[_]===!0}function se(_){s.value={...s.value,[_]:!G(_)}}function be(_){if(B.value===_){B.value="";return}o.value={...o.value,[_]:!ie(_)}}function Se(_){const R=z.value[_]??0,N=y.value,Be=((N==null?void 0:N.projectName)===_?N.groupHeight:null)??R,vt=ie(_)?0:ya;return Math.max(0,Be+vt)}function Pe(_,R){const N=R instanceof HTMLElement?R:R&&"$el"in R&&R.$el instanceof HTMLElement?R.$el:null;if(N){W.set(_,N);return}W.delete(_)}function Me(_){const R=l.value;if(!R)return!1;const N=W.get(R);if(!N)return!1;if((typeof _.composedPath=="function"?_.composedPath():[]).includes(N))return!0;const Be=_.target;return Be instanceof Node?N.contains(Be):!1}function De(_){if(le.value){const R=fe.value,N=typeof _.composedPath=="function"?_.composedPath():[];!!R&&(N.includes(R)||_.target instanceof Node&&R.contains(_.target))||(le.value=!1)}l.value&&(Me(_)||g())}function Ve(_){l.value&&(Me(_)||g())}function qe(){le.value&&(le.value=!1),l.value&&g()}function pt(){window.addEventListener("pointerdown",De,{capture:!0}),window.addEventListener("focusin",Ve,{capture:!0}),window.addEventListener("blur",qe)}function k(){window.removeEventListener("pointerdown",De,{capture:!0}),window.removeEventListener("focusin",Ve,{capture:!0}),window.removeEventListener("blur",qe)}function P(_,R){const N=R.getBoundingClientRect().height;if(!Number.isFinite(N)||N<=0)return;const Q=z.value[_];Q!==void 0&&Math.abs(Q-N)<.5||(z.value={...z.value,[_]:N})}function I(_,R){const N=M.get(_);N&&N!==R&&pe&&pe.unobserve(N);const Q=R instanceof HTMLElement?R:R&&"$el"in R&&R.$el instanceof HTMLElement?R.$el:null;if(Q){M.set(_,Q),q.set(Q,_),P(_,Q),pe==null||pe.observe(Q);return}N&&(pe==null||pe.unobserve(N)),M.delete(_)}function Y(_,R){if(_.button!==0||m.value||y.value)return;const N=n.groups.findIndex(Ot=>Ot.projectName===R),Q=M.get(R);if(N<0||!Q)return;const Be=Q.getBoundingClientRect(),vt=ie(R)?0:ya;m.value={projectName:R,fromIndex:N,startClientX:_.clientX,startClientY:_.clientY,pointerOffsetY:_.clientY-Be.top,groupLeft:Be.left,groupWidth:Be.width,groupHeight:Be.height,groupOuterHeight:Be.height+vt},_.preventDefault(),me()}function me(){window.addEventListener("mousemove",Ge),window.addEventListener("mouseup",ye),window.addEventListener("keydown",he)}function Ce(){window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",ye),window.removeEventListener("keydown",he)}function Ge(_){$={clientX:_.clientX,clientY:_.clientY},rt()}function ye(_){Ut({clientX:_.clientX,clientY:_.clientY});const R=y.value;if(R&&et.value!==null){const N=n.groups.findIndex(Q=>Q.projectName===R.projectName);if(N>=0){const Q=et.value;Q!==N&&r("reorder-project",{projectName:R.projectName,toIndex:Q})}}ot()}function he(_){_.key==="Escape"&&(!m.value&&!y.value||(_.preventDefault(),ot()))}function ot(){C!==null&&(window.cancelAnimationFrame(C),C=null),$=null,m.value=null,y.value=null,B.value="",Ce()}function rt(){C===null&&(C=window.requestAnimationFrame(()=>{if(C=null,!$)return;const _=$;$=null,Ut(_)}))}function Ut(_){const R=m.value;if(!y.value&&R){const N=_.clientX-R.startClientX,Q=_.clientY-R.startClientY;if(Math.hypot(N,Q)<dm)return;g(),B.value=R.projectName,y.value={projectName:R.projectName,fromIndex:R.fromIndex,pointerOffsetY:R.pointerOffsetY,groupLeft:R.groupLeft,groupWidth:R.groupWidth,groupHeight:R.groupHeight,groupOuterHeight:R.groupOuterHeight,ghostTop:_.clientY-R.pointerOffsetY,dropTargetIndexFull:null}}y.value&&on(_)}function on(_){const R=y.value;if(!R)return;if(R.ghostTop=_.clientY-R.pointerOffsetY,!Xn(_)){R.dropTargetIndexFull=null;return}const N=_.clientY,Q=f.value;if(!Q){R.dropTargetIndexFull=null;return}const Be=Q.getBoundingClientRect(),vt=new Map(n.groups.map((j,ge)=>[j.projectName,ge])),Ot=n.groups.map(j=>j.projectName).filter(j=>j!==R.projectName);let Ln=0,rr=n.groups.length;for(const j of Ot){const ge=vt.get(j);if(ge===void 0)continue;const Oe=Se(j),mt=Be.top+Ln+Oe/2;if(N<mt){rr=ge;break}Ln+=Oe}R.dropTargetIndexFull=rr}function Xn(_){const R=f.value;if(!R)return!1;const N=R.getBoundingClientRect(),Q=_.clientX>=N.left&&_.clientX<=N.right,Be=_.clientY>=N.top-32&&_.clientY<=N.bottom+32;return Q&&Be}function jn(_){var R;return((R=y.value)==null?void 0:R.projectName)===_}function br(_){const R=y.value,N=Xe.value[_]??0,Q=l.value===_;return!R||R.projectName!==_?{position:"absolute",top:"0",left:"0",right:"0",zIndex:Q?"40":"1",transform:`translate3d(0, ${N}px, 0)`,willChange:"transform",transition:"transform 180ms ease"}:{position:"fixed",top:"0",left:`${R.groupLeft}px`,width:`${R.groupWidth}px`,height:`${R.groupHeight}px`,zIndex:"50",pointerEvents:"none",transform:`translate3d(0, ${R.ghostTop}px, 0)`,willChange:"transform",transition:"transform 0ms linear"}}function Lt(_){return _.threads.filter(R=>!oe(R.id))}function Zn(_){if(J.value)return Lt(_);if(ie(_.projectName))return[];const R=Lt(_);return G(_.projectName)?R:R.slice(0,10)}function er(_){return J.value?!1:!ie(_.projectName)&&Lt(_).length>10}function tr(_){return Lt(_).length>0}function an(_){return _.inProgress?"working":_.unread?"unread":"idle"}dt(()=>n.groups.map(_=>_.projectName),_=>{var Be,vt;const R=((Be=y.value)==null?void 0:Be.projectName)??((vt=m.value)==null?void 0:vt.projectName)??"";R&&!n.groups.some(Ot=>Ot.projectName===R)&&ot();const N=new Set(_),Q=Object.fromEntries(Object.entries(z.value).filter(([Ot])=>N.has(Ot)));Object.keys(Q).length!==Object.keys(z.value).length&&(z.value=Q)});const nr=ae(()=>le.value||l.value!=="");return dt(nr,_=>{if(_){pt();return}k()}),On(()=>{for(const _ of M.values())pe==null||pe.unobserve(_);M.clear(),W.clear(),k(),ot()}),(_,R)=>(b(),x("section",hp,[Ie.value.length>0?(b(),x("section",pp,[w("ul",mp,[(b(!0),x(Le,null,gt(Ie.value,N=>(b(),x("li",{key:N.id,class:"thread-row-item"},[Ae(qn,{class:"thread-row","data-active":N.id===e.selectedThreadId,"data-pinned":oe(N.id),onMouseleave:Q=>K(N.id)},{left:nt(()=>[w("span",gp,[N.inProgress||N.unread?(b(),x("span",{key:0,class:"thread-status-indicator","data-state":an(N)},null,8,vp)):ve("",!0),w("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:Q=>we(N.id)},[Ae(Zs,{class:"thread-icon"})],8,yp)])]),right:nt(()=>[w("span",kp,Te(ct(N.createdAtIso||N.updatedAtIso)),1)]),"right-hover":nt(()=>[w("button",{class:"thread-archive-button","data-confirm":a.value===N.id,type:"button",title:"archive_thread",onClick:Q=>E(N.id)},[a.value===N.id?(b(),x("span",Sp,"confirm")):(b(),at(Js,{key:1,class:"thread-icon"}))],8,Tp)]),default:nt(()=>[w("button",{class:"thread-main-button",type:"button",onClick:Q=>de(N.id)},[w("span",bp,[w("span",_p,Te(N.title),1),N.hasWorktree?(b(),at(Xs,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ve("",!0)])],8,wp)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])])):ve("",!0),Ae(qn,{as:"header",class:"thread-tree-header-row"},{right:nt(()=>[w("div",{ref_key:"organizeMenuWrapRef",ref:fe,class:"organize-menu-wrap"},[w("button",{class:"organize-menu-trigger",type:"button","aria-expanded":le.value,"aria-label":"Organize threads",title:"Organize threads",onClick:S},[Ae(va,{class:"thread-icon"})],8,xp),le.value?(b(),x("div",{key:0,class:"organize-menu-panel",onClick:R[2]||(R[2]=lt(()=>{},["stop"]))},[R[7]||(R[7]=w("p",{class:"organize-menu-title"},"Organize",-1)),w("button",{class:"organize-menu-item","data-active":ne.value==="project",type:"button",onClick:R[0]||(R[0]=N=>D("project"))},[R[5]||(R[5]=w("span",null,"By project",-1)),ne.value==="project"?(b(),x("span",Ep,"✓")):ve("",!0)],8,Cp),w("button",{class:"organize-menu-item","data-active":ne.value==="chronological",type:"button",onClick:R[1]||(R[1]=N=>D("chronological"))},[R[6]||(R[6]=w("span",null,"Chronological list",-1)),ne.value==="chronological"?(b(),x("span",Ip,"✓")):ve("",!0)],8,Ap)])):ve("",!0)],512)]),default:nt(()=>[R[8]||(R[8]=w("span",{class:"thread-tree-header"},"Threads",-1))]),_:1}),J.value&&Ue.value.length===0?(b(),x("p",Rp,"No matching threads")):e.isLoading&&e.groups.length===0?(b(),x("p",$p,"Loading threads...")):Ze.value?(b(),x("ul",Pp,[(b(!0),x(Le,null,gt(xe.value,N=>(b(),x("li",{key:N.id,class:"thread-row-item"},[Ae(qn,{class:"thread-row","data-active":N.id===e.selectedThreadId,"data-pinned":oe(N.id),onMouseleave:Q=>K(N.id)},{left:nt(()=>[w("span",Mp,[N.inProgress||N.unread?(b(),x("span",{key:0,class:"thread-status-indicator","data-state":an(N)},null,8,Np)):ve("",!0),w("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:Q=>we(N.id)},[Ae(Zs,{class:"thread-icon"})],8,Op)])]),right:nt(()=>[w("span",Bp,Te(ct(N.createdAtIso||N.updatedAtIso)),1)]),"right-hover":nt(()=>[w("button",{class:"thread-archive-button","data-confirm":a.value===N.id,type:"button",title:"archive_thread",onClick:Q=>E(N.id)},[a.value===N.id?(b(),x("span",Hp,"confirm")):(b(),at(Js,{key:1,class:"thread-icon"}))],8,Fp)]),default:nt(()=>[w("button",{class:"thread-main-button",type:"button",onClick:Q=>de(N.id)},[w("span",Lp,[w("span",Dp,Te(N.title),1),N.hasWorktree?(b(),at(Xs,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ve("",!0)])],8,jp)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])):(b(),x("div",{key:4,ref_key:"groupsContainerRef",ref:f,class:"thread-tree-groups",style:Jn(Fe.value)},[(b(!0),x(Le,null,gt(Ue.value,N=>(b(),x("article",{key:N.projectName,ref_for:!0,ref:Q=>I(N.projectName,Q),class:"project-group","data-project-name":N.projectName,"data-expanded":!ie(N.projectName),"data-dragging":jn(N.projectName),style:Jn(br(N.projectName))},[Ae(qn,{as:"div",class:"project-header-row",role:"button",tabindex:"0",onClick:Q=>be(N.projectName),onKeydown:[Q=>Z(Q,N.projectName),Nt(lt(Q=>be(N.projectName),["prevent"]),["enter"]),Nt(lt(Q=>be(N.projectName),["prevent"]),["space"])]},{left:nt(()=>[w("span",Vp,[w("span",qp,[ie(N.projectName)?(b(),at(Qh,{key:0,class:"thread-icon"})):(b(),at(ep,{key:1,class:"thread-icon"}))]),w("span",Wp,[ie(N.projectName)?(b(),at(uc,{key:0,class:"thread-icon"})):(b(),at(Jo,{key:1,class:"thread-icon"}))])])]),right:nt(()=>[w("div",zp,[w("div",{ref_for:!0,ref:Q=>Pe(N.projectName,Q),class:"project-menu-wrap"},[w("button",{class:"project-menu-trigger",type:"button",title:"project_menu",onClick:lt(Q=>H(N.projectName),["stop"])},[Ae(va,{class:"thread-icon"})],8,Yp),p(N.projectName)?(b(),x("div",{key:0,class:"project-menu-panel",onClick:R[4]||(R[4]=lt(()=>{},["stop"]))},[d.value==="actions"?(b(),x(Le,{key:0},[w("button",{class:"project-menu-item",type:"button",onClick:Q=>L(N.projectName)}," Edit name ",8,Qp),w("button",{class:"project-menu-item project-menu-item-danger",type:"button",onClick:Q=>X(N.projectName)}," Remove ",8,Jp)],64)):(b(),x(Le,{key:1},[R[9]||(R[9]=w("label",{class:"project-menu-label"},"Project name",-1)),Rn(w("input",{"onUpdate:modelValue":R[3]||(R[3]=Q=>u.value=Q),class:"project-menu-input",type:"text",onInput:Q=>re(N.projectName)},null,40,Xp),[[Pn,u.value]])],64))])):ve("",!0)],512),w("button",{class:"thread-start-button",type:"button","aria-label":A(N.projectName),title:A(N.projectName),onClick:lt(Q=>O(N.projectName),["stop"])},[Ae(dc,{class:"thread-icon"})],8,Zp)])]),default:nt(()=>[w("span",{class:"project-main-button","data-dragging-handle":jn(N.projectName),onMousedown:lt(Q=>Y(Q,N.projectName),["left"])},[w("span",Gp,Te(_e(N.projectName)),1)],40,Kp)]),_:2},1032,["onClick","onKeydown"]),tr(N)?(b(),x("ul",em,[(b(!0),x(Le,null,gt(Zn(N),Q=>(b(),x("li",{key:Q.id,class:"thread-row-item"},[Ae(qn,{class:"thread-row","data-active":Q.id===e.selectedThreadId,"data-pinned":oe(Q.id),onMouseleave:Be=>K(Q.id)},{left:nt(()=>[w("span",tm,[Q.inProgress||Q.unread?(b(),x("span",{key:0,class:"thread-status-indicator","data-state":an(Q)},null,8,nm)):ve("",!0),w("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:Be=>we(Q.id)},[Ae(Zs,{class:"thread-icon"})],8,rm)])]),right:nt(()=>[w("span",am,Te(ct(Q.createdAtIso||Q.updatedAtIso)),1)]),"right-hover":nt(()=>[w("button",{class:"thread-archive-button","data-confirm":a.value===Q.id,type:"button",title:"archive_thread",onClick:Be=>E(Q.id)},[a.value===Q.id?(b(),x("span",cm,"confirm")):(b(),at(Js,{key:1,class:"thread-icon"}))],8,lm)]),default:nt(()=>[w("button",{class:"thread-main-button",type:"button",onClick:Be=>de(Q.id)},[w("span",om,[w("span",im,Te(Q.title),1),Q.hasWorktree?(b(),at(Xs,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ve("",!0)])],8,sm)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])):(b(),at(qn,{key:1,as:"p",class:"project-empty-row"},{left:nt(()=>[...R[10]||(R[10]=[w("span",{class:"project-empty-spacer"},null,-1)])]),default:nt(()=>[R[11]||(R[11]=w("span",{class:"project-empty"},"No threads",-1))]),_:1})),er(N)?(b(),at(qn,{key:2,class:"thread-show-more-row"},{left:nt(()=>[...R[12]||(R[12]=[w("span",{class:"thread-show-more-spacer"},null,-1)])]),default:nt(()=>[w("button",{class:"thread-show-more-button",type:"button",onClick:Q=>se(N.projectName)},Te(G(N.projectName)?"Show less":"Show more"),9,um)]),_:2},1024)):ve("",!0)],12,Up))),128))],4))]))}}),hm=Ke(fm,[["__scopeId","data-v-5bbc0cb5"]]),pm={class:"content-header"},mm={class:"content-leading"},gm={class:"content-title"},vm={class:"content-actions"},ym=kt({__name:"ContentHeader",props:{title:{}},setup(e){return(t,n)=>(b(),x("header",pm,[w("div",mm,[rn(t.$slots,"leading",{},void 0)]),w("h1",gm,Te(e.title),1),w("div",vm,[rn(t.$slots,"actions",{},void 0)])]))}}),wm=Ke(ym,[["__scopeId","data-v-66ee223c"]]),bm={},_m={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function km(e,t){return b(),x("svg",_m,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"},null,-1)])])}const Xo=Ke(bm,[["render",km]]),Tm={},Sm={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function xm(e,t){return b(),x("svg",Sm,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 14L4 9l5-5m-5 5h11a4 4 0 0 1 0 8H4"},null,-1)])])}const Cm=Ke(Tm,[["render",xm]]),Em={class:"conversation-root"},Am={key:0,class:"conversation-loading"},Im={key:1,class:"conversation-empty"},Rm={class:"message-row"},$m={class:"message-stack"},Pm={class:"request-card"},Mm={class:"request-title"},Nm={class:"request-meta"},Om={key:0,class:"request-reason"},jm={key:1,class:"request-actions"},Lm=["onClick"],Dm=["onClick"],Bm=["onClick"],Fm=["onClick"],Hm={key:2,class:"request-actions"},Um=["onClick"],Vm=["onClick"],qm=["onClick"],Wm=["onClick"],Km={key:3,class:"request-user-input"},Gm={class:"request-question-title"},zm={key:0,class:"request-question-text"},Ym=["value","onChange"],Qm=["value"],Jm=["value","onInput"],Xm=["onClick"],Zm={key:4,class:"request-actions"},eg=["onClick"],tg=["onClick"],ng={key:5,class:"request-actions"},rg=["onClick"],sg=["onClick"],og=["data-role","data-message-type"],ig={key:0,class:"message-row","data-role":"system"},ag={class:"message-stack","data-role":"system"},lg=["onClick"],cg={class:"cmd-label"},ug={class:"cmd-status"},dg={class:"cmd-output-inner"},fg={class:"cmd-output"},hg=["data-role","data-message-type"],pg=["data-role"],mg=["data-role"],gg=["data-role"],vg=["onClick"],yg=["src"],wg=["data-role"],bg={key:0,class:"worked-separator-wrap","aria-live":"polite"},_g=["onClick"],kg={class:"worked-separator-text"},Tg={key:0,class:"worked-details"},Sg=["onClick"],xg={class:"cmd-label"},Cg={class:"cmd-status"},Eg={class:"cmd-output-inner"},Ag={class:"cmd-output"},Ig={key:1,class:"message-text-flow"},Rg={key:0,class:"message-text"},$g={key:0},Pg={key:2,class:"message-inline-code"},Mg={key:1,class:"message-text"},Ng=["onClick"],Og=["src","alt","onError"],jg=["onClick"],Lg={key:0,class:"conversation-item conversation-item-overlay"},Dg={class:"message-row"},Bg={class:"message-stack"},Fg={class:"live-overlay-inline","aria-live":"polite"},Hg={class:"live-overlay-label"},Ug={key:0,class:"live-overlay-reasoning"},Vg={key:1,class:"live-overlay-error"},qg=["src"],Wg=16,Kg=kt({__name:"ThreadConversation",props:{messages:{},pendingRequests:{},liveOverlay:{},isLoading:{type:Boolean},activeThreadId:{},scrollState:{},isTurnInProgress:{type:Boolean},isRollingBack:{type:Boolean}},emits:["updateScrollState","respondServerRequest","rollback"],setup(e,{emit:t}){const n=V(new Set),r=V(new Set),s=V(new Set),o=V({});function i(k){return k.messageType==="commandExecution"&&!!k.commandExecution}function a(k){var P;return((P=k.commandExecution)==null?void 0:P.status)==="inProgress"||r.value.has(k.id)?!0:n.value.has(k.id)}function l(k){return r.value.has(k.id)}function d(k){var I;if(((I=k.commandExecution)==null?void 0:I.status)==="inProgress")return;const P=new Set(n.value);P.has(k.id)?P.delete(k.id):P.add(k.id),n.value=P}function u(k){const P=new Set(s.value);P.has(k.id)?P.delete(k.id):P.add(k.id),s.value=P}function f(k){return s.value.has(k.id)}function m(k){const P=k.commandExecution;if(!P)return"";switch(P.status){case"inProgress":return"⟳ Running";case"completed":return P.exitCode===0?"✓ Completed":`✗ Exit ${P.exitCode??"?"}`;case"failed":return"✗ Failed";case"declined":return"⊘ Declined";case"interrupted":return"⊘ Interrupted";default:return""}}function y(k){var I,Y;const P=(I=k.commandExecution)==null?void 0:I.status;return P==="inProgress"?"cmd-status-running":P==="completed"&&((Y=k.commandExecution)==null?void 0:Y.exitCode)===0?"cmd-status-ok":"cmd-status-error"}function $(k){const P=new Set(r.value);P.add(k),r.value=P,setTimeout(()=>{const I=new Set(r.value);I.delete(k),r.value=I},1e3)}function C(k,P){const I=[];for(let Y=P-1;Y>=0;Y--){const me=k[Y];if(me.messageType==="commandExecution")I.unshift(me);else if(me.role==="user"||me.messageType==="worked")break}return I}const B=e,z=t,M=V(null),W=V(null),q=V(""),fe=V({}),le=V({});let ne=0,pe=0,te=0;const ee=new WeakSet,ue=V(new Set);function J(k){if(!k||/\s/u.test(k)||k.endsWith("/")||k.endsWith("\\")||/^[A-Za-z][A-Za-z0-9+.-]*:\/\//u.test(k))return!1;const P=k.startsWith("/"),I=/^[A-Za-z]:[\\/]/u.test(k),Y=k.startsWith("./")||k.startsWith("../")||k.startsWith("~/"),me=k.includes("/")||k.includes("\\");return P||I||Y||me}function Re(k){return k.replace(/\\/gu,"/").split("/").filter(Boolean).pop()||k}function Ue(k){if(!k)return null;let P=k,I=null;const Y=P.match(/^(.*)#L(\d+)(?:C\d+)?$/u);if(Y)P=Y[1],I=Number(Y[2]);else{const me=P.match(/^(.*):(\d+)(?::\d+)?$/u);me&&(P=me[1],I=Number(me[2]))}return J(P)?{path:P,line:I}:null}function Ze(k){if(!k.includes("`"))return[{kind:"text",value:k}];const P=[];let I=0,Y=0;for(;I<k.length;){if(k[I]!=="`"){I+=1;continue}let me=1;for(;I+me<k.length&&k[I+me]==="`";)me+=1;const Ce="`".repeat(me);let Ge=I+me,ye=-1;for(;Ge<k.length;){const ot=k.indexOf(Ce,Ge);if(ot<0)break;const rt=ot>0&&k[ot-1]==="`",Ut=ot+me<k.length&&k[ot+me]==="`",on=k.slice(I+me,ot).includes(`
26
+ `);if(!rt&&!Ut&&!on){ye=ot;break}Ge=ot+1}if(ye<0){I+=me;continue}I>Y&&P.push({kind:"text",value:k.slice(Y,I)});const he=k.slice(I+me,ye);if(he.length>0){const ot=Ue(he);if(ot){const rt=Re(ot.path),Ut=ot.line?`${rt} (line ${String(ot.line)})`:rt;P.push({kind:"file",value:he,displayName:Ut})}else P.push({kind:"code",value:he})}else P.push({kind:"text",value:`${Ce}${Ce}`});I=ye+me,Y=I}return Y<k.length&&P.push({kind:"text",value:k.slice(Y)}),P}function xe(k){const P=k.trim();if(!P)return"";if(P.startsWith("data:")||P.startsWith("blob:")||P.startsWith("http://")||P.startsWith("https://")||P.startsWith("/codex-local-image?"))return P;if(P.startsWith("file://"))return`/codex-local-image?path=${encodeURIComponent(P)}`;const I=P.startsWith("/"),Y=/^[A-Za-z]:[\\/]/u.test(P);return I||Y?`/codex-local-image?path=${encodeURIComponent(P)}`:P}function Ne(k){if(!k.includes("![")||!k.includes("]("))return[{kind:"text",value:k}];const P=[],I=/!\[([^\]]*)\]\(([^)\n]+)\)/gu;let Y=0;for(const me of k.matchAll(I)){const[Ce,Ge,ye]=me;if(typeof me.index!="number")continue;const he=me.index,ot=he+Ce.length,rt=xe(ye.trim());rt&&(he>Y&&P.push({kind:"text",value:k.slice(Y,he)}),P.push({kind:"image",url:rt,alt:Ge.trim(),markdown:Ce}),Y=ot)}return Y<k.length&&P.push({kind:"text",value:k.slice(Y)}),P.length>0?P:[{kind:"text",value:k}]}function Ie(k){return k!==null&&typeof k=="object"&&!Array.isArray(k)?k:null}function et(k){const P=new Date(k);return Number.isNaN(P.getTime())?k:P.toLocaleTimeString()}function tt(k){const P=Ie(k.params),I=P==null?void 0:P.reason;return typeof I=="string"?I.trim():""}function Xe(k,P){return`${String(k)}:${P}`}function Fe(k){const P=Ie(k.params),I=Array.isArray(P==null?void 0:P.questions)?P.questions:[],Y=[];for(const me of I){const Ce=Ie(me);if(!Ce)continue;const Ge=typeof Ce.id=="string"?Ce.id:"";if(!Ge)continue;const ye=Array.isArray(Ce.options)?Ce.options.map(he=>Ie(he)).map(he=>he==null?void 0:he.label).filter(he=>typeof he=="string"&&he.length>0):[];Y.push({id:Ge,header:typeof Ce.header=="string"?Ce.header:"",question:typeof Ce.question=="string"?Ce.question:"",isOther:Ce.isOther===!0,options:ye})}return Y}function ct(k,P,I){const Y=Xe(k,P),me=fe.value[Y];return typeof me=="string"&&me.length>0?me:I}function oe(k,P){const I=Xe(k,P);return le.value[I]??""}function we(k,P,I){const Y=I.target;if(!(Y instanceof HTMLSelectElement))return;const me=Xe(k,P);fe.value={...fe.value,[me]:Y.value}}function de(k,P,I){const Y=I.target;if(!(Y instanceof HTMLInputElement))return;const me=Xe(k,P);le.value={...le.value,[me]:Y.value}}function E(k,P){z("respondServerRequest",{id:k,result:{decision:P}})}function A(k){const P=Fe(k),I={};for(const Y of P){const me=ct(k.id,Y.id,Y.options[0]||""),Ce=oe(k.id,Y.id).trim(),Ge=[me,Ce].map(ye=>ye.trim()).filter(ye=>ye.length>0);I[Y.id]={answers:Ge}}z("respondServerRequest",{id:k.id,result:{answers:I}})}function O(k){z("respondServerRequest",{id:k,result:{success:!1,contentItems:[{type:"inputText",text:"Tool call rejected from codex-web-local UI."}]}})}function K(k){z("respondServerRequest",{id:k,result:{success:!0,contentItems:[]}})}function _e(k){z("respondServerRequest",{id:k,result:{}})}function p(k){z("respondServerRequest",{id:k,error:{code:-32e3,message:"Rejected from codex-web-local UI."}})}function g(k){return!(k.role!=="user"&&k.role!=="assistant"||typeof k.turnIndex!="number"||B.isTurnInProgress||B.isRollingBack)}function S(k){g(k)&&z("rollback",{turnIndex:k.turnIndex})}function D(){const k=M.value,P=W.value;!k||!P||(k.scrollTop=k.scrollHeight,P.scrollIntoView({block:"end"}))}function H(k){return k.scrollHeight-(k.scrollTop+k.clientHeight)<=Wg}function L(k){if(!B.activeThreadId)return;const P=Math.max(k.scrollHeight-k.clientHeight,0),I=P>0?Math.min(Math.max(k.scrollTop/P,0),1):1;z("updateScrollState",{threadId:B.activeThreadId,state:{scrollTop:k.scrollTop,isAtBottom:H(k),scrollRatio:I}})}function re(){const k=M.value;if(!k)return;const P=B.scrollState;if(!P||P.isAtBottom){X();return}const I=Math.max(k.scrollHeight-k.clientHeight,0),Y=typeof P.scrollRatio=="number"?P.scrollRatio*I:P.scrollTop;k.scrollTop=Math.min(Math.max(Y,0),I),L(k)}function X(){const k=M.value;k&&(D(),L(k))}function Z(){const k=B.scrollState;return!k||k.isAtBottom===!0}function G(){if(!Z()){te=0,pe=0;return}if(X(),te-=1,te<=0){pe=0;return}pe=requestAnimationFrame(G)}function ie(k=6){Z()&&(pe&&(cancelAnimationFrame(pe),pe=0),te=Math.max(k,1),pe=requestAnimationFrame(G))}function se(){ie(3)}function be(){if(!Z())return;const k=M.value;if(!k)return;const P=k.querySelectorAll("img.message-image-preview");for(const I of P)I.complete||ee.has(I)||(ee.add(I),I.addEventListener("load",se,{once:!0}),I.addEventListener("error",se,{once:!0}))}async function Se(){await Wt(),ne&&cancelAnimationFrame(ne),ne=requestAnimationFrame(()=>{ne=0,re(),be(),ie()})}dt(()=>B.messages,async k=>{if(!B.isLoading){for(const P of k){if(P.messageType!=="commandExecution"||!P.commandExecution)continue;const I=o.value[P.id],Y=P.commandExecution.status;I==="inProgress"&&Y!=="inProgress"&&$(P.id),o.value[P.id]=Y}await Se()}}),dt(()=>B.liveOverlay,async k=>{k&&(await Wt(),X(),ie(8))},{deep:!0}),dt(()=>B.isLoading,async k=>{k||await Se()}),dt(()=>B.activeThreadId,()=>{q.value="",ue.value=new Set},{flush:"post"});function Pe(){const k=M.value;!k||B.isLoading||L(k)}function Me(k){q.value=xe(k)}function De(k,P){return`${k}:${String(P)}`}function Ve(k,P){const I=new Set(ue.value);I.add(De(k,P)),ue.value=I}function qe(k,P){return ue.value.has(De(k,P))}function pt(){q.value=""}return On(()=>{ne&&cancelAnimationFrame(ne),pe&&cancelAnimationFrame(pe)}),(k,P)=>(b(),x("section",Em,[e.isLoading?(b(),x("p",Am,"Loading messages...")):e.messages.length===0&&e.pendingRequests.length===0&&!e.liveOverlay?(b(),x("p",Im," No messages in this thread yet. ")):(b(),x("ul",{key:2,ref_key:"conversationListRef",ref:M,class:"conversation-list",onScroll:Pe},[(b(!0),x(Le,null,gt(e.pendingRequests,I=>(b(),x("li",{key:`server-request:${I.id}`,class:"conversation-item conversation-item-request"},[w("div",Rm,[w("div",$m,[w("article",Pm,[w("p",Mm,Te(I.method),1),w("p",Nm,"Request #"+Te(I.id)+" · "+Te(et(I.receivedAtIso)),1),tt(I)?(b(),x("p",Om,Te(tt(I)),1)):ve("",!0),I.method==="item/commandExecution/requestApproval"?(b(),x("section",jm,[w("button",{type:"button",class:"request-button request-button-primary",onClick:Y=>E(I.id,"accept")},"Accept",8,Lm),w("button",{type:"button",class:"request-button",onClick:Y=>E(I.id,"acceptForSession")},"Accept for Session",8,Dm),w("button",{type:"button",class:"request-button",onClick:Y=>E(I.id,"decline")},"Decline",8,Bm),w("button",{type:"button",class:"request-button",onClick:Y=>E(I.id,"cancel")},"Cancel",8,Fm)])):I.method==="item/fileChange/requestApproval"?(b(),x("section",Hm,[w("button",{type:"button",class:"request-button request-button-primary",onClick:Y=>E(I.id,"accept")},"Accept",8,Um),w("button",{type:"button",class:"request-button",onClick:Y=>E(I.id,"acceptForSession")},"Accept for Session",8,Vm),w("button",{type:"button",class:"request-button",onClick:Y=>E(I.id,"decline")},"Decline",8,qm),w("button",{type:"button",class:"request-button",onClick:Y=>E(I.id,"cancel")},"Cancel",8,Wm)])):I.method==="item/tool/requestUserInput"?(b(),x("section",Km,[(b(!0),x(Le,null,gt(Fe(I),Y=>(b(),x("div",{key:`${I.id}:${Y.id}`,class:"request-question"},[w("p",Gm,Te(Y.header||Y.question),1),Y.header&&Y.question?(b(),x("p",zm,Te(Y.question),1)):ve("",!0),w("select",{class:"request-select",value:ct(I.id,Y.id,Y.options[0]||""),onChange:me=>we(I.id,Y.id,me)},[(b(!0),x(Le,null,gt(Y.options,me=>(b(),x("option",{key:`${I.id}:${Y.id}:${me}`,value:me},Te(me),9,Qm))),128))],40,Ym),Y.isOther?(b(),x("input",{key:1,class:"request-input",type:"text",value:oe(I.id,Y.id),placeholder:"Other answer",onInput:me=>de(I.id,Y.id,me)},null,40,Jm)):ve("",!0)]))),128)),w("button",{type:"button",class:"request-button request-button-primary",onClick:Y=>A(I)}," Submit Answers ",8,Xm)])):I.method==="item/tool/call"?(b(),x("section",Zm,[w("button",{type:"button",class:"request-button request-button-primary",onClick:Y=>O(I.id)},"Fail Tool Call",8,eg),w("button",{type:"button",class:"request-button",onClick:Y=>K(I.id)},"Success (Empty)",8,tg)])):(b(),x("section",ng,[w("button",{type:"button",class:"request-button request-button-primary",onClick:Y=>_e(I.id)},"Return Empty Result",8,rg),w("button",{type:"button",class:"request-button",onClick:Y=>p(I.id)},"Reject Request",8,sg)]))])])])]))),128)),(b(!0),x(Le,null,gt(e.messages,I=>{var Y,me;return b(),x("li",{key:I.id,class:ut(["conversation-item",{"conversation-item-rollbackable":g(I)}]),"data-role":I.role,"data-message-type":I.messageType||""},[i(I)?(b(),x("div",ig,[w("div",ag,[w("button",{type:"button",class:ut(["cmd-row",[y(I),{"cmd-expanded":a(I)}]]),onClick:Ce=>d(I)},[w("span",{class:ut(["cmd-chevron",{"cmd-chevron-open":a(I)}])},"▶",2),w("code",cg,Te(((Y=I.commandExecution)==null?void 0:Y.command)||"(command)"),1),w("span",ug,Te(m(I)),1)],10,lg),w("div",{class:ut(["cmd-output-wrap",{"cmd-output-visible":a(I),"cmd-output-collapsing":l(I)}])},[w("div",dg,[w("pre",fg,Te(((me=I.commandExecution)==null?void 0:me.aggregatedOutput)||"(no output)"),1)])],2)])])):(b(),x("div",{key:1,class:"message-row","data-role":I.role,"data-message-type":I.messageType||""},[w("div",{class:"message-stack","data-role":I.role},[w("article",{class:"message-body","data-role":I.role},[I.images&&I.images.length>0?(b(),x("ul",{key:0,class:"message-image-list","data-role":I.role},[(b(!0),x(Le,null,gt(I.images,Ce=>(b(),x("li",{key:Ce,class:"message-image-item"},[w("button",{class:"message-image-button",type:"button",onClick:Ge=>Me(Ce)},[w("img",{class:"message-image-preview",src:xe(Ce),alt:"Message image preview",loading:"lazy"},null,8,yg)],8,vg)]))),128))],8,gg)):ve("",!0),I.text.length>0?(b(),x("article",{key:1,class:"message-card","data-role":I.role},[I.messageType==="worked"?(b(),x("div",bg,[w("button",{type:"button",class:"worked-separator",onClick:Ce=>u(I)},[P[2]||(P[2]=w("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1)),w("span",{class:ut(["worked-chevron",{"worked-chevron-open":f(I)}])},"▶",2),w("p",kg,Te(I.text),1),P[3]||(P[3]=w("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1))],8,_g),f(I)?(b(),x("div",Tg,[(b(!0),x(Le,null,gt(C(e.messages,e.messages.indexOf(I)),Ce=>{var Ge,ye;return b(),x("div",{key:`worked-cmd-${Ce.id}`,class:"worked-cmd-item"},[w("button",{type:"button",class:ut(["cmd-row",[y(Ce),{"cmd-expanded":a(Ce)}]]),onClick:he=>d(Ce)},[w("span",{class:ut(["cmd-chevron",{"cmd-chevron-open":a(Ce)}])},"▶",2),w("code",xg,Te(((Ge=Ce.commandExecution)==null?void 0:Ge.command)||"(command)"),1),w("span",Cg,Te(m(Ce)),1)],10,Sg),w("div",{class:ut(["cmd-output-wrap",{"cmd-output-visible":a(Ce),"cmd-output-collapsing":l(Ce)}])},[w("div",Eg,[w("pre",Ag,Te(((ye=Ce.commandExecution)==null?void 0:ye.aggregatedOutput)||"(no output)"),1)])],2)])}),128))])):ve("",!0)])):(b(),x("div",Ig,[(b(!0),x(Le,null,gt(Ne(I.text),(Ce,Ge)=>(b(),x(Le,{key:`block-${Ge}`},[Ce.kind==="text"?(b(),x("p",Rg,[(b(!0),x(Le,null,gt(Ze(Ce.value),(ye,he)=>(b(),x(Le,{key:`seg-${Ge}-${he}`},[ye.kind==="text"?(b(),x("span",$g,Te(ye.value),1)):ye.kind==="file"?(b(),x("a",{key:1,class:"message-file-link",href:"#",onClick:P[0]||(P[0]=lt(()=>{},["prevent"]))},Te(ye.displayName),1)):(b(),x("code",Pg,Te(ye.value),1))],64))),128))])):qe(I.id,Ge)?(b(),x("p",Mg,Te(Ce.markdown),1)):(b(),x("button",{key:2,class:"message-image-button",type:"button",onClick:ye=>Me(Ce.url)},[w("img",{class:"message-image-preview message-markdown-image",src:Ce.url,alt:Ce.alt||"Embedded message image",loading:"lazy",onError:ye=>Ve(I.id,Ge)},null,40,Og)],8,Ng))],64))),128))]))],8,wg)):ve("",!0)],8,mg),g(I)?(b(),x("button",{key:0,class:"rollback-button",type:"button",title:"Rollback to this message (remove this turn and all after it)",onClick:Ce=>S(I)},[Ae(Cm,{class:"rollback-icon"}),P[4]||(P[4]=w("span",{class:"rollback-label"},"Rollback",-1))],8,jg)):ve("",!0)],8,pg)],8,hg))],10,og)}),128)),e.liveOverlay?(b(),x("li",Lg,[w("div",Dg,[w("div",Bg,[w("article",Fg,[w("p",Hg,Te(e.liveOverlay.activityLabel),1),e.liveOverlay.reasoningText?(b(),x("p",Ug,Te(e.liveOverlay.reasoningText),1)):ve("",!0),e.liveOverlay.errorText?(b(),x("p",Vg,Te(e.liveOverlay.errorText),1)):ve("",!0)])])])])):ve("",!0),w("li",{ref_key:"bottomAnchorRef",ref:W,class:"conversation-bottom-anchor"},null,512)],544)),q.value.length>0?(b(),x("div",{key:3,class:"image-modal-backdrop",onClick:pt},[w("div",{class:"image-modal-content",onClick:P[1]||(P[1]=lt(()=>{},["stop"]))},[w("button",{class:"image-modal-close",type:"button","aria-label":"Close image preview",onClick:pt},[Ae(Xo,{class:"icon-svg"})]),w("img",{class:"image-modal-image",src:q.value,alt:"Expanded message image"},null,8,qg)])])):ve("",!0)]))}}),Gg=Ke(Kg,[["__scopeId","data-v-ef7bbf93"]]);function zg(e){var u;const t=V("idle"),n=V(typeof navigator<"u"&&!!((u=navigator.mediaDevices)!=null&&u.getUserMedia));let r=null,s=null,o=[];async function i(){var f;if(!(t.value!=="idle"||!n.value))try{s=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1}}),o=[],r=new MediaRecorder(s),r.ondataavailable=m=>{m.data.size>0&&o.push(m.data)},r.onstop=()=>l(),r.start(),t.value="recording"}catch(m){d(),(f=e.onError)==null||f.call(e,m)}}function a(){t.value!=="recording"||!r||r.state!=="inactive"&&r.stop()}async function l(){var y,$;if(o.length===0){d();return}t.value="transcribing";const f=(r==null?void 0:r.mimeType)||((y=o[0])==null?void 0:y.type)||"audio/webm",m=new Blob(o,{type:f});d();try{const C=f.split(/[/;]/)[1]??"webm",B=`----codex-transcribe-${crypto.randomUUID()}`,z=new Uint8Array(await m.arrayBuffer()),M=new TextEncoder,W=[];W.push(M.encode(`--${B}\r
27
+ `)),W.push(M.encode(`Content-Disposition: form-data; name="file"; filename="codex.${C}"\r
28
+ `)),W.push(M.encode(`Content-Type: ${f}\r
29
+ \r
30
+ `)),W.push(z),W.push(M.encode(`\r
31
+ --${B}--\r
32
+ `));let q=0;for(const ee of W)q+=ee.byteLength;const fe=new Uint8Array(q);let le=0;for(const ee of W)fe.set(ee,le),le+=ee.byteLength;const ne=await fetch("/codex-api/transcribe",{method:"POST",headers:{"Content-Type":`multipart/form-data; boundary=${B}`},body:fe});if(!ne.ok)throw new Error(`Transcription failed: ${ne.status}`);const te=((await ne.json()).text??"").trim();te.length>0&&e.onTranscript(te)}catch(C){($=e.onError)==null||$.call(e,C)}finally{t.value="idle"}}function d(){r&&(r.ondataavailable=null,r.onstop=null,r=null),s&&(s.getTracks().forEach(f=>f.stop()),s=null),o=[]}return On(d),{state:t,isSupported:n,startRecording:i,stopRecording:a}}const Yg={},Qg={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Jg(e,t){return b(),x("svg",Qg,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 5l0 14m-6-8l6-6l6 6"},null,-1)])])}const Xg=Ke(Yg,[["render",Jg]]),Zg={},ev={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function tv(e,t){return b(),x("svg",ev,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 2m0 3a3 3 0 0 1 3-3h0a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3h0a3 3 0 0 1-3-3zM5 10a7 7 0 0 0 14 0M8 21h8M12 17v4"},null,-1)])])}const nv=Ke(Zg,[["render",tv]]),rv={},sv={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function ov(e,t){return b(),x("svg",sv,[...t[0]||(t[0]=[w("path",{stroke:"none",fill:"none",d:"M0 0h24v24H0z"},null,-1),w("path",{fill:"currentColor",d:"M8 5a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-8z"},null,-1)])])}const iv=Ke(rv,[["render",ov]]),av=["disabled"],lv={class:"composer-dropdown-value"},cv={class:"composer-dropdown-menu"},uv={key:0,class:"composer-dropdown-search-wrap"},dv=["placeholder","onKeydown"],fv={class:"composer-dropdown-options",role:"listbox"},hv=["onClick"],pv={key:0,class:"composer-dropdown-empty"},mv={key:1,class:"composer-dropdown-add-wrap"},gv=["placeholder","onKeydown"],vv=kt({__name:"ComposerDropdown",props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean},openDirection:{},enableSearch:{type:Boolean},searchPlaceholder:{},showAddAction:{type:Boolean},addActionLabel:{},defaultAddValue:{},addPlaceholder:{}},emits:["update:modelValue","add"],setup(e,{emit:t}){const n=e,r=t,s=V(null),o=V(null),i=V(null),a=V(!1),l=V(""),d=V(!1),u=V(""),f=ae(()=>{var ue;const ee=n.options.find(J=>J.value===n.modelValue);return ee?ee.label:((ue=n.placeholder)==null?void 0:ue.trim())||""}),m=ae(()=>n.openDirection??"down"),y=ae(()=>n.enableSearch===!0),$=ae(()=>n.showAddAction===!0),C=ae(()=>{var ee;return((ee=n.searchPlaceholder)==null?void 0:ee.trim())||"Quick search projects"}),B=ae(()=>{var ee;return((ee=n.addActionLabel)==null?void 0:ee.trim())||"Add new project"}),z=ae(()=>{var ee;return((ee=n.addPlaceholder)==null?void 0:ee.trim())||"Project name or absolute path"}),M=ae(()=>{const ee=l.value.trim().toLowerCase();return ee?n.options.filter(ue=>ue.label.toLowerCase().includes(ee)||ue.value.toLowerCase().includes(ee)):n.options});function W(){n.disabled||(a.value=!a.value)}function q(ee){r("update:modelValue",ee),a.value=!1,l.value=""}function fe(){var ee;d.value=!0,u.value=((ee=n.defaultAddValue)==null?void 0:ee.trim())||"",Wt(()=>{var ue;return(ue=i.value)==null?void 0:ue.focus()})}function le(){if(l.value.length>0){l.value="";return}a.value=!1}function ne(){const ee=u.value.trim();ee&&(r("add",ee),d.value=!1,u.value="",a.value=!1,l.value="")}function pe(){d.value=!1,u.value="",Wt(()=>{var ee;return(ee=o.value)==null?void 0:ee.focus()})}function te(ee){if(!a.value)return;const ue=s.value;if(!ue)return;const J=ee.target;J instanceof Node&&(ue.contains(J)||(a.value=!1,l.value="",d.value=!1,u.value=""))}return dt(a,ee=>{if(!ee){d.value=!1,u.value="";return}y.value&&Wt(()=>{var ue;return(ue=o.value)==null?void 0:ue.focus()})}),Nn(()=>{window.addEventListener("pointerdown",te)}),On(()=>{window.removeEventListener("pointerdown",te)}),(ee,ue)=>(b(),x("div",{ref_key:"rootRef",ref:s,class:"composer-dropdown"},[w("button",{class:"composer-dropdown-trigger",type:"button",disabled:e.disabled,onClick:W},[w("span",lv,Te(f.value),1),Ae(Jo,{class:"composer-dropdown-chevron"})],8,av),a.value?(b(),x("div",{key:0,class:ut(["composer-dropdown-menu-wrap",{"composer-dropdown-menu-wrap-up":m.value==="up","composer-dropdown-menu-wrap-down":m.value==="down"}])},[w("div",cv,[y.value?(b(),x("div",uv,[Rn(w("input",{ref_key:"searchInputRef",ref:o,"onUpdate:modelValue":ue[0]||(ue[0]=J=>l.value=J),class:"composer-dropdown-search-input",type:"text",placeholder:C.value,onKeydown:Nt(lt(le,["prevent"]),["esc"])},null,40,dv),[[Pn,l.value]])])):ve("",!0),w("ul",fv,[(b(!0),x(Le,null,gt(M.value,J=>(b(),x("li",{key:J.value},[w("button",{class:ut(["composer-dropdown-option",{"is-selected":J.value===e.modelValue}]),type:"button",onClick:Re=>q(J.value)},Te(J.label),11,hv)]))),128)),M.value.length===0?(b(),x("li",pv," No matching projects ")):ve("",!0)]),$.value?(b(),x("div",mv,[d.value?(b(),x(Le,{key:0},[Rn(w("input",{ref_key:"addInputRef",ref:i,"onUpdate:modelValue":ue[1]||(ue[1]=J=>u.value=J),class:"composer-dropdown-add-input",type:"text",placeholder:z.value,onKeydown:[Nt(lt(ne,["prevent"]),["enter"]),Nt(lt(pe,["prevent"]),["esc"])]},null,40,gv),[[Pn,u.value]]),w("div",{class:"composer-dropdown-add-actions"},[w("button",{type:"button",class:"composer-dropdown-add-btn",onClick:ne},"Open"),w("button",{type:"button",class:"composer-dropdown-add-btn",onClick:pe},"Cancel")])],64)):(b(),x("button",{key:1,type:"button",class:"composer-dropdown-add",onClick:fe},Te(B.value),1))])):ve("",!0)])],2)):ve("",!0)],512))}}),So=Ke(vv,[["__scopeId","data-v-8fdced75"]]),yv=["disabled"],wv={class:"search-dropdown-value"},bv={class:"search-dropdown-search-wrap"},_v=["placeholder","onKeydown"],kv={key:0,class:"search-dropdown-list",role:"listbox"},Tv=["onClick","onPointerenter"],Sv={class:"search-dropdown-option-check"},xv={class:"search-dropdown-option-label"},Cv={key:0,class:"search-dropdown-option-desc"},Ev={key:1,class:"search-dropdown-empty"},Av=kt({__name:"ComposerSearchDropdown",props:{options:{},selectedValues:{},placeholder:{},searchPlaceholder:{},disabled:{type:Boolean},openDirection:{}},emits:["toggle"],setup(e,{emit:t}){const n=e,r=t,s=V(null),o=V(null),i=V(!1),a=V(""),l=V(0),d=ae(()=>n.openDirection??"down"),u=ae(()=>new Set(n.selectedValues)),f=ae(()=>{if(n.selectedValues.length===0)return n.placeholder||"Select...";if(n.selectedValues.length===1){const M=n.options.find(W=>W.value===n.selectedValues[0]);return(M==null?void 0:M.label)||n.placeholder||"Select..."}return`${n.selectedValues.length} selected`}),m=ae(()=>{const M=a.value.toLowerCase().trim();return M?n.options.filter(W=>{var q;return W.label.toLowerCase().includes(M)||(((q=W.description)==null?void 0:q.toLowerCase().includes(M))??!1)}):n.options});function y(){n.disabled||(i.value=!i.value,i.value&&(a.value="",l.value=0,Wt(()=>{var M;return(M=o.value)==null?void 0:M.focus()})))}function $(M){r("toggle",M.value,!u.value.has(M.value))}function C(M){m.value.length!==0&&(l.value=(l.value+M+m.value.length)%m.value.length)}function B(){const M=m.value[l.value];M&&$(M)}function z(M){if(!i.value)return;const W=s.value;if(!W)return;const q=M.target;q instanceof Node&&(W.contains(q)||(i.value=!1))}return dt(a,()=>{l.value=0}),Nn(()=>window.addEventListener("pointerdown",z)),On(()=>window.removeEventListener("pointerdown",z)),(M,W)=>(b(),x("div",{ref_key:"rootRef",ref:s,class:"search-dropdown"},[w("button",{class:"search-dropdown-trigger",type:"button",disabled:e.disabled,onClick:y},[w("span",wv,Te(f.value),1),Ae(Jo,{class:"search-dropdown-chevron"})],8,yv),i.value?(b(),x("div",{key:0,class:ut(["search-dropdown-menu-wrap",{"search-dropdown-menu-wrap-up":d.value==="up","search-dropdown-menu-wrap-down":d.value==="down"}])},[w("div",bv,[Rn(w("input",{ref_key:"searchRef",ref:o,"onUpdate:modelValue":W[0]||(W[0]=q=>a.value=q),class:"search-dropdown-search",type:"text",placeholder:e.searchPlaceholder,onKeydown:[W[1]||(W[1]=Nt(lt(q=>i.value=!1,["prevent"]),["escape"])),Nt(lt(B,["prevent"]),["enter"]),W[2]||(W[2]=Nt(lt(q=>C(1),["prevent"]),["arrow-down"])),W[3]||(W[3]=Nt(lt(q=>C(-1),["prevent"]),["arrow-up"]))]},null,40,_v),[[Pn,a.value]])]),m.value.length>0?(b(),x("ul",kv,[(b(!0),x(Le,null,gt(m.value,(q,fe)=>(b(),x("li",{key:q.value},[w("button",{class:ut(["search-dropdown-option",{"is-selected":u.value.has(q.value),"is-highlighted":fe===l.value}]),type:"button",onClick:le=>$(q),onPointerenter:le=>l.value=fe},[w("span",Sv,Te(u.value.has(q.value)?"✓":""),1),w("span",xv,Te(q.label),1),q.description?(b(),x("span",Cv,Te(q.description),1)):ve("",!0)],42,Tv)]))),128))])):(b(),x("div",Ev,"No results"))],2)):ve("",!0)],512))}}),Iv=Ke(Av,[["__scopeId","data-v-4d3f2c83"]]),Rv={class:"skill-picker-header"},$v=["onKeydown"],Pv={key:0,class:"skill-picker-list",role:"listbox"},Mv=["onClick","onPointerenter"],Nv={class:"skill-picker-name"},Ov={key:0,class:"skill-picker-desc"},jv={key:1,class:"skill-picker-empty"},Lv=kt({__name:"ComposerSkillPicker",props:{skills:{},visible:{type:Boolean},anchorBottom:{},anchorLeft:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,r=t,s=V(null),o=V(null),i=V(""),a=V(0),l=ae(()=>{const m=i.value.toLowerCase().trim();return m?n.skills.filter(y=>y.name.toLowerCase().includes(m)||y.description.toLowerCase().includes(m)):n.skills}),d=ae(()=>{const m={};return n.anchorBottom!=null&&(m.bottom=`${n.anchorBottom}px`),n.anchorLeft!=null&&(m.left=`${n.anchorLeft}px`),m});function u(m){l.value.length!==0&&(a.value=(a.value+m+l.value.length)%l.value.length)}function f(){const m=l.value[a.value];m&&r("select",m)}return dt(()=>n.visible,m=>{m&&(i.value="",a.value=0,Wt(()=>{var y;return(y=o.value)==null?void 0:y.focus()}))}),dt(i,()=>{a.value=0}),(m,y)=>e.visible?(b(),x("div",{key:0,ref_key:"rootRef",ref:s,class:"skill-picker",style:Jn(d.value)},[w("div",Rv,[Rn(w("input",{ref_key:"searchInputRef",ref:o,"onUpdate:modelValue":y[0]||(y[0]=$=>i.value=$),class:"skill-picker-search",type:"text",placeholder:"Search skills...",onKeydown:[y[1]||(y[1]=Nt(lt($=>m.$emit("close"),["prevent"]),["escape"])),Nt(lt(f,["prevent"]),["enter"]),y[2]||(y[2]=Nt(lt($=>u(1),["prevent"]),["arrow-down"])),y[3]||(y[3]=Nt(lt($=>u(-1),["prevent"]),["arrow-up"]))]},null,40,$v),[[Pn,i.value]])]),l.value.length>0?(b(),x("ul",Pv,[(b(!0),x(Le,null,gt(l.value,($,C)=>(b(),x("li",{key:$.path},[w("button",{class:ut(["skill-picker-item",{"is-highlighted":C===a.value}]),type:"button",onClick:B=>m.$emit("select",$),onPointerenter:B=>a.value=C},[w("span",Nv,Te($.name),1),$.description?(b(),x("span",Ov,Te($.description),1)):ve("",!0)],42,Mv)]))),128))])):(b(),x("div",jv,"No skills found"))],4)):ve("",!0)}}),Dv=Ke(Lv,[["__scopeId","data-v-d6a08788"]]),Bv={key:0,class:"thread-composer-attachments"},Fv=["src","alt"],Hv=["aria-label","disabled","onClick"],Uv={key:1,class:"thread-composer-skill-chips"},Vv={class:"thread-composer-skill-chip-name"},qv=["aria-label","onClick"],Wv={class:"thread-composer-input-wrap"},Kv=["placeholder","disabled"],Gv={class:"thread-composer-controls"},zv=["disabled"],Yv={key:0,class:"thread-composer-attach-menu"},Qv=["disabled"],Jv=["disabled"],Xv={class:"thread-composer-actions"},Zv=["aria-label","title","disabled"],ey=["disabled"],ty=["aria-label","title","disabled"],ny=["disabled"],ry=["disabled"],sy=kt({__name:"ThreadComposer",props:{activeThreadId:{},models:{},selectedModel:{},selectedReasoningEffort:{},skills:{},isTurnInProgress:{type:Boolean},isInterruptingTurn:{type:Boolean},disabled:{type:Boolean},hasQueueAbove:{type:Boolean}},emits:["submit","interrupt","update:selected-model","update:selected-reasoning-effort"],setup(e,{emit:t}){const n=e,r=t,s=V(""),o=V([]),i=V([]),{state:a,isSupported:l,startRecording:d,stopRecording:u}=zg({onTranscript:A=>{s.value=s.value?`${s.value} ${A}`:A}}),f=V(null),m=V(null),y=V(null),$=V(null),C=V(!1),B=V(!1),z=[{value:"none",label:"None"},{value:"minimal",label:"Minimal"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra high"}],M=ae(()=>n.models.map(A=>({value:A,label:A}))),W=ae(()=>n.skills??[]),q=ae(()=>i.value.map(A=>A.path)),fe=ae(()=>(n.skills??[]).map(A=>({value:A.path,label:A.name,description:A.description}))),le=ae(()=>n.disabled||!n.activeThreadId?!1:s.value.trim().length>0||o.value.length>0),ne=ae(()=>n.disabled||!n.activeThreadId),pe=ae(()=>n.activeThreadId?"Type a message... (/ for skills)":"Select a thread to send a message");function te(A="steer"){const O=s.value.trim();le.value&&(r("submit",{text:O,imageUrls:o.value.map(K=>K.url),skills:i.value.map(K=>({name:K.name,path:K.path})),mode:A}),s.value="",o.value=[],i.value=[],C.value=!1,B.value=!1,Wt(()=>{var K;return(K=$.value)==null?void 0:K.focus()}))}function ee(){r("interrupt")}function ue(A){r("update:selected-model",A)}function J(A){r("update:selected-reasoning-effort",A)}function Re(){ne.value||(C.value=!C.value)}function Ue(){var A;(A=m.value)==null||A.click()}function Ze(){var A;(A=y.value)==null||A.click()}function xe(A){o.value=o.value.filter(O=>O.id!==A)}function Ne(A){i.value=i.value.filter(O=>O.path!==A)}function Ie(A){if(!(!A||A.length===0))for(const O of Array.from(A)){if(!O.type.startsWith("image/"))continue;const K=new FileReader;K.onload=()=>{typeof K.result=="string"&&o.value.push({id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,name:O.name,url:K.result})},K.readAsDataURL(O)}}function et(A){A&&(A.value="")}function tt(A){const O=A.target;Ie((O==null?void 0:O.files)??null),et(O),C.value=!1}function Xe(A){const O=A.target;Ie((O==null?void 0:O.files)??null),et(O),C.value=!1}function Fe(){const A=s.value;A==="/"?B.value=!0:B.value&&!A.startsWith("/")&&(B.value=!1)}function ct(A){if(B.value){if(A.key==="Escape"){A.preventDefault(),oe();return}if(A.key==="ArrowDown"||A.key==="ArrowUp"){A.preventDefault();return}}}function oe(){var A;B.value=!1,(A=$.value)==null||A.focus()}function we(A){var O;i.value.some(K=>K.path===A.path)||(i.value=[...i.value,A]),s.value=s.value.startsWith("/")?"":s.value,B.value=!1,(O=$.value)==null||O.focus()}function de(A,O){if(O){const K=(n.skills??[]).find(_e=>_e.path===A);K&&!i.value.some(_e=>_e.path===A)&&(i.value=[...i.value,K])}else i.value=i.value.filter(K=>K.path!==A)}function E(A){if(!C.value)return;const O=f.value;if(!O)return;const K=A.target;!K||O.contains(K)||(C.value=!1)}return Nn(()=>{document.addEventListener("click",E)}),On(()=>{document.removeEventListener("click",E)}),dt(()=>n.activeThreadId,()=>{s.value="",o.value=[],i.value=[],C.value=!1,B.value=!1}),(A,O)=>(b(),x("form",{class:"thread-composer",onSubmit:O[8]||(O[8]=lt(K=>te("steer"),["prevent"]))},[w("div",{class:ut(["thread-composer-shell",{"thread-composer-shell--no-top-radius":e.hasQueueAbove}])},[o.value.length>0?(b(),x("div",Bv,[(b(!0),x(Le,null,gt(o.value,K=>(b(),x("div",{key:K.id,class:"thread-composer-attachment"},[w("img",{class:"thread-composer-attachment-image",src:K.url,alt:K.name||"Selected image"},null,8,Fv),w("button",{class:"thread-composer-attachment-remove",type:"button","aria-label":`Remove ${K.name||"image"}`,disabled:ne.value,onClick:_e=>xe(K.id)}," x ",8,Hv)]))),128))])):ve("",!0),i.value.length>0?(b(),x("div",Uv,[(b(!0),x(Le,null,gt(i.value,K=>(b(),x("span",{key:K.path,class:"thread-composer-skill-chip"},[w("span",Vv,Te(K.name),1),w("button",{class:"thread-composer-skill-chip-remove",type:"button","aria-label":`Remove skill ${K.name}`,onClick:_e=>Ne(K.path)},"×",8,qv)]))),128))])):ve("",!0),w("div",Wv,[Rn(w("input",{ref_key:"inputRef",ref:$,"onUpdate:modelValue":O[0]||(O[0]=K=>s.value=K),class:"thread-composer-input",type:"text",placeholder:pe.value,disabled:ne.value,onKeydown:[O[1]||(O[1]=Nt(lt(K=>te("steer"),["exact","prevent"]),["enter"])),ct],onInput:Fe},null,40,Kv),[[Pn,s.value]]),Ae(Dv,{skills:W.value,visible:B.value,"anchor-bottom":44,"anchor-left":0,onSelect:we,onClose:oe},null,8,["skills","visible"])]),w("div",Gv,[w("div",{ref_key:"attachMenuRootRef",ref:f,class:"thread-composer-attach"},[w("button",{class:"thread-composer-attach-trigger",type:"button","aria-label":"Add photos & files",disabled:ne.value,onClick:Re}," + ",8,zv),C.value?(b(),x("div",Yv,[w("button",{class:"thread-composer-attach-item",type:"button",disabled:ne.value,onClick:Ue}," Add photos & files ",8,Qv),w("button",{class:"thread-composer-attach-item",type:"button",disabled:ne.value,onClick:Ze}," Take photo ",8,Jv)])):ve("",!0)],512),Ae(So,{class:"thread-composer-control","model-value":e.selectedModel,options:M.value,placeholder:"Model","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.models.length===0||e.isTurnInProgress,"onUpdate:modelValue":ue},null,8,["model-value","options","disabled"]),Ae(Iv,{class:"thread-composer-control",options:fe.value,"selected-values":q.value,placeholder:"Skills","search-placeholder":"Search skills...","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress||(e.skills??[]).length===0,onToggle:de},null,8,["options","selected-values","disabled"]),Ae(So,{class:"thread-composer-control","model-value":e.selectedReasoningEffort,options:z,placeholder:"Thinking","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress,"onUpdate:modelValue":J},null,8,["model-value","disabled"]),w("div",Xv,[Ee(l)&&!e.isTurnInProgress?(b(),x("button",{key:0,class:ut(["thread-composer-mic",{"thread-composer-mic--active":Ee(a)!=="idle"}]),type:"button","aria-label":Ee(a)==="idle"?"Hold to dictate":Ee(a)==="recording"?"Stop dictation":"Transcribing...",title:Ee(a)==="idle"?"Hold to dictate":Ee(a)==="recording"?"Release to transcribe":"Transcribing...",disabled:ne.value||Ee(a)==="transcribing",onMousedown:O[2]||(O[2]=lt((...K)=>Ee(d)&&Ee(d)(...K),["prevent"])),onMouseup:O[3]||(O[3]=(...K)=>Ee(u)&&Ee(u)(...K)),onMouseleave:O[4]||(O[4]=K=>Ee(a)==="recording"&&Ee(u)()),onTouchstart:O[5]||(O[5]=lt((...K)=>Ee(d)&&Ee(d)(...K),["prevent"])),onTouchend:O[6]||(O[6]=(...K)=>Ee(u)&&Ee(u)(...K))},[Ae(nv,{class:"thread-composer-mic-icon"})],42,Zv)):ve("",!0),e.isTurnInProgress?(b(),x("button",{key:1,class:"thread-composer-stop",type:"button","aria-label":"Stop",disabled:e.disabled||!e.activeThreadId||e.isInterruptingTurn,onClick:ee},[Ae(iv,{class:"thread-composer-stop-icon"})],8,ey)):ve("",!0),w("button",{class:ut(["thread-composer-submit",{"thread-composer-submit--queue":e.isTurnInProgress}]),type:"button","aria-label":e.isTurnInProgress?"Queue message":"Send message",title:e.isTurnInProgress?"Queue (button) · Enter to steer":"Send",disabled:!le.value,onClick:O[7]||(O[7]=K=>te(e.isTurnInProgress?"queue":"steer"))},[Ae(Xg,{class:"thread-composer-submit-icon"})],10,ty)])])],2),w("input",{ref_key:"photoLibraryInputRef",ref:m,class:"thread-composer-hidden-input",type:"file",accept:"image/*",multiple:"",disabled:ne.value,onChange:tt},null,40,ny),w("input",{ref_key:"cameraCaptureInputRef",ref:y,class:"thread-composer-hidden-input",type:"file",accept:"image/*",capture:"environment",disabled:ne.value,onChange:Xe},null,40,ry)],32))}}),_a=Ke(sy,[["__scopeId","data-v-783f46bf"]]),oy={key:0,class:"queued-messages"},iy={class:"queued-messages-inner"},ay={class:"queued-row-text"},ly={class:"queued-row-actions"},cy=["onClick"],uy=["onClick"],dy=kt({__name:"QueuedMessages",props:{messages:{}},emits:["steer","delete"],setup(e){return(t,n)=>e.messages.length>0?(b(),x("div",oy,[w("div",iy,[(b(!0),x(Le,null,gt(e.messages,r=>(b(),x("div",{key:r.id,class:"queued-row"},[n[1]||(n[1]=w("svg",{class:"queued-row-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)),w("span",ay,Te(r.text),1),w("div",ly,[w("button",{class:"queued-row-steer",type:"button",title:"Send now without interrupting work",onClick:s=>t.$emit("steer",r.id)},"Steer",8,cy),w("button",{class:"queued-row-delete",type:"button","aria-label":"Delete queued message",title:"Delete queued message",onClick:s=>t.$emit("delete",r.id)},[...n[0]||(n[0]=[w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 7h16M10 11v6M14 11v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"})],-1)])],8,uy)])]))),128))])])):ve("",!0)}}),fy=Ke(dy,[["__scopeId","data-v-ea583733"]]),hy={},py={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function my(e,t){return b(),x("svg",py,[...t[0]||(t[0]=[w("circle",{cx:"11",cy:"11",r:"8"},null,-1),w("path",{d:"m21 21-4.35-4.35"},null,-1)])])}const xo=Ke(hy,[["render",my]]),gy={class:"skill-card-top"},vy=["src","alt"],yy={key:1,class:"skill-card-avatar-fallback"},wy={class:"skill-card-info"},by={class:"skill-card-header"},_y={class:"skill-card-name"},ky={key:0,class:"skill-card-badge-disabled"},Ty={key:1,class:"skill-card-badge"},Sy={class:"skill-card-owner"},xy={key:0,class:"skill-card-desc"},Cy={key:1,class:"skill-card-date"},Ey=kt({__name:"SkillCard",props:{skill:{}},emits:["select"],setup(e){const t=e,n=ae(()=>{const s=t.skill.publishedAt;if(!s)return"";const o=new Date(s),a=Date.now()-s;return a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:a<2592e6?`${Math.floor(a/864e5)}d ago`:o.toLocaleDateString("en-US",{month:"short",day:"numeric"})});function r(s){const o=s.target;o.style.display="none"}return(s,o)=>(b(),x("button",{class:ut(["skill-card",{"is-disabled":e.skill.installed&&e.skill.enabled===!1}]),type:"button",onClick:o[0]||(o[0]=i=>s.$emit("select",e.skill))},[w("div",gy,[e.skill.avatarUrl?(b(),x("img",{key:0,class:"skill-card-avatar",src:e.skill.avatarUrl,alt:e.skill.owner,loading:"lazy",onError:r},null,40,vy)):(b(),x("div",yy,Te(e.skill.owner.charAt(0)),1)),w("div",wy,[w("div",by,[w("span",_y,Te(e.skill.displayName||e.skill.name),1),e.skill.installed&&e.skill.enabled===!1?(b(),x("span",ky,"Disabled")):e.skill.installed?(b(),x("span",Ty,"Installed")):ve("",!0)]),w("span",Sy,Te(e.skill.owner),1)])]),e.skill.description?(b(),x("p",xy,Te(e.skill.description),1)):ve("",!0),n.value?(b(),x("span",Cy,Te(n.value),1)):ve("",!0)],2))}}),ka=Ke(Ey,[["__scopeId","data-v-2a1e8196"]]),Ay={class:"sdm-panel"},Iy={class:"sdm-header"},Ry={class:"sdm-title-area"},$y=["src","alt"],Py={class:"sdm-title-col"},My={class:"sdm-title-row"},Ny={class:"sdm-title"},Oy={key:0,class:"sdm-badge-disabled"},jy={class:"sdm-owner"},Ly={class:"sdm-body"},Dy={key:0,class:"sdm-desc"},By={key:1,class:"sdm-readme-loading"},Fy=["innerHTML"],Hy=["href"],Uy={class:"sdm-footer"},Vy={class:"sdm-footer-actions"},qy=["disabled"],Wy=["disabled"],Ky=["disabled"],Gy=kt({__name:"SkillDetailModal",props:{skill:{},visible:{type:Boolean},isInstalling:{type:Boolean},isUninstalling:{type:Boolean}},emits:["close","install","uninstall","toggle-enabled"],setup(e,{emit:t}){const n=e,r=t,s=V(null),o=V(""),i=V(!1),a=ae(()=>s.value??n.skill.enabled??!0),l=ae(()=>n.isInstalling===!0||n.isUninstalling===!0),d=ae(()=>{const C=o.value;if(!C)return"";const B=C.replace(/^---[\s\S]*?---\s*/,"");return u(B)});function u(C){return C.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/^### (.+)$/gm,"<h4>$1</h4>").replace(/^## (.+)$/gm,"<h3>$1</h3>").replace(/^# (.+)$/gm,"<h2>$1</h2>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/(<li>.*<\/li>\n?)+/g,"<ul>$&</ul>").replace(/\n{2,}/g,"<br/><br/>").replace(/\n/g,"<br/>")}async function f(){if(!(!n.skill.owner||!n.skill.name)){i.value=!0,o.value="";try{const C=new URLSearchParams({owner:n.skill.owner,name:n.skill.name}),B=await fetch(`/codex-api/skills-hub/readme?${C}`);if(!B.ok)return;const z=await B.json();o.value=z.content??""}catch{}finally{i.value=!1}}}dt(()=>n.visible,C=>{C&&(s.value=null,o.value="",f())});function m(){r("install",n.skill)}function y(){r("uninstall",n.skill)}function $(){const C=!a.value;s.value=C,r("toggle-enabled",n.skill,C)}return(C,B)=>(b(),at(vl,{to:"body"},[e.visible?(b(),x("div",{key:0,class:"sdm-overlay",onClick:B[1]||(B[1]=lt(z=>C.$emit("close"),["self"]))},[w("div",Ay,[w("div",Iy,[w("div",Ry,[e.skill.avatarUrl?(b(),x("img",{key:0,class:"sdm-avatar",src:e.skill.avatarUrl,alt:e.skill.owner,loading:"lazy"},null,8,$y)):ve("",!0),w("div",Py,[w("div",My,[w("h3",Ny,Te(e.skill.displayName||e.skill.name),1),e.skill.installed&&!a.value?(b(),x("span",Oy,"Disabled")):ve("",!0)]),w("span",jy,Te(e.skill.owner),1)])]),w("button",{class:"sdm-close",type:"button","aria-label":"Close",onClick:B[0]||(B[0]=z=>C.$emit("close"))},[Ae(Xo,{class:"sdm-close-icon"})])]),w("div",Ly,[e.skill.description?(b(),x("p",Dy,Te(e.skill.description),1)):ve("",!0),i.value?(b(),x("div",By,"Loading skill contents...")):o.value?(b(),x("div",{key:2,class:"sdm-readme",innerHTML:d.value},null,8,Fy)):ve("",!0),w("a",{class:"sdm-link",href:e.skill.url,target:"_blank",rel:"noopener noreferrer"},"View on GitHub",8,Hy)]),w("div",Uy,[w("div",Vy,[e.skill.installed?(b(),x("button",{key:0,class:"sdm-btn sdm-btn-danger",type:"button",disabled:l.value,onClick:y},Te(n.isUninstalling?"Uninstalling...":"Uninstall"),9,qy)):(b(),x("button",{key:1,class:"sdm-btn sdm-btn-primary",type:"button",disabled:l.value,onClick:m},Te(n.isInstalling?"Installing...":"Install"),9,Wy)),e.skill.installed?(b(),x("button",{key:2,class:"sdm-btn sdm-btn-secondary",type:"button",disabled:l.value,onClick:$},Te(a.value?"Disable":"Enable"),9,Ky)):ve("",!0)])])])])):ve("",!0)]))}}),zy=Ke(Gy,[["__scopeId","data-v-19a385ca"]]),Yy={class:"skills-hub"},Qy={class:"skills-hub-toolbar"},Jy={class:"skills-hub-search-wrap"},Xy={key:0,class:"skills-hub-count"},Zy={key:1,class:"skills-hub-section"},ew={class:"skills-hub-section-title"},tw={key:0,class:"skills-hub-grid"},nw={class:"skills-hub-section"},rw={key:0,class:"skills-hub-loading"},sw={key:1,class:"skills-hub-error"},ow={key:0,class:"skills-hub-grid"},iw={key:1,class:"skills-hub-empty"},ns="codex-web-local.skills-hub.cache.v1",aw=kt({__name:"SkillsHub",emits:["skills-changed"],setup(e,{emit:t}){const n={name:"",owner:"",description:"",url:"",installed:!1},r=V(null),s=V(""),o=V("date"),i=V([]),a=V([]),l=V(0),d=V(!1),u=V(""),f=V(!0),m=V(!1),y=V(n),$=V(null),C=V(""),B=V(!1),z=V(!1);let M=null,W=null;const q=t,fe=ae(()=>o.value==="date"?"Newest":"A-Z"),le=ae(()=>{var oe;return((oe=$.value)==null?void 0:oe.type)==="error"?"skills-hub-toast-error":"skills-hub-toast-success"}),ne=ae(()=>`${y.value.owner}/${y.value.name}`),pe=ae(()=>B.value&&C.value===ne.value),te=ae(()=>z.value&&C.value===ne.value),ee=ae(()=>{const oe=s.value.toLowerCase().trim();return oe?a.value.filter(we=>we.name.toLowerCase().includes(oe)||we.owner.toLowerCase().includes(oe)||(we.displayName??"").toLowerCase().includes(oe)):a.value});function ue(oe,we="success"){$.value={text:oe,type:we},W&&clearTimeout(W),W=setTimeout(()=>{$.value=null},3e3)}function J(){o.value=o.value==="date"?"name":"date",Ie(s.value)}function Re(oe){return`${o.value}::${oe.trim().toLowerCase()}`}function Ue(oe){var we;if(typeof window>"u")return null;try{const de=window.localStorage.getItem(ns);return de?((we=JSON.parse(de).byKey)==null?void 0:we[oe])??null:null}catch{return null}}function Ze(oe,we){if(!(typeof window>"u"))try{const de=window.localStorage.getItem(ns),A=(de?JSON.parse(de):{}).byKey??{};A[oe]=we,window.localStorage.setItem(ns,JSON.stringify({byKey:A}))}catch{}}function xe(){if(!(typeof window>"u"))try{window.localStorage.removeItem(ns)}catch{}}function Ne(oe){const we=oe.installed??[];a.value=we;const de=new Set(we.map(E=>E.name));i.value=oe.data.map(E=>{if(E.installed||de.has(E.name)){const A=we.find(O=>O.name===E.name);return{...E,installed:!0,path:(A==null?void 0:A.path)??E.path,enabled:(A==null?void 0:A.enabled)??E.enabled}}return E}).filter(E=>!E.installed),l.value=oe.total}async function Ie(oe){const we=Re(oe),de=Ue(we);de&&Ne(de),d.value=!de,u.value="";try{const E=new URLSearchParams;oe.trim()&&E.set("q",oe.trim()),E.set("limit","100"),E.set("sort",o.value);const A=await fetch(`/codex-api/skills-hub?${E}`);if(!A.ok)throw new Error(`HTTP ${A.status}`);const O=await A.json();Ne(O),Ze(we,O)}catch(E){u.value=E instanceof Error?E.message:"Failed to load skills"}finally{d.value=!1}}function et(){M&&clearTimeout(M),M=setTimeout(()=>Ie(s.value),300)}function tt(oe){y.value=oe,m.value=!0}async function Xe(oe){C.value=`${oe.owner}/${oe.name}`,B.value=!0;try{const de=await(await fetch("/codex-api/skills-hub/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:oe.owner,name:oe.name})})).json();if(!de.ok)throw new Error(de.error||"Install failed");const E={...oe,installed:!0,path:de.path,enabled:!0};a.value=[...a.value,E],i.value=i.value.filter(A=>A.name!==oe.name),y.value=E,ue(`${oe.displayName||oe.name} skill installed`),m.value=!1,xe(),q("skills-changed")}catch(we){ue(we instanceof Error?we.message:"Failed to install skill","error")}finally{B.value=!1}}async function Fe(oe){C.value=`${oe.owner}/${oe.name}`,z.value=!0;try{const de=await(await fetch("/codex-api/skills-hub/uninstall",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:oe.name,path:oe.path})})).json();if(!de.ok)throw new Error(de.error||"Uninstall failed");a.value=a.value.filter(E=>E.name!==oe.name),oe.owner!=="local"&&(i.value=[...i.value,{...oe,installed:!1,path:void 0,enabled:void 0}]),ue(`${oe.displayName||oe.name} skill uninstalled`),m.value=!1,xe(),q("skills-changed")}catch(we){ue(we instanceof Error?we.message:"Failed to uninstall skill","error")}finally{z.value=!1}}async function ct(oe,we){try{if(!(await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"skills/config/write",params:{path:oe.path,enabled:we}})})).ok)throw new Error("Failed to update skill");ue(`${oe.displayName||oe.name} skill ${we?"enabled":"disabled"}`),await Ie(s.value)}catch(de){ue(de instanceof Error?de.message:"Failed to update skill","error")}}return Nn(()=>{Ie("")}),(oe,we)=>(b(),x("div",Yy,[we[3]||(we[3]=w("div",{class:"skills-hub-header"},[w("h2",{class:"skills-hub-title"},"Skills Hub"),w("p",{class:"skills-hub-subtitle"},"Browse and discover skills from the OpenClaw community")],-1)),w("div",Qy,[w("div",Jy,[Ae(xo,{class:"skills-hub-search-icon"}),Rn(w("input",{ref_key:"searchRef",ref:r,"onUpdate:modelValue":we[0]||(we[0]=de=>s.value=de),class:"skills-hub-search",type:"text",placeholder:"Search skills... (e.g. flight, docker, react)",onInput:et},null,544),[[Pn,s.value]]),l.value>0?(b(),x("span",Xy,Te(l.value)+" skills",1)):ve("",!0)]),w("button",{class:"skills-hub-sort",type:"button",onClick:J},Te(fe.value),1)]),$.value?(b(),x("div",{key:0,class:ut(["skills-hub-toast",le.value])},Te($.value.text),3)):ve("",!0),ee.value.length>0?(b(),x("div",Zy,[w("button",{class:"skills-hub-section-toggle",type:"button",onClick:we[1]||(we[1]=de=>f.value=!f.value)},[w("span",ew,"Installed ("+Te(ee.value.length)+")",1),Ae(uc,{class:ut(["skills-hub-section-chevron",{"is-open":f.value}])},null,8,["class"])]),f.value?(b(),x("div",tw,[(b(!0),x(Le,null,gt(ee.value,de=>(b(),at(ka,{key:de.name,skill:de,onSelect:E=>tt(E)},null,8,["skill","onSelect"]))),128))])):ve("",!0)])):ve("",!0),w("div",nw,[d.value?(b(),x("div",rw,"Loading skills...")):u.value?(b(),x("div",sw,Te(u.value),1)):(b(),x(Le,{key:2},[i.value.length>0?(b(),x("div",ow,[(b(!0),x(Le,null,gt(i.value,de=>(b(),at(ka,{key:de.url,skill:de,onSelect:E=>tt(E)},null,8,["skill","onSelect"]))),128))])):s.value.trim()?(b(),x("div",iw,'No skills found for "'+Te(s.value)+'"',1)):ve("",!0)],64))]),Ae(zy,{skill:y.value,visible:m.value,"is-installing":pe.value,"is-uninstalling":te.value,onClose:we[2]||(we[2]=de=>m.value=!1),onInstall:Xe,onUninstall:Fe,onToggleEnabled:ct},null,8,["skill","visible","is-installing","is-uninstalling"])]))}}),lw=Ke(aw,[["__scopeId","data-v-1967b404"]]),cw={},uw={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function dw(e,t){return b(),x("svg",uw,[...t[0]||(t[0]=[w("path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12"},null,-1),w("path",{d:"M9 4l0 16"},null,-1)])])}const fw=Ke(cw,[["render",dw]]),hw={},pw={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"};function mw(e,t){return b(),x("svg",pw,[...t[0]||(t[0]=[w("path",{d:"M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm12 -16h-8v14h8a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1"},null,-1)])])}const gw=Ke(hw,[["render",mw]]),vw={},yw={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function ww(e,t){return b(),x("svg",yw,[...t[0]||(t[0]=[w("path",{d:"M20 11a8.1 8.1 0 0 0-15.5-2m-.5-4v4h4"},null,-1),w("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null,-1)])])}const bw=Ke(vw,[["render",ww]]),_w={class:"sidebar-thread-controls"},kw=["aria-label","title"],Tw=["aria-pressed","aria-label","title"],Sw=kt({__name:"SidebarThreadControls",props:{isSidebarCollapsed:{type:Boolean},isAutoRefreshEnabled:{type:Boolean},autoRefreshButtonLabel:{},showNewThreadButton:{type:Boolean}},emits:["toggle-sidebar","toggle-auto-refresh","start-new-thread"],setup(e){return(t,n)=>(b(),x("div",_w,[w("button",{class:"sidebar-thread-controls-button",type:"button","aria-label":e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",title:e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",onClick:n[0]||(n[0]=r=>t.$emit("toggle-sidebar"))},[e.isSidebarCollapsed?(b(),at(gw,{key:0,class:"sidebar-thread-controls-icon"})):(b(),at(fw,{key:1,class:"sidebar-thread-controls-icon"}))],8,kw),w("button",{class:"sidebar-thread-controls-button",type:"button","aria-pressed":e.isAutoRefreshEnabled,"aria-label":e.autoRefreshButtonLabel,title:e.autoRefreshButtonLabel,onClick:n[1]||(n[1]=r=>t.$emit("toggle-auto-refresh"))},[Ae(bw,{class:"sidebar-thread-controls-icon"})],8,Tw),rn(t.$slots,"default",{},void 0),e.showNewThreadButton?(b(),x("button",{key:0,class:"sidebar-thread-controls-button",type:"button","aria-label":"Start new thread",title:"Start new thread",onClick:n[2]||(n[2]=r=>t.$emit("start-new-thread"))},[Ae(dc,{class:"sidebar-thread-controls-icon"})])):ve("",!0)]))}}),Ta=Ke(Sw,[["__scopeId","data-v-57866500"]]);function Sa(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}class mn extends Error{constructor(t,n){super(t),this.name="CodexApiError",this.code=n.code,this.method=n.method,this.status=n.status}}function Zo(e,t){const n=Sa(e);if(!n)return t;const r=n.error;if(typeof r=="string"&&r.length>0)return r;const s=Sa(r);return s&&typeof s.message=="string"&&s.message.length>0?s.message:t}function wr(e,t,n){return e instanceof mn?e:e instanceof Error?new mn(e.message||t,{code:"unknown_error",method:n}):new mn(t,{code:"unknown_error",method:n})}function fc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}async function xw(e,t){const n={method:e,params:t??null};let r;try{r=await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(i){throw new mn(i instanceof Error?i.message:`RPC ${e} failed before request was sent`,{code:"network_error",method:e})}let s=null;try{s=await r.json()}catch{s=null}if(!r.ok)throw new mn(Zo(s,`RPC ${e} failed with HTTP ${r.status}`),{code:"http_error",method:e,status:r.status});const o=s;if(!o||typeof o!="object"||!("result"in o))throw new mn(`RPC ${e} returned malformed envelope`,{code:"invalid_response",method:e,status:r.status});return o.result}function Cw(e){const t=fc(e);if(!t||typeof t.method!="string"||t.method.length===0)return null;const n=typeof t.atIso=="string"&&t.atIso.length>0?t.atIso:new Date().toISOString();return{method:t.method,params:t.params??null,atIso:n}}function Ew(e){if(typeof window>"u"||typeof EventSource>"u")return()=>{};const t=new EventSource("/codex-api/events");return t.onmessage=n=>{try{const r=JSON.parse(n.data),s=Cw(r);s&&e(s)}catch{}},()=>{t.close()}}async function Aw(e){let t;try{t=await fetch("/codex-api/server-requests/respond",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(r){throw new mn(r instanceof Error?r.message:"Failed to reply to server request",{code:"network_error",method:"server-requests/respond"})}let n=null;try{n=await t.json()}catch{n=null}if(!t.ok)throw new mn(Zo(n,`Server request reply failed with HTTP ${t.status}`),{code:"http_error",method:"server-requests/respond",status:t.status})}async function Iw(){const e=await fetch("/codex-api/server-requests/pending");let t=null;try{t=await e.json()}catch{t=null}if(!e.ok)throw new mn(Zo(t,`Pending server requests failed with HTTP ${e.status}`),{code:"http_error",method:"server-requests/pending",status:e.status});const n=fc(t),r=n==null?void 0:n.data;return Array.isArray(r)?r:[]}function xa(e){return new Date(e*1e3).toISOString()}function Rw(e){return e.split("/").filter(Boolean).at(-1)||e||"unknown-project"}function $w(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Pw(e){const t=/(?:^|\n)\s{0,3}#{0,6}\s*my request for codex\s*:?\s*/giu,n=Array.from(e.matchAll(t));if(n.length===0)return e.trim();const r=n.at(-1);if(!r||typeof r.index!="number")return e.trim();const s=r.index+r[0].length;return e.slice(s).trim()}function Mw(e,t){if(!Array.isArray(t))return{text:"",images:[],rawBlocks:[]};const n=[],r=[],s=[];for(const[o,i]of t.entries())i.type==="text"&&typeof i.text=="string"&&i.text.length>0&&n.push(i.text),i.type==="image"&&typeof i.url=="string"&&i.url.trim().length>0&&r.push(i.url.trim()),i.type!=="text"&&i.type!=="image"&&s.push({id:`${e}:user-content:${o}`,role:"user",text:"",messageType:`userContent.${i.type}`,rawPayload:$w(i),isUnhandled:!0});return{text:Pw(n.join(`
33
+ `)),images:r,rawBlocks:s}}function Nw(e){if(e.type==="agentMessage")return[{id:e.id,role:"assistant",text:e.text,messageType:e.type}];if(e.type==="userMessage"){const t=Mw(e.id,e.content),n=[];return(t.text.length>0||t.images.length>0)&&n.push({id:e.id,role:"user",text:t.text,images:t.images,messageType:e.type}),n.push(...t.rawBlocks),n.length===0?[]:n}if(e.type==="reasoning")return[];if(e.type==="commandExecution"){const t=e,n=Ow(t.status),r=typeof t.command=="string"?t.command:"",s=typeof t.cwd=="string"?t.cwd:null,o=typeof t.aggregatedOutput=="string"?t.aggregatedOutput:"",i=typeof t.exitCode=="number"?t.exitCode:null;return[{id:e.id,role:"system",text:r,messageType:"commandExecution",commandExecution:{command:r,cwd:s,status:n,aggregatedOutput:o,exitCode:i}}]}return[]}function Ow(e){return e==="completed"||e==="failed"||e==="declined"||e==="interrupted"?e:e==="inProgress"||e==="in_progress"?"inProgress":"completed"}function jw(e){const t=[e.preview];for(const n of t)if(typeof n=="string"&&n.trim().length>0)return n.trim();return""}function Lw(e){const t=jw(e);return t.length>0?t:"Untitled thread"}function Dw(e){const t=e,n=typeof t.cwd=="string"?t.cwd:e.cwd,r=t.isWorktree===!0||t.worktree===!0||t.worktreeId!==void 0||t.worktreePath!==void 0||n.includes("/.codex/worktrees/")||n.includes("/.git/worktrees/");return{id:e.id,title:Lw(e),projectName:Rw(e.cwd),cwd:e.cwd,hasWorktree:r,createdAtIso:xa(e.createdAt),updatedAtIso:xa(e.updatedAt),preview:e.preview,unread:!1,inProgress:!1}}function Bw(e){const t=new Map;for(const n of e){const r=t.get(n.projectName);r?r.push(n):t.set(n.projectName,[n])}return Array.from(t.entries()).map(([n,r])=>({projectName:n,threads:r.sort((s,o)=>new Date(o.updatedAtIso).getTime()-new Date(s.updatedAtIso).getTime())})).sort((n,r)=>{var i,a;const s=new Date(((i=n.threads[0])==null?void 0:i.updatedAtIso)??0).getTime();return new Date(((a=r.threads[0])==null?void 0:a.updatedAtIso)??0).getTime()-s})}function Fw(e){const t=e.data.map(Dw);return Bw(t)}function hc(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[],n=[];for(let r=0;r<t.length;r++){const s=t[r],o=Array.isArray(s.items)?s.items:[];for(const i of o)for(const a of Nw(i))n.push({...a,turnIndex:r})}return n}async function Ht(e,t){try{return await xw(e,t)}catch(n){throw wr(n,`RPC ${e} failed`,e)}}function Hw(e){return typeof e=="string"&&["none","minimal","low","medium","high","xhigh"].includes(e)?e:""}async function Uw(){const e=await Ht("thread/list",{archived:!1,limit:100,sortKey:"updated_at"});return Fw(e)}async function Vw(e){const t=await Ht("thread/read",{threadId:e,includeTurns:!0});return hc(t)}async function qw(){try{return await Uw()}catch(e){throw wr(e,"Failed to load thread groups","thread/list")}}async function Ww(e){try{return await Vw(e)}catch(t){throw wr(t,`Failed to load thread ${e}`,"thread/read")}}function Kw(e){return Ew(e)}async function Gw(e,t){await Aw({id:e,...t})}async function zw(){return Iw()}async function Ca(e){await Ht("thread/resume",{threadId:e})}async function Yw(e){await Ht("thread/archive",{threadId:e})}async function Qw(e,t){const n=await Ht("thread/rollback",{threadId:e,numTurns:t});return hc(n)}function Jw(e){if(!e||typeof e!="object")return"";const n=e.thread;if(n&&typeof n=="object"){const r=n.id;if(typeof r=="string"&&r.length>0)return r}return""}async function Xw(e,t){try{const n={};typeof e=="string"&&e.trim().length>0&&(n.cwd=e.trim()),typeof t=="string"&&t.trim().length>0&&(n.model=t.trim());const r=await Ht("thread/start",n),s=Jw(r);if(!s)throw new Error("thread/start did not return a thread id");return s}catch(n){throw wr(n,"Failed to start a new thread","thread/start")}}async function Zw(e,t,n=[],r,s,o){try{const i=[{type:"text",text:t}];for(const l of n){const d=l.trim();d&&i.push({type:"image",url:d,image_url:d})}if(o)for(const l of o)i.push({type:"skill",name:l.name,path:l.path});const a={threadId:e,input:i};typeof r=="string"&&r.length>0&&(a.model=r),typeof s=="string"&&s.length>0&&(a.effort=s),await Ht("turn/start",a)}catch(i){throw wr(i,`Failed to start turn for thread ${e}`,"turn/start")}}async function eb(e,t){const n=e.trim(),r=(t==null?void 0:t.trim())||"";if(n)try{if(!r)throw new Error("turn/interrupt requires turnId");await Ht("turn/interrupt",{threadId:n,turnId:r})}catch(s){throw wr(s,`Failed to interrupt turn for thread ${n}`,"turn/interrupt")}}async function tb(){const e=await Ht("model/list",{}),t=[];for(const n of e.data){const r=n.id||n.model;!r||t.includes(r)||t.push(r)}return t}async function nb(){const e=await Ht("config/read",{}),t=e.config.model??"",n=Hw(e.config.model_reasoning_effort);return{model:t,reasoningEffort:n}}function rb(e){const t=e&&typeof e=="object"&&!Array.isArray(e)?e:{},n=o=>{if(!Array.isArray(o))return[];const i=[];for(const a of o)typeof a=="string"&&a.length>0&&!i.includes(a)&&i.push(a);return i},r=t.labels,s={};if(r&&typeof r=="object"&&!Array.isArray(r))for(const[o,i]of Object.entries(r))typeof o=="string"&&o.length>0&&typeof i=="string"&&(s[o]=i);return{order:n(t.order),labels:s,active:n(t.active)}}async function Ea(){const e=await fetch("/codex-api/workspace-roots-state"),t=await e.json();if(!e.ok)throw new Error("Failed to load workspace roots state");const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return rb(n.data)}async function sb(e){if(!(await fetch("/codex-api/workspace-roots-state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save workspace roots state")}async function ob(e,t){const n=await fetch("/codex-api/project-root",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,createIfMissing:(t==null?void 0:t.createIfMissing)===!0,label:(t==null?void 0:t.label)??""})}),r=await n.json();if(!n.ok){const a=pc(r,"Failed to open project root");throw new Error(a)}const s=r&&typeof r=="object"&&!Array.isArray(r)?r:{},o=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return typeof o.path=="string"?o.path.trim():""}async function ib(e){const t=new URLSearchParams({basePath:e}),n=await fetch(`/codex-api/project-root-suggestion?${t.toString()}`),r=await n.json();if(!n.ok){const i=pc(r,"Failed to suggest project name");throw new Error(i)}const s=r&&typeof r=="object"&&!Array.isArray(r)?r:{},o=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return{name:typeof o.name=="string"?o.name.trim():"",path:typeof o.path=="string"?o.path.trim():""}}function pc(e,t){const r=(e&&typeof e=="object"&&!Array.isArray(e)?e:{}).error;return typeof r=="string"&&r.trim().length>0?r:t}async function ab(){try{const e=await fetch("/codex-api/thread-titles");return e.ok?(await e.json()).data??{titles:{},order:[]}:{titles:{},order:[]}}catch{return{titles:{},order:[]}}}async function Aa(e,t){try{await fetch("/codex-api/thread-titles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,title:t})})}catch{}}async function lb(e,t){var n;try{return((n=(await Ht("generate-thread-title",{prompt:e,cwd:t})).title)==null?void 0:n.trim())??""}catch{return""}}async function cb(e){try{const t={};e&&e.length>0&&(t.cwds=e);const n=await Ht("skills/list",t),r=[],s=new Set;for(const o of n.data)for(const i of o.skills)!i.name||s.has(i.path)||(s.add(i.path),r.push({name:i.name,description:i.shortDescription||i.description||"",path:i.path,scope:i.scope,enabled:i.enabled}));return r}catch{return[]}}function An(e){return e.flatMap(t=>t.threads)}const mc="codex-web-local.thread-read-state.v1",gc="codex-web-local.thread-scroll-state.v1",Co="codex-web-local.selected-thread-id.v1",vc="codex-web-local.project-order.v1",yc="codex-web-local.project-display-name.v1",wc="codex-web-local.auto-refresh-enabled.v1",eo=220,Cr=4e3,Ia=["none","minimal","low","medium","high","xhigh"],Er="__global__";function ub(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(mc);if(!e)return{};const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?{}:t}catch{return{}}}function Ra(e){typeof window>"u"||window.localStorage.setItem(mc,JSON.stringify(e))}function db(){return typeof window>"u"?!1:window.localStorage.getItem(wc)==="1"}function $a(e){typeof window>"u"||window.localStorage.setItem(wc,e?"1":"0")}function bc(e,t,n){return Math.min(Math.max(e,t),n)}function fb(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(typeof t.scrollTop!="number"||!Number.isFinite(t.scrollTop)||typeof t.isAtBottom!="boolean")return null;const n={scrollTop:Math.max(0,t.scrollTop),isAtBottom:t.isAtBottom};return typeof t.scrollRatio=="number"&&Number.isFinite(t.scrollRatio)&&(n.scrollRatio=bc(t.scrollRatio,0,1)),n}function hb(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(gc);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,s]of Object.entries(t)){if(!r)continue;const o=fb(s);o&&(n[r]=o)}return n}catch{return{}}}function Pa(e){typeof window>"u"||window.localStorage.setItem(gc,JSON.stringify(e))}function pb(){return typeof window>"u"?"":window.localStorage.getItem(Co)??""}function mb(e){if(!(typeof window>"u")){if(!e){window.localStorage.removeItem(Co);return}window.localStorage.setItem(Co,e)}}function gb(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(vc);if(!e)return[];const t=JSON.parse(e);if(!Array.isArray(t))return[];const n=[];for(const r of t)typeof r=="string"&&r.length>0&&!n.includes(r)&&n.push(r);return n}catch{return[]}}function ar(e){typeof window>"u"||window.localStorage.setItem(vc,JSON.stringify(e))}function vb(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(yc);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,s]of Object.entries(t))typeof r=="string"&&r.length>0&&typeof s=="string"&&(n[r]=s);return n}catch{return{}}}function to(e){typeof window>"u"||window.localStorage.setItem(yc,JSON.stringify(e))}function rs(e,t){const n=[];for(const r of e)n.includes(r)||n.push(r);for(const r of t)n.includes(r.projectName)||n.push(r.projectName);return Gn(e,n)?e:n}function no(e,t){const n=new Map(e.map(s=>[s.projectName,s])),r=t.map(s=>n.get(s)??{projectName:s,threads:[]});for(const s of e)t.includes(s.projectName)||r.push(s);return r}function Gn(e,t){const n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];if(n.length!==r.length)return!1;for(let s=0;s<n.length;s+=1)if(n[s]!==r[s])return!1;return!0}function yb(e,t,n){if(t<0||t>=e.length||n<0||n>=e.length||t===n)return e;const r=[...e],[s]=r.splice(t,1);return r.splice(n,0,s),r}function wb(e,t){return!e&&!t?!0:!e||!t?!1:e.status===t.status&&e.aggregatedOutput===t.aggregatedOutput&&e.exitCode===t.exitCode}function Eo(e,t){return e.id===t.id&&e.role===t.role&&e.text===t.text&&Gn(e.images,t.images)&&e.messageType===t.messageType&&e.rawPayload===t.rawPayload&&e.isUnhandled===t.isUnhandled&&wb(e.commandExecution,t.commandExecution)&&e.turnIndex===t.turnIndex}function vs(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function bb(e,t,n={}){const r=new Map(e.map(u=>[u.id,u])),s=new Map(t.map(u=>[u.id,u])),o=t.map(u=>{const f=r.get(u.id);return f&&Eo(f,u)?f:u});if(n.preserveMissing!==!0)return vs(e,o)?e:o;const i=e.map(u=>{const f=s.get(u.id);return!f||Eo(u,f)?u:f}),a=new Set(e.map(u=>u.id)),l=o.filter(u=>!a.has(u.id)),d=[...i,...l];return vs(e,d)?e:d}function Ao(e){return e.replace(/\s+/gu," ").trim()}function _b(e,t){const n=new Set(t.filter(s=>s.role==="assistant").map(s=>Ao(s.text)).filter(s=>s.length>0));if(n.size===0)return e;const r=e.filter(s=>{if(s.messageType!=="agentMessage.live")return!0;const o=Ao(s.text);return o.length===0?!1:!n.has(o)});return r.length===e.length?e:r}function Ma(e,t){const n=e.findIndex(o=>o.id===t.id);if(n<0)return[...e,t];const r=e[n];if(Eo(r,t))return e;const s=[...e];return s.splice(n,1,t),s}const _c="worked";function Sn(e){if(!e)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function kb(e){if(!Number.isFinite(e)||e<=0)return"<1s";const t=Math.max(1,Math.round(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),s=t%60,o=[];n>0&&o.push(`${n}h`),(r>0||n>0)&&o.push(`${r}m`);const i=s>0||o.length===0?s:0;return o.push(`${i}s`),o.join(" ")}function Tb(e,t){return!e&&!t?!0:!e||!t?!1:e.turnId===t.turnId&&e.durationMs===t.durationMs}function Sb(e,t){if(!e&&!t)return!0;if(!e||!t||e.label!==t.label||e.details.length!==t.details.length)return!1;for(let n=0;n<e.details.length;n+=1)if(e.details[n]!==t.details[n])return!1;return!0}function xb(e){return{id:`turn-summary:${e.turnId}`,role:"system",text:`Worked for ${kb(e.durationMs)}`,messageType:_c}}function Cb(e){for(let t=e.length-1;t>=0;t-=1)if(e[t].role==="assistant")return t;return-1}function Eb(e,t){const n=xb(t),r=e.filter(i=>i.messageType!==_c),s=Cb(r);if(s<0)return[...r,n];const o=[...r];return o.splice(s,0,n),o}function It(e,t){if(!(t in e))return e;const n={...e};return delete n[t],n}function Ab(e,t){return e.id===t.id&&e.title===t.title&&e.projectName===t.projectName&&e.cwd===t.cwd&&e.createdAtIso===t.createdAtIso&&e.updatedAtIso===t.updatedAtIso&&e.preview===t.preview&&e.unread===t.unread&&e.inProgress===t.inProgress}function Ib(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Rb(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Tt(e,t){const n=Object.entries(e).filter(([r])=>t.has(r));return n.length===Object.keys(e).length?e:Object.fromEntries(n)}function ss(e,t){const n=new Map(e.map(s=>[s.projectName,s])),r=t.map(s=>{const o=n.get(s.projectName),i=new Map((o==null?void 0:o.threads.map(l=>[l.id,l]))??[]),a=s.threads.map(l=>{const d=i.get(l.id);return d&&Ab(d,l)?d:l});return o&&o.projectName===s.projectName&&Ib(o.threads,a)?o:{projectName:s.projectName,threads:a}});return Rb(e,r)?e:r}function $b(e,t,n){const r=new Set(An(t).map(a=>a.id)),s=An(e).filter(a=>n[a.id]===!0&&!r.has(a.id));if(s.length===0)return t;const o=new Map(t.map(a=>[a.projectName,a])),i=t.map(a=>({projectName:a.projectName,threads:[...a.threads]}));for(const a of s){if(o.get(a.projectName)){const d=i.findIndex(u=>u.projectName===a.projectName);d>=0&&(i[d]={projectName:i[d].projectName,threads:[a,...i[d].threads]});continue}i.push({projectName:a.projectName,threads:[a]})}return i}function Pb(e){return e.split("/").filter(Boolean).at(-1)||e||"unknown-project"}function ro(e){const t=e.replace(/\\/gu,"/");return t.split("/").filter(Boolean).at(-1)||t}function Mb(e){const t=e.split(`
34
+ `).map(n=>n.trim()).find(n=>n.length>0);return t?t.slice(0,80):"Untitled thread"}function Nb(){const e=V([]),t=V([]),n=V(pb()),r=V({}),s=V({}),o=V({}),i=V({}),a=V({}),l=V({}),d=V({}),u=V([]),f=V(""),m=V("medium"),y=V(ub()),$=V(hb()),C=V(gb()),B=V(vb()),z=V({}),M=V({}),W=V({}),q=V({}),fe=V({}),le=V({}),ne=V({}),pe=V({}),te=V({}),ee=V([]),ue=V(!1),J=V(!1),Re=V(!1),Ue=V(!1),Ze=V(!1),xe=V(""),Ne=V(!1),Ie=V(!1),et=V(db()),tt=V(Math.floor(Cr/1e3));let Xe=null,Fe=null,ct=null,oe=null,we=!1;const de=new Set;let E=!1,A=!1;const O=new Map,K=ae(()=>An(e.value)),_e=ae(()=>K.value.find(c=>c.id===n.value)??null),p=ae(()=>$.value[n.value]??null),g=ae(()=>{const c=[],h=n.value;return h&&Array.isArray(pe.value[h])&&c.push(...pe.value[h]),Array.isArray(pe.value[Er])&&c.push(...pe.value[Er]),c.sort((v,T)=>v.receivedAtIso.localeCompare(T.receivedAtIso))}),S=ae(()=>{var F;const c=n.value;if(!c)return null;const h=fe.value[c],v=(o.value[c]??"").trim(),T=(((F=le.value[c])==null?void 0:F.message)??"").trim();return!h&&!v&&!T?null:{activityLabel:(h==null?void 0:h.label)||"Thinking",activityDetails:(h==null?void 0:h.details)??[],reasoningText:v,errorText:T}}),D=ae(()=>{const c=n.value;if(!c)return[];const h=r.value[c]??[],v=s.value[c]??[],T=i.value[c]??[],F=[...h,...T,...v],U=q.value[c];return U?Eb(F,U):F});function H(c){n.value!==c&&(n.value=c,mb(c),A=!1)}function L(c){f.value=c.trim()}function re(c){c&&!Ia.includes(c)||(m.value=c)}function X(c,h){const v=c.trim()||"default",T=h||"default";return[`Model: ${v}`,`Thinking: ${T}`]}async function Z(){try{const[c,h]=await Promise.all([tb(),nb()]);u.value=c,f.value.length>0&&c.includes(f.value)||(h.model&&c.includes(h.model)?f.value=h.model:c.length>0?f.value=c[0]:f.value=""),h.reasoningEffort&&Ia.includes(h.reasoningEffort)&&(m.value=h.reasoningEffort)}catch{}}function G(c){const h=te.value;return Object.keys(h).length===0?c:c.map(v=>({projectName:v.projectName,threads:v.threads.map(T=>{const F=h[T.id];return F?{...T,title:F}:T})}))}function ie(){const h=G(t.value).map(v=>({projectName:v.projectName,threads:v.threads.map(T=>{const F=a.value[T.id]===!0,U=n.value===T.id,ke=y.value[T.id],ce=d.value[T.id]===!0,He=!U&&!F&&(ce||ke!==T.updatedAtIso);return{...T,inProgress:F,unread:He}})}));e.value=ss(e.value,h)}function se(c,h,v){const T=new Date().toISOString(),F=h.trim(),U=Pb(F),ke={id:c,title:Mb(v),projectName:U,cwd:F,hasWorktree:F.includes("/.codex/worktrees/")||F.includes("/.git/worktrees/"),createdAtIso:T,updatedAtIso:T,preview:v,unread:!1,inProgress:!1},ce=t.value.findIndex(bt=>bt.projectName===U);if(ce>=0){const Jt=t.value[ce].threads.filter(Jr=>Jr.id!==c),bn={projectName:U,threads:[ke,...Jt]},_n=[...t.value];_n.splice(ce,1,bn),t.value=_n}else t.value=[{projectName:U,threads:[ke]},...t.value];const He=rs(C.value,t.value);Gn(C.value,He)||(C.value=He,ar(C.value)),ie()}function be(c){const h=new Set(c.map(U=>U.id)),v=Tt(y.value,h);v!==y.value&&(y.value=v,Ra(v));const T=Tt($.value,h);T!==$.value&&($.value=T,Pa(T)),M.value=Tt(M.value,h),z.value=Tt(z.value,h),W.value=Tt(W.value,h),r.value=Tt(r.value,h),s.value=Tt(s.value,h),o.value=Tt(o.value,h),i.value=Tt(i.value,h),q.value=Tt(q.value,h),fe.value=Tt(fe.value,h),le.value=Tt(le.value,h),ne.value=Tt(ne.value,h),d.value=Tt(d.value,h),a.value=Tt(a.value,h);const F={};for(const[U,ke]of Object.entries(pe.value))(U===Er||h.has(U))&&(F[U]=ke);pe.value=F}function Se(c){const h=An(t.value).find(v=>v.id===c);h&&(y.value={...y.value,[c]:h.updatedAtIso},Ra(y.value),d.value[c]&&(d.value=It(d.value,c)),ie())}function Pe(c,h){if(!c)return;const v=q.value[c];if(h){if(Tb(v,h))return;q.value={...q.value,[c]:h}}else v&&(q.value=It(q.value,c))}function Me(c,h){!c||a.value[c]===!0===h||(h?a.value={...a.value,[c]:!0}:a.value=It(a.value,c),ie())}function De(c){c&&c!==n.value&&d.value[c]!==!0&&(d.value={...d.value,[c]:!0},ie())}function Ve(c,h){if(!c)return;const v=fe.value[c];if(!h){v&&(fe.value=It(fe.value,c));return}const T=Lt(h.label)||"Thinking",F=h.details.map(ce=>Lt(ce)).filter(ce=>ce.length>0&&ce!==T),U=Array.from(new Set([...(v==null?void 0:v.details)??[],...F])).slice(-3),ke={label:T,details:U};Sb(v,ke)||(fe.value={...fe.value,[c]:ke})}function qe(c,h){if(!c)return;const v=le.value[c],T=h?Ao(h):"";if(!T){v&&(le.value=It(le.value,c));return}(v==null?void 0:v.message)!==T&&(le.value={...le.value,[c]:{message:T}})}function pt(c){const h=An(t.value).find(v=>v.id===c);return(h==null?void 0:h.updatedAtIso)??""}function k(c,h){if(!c)return;const v={scrollTop:Math.max(0,h.scrollTop),isAtBottom:h.isAtBottom===!0};typeof h.scrollRatio=="number"&&Number.isFinite(h.scrollRatio)&&(v.scrollRatio=bc(h.scrollRatio,0,1));const T=$.value[c];T&&T.scrollTop===v.scrollTop&&T.isAtBottom===v.isAtBottom&&T.scrollRatio===v.scrollRatio||($.value={...$.value,[c]:v},Pa($.value))}function P(c,h){const v=r.value[c]??[];vs(v,h)||(r.value={...r.value,[c]:h})}function I(c,h){const v=s.value[c]??[];vs(v,h)||(s.value={...s.value,[c]:h})}function Y(c,h){const v=s.value[c]??[],T=Ma(v,h);I(c,T)}function me(c,h){if(!c)return;const v=h.trim(),T=o.value[c]??"";if(v.length===0){if(!T)return;o.value=It(o.value,c);return}T!==v&&(o.value={...o.value,[c]:v})}function Ce(c,h){if(!c)return;const v=o.value[c]??"";me(c,`${v}${h}`)}function Ge(c){c&&c in o.value&&(o.value=It(o.value,c))}function ye(c){return c!==null&&typeof c=="object"&&!Array.isArray(c)?c:null}function he(c){return typeof c=="string"?c:""}function ot(c){return typeof c=="number"&&Number.isFinite(c)?c:null}function rt(c){const h=ye(c.params);if(!h)return"";const v=he(h.threadId);if(v)return v;const T=he(h.thread_id);if(T)return T;const F=he(h.conversationId);if(F)return F;const U=he(h.conversation_id);if(U)return U;const ke=ye(h.thread),ce=he(ke==null?void 0:ke.id);if(ce)return ce;const He=ye(h.turn),bt=he(He==null?void 0:He.threadId);if(bt)return bt;const Jt=he(He==null?void 0:He.thread_id);return Jt||""}function Ut(c){if(c.method!=="turn/completed")return"";const h=ye(c.params),v=ye(h==null?void 0:h.turn);if(!v||v.status!=="failed")return"";const T=ye(v.error);return he(T==null?void 0:T.message)}function on(c){const h=ye(c);if(!h)return null;const v=h.id,T=he(h.method),F=h.params;if(typeof v!="number"||!Number.isInteger(v)||!T)return null;const U=ye(F),ke=he(U==null?void 0:U.threadId)||Er,ce=he(U==null?void 0:U.turnId),He=he(U==null?void 0:U.itemId),bt=he(h.receivedAtIso)||new Date().toISOString();return{id:v,method:T,threadId:ke,turnId:ce,itemId:He,receivedAtIso:bt,params:F??null}}function Xn(c){const h=c.threadId||Er,v=pe.value[h]??[],T=v.findIndex(U=>U.id===c.id),F=[...v];T>=0?F.splice(T,1,c):F.push(c),pe.value={...pe.value,[h]:F.sort((U,ke)=>U.receivedAtIso.localeCompare(ke.receivedAtIso))}}function jn(c){const h={};for(const[v,T]of Object.entries(pe.value)){const F=T.filter(U=>U.id!==c);F.length>0&&(h[v]=F)}pe.value=h}function br(c){if(c.method==="server/request"){const h=on(c.params);return h&&Xn(h),!0}if(c.method==="server/request/resolved"){const h=ye(c.params),v=h==null?void 0:h.id;return typeof v=="number"&&Number.isInteger(v)&&jn(v),!0}return!1}function Lt(c){return c.replace(/\s+/gu," ").trim()}function Zn(c){const h=rt(c);if(!h)return null;if(c.method==="turn/started")return{threadId:h,activity:{label:"Thinking",details:[]}};if(c.method==="item/started"){const v=ye(c.params),T=ye(v==null?void 0:v.item),F=he(T==null?void 0:T.type).toLowerCase();if(F==="reasoning")return{threadId:h,activity:{label:"Thinking",details:[]}};if(F==="agentmessage")return{threadId:h,activity:{label:"Writing response",details:[]}};if(F==="commandexecution"){const U=he(T==null?void 0:T.command);return{threadId:h,activity:{label:"Running command",details:U?[U]:[]}}}}return c.method==="item/commandExecution/outputDelta"?{threadId:h,activity:{label:"Running command",details:[]}}:c.method==="item/reasoning/summaryTextDelta"||c.method==="item/reasoning/summaryPartAdded"?{threadId:h,activity:{label:"Thinking",details:[]}}:c.method==="item/agentMessage/delta"?{threadId:h,activity:{label:"Writing response",details:[]}}:null}function er(c){if(c.method!=="turn/started")return null;const h=ye(c.params);if(!h)return null;const v=rt(c);if(!v)return null;const T=ye(h.turn),F=he(T==null?void 0:T.id)||he(h.turnId)||`${v}:unknown`;if(!F)return null;const U=Sn(he(T==null?void 0:T.startedAt))??Sn(he(h.startedAt))??Sn(c.atIso)??Date.now();return{threadId:v,turnId:F,startedAtMs:U}}function tr(c){if(c.method!=="turn/completed")return null;const h=ye(c.params);if(!h)return null;const v=rt(c);if(!v)return null;const T=ye(h.turn),F=he(T==null?void 0:T.id)||he(h.turnId)||`${v}:unknown`;if(!F)return null;const U=Sn(he(T==null?void 0:T.completedAt))??Sn(he(h.completedAt))??Sn(c.atIso)??Date.now(),ke=Sn(he(T==null?void 0:T.startedAt))??Sn(he(h.startedAt))??void 0;return{threadId:v,turnId:F,completedAtMs:U,startedAtMs:ke}}function an(c){return`${c}:live-reasoning`}function nr(c){const h=ye(c.params);if(!h)return"";if(c.method==="item/started"){const v=ye(h.item);return!v||v.type!=="reasoning"?"":he(v.id)}return""}function _(c){const h=ye(c.params);if(!h)return null;if(c.method==="item/reasoning/summaryTextDelta"){const v=he(h.itemId),T=he(h.delta);return!v||!T?null:{messageId:an(v),delta:T}}return null}function R(c){const h=ye(c.params);if(!h)return"";if(c.method==="item/reasoning/summaryPartAdded"){const v=he(h.itemId);return v?an(v):""}return""}function N(c){const h=ye(c.params);if(!h)return"";if(c.method==="item/completed"){const v=ye(h.item);return!v||v.type!=="reasoning"?"":an(he(v.id))}return""}function Q(c){const h=ye(c.params);if(!h)return"";if(c.method==="item/started"){const v=ye(h.item);return!v||v.type!=="agentMessage"?"":he(v.id)}return""}function Be(c){const h=ye(c.params);if(!h)return null;if(c.method==="item/agentMessage/delta"){const v=he(h.itemId),T=he(h.delta);return!v||!T?null:{messageId:v,delta:T}}return null}function vt(c){const h=ye(c.params);if(!h)return null;if(c.method==="item/completed"){const v=ye(h.item);if(!v||v.type!=="agentMessage")return null;const T=he(v.id),F=he(v.text);return!T||!F?null:{id:T,role:"assistant",text:F,messageType:"agentMessage.live"}}return null}function Ot(c){if(c.method!=="item/started")return null;const h=ye(c.params),v=ye(h==null?void 0:h.item);if(!v||v.type!=="commandExecution")return null;const T=he(v.id),F=he(v.command);if(!T)return null;const U=typeof v.cwd=="string"?v.cwd:null;return{id:T,role:"system",text:F,messageType:"commandExecution",commandExecution:{command:F,cwd:U,status:"inProgress",aggregatedOutput:"",exitCode:null}}}function Ln(c){if(c.method!=="item/commandExecution/outputDelta")return null;const h=ye(c.params);if(!h)return null;const v=he(h.itemId),T=he(h.delta);return!v||!T?null:{itemId:v,delta:T}}function rr(c){if(c.method!=="item/completed")return null;const h=ye(c.params),v=ye(h==null?void 0:h.item);if(!v||v.type!=="commandExecution")return null;const T=he(v.id),F=he(v.command);if(!T)return null;const U=typeof v.cwd=="string"?v.cwd:null,ke=he(v.status),ce=ke==="failed"?"failed":ke==="declined"?"declined":ke==="interrupted"?"interrupted":"completed",He=typeof v.aggregatedOutput=="string"?v.aggregatedOutput:"",bt=typeof v.exitCode=="number"?v.exitCode:null;return{id:T,role:"system",text:F,messageType:"commandExecution",commandExecution:{command:F,cwd:U,status:ce,aggregatedOutput:He,exitCode:bt}}}function j(c,h){const v=i.value[c]??[],T=Ma(v,h);T!==v&&(i.value={...i.value,[c]:T})}function ge(c,h){const v=i.value[c];if(!v||v.length===0)return;const T=new Set(h.map(U=>U.id)),F=v.filter(U=>!T.has(U.id));F.length!==v.length&&(F.length===0?i.value=It(i.value,c):i.value={...i.value,[c]:F})}function Oe(c){if(c.method==="item/agentMessage/delta")return!0;const h=ye(c.params);if(!h)return!1;if(c.method==="item/completed"){const v=ye(h.item);return(v==null?void 0:v.type)==="agentMessage"}return!1}function mt(c){var Jr,ii,ai,li;if(br(c))return;if(c.method==="thread/name/updated"){const We=ye(c.params),Xt=he(We==null?void 0:We.threadId),Bn=he(We==null?void 0:We.threadName);Xt&&Bn&&(te.value={...te.value,[Xt]:Bn},ie(),Aa(Xt,Bn))}const h=Zn(c);h&&Ve(h.threadId,h.activity);const v=er(c);v&&(O.set(v.turnId,v),ne.value={...ne.value,[v.threadId]:v.turnId},Pe(v.threadId,null),qe(v.threadId,null),Me(v.threadId,!0),d.value[v.threadId]&&(d.value=It(d.value,v.threadId)));const T=tr(c);if(T){const We=O.get(T.turnId);We&&O.delete(T.turnId);const Xt=ot((Jr=ye(c.params))==null?void 0:Jr.durationMs)??ot((ai=ye((ii=ye(c.params))==null?void 0:ii.turn))==null?void 0:ai.durationMs)??(typeof T.startedAtMs=="number"?T.completedAtMs-T.startedAtMs:null)??(We?T.completedAtMs-We.startedAtMs:null),Bn=typeof Xt=="number"?Math.max(0,Xt):0;Pe(T.threadId,{turnId:T.turnId,durationMs:Bn}),ne.value[T.threadId]&&(ne.value=It(ne.value,T.threadId)),Me(T.threadId,!1),Ve(T.threadId,null),De(T.threadId),ni(T.threadId)}const F=Ut(c);if(F){const We=(T==null?void 0:T.threadId)||rt(c);We&&qe(We,F),xe.value=F}else T&&qe(T.threadId,null);const U=rt(c);if(!U||U!==n.value)return;Q(c);const ke=Be(c);if(ke){const We=(s.value[U]??[]).find(Bn=>Bn.id===ke.messageId),Xt=`${(We==null?void 0:We.text)??""}${ke.delta}`;Y(U,{id:ke.messageId,role:"assistant",text:Xt,messageType:"agentMessage.live"})}const ce=vt(c);ce&&Y(U,ce),nr(c);const He=_(c);if(He&&Ce(U,He.delta),R(c)){const We=o.value[U]??"";We.trim().length>0&&!We.endsWith(`
35
+
36
+ `)&&me(U,`${We}
37
+
38
+ `)}N(c);const Jt=Ot(c);Jt&&(j(U,Jt),Ve(U,{label:"Running command",details:[((li=Jt.commandExecution)==null?void 0:li.command)??""]}));const bn=Ln(c);if(bn){const We=(i.value[U]??[]).find(Xt=>Xt.id===bn.itemId);We!=null&&We.commandExecution&&j(U,{...We,commandExecution:{...We.commandExecution,aggregatedOutput:`${We.commandExecution.aggregatedOutput}${bn.delta}`}})}const _n=rr(c);if(_n&&j(U,_n),Oe(c)&&(A&&n.value&&k(n.value,{scrollTop:0,isAtBottom:!0,scrollRatio:1}),Ge(U)),c.method==="turn/completed"){A=!1,Ge(U),i.value[U]&&(i.value=It(i.value,U));const We=rt(c);We&&(Me(We,!1),Ve(We,null),De(We),ni(We))}}function Vt(c){const h=rt(c);h&&de.add(h);const v=c.method;(v.startsWith("thread/")||v.startsWith("turn/")||v.startsWith("item/"))&&(we=!0),!(Fe!==null||typeof window>"u")&&(Fe=window.setTimeout(()=>{Fe=null,or()},eo))}async function Dn(c){if(!E){E=!0;try{const h=await Ea(),v=[];for(const T of h.order){const F=ro(T);v.includes(F)||v.push(F)}if(v.length>0){const T=rs(v,c);Gn(C.value,T)||(C.value=T,ar(C.value))}if(Object.keys(h.labels).length>0){const T={...B.value};let F=!1;for(const[U,ke]of Object.entries(h.labels)){const ce=ro(U);T[ce]!==ke&&(T[ce]=ke,F=!0)}F&&(B.value=T,to(T))}}catch{}}}async function sr(){if(!(Object.keys(te.value).length>0))try{const c=await ab();Object.keys(c.titles).length>0&&(te.value=c.titles)}catch{}}async function kc(c,h,v){if(te.value[c])return;const T=h.trim();if(!T)return;const F=T.length>300?T.slice(0,300):T;try{const U=await lb(F,v);if(!U||te.value[c])return;te.value={...te.value,[c]:U},ie(),Aa(c,U)}catch{}}async function Yr(){var c;Ie.value||(ue.value=!0);try{const[h]=await Promise.all([qw(),sr()]);await Dn(h);const v=rs(C.value,h);Gn(C.value,v)||(C.value=v,ar(C.value));const T=no(h,C.value),F=$b(t.value,T,a.value);t.value=ss(t.value,F),a.value=Tt(a.value,new Set(An(t.value).map(ce=>ce.id))),ie(),Ie.value=!0;const U=An(e.value);be(U),U.some(ce=>ce.id===n.value)||H(((c=U[0])==null?void 0:c.id)??"")}finally{ue.value=!1}}async function _r(c,h={}){if(!c)return;const v=M.value[c]===!0,T=h.silent!==!0&&!v;T&&(J.value=!0);try{W.value[c]!==!0&&(await Ca(c),W.value={...W.value,[c]:!0});const F=await Ww(c),U=r.value[c]??[],ke=bb(U,F,{preserveMissing:h.silent===!0});P(c,ke);const ce=s.value[c]??[],He=_b(ce,F);I(c,He),ge(c,F),M.value={...M.value,[c]:!0};const bt=pt(c);bt&&(z.value={...z.value,[c]:bt}),Se(c)}finally{T&&(J.value=!1)}}async function ei(){try{const c=t.value.flatMap(h=>h.threads.map(v=>v.cwd)).filter(Boolean);ee.value=await cb(c.length>0?[...new Set(c)]:void 0)}catch{}}async function Tc(){xe.value="";try{await Yr(),await Promise.all([Z(),ei()]),await _r(n.value)}catch(c){xe.value=c instanceof Error?c.message:"Unknown application error"}}async function Sc(c){H(c);try{await _r(c)}catch(h){xe.value=h instanceof Error?h.message:"Unknown application error"}}async function xc(c){try{await Yw(c),await Yr(),n.value===c&&await _r(n.value)}catch(h){xe.value=h instanceof Error?h.message:"Unknown application error"}}async function ti(c,h=[],v=[],T="steer"){const F=n.value,U=c.trim();if(!F||!U&&h.length===0)return;const ke=a.value[F]===!0;if(ke&&T==="queue"){const ce=l.value[F]??[],He=`q-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;l.value={...l.value,[F]:[...ce,{id:He,text:U,imageUrls:h,skills:v}]};return}if(ke){A=!0,Qr(F,U,h,v).catch(ce=>{const He=ce instanceof Error?ce.message:"Unknown application error";qe(F,He),xe.value=He});return}xe.value="",A=!0,Pe(F,null),Ve(F,{label:"Thinking",details:X(f.value,m.value)}),qe(F,null),Me(F,!0);try{await Qr(F,U,h,v)}catch(ce){A=!1,Me(F,!1),Ve(F,null);const He=ce instanceof Error?ce.message:"Unknown application error";throw qe(F,He),xe.value=He,ce}}async function Cc(c,h,v=[],T=[]){const F=c.trim(),U=h.trim(),ke=f.value.trim();if(!F&&v.length===0)return"";Re.value=!0,xe.value="";let ce="";try{if(ce=await Xw(U||void 0,ke||void 0),!ce)return"";se(ce,U,F||"[Image]"),W.value={...W.value,[ce]:!0},H(ce),A=!0,Pe(ce,null),Ve(ce,{label:"Thinking",details:X(f.value,m.value)}),qe(ce,null),Me(ce,!0);const He=ce,bt=U||null,Jt=F;return Qr(ce,F,v,T).catch(bn=>{A=!1,Me(ce,!1),Ve(ce,null);const _n=bn instanceof Error?bn.message:"Unknown application error";qe(ce,_n),xe.value=_n}).finally(()=>{Re.value=!1}),kc(He,Jt,bt),ce}catch(He){A=!1,ce&&(Me(ce,!1),Ve(ce,null));const bt=He instanceof Error?He.message:"Unknown application error";throw ce&&qe(ce,bt),xe.value=bt,Re.value=!1,He}}async function Qr(c,h,v=[],T=[]){const F=f.value.trim(),U=m.value;try{W.value[c]!==!0&&await Ca(c),await Zw(c,h,v,F||void 0,U||void 0,T.length>0?T:void 0),W.value={...W.value,[c]:!0},de.add(c),we=!0,await or()}catch(ke){throw ke}}async function ni(c){const h=l.value[c];if(!h||h.length===0)return;const[v,...T]=h;l.value=T.length>0?{...l.value,[c]:T}:It(l.value,c),Re.value=!0,xe.value="",A=!0,Pe(c,null),Ve(c,{label:"Thinking",details:X(f.value,m.value)}),qe(c,null),Me(c,!0);try{await Qr(c,v.text,v.imageUrls,v.skills)}catch{Me(c,!1),Ve(c,null)}finally{Re.value=!1}}async function Ec(){const c=n.value;if(!c||a.value[c]!==!0)return;const h=ne.value[c];Ue.value=!0,xe.value="";try{await eb(c,h),Me(c,!1),Ve(c,null),qe(c,null),ne.value[c]&&(ne.value=It(ne.value,c)),de.add(c),we=!0,await or()}catch(v){const T=v instanceof Error?v.message:"Failed to interrupt active turn";qe(c,T),xe.value=T}finally{Ue.value=!1}}async function Ac(c){const h=n.value;if(!h||Ze.value)return;const T=(r.value[h]??[]).reduce((U,ke)=>typeof ke.turnIndex=="number"&&ke.turnIndex>U?ke.turnIndex:U,-1);if(T<0||c>T)return;const F=T-c+1;if(!(F<1)){Ze.value=!0,xe.value="";try{const U=await Qw(h,F);P(h,U),I(h,[]),Ge(h),i.value[h]&&(i.value=It(i.value,h)),Pe(h,null),Ve(h,null),qe(h,null),we=!0,await or()}catch(U){xe.value=U instanceof Error?U.message:"Failed to rollback thread"}finally{Ze.value=!1}}}function Ic(c,h){c.length===0||(B.value[c]??"")===h||(B.value={...B.value,[c]:h},to(B.value))}function Rc(c){var F;if(c.length===0)return;const h=C.value.filter(U=>U!==c);if(Gn(C.value,h)||(C.value=h,ar(C.value)),t.value=t.value.filter(U=>U.projectName!==c),B.value[c]!==void 0){const U={...B.value};delete U[c],B.value=U,to(U)}ie();const v=An(e.value);be(v),v.some(U=>U.id===n.value)||H(((F=v[0])==null?void 0:F.id)??""),Ms()}function $c(c,h){if(c.length===0||t.value.length===0)return;const v=t.value.map(He=>He.projectName),T=v.indexOf(c);if(T===-1)return;const F=Math.max(0,Math.min(h,v.length-1)),U=yb(v,T,F);if(U===v)return;const ke=rs(U,t.value);C.value=ke,ar(C.value);const ce=no(t.value,C.value);t.value=ss(t.value,ce),ie(),Ms()}function Pc(c){const h=c.trim();if(!h)return;const v=[h,...C.value.filter(F=>F!==h)];if(Gn(C.value,v))return;C.value=v,ar(C.value);const T=no(t.value,C.value);t.value=ss(t.value,T),ie(),Ms()}async function Ms(){var c,h;try{const v=await Ea(),T=new Map;for(const ke of v.order){const ce=ro(ke);T.has(ce)||T.set(ce,ke)}for(const ke of t.value){const ce=((h=(c=ke.threads[0])==null?void 0:c.cwd)==null?void 0:h.trim())??"";ce&&T.set(ke.projectName,ce)}const F=[];for(const ke of C.value){const ce=T.get(ke);ce&&!F.includes(ce)&&F.push(ce)}for(const ke of v.order)F.includes(ke)||F.push(ke);const U=v.active.filter(ke=>F.includes(ke));U.length===0&&F.length>0&&U.push(F[0]),await sb({order:F,labels:v.labels,active:U})}catch{}}async function Mc(){if(!Ne.value){Ne.value=!0;try{if(await Yr(),!n.value)return;const c=n.value,h=pt(c),v=z.value[c]??"",T=h.length>0&&h!==v;(a.value[c]===!0||T)&&await _r(c,{silent:!0})}catch{}finally{Ne.value=!1}}}async function or(){if(Ne.value){typeof window<"u"&&Fe===null&&(Fe=window.setTimeout(()=>{Fe=null,or()},eo));return}Ne.value=!0;const c=we,h=new Set(de);we=!1,de.clear();try{c&&await Yr();const v=n.value;if(!v)return;const T=h.has(v),F=a.value[v]===!0,U=pt(v),ke=z.value[v]??"",ce=U.length>0&&U!==ke;(T||F||ce||c)&&await _r(v,{silent:!0})}catch{}finally{Ne.value=!1,(we||de.size>0)&&typeof window<"u"&&Fe===null&&(Fe=window.setTimeout(()=>{Fe=null,or()},eo))}}function Nc(){typeof window>"u"||Xe||(et.value&&si(),Oc(),Xe=Kw(c=>{mt(c),Vt(c)}))}async function Oc(){try{const c=await zw();for(const h of c){const v=on(h);v&&Xn(v)}}catch{}}async function jc(c){try{await Gw(c.id,{result:c.result,error:c.error}),jn(c.id)}catch(h){xe.value=h instanceof Error?h.message:"Failed to reply to server request"}}function ri(c={}){const h=c.updatePreference??!0;ct!==null&&typeof window<"u"&&(window.clearInterval(ct),ct=null),oe!==null&&typeof window<"u"&&(window.clearInterval(oe),oe=null),h&&(et.value=!1,$a(!1)),tt.value=Math.floor(Cr/1e3)}function si(){typeof window>"u"||ct!==null||oe!==null||(et.value=!0,$a(!0),tt.value=Math.floor(Cr/1e3),ct=window.setInterval(()=>{tt.value=Math.floor(Cr/1e3),Mc()},Cr),oe=window.setInterval(()=>{tt.value=Math.max(0,tt.value-1)},1e3))}function Lc(){if(et.value){ri();return}si()}function Dc(){ri({updatePreference:!1}),Xe&&(Xe(),Xe=null),we=!1,de.clear(),O.clear(),Fe!==null&&typeof window<"u"&&(window.clearTimeout(Fe),Fe=null),A=!1,r.value={},s.value={},o.value={},i.value={},fe.value={},q.value={},le.value={},ne.value={},l.value={}}const Bc=ae(()=>{const c=n.value;return c?l.value[c]??[]:[]});function oi(c){const h=n.value;if(!h)return;const v=l.value[h];if(!v)return;const T=v.filter(F=>F.id!==c);l.value=T.length>0?{...l.value,[h]:T}:It(l.value,h)}function Fc(c){const h=n.value;if(!h)return;const v=l.value[h];if(!v)return;const T=v.find(F=>F.id===c);T&&(oi(c),ti(T.text,T.imageUrls,T.skills,"steer"))}return{projectGroups:e,projectDisplayNameById:B,selectedThread:_e,selectedThreadScrollState:p,selectedThreadServerRequests:g,selectedLiveOverlay:S,selectedThreadId:n,availableModelIds:u,selectedModelId:f,selectedReasoningEffort:m,installedSkills:ee,messages:D,isLoadingThreads:ue,isLoadingMessages:J,isSendingMessage:Re,isInterruptingTurn:Ue,isAutoRefreshEnabled:et,autoRefreshSecondsLeft:tt,error:xe,refreshAll:Tc,refreshSkills:ei,selectThread:Sc,setThreadScrollState:k,archiveThreadById:xc,sendMessageToSelectedThread:ti,sendMessageToNewThread:Cc,interruptSelectedThreadTurn:Ec,rollbackSelectedThread:Ac,isRollingBack:Ze,selectedThreadQueuedMessages:Bc,removeQueuedMessage:oi,steerQueuedMessage:Fc,setSelectedModelId:L,setSelectedReasoningEffort:re,respondToPendingServerRequest:jc,renameProject:Ic,removeProject:Rc,reorderProject:$c,pinProjectToTop:Pc,toggleAutoRefreshTimer:Lc,startPolling:Nc,stopPolling:Dc}}const Ob={class:"sidebar-root"},jb=["aria-pressed"],Lb={key:1,class:"sidebar-search-bar"},Db={class:"content-root"},Bb={class:"content-body"},Fb={key:1,class:"content-grid"},Hb={class:"new-thread-empty"},Ub={key:2,class:"content-grid"},Vb={class:"content-thread"},qb={class:"composer-with-queue"},Wb={class:"build-badge","aria-label":"Worktree name"},Na="codex-web-local.sidebar-collapsed.v1",Kb=kt({__name:"App",setup(e){const t="codex-web-local",{projectGroups:n,projectDisplayNameById:r,selectedThread:s,selectedThreadScrollState:o,selectedThreadServerRequests:i,selectedLiveOverlay:a,selectedThreadId:l,availableModelIds:d,selectedModelId:u,selectedReasoningEffort:f,installedSkills:m,messages:y,isLoadingThreads:$,isLoadingMessages:C,isInterruptingTurn:B,isAutoRefreshEnabled:z,autoRefreshSecondsLeft:M,refreshAll:W,refreshSkills:q,selectThread:fe,setThreadScrollState:le,archiveThreadById:ne,sendMessageToSelectedThread:pe,sendMessageToNewThread:te,interruptSelectedThreadTurn:ee,rollbackSelectedThread:ue,isRollingBack:J,selectedThreadQueuedMessages:Re,removeQueuedMessage:Ue,steerQueuedMessage:Ze,setSelectedModelId:xe,setSelectedReasoningEffort:Ne,respondToPendingServerRequest:Ie,renameProject:et,removeProject:tt,reorderProject:Xe,pinProjectToTop:Fe,toggleAutoRefreshTimer:ct,startPolling:oe,stopPolling:we}=Nb(),de=xh(),E=Sh(),{isMobile:A}=cc(),O=V(!1),K=V(!1),_e=V(""),p=V(Q()),g=V(""),S=V(!1),D=V(null),H=V("New Project (1)"),L=ae(()=>{const j=de.params.threadId;return typeof j=="string"?j:""}),re=ae(()=>{const j=new Set;for(const ge of n.value)for(const Oe of ge.threads)j.add(Oe.id);return j}),X=ae(()=>de.name==="home"),Z=ae(()=>de.name==="skills"),G=ae(()=>{var j;return Z.value?"Skills":X.value?"New thread":((j=s.value)==null?void 0:j.title)??"Choose a thread"}),ie=ae(()=>z.value?`Auto refresh in ${String(M.value)}s`:"Enable 4s refresh"),se=ae(()=>y.value.filter(j=>{const ge=vt(j.messageType,j.role);return ge==="worked"?!0:!(ge==="turnActivity.live"||ge==="turnError.live"||ge==="agentReasoning.live")})),be=ae(()=>a.value),Se=ae(()=>X.value?"__new-thread__":l.value),Pe=ae(()=>{var j;return!X.value&&((j=s.value)==null?void 0:j.inProgress)===!0}),Me=ae(()=>{var mt,Vt;const j=[],ge=new Set;for(const Dn of n.value){const sr=((Vt=(mt=Dn.threads[0])==null?void 0:mt.cwd)==null?void 0:Vt.trim())??"";!sr||ge.has(sr)||(ge.add(sr),j.push({value:sr,label:r.value[Dn.projectName]??Dn.projectName}))}const Oe=_e.value.trim();return Oe&&!ge.has(Oe)&&j.unshift({value:Oe,label:tr(Oe)}),j});Nn(()=>{window.addEventListener("keydown",Ut),Ot(),Lt()}),Es(()=>{window.removeEventListener("keydown",Ut),we()});function De(){q()}function Ve(){S.value=!S.value,S.value?Wt(()=>{var j;return(j=D.value)==null?void 0:j.focus()}):g.value=""}function qe(){var j;g.value="",(j=D.value)==null||j.focus()}function pt(j){j.key==="Escape"&&(S.value=!1,g.value="")}function k(j){j&&(de.name==="thread"&&L.value===j||(E.push({name:"thread",params:{threadId:j}}),A.value&&rt(!0)))}function P(j){ne(j)}function I(j){var mt,Vt;const ge=n.value.find(Dn=>Dn.projectName===j),Oe=((Vt=(mt=ge==null?void 0:ge.threads[0])==null?void 0:mt.cwd)==null?void 0:Vt.trim())??"";Oe&&(_e.value=Oe),A.value&&rt(!0),!X.value&&E.push({name:"home"})}function Y(){var ge,Oe;const j=((Oe=(ge=s.value)==null?void 0:ge.cwd)==null?void 0:Oe.trim())??"";j&&(_e.value=j),A.value&&rt(!0),!X.value&&E.push({name:"home"})}function me(j){et(j.projectName,j.displayName)}function Ce(j){tt(j)}function Ge(j){Xe(j.projectName,j.toIndex)}function ye(j){le(j.threadId,j.state)}function he(j){Ie(j)}function ot(){ct()}function rt(j){p.value!==j&&(p.value=j,Be(j))}function Ut(j){j.defaultPrevented||!j.ctrlKey&&!j.metaKey||j.shiftKey||j.altKey||j.key.toLowerCase()==="b"&&(j.preventDefault(),rt(!p.value))}function on(j){const ge=j.text;if(X.value){rr(ge,j.imageUrls,j.skills);return}pe(ge,j.imageUrls,j.skills,j.mode)}function Xn(j){_e.value=j.trim()}async function jn(j){const ge=j.trim();if(!ge)return;const Oe=br(ge),mt=Oe?ge:an(Zn(),ge);if(mt)try{const Vt=await ob(mt,{createIfMissing:!Oe,label:Oe?"":ge});Vt&&(_e.value=Vt,Fe(tr(Vt)),Lt())}catch{}}function br(j){return j?j.startsWith("~/")||j.startsWith("/")?!0:/^[a-zA-Z]:[\\/]/.test(j):!1}async function Lt(){const j=Zn();if(!j){H.value="New Project (1)";return}try{const ge=await ib(j);H.value=ge.name||"New Project (1)"}catch{H.value="New Project (1)"}}function Zn(){var Oe,mt;const j=_e.value.trim();if(j)return er(j);const ge=((mt=(Oe=Me.value[0])==null?void 0:Oe.value)==null?void 0:mt.trim())??"";return ge?er(ge):""}function er(j){const ge=j.trim().replace(/\/+$/,"");if(!ge)return"";const Oe=ge.lastIndexOf("/");return Oe<=0?"":ge.slice(0,Oe)}function tr(j){const ge=j.trim().replace(/\/+$/,"");if(!ge)return"";const Oe=ge.lastIndexOf("/");return Oe<0?ge:ge.slice(Oe+1)}function an(j,ge){const Oe=j.trim().replace(/\/+$/,""),mt=ge.trim().replace(/^\/+/,"");return!Oe||!mt?"":`${Oe}/${mt}`}function nr(j){xe(j)}function _(j){Ne(j)}function R(){ee()}function N(j){ue(j.turnIndex)}function Q(){return typeof window>"u"?!1:window.localStorage.getItem(Na)==="1"}function Be(j){typeof window>"u"||window.localStorage.setItem(Na,j?"1":"0")}function vt(j,ge){const Oe=(j??"").trim();return Oe.length>0?Oe:ge.trim()||"message"}async function Ot(){await W(),K.value=!0,await Ln(),oe()}async function Ln(){if(!O.value){O.value=!0;try{if(de.name==="home"||de.name==="skills"){l.value!==""&&await fe("");return}if(de.name==="thread"){const j=L.value;if(!j)return;if(!re.value.has(j)){await E.replace({name:"home"});return}l.value!==j&&await fe(j);return}}finally{O.value=!1}}}dt(()=>[de.name,L.value,$.value,re.value.has(L.value),l.value],async()=>{K.value&&await Ln()}),dt(()=>l.value,async j=>{if(K.value&&!O.value&&!(X.value||Z.value)){if(!j){de.name!=="home"&&await E.replace({name:"home"});return}de.name==="thread"&&L.value===j||await E.replace({name:"thread",params:{threadId:j}})}}),dt(()=>Me.value,j=>{if(j.length===0){_e.value="";return}j.some(Oe=>Oe.value===_e.value)||(_e.value=j[0].value),Lt()},{immediate:!0}),dt(()=>_e.value,()=>{Lt()}),dt(A,j=>{j&&!p.value&&rt(!0)});async function rr(j,ge=[],Oe=[]){try{const mt=await te(j,_e.value,ge,Oe);if(!mt)return;await E.replace({name:"thread",params:{threadId:mt}})}catch{}}return(j,ge)=>(b(),x(Le,null,[Ae($h,{"is-sidebar-collapsed":p.value,onCloseSidebar:ge[4]||(ge[4]=Oe=>rt(!0))},{sidebar:nt(()=>[w("section",Ob,[p.value?ve("",!0):(b(),at(Ta,{key:0,class:"sidebar-thread-controls-host","is-sidebar-collapsed":p.value,"is-auto-refresh-enabled":Ee(z),"auto-refresh-button-label":ie.value,"show-new-thread-button":!0,onToggleSidebar:ge[0]||(ge[0]=Oe=>rt(!p.value)),onToggleAutoRefresh:ot,onStartNewThread:Y},{default:nt(()=>[w("button",{class:"sidebar-search-toggle",type:"button","aria-pressed":S.value,"aria-label":"Search threads",title:"Search threads",onClick:Ve},[Ae(xo,{class:"sidebar-search-toggle-icon"})],8,jb)]),_:1},8,["is-sidebar-collapsed","is-auto-refresh-enabled","auto-refresh-button-label"])),!p.value&&S.value?(b(),x("div",Lb,[Ae(xo,{class:"sidebar-search-bar-icon"}),Rn(w("input",{ref_key:"sidebarSearchInputRef",ref:D,"onUpdate:modelValue":ge[1]||(ge[1]=Oe=>g.value=Oe),class:"sidebar-search-input",type:"text",placeholder:"Filter threads...",onKeydown:pt},null,544),[[Pn,g.value]]),g.value.length>0?(b(),x("button",{key:0,class:"sidebar-search-clear",type:"button","aria-label":"Clear search",onClick:qe},[Ae(Xo,{class:"sidebar-search-clear-icon"})])):ve("",!0)])):ve("",!0),p.value?ve("",!0):(b(),x("button",{key:2,class:ut(["sidebar-skills-link",{"is-active":Z.value}]),type:"button",onClick:ge[2]||(ge[2]=Oe=>{Ee(E).push({name:"skills"}),Ee(A)&&rt(!0)})}," Skills Hub ",2)),p.value?ve("",!0):(b(),at(hm,{key:3,groups:Ee(n),"project-display-name-by-id":Ee(r),"selected-thread-id":Ee(l),"is-loading":Ee($),"search-query":g.value,onSelect:k,onArchive:P,onStartNewThread:I,onRenameProject:me,onRemoveProject:Ce,onReorderProject:Ge},null,8,["groups","project-display-name-by-id","selected-thread-id","is-loading","search-query"]))])]),content:nt(()=>[w("section",Db,[Ae(wm,{title:G.value},{leading:nt(()=>[p.value||Ee(A)?(b(),at(Ta,{key:0,class:"sidebar-thread-controls-header-host","is-sidebar-collapsed":p.value,"is-auto-refresh-enabled":Ee(z),"auto-refresh-button-label":ie.value,"show-new-thread-button":!0,onToggleSidebar:ge[3]||(ge[3]=Oe=>rt(!p.value)),onToggleAutoRefresh:ot,onStartNewThread:Y},null,8,["is-sidebar-collapsed","is-auto-refresh-enabled","auto-refresh-button-label"])):ve("",!0)]),_:1},8,["title"]),w("section",Bb,[Z.value?(b(),at(lw,{key:0,onSkillsChanged:De})):X.value?(b(),x("div",Fb,[w("div",Hb,[ge[5]||(ge[5]=w("p",{class:"new-thread-hero"},"Let's build",-1)),Ae(So,{class:"new-thread-folder-dropdown","model-value":_e.value,options:Me.value,placeholder:"Choose folder","enable-search":!0,"search-placeholder":"Quick search project","show-add-action":!0,"add-action-label":"+ Add new project","default-add-value":H.value,"add-placeholder":"Project name or absolute path",disabled:!1,"onUpdate:modelValue":Xn,onAdd:jn},null,8,["model-value","options","default-add-value"])]),Ae(_a,{"active-thread-id":Se.value,models:Ee(d),"selected-model":Ee(u),"selected-reasoning-effort":Ee(f),skills:Ee(m),"is-turn-in-progress":!1,"is-interrupting-turn":!1,onSubmit:on,"onUpdate:selectedModel":nr,"onUpdate:selectedReasoningEffort":_},null,8,["active-thread-id","models","selected-model","selected-reasoning-effort","skills"])])):(b(),x("div",Ub,[w("div",Vb,[Ae(Gg,{messages:se.value,"is-loading":Ee(C),"active-thread-id":Se.value,"scroll-state":Ee(o),"live-overlay":be.value,"pending-requests":Ee(i),"is-turn-in-progress":Pe.value,"is-rolling-back":Ee(J),onUpdateScrollState:ye,onRespondServerRequest:he,onRollback:N},null,8,["messages","is-loading","active-thread-id","scroll-state","live-overlay","pending-requests","is-turn-in-progress","is-rolling-back"])]),w("div",qb,[Ae(fy,{messages:Ee(Re),onSteer:Ee(Ze),onDelete:Ee(Ue)},null,8,["messages","onSteer","onDelete"]),Ae(_a,{"active-thread-id":Se.value,models:Ee(d),"selected-model":Ee(u),"selected-reasoning-effort":Ee(f),skills:Ee(m),"is-turn-in-progress":Pe.value,"is-interrupting-turn":Ee(B),"has-queue-above":Ee(Re).length>0,onSubmit:on,"onUpdate:selectedModel":nr,"onUpdate:selectedReasoningEffort":_,onInterrupt:R},null,8,["active-thread-id","models","selected-model","selected-reasoning-effort","skills","is-turn-in-progress","is-interrupting-turn","has-queue-above"])])]))])])]),_:1},8,["is-sidebar-collapsed"]),w("div",Wb," WT "+Te(Ee(t)),1)],64))}}),Gb=Ke(Kb,[["__scopeId","data-v-27b02845"]]),so={render:()=>null},zb=Th({history:th(),routes:[{path:"/",name:"home",component:so},{path:"/thread/:threadId",name:"thread",component:so},{path:"/skills",name:"skills",component:so},{path:"/new-thread",redirect:{name:"home"}},{path:"/:pathMatch(.*)*",redirect:{name:"home"}}]});mf(Gb).use(zb).mount("#app");