Files
soft_usite/public/orchestrator/assets/index-DPluLgCZ.js
T
Lizandro GuarnizoandClaude Sonnet 5 5b78f6677c feat(umind): el cliente administra sus agentes desde el portal
Acá es donde uMind deja de ser una herramienta interna: el cliente entra
a /portal/studio con su sesión de portal y gestiona lo suyo.

- UmindScopePortal/UmindScopeStaff es el ÚNICO punto donde se decide el
  alcance. El del cliente sale de GetClienteIDsForPortalUser, el mismo
  que ya autoriza el resto del portal. nil = staff sin restricción,
  slice vacío = no ve nada; una ruta sin scope también cae en "no ve
  nada" para que olvidarse el middleware falle visible y no abra todo.
- Un solo set de handlers montado bajo /app/umind y /portal/umind
  (RegistrarRutasUmind). Duplicarlos sería duplicar las chances de
  olvidar un chequeo.
- Guarda de acceso en TODOS los handlers, incluidos los sub-recursos que
  llegan por :id (documento, tool, canal, conexión): hay que cargarlos
  para saber de quién son, si no un cliente podría borrar el canal de
  otro adivinando el id. Responden 404, no 403: un 403 confirmaría que
  el recurso existe.
- Cierra un bug preexistente: las lecturas GET /app/umind/* no tenían
  SoloAdmin ni pasaban por MenuMiddleware, así que cualquier usuario de
  staff podía leer los tenants de todos los clientes.
- Límite de agentes por plan (409 con mensaje claro). Un tenant sin plan
  no tiene límite: cortarles de golpe sería peor que dejarlos como estaban.
- /umind/ai-configs reemplaza con alcance a /app/api/ai-config/select,
  que devolvía TODAS las configs del sistema.
- El SPA deduce por la URL si es staff o cliente (base del router,
  prefijo de API y URL de login) y oculta lo que es solo de staff.
- Test de aislamiento entre clientes: 7 casos, incluido que un scope
  vacío no se confunda con staff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 11:51:12 -05:00

27 lines
137 KiB
JavaScript

(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)}})();/**
* @vue/shared v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Kr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ge={},Wt=[],dt=()=>{},io=()=>!1,Jn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Yn=e=>e.startsWith("onUpdate:"),Ce=Object.assign,Gr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ii=Object.prototype.hasOwnProperty,le=(e,t)=>Ii.call(e,t),q=Array.isArray,qt=e=>Sn(e)==="[object Map]",nn=e=>Sn(e)==="[object Set]",fs=e=>Sn(e)==="[object Date]",z=e=>typeof e=="function",xe=e=>typeof e=="string",ft=e=>typeof e=="symbol",de=e=>e!==null&&typeof e=="object",ao=e=>(de(e)||z(e))&&z(e.then)&&z(e.catch),lo=Object.prototype.toString,Sn=e=>lo.call(e),Oi=e=>Sn(e).slice(8,-1),uo=e=>Sn(e)==="[object Object]",Wr=e=>xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,dn=Kr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Qn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Ti=/-\w/g,Me=Qn(e=>e.replace(Ti,t=>t.slice(1).toUpperCase())),Pi=/\B([A-Z])/g,Ht=Qn(e=>e.replace(Pi,"-$1").toLowerCase()),Xn=Qn(e=>e.charAt(0).toUpperCase()+e.slice(1)),pr=Qn(e=>e?`on${Xn(e)}`:""),ut=(e,t)=>!Object.is(e,t),Vn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},co=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Zn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let gs;const er=()=>gs||(gs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function tr(e){if(q(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=xe(r)?Vi(r):tr(r);if(s)for(const o in s)t[o]=s[o]}return t}else if(xe(e)||de(e))return e}const Ni=/;(?![^(]*\))/g,Di=/:([^]+)/,Mi=/\/\*[^]*?\*\//g;function Vi(e){const t={};return e.replace(Mi,"").split(Ni).forEach(n=>{if(n){const r=n.split(Di);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Se(e){let t="";if(xe(e))t=e;else if(q(e))for(let n=0;n<e.length;n++){const r=Se(e[n]);r&&(t+=r+" ")}else if(de(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const $i="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ji=Kr($i);function fo(e){return!!e||e===""}function Ui(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=rn(e[r],t[r]);return n}function rn(e,t){if(e===t)return!0;let n=fs(e),r=fs(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=ft(e),r=ft(t),n||r)return e===t;if(n=q(e),r=q(t),n||r)return n&&r?Ui(e,t):!1;if(n=de(e),r=de(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||!rn(e[i],t[i]))return!1}}return String(e)===String(t)}function qr(e,t){return e.findIndex(n=>rn(n,t))}const go=e=>!!(e&&e.__v_isRef===!0),K=e=>xe(e)?e:e==null?"":q(e)||de(e)&&(e.toString===lo||!z(e.toString))?go(e)?K(e.value):JSON.stringify(e,po,2):String(e),po=(e,t)=>go(t)?po(e,t.value):qt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[hr(r,o)+" =>"]=s,n),{})}:nn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>hr(n))}:ft(t)?hr(t):de(t)&&!q(t)&&!uo(t)?String(t):t,hr=(e,t="")=>{var n;return ft(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let we;class Li{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&we&&(we.active?(this.parent=we,this.index=(we.scopes||(we.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[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){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}const r=this.effects.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}}run(t){if(this._active){const n=we;try{return we=this,t()}finally{we=n}}}on(){++this._on===1&&(this.prevScope=we,we=this)}off(){if(this._on>0&&--this._on===0){if(we===this)we=this.prevScope;else{let t=we;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.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){const s=this.scopes.slice();for(n=0,r=s.length;n<r;n++)s[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 Fi(){return we}let pe;const mr=new WeakSet;class ho{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,we&&(we.active?we.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,mr.has(this)&&(mr.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ps(this),xo(this);const t=pe,n=ze;pe=this,ze=!0;try{return this.fn()}finally{vo(this),pe=t,ze=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Yr(t);this.deps=this.depsTail=void 0,ps(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?mr.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Or(this)&&this.run()}get dirty(){return Or(this)}}let mo=0,fn,gn;function yo(e,t=!1){if(e.flags|=8,t){e.next=gn,gn=e;return}e.next=fn,fn=e}function zr(){mo++}function Jr(){if(--mo>0)return;if(gn){let t=gn;for(gn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;fn;){let t=fn;for(fn=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 xo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vo(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Yr(r),Hi(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Or(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function bo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===xn)||(e.globalVersion=xn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Or(e))))return;e.flags|=2;const t=e.dep,n=pe,r=ze;pe=e,ze=!0;try{xo(e);const s=e.fn(e._value);(t.version===0||ut(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{pe=n,ze=r,vo(e),e.flags&=-3}}function Yr(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)Yr(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Hi(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ze=!0;const _o=[];function wt(){_o.push(ze),ze=!1}function Et(){const e=_o.pop();ze=e===void 0?!0:e}function ps(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=pe;pe=void 0;try{t()}finally{pe=n}}}let xn=0;class Bi{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 Qr{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(!pe||!ze||pe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==pe)n=this.activeLink=new Bi(pe,this),pe.deps?(n.prevDep=pe.depsTail,pe.depsTail.nextDep=n,pe.depsTail=n):pe.deps=pe.depsTail=n,ko(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=pe.depsTail,n.nextDep=void 0,pe.depsTail.nextDep=n,pe.depsTail=n,pe.deps===n&&(pe.deps=r)}return n}trigger(t){this.version++,xn++,this.notify(t)}notify(t){zr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Jr()}}}function ko(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ko(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Tr=new WeakMap,Ut=Symbol(""),Pr=Symbol(""),vn=Symbol("");function Re(e,t,n){if(ze&&pe){let r=Tr.get(e);r||Tr.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Qr),s.map=r,s.key=n),s.track()}}function bt(e,t,n,r,s,o){const i=Tr.get(e);if(!i){xn++;return}const a=l=>{l&&l.trigger()};if(zr(),t==="clear")i.forEach(a);else{const l=q(e),d=l&&Wr(n);if(l&&n==="length"){const u=Number(r);i.forEach((p,y)=>{(y==="length"||y===vn||!ft(y)&&y>=u)&&a(p)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),d&&a(i.get(vn)),t){case"add":l?d&&a(i.get("length")):(a(i.get(Ut)),qt(e)&&a(i.get(Pr)));break;case"delete":l||(a(i.get(Ut)),qt(e)&&a(i.get(Pr)));break;case"set":qt(e)&&a(i.get(Ut));break}}Jr()}function Bt(e){const t=ae(e);return t===e?t:(Re(t,"iterate",vn),We(e)?t:t.map(Qe))}function nr(e){return Re(e=ae(e),"iterate",vn),e}function it(e,t){return Ct(e)?Yt(Lt(e)?Qe(t):t):Qe(t)}const Ki={__proto__:null,[Symbol.iterator](){return yr(this,Symbol.iterator,e=>it(this,e))},concat(...e){return Bt(this).concat(...e.map(t=>q(t)?Bt(t):t))},entries(){return yr(this,"entries",e=>(e[1]=it(this,e[1]),e))},every(e,t){return mt(this,"every",e,t,void 0,arguments)},filter(e,t){return mt(this,"filter",e,t,n=>n.map(r=>it(this,r)),arguments)},find(e,t){return mt(this,"find",e,t,n=>it(this,n),arguments)},findIndex(e,t){return mt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return mt(this,"findLast",e,t,n=>it(this,n),arguments)},findLastIndex(e,t){return mt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return mt(this,"forEach",e,t,void 0,arguments)},includes(...e){return xr(this,"includes",e)},indexOf(...e){return xr(this,"indexOf",e)},join(e){return Bt(this).join(e)},lastIndexOf(...e){return xr(this,"lastIndexOf",e)},map(e,t){return mt(this,"map",e,t,void 0,arguments)},pop(){return on(this,"pop")},push(...e){return on(this,"push",e)},reduce(e,...t){return hs(this,"reduce",e,t)},reduceRight(e,...t){return hs(this,"reduceRight",e,t)},shift(){return on(this,"shift")},some(e,t){return mt(this,"some",e,t,void 0,arguments)},splice(...e){return on(this,"splice",e)},toReversed(){return Bt(this).toReversed()},toSorted(e){return Bt(this).toSorted(e)},toSpliced(...e){return Bt(this).toSpliced(...e)},unshift(...e){return on(this,"unshift",e)},values(){return yr(this,"values",e=>it(this,e))}};function yr(e,t,n){const r=nr(e),s=r[t]();return r!==e&&!We(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const Gi=Array.prototype;function mt(e,t,n,r,s,o){const i=nr(e),a=i!==e&&!We(e),l=i[t];if(l!==Gi[t]){const p=l.apply(e,o);return a?Qe(p):p}let d=n;i!==e&&(a?d=function(p,y){return n.call(this,it(e,p),y,e)}:n.length>2&&(d=function(p,y){return n.call(this,p,y,e)}));const u=l.call(i,d,r);return a&&s?s(u):u}function hs(e,t,n,r){const s=nr(e),o=s!==e&&!We(e);let i=n,a=!1;s!==e&&(o?(a=r.length===0,i=function(d,u,p){return a&&(a=!1,d=it(e,d)),n.call(this,d,it(e,u),p,e)}):n.length>3&&(i=function(d,u,p){return n.call(this,d,u,p,e)}));const l=s[t](i,...r);return a?it(e,l):l}function xr(e,t,n){const r=ae(e);Re(r,"iterate",vn);const s=r[t](...n);return(s===-1||s===!1)&&es(n[0])?(n[0]=ae(n[0]),r[t](...n)):s}function on(e,t,n=[]){wt(),zr();const r=ae(e)[t].apply(e,n);return Jr(),Et(),r}const Wi=Kr("__proto__,__v_isRef,__isVue"),wo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ft));function qi(e){ft(e)||(e=String(e));const t=ae(this);return Re(t,"has",e),t.hasOwnProperty(e)}class Eo{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?ra:Ro:o?So:Ao).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=q(t);if(!s){let l;if(i&&(l=Ki[n]))return l;if(n==="hasOwnProperty")return qi}const a=Reflect.get(t,n,Oe(t)?t:r);if((ft(n)?wo.has(n):Wi(n))||(s||Re(t,"get",n),o))return a;if(Oe(a)){const l=i&&Wr(n)?a:a.value;return s&&de(l)?Dr(l):l}return de(a)?s?Dr(a):rr(a):a}}class Co extends Eo{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];const i=q(t)&&Wr(n);if(!this._isShallow){const d=Ct(o);if(!We(r)&&!Ct(r)&&(o=ae(o),r=ae(r)),!i&&Oe(o)&&!Oe(r))return d||(o.value=r),!0}const a=i?Number(n)<t.length:le(t,n),l=Reflect.set(t,n,r,Oe(t)?t:s);return t===ae(s)&&l&&(a?ut(r,o)&&bt(t,"set",n,r):bt(t,"add",n,r)),l}deleteProperty(t,n){const r=le(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&bt(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!ft(n)||!wo.has(n))&&Re(t,"has",n),r}ownKeys(t){return Re(t,"iterate",q(t)?"length":Ut),Reflect.ownKeys(t)}}class zi extends Eo{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Ji=new Co,Yi=new zi,Qi=new Co(!0);const Nr=e=>e,On=e=>Reflect.getPrototypeOf(e);function Xi(e,t,n){return function(...r){const s=this.__v_raw,o=ae(s),i=qt(o),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,d=s[e](...r),u=n?Nr:t?Yt:Qe;return!t&&Re(o,"iterate",l?Pr:Ut),Ce(Object.create(d),{next(){const{value:p,done:y}=d.next();return y?{value:p,done:y}:{value:a?[u(p[0]),u(p[1])]:u(p),done:y}}})}}function Tn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Zi(e,t){const n={get(s){const o=this.__v_raw,i=ae(o),a=ae(s);e||(ut(s,a)&&Re(i,"get",s),Re(i,"get",a));const{has:l}=On(i),d=t?Nr:e?Yt:Qe;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&&Re(ae(s),"iterate",Ut),s.size},has(s){const o=this.__v_raw,i=ae(o),a=ae(s);return e||(ut(s,a)&&Re(i,"has",s),Re(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=ae(a),d=t?Nr:e?Yt:Qe;return!e&&Re(l,"iterate",Ut),a.forEach((u,p)=>s.call(o,d(u),d(p),i))}};return Ce(n,e?{add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear")}:{add(s){const o=ae(this),i=On(o),a=ae(s),l=!t&&!We(s)&&!Ct(s)?a:s;return i.has.call(o,l)||ut(s,l)&&i.has.call(o,s)||ut(a,l)&&i.has.call(o,a)||(o.add(l),bt(o,"add",l,l)),this},set(s,o){!t&&!We(o)&&!Ct(o)&&(o=ae(o));const i=ae(this),{has:a,get:l}=On(i);let d=a.call(i,s);d||(s=ae(s),d=a.call(i,s));const u=l.call(i,s);return i.set(s,o),d?ut(o,u)&&bt(i,"set",s,o):bt(i,"add",s,o),this},delete(s){const o=ae(this),{has:i,get:a}=On(o);let l=i.call(o,s);l||(s=ae(s),l=i.call(o,s)),a&&a.call(o,s);const d=o.delete(s);return l&&bt(o,"delete",s,void 0),d},clear(){const s=ae(this),o=s.size!==0,i=s.clear();return o&&bt(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Xi(s,e,t)}),n}function Xr(e,t){const n=Zi(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(le(n,s)&&s in r?n:r,s,o)}const ea={get:Xr(!1,!1)},ta={get:Xr(!1,!0)},na={get:Xr(!0,!1)};const Ao=new WeakMap,So=new WeakMap,Ro=new WeakMap,ra=new WeakMap;function sa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rr(e){return Ct(e)?e:Zr(e,!1,Ji,ea,Ao)}function Io(e){return Zr(e,!1,Qi,ta,So)}function Dr(e){return Zr(e,!0,Yi,na,Ro)}function Zr(e,t,n,r,s){if(!de(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=s.get(e);if(o)return o;const i=sa(Oi(e));if(i===0)return e;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function Lt(e){return Ct(e)?Lt(e.__v_raw):!!(e&&e.__v_isReactive)}function Ct(e){return!!(e&&e.__v_isReadonly)}function We(e){return!!(e&&e.__v_isShallow)}function es(e){return e?!!e.__v_raw:!1}function ae(e){const t=e&&e.__v_raw;return t?ae(t):e}function oa(e){return!le(e,"__v_skip")&&Object.isExtensible(e)&&co(e,"__v_skip",!0),e}const Qe=e=>de(e)?rr(e):e,Yt=e=>de(e)?Dr(e):e;function Oe(e){return e?e.__v_isRef===!0:!1}function Y(e){return Oo(e,!1)}function ia(e){return Oo(e,!0)}function Oo(e,t){return Oe(e)?e:new aa(e,t)}class aa{constructor(t,n){this.dep=new Qr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ae(t),this._value=n?t:Qe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||We(t)||Ct(t);t=r?t:ae(t),ut(t,n)&&(this._rawValue=t,this._value=r?t:Qe(t),this.dep.trigger())}}function Je(e){return Oe(e)?e.value:e}const la={get:(e,t,n)=>t==="__v_raw"?e:Je(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Oe(s)&&!Oe(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function To(e){return Lt(e)?e:new Proxy(e,la)}class ua{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Qr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=xn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&pe!==this)return yo(this,!0),!0}get value(){const t=this.dep.track();return bo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ca(e,t,n=!1){let r,s;return z(e)?r=e:(r=e.get,s=e.set),new ua(r,s,n)}const Pn={},Ln=new WeakMap;let Vt;function da(e,t=!1,n=Vt){if(n){let r=Ln.get(n);r||Ln.set(n,r=[]),r.push(e)}}function fa(e,t,n=ge){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:l}=n,d=k=>s?k:We(k)||s===!1||s===0?_t(k,1):_t(k);let u,p,y,v,j=!1,P=!1;if(Oe(e)?(p=()=>e.value,j=We(e)):Lt(e)?(p=()=>d(e),j=!0):q(e)?(P=!0,j=e.some(k=>Lt(k)||We(k)),p=()=>e.map(k=>{if(Oe(k))return k.value;if(Lt(k))return d(k);if(z(k))return l?l(k,2):k()})):z(e)?t?p=l?()=>l(e,2):e:p=()=>{if(y){wt();try{y()}finally{Et()}}const k=Vt;Vt=u;try{return l?l(e,3,[v]):e(v)}finally{Vt=k}}:p=dt,t&&s){const k=p,O=s===!0?1/0:s;p=()=>_t(k(),O)}const G=Fi(),V=()=>{u.stop(),G&&G.active&&Gr(G.effects,u)};if(o&&t){const k=t;t=(...O)=>{const ue=k(...O);return V(),ue}}let A=P?new Array(e.length).fill(Pn):Pn;const L=k=>{if(!(!(u.flags&1)||!u.dirty&&!k))if(t){const O=u.run();if(k||s||j||(P?O.some((ue,F)=>ut(ue,A[F])):ut(O,A))){y&&y();const ue=Vt;Vt=u;try{const F=[O,A===Pn?void 0:P&&A[0]===Pn?[]:A,v];A=O,l?l(t,3,F):t(...F)}finally{Vt=ue}}}else u.run()};return a&&a(L),u=new ho(p),u.scheduler=i?()=>i(L,!1):L,v=k=>da(k,!1,u),y=u.onStop=()=>{const k=Ln.get(u);if(k){if(l)l(k,4);else for(const O of k)O();Ln.delete(u)}},t?r?L(!0):A=u.run():i?i(L.bind(null,!0),!0):u.run(),V.pause=u.pause.bind(u),V.resume=u.resume.bind(u),V.stop=V,V}function _t(e,t=1/0,n){if(t<=0||!de(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Oe(e))_t(e.value,t,n);else if(q(e))for(let r=0;r<e.length;r++)_t(e[r],t,n);else if(nn(e)||qt(e))e.forEach(r=>{_t(r,t,n)});else if(uo(e)){for(const r in e)_t(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&_t(e[r],t,n)}return e}/**
* @vue/runtime-core v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Rn(e,t,n,r){try{return r?e(...r):e()}catch(s){sr(s,t,n)}}function Xe(e,t,n,r){if(z(e)){const s=Rn(e,t,n,r);return s&&ao(s)&&s.catch(o=>{sr(o,t,n)}),s}if(q(e)){const s=[];for(let o=0;o<e.length;o++)s.push(Xe(e[o],t,n,r));return s}}function sr(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ge;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 p=0;p<u.length;p++)if(u[p](e,l,d)===!1)return}a=a.parent}if(o){wt(),Rn(o,null,10,[e,l,d]),Et();return}}ga(e,n,s,r,i)}function ga(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const De=[];let ot=-1;const zt=[];let Ot=null,Kt=0;const Po=Promise.resolve();let Fn=null;function ts(e){const t=Fn||Po;return e?t.then(this?e.bind(this):e):t}function pa(e){let t=ot+1,n=De.length;for(;t<n;){const r=t+n>>>1,s=De[r],o=bn(s);o<e||o===e&&s.flags&2?t=r+1:n=r}return t}function ns(e){if(!(e.flags&1)){const t=bn(e),n=De[De.length-1];!n||!(e.flags&2)&&t>=bn(n)?De.push(e):De.splice(pa(t),0,e),e.flags|=1,No()}}function No(){Fn||(Fn=Po.then(Mo))}function ha(e){if(!q(e))Ot&&e.id===-1?Ot.splice(Kt+1,0,e):e.flags&1||(zt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)zt.push(e[t]);No()}function ms(e,t,n=ot+1){for(;n<De.length;n++){const r=De[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;De.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Do(e){if(zt.length){const t=[...new Set(zt)].sort((n,r)=>bn(n)-bn(r));if(zt.length=0,Ot){for(let n=0;n<t.length;n++)Ot.push(t[n]);return}for(Ot=t,Kt=0;Kt<Ot.length;Kt++){const n=Ot[Kt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ot=null,Kt=0}}const bn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Mo(e){try{for(ot=0;ot<De.length;ot++){const t=De[ot];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Rn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ot<De.length;ot++){const t=De[ot];t&&(t.flags&=-2)}ot=-1,De.length=0,Do(),Fn=null,(De.length||zt.length)&&Mo()}}let Be=null,Vo=null;function Hn(e){const t=Be;return Be=e,Vo=e&&e.type.__scopeId||null,t}function Qt(e,t=Be,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Gn(-1);const o=Hn(t),i=Ft.length;let a;try{a=e(...s)}finally{for(let l=Ft.length;l>i;l--)ai();Hn(o),r._d&&Gn(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function te(e,t){if(Be===null)return e;const n=dr(Be),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,i,a,l=ge]=t[s];o&&(z(o)&&(o={mounted:o,updated:o}),o.deep&&_t(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:a,modifiers:l}))}return e}function Dt(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&&(wt(),Xe(l,n,8,[e.el,a,e,t]),Et())}}function $n(e,t){if(Ie){let n=Ie.provides;const r=Ie.parent&&Ie.parent.provides;r===n&&(n=Ie.provides=Object.create(r)),n[e]=t}}function Ye(e,t,n=!1){const r=pl();if(r||Jt){let s=Jt?Jt._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&&z(t)?t.call(r&&r.proxy):t}}const ma=Symbol.for("v-scx"),ya=()=>Ye(ma);function jn(e,t,n){return $o(e,t,n)}function $o(e,t,n=ge){const{immediate:r,deep:s,flush:o,once:i}=n,a=Ce({},n),l=t&&r||!t&&o!=="post";let d;if(wn){if(o==="sync"){const v=ya();d=v.__watcherHandles||(v.__watcherHandles=[])}else if(!l){const v=()=>{};return v.stop=dt,v.resume=dt,v.pause=dt,v}}const u=Ie;a.call=(v,j,P)=>Xe(v,u,j,P);let p=!1;o==="post"?a.scheduler=v=>{je(v,u&&u.suspense)}:o!=="sync"&&(p=!0,a.scheduler=(v,j)=>{j?v():ns(v)}),a.augmentJob=v=>{t&&(v.flags|=4),p&&(v.flags|=2,u&&(v.id=u.uid,v.i=u))};const y=fa(e,t,a);return wn&&(d?d.push(y):l&&y()),y}function xa(e,t,n){const r=this.proxy,s=xe(e)?e.includes(".")?jo(r,e):()=>r[e]:e.bind(r,r);let o;z(t)?o=t:(o=t.handler,n=t);const i=In(this),a=$o(s,o.bind(r),n);return i(),a}function jo(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 va=Symbol("_vte"),or=e=>e.__isTeleport,vr=Symbol("_leaveCb");function ba(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==At){t=n;break}}return t}function Uo(e){if(!ss(e))return or(e.type)&&e.children?ba(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&&z(n.default))return n.default()}}function rs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;rs(or(n.type)&&Uo(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Lo(e,t){return z(e)?Ce({name:e.name},t,{setup:e}):e}function Fo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ys(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Bn=new WeakMap;function pn(e,t,n,r,s=!1){if(q(e)){e.forEach((P,G)=>pn(P,t&&(q(t)?t[G]:t),n,r,s));return}if(hn(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&pn(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?dr(r.component):r.el,i=s?null:o,{i:a,r:l}=e,d=t&&t.r,u=a.refs===ge?a.refs={}:a.refs,p=a.setupState,y=ae(p),v=p===ge?io:P=>ys(u,P)?!1:le(y,P),j=(P,G)=>!(G&&ys(u,G));if(d!=null&&d!==l){if(xs(t),xe(d))u[d]=null,v(d)&&(p[d]=null);else if(Oe(d)){const P=t;j(d,P.k)&&(d.value=null),P.k&&(u[P.k]=null)}}if(z(l))Rn(l,a,12,[i,u]);else{const P=xe(l),G=Oe(l);if(P||G){const V=()=>{if(e.f){const A=P?v(l)?p[l]:u[l]:j()||!e.k?l.value:u[e.k];if(s)q(A)&&Gr(A,o);else if(q(A))A.includes(o)||A.push(o);else if(P)u[l]=[o],v(l)&&(p[l]=u[l]);else{const L=[o];j(l,e.k)&&(l.value=L),e.k&&(u[e.k]=L)}}else P?(u[l]=i,v(l)&&(p[l]=i)):G&&(j(l,e.k)&&(l.value=i),e.k&&(u[e.k]=i))};if(i){const A=()=>{V(),Bn.delete(e)};A.id=-1,Bn.set(e,A),je(A,n)}else xs(e),V()}}}function xs(e){const t=Bn.get(e);t&&(t.flags|=8,Bn.delete(e))}er().requestIdleCallback;er().cancelIdleCallback;const hn=e=>!!e.type.__asyncLoader,ss=e=>e.type.__isKeepAlive;function _a(e,t){Ho(e,"a",t)}function ka(e,t){Ho(e,"da",t)}function Ho(e,t,n=Ie){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(ir(t,r,n),n){let s=n.parent;for(;s&&s.parent;)ss(s.parent.vnode)&&wa(r,t,n,s),s=s.parent}}function wa(e,t,n,r){const s=ir(t,e,r,!0);Bo(()=>{Gr(r[t],s)},n)}function ir(e,t,n=Ie,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{wt();const a=In(n),l=Xe(t,n,e,i);return a(),Et(),l});return r?s.unshift(o):s.push(o),o}}const St=e=>(t,n=Ie)=>{(!wn||e==="sp")&&ir(e,(...r)=>t(...r),n)},Ea=St("bm"),ar=St("m"),Ca=St("bu"),Aa=St("u"),Sa=St("bum"),Bo=St("um"),Ra=St("sp"),Ia=St("rtg"),Oa=St("rtc");function Ta(e,t=Ie){ir("ec",e,t)}const Pa="components";function lr(e,t){return Da(Pa,e,!0,t)||e}const Na=Symbol.for("v-ndc");function Da(e,t,n=!0,r=!1){const s=Be||Ie;if(s){const o=s.type;{const a=vl(o,!1);if(a&&(a===t||a===Me(t)||a===Xn(Me(t))))return o}const i=vs(s[e]||o[e],t)||vs(s.appContext[e],t);return!i&&r?o:i}}function vs(e,t){return e&&(e[t]||e[Me(t)]||e[Xn(Me(t))])}function Pe(e,t,n,r){let s;const o=n,i=q(e);if(i||xe(e)){const a=i&&Lt(e);let l=!1,d=!1;a&&(l=!We(e),d=Ct(e),e=nr(e)),s=new Array(e.length);for(let u=0,p=e.length;u<p;u++)s[u]=t(l?d?Yt(Qe(e[u])):Qe(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(de(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}const Mr=e=>e?ci(e)?dr(e):Mr(e.parent):null,mn=Ce(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=>Mr(e.parent),$root:e=>Mr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Go(e),$forceUpdate:e=>e.f||(e.f=()=>{ns(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>xa.bind(e)}),br=(e,t)=>e!==ge&&!e.__isScriptSetup&&le(e,t),Ma={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 y=i[t];if(y!==void 0)switch(y){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(br(r,t))return i[t]=1,r[t];if(s!==ge&&le(s,t))return i[t]=2,s[t];if(le(o,t))return i[t]=3,o[t];if(n!==ge&&le(n,t))return i[t]=4,n[t];Vr&&(i[t]=0)}}const d=mn[t];let u,p;if(d)return t==="$attrs"&&Re(e.attrs,"get",""),d(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==ge&&le(n,t))return i[t]=4,n[t];if(p=l.config.globalProperties,le(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return br(s,t)?(s[t]=n,!0):r!==ge&&le(r,t)?(r[t]=n,!0):le(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!==ge&&a[0]!=="$"&&le(e,a)||br(t,a)||le(o,a)||le(r,a)||le(mn,a)||le(s.config.globalProperties,a)||(l=i.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:le(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function bs(e){return q(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Vr=!0;function Va(e){const t=Go(e),n=e.proxy,r=e.ctx;Vr=!1,t.beforeCreate&&_s(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:l,inject:d,created:u,beforeMount:p,mounted:y,beforeUpdate:v,updated:j,activated:P,deactivated:G,beforeDestroy:V,beforeUnmount:A,destroyed:L,unmounted:k,render:O,renderTracked:ue,renderTriggered:F,errorCaptured:J,serverPrefetch:qe,expose:Ve,inheritAttrs:et,components:gt,directives:Ge,filters:Nt}=t;if(d&&$a(d,r,null),i)for(const ne in i){const Z=i[ne];z(Z)&&(r[ne]=Z.bind(n))}if(s){const ne=s.call(n,n);de(ne)&&(e.data=rr(ne))}if(Vr=!0,o)for(const ne in o){const Z=o[ne],X=z(Z)?Z.bind(n,n):z(Z.get)?Z.get.bind(n,n):dt,Ue=!z(Z)&&z(Z.set)?Z.set.bind(n):dt,Le=Ee({get:X,set:Ue});Object.defineProperty(r,ne,{enumerable:!0,configurable:!0,get:()=>Le.value,set:Ae=>Le.value=Ae})}if(a)for(const ne in a)Ko(a[ne],r,n,ne);if(l){const ne=z(l)?l.call(n):l;Reflect.ownKeys(ne).forEach(Z=>{$n(Z,ne[Z])})}u&&_s(u,e,"c");function ve(ne,Z){q(Z)?Z.forEach(X=>ne(X.bind(n))):Z&&ne(Z.bind(n))}if(ve(Ea,p),ve(ar,y),ve(Ca,v),ve(Aa,j),ve(_a,P),ve(ka,G),ve(Ta,J),ve(Oa,ue),ve(Ia,F),ve(Sa,A),ve(Bo,k),ve(Ra,qe),q(Ve))if(Ve.length){const ne=e.exposed||(e.exposed={});Ve.forEach(Z=>{Object.defineProperty(ne,Z,{get:()=>n[Z],set:X=>n[Z]=X,enumerable:!0})})}else e.exposed||(e.exposed={});O&&e.render===dt&&(e.render=O),et!=null&&(e.inheritAttrs=et),gt&&(e.components=gt),Ge&&(e.directives=Ge),qe&&Fo(e)}function $a(e,t,n=dt){q(e)&&(e=$r(e));for(const r in e){const s=e[r];let o;de(s)?"default"in s?o=Ye(s.from||r,s.default,!0):o=Ye(s.from||r):o=Ye(s),Oe(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function _s(e,t,n){Xe(q(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ko(e,t,n,r){let s=r.includes(".")?jo(n,r):()=>n[r];if(xe(e)){const o=t[e];z(o)&&jn(s,o)}else if(z(e))jn(s,e.bind(n));else if(de(e))if(q(e))e.forEach(o=>Ko(o,t,n,r));else{const o=z(e.handler)?e.handler.bind(n):t[e.handler];z(o)&&jn(s,o,e)}}function Go(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=>Kn(l,d,i,!0)),Kn(l,t,i)),de(t)&&o.set(t,l),l}function Kn(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Kn(e,o,n,!0),s&&s.forEach(i=>Kn(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const a=ja[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const ja={data:ks,props:ws,emits:ws,methods:un,computed:un,beforeCreate:Te,created:Te,beforeMount:Te,mounted:Te,beforeUpdate:Te,updated:Te,beforeDestroy:Te,beforeUnmount:Te,destroyed:Te,unmounted:Te,activated:Te,deactivated:Te,errorCaptured:Te,serverPrefetch:Te,components:un,directives:un,watch:La,provide:ks,inject:Ua};function ks(e,t){return t?e?function(){return Ce(z(e)?e.call(this,this):e,z(t)?t.call(this,this):t)}:t:e}function Ua(e,t){return un($r(e),$r(t))}function $r(e){if(q(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Te(e,t){return e?[...new Set([].concat(e,t))]:t}function un(e,t){return e?Ce(Object.create(null),e,t):t}function ws(e,t){return e?q(e)&&q(t)?[...new Set([...e,...t])]:Ce(Object.create(null),bs(e),bs(t??{})):t}function La(e,t){if(!e)return t;if(!t)return e;const n=Ce(Object.create(null),e);for(const r in t)n[r]=Te(e[r],t[r]);return n}function Wo(){return{app:null,config:{isNativeTag:io,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 Fa=0;function Ha(e,t){return function(r,s=null){z(r)||(r=Ce({},r)),s!=null&&!de(s)&&(s=null);const o=Wo(),i=new WeakSet,a=[];let l=!1;const d=o.app={_uid:Fa++,_component:r,_props:s,_container:null,_context:o,_instance:null,version:_l,get config(){return o.config},set config(u){},use(u,...p){return i.has(u)||(u&&z(u.install)?(i.add(u),u.install(d,...p)):z(u)&&(i.add(u),u(d,...p))),d},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),d},component(u,p){return p?(o.components[u]=p,d):o.components[u]},directive(u,p){return p?(o.directives[u]=p,d):o.directives[u]},mount(u,p,y){if(!l){const v=d._ceVNode||be(r,s);return v.appContext=o,y===!0?y="svg":y===!1&&(y=void 0),e(v,u,y),l=!0,d._container=u,u.__vue_app__=d,dr(v.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Xe(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,p){return o.provides[u]=p,d},runWithContext(u){const p=Jt;Jt=d;try{return u()}finally{Jt=p}}};return d}}let Jt=null;const Ba=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Me(t)}Modifiers`]||e[`${Ht(t)}Modifiers`];function Ka(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ge;let s=n;const o=t.startsWith("update:"),i=o&&Ba(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>xe(u)?u.trim():u)),i.number&&(s=n.map(Zn)));let a,l=r[a=pr(t)]||r[a=pr(Me(t))];!l&&o&&(l=r[a=pr(Ht(t))]),l&&Xe(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,Xe(d,e,6,s)}}const Ga=new WeakMap;function qo(e,t,n=!1){const r=n?Ga:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!z(e)){const l=d=>{const u=qo(d,t,!0);u&&(a=!0,Ce(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(de(e)&&r.set(e,null),null):(q(o)?o.forEach(l=>i[l]=null):Ce(i,o),de(e)&&r.set(e,i),i)}function ur(e,t){return!e||!Jn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),le(e,t[0].toLowerCase()+t.slice(1))||le(e,Ht(t))||le(e,t))}function Es(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:l,render:d,renderCache:u,props:p,data:y,setupState:v,ctx:j,inheritAttrs:P}=e,G=Hn(e);let V,A;try{if(n.shapeFlag&4){const k=s||r,O=k;V=at(d.call(O,k,u,p,v,y,j)),A=a}else{const k=t;V=at(k.length>1?k(p,{attrs:a,slots:i,emit:l}):k(p,null)),A=t.props?a:Wa(a)}}catch(k){Ft.length=0,sr(k,e,1),V=be(At)}let L=V;if(A&&P!==!1){const k=Object.keys(A),{shapeFlag:O}=L;k.length&&O&7&&(o&&k.some(Yn)&&(A=qa(A,o)),L=Xt(L,A,!1,!0))}if(n.dirs&&(L=Xt(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition){const k=or(L.type)&&Uo(L)||L;rs(k,n.transition)}return V=L,Hn(G),V}const Wa=e=>{let t;for(const n in e)(n==="class"||n==="style"||Jn(n))&&((t||(t={}))[n]=e[n]);return t},qa=(e,t)=>{const n={};for(const r in e)(!Yn(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function za(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?Cs(r,i,d):!!i;if(l&8){const u=t.dynamicProps;for(let p=0;p<u.length;p++){const y=u[p];if(zo(i,r,y)&&!ur(d,y))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Cs(r,i,d):!0:!!i;return!1}function Cs(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(zo(t,e,o)&&!ur(n,o))return!0}return!1}function zo(e,t,n){const r=e[n],s=t[n];return n==="style"&&de(r)&&de(s)?!rn(r,s):r!==s}function Ja({vnode:e,parent:t,suspense:n},r){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.suspense.vnode.el=s.el=r,e=s),s===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}const Jo={},Yo=()=>Object.create(Jo),Qo=e=>Object.getPrototypeOf(e)===Jo;function Ya(e,t,n,r=!1){const s={},o=Yo();e.propsDefaults=Object.create(null),Xo(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:Io(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function Qa(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=ae(s),[l]=e.propsOptions;let d=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let p=0;p<u.length;p++){let y=u[p];if(ur(e.emitsOptions,y))continue;const v=t[y];if(l)if(le(o,y))v!==o[y]&&(o[y]=v,d=!0);else{const j=Me(y);s[j]=jr(l,a,j,v,e,!1)}else v!==o[y]&&(o[y]=v,d=!0)}}}else{Xo(e,t,s,o)&&(d=!0);let u;for(const p in a)(!t||!le(t,p)&&((u=Ht(p))===p||!le(t,u)))&&(l?n&&(n[p]!==void 0||n[u]!==void 0)&&(s[p]=jr(l,a,p,void 0,e,!0)):delete s[p]);if(o!==a)for(const p in o)(!t||!le(t,p))&&(delete o[p],d=!0)}d&&bt(e.attrs,"set","")}function Xo(e,t,n,r){const[s,o]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(dn(l))continue;const d=t[l];let u;s&&le(s,u=Me(l))?!o||!o.includes(u)?n[u]=d:(a||(a={}))[u]=d:ur(e.emitsOptions,l)||(!(l in r)||d!==r[l])&&(r[l]=d,i=!0)}if(o){const l=ae(n),d=a||ge;for(let u=0;u<o.length;u++){const p=o[u];n[p]=jr(s,l,p,d[p],e,!le(d,p))}}return i}function jr(e,t,n,r,s,o){const i=e[n];if(i!=null){const a=le(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&z(l)){const{propsDefaults:d}=s;if(n in d)r=d[n];else{const u=In(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===Ht(n))&&(r=!0))}return r}const Xa=new WeakMap;function Zo(e,t,n=!1){const r=n?Xa:t.propsCache,s=r.get(e);if(s)return s;const o=e.props,i={},a=[];let l=!1;if(!z(e)){const u=p=>{l=!0;const[y,v]=Zo(p,t,!0);Ce(i,y),v&&a.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return de(e)&&r.set(e,Wt),Wt;if(q(o))for(let u=0;u<o.length;u++){const p=Me(o[u]);As(p)&&(i[p]=ge)}else if(o)for(const u in o){const p=Me(u);if(As(p)){const y=o[u],v=i[p]=q(y)||z(y)?{type:y}:Ce({},y),j=v.type;let P=!1,G=!0;if(q(j))for(let V=0;V<j.length;++V){const A=j[V],L=z(A)&&A.name;if(L==="Boolean"){P=!0;break}else L==="String"&&(G=!1)}else P=z(j)&&j.name==="Boolean";v[0]=P,v[1]=G,(P||le(v,"default"))&&a.push(p)}}const d=[i,a];return de(e)&&r.set(e,d),d}function As(e){return e[0]!=="$"&&!dn(e)}const os=e=>e==="_"||e==="_ctx"||e==="$stable",is=e=>q(e)?e.map(at):[at(e)],Za=(e,t,n)=>{if(t._n)return t;const r=Qt((...s)=>is(t(...s)),n);return r._c=!1,r},ei=(e,t,n)=>{const r=e._ctx;for(const s in e){if(os(s))continue;const o=e[s];if(z(o))t[s]=Za(s,o,r);else if(o!=null){const i=is(o);t[s]=()=>i}}},ti=(e,t)=>{const n=is(t);e.slots.default=()=>n},ni=(e,t,n)=>{for(const r in t)(n||!os(r))&&(e[r]=t[r])},el=(e,t,n)=>{const r=e.slots=Yo();if(e.vnode.shapeFlag&32){const s=t._;s?(ni(r,t,n),n&&co(r,"_",s,!0)):ei(t,r)}else t&&ti(e,t)},tl=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=ge;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:ni(s,t,n):(o=!t.$stable,ei(t,s)),i=t}else t&&(ti(e,t),i={default:1});if(o)for(const a in s)!os(a)&&i[a]==null&&delete s[a]},je=il;function nl(e){return rl(e)}function rl(e,t){const n=er();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:l,setText:d,setElementText:u,parentNode:p,nextSibling:y,setScopeId:v=dt,insertStaticContent:j}=e,P=(c,g,h,w=null,C=null,_=null,T=void 0,I=null,R=!!g.dynamicChildren)=>{if(c===g)return;c&&!an(c,g)&&(w=E(c),Ae(c,C,_,!0),c=null),g.patchFlag===-2&&(R=!1,g.dynamicChildren=null);const{type:S,ref:W,shapeFlag:$}=g;switch(S){case cr:G(c,g,h,w);break;case At:V(c,g,h,w);break;case kr:c==null&&A(g,h,w,T);break;case he:gt(c,g,h,w,C,_,T,I,R);break;default:$&1?O(c,g,h,w,C,_,T,I,R):$&6?Ge(c,g,h,w,C,_,T,I,R):($&64||$&128)&&S.process(c,g,h,w,C,_,T,I,R,H)}W!=null&&C?pn(W,c&&c.ref,_,g||c,!g):W==null&&c&&c.ref!=null&&pn(c.ref,null,_,c,!0)},G=(c,g,h,w)=>{if(c==null)r(g.el=a(g.children),h,w);else{const C=g.el=c.el;g.children!==c.children&&d(C,g.children)}},V=(c,g,h,w)=>{c==null?r(g.el=l(g.children||""),h,w):g.el=c.el},A=(c,g,h,w)=>{[c.el,c.anchor]=j(c.children,g,h,w,c.el,c.anchor)},L=({el:c,anchor:g},h,w)=>{let C;for(;c&&c!==g;)C=y(c),r(c,h,w),c=C;r(g,h,w)},k=({el:c,anchor:g})=>{let h;for(;c&&c!==g;)h=y(c),s(c),c=h;s(g)},O=(c,g,h,w,C,_,T,I,R)=>{if(g.type==="svg"?T="svg":g.type==="math"&&(T="mathml"),c==null)ue(g,h,w,C,_,T,I,R);else{const S=c.el&&c.el._isVueCE?c.el:null;try{S&&S._beginPatch(),qe(c,g,C,_,T,I,R)}finally{S&&S._endPatch()}}},ue=(c,g,h,w,C,_,T,I)=>{let R,S;const{props:W,shapeFlag:$,transition:B,dirs:b}=c;if(R=c.el=i(c.type,_,W&&W.is,W),$&8?u(R,c.children):$&16&&J(c.children,R,null,w,C,_r(c,_),T,I),b&&Dt(c,null,w,"created"),F(R,c,c.scopeId,T,w),W){for(const ce in W)ce!=="value"&&!dn(ce)&&o(R,ce,null,W[ce],_,w);"value"in W&&o(R,"value",null,W.value,_),(S=W.onVnodeBeforeMount)&&st(S,w,c)}b&&Dt(c,null,w,"beforeMount");const m=sl(C,B);m&&B.beforeEnter(R),r(R,g,h),((S=W&&W.onVnodeMounted)||m||b)&&je(()=>{try{S&&st(S,w,c),m&&B.enter(R),b&&Dt(c,null,w,"mounted")}finally{}},C)},F=(c,g,h,w,C)=>{if(h&&v(c,h),w)for(let _=0;_<w.length;_++)v(c,w[_]);if(C){let _=C.subTree;if(g===_||ii(_.type)&&(_.ssContent===g||_.ssFallback===g)){const T=C.vnode;F(c,T,T.scopeId,T.slotScopeIds,C.parent)}}},J=(c,g,h,w,C,_,T,I,R=0)=>{for(let S=R;S<c.length;S++){const W=c[S]=I?vt(c[S]):at(c[S]);P(null,W,g,h,w,C,_,T,I)}},qe=(c,g,h,w,C,_,T)=>{const I=g.el=c.el;let{patchFlag:R,dynamicChildren:S,dirs:W}=g;R|=c.patchFlag&16;const $=c.props||ge,B=g.props||ge;let b;if(h&&Mt(h,!1),(b=B.onVnodeBeforeUpdate)&&st(b,h,g,c),W&&Dt(g,c,h,"beforeUpdate"),h&&Mt(h,!0),S&&(!c.dynamicChildren||c.dynamicChildren.length!==S.length)&&(R=0,T=!1,S=null),($.innerHTML&&B.innerHTML==null||$.textContent&&B.textContent==null)&&u(I,""),S?Ve(c.dynamicChildren,S,I,h,w,_r(g,C),_):T||Z(c,g,I,null,h,w,_r(g,C),_,!1),R>0){if(R&16)et(I,$,B,h,C);else if(R&2&&$.class!==B.class&&o(I,"class",null,B.class,C),R&4&&o(I,"style",$.style,B.style,C),R&8){const m=g.dynamicProps;for(let ce=0;ce<m.length;ce++){const x=m[ce],ee=$[x],fe=B[x];(fe!==ee||x==="value")&&o(I,x,ee,fe,C,h)}}R&1&&c.children!==g.children&&u(I,g.children)}else!T&&S==null&&et(I,$,B,h,C);((b=B.onVnodeUpdated)||W)&&je(()=>{b&&st(b,h,g,c),W&&Dt(g,c,h,"updated")},w)},Ve=(c,g,h,w,C,_,T)=>{for(let I=0;I<g.length;I++){const R=c[I],S=g[I],W=R.el&&(R.type===he||!an(R,S)||R.shapeFlag&198)?p(R.el):h;P(R,S,W,null,w,C,_,T,!0)}},et=(c,g,h,w,C)=>{if(g!==h){if(g!==ge)for(const _ in g)!dn(_)&&!(_ in h)&&o(c,_,g[_],null,C,w);for(const _ in h){if(dn(_))continue;const T=h[_],I=g[_];T!==I&&_!=="value"&&o(c,_,I,T,C,w)}"value"in h&&o(c,"value",g.value,h.value,C)}},gt=(c,g,h,w,C,_,T,I,R)=>{const S=g.el=c?c.el:a(""),W=g.anchor=c?c.anchor:a("");let{patchFlag:$,dynamicChildren:B,slotScopeIds:b}=g;b&&(I=I?I.concat(b):b),c==null?(r(S,h,w),r(W,h,w),J(g.children||[],h,W,C,_,T,I,R)):$>0&&$&64&&B&&c.dynamicChildren&&c.dynamicChildren.length===B.length?(Ve(c.dynamicChildren,B,h,C,_,T,I),(g.key!=null||C&&g===C.subTree)&&ri(c,g,!0)):Z(c,g,h,W,C,_,T,I,R)},Ge=(c,g,h,w,C,_,T,I,R)=>{g.slotScopeIds=I,c==null?g.shapeFlag&512?C.ctx.activate(g,h,w,T,R):Nt(g,h,w,C,_,T,R):Rt(c,g,R)},Nt=(c,g,h,w,C,_,T)=>{const I=c.component=gl(c,w,C);if(ss(c)&&(I.ctx.renderer=H),hl(I,!1,T),I.asyncDep){if(C&&C.registerDep(I,ve,T),!c.el){const R=I.subTree=be(At);V(null,R,g,h),c.placeholder=R.el}}else ve(I,c,g,h,C,_,T)},Rt=(c,g,h)=>{const w=g.component=c.component;if(za(c,g,h))if(w.asyncDep&&!w.asyncResolved){ne(w,g,h);return}else w.next=g,w.update();else g.el=c.el,w.vnode=g},ve=(c,g,h,w,C,_,T)=>{const I=()=>{if(c.isMounted){let{next:$,bu:B,u:b,parent:m,vnode:ce}=c;{const nt=si(c);if(nt){$&&($.el=ce.el,ne(c,$,T)),nt.asyncDep.then(()=>{je(()=>{c.isUnmounted||S()},C)});return}}let x=$,ee;Mt(c,!1),$?($.el=ce.el,ne(c,$,T)):$=ce,B&&Vn(B),(ee=$.props&&$.props.onVnodeBeforeUpdate)&&st(ee,m,$,ce),Mt(c,!0);const fe=Es(c),tt=c.subTree;c.subTree=fe,P(tt,fe,p(tt.el),E(tt),c,C,_),$.el=fe.el,x===null&&Ja(c,fe.el),b&&je(b,C),(ee=$.props&&$.props.onVnodeUpdated)&&je(()=>st(ee,m,$,ce),C)}else{let $;const{el:B,props:b}=g,{bm:m,m:ce,parent:x,root:ee,type:fe}=c,tt=hn(g);Mt(c,!1),m&&Vn(m),!tt&&($=b&&b.onVnodeBeforeMount)&&st($,x,g),Mt(c,!0);{ee.ce&&ee.ce._hasShadowRoot()&&ee.ce._injectChildStyle(fe,c.parent?c.parent.type:void 0);const nt=c.subTree=Es(c);P(null,nt,h,w,c,C,_),g.el=nt.el}if(ce&&je(ce,C),!tt&&($=b&&b.onVnodeMounted)){const nt=g;je(()=>st($,x,nt),C)}(g.shapeFlag&256||x&&hn(x.vnode)&&x.vnode.shapeFlag&256)&&c.a&&je(c.a,C),c.isMounted=!0,g=h=w=null}};c.scope.on();const R=c.effect=new ho(I);c.scope.off();const S=c.update=R.run.bind(R),W=c.job=R.runIfDirty.bind(R);W.i=c,W.id=c.uid,R.scheduler=()=>ns(W),Mt(c,!0),S()},ne=(c,g,h)=>{g.component=c;const w=c.vnode.props;c.vnode=g,c.next=null,Qa(c,g.props,w,h),tl(c,g.children,h),wt(),ms(c),Et()},Z=(c,g,h,w,C,_,T,I,R=!1)=>{const S=c&&c.children,W=c?c.shapeFlag:0,$=g.children,{patchFlag:B,shapeFlag:b}=g;if(B>0){if(B&128){Ue(S,$,h,w,C,_,T,I,R);return}else if(B&256){X(S,$,h,w,C,_,T,I,R);return}}b&8?(W&16&&$e(S,C,_),$!==S&&u(h,$)):W&16?b&16?Ue(S,$,h,w,C,_,T,I,R):$e(S,C,_,!0):(W&8&&u(h,""),b&16&&J($,h,w,C,_,T,I,R))},X=(c,g,h,w,C,_,T,I,R)=>{c=c||Wt,g=g||Wt;const S=c.length,W=g.length,$=Math.min(S,W);let B;for(B=0;B<$;B++){const b=g[B]=R?vt(g[B]):at(g[B]);P(c[B],b,h,null,C,_,T,I,R)}S>W?$e(c,C,_,!0,!1,$):J(g,h,w,C,_,T,I,R,$)},Ue=(c,g,h,w,C,_,T,I,R)=>{let S=0;const W=g.length;let $=c.length-1,B=W-1;for(;S<=$&&S<=B;){const b=c[S],m=g[S]=R?vt(g[S]):at(g[S]);if(an(b,m))P(b,m,h,null,C,_,T,I,R);else break;S++}for(;S<=$&&S<=B;){const b=c[$],m=g[B]=R?vt(g[B]):at(g[B]);if(an(b,m))P(b,m,h,null,C,_,T,I,R);else break;$--,B--}if(S>$){if(S<=B){const b=B+1,m=b<W?g[b].el:w;for(;S<=B;)P(null,g[S]=R?vt(g[S]):at(g[S]),h,m,C,_,T,I,R),S++}}else if(S>B)for(;S<=$;)Ae(c[S],C,_,!0),S++;else{const b=S,m=S,ce=new Map;for(S=m;S<=B;S++){const He=g[S]=R?vt(g[S]):at(g[S]);He.key!=null&&ce.set(He.key,S)}let x,ee=0;const fe=B-m+1;let tt=!1,nt=0;const sn=new Array(fe);for(S=0;S<fe;S++)sn[S]=0;for(S=b;S<=$;S++){const He=c[S];if(ee>=fe){Ae(He,C,_,!0);continue}let rt;if(He.key!=null)rt=ce.get(He.key);else for(x=m;x<=B;x++)if(sn[x-m]===0&&an(He,g[x])){rt=x;break}rt===void 0?Ae(He,C,_,!0):(sn[rt-m]=S+1,rt>=nt?nt=rt:tt=!0,P(He,g[rt],h,null,C,_,T,I,R),ee++)}const us=tt?ol(sn):Wt;for(x=us.length-1,S=fe-1;S>=0;S--){const He=m+S,rt=g[He],cs=g[He+1],ds=He+1<W?cs.el||oi(cs):w;sn[S]===0?P(null,rt,h,ds,C,_,T,I,R):tt&&(x<0||S!==us[x]?Le(rt,h,ds,2):x--)}}},Le=(c,g,h,w,C=null)=>{const{el:_,type:T,transition:I,children:R,shapeFlag:S}=c;if(S&6){Le(c.component.subTree,g,h,w);return}if(S&128){c.suspense.move(g,h,w);return}if(S&64){T.move(c,g,h,H);return}if(T===he){r(_,g,h);for(let $=0;$<R.length;$++)Le(R[$],g,h,w);r(c.anchor,g,h);return}if(T===kr){L(c,g,h);return}if(w!==2&&S&1&&I)if(w===0)I.persisted&&!_[vr]?r(_,g,h):(I.beforeEnter(_),r(_,g,h),je(()=>I.enter(_),C));else{const{leave:$,delayLeave:B,afterLeave:b}=I,m=()=>{c.ctx.isUnmounted?s(_):r(_,g,h)},ce=()=>{const x=_._isLeaving||!!_[vr];_._isLeaving&&_[vr](!0),I.persisted&&!x?m():$(_,()=>{m(),b&&b()})};B?B(_,m,ce):ce()}else r(_,g,h)},Ae=(c,g,h,w=!1,C=!1)=>{const{type:_,props:T,ref:I,children:R,dynamicChildren:S,shapeFlag:W,patchFlag:$,dirs:B,cacheIndex:b,memo:m}=c;if($===-2&&(C=!1),I!=null&&(wt(),pn(I,null,h,c,!0),Et()),b!=null&&(g.renderCache[b]=void 0),W&256){g.ctx.deactivate(c);return}const ce=W&1&&B,x=!hn(c);let ee;if(x&&(ee=T&&T.onVnodeBeforeUnmount)&&st(ee,g,c),W&6)ht(c.component,h,w);else{if(W&128){c.suspense.unmount(h,w);return}ce&&Dt(c,null,g,"beforeUnmount"),W&64?c.type.remove(c,g,h,H,w):S&&!S.hasOnce&&(_!==he||$>0&&$&64)?$e(S,g,h,!1,!0):(_===he&&$&384||!C&&W&16)&&$e(R,g,h),w&&pt(c)}const fe=m!=null&&b==null;(x&&(ee=T&&T.onVnodeUnmounted)||ce||fe)&&je(()=>{ee&&st(ee,g,c),ce&&Dt(c,null,g,"unmounted"),fe&&(c.el=null)},h)},pt=c=>{const{type:g,el:h,anchor:w,transition:C}=c;if(g===he){Fe(h,w);return}if(g===kr){k(c);return}const _=()=>{s(h),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(c.shapeFlag&1&&C&&!C.persisted){const{leave:T,delayLeave:I}=C,R=()=>T(h,_);I?I(c.el,_,R):R()}else _()},Fe=(c,g)=>{let h;for(;c!==g;)h=y(c),s(c),c=h;s(g)},ht=(c,g,h)=>{const{bum:w,scope:C,job:_,subTree:T,um:I,m:R,a:S}=c;Ss(R),Ss(S),w&&Vn(w),C.stop(),_&&(_.flags|=8,Ae(T,c,g,h)),I&&je(I,g),je(()=>{c.isUnmounted=!0},g)},$e=(c,g,h,w=!1,C=!1,_=0)=>{for(let T=_;T<c.length;T++)Ae(c[T],g,h,w,C)},E=c=>{if(c.shapeFlag&6)return E(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const g=y(c.anchor||c.el),h=g&&g[va];return h?y(h):g};let U=!1;const M=(c,g,h)=>{let w;c==null?g._vnode&&(Ae(g._vnode,null,null,!0),w=g._vnode.component):P(g._vnode||null,c,g,null,null,null,h),g._vnode=c,U||(U=!0,ms(w),Do(),U=!1)},H={p:P,um:Ae,m:Le,r:pt,mt:Nt,mc:J,pc:Z,pbc:Ve,n:E,o:e};return{render:M,hydrate:void 0,createApp:Ha(M)}}function _r({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 Mt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function sl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ri(e,t,n=!1){const r=e.children,s=t.children;if(q(r)&&q(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]=vt(s[o]),a.el=i.el),!n&&a.patchFlag!==-2&&ri(i,a)),a.type===cr&&(a.patchFlag===-1&&(a=s[o]=vt(a)),a.el=i.el),a.type===At&&!a.el&&(a.el=i.el)}}function ol(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 si(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:si(t)}function Ss(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function oi(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?oi(t.subTree):null}const ii=e=>e.__isSuspense;function il(e,t){t&&t.pendingBranch?q(e)?t.effects.push(...e):t.effects.push(e):ha(e)}const he=Symbol.for("v-fgt"),cr=Symbol.for("v-txt"),At=Symbol.for("v-cmt"),kr=Symbol.for("v-stc"),Ft=[];let Ke=null;function N(e=!1){Ft.push(Ke=e?null:[])}function ai(){Ft.pop(),Ke=Ft[Ft.length-1]||null}let _n=1;function Gn(e,t=!1){_n+=e,e<0&&Ke&&t&&(Ke.hasOnce=!0)}function li(e){return e.dynamicChildren=_n>0?Ke||Wt:null,ai(),_n>0&&Ke&&Ke.push(e),e}function D(e,t,n,r,s,o){return li(f(e,t,n,r,s,o,!0))}function al(e,t,n,r,s){return li(be(e,t,n,r,s,!0))}function Wn(e){return e?e.__v_isVNode===!0:!1}function an(e,t){return e.type===t.type&&e.key===t.key}const ui=({key:e})=>e??null,Un=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Oe(e)||z(e)?{i:Be,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,r=0,s=null,o=e===he?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ui(t),ref:t&&Un(t),scopeId:Vo,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:Be};return a?(qn(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=xe(n)?8:16),_n>0&&!i&&Ke&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Ke.push(l),l}const be=ll;function ll(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Na)&&(e=At),Wn(e)){const a=Xt(e,t,!0);return n&&qn(a,n),_n>0&&!o&&Ke&&(a.shapeFlag&6?Ke[Ke.indexOf(e)]=a:Ke.push(a)),a.patchFlag=-2,a}if(bl(e)&&(e=e.__vccOpts),t){t=ul(t);let{class:a,style:l}=t;a&&!xe(a)&&(t.class=Se(a)),de(l)&&(es(l)&&!q(l)&&(l=Ce({},l)),t.style=tr(l))}const i=xe(e)?1:ii(e)?128:or(e)?64:de(e)?4:z(e)?2:0;return f(e,t,n,r,s,i,o,!0)}function ul(e){return e?es(e)||Qo(e)?Ce({},e):e:null}function Xt(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:l}=e,d=t?cl(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&ui(d),ref:t&&t.ref?n&&o?q(o)?o.concat(Un(t)):[o,Un(t)]:Un(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!==he?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&&Xt(e.ssContent),ssFallback:e.ssFallback&&Xt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&rs(u,l.clone(u)),u}function ke(e=" ",t=0){return be(cr,null,e,t)}function re(e="",t=!1){return t?(N(),al(At,null,e)):be(At,null,e)}function at(e){return e==null||typeof e=="boolean"?be(At):q(e)?be(he,null,e.slice()):Wn(e)?vt(e):be(cr,null,String(e))}function vt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Xt(e)}function qn(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(q(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),qn(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Qo(t)?t._ctx=Be:s===3&&Be&&(Be.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(z(t)){if(r&65){qn(e,{default:t});return}t={default:t,_ctx:Be},n=32}else t=String(t),r&64?(n=16,t=[ke(t)]):n=8;e.children=t,e.shapeFlag|=n}function cl(...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=Se([t.class,r.class]));else if(s==="style")t.style=tr([t.style,r.style]);else if(Jn(s)){const o=t[s],i=r[s];i&&o!==i&&!(q(o)&&o.includes(i))?t[s]=o?[].concat(o,i):i:i==null&&o==null&&!Yn(s)&&(t[s]=i)}else s!==""&&(t[s]=r[s])}return t}function st(e,t,n,r=null){Xe(e,t,7,[n,r])}const dl=Wo();let fl=0;function gl(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||dl,o={uid:fl++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Li(!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:Zo(r,s),emitsOptions:qo(r,s),emit:null,emitted:null,propsDefaults:ge,inheritAttrs:r.inheritAttrs,ctx:ge,data:ge,props:ge,attrs:ge,slots:ge,refs:ge,setupState:ge,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=Ka.bind(null,o),e.ce&&e.ce(o),o}let Ie=null;const pl=()=>Ie||Be;let zn,kn;{const e=er(),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)}};zn=t("__VUE_INSTANCE_SETTERS__",n=>Ie=n),kn=t("__VUE_SSR_SETTERS__",n=>wn=n)}const In=e=>{const t=Ie;return zn(e),e.scope.on(),()=>{e.scope.off(),zn(t)}},Rs=()=>{Ie&&Ie.scope.off(),zn(null)};function ci(e){return e.vnode.shapeFlag&4}let wn=!1;function hl(e,t=!1,n=!1){t&&kn(t);const{props:r,children:s}=e.vnode,o=ci(e);Ya(e,r,o,t),el(e,s,n||t);const i=o?ml(e,t):void 0;return t&&kn(!1),i}function ml(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ma);const{setup:r}=n;if(r){wt();const s=e.setupContext=r.length>1?xl(e):null,o=In(e),i=Rn(r,e,0,[e.props,s]),a=ao(i);if(Et(),o(),(a||e.sp)&&!hn(e)&&Fo(e),a){if(i.then(Rs,Rs),t)return i.then(l=>{kn(!0);try{Is(e,l,t)}finally{kn(!1)}}).catch(l=>{sr(l,e,0)});e.asyncDep=i}else Is(e,i)}else di(e)}function Is(e,t,n){z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:de(t)&&(e.setupState=To(t)),di(e)}function di(e,t,n){const r=e.type;e.render||(e.render=r.render||dt);{const s=In(e);wt();try{Va(e)}finally{Et(),s()}}}const yl={get(e,t){return Re(e,"get",""),e[t]}};function xl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,yl),slots:e.slots,emit:e.emit,expose:t}}function dr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(To(oa(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mn)return mn[n](e)},has(t,n){return n in t||n in mn}})):e.proxy}function vl(e,t=!0){return z(e)?e.displayName||e.name:e.name||t&&e.__name}function bl(e){return z(e)&&"__vccOpts"in e}const Ee=(e,t)=>ca(e,t,wn);function fi(e,t,n){try{Gn(-1);const r=arguments.length;return r===2?de(t)&&!q(t)?Wn(t)?be(e,null,[t]):be(e,t):be(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Wn(n)&&(n=[n]),be(e,t,n))}finally{Gn(1)}}const _l="3.5.41";/**
* @vue/runtime-dom v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ur;const Os=typeof window<"u"&&window.trustedTypes;if(Os)try{Ur=Os.createPolicy("vue",{createHTML:e=>e})}catch{}const gi=Ur?e=>Ur.createHTML(e):e=>e,kl="http://www.w3.org/2000/svg",wl="http://www.w3.org/1998/Math/MathML",xt=typeof document<"u"?document:null,Ts=xt&&xt.createElement("template"),El={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"?xt.createElementNS(kl,e):t==="mathml"?xt.createElementNS(wl,e):n?xt.createElement(e,{is:n}):xt.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>xt.createTextNode(e),createComment:e=>xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>xt.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{Ts.innerHTML=gi(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Ts.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]}},Cl=Symbol("_vtc");function Al(e,t,n){const r=e[Cl];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ps=Symbol("_vod"),Sl=Symbol("_vsh"),Rl=Symbol(""),Il=/(?:^|;)\s*display\s*:/;function Ol(e,t,n){const r=e.style,s=xe(n);let o=!1;if(n&&!s){if(t)if(xe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&cn(r,a,"")}else for(const i in t)n[i]==null&&cn(r,i,"");for(const i in n){i==="display"&&(o=!0);const a=n[i];a!=null?Pl(e,i,!xe(t)&&t?t[i]:void 0,a)||cn(r,i,a):cn(r,i,"")}}else if(s){if(t!==n){const i=r[Rl];i&&(n+=";"+i),r.cssText=n,o=Il.test(n)}}else t&&e.removeAttribute("style");Ps in e&&(e[Ps]=o?r.display:"",e[Sl]&&(r.display="none"))}const Ns=/\s*!important$/;function cn(e,t,n){if(q(n))n.forEach(r=>cn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Tl(e,t);Ns.test(n)?e.setProperty(Ht(r),n.replace(Ns,""),"important"):e[r]=n}}const Ds=["Webkit","Moz","ms"],wr={};function Tl(e,t){const n=wr[t];if(n)return n;let r=Me(t);if(r!=="filter"&&r in e)return wr[t]=r;r=Xn(r);for(let s=0;s<Ds.length;s++){const o=Ds[s]+r;if(o in e)return wr[t]=o}return t}function Pl(e,t,n,r){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&xe(r)&&n===r}const Ms="http://www.w3.org/1999/xlink";function Vs(e,t,n,r,s,o=ji(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ms,t.slice(6,t.length)):e.setAttributeNS(Ms,t,n):n==null||o&&!fo(n)?e.removeAttribute(t):e.setAttribute(t,o?"":ft(n)?String(n):n)}function $s(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?gi(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=fo(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 Pt(e,t,n,r){e.addEventListener(t,n,r)}function Nl(e,t,n,r){e.removeEventListener(t,n,r)}const js=Symbol("_vei");function Dl(e,t,n,r,s=null){const o=e[js]||(e[js]={}),i=o[t];if(r&&i)i.value=r;else{const[a,l]=$l(t);if(r){const d=o[t]=Ll(r,s);Pt(e,a,d,l)}else i&&(Nl(e,a,i,l),o[t]=void 0)}}const Ml=/(Once|Passive|Capture)$/,Vl=/^on:?(?:Once|Passive|Capture)$/;function $l(e){let t,n;for(;(n=e.match(Ml))&&!Vl.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Ht(e.slice(2)),t]}let Er=0;const jl=Promise.resolve(),Ul=()=>Er||(jl.then(()=>Er=0),Er=Date.now());function Ll(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;const s=n.value;if(q(s)){const o=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{o.call(r),r._stopped=!0};const i=s.slice(),a=[r];for(let l=0;l<i.length&&!r._stopped;l++){const d=i[l];d&&Xe(d,t,5,a)}}else Xe(s,t,5,[r])};return n.value=e,n.attached=Ul(),n}const Us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fl=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Al(e,r,i):t==="style"?Ol(e,n,r):Jn(t)?Yn(t)||Dl(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Hl(e,t,r,i))?($s(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vs(e,t,r,i,o,t!=="value")):e._isVueCE&&(Bl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!xe(r)))?$s(e,Me(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Vs(e,t,r,i))};function Hl(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Us(t)&&z(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 Us(t)&&xe(n)?!1:t in e}function Bl(e,t){const n=e._def.props;if(!n)return!1;const r=Me(t);return Array.isArray(n)?n.some(s=>Me(s)===r):Object.keys(n).some(s=>Me(s)===r)}const Zt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return q(t)?n=>Vn(t,n):t};function Kl(e){e.target.composing=!0}function Ls(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ct=Symbol("_assign"),Nn=Symbol("_initialValue");function Cr(e,t,n){return t&&(e=e.trim()),n&&(e=Zn(e)),e}const me={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e.parentNode&&(e.type==="text"?e[Nn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Nn]=e.defaultValue.replace(/\r\n?/g,`
`))),e[ct]=Zt(s);const o=r||s.props&&s.props.type==="number";Pt(e,t?"change":"input",i=>{i.target.composing||e[ct](Cr(e.value,n,o))}),(n||o)&&Pt(e,"change",()=>{e.value=Cr(e.value,n,o)}),t||(Pt(e,"compositionstart",Kl),Pt(e,"compositionend",Ls),Pt(e,"change",Ls))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){const s=t??"",o=e[Nn];delete e[Nn],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[ct](Cr(e.value,n,r)):e.value=s},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[ct]=Zt(i),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?Zn(e.value):e.value,l=t??"";if(a===l)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l)}},$t={deep:!0,created(e,t,n){e[ct]=Zt(n),Pt(e,"change",()=>{const r=e._modelValue,s=Cn(e),o=e.checked,i=e[ct];if(q(r)){const a=qr(r,s),l=a!==-1;if(o&&!l)i(r.concat(s));else if(!o&&l){const d=[...r];d.splice(a,1),i(d)}}else if(nn(r)){const a=new Set(r);o?a.add(s):a.delete(s),i(a)}else i(pi(e,o))})},mounted:Fs,beforeUpdate(e,t,n){e[ct]=Zt(n),Fs(e,t,n)}};function Fs(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(q(t))s=qr(t,r.props.value)>-1;else if(nn(t))s=t.has(r.props.value);else{if(t===n)return;s=rn(t,pi(e,!0))}e.checked!==s&&(e.checked=s)}const En={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Pt(e,"change",()=>{const s=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Zn(Cn(o)):Cn(o));e[ct](e.multiple?nn(e._modelValue)?new Set(s):s:s[0]),e._assigning=!0,ts(()=>{e._assigning=!1})}),e[ct]=Zt(r)},mounted(e,{value:t}){Hs(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[ct]=Zt(n)},updated(e,{value:t}){e._assigning||Hs(e,t)}};function Hs(e,t){const n=e.multiple,r=q(t);if(!(n&&!r&&!nn(t))){for(let s=0,o=e.options.length;s<o;s++){const i=e.options[s],a=Cn(i);if(n)if(r){const l=typeof a;l==="string"||l==="number"?i.selected=t.some(d=>String(d)===String(a)):i.selected=qr(t,a)>-1}else i.selected=t.has(a);else if(rn(Cn(i),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Cn(e){return"_value"in e?e._value:e.value}function pi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Gl=["ctrl","shift","alt","meta"],Wl={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)=>Gl.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=Wl[t[i]];if(a&&a(s,t))return}return e(s,...o)}))},ql=Ce({patchProp:Fl},El);let Bs;function zl(){return Bs||(Bs=nl(ql))}const Jl=((...e)=>{const t=zl().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Ql(r);if(!s)return;const o=t._component;!z(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,Yl(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t});function Yl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ql(e){return xe(e)?document.querySelector(e):e}/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/const Gt=typeof document<"u";function hi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Xl(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&hi(e.default)}const ie=Object.assign;function Ar(e,t){const n={};for(const r in t){const s=t[r];n[r]=Ze(s)?s.map(e):e(s)}return n}const yn=()=>{},Ze=Array.isArray;function Ks(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const mi=/#/g,Zl=/&/g,eu=/\//g,tu=/=/g,nu=/\?/g,yi=/\+/g,ru=/%5B/g,su=/%5D/g,xi=/%5E/g,ou=/%60/g,vi=/%7B/g,iu=/%7C/g,bi=/%7D/g,au=/%20/g;function as(e){return e==null?"":encodeURI(""+e).replace(iu,"|").replace(ru,"[").replace(su,"]")}function lu(e){return as(e).replace(vi,"{").replace(bi,"}").replace(xi,"^")}function Lr(e){return as(e).replace(yi,"%2B").replace(au,"+").replace(mi,"%23").replace(Zl,"%26").replace(ou,"`").replace(vi,"{").replace(bi,"}").replace(xi,"^")}function uu(e){return Lr(e).replace(tu,"%3D")}function cu(e){return as(e).replace(mi,"%23").replace(nu,"%3F")}function du(e){return cu(e).replace(eu,"%2F")}function An(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const fu=/\/$/,gu=e=>e.replace(fu,"");function Sr(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=yu(r??t,n),{fullPath:r+o+i,path:r,query:s,hash:An(i)}}function pu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Gs(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function hu(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&en(t.matched[r],n.matched[s])&&_i(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function en(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function _i(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!mu(e[n],t[n]))return!1;return!0}function mu(e,t){return Ze(e)?Ws(e,t):Ze(t)?Ws(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Ws(e,t){return Ze(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function yu(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 It={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Fr=(function(e){return e.pop="pop",e.push="push",e})({}),Rr=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function xu(e){if(!e)if(Gt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),gu(e)}const vu=/^[^#]+#/;function bu(e,t){return e.replace(vu,"#")+t}function _u(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 fr=()=>({left:window.scrollX,top:window.scrollY});function ku(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=_u(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 qs(e,t){return(history.state?history.state.position-t:-1)+e}const Hr=new Map;function wu(e,t){Hr.set(e,t)}function Eu(e){const t=Hr.get(e);return Hr.delete(e),t}function Cu(e){return typeof e=="string"||e&&typeof e=="object"}function ki(e){return typeof e=="string"||typeof e=="symbol"}let ye=(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 wi=Symbol("");ye.MATCHER_NOT_FOUND+"",ye.NAVIGATION_GUARD_REDIRECT+"",ye.NAVIGATION_ABORTED+"",ye.NAVIGATION_CANCELLED+"",ye.NAVIGATION_DUPLICATED+"";function tn(e,t){return ie(new Error,{type:e,[wi]:!0},t)}function yt(e,t){return e instanceof Error&&wi in e&&(t==null||!!(e.type&t))}const Au=["params","query","hash"];function Su(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Au)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Ru(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(yi," "),o=s.indexOf("="),i=An(o<0?s:s.slice(0,o)),a=o<0?null:An(s.slice(o+1));if(i in t){let l=t[i];Ze(l)||(l=t[i]=[l]),l.push(a)}else t[i]=a}return t}function zs(e){let t="";for(let n in e){const r=e[n];if(n=uu(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Ze(r)?r.map(s=>s&&Lr(s)):[r&&Lr(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Iu(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ze(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const Ou=Symbol(""),Js=Symbol(""),gr=Symbol(""),ls=Symbol(""),Br=Symbol("");function ln(){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 Tt(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const d=y=>{y===!1?l(tn(ye.NAVIGATION_ABORTED,{from:n,to:t})):y instanceof Error?l(y):Cu(y)?l(tn(ye.NAVIGATION_GUARD_REDIRECT,{from:t,to:y})):(i&&r.enterCallbacks[s]===i&&typeof y=="function"&&i.push(y),a())},u=o(()=>e.call(r&&r.instances[s],t,n,d));let p=Promise.resolve(u);e.length<3&&(p=p.then(d)),p.catch(y=>l(y))})}function Ir(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(hi(l)){const d=(l.__vccOpts||l)[t];d&&o.push(Tt(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 p=Xl(u)?u.default:u;i.mods[a]=u,i.components[a]=p;const y=(p.__vccOpts||p)[t];return y&&Tt(y,n,r,i,a,s)()}))}}return o}function Tu(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=>en(d,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(d=>en(d,l))||s.push(l))}return[n,r,s]}/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Pu=()=>location.protocol+"//"+location.host;function Ei(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),Gs(a,"")}return Gs(n,e)+r+s}function Nu(e,t,n,r){let s=[],o=[],i=null;const a=({state:y})=>{const v=Ei(e,location),j=n.value,P=t.value;let G=0;if(y){if(n.value=v,t.value=y,i&&i===j){i=null;return}G=P?y.position-P.position:0}else r(v);s.forEach(V=>{V(n.value,j,{delta:G,type:Fr.pop,direction:G?G>0?Rr.forward:Rr.back:Rr.unknown})})};function l(){i=n.value}function d(y){s.push(y);const v=()=>{const j=s.indexOf(y);j>-1&&s.splice(j,1)};return o.push(v),v}function u(){if(document.visibilityState==="hidden"){const{history:y}=window;if(!y.state)return;y.replaceState(ie({},y.state,{scroll:fr()}),"")}}function p(){for(const y of o)y();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:p}}function Ys(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?fr():null}}function Du(e){const{history:t,location:n}=window,r={value:Ei(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 p=e.indexOf("#"),y=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+l:Pu()+e+l;try{t[u?"replaceState":"pushState"](d,"",y),s.value=d}catch(v){console.error(v),n[u?"replace":"assign"](y)}}function i(l,d){o(l,ie({},t.state,Ys(s.value.back,l,s.value.forward,!0),d,{position:s.value.position}),!0),r.value=l}function a(l,d){const u=ie({},s.value,t.state,{forward:l,scroll:fr()});o(u.current,u,!0),o(l,ie({},Ys(r.value,l,null),{position:u.position+1},d),!1),r.value=l}return{location:r,state:s,push:a,replace:i}}function Mu(e){e=xu(e);const t=Du(e),n=Nu(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=ie({location:"",base:e,go:r,createHref:bu.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 jt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var _e=(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})(_e||{});const Vu={type:jt.Static,value:""},$u=/[a-zA-Z0-9_]/;function ju(e){if(!e)return[[]];if(e==="/")return[[Vu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${d}": ${v}`)}let n=_e.Static,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,l,d="",u="";function p(){d&&(n===_e.Static?o.push({type:jt.Static,value:d}):n===_e.Param||n===_e.ParamRegExp||n===_e.ParamRegExpEnd?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:jt.Param,value:d,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),d="")}function y(){d+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==_e.ParamRegExp){r=n,n=_e.EscapeNext;continue}switch(n){case _e.Static:l==="/"?(d&&p(),i()):l===":"?(p(),n=_e.Param):y();break;case _e.EscapeNext:y(),n=r;break;case _e.Param:l==="("?n=_e.ParamRegExp:$u.test(l)?y():(p(),n=_e.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case _e.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=_e.ParamRegExpEnd:u+=l;break;case _e.ParamRegExpEnd:p(),n=_e.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===_e.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),p(),i(),s}const Qs="[^/]+?",Uu={sensitive:!1,strict:!1,start:!0,end:!0};var Ne=(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})(Ne||{});const Lu=/[.+*?^${}()[\]/\\]/g;function Fu(e,t){const n=ie({},Uu,t),r=[];let s=n.start?"^":"";const o=[];for(const d of e){const u=d.length?[]:[Ne.Root];n.strict&&!d.length&&(s+="/");for(let p=0;p<d.length;p++){const y=d[p];let v=Ne.Segment+(n.sensitive?Ne.BonusCaseSensitive:0);if(y.type===jt.Static)p||(s+="/"),s+=y.value.replace(Lu,"\\$&"),v+=Ne.Static;else if(y.type===jt.Param){const{value:j,repeatable:P,optional:G,regexp:V}=y;o.push({name:j,repeatable:P,optional:G});const A=V||Qs;if(A!==Qs){v+=Ne.BonusCustomRegExp;try{`${A}`}catch(k){throw new Error(`Invalid custom RegExp for param "${j}" (${A}): `+k.message)}}let L=P?`((?:${A})(?:/(?:${A}))*)`:`(${A})`;p||(L=G&&d.length<2?`(?:/${L})`:"/"+L),G&&(L+="?"),s+=L,v+=Ne.Dynamic,G&&(v+=Ne.BonusOptional),P&&(v+=Ne.BonusRepeatable),A===".*"&&(v+=Ne.BonusWildcard)}u.push(v)}r.push(u)}if(n.strict&&n.end){const d=r.length-1;r[d][r[d].length-1]+=Ne.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),p={};if(!u)return null;for(let y=1;y<u.length;y++){const v=u[y]||"",j=o[y-1];p[j.name]=v&&j.repeatable?v.split("/"):v}return p}function l(d){let u="",p=!1;for(const y of e){(!p||!u.endsWith("/"))&&(u+="/"),p=!1;for(const v of y)if(v.type===jt.Static)u+=v.value;else if(v.type===jt.Param){const{value:j,repeatable:P,optional:G}=v,V=j in d?d[j]:"";if(Ze(V)&&!P)throw new Error(`Provided param "${j}" is an array but it is not repeatable (* or + modifiers)`);const A=Ze(V)?V.join("/"):V;if(!A)if(G)y.length<2&&(u.endsWith("/")?u=u.slice(0,-1):p=!0);else throw new Error(`Missing required param "${j}"`);u+=A}}return u||"/"}return{re:i,score:r,keys:o,parse:a,stringify:l}}function Hu(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]===Ne.Static+Ne.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Ne.Static+Ne.Segment?1:-1:0}function Ci(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const o=Hu(r[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-r.length)===1){if(Xs(r))return 1;if(Xs(s))return-1}return s.length-r.length}function Xs(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Bu={strict:!1,end:!0,sensitive:!1};function Ku(e,t,n){const r=Fu(ju(e.path),n),s=ie(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function Gu(e,t){const n=[],r=new Map;t=Ks(Bu,t);function s(p){return r.get(p)}function o(p,y,v){const j=!v,P=eo(p);P.aliasOf=v&&v.record;const G=Ks(t,p),V=[P];if("alias"in p){const k=typeof p.alias=="string"?[p.alias]:p.alias;for(const O of k)V.push(eo(ie({},P,{components:v?v.record.components:P.components,path:O,aliasOf:v?v.record:P})))}let A,L;for(const k of V){const{path:O}=k;if(y&&O[0]!=="/"){const ue=y.record.path,F=ue[ue.length-1]==="/"?"":"/";k.path=y.record.path+(O&&F+O)}if(A=Ku(k,y,G),v?v.alias.push(A):(L=L||A,L!==A&&L.alias.push(A),j&&p.name&&!to(A)&&i(p.name)),Ai(A)&&l(A),P.children){const ue=P.children;for(let F=0;F<ue.length;F++)o(ue[F],A,v&&v.children[F])}v=v||A}return L?()=>{i(L)}:yn}function i(p){if(ki(p)){const y=r.get(p);y&&(r.delete(p),n.splice(n.indexOf(y),1),y.children.forEach(i),y.alias.forEach(i))}else{const y=n.indexOf(p);y>-1&&(n.splice(y,1),p.record.name&&r.delete(p.record.name),p.children.forEach(i),p.alias.forEach(i))}}function a(){return n}function l(p){const y=zu(p,n);n.splice(y,0,p),p.record.name&&!to(p)&&r.set(p.record.name,p)}function d(p,y){let v,j={},P,G;if("name"in p&&p.name){if(v=r.get(p.name),!v)throw tn(ye.MATCHER_NOT_FOUND,{location:p});G=v.record.name,j=ie(Zs(y.params,v.keys.filter(L=>!L.optional).concat(v.parent?v.parent.keys.filter(L=>L.optional):[]).map(L=>L.name)),p.params&&Zs(p.params,v.keys.map(L=>L.name))),P=v.stringify(j)}else if(p.path!=null)P=p.path,v=n.find(L=>L.re.test(P)),v&&(j=v.parse(P),G=v.record.name);else{if(v=y.name?r.get(y.name):n.find(L=>L.re.test(y.path)),!v)throw tn(ye.MATCHER_NOT_FOUND,{location:p,currentLocation:y});G=v.record.name,j=ie({},y.params,p.params),P=v.stringify(j)}const V=[];let A=v;for(;A;)V.unshift(A.record),A=A.parent;return{name:G,path:P,params:j,matched:V,meta:qu(V)}}e.forEach(p=>o(p));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:d,removeRoute:i,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Zs(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function eo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Wu(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 Wu(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 to(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function qu(e){return e.reduce((t,n)=>ie(t,n.meta),{})}function zu(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;Ci(e,t[o])<0?r=o:n=o+1}const s=Ju(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Ju(e){let t=e;for(;t=t.parent;)if(Ai(t)&&Ci(e,t)===0)return t}function Ai({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function no(e){const t=Ye(gr),n=Ye(ls),r=Ee(()=>{const l=Je(e.to);return t.resolve(l)}),s=Ee(()=>{const{matched:l}=r.value,{length:d}=l,u=l[d-1],p=n.matched;if(!u||!p.length)return-1;const y=p.findIndex(en.bind(null,u));if(y>-1)return y;const v=ro(l[d-2]);return d>1&&ro(u)===v&&p[p.length-1].path!==v?p.findIndex(en.bind(null,l[d-2])):y}),o=Ee(()=>s.value>-1&&ec(n.params,r.value.params)),i=Ee(()=>s.value>-1&&s.value===n.matched.length-1&&_i(n.params,r.value.params));function a(l={}){if(Zu(l)){const d=t[Je(e.replace)?"replace":"push"](Je(e.to)).catch(yn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:r,href:Ee(()=>r.value.href),isActive:o,isExactActive:i,navigate:a}}function Yu(e){return e.length===1?e[0]:e}const Qu=Lo({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:no,setup(e,{slots:t}){const n=rr(no(e)),{options:r}=Ye(gr),s=Ee(()=>({[so(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[so(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Yu(t.default(n));return e.custom?o:fi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),Xu=Qu;function Zu(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 ec(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(!Ze(s)||s.length!==r.length||r.some((o,i)=>o.valueOf()!==s[i].valueOf()))return!1}return!0}function ro(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const so=(e,t,n)=>e??t??n,tc=Lo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ye(Br),s=Ee(()=>e.route||r.value),o=Ye(Js,0),i=Ee(()=>{let d=Je(o);const{matched:u}=s.value;let p;for(;(p=u[d])&&!p.components;)d++;return d}),a=Ee(()=>s.value.matched[i.value]);$n(Js,Ee(()=>i.value+1)),$n(Ou,a),$n(Br,s);const l=Y();return jn(()=>[l.value,a.value,e.name],([d,u,p],[y,v,j])=>{u&&(u.instances[p]=d,v&&v!==u&&d&&d===y&&(u.leaveGuards.size||(u.leaveGuards=v.leaveGuards),u.updateGuards.size||(u.updateGuards=v.updateGuards))),d&&u&&(!v||!en(u,v)||!y)&&(u.enterCallbacks[p]||[]).forEach(P=>P(d))},{flush:"post"}),()=>{const d=s.value,u=e.name,p=a.value,y=p&&p.components[u];if(!y)return oo(n.default,{Component:y,route:d});const v=p.props[u],j=v?v===!0?d.params:typeof v=="function"?v(d):v:null,G=fi(y,ie({},j,t,{onVnodeUnmounted:V=>{V.component.isUnmounted&&(p.instances[u]=null)},ref:l}));return oo(n.default,{Component:G,route:d})||G}}});function oo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const nc=tc;function rc(e){const t=Gu(e.routes,e),n=e.parseQuery||Ru,r=e.stringifyQuery||zs,s=e.history,o=ln(),i=ln(),a=ln(),l=ia(It);let d=It;Gt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ar.bind(null,E=>""+E),p=Ar.bind(null,du),y=Ar.bind(null,An);function v(E,U){let M,H;return ki(E)?(M=t.getRecordMatcher(E),H=U):H=E,t.addRoute(H,M)}function j(E){const U=t.getRecordMatcher(E);U&&t.removeRoute(U)}function P(){return t.getRoutes().map(E=>E.record)}function G(E){return!!t.getRecordMatcher(E)}function V(E,U){if(U=ie({},U||l.value),typeof E=="string"){const h=Sr(n,E,U.path),w=t.resolve({path:h.path},U),C=s.createHref(h.fullPath);return ie(h,w,{params:y(w.params),hash:An(h.hash),redirectedFrom:void 0,href:C})}let M;if(E.path!=null)M=ie({},E,{path:Sr(n,E.path,U.path).path});else{const h=ie({},E.params);for(const w in h)h[w]==null&&delete h[w];M=ie({},E,{params:p(h)}),U.params=p(U.params)}const H=t.resolve(M,U),Q=E.hash||"";H.params=u(y(H.params));const c=pu(r,ie({},E,{hash:lu(Q),path:H.path})),g=s.createHref(c);return ie({fullPath:c,hash:Q,query:r===zs?Iu(E.query):E.query||{}},H,{redirectedFrom:void 0,href:g})}function A(E){return typeof E=="string"?Sr(n,E,l.value.path):ie({},E)}function L(E,U){if(d!==E)return tn(ye.NAVIGATION_CANCELLED,{from:U,to:E})}function k(E){return F(E)}function O(E){return k(ie(A(E),{replace:!0}))}function ue(E,U){const M=E.matched[E.matched.length-1];if(M&&M.redirect){const{redirect:H}=M;let Q=typeof H=="function"?H(E,U):H;return typeof Q=="string"&&(Q=Q.includes("?")||Q.includes("#")?Q=A(Q):{path:Q},Q.params={}),ie({query:E.query,hash:E.hash,params:Q.path!=null?{}:E.params},Q)}}function F(E,U){const M=d=V(E),H=l.value,Q=E.state,c=E.force,g=E.replace===!0,h=ue(M,H);if(h)return F(ie(A(h),{state:typeof h=="object"?ie({},Q,h.state):Q,force:c,replace:g}),U||M);const w=M;w.redirectedFrom=U;let C;return!c&&hu(r,H,M)&&(C=tn(ye.NAVIGATION_DUPLICATED,{to:w,from:H}),Le(H,H,!0,!1)),(C?Promise.resolve(C):Ve(w,H)).catch(_=>yt(_)?yt(_,ye.NAVIGATION_GUARD_REDIRECT)?_:Ue(_):Z(_,w,H)).then(_=>{if(_){if(yt(_,ye.NAVIGATION_GUARD_REDIRECT))return F(ie({replace:g},A(_.to),{state:typeof _.to=="object"?ie({},Q,_.to.state):Q,force:c}),U||w)}else _=gt(w,H,!0,g,Q);return et(w,H,_),_})}function J(E,U){const M=L(E,U);return M?Promise.reject(M):Promise.resolve()}function qe(E){const U=Fe.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(E):E()}function Ve(E,U){let M;const[H,Q,c]=Tu(E,U);M=Ir(H.reverse(),"beforeRouteLeave",E,U);for(const h of H)h.leaveGuards.forEach(w=>{M.push(Tt(w,E,U))});const g=J.bind(null,E,U);return M.push(g),$e(M).then(()=>{M=[];for(const h of o.list())M.push(Tt(h,E,U));return M.push(g),$e(M)}).then(()=>{M=Ir(Q,"beforeRouteUpdate",E,U);for(const h of Q)h.updateGuards.forEach(w=>{M.push(Tt(w,E,U))});return M.push(g),$e(M)}).then(()=>{M=[];for(const h of c)if(h.beforeEnter)if(Ze(h.beforeEnter))for(const w of h.beforeEnter)M.push(Tt(w,E,U));else M.push(Tt(h.beforeEnter,E,U));return M.push(g),$e(M)}).then(()=>(E.matched.forEach(h=>h.enterCallbacks={}),M=Ir(c,"beforeRouteEnter",E,U,qe),M.push(g),$e(M))).then(()=>{M=[];for(const h of i.list())M.push(Tt(h,E,U));return M.push(g),$e(M)}).catch(h=>yt(h,ye.NAVIGATION_CANCELLED)?h:Promise.reject(h))}function et(E,U,M){a.list().forEach(H=>qe(()=>H(E,U,M)))}function gt(E,U,M,H,Q){const c=L(E,U);if(c)return c;const g=U===It,h=Gt?history.state:{};M&&(H||g?s.replace(E.fullPath,ie({scroll:g&&h&&h.scroll},Q)):s.push(E.fullPath,Q)),l.value=E,Le(E,U,M,g),Ue()}let Ge;function Nt(){Ge||(Ge=s.listen((E,U,M)=>{if(!ht.listening)return;const H=V(E),Q=ue(H,ht.currentRoute.value);if(Q){F(ie(Q,{replace:!0,force:!0}),H).catch(yn);return}d=H;const c=l.value;Gt&&wu(qs(c.fullPath,M.delta),fr()),Ve(H,c).catch(g=>yt(g,ye.NAVIGATION_ABORTED|ye.NAVIGATION_CANCELLED)?g:yt(g,ye.NAVIGATION_GUARD_REDIRECT)?(F(ie(A(g.to),{force:!0}),H).then(h=>{yt(h,ye.NAVIGATION_ABORTED|ye.NAVIGATION_DUPLICATED)&&!M.delta&&M.type===Fr.pop&&s.go(-1,!1)}).catch(yn),Promise.reject()):(M.delta&&s.go(-M.delta,!1),Z(g,H,c))).then(g=>{g=g||gt(H,c,!1),g&&(M.delta&&!yt(g,ye.NAVIGATION_CANCELLED)?s.go(-M.delta,!1):M.type===Fr.pop&&yt(g,ye.NAVIGATION_ABORTED|ye.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),et(H,c,g)}).catch(yn)}))}let Rt=ln(),ve=ln(),ne;function Z(E,U,M){Ue(E);const H=ve.list();return H.length?H.forEach(Q=>Q(E,U,M)):console.error(E),Promise.reject(E)}function X(){return ne&&l.value!==It?Promise.resolve():new Promise((E,U)=>{Rt.add([E,U])})}function Ue(E){return ne||(ne=!E,Nt(),Rt.list().forEach(([U,M])=>E?M(E):U()),Rt.reset()),E}function Le(E,U,M,H){const{scrollBehavior:Q}=e;if(!Gt||!Q)return Promise.resolve();const c=!M&&Eu(qs(E.fullPath,0))||(H||!M)&&history.state&&history.state.scroll||null;return ts().then(()=>Q(E,U,c)).then(g=>g&&ku(g)).catch(g=>Z(g,E,U))}const Ae=E=>s.go(E);let pt;const Fe=new Set,ht={currentRoute:l,listening:!0,addRoute:v,removeRoute:j,clearRoutes:t.clearRoutes,hasRoute:G,getRoutes:P,resolve:V,options:e,push:k,replace:O,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:o.add,beforeResolve:i.add,afterEach:a.add,onError:ve.add,isReady:X,install(E){E.component("RouterLink",Xu),E.component("RouterView",nc),E.config.globalProperties.$router=ht,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>Je(l)}),Gt&&!pt&&l.value===It&&(pt=!0,k(s.location).catch(H=>{}));const U={};for(const H in It)Object.defineProperty(U,H,{get:()=>l.value[H],enumerable:!0});E.provide(gr,ht),E.provide(ls,Io(U)),E.provide(Br,l);const M=E.unmount;Fe.add(E),E.unmount=function(){Fe.delete(E),Fe.size<1&&(d=It,Ge&&Ge(),Ge=null,l.value=It,pt=!1,ne=!1),M()}}};function $e(E){return E.reduce((U,M)=>U.then(()=>qe(M)),Promise.resolve())}return ht}function Si(){return Ye(gr)}function Ri(e){return Ye(ls)}const Dn=window.location.pathname.startsWith("/portal/"),kt={esPortal:Dn,baseRuta:Dn?"/portal/studio/":"/orchestrator/",apiBase:Dn?"/portal":"/app",urlLogin:Dn?"/portal/login":"/login"};function oe(e){return kt.apiBase+e}async function Mn(e,t={}){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t.headers}}),r=n.headers.get("content-type")||"";if(n.redirected||!r.includes("application/json"))throw window.location.href=kt.urlLogin,new Error("Sesión expirada");const s=await n.json();if(!n.ok){const o=typeof(s==null?void 0:s.error)=="string"?s.error:s==null?void 0:s.message;throw new Error(o||"Error de servidor")}return s}const se={get:e=>Mn(e),post:(e,t)=>Mn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Mn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Mn(e,{method:"DELETE"})},sc={class:"w-64 shrink-0 h-screen sticky top-0 flex flex-col border-r border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900"},oc={class:"px-4 py-4 border-b border-gray-200 dark:border-gray-800"},ic={key:0,class:"px-3 pt-3"},ac={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},lc={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},uc={key:0,class:"px-2 text-xs text-gray-400"},cc={key:1,class:"px-2 text-xs text-gray-400"},dc={class:"truncate"},fc={class:"flex items-center gap-1 mt-0.5"},gc={class:"text-[11px] text-gray-400 dark:text-gray-500"},pc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},hc=["onClick"],mc=["onClick"],yc={class:"bg-white dark:bg-gray-900 rounded-xl p-6 w-full max-w-lg border border-gray-200 dark:border-gray-800"},xc={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},vc={key:0,class:"grid grid-cols-2 gap-3"},bc=["value"],_c=["value"],kc={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},wc={class:"flex justify-end gap-2 pt-2"},Ec={__name:"Sidebar",setup(e,{expose:t}){const n=Ri(),r=Si(),s=Y([]),o=Y([]),i=Y([]),a=Y(!0),l=Y(""),d=Y(!1),u=Y(null),p=Y(v()),y=Ee(()=>n.params.tenantId||n.params.id);function v(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function j(){a.value=!0,l.value="";try{const k=await se.get(oe("/umind/tenants"));s.value=k.items||[]}catch(k){l.value=k.message}finally{a.value=!1}}async function P(){if(!kt.esPortal)try{const[k,O]=await Promise.all([se.get("/app/api/clientes/select"),se.get("/app/umind-planes/list")]);o.value=k.registros||k.items||[],i.value=O.items||[]}catch{o.value=[],i.value=[]}}function G(){u.value=null,p.value=v(),d.value=!0}function V(k){u.value=k,p.value={nombre:k.nombre,dominios_permitidos:k.dominios_permitidos,activo:k.activo,cliente_id:k.cliente_id??null,plan_id:k.plan_id??null},d.value=!0}async function A(){const k={...p.value,dominios_permitidos:p.value.dominios_permitidos.split(",").map(O=>O.trim()).filter(Boolean)};try{if(u.value)await se.put(oe(`/umind/tenants/${u.value.ID}`),k),d.value=!1,await j();else{const O=await se.post(oe("/umind/tenants"),k);d.value=!1,await j(),r.push(`/tenants/${O.id}`)}}catch(O){l.value=O.message}}async function L(k){confirm(`¿Eliminar el tenant "${k.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await se.del(oe(`/umind/tenants/${k.ID}`)),y.value===String(k.ID)&&r.push("/"),await j())}return t({recargar:j}),ar(()=>{j(),P()}),(k,O)=>{const ue=lr("router-link");return N(),D(he,null,[f("aside",sc,[f("div",oc,[be(ue,{to:"/",class:"text-base font-semibold text-gray-800 dark:text-gray-100"},{default:Qt(()=>[...O[7]||(O[7]=[ke(" uMind ",-1),f("span",{class:"text-brand"},"Studio",-1)])]),_:1})]),Je(kt).esPortal?re("",!0):(N(),D("div",ic,[f("button",{class:"w-full bg-brand hover:bg-brand-dark text-white text-sm font-medium px-3 py-2 rounded-lg transition-colors",onClick:G}," + Nuevo tenant ")])),l.value?(N(),D("p",ac,K(l.value),1)):re("",!0),f("nav",lc,[a.value?(N(),D("p",uc,"Cargando...")):s.value.length===0?(N(),D("p",cc,K(Je(kt).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin tenants todavía."),1)):re("",!0),(N(!0),D(he,null,Pe(s.value,F=>(N(),D("div",{key:F.ID,class:Se(["group flex items-center rounded-lg transition-colors",y.value===String(F.ID)?"bg-brand/10 dark:bg-brand/20":"hover:bg-gray-100 dark:hover:bg-gray-800"])},[be(ue,{to:`/tenants/${F.ID}`,class:Se(["flex-1 min-w-0 px-2.5 py-2 text-sm",y.value===String(F.ID)?"text-brand-dark dark:text-brand font-medium":"text-gray-700 dark:text-gray-300"])},{default:Qt(()=>[f("div",dc,K(F.nombre),1),f("div",fc,[f("span",{class:Se(["w-1.5 h-1.5 rounded-full",F.activo?"bg-green-500":"bg-gray-300 dark:bg-gray-600"])},null,2),f("span",gc,K(F.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Je(kt).esPortal?re("",!0):(N(),D("div",pc,[f("button",{class:"p-1 text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",title:"Editar",onClick:J=>V(F)}," ✎ ",8,hc),f("button",{class:"p-1 text-gray-400 hover:text-red-600",title:"Eliminar",onClick:J=>L(F)}," ✕ ",8,mc)]))],2))),128))])]),d.value?(N(),D("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:O[6]||(O[6]=lt(F=>d.value=!1,["self"]))},[f("div",yc,[f("h2",xc,K(u.value?"Editar tenant":"Nuevo tenant"),1),O[18]||(O[18]=f("p",{class:"text-xs text-gray-500 dark:text-gray-400 mb-3"}," Un tenant es el negocio/sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),f("form",{class:"space-y-3",onSubmit:lt(A,["prevent"])},[f("div",null,[O[8]||(O[8]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Nombre",-1)),te(f("input",{"onUpdate:modelValue":O[0]||(O[0]=F=>p.value.nombre=F),required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,p.value.nombre]])]),f("div",null,[O[9]||(O[9]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Dominios permitidos (separados por coma)",-1)),te(f("input",{"onUpdate:modelValue":O[1]||(O[1]=F=>p.value.dominios_permitidos=F),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,p.value.dominios_permitidos]])]),o.value.length?(N(),D("div",vc,[f("div",null,[O[11]||(O[11]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Cliente",-1)),te(f("select",{"onUpdate:modelValue":O[2]||(O[2]=F=>p.value.cliente_id=F),class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},[O[10]||(O[10]=f("option",{value:null},"— sin asignar —",-1)),(N(!0),D(he,null,Pe(o.value,F=>(N(),D("option",{key:F.ID,value:F.ID},K(F.nombre),9,bc))),128))],512),[[En,p.value.cliente_id]]),O[12]||(O[12]=f("p",{class:"text-[11px] text-gray-400 mt-1"},"Define quién ve este tenant desde el portal.",-1))]),f("div",null,[O[14]||(O[14]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Plan",-1)),te(f("select",{"onUpdate:modelValue":O[3]||(O[3]=F=>p.value.plan_id=F),class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},[O[13]||(O[13]=f("option",{value:null},"— sin plan —",-1)),(N(!0),D(he,null,Pe(i.value,F=>(N(),D("option",{key:F.ID,value:F.ID},K(F.nombre)+" ("+K(F.max_agentes===0?"∞":F.max_agentes)+" agentes) ",9,_c))),128))],512),[[En,p.value.plan_id]]),O[15]||(O[15]=f("p",{class:"text-[11px] text-gray-400 mt-1"},"Límite de agentes y precios de consumo.",-1))])])):re("",!0),f("label",kc,[te(f("input",{"onUpdate:modelValue":O[4]||(O[4]=F=>p.value.activo=F),type:"checkbox"},null,512),[[$t,p.value.activo]]),O[16]||(O[16]=ke(" Activo ",-1))]),f("div",wc,[f("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:O[5]||(O[5]=F=>d.value=!1)}," Cancelar "),O[17]||(O[17]=f("button",{type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"}," Guardar ",-1))])],32)])])):re("",!0)],64)}}},Cc={class:"min-h-screen flex bg-gray-50 dark:bg-gray-950"},Ac={class:"flex-1 min-w-0"},Sc={class:"max-w-4xl mx-auto px-8 py-10"},Rc={__name:"App",setup(e){return(t,n)=>{const r=lr("router-view");return N(),D("div",Cc,[be(Ec),f("main",Ac,[f("div",Sc,[be(r)])])])}}},Ic={class:"flex flex-col items-center justify-center text-center py-24"},Oc={class:"text-lg font-medium text-gray-700 dark:text-gray-200"},Tc={class:"text-sm text-gray-400 dark:text-gray-500 mt-1"},Pc={__name:"Home",setup(e){return(t,n)=>(N(),D("div",Ic,[n[0]||(n[0]=f("div",{class:"text-4xl mb-4"},"💬",-1)),f("h1",Oc,K(Je(kt).esPortal?"Elegí tu espacio de la izquierda":"Elegí un tenant de la izquierda"),1),f("p",Tc,K(Je(kt).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},Nc={key:0,class:"mb-6"},Dc={class:"text-xl font-semibold text-gray-800 dark:text-gray-100"},Mc={class:"text-xs text-gray-500 dark:text-gray-500 mt-1"},Vc={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},$c={class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 divide-y divide-gray-100 dark:divide-gray-800"},jc={key:0,class:"p-6 text-sm text-gray-500 dark:text-gray-400"},Uc={class:"font-medium text-gray-800 dark:text-gray-200"},Lc={class:"flex items-center gap-1 mt-0.5"},Fc={class:"text-xs text-gray-400 dark:text-gray-500"},Hc={class:"flex items-center gap-3 pr-4 text-sm"},Bc=["onClick"],Kc=["onClick"],Gc={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg"},Wc={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},qc=["value"],zc={class:"flex items-center gap-2"},Jc={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},Yc={class:"flex justify-end gap-2 pt-2"},Qc={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},Xc={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=Ee(()=>Number(t.id)),r=Si(),s=Y(null),o=Y([]),i=Y([]),a=Y(""),l=Y(!1),d=Y(null),u=Y(p());function p(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0}}async function y(){a.value="";try{const[V,A,L]=await Promise.all([se.get(oe("/umind/tenants")),se.get(oe(`/umind/agentes?tenant_id=${t.id}`)),se.get(oe("/umind/ai-configs"))]);s.value=(V.items||[]).find(k=>String(k.ID)===t.id)||null,o.value=A.items||[],i.value=L.items||[]}catch(V){a.value=V.message}}function v(){d.value=null,u.value=p(),l.value=!0}function j(V){d.value=V,u.value={nombre:V.nombre,ai_config_id:V.ai_config_id,tono:V.tono,mensaje_bienvenida:V.mensaje_bienvenida,color:V.color||"#8eb02f",activo:V.activo},l.value=!0}async function P(){try{if(d.value)await se.put(oe(`/umind/agentes/${d.value.ID}`),{tenant_id:n.value,...u.value}),l.value=!1,await y();else{const V=await se.post(oe("/umind/agentes"),{tenant_id:n.value,...u.value});l.value=!1,r.push(`/tenants/${n.value}/agentes/${V.id}`)}}catch(V){a.value=V.message}}async function G(V){confirm(`¿Eliminar el agente "${V.nombre}"? Esto no se puede deshacer.`)&&(await se.del(oe(`/umind/agentes/${V.ID}`)),await y())}return ar(y),(V,A)=>{const L=lr("router-link");return N(),D("div",null,[s.value?(N(),D("div",Nc,[f("h1",Dc,K(s.value.nombre),1),f("p",Mc,K(s.value.dominios_permitidos||"sin dominios configurados"),1)])):re("",!0),a.value?(N(),D("p",Vc,K(a.value),1)):re("",!0),f("div",{class:"flex items-center justify-between mb-4"},[A[9]||(A[9]=f("h2",{class:"text-sm font-medium text-gray-600 dark:text-gray-300"},"Agentes",-1)),f("button",{class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors",onClick:v}," + Nuevo agente ")]),f("div",$c,[o.value.length===0?(N(),D("div",jc," Todavía no hay agentes. Creá el primero. ")):re("",!0),(N(!0),D(he,null,Pe(o.value,k=>(N(),D("div",{key:k.ID,class:"group flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-800"},[be(L,{to:`/tenants/${n.value}/agentes/${k.ID}`,class:"flex-1 min-w-0 p-4"},{default:Qt(()=>[f("div",Uc,K(k.nombre),1),f("div",Lc,[f("span",{class:Se(["w-1.5 h-1.5 rounded-full",!k.activo&&"bg-gray-300 dark:bg-gray-600"]),style:tr({background:k.activo?k.color||"#22c55e":void 0})},null,6),f("span",Fc,K(k.activo?"activo":"inactivo"),1)])]),_:2},1032,["to"]),f("div",Hc,[be(L,{to:`/tenants/${n.value}/agentes/${k.ID}`,class:"text-brand font-medium opacity-0 group-hover:opacity-100 transition-opacity"},{default:Qt(()=>[...A[10]||(A[10]=[ke(" Configurar → ",-1)])]),_:1},8,["to"]),f("button",{class:"text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 opacity-0 group-hover:opacity-100 transition-opacity",title:"Editar",onClick:O=>j(k)},"✎",8,Bc),f("button",{class:"text-gray-400 hover:text-red-600 opacity-0 group-hover:opacity-100 transition-opacity",title:"Eliminar",onClick:O=>G(k)},"✕",8,Kc)])]))),128))]),l.value?(N(),D("div",{key:2,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:A[8]||(A[8]=lt(k=>l.value=!1,["self"]))},[f("div",Gc,[f("h2",Wc,K(d.value?"Editar agente":"Nuevo agente"),1),f("form",{class:"space-y-3",onSubmit:lt(P,["prevent"])},[f("div",null,[A[11]||(A[11]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Nombre",-1)),te(f("input",{"onUpdate:modelValue":A[0]||(A[0]=k=>u.value.nombre=k),required:"",placeholder:"ej: Ventas, Soporte",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,u.value.nombre]])]),f("div",null,[A[13]||(A[13]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Config de IA",-1)),te(f("select",{"onUpdate:modelValue":A[1]||(A[1]=k=>u.value.ai_config_id=k),class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},[A[12]||(A[12]=f("option",{value:null},"— sin asignar —",-1)),(N(!0),D(he,null,Pe(i.value,k=>(N(),D("option",{key:k.ID,value:k.ID},K(k.nombre)+" ("+K(k.provider)+")",9,qc))),128))],512),[[En,u.value.ai_config_id]])]),f("div",null,[A[14]||(A[14]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Tono / personalidad",-1)),te(f("textarea",{"onUpdate:modelValue":A[2]||(A[2]=k=>u.value.tono=k),rows:"2",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,u.value.tono]])]),f("div",null,[A[15]||(A[15]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Mensaje de bienvenida",-1)),te(f("input",{"onUpdate:modelValue":A[3]||(A[3]=k=>u.value.mensaje_bienvenida=k),class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,u.value.mensaje_bienvenida]])]),f("div",null,[A[16]||(A[16]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Color del widget",-1)),f("div",zc,[te(f("input",{"onUpdate:modelValue":A[4]||(A[4]=k=>u.value.color=k),type:"color",class:"w-10 h-9 border border-gray-300 dark:border-gray-700 rounded cursor-pointer bg-white dark:bg-gray-800"},null,512),[[me,u.value.color]]),te(f("input",{"onUpdate:modelValue":A[5]||(A[5]=k=>u.value.color=k),type:"text",pattern:"#[0-9a-fA-F]{6}",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm font-mono"},null,512),[[me,u.value.color]])])]),f("label",Jc,[te(f("input",{"onUpdate:modelValue":A[6]||(A[6]=k=>u.value.activo=k),type:"checkbox"},null,512),[[$t,u.value.activo]]),A[17]||(A[17]=ke(" Activo ",-1))]),f("div",Yc,[f("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:A[7]||(A[7]=k=>l.value=!1)},"Cancelar"),f("button",Qc,K(d.value?"Guardar":"Crear"),1)])],32)])])):re("",!0)])}}},Zc={key:0,class:"mb-6 mt-1"},ed={class:"text-xl font-semibold text-gray-800 dark:text-gray-100"},td={class:"text-xs text-gray-500 dark:text-gray-500 mt-1"},nd={class:"bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded"},rd={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},sd={class:"flex gap-1.5 mb-6 overflow-x-auto pb-1"},od=["onClick"],id={key:2},ad=["disabled"],ld={class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 divide-y divide-gray-100 dark:divide-gray-800"},ud={key:0,class:"p-6 text-sm text-gray-500 dark:text-gray-400"},cd={class:"text-sm text-gray-800 dark:text-gray-200"},dd={class:"text-xs text-gray-500 dark:text-gray-500 mt-0.5"},fd={key:0},gd={key:1,class:"text-red-600 dark:text-red-400"},pd=["onClick"],hd={key:3},md={class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 divide-y divide-gray-100 dark:divide-gray-800"},yd={key:0,class:"p-6 text-sm text-gray-500 dark:text-gray-400"},xd={class:"text-sm text-gray-800 dark:text-gray-200 font-mono"},vd={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},bd={class:"text-xs text-gray-400 dark:text-gray-500 mt-0.5"},_d={key:0,class:"ml-1 text-green-600 dark:text-green-400"},kd={key:1,class:"ml-1 text-gray-400"},wd={class:"flex gap-3 text-sm shrink-0"},Ed=["onClick"],Cd=["onClick"],Ad={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},Sd={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},Rd={class:"border border-gray-200 dark:border-gray-800 rounded-lg p-3 space-y-2"},Id=["onUpdate:modelValue"],Od=["onUpdate:modelValue"],Td=["onUpdate:modelValue"],Pd={class:"text-xs text-gray-500 dark:text-gray-400 flex items-center gap-1"},Nd=["onUpdate:modelValue"],Dd=["onClick"],Md={key:0,class:"text-xs text-gray-400"},Vd={class:"border border-gray-200 dark:border-gray-800 rounded-lg p-3 space-y-2"},$d={class:"flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400"},jd={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},Ud={class:"flex justify-end gap-2 pt-2"},Ld={key:4},Fd={class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 p-4 mb-4"},Hd={class:"flex items-center justify-between mb-2"},Bd={class:"bg-gray-50 dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-lg p-2.5 text-xs text-gray-700 dark:text-gray-300 overflow-x-auto"},Kd={class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 divide-y divide-gray-100 dark:divide-gray-800"},Gd={key:0,class:"p-6 text-sm text-gray-500 dark:text-gray-400"},Wd={class:"flex items-center justify-between"},qd={class:"font-medium text-gray-800 dark:text-gray-200 capitalize"},zd={class:"flex gap-3 text-sm"},Jd=["onClick"],Yd=["onClick"],Qd={class:"flex gap-4 mt-2 text-xs"},Xd={class:"flex items-center gap-1.5 text-gray-600 dark:text-gray-300 cursor-pointer"},Zd=["checked","onChange"],ef={class:"flex items-center gap-1.5 text-gray-600 dark:text-gray-300 cursor-pointer"},tf=["checked","onChange"],nf={class:"text-xs text-gray-500 dark:text-gray-400 mt-1 break-all"},rf={class:"bg-gray-100 dark:bg-gray-800 px-1 rounded"},sf={key:0,class:"text-xs text-gray-400 dark:text-gray-500 mt-1"},of={key:1,class:"text-xs text-red-600 dark:text-red-400 mt-1"},af={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-md"},lf={key:0},uf={class:"flex flex-col gap-2 pt-1"},cf={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300 cursor-pointer"},df={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300 cursor-pointer"},ff={class:"flex justify-end gap-2 pt-2"},gf={key:5},pf={class:"flex gap-2 mb-4"},hf={class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 divide-y divide-gray-100 dark:divide-gray-800"},mf={key:0,class:"p-6 text-sm text-gray-500 dark:text-gray-400"},yf={class:"font-medium text-gray-800 dark:text-gray-200 capitalize"},xf={class:"ml-2 text-sm text-gray-500 dark:text-gray-400"},vf=["onClick"],bf={key:6,class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 p-4 flex flex-col h-[28rem]"},_f={class:"flex-1 overflow-y-auto space-y-2 mb-3"},kf={key:0,class:"text-sm text-gray-500 dark:text-gray-400"},wf={key:1,class:"text-xs text-gray-400 dark:text-gray-500"},Ef=["disabled"],Cf={key:7,class:"grid grid-cols-3 gap-4"},Af={class:"col-span-1 bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 divide-y divide-gray-100 dark:divide-gray-800 max-h-[28rem] overflow-y-auto"},Sf={key:0,class:"p-4 text-sm text-gray-500 dark:text-gray-400"},Rf=["onClick"],If={class:"text-gray-800 dark:text-gray-200 truncate"},Of={class:"text-xs text-gray-400 dark:text-gray-500 mt-0.5"},Tf={class:"col-span-2 bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 p-4 max-h-[28rem] overflow-y-auto space-y-2"},Pf={key:0,class:"text-sm text-gray-500 dark:text-gray-400"},Nf={key:8},Df={class:"bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 divide-y divide-gray-100 dark:divide-gray-800 max-h-[32rem] overflow-y-auto"},Mf={key:0,class:"p-6 text-sm text-gray-500 dark:text-gray-400"},Vf={class:"cursor-pointer flex items-center gap-2 text-sm"},$f={class:"text-gray-400 dark:text-gray-500 text-xs shrink-0"},jf={class:"text-gray-800 dark:text-gray-200 truncate"},Uf={class:"text-gray-400 dark:text-gray-500 text-xs ml-auto shrink-0"},Lf={key:0,class:"mt-2 bg-gray-50 dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-lg p-2 text-xs text-gray-600 dark:text-gray-400 overflow-x-auto whitespace-pre-wrap"},Ff={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=Ee(()=>Number(t.agenteId)),r=Ri(),s=Y(null),o=Y(""),i=Y(typeof r.query.tab=="string"?r.query.tab:"conocimiento"),a=Y([]),l=Y(""),d=Y(30),u=Y(!1);async function p(){const b=await se.get(oe(`/umind/agentes?tenant_id=${t.tenantId}`));s.value=(b.items||[]).find(m=>String(m.ID)===t.agenteId)||null}async function y(){const b=await se.get(oe(`/umind/documentos?agente_id=${t.agenteId}`));a.value=b.items||[]}async function v(){if(l.value.trim()){u.value=!0,o.value="";try{await se.post(oe("/umind/documentos"),{agente_id:n.value,url:l.value.trim(),max_paginas:Number(d.value)||30}),l.value="",await y()}catch(b){o.value=b.message}finally{u.value=!1}}}async function j(b){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await se.del(oe(`/umind/documentos/${b}`)),await y())}const P=Ee(()=>b=>({listo:"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-400",procesando:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-400",pendiente:"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400",error:"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-400"})[b]||"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"),G=Y([]),V=Y([]),A=Y(null);async function L(){const b=await se.get(oe(`/umind/sesiones?agente_id=${t.agenteId}`));G.value=b.items||[]}async function k(b){A.value=b;const m=await se.get(oe(`/umind/historial?agente_id=${t.agenteId}&session_id=${b}`));V.value=m.items||[]}const O=Y([]),ue=Y(!1),F=Y(null),J=Y(qe());function qe(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}async function Ve(){const b=await se.get(oe(`/umind/tools?agente_id=${t.agenteId}`));O.value=b.items||[]}function et(){F.value=null,J.value=qe(),ue.value=!0}function gt(b){F.value=b;let m=[];try{m=JSON.parse(b.parametros_json||"[]")||[]}catch{m=[]}J.value={nombre:b.nombre,descripcion:b.descripcion,url:b.url,auth_header_nombre:b.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:m,activa:b.activa},ue.value=!0}function Ge(){J.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function Nt(b){J.value.parametros.splice(b,1)}async function Rt(){const b={agente_id:n.value,nombre:J.value.nombre.trim(),descripcion:J.value.descripcion,url:J.value.url.trim(),auth_header_nombre:J.value.auth_header_nombre,parametros:J.value.parametros,activa:J.value.activa};J.value.tocarAuth&&(b.auth_header_valor=J.value.auth_header_valor);try{F.value?await se.put(oe(`/umind/tools/${F.value.ID}`),b):await se.post(oe("/umind/tools"),b),ue.value=!1,await Ve()}catch(m){o.value=m.message}}async function ve(b){confirm(`¿Eliminar la tool "${b.nombre}"?`)&&(await se.del(oe(`/umind/tools/${b.ID}`)),await Ve())}const ne=Y([]),Z=Y(!1),X=Y(pt()),Ue=Y(!1),Le=Ee(()=>{var m;const b=((m=s.value)==null?void 0:m.site_key)||"TU_SITE_KEY";return`<script src="${window.location.origin}/widget/umind.js" data-site="${b}" defer><\/script>`});async function Ae(){try{await navigator.clipboard.writeText(Le.value),Ue.value=!0,setTimeout(()=>Ue.value=!1,2e3)}catch{o.value="No se pudo copiar automáticamente — seleccioná el texto y copialo a mano."}}function pt(){return{tipo:"telegram",bot_token:"",phone_number_id:"",access_token:"",app_secret:"",verify_token:"",usar_whisper_audio:!1,usar_ocr_imagenes:!1}}async function Fe(){const b=await se.get(oe(`/umind/canales?agente_id=${t.agenteId}`));ne.value=b.items||[]}function ht(){X.value=pt(),Z.value=!0}async function $e(){const b=X.value.tipo==="telegram"?{bot_token:X.value.bot_token}:{phone_number_id:X.value.phone_number_id,access_token:X.value.access_token,app_secret:X.value.app_secret,verify_token:X.value.verify_token};try{await se.post(oe("/umind/canales"),{agente_id:n.value,tipo:X.value.tipo,credenciales:b,activo:!0,usar_whisper_audio:X.value.usar_whisper_audio,usar_ocr_imagenes:X.value.usar_ocr_imagenes}),Z.value=!1,await Fe()}catch(m){o.value=m.message}}async function E(b){await se.put(oe(`/umind/canales/${b.ID}`),{activo:!b.activo,credenciales:{},usar_whisper_audio:b.usar_whisper_audio,usar_ocr_imagenes:b.usar_ocr_imagenes}),await Fe()}async function U(b){await se.put(oe(`/umind/canales/${b.ID}`),{activo:b.activo,credenciales:{},usar_whisper_audio:!b.usar_whisper_audio,usar_ocr_imagenes:b.usar_ocr_imagenes}),await Fe()}async function M(b){await se.put(oe(`/umind/canales/${b.ID}`),{activo:b.activo,credenciales:{},usar_whisper_audio:b.usar_whisper_audio,usar_ocr_imagenes:!b.usar_ocr_imagenes}),await Fe()}async function H(b){confirm(`¿Eliminar el canal ${b.tipo}?`)&&(await se.del(oe(`/umind/canales/${b.ID}`)),await Fe())}const Q=Y([]);async function c(){const b=await se.get(oe(`/umind/conexiones?agente_id=${t.agenteId}`));Q.value=b.items||[]}function g(b){window.location.href=oe(`/umind/conexiones/conectar?agente_id=${n.value}&proveedor=${b}`)}async function h(b){confirm(`¿Desconectar la cuenta ${b.email||b.proveedor}?`)&&(await se.del(oe(`/umind/conexiones/${b.ID}`)),await c())}const w=`staff-preview-${Math.random().toString(36).slice(2)}`,C=Y([]),_=Y(""),T=Y(!1);async function I(){const b=_.value.trim();if(!(!b||T.value)){_.value="",C.value.push({role:"user",content:b}),T.value=!0;try{const m=await se.post(oe("/umind/chat"),{agente_id:n.value,session_id:w,mensaje:b});C.value.push({role:"assistant",content:m.respuesta})}catch(m){C.value.push({role:"assistant",content:`⚠️ ${m.message}`})}finally{T.value=!1}}}const R=[["conocimiento","Base de conocimiento"],["herramientas","Herramientas"],["canales","Canales"],["conexiones","Conexiones"],["chat","Chat de prueba"],["conversaciones","Conversaciones"],["auditoria","Auditoría"]],S=Y([]);async function W(){const b=await se.get(oe(`/umind/eventos?agente_id=${t.agenteId}`));S.value=b.items||[]}const $=Ee(()=>b=>({error:"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-400",warn:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-400"})[b]||"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400");function B(b){try{return new Date(b).toLocaleString()}catch{return b}}return ar(async()=>{try{await Promise.all([p(),y(),L(),Ve(),Fe(),c(),W()])}catch(b){o.value=b.message}}),(b,m)=>{const ce=lr("router-link");return N(),D("div",null,[be(ce,{to:`/tenants/${e.tenantId}`,class:"text-xs text-gray-500 dark:text-gray-400 hover:text-brand"},{default:Qt(()=>[...m[24]||(m[24]=[ke("← Agentes",-1)])]),_:1},8,["to"]),s.value?(N(),D("div",Zc,[f("h1",ed,K(s.value.nombre),1),f("p",td,[m[25]||(m[25]=ke(" site_key: ",-1)),f("code",nd,K(s.value.site_key),1)])])):re("",!0),o.value?(N(),D("p",rd,K(o.value),1)):re("",!0),f("div",sd,[(N(),D(he,null,Pe(R,([x,ee])=>f("button",{key:x,class:Se(["px-3 py-1.5 rounded-full text-sm whitespace-nowrap transition-colors",i.value===x?"bg-brand text-white font-medium":"bg-white dark:bg-gray-900 text-gray-600 dark:text-gray-400 border border-gray-200 dark:border-gray-800 hover:border-brand/50"]),onClick:fe=>i.value=x},K(ee),11,od)),64))]),i.value==="conocimiento"?(N(),D("div",id,[f("form",{class:"flex gap-2 mb-4",onSubmit:lt(v,["prevent"])},[te(f("input",{"onUpdate:modelValue":m[0]||(m[0]=x=>l.value=x),type:"url",placeholder:"https://ejemplo.com",required:"",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,l.value]]),te(f("input",{"onUpdate:modelValue":m[1]||(m[1]=x=>d.value=x),type:"number",min:"1",max:"200",class:"w-24 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm",title:"Máximo de páginas a crawlear"},null,512),[[me,d.value]]),f("button",{type:"submit",disabled:u.value,class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg disabled:opacity-50 transition-colors"},K(u.value?"Agregando...":"Crawlear sitio"),9,ad)],32),f("div",ld,[a.value.length===0?(N(),D("div",ud,"Sin fuentes todavía.")):re("",!0),(N(!0),D(he,null,Pe(a.value,x=>(N(),D("div",{key:x.ID,class:"p-4 flex items-center justify-between"},[f("div",null,[f("div",cd,K(x.origen),1),f("div",dd,[f("span",{class:Se(["px-1.5 py-0.5 rounded",P.value(x.estado)])},K(x.estado),3),x.total_chunks?(N(),D("span",fd," · "+K(x.total_chunks)+" fragmentos",1)):re("",!0),x.error?(N(),D("span",gd," · "+K(x.error),1)):re("",!0)])]),f("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:ee=>j(x.ID)},"Eliminar",8,pd)]))),128))])])):i.value==="herramientas"?(N(),D("div",hd,[f("div",{class:"flex justify-between items-center mb-4"},[m[26]||(m[26]=f("p",{class:"text-xs text-gray-500 dark:text-gray-400"},"Máximo 10 tools activas por agente.",-1)),f("button",{class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors",onClick:et}," + Nueva tool ")]),f("div",md,[O.value.length===0?(N(),D("div",yd,"Sin tools custom todavía.")):re("",!0),(N(!0),D(he,null,Pe(O.value,x=>(N(),D("div",{key:x.ID,class:"p-4 flex items-center justify-between"},[f("div",null,[f("div",xd,K(x.nombre),1),f("div",vd,K(x.descripcion),1),f("div",bd,[ke(K(x.url)+" ",1),x.auth_configurado?(N(),D("span",_d,"· auth configurada")):re("",!0),x.activa?re("",!0):(N(),D("span",kd,"· inactiva"))])]),f("div",wd,[f("button",{class:"text-gray-500 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-100",onClick:ee=>gt(x)},"Editar",8,Ed),f("button",{class:"text-red-500 hover:text-red-700",onClick:ee=>ve(x)},"Eliminar",8,Cd)])]))),128))]),ue.value?(N(),D("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:m[10]||(m[10]=lt(x=>ue.value=!1,["self"]))},[f("div",Ad,[f("h2",Sd,K(F.value?"Editar tool":"Nueva tool"),1),f("form",{class:"space-y-3",onSubmit:lt(Rt,["prevent"])},[f("div",null,[m[27]||(m[27]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Nombre (identificador, ej: consultar_stock)",-1)),te(f("input",{"onUpdate:modelValue":m[2]||(m[2]=x=>J.value.nombre=x),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm font-mono"},null,512),[[me,J.value.nombre]])]),f("div",null,[m[28]||(m[28]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),te(f("textarea",{"onUpdate:modelValue":m[3]||(m[3]=x=>J.value.descripcion=x),rows:"2",required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,J.value.descripcion]])]),f("div",null,[m[29]||(m[29]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"URL del webhook (https)",-1)),te(f("input",{"onUpdate:modelValue":m[4]||(m[4]=x=>J.value.url=x),type:"url",required:"",placeholder:"https://...",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,J.value.url]])]),f("div",Rd,[f("div",{class:"flex items-center justify-between"},[m[30]||(m[30]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Parámetros que completa el modelo",-1)),f("button",{type:"button",class:"text-xs text-brand",onClick:Ge},"+ agregar")]),(N(!0),D(he,null,Pe(J.value.parametros,(x,ee)=>(N(),D("div",{key:ee,class:"flex gap-2 items-center"},[te(f("input",{"onUpdate:modelValue":fe=>x.nombre=fe,placeholder:"nombre",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded px-2 py-1 text-xs font-mono"},null,8,Id),[[me,x.nombre]]),te(f("select",{"onUpdate:modelValue":fe=>x.tipo=fe,class:"border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded px-2 py-1 text-xs"},[...m[31]||(m[31]=[f("option",{value:"string"},"string",-1),f("option",{value:"number"},"number",-1),f("option",{value:"boolean"},"boolean",-1)])],8,Od),[[En,x.tipo]]),te(f("input",{"onUpdate:modelValue":fe=>x.descripcion=fe,placeholder:"descripción",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded px-2 py-1 text-xs"},null,8,Td),[[me,x.descripcion]]),f("label",Pd,[te(f("input",{"onUpdate:modelValue":fe=>x.requerido=fe,type:"checkbox"},null,8,Nd),[[$t,x.requerido]]),m[32]||(m[32]=ke(" req. ",-1))]),f("button",{type:"button",class:"text-red-400 text-xs",onClick:fe=>Nt(ee)},"✕",8,Dd)]))),128)),J.value.parametros.length===0?(N(),D("p",Md,"Sin parámetros.")):re("",!0)]),f("div",Vd,[m[33]||(m[33]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Autenticación saliente (opcional)",-1)),te(f("input",{"onUpdate:modelValue":m[5]||(m[5]=x=>J.value.auth_header_nombre=x),placeholder:"Nombre del header, ej: Authorization",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,J.value.auth_header_nombre]]),f("label",$d,[te(f("input",{"onUpdate:modelValue":m[6]||(m[6]=x=>J.value.tocarAuth=x),type:"checkbox"},null,512),[[$t,J.value.tocarAuth]]),ke(" "+K(F.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),J.value.tocarAuth?te((N(),D("input",{key:0,"onUpdate:modelValue":m[7]||(m[7]=x=>J.value.auth_header_valor=x),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512)),[[me,J.value.auth_header_valor]]):re("",!0)]),f("label",jd,[te(f("input",{"onUpdate:modelValue":m[8]||(m[8]=x=>J.value.activa=x),type:"checkbox"},null,512),[[$t,J.value.activa]]),m[34]||(m[34]=ke(" Activa ",-1))]),f("div",Ud,[f("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:m[9]||(m[9]=x=>ue.value=!1)},"Cancelar"),m[35]||(m[35]=f("button",{type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},"Guardar",-1))])],32)])])):re("",!0)])):i.value==="canales"?(N(),D("div",Ld,[f("div",Fd,[f("div",Hd,[m[36]||(m[36]=f("div",null,[f("span",{class:"font-medium text-gray-800 dark:text-gray-200"},"Web (widget)"),f("span",{class:"ml-2 px-1.5 py-0.5 rounded text-xs bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-400"}," siempre activo ")],-1)),f("button",{class:Se(["text-sm font-medium px-3 py-1.5 rounded-lg transition-colors",Ue.value?"bg-green-600 text-white":"bg-brand hover:bg-brand-dark text-white"]),onClick:Ae},K(Ue.value?"✓ Copiado":"Copiar código"),3)]),m[37]||(m[37]=f("p",{class:"text-xs text-gray-500 dark:text-gray-400 mb-2"},[ke(" Pegá esto antes de "),f("code",{class:"bg-gray-100 dark:bg-gray-800 px-1 rounded"},"</body>"),ke(" en las páginas de tu sitio. ")],-1)),f("pre",Bd,[f("code",null,K(Le.value),1)])]),f("div",{class:"flex justify-end mb-4"},[f("button",{class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors",onClick:ht}," + Nuevo canal ")]),f("div",Kd,[ne.value.length===0?(N(),D("div",Gd,"Sin canales configurados.")):re("",!0),(N(!0),D(he,null,Pe(ne.value,x=>(N(),D("div",{key:x.ID,class:"p-4"},[f("div",Wd,[f("div",null,[f("span",qd,K(x.tipo),1),f("span",{class:Se(["ml-2 px-1.5 py-0.5 rounded text-xs",x.activo?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},K(x.activo?"activo":"inactivo"),3)]),f("div",zd,[f("button",{class:"text-gray-500 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-100",onClick:ee=>E(x)},K(x.activo?"Desactivar":"Activar"),9,Jd),f("button",{class:"text-red-500 hover:text-red-700",onClick:ee=>H(x)},"Eliminar",8,Yd)])]),f("div",Qd,[f("label",Xd,[f("input",{type:"checkbox",checked:x.usar_whisper_audio,onChange:ee=>U(x),class:"rounded border-gray-300 dark:border-gray-700 text-brand focus:ring-brand"},null,40,Zd),m[38]||(m[38]=ke(" Transcribir audios (Whisper) ",-1))]),f("label",ef,[f("input",{type:"checkbox",checked:x.usar_ocr_imagenes,onChange:ee=>M(x),class:"rounded border-gray-300 dark:border-gray-700 text-brand focus:ring-brand"},null,40,tf),m[39]||(m[39]=ke(" Leer texto de imágenes (OCR) ",-1))])]),f("p",nf,[m[40]||(m[40]=ke(" Webhook: ",-1)),f("code",rf,K(x.webhook_url),1)]),x.tipo==="whatsapp"?(N(),D("p",sf,' Registrá esta URL como "Callback URL" en Meta for Developers → WhatsApp → Configuration, con el mismo verify_token que pusiste acá. ')):re("",!0),x.ultimo_error?(N(),D("p",of,K(x.ultimo_error),1)):re("",!0)]))),128))]),Z.value?(N(),D("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:m[20]||(m[20]=lt(x=>Z.value=!1,["self"]))},[f("div",af,[m[51]||(m[51]=f("h2",{class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},"Nuevo canal",-1)),f("form",{class:"space-y-3",onSubmit:lt($e,["prevent"])},[f("div",null,[m[42]||(m[42]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Tipo",-1)),te(f("select",{"onUpdate:modelValue":m[11]||(m[11]=x=>X.value.tipo=x),class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},[...m[41]||(m[41]=[f("option",{value:"telegram"},"Telegram",-1),f("option",{value:"whatsapp"},"WhatsApp Business",-1)])],512),[[En,X.value.tipo]])]),X.value.tipo==="telegram"?(N(),D("div",lf,[m[43]||(m[43]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Bot token (de @BotFather)",-1)),te(f("input",{"onUpdate:modelValue":m[12]||(m[12]=x=>X.value.bot_token=x),type:"password",required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,X.value.bot_token]])])):(N(),D(he,{key:1},[f("div",null,[m[44]||(m[44]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Phone Number ID",-1)),te(f("input",{"onUpdate:modelValue":m[13]||(m[13]=x=>X.value.phone_number_id=x),required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,X.value.phone_number_id]])]),f("div",null,[m[45]||(m[45]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Access Token",-1)),te(f("input",{"onUpdate:modelValue":m[14]||(m[14]=x=>X.value.access_token=x),type:"password",required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,X.value.access_token]])]),f("div",null,[m[46]||(m[46]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"App Secret",-1)),te(f("input",{"onUpdate:modelValue":m[15]||(m[15]=x=>X.value.app_secret=x),type:"password",required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,X.value.app_secret]])]),f("div",null,[m[47]||(m[47]=f("label",{class:"text-xs text-gray-500 dark:text-gray-400"},"Verify Token (lo inventás vos, lo vas a usar en Meta)",-1)),te(f("input",{"onUpdate:modelValue":m[16]||(m[16]=x=>X.value.verify_token=x),required:"",class:"w-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,X.value.verify_token]])])],64)),f("div",uf,[f("label",cf,[te(f("input",{type:"checkbox","onUpdate:modelValue":m[17]||(m[17]=x=>X.value.usar_whisper_audio=x),class:"rounded border-gray-300 dark:border-gray-700 text-brand focus:ring-brand"},null,512),[[$t,X.value.usar_whisper_audio]]),m[48]||(m[48]=ke(" Transcribir audios con Whisper ",-1))]),f("label",df,[te(f("input",{type:"checkbox","onUpdate:modelValue":m[18]||(m[18]=x=>X.value.usar_ocr_imagenes=x),class:"rounded border-gray-300 dark:border-gray-700 text-brand focus:ring-brand"},null,512),[[$t,X.value.usar_ocr_imagenes]]),m[49]||(m[49]=ke(" Leer texto de imágenes con OCR ",-1))])]),f("div",ff,[f("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:m[19]||(m[19]=x=>Z.value=!1)},"Cancelar"),m[50]||(m[50]=f("button",{type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},"Guardar",-1))])],32)])])):re("",!0)])):i.value==="conexiones"?(N(),D("div",gf,[m[52]||(m[52]=f("p",{class:"text-xs text-gray-500 dark:text-gray-400 mb-4"}," Conectá una cuenta de correo para que este agente pueda enviar y leer correo en su nombre. Se soporta una cuenta activa a la vez. ",-1)),f("div",pf,[f("button",{class:"border border-gray-300 dark:border-gray-700 hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:m[21]||(m[21]=x=>g("google"))}," Conectar Google "),f("button",{class:"border border-gray-300 dark:border-gray-700 hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:m[22]||(m[22]=x=>g("microsoft"))}," Conectar Outlook ")]),f("div",hf,[Q.value.length===0?(N(),D("div",mf,"Sin cuentas conectadas.")):re("",!0),(N(!0),D(he,null,Pe(Q.value,x=>(N(),D("div",{key:x.ID,class:"p-4 flex items-center justify-between"},[f("div",null,[f("span",yf,K(x.proveedor),1),f("span",xf,K(x.email),1),f("span",{class:Se(["ml-2 px-1.5 py-0.5 rounded text-xs",x.activo?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},K(x.activo?"activa":"inactiva"),3)]),f("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:ee=>h(x)},"Desconectar",8,vf)]))),128))])])):i.value==="chat"?(N(),D("div",bf,[f("div",_f,[C.value.length===0?(N(),D("p",kf," Probá este agente tal cual lo va a ver un visitante — usa la misma config de IA y las mismas tools/base de conocimiento. ")):re("",!0),(N(!0),D(he,null,Pe(C.value,(x,ee)=>(N(),D("div",{key:ee,class:Se(["max-w-[80%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap",x.role==="user"?"bg-brand text-white ml-auto":"bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-gray-100"])},K(x.content),3))),128)),T.value?(N(),D("p",wf,"Pensando...")):re("",!0)]),f("form",{class:"flex gap-2",onSubmit:lt(I,["prevent"])},[te(f("input",{"onUpdate:modelValue":m[23]||(m[23]=x=>_.value=x),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm"},null,512),[[me,_.value]]),f("button",{type:"submit",disabled:T.value,class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg disabled:opacity-50 transition-colors"}," Enviar ",8,Ef)],32)])):i.value==="conversaciones"?(N(),D("div",Cf,[f("div",Af,[G.value.length===0?(N(),D("div",Sf,"Sin conversaciones.")):re("",!0),(N(!0),D(he,null,Pe(G.value,x=>(N(),D("button",{key:x.session_id,class:Se(["w-full text-left p-3 hover:bg-gray-50 dark:hover:bg-gray-800 text-sm",A.value===x.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:ee=>k(x.session_id)},[f("div",If,K(x.content),1),f("div",Of,K(x.session_id),1)],10,Rf))),128))]),f("div",Tf,[A.value?re("",!0):(N(),D("p",Pf,"Elegí una conversación de la izquierda.")),(N(!0),D(he,null,Pe(V.value,x=>(N(),D("div",{key:x.ID,class:Se(["max-w-[80%] px-3 py-2 rounded-lg text-sm",x.role==="user"?"bg-brand text-white ml-auto":"bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-gray-100"])},K(x.content),3))),128))])])):(N(),D("div",Nf,[m[53]||(m[53]=f("p",{class:"text-xs text-gray-500 dark:text-gray-400 mb-4"}," Errores y eventos técnicos de este agente — fallos al llamar al AI, a tools, a correo o a los canales. Últimos 100. ",-1)),f("div",Df,[S.value.length===0?(N(),D("div",Mf,"Sin eventos registrados — buena señal.")):re("",!0),(N(!0),D(he,null,Pe(S.value,x=>(N(),D("details",{key:x.ID,class:"p-3"},[f("summary",Vf,[f("span",{class:Se(["px-1.5 py-0.5 rounded text-xs shrink-0",$.value(x.nivel)])},K(x.nivel),3),f("span",$f,K(x.origen),1),f("span",jf,K(x.mensaje),1),f("span",Uf,K(B(x.CreatedAt)),1)]),x.detalle?(N(),D("pre",Lf,K(x.detalle),1)):re("",!0)]))),128))])]))])}}},Hf=rc({history:Mu(kt.baseRuta),routes:[{path:"/",name:"home",component:Pc},{path:"/tenants/:id",name:"tenant-agentes",component:Xc,props:!0},{path:"/tenants/:tenantId/agentes/:agenteId",name:"agente-detail",component:Ff,props:!0}]});Jl(Rc).use(Hf).mount("#app");