En "Dónde atiende", el canal correo: el agente lee una casilla y responde solo los correos que llegan, con su base de conocimiento, igual que atiende WhatsApp. Como el correo no tiene webhook, se revisa por intervalo — y el intervalo lo elige el cliente por canal (2 a 60 minutos): una inmobiliaria quiere 2, a un estudio contable con 30 le sobra. El cron corre cada minuto pero cada casilla se revisa solo cuando le toca, con un pool de 8 para que 100 casillas no salgan a la red en el mismo instante. Las guardas que separan "asistente" de "incidente", cada una con su test: nunca responde correo automático ni se responde a sí mismo (el bucle con otro autoresponder); la revisión se marca ANTES de conectar, así una contraseña cambiada no martilla el login cada minuto hasta que el host del cliente nos bloquea; y el correo se marca leído recién cuando la respuesta salió — si el envío falla, queda sin leer y se reintenta. En "Lo que sabe", las cuentas de correo: casillas que el agente consulta a pedido — "revisame los correos de hoy y haceme un resumen" — sin nada de fondo. Solo lectura en serio: Peek, INBOX en read-only, y un test que falla si alguien le agrega un marcado. Ahora se pueden conectar varias por agente; con más de una, el modelo pregunta cuál en vez de adivinar — resumirle a alguien la casilla que no pidió no es un error menor. El alta pide correo y contraseña: el host se deduce (mail.<dominio>) y el campo técnico aparece recién si eso falla. Se prueba la conexión antes de guardar, con la persona mirando. Enviar por una cuenta conectada está bloqueado a propósito: para responder correos está el canal, con sus guardas. Una tool de envío sin límites es una máquina de spam con el dominio del cliente. La navegación acompaña: "Lo que sabe" agrupa Información, Cuentas de correo y Herramientas — tres formas de saber, no tres pantallas sueltas — y Avanzado queda solo con Problemas. El SMTP se unificó en una sola implementación que comparten soporte y el canal: el bug de STARTTLS que abría dos conexiones ya se pagó una vez. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
27 lines
186 KiB
JavaScript
27 lines
186 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/**
|
|
* @vue/shared v3.5.41
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Js(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const we={},tn=[],yt=()=>{},xr=()=>!1,os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),rs=e=>e.startsWith("onUpdate:"),Ve=Object.assign,Ys=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},zl=Object.prototype.hasOwnProperty,ve=(e,t)=>zl.call(e,t),Z=Array.isArray,nn=e=>Vn(e)==="[object Map]",pn=e=>Vn(e)==="[object Set]",_o=e=>Vn(e)==="[object Date]",re=e=>typeof e=="function",Ce=e=>typeof e=="string",it=e=>typeof e=="symbol",ge=e=>e!==null&&typeof e=="object",yr=e=>(ge(e)||re(e))&&re(e.then)&&re(e.catch),_r=Object.prototype.toString,Vn=e=>_r.call(e),Ql=e=>Vn(e).slice(8,-1),wr=e=>Vn(e)==="[object Object]",Zs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wn=Js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ls=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Jl=/-\w/g,Be=ls(e=>e.replace(Jl,t=>t.slice(1).toUpperCase())),Yl=/\B([A-Z])/g,Yt=ls(e=>e.replace(Yl,"-$1").toLowerCase()),is=ls(e=>e.charAt(0).toUpperCase()+e.slice(1)),_s=ls(e=>e?`on${is(e)}`:""),xt=(e,t)=>!Object.is(e,t),Wn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},kr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},as=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let wo;const us=()=>wo||(wo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Jt(e){if(Z(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=Ce(s)?ti(s):Jt(s);if(o)for(const r in o)t[r]=o[r]}return t}else if(Ce(e)||ge(e))return e}const Zl=/;(?![^(]*\))/g,Xl=/:([^]+)/,ei=/\/\*[^]*?\*\//g;function ti(e){const t={};return e.replace(ei,"").split(Zl).forEach(n=>{if(n){const s=n.split(Xl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ue(e){let t="";if(Ce(e))t=e;else if(Z(e))for(let n=0;n<e.length;n++){const s=ue(e[n]);s&&(t+=s+" ")}else if(ge(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const ni="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",si=Js(ni);function Cr(e){return!!e||e===""}function oi(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Ft(e[s],t[s]);return n}function Ft(e,t){if(e===t)return!0;let n=_o(e),s=_o(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=it(e),s=it(t),n||s)return e===t;if(n=Z(e),s=Z(t),n||s)return n&&s?oi(e,t):!1;if(n=ge(e),s=ge(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const a=e.hasOwnProperty(i),u=t.hasOwnProperty(i);if(a&&!u||!a&&u||!Ft(e[i],t[i]))return!1}}return String(e)===String(t)}function Xs(e,t){return e.findIndex(n=>Ft(n,t))}const $r=e=>!!(e&&e.__v_isRef===!0),I=e=>Ce(e)?e:e==null?"":Z(e)||ge(e)&&(e.toString===_r||!re(e.toString))?$r(e)?I(e.value):JSON.stringify(e,Ar,2):String(e),Ar=(e,t)=>$r(t)?Ar(e,t.value):nn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[ws(s,r)+" =>"]=o,n),{})}:pn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ws(n))}:it(t)?ws(t):ge(t)&&!Z(t)&&!wr(t)?String(t):t,ws=(e,t="")=>{var n;return it(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 Me;class ri{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&&Me&&(Me.active?(this.parent=Me,this.index=(Me.scopes||(Me.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 s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[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 o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Me;try{return Me=this,t()}finally{Me=n}}}on(){++this._on===1&&(this.prevScope=Me,Me=this)}off(){if(this._on>0&&--this._on===0){if(Me===this)Me=this.prevScope;else{let t=Me;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,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(n=0,s=o.length;n<s;n++)o[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function li(){return Me}let ke;const ks=new WeakSet;class Sr{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,Me&&(Me.active?Me.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ks.has(this)&&(ks.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ir(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ko(this),Rr(this);const t=ke,n=ot;ke=this,ot=!0;try{return this.fn()}finally{Pr(this),ke=t,ot=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)no(t);this.deps=this.depsTail=void 0,ko(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ks.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ns(this)&&this.run()}get dirty(){return Ns(this)}}let Er=0,kn,Cn;function Ir(e,t=!1){if(e.flags|=8,t){e.next=Cn,Cn=e;return}e.next=kn,kn=e}function eo(){Er++}function to(){if(--Er>0)return;if(Cn){let t=Cn;for(Cn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;kn;){let t=kn;for(kn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Rr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Pr(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),no(s),ii(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ns(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Tr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Tr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===En)||(e.globalVersion=En,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ns(e))))return;e.flags|=2;const t=e.dep,n=ke,s=ot;ke=e,ot=!0;try{Rr(e);const o=e.fn(e._value);(t.version===0||xt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ke=n,ot=s,Pr(e),e.flags&=-3}}function no(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)no(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ii(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ot=!0;const Or=[];function Ot(){Or.push(ot),ot=!1}function Dt(){const e=Or.pop();ot=e===void 0?!0:e}function ko(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ke;ke=void 0;try{t()}finally{ke=n}}}let En=0;class ai{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 so{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(!ke||!ot||ke===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ke)n=this.activeLink=new ai(ke,this),ke.deps?(n.prevDep=ke.depsTail,ke.depsTail.nextDep=n,ke.depsTail=n):ke.deps=ke.depsTail=n,Dr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ke.depsTail,n.nextDep=void 0,ke.depsTail.nextDep=n,ke.depsTail=n,ke.deps===n&&(ke.deps=s)}return n}trigger(t){this.version++,En++,this.notify(t)}notify(t){eo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{to()}}}function Dr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Dr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Vs=new WeakMap,zt=Symbol(""),js=Symbol(""),In=Symbol("");function je(e,t,n){if(ot&&ke){let s=Vs.get(e);s||Vs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new so),o.map=s,o.key=n),o.track()}}function Et(e,t,n,s,o,r){const i=Vs.get(e);if(!i){En++;return}const a=u=>{u&&u.trigger()};if(eo(),t==="clear")i.forEach(a);else{const u=Z(e),d=u&&Zs(n);if(u&&n==="length"){const c=Number(s);i.forEach((m,p)=>{(p==="length"||p===In||!it(p)&&p>=c)&&a(m)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),d&&a(i.get(In)),t){case"add":u?d&&a(i.get("length")):(a(i.get(zt)),nn(e)&&a(i.get(js)));break;case"delete":u||(a(i.get(zt)),nn(e)&&a(i.get(js)));break;case"set":nn(e)&&a(i.get(zt));break}}to()}function Zt(e){const t=he(e);return t===e?t:(je(t,"iterate",In),tt(e)?t:t.map(at))}function cs(e){return je(e=he(e),"iterate",In),e}function gt(e,t){return Mt(e)?an(Qt(e)?at(t):t):at(t)}const ui={__proto__:null,[Symbol.iterator](){return Cs(this,Symbol.iterator,e=>gt(this,e))},concat(...e){return Zt(this).concat(...e.map(t=>Z(t)?Zt(t):t))},entries(){return Cs(this,"entries",e=>(e[1]=gt(this,e[1]),e))},every(e,t){return Ct(this,"every",e,t,void 0,arguments)},filter(e,t){return Ct(this,"filter",e,t,n=>n.map(s=>gt(this,s)),arguments)},find(e,t){return Ct(this,"find",e,t,n=>gt(this,n),arguments)},findIndex(e,t){return Ct(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ct(this,"findLast",e,t,n=>gt(this,n),arguments)},findLastIndex(e,t){return Ct(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ct(this,"forEach",e,t,void 0,arguments)},includes(...e){return $s(this,"includes",e)},indexOf(...e){return $s(this,"indexOf",e)},join(e){return Zt(this).join(e)},lastIndexOf(...e){return $s(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return vn(this,"pop")},push(...e){return vn(this,"push",e)},reduce(e,...t){return Co(this,"reduce",e,t)},reduceRight(e,...t){return Co(this,"reduceRight",e,t)},shift(){return vn(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return vn(this,"splice",e)},toReversed(){return Zt(this).toReversed()},toSorted(e){return Zt(this).toSorted(e)},toSpliced(...e){return Zt(this).toSpliced(...e)},unshift(...e){return vn(this,"unshift",e)},values(){return Cs(this,"values",e=>gt(this,e))}};function Cs(e,t,n){const s=cs(e),o=s[t]();return s!==e&&!tt(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const ci=Array.prototype;function Ct(e,t,n,s,o,r){const i=cs(e),a=i!==e&&!tt(e),u=i[t];if(u!==ci[t]){const m=u.apply(e,r);return a?at(m):m}let d=n;i!==e&&(a?d=function(m,p){return n.call(this,gt(e,m),p,e)}:n.length>2&&(d=function(m,p){return n.call(this,m,p,e)}));const c=u.call(i,d,s);return a&&o?o(c):c}function Co(e,t,n,s){const o=cs(e),r=o!==e&&!tt(e);let i=n,a=!1;o!==e&&(r?(a=s.length===0,i=function(d,c,m){return a&&(a=!1,d=gt(e,d)),n.call(this,d,gt(e,c),m,e)}):n.length>3&&(i=function(d,c,m){return n.call(this,d,c,m,e)}));const u=o[t](i,...s);return a?gt(e,u):u}function $s(e,t,n){const s=he(e);je(s,"iterate",In);const o=s[t](...n);return(o===-1||o===!1)&&lo(n[0])?(n[0]=he(n[0]),s[t](...n)):o}function vn(e,t,n=[]){Ot(),eo();const s=he(e)[t].apply(e,n);return to(),Dt(),s}const di=Js("__proto__,__v_isRef,__isVue"),Mr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(it));function fi(e){it(e)||(e=String(e));const t=he(this);return je(t,"has",e),t.hasOwnProperty(e)}class Nr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(o?r?wi:Lr:r?Ur:jr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Z(t);if(!o){let u;if(i&&(u=ui[n]))return u;if(n==="hasOwnProperty")return fi}const a=Reflect.get(t,n,Le(t)?t:s);if((it(n)?Mr.has(n):di(n))||(o||je(t,"get",n),r))return a;if(Le(a)){const u=i&&Zs(n)?a:a.value;return o&&ge(u)?Ls(u):u}return ge(a)?o?Ls(a):ds(a):a}}class Vr extends Nr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=Z(t)&&Zs(n);if(!this._isShallow){const d=Mt(r);if(!tt(s)&&!Mt(s)&&(r=he(r),s=he(s)),!i&&Le(r)&&!Le(s))return d||(r.value=s),!0}const a=i?Number(n)<t.length:ve(t,n),u=Reflect.set(t,n,s,Le(t)?t:o);return t===he(o)&&u&&(a?xt(s,r)&&Et(t,"set",n,s):Et(t,"add",n,s)),u}deleteProperty(t,n){const s=ve(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Et(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!it(n)||!Mr.has(n))&&je(t,"has",n),s}ownKeys(t){return je(t,"iterate",Z(t)?"length":zt),Reflect.ownKeys(t)}}class pi extends Nr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const mi=new Vr,hi=new pi,vi=new Vr(!0);const Us=e=>e,Ln=e=>Reflect.getPrototypeOf(e);function gi(e,t,n){return function(...s){const o=this.__v_raw,r=he(o),i=nn(r),a=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,d=o[e](...s),c=n?Us:t?an:at;return!t&&je(r,"iterate",u?js:zt),Ve(Object.create(d),{next(){const{value:m,done:p}=d.next();return p?{value:m,done:p}:{value:a?[c(m[0]),c(m[1])]:c(m),done:p}}})}}function Fn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function bi(e,t){const n={get(o){const r=this.__v_raw,i=he(r),a=he(o);e||(xt(o,a)&&je(i,"get",o),je(i,"get",a));const{has:u}=Ln(i),d=t?Us:e?an:at;if(u.call(i,o))return d(r.get(o));if(u.call(i,a))return d(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&je(he(o),"iterate",zt),o.size},has(o){const r=this.__v_raw,i=he(r),a=he(o);return e||(xt(o,a)&&je(i,"has",o),je(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,u=he(a),d=t?Us:e?an:at;return!e&&je(u,"iterate",zt),a.forEach((c,m)=>o.call(r,d(c),d(m),i))}};return Ve(n,e?{add:Fn("add"),set:Fn("set"),delete:Fn("delete"),clear:Fn("clear")}:{add(o){const r=he(this),i=Ln(r),a=he(o),u=!t&&!tt(o)&&!Mt(o)?a:o;return i.has.call(r,u)||xt(o,u)&&i.has.call(r,o)||xt(a,u)&&i.has.call(r,a)||(r.add(u),Et(r,"add",u,u)),this},set(o,r){!t&&!tt(r)&&!Mt(r)&&(r=he(r));const i=he(this),{has:a,get:u}=Ln(i);let d=a.call(i,o);d||(o=he(o),d=a.call(i,o));const c=u.call(i,o);return i.set(o,r),d?xt(r,c)&&Et(i,"set",o,r):Et(i,"add",o,r),this},delete(o){const r=he(this),{has:i,get:a}=Ln(r);let u=i.call(r,o);u||(o=he(o),u=i.call(r,o)),a&&a.call(r,o);const d=r.delete(o);return u&&Et(r,"delete",o,void 0),d},clear(){const o=he(this),r=o.size!==0,i=o.clear();return r&&Et(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=gi(o,e,t)}),n}function oo(e,t){const n=bi(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ve(n,o)&&o in s?n:s,o,r)}const xi={get:oo(!1,!1)},yi={get:oo(!1,!0)},_i={get:oo(!0,!1)};const jr=new WeakMap,Ur=new WeakMap,Lr=new WeakMap,wi=new WeakMap;function ki(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return Mt(e)?e:ro(e,!1,mi,xi,jr)}function Fr(e){return ro(e,!1,vi,yi,Ur)}function Ls(e){return ro(e,!0,hi,_i,Lr)}function ro(e,t,n,s,o){if(!ge(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=o.get(e);if(r)return r;const i=ki(Ql(e));if(i===0)return e;const a=new Proxy(e,i===2?s:n);return o.set(e,a),a}function Qt(e){return Mt(e)?Qt(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function tt(e){return!!(e&&e.__v_isShallow)}function lo(e){return e?!!e.__v_raw:!1}function he(e){const t=e&&e.__v_raw;return t?he(t):e}function Ci(e){return!ve(e,"__v_skip")&&Object.isExtensible(e)&&kr(e,"__v_skip",!0),e}const at=e=>ge(e)?ds(e):e,an=e=>ge(e)?Ls(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function L(e){return qr(e,!1)}function $i(e){return qr(e,!0)}function qr(e,t){return Le(e)?e:new Ai(e,t)}class Ai{constructor(t,n){this.dep=new so,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:he(t),this._value=n?t:at(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||tt(t)||Mt(t);t=s?t:he(t),xt(t,n)&&(this._rawValue=t,this._value=s?t:at(t),this.dep.trigger())}}function Pe(e){return Le(e)?e.value:e}const Si={get:(e,t,n)=>t==="__v_raw"?e:Pe(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Le(o)&&!Le(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Hr(e){return Qt(e)?e:new Proxy(e,Si)}class Ei{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new so(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=En-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ke!==this)return Ir(this,!0),!0}get value(){const t=this.dep.track();return Tr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ii(e,t,n=!1){let s,o;return re(e)?s=e:(s=e.get,o=e.set),new Ei(s,o,n)}const qn={},Jn=new WeakMap;let Wt;function Ri(e,t=!1,n=Wt){if(n){let s=Jn.get(n);s||Jn.set(n,s=[]),s.push(e)}}function Pi(e,t,n=we){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:a,call:u}=n,d=g=>o?g:tt(g)||o===!1||o===0?It(g,1):It(g);let c,m,p,b,S=!1,$=!1;if(Le(e)?(m=()=>e.value,S=tt(e)):Qt(e)?(m=()=>d(e),S=!0):Z(e)?($=!0,S=e.some(g=>Qt(g)||tt(g)),m=()=>e.map(g=>{if(Le(g))return g.value;if(Qt(g))return d(g);if(re(g))return u?u(g,2):g()})):re(e)?t?m=u?()=>u(e,2):e:m=()=>{if(p){Ot();try{p()}finally{Dt()}}const g=Wt;Wt=c;try{return u?u(e,3,[b]):e(b)}finally{Wt=g}}:m=yt,t&&o){const g=m,_=o===!0?1/0:o;m=()=>It(g(),_)}const R=li(),O=()=>{c.stop(),R&&R.active&&Ys(R.effects,c)};if(r&&t){const g=t;t=(..._)=>{const j=g(..._);return O(),j}}let C=$?new Array(e.length).fill(qn):qn;const x=g=>{if(!(!(c.flags&1)||!c.dirty&&!g))if(t){const _=c.run();if(g||o||S||($?_.some((j,H)=>xt(j,C[H])):xt(_,C))){p&&p();const j=Wt;Wt=c;try{const H=[_,C===qn?void 0:$&&C[0]===qn?[]:C,b];C=_,u?u(t,3,H):t(...H)}finally{Wt=j}}}else c.run()};return a&&a(x),c=new Sr(m),c.scheduler=i?()=>i(x,!1):x,b=g=>Ri(g,!1,c),p=c.onStop=()=>{const g=Jn.get(c);if(g){if(u)u(g,4);else for(const _ of g)_();Jn.delete(c)}},t?s?x(!0):C=c.run():i?i(x.bind(null,!0),!0):c.run(),O.pause=c.pause.bind(c),O.resume=c.resume.bind(c),O.stop=O,O}function It(e,t=1/0,n){if(t<=0||!ge(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Le(e))It(e.value,t,n);else if(Z(e))for(let s=0;s<e.length;s++)It(e[s],t,n);else if(pn(e)||nn(e))e.forEach(s=>{It(s,t,n)});else if(wr(e)){for(const s in e)It(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&It(e[s],t,n)}return e}/**
|
|
* @vue/runtime-core v3.5.41
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function jn(e,t,n,s){try{return s?e(...s):e()}catch(o){fs(o,t,n)}}function ut(e,t,n,s){if(re(e)){const o=jn(e,t,n,s);return o&&yr(o)&&o.catch(r=>{fs(r,t,n)}),o}if(Z(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ut(e[r],t,n,s));return o}}function fs(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||we;if(t){let a=t.parent;const u=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let m=0;m<c.length;m++)if(c[m](e,u,d)===!1)return}a=a.parent}if(r){Ot(),jn(r,null,10,[e,u,d]),Dt();return}}Ti(e,n,o,s,i)}function Ti(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const He=[];let vt=-1;const sn=[];let Ut=null,Xt=0;const Br=Promise.resolve();let Yn=null;function io(e){const t=Yn||Br;return e?t.then(this?e.bind(this):e):t}function Oi(e){let t=vt+1,n=He.length;for(;t<n;){const s=t+n>>>1,o=He[s],r=Rn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function ao(e){if(!(e.flags&1)){const t=Rn(e),n=He[He.length-1];!n||!(e.flags&2)&&t>=Rn(n)?He.push(e):He.splice(Oi(t),0,e),e.flags|=1,Gr()}}function Gr(){Yn||(Yn=Br.then(Kr))}function Di(e){if(!Z(e))Ut&&e.id===-1?Ut.splice(Xt+1,0,e):e.flags&1||(sn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)sn.push(e[t]);Gr()}function $o(e,t,n=vt+1){for(;n<He.length;n++){const s=He[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;He.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Wr(e){if(sn.length){const t=[...new Set(sn)].sort((n,s)=>Rn(n)-Rn(s));if(sn.length=0,Ut){for(let n=0;n<t.length;n++)Ut.push(t[n]);return}for(Ut=t,Xt=0;Xt<Ut.length;Xt++){const n=Ut[Xt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ut=null,Xt=0}}const Rn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Kr(e){try{for(vt=0;vt<He.length;vt++){const t=He[vt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),jn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;vt<He.length;vt++){const t=He[vt];t&&(t.flags&=-2)}vt=-1,He.length=0,Wr(),Yn=null,(He.length||sn.length)&&Kr()}}let Ne=null,zr=null;function Zn(e){const t=Ne;return Ne=e,zr=e&&e.type.__scopeId||null,t}function st(e,t=Ne,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&ts(-1);const r=Zn(t),i=Tt.length;let a;try{a=e(...o)}finally{for(let u=Tt.length;u>i;u--)mo();Zn(r),s._d&&ts(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function z(e,t){if(Ne===null)return e;const n=bs(Ne),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,u=we]=t[o];r&&(re(r)&&(r={mounted:r,updated:r}),r.deep&&It(i),s.push({dir:r,instance:n,value:i,oldValue:void 0,arg:a,modifiers:u}))}return e}function Bt(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let u=a.dir[s];u&&(Ot(),ut(u,n,8,[e.el,a,e,t]),Dt())}}function Kn(e,t){if(Ue){let n=Ue.provides;const s=Ue.parent&&Ue.parent.provides;s===n&&(n=Ue.provides=Object.create(s)),n[e]=t}}function rt(e,t,n=!1){const s=Ia();if(s||rn){let o=rn?rn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&re(t)?t.call(s&&s.proxy):t}}const Mi=Symbol.for("v-scx"),Ni=()=>rt(Mi);function Pt(e,t,n){return Qr(e,t,n)}function Qr(e,t,n=we){const{immediate:s,deep:o,flush:r,once:i}=n,a=Ve({},n),u=t&&s||!t&&r!=="post";let d;if(Dn){if(r==="sync"){const b=Ni();d=b.__watcherHandles||(b.__watcherHandles=[])}else if(!u){const b=()=>{};return b.stop=yt,b.resume=yt,b.pause=yt,b}}const c=Ue;a.call=(b,S,$)=>ut(b,c,S,$);let m=!1;r==="post"?a.scheduler=b=>{ze(b,c&&c.suspense)}:r!=="sync"&&(m=!0,a.scheduler=(b,S)=>{S?b():ao(b)}),a.augmentJob=b=>{t&&(b.flags|=4),m&&(b.flags|=2,c&&(b.id=c.uid,b.i=c))};const p=Pi(e,t,a);return Dn&&(d?d.push(p):u&&p()),p}function Vi(e,t,n){const s=this.proxy,o=Ce(e)?e.includes(".")?Jr(s,e):()=>s[e]:e.bind(s,s);let r;re(t)?r=t:(r=t.handler,n=t);const i=Un(this),a=Qr(o,r.bind(s),n);return i(),a}function Jr(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const ji=Symbol("_vte"),ps=e=>e.__isTeleport,As=Symbol("_leaveCb");function Ui(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==wt){t=n;break}}return t}function Yr(e){if(!co(e))return ps(e.type)&&e.children?Ui(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&&re(n.default))return n.default()}}function uo(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;uo(ps(n.type)&&Yr(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 Zr(e,t){return re(e)?Ve({name:e.name},t,{setup:e}):e}function Xr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ao(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Xn=new WeakMap;function $n(e,t,n,s,o=!1){if(Z(e)){e.forEach(($,R)=>$n($,t&&(Z(t)?t[R]:t),n,s,o));return}if(on(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&$n(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?bs(s.component):s.el,i=o?null:r,{i:a,r:u}=e,d=t&&t.r,c=a.refs===we?a.refs={}:a.refs,m=a.setupState,p=he(m),b=m===we?xr:$=>Ao(c,$)?!1:ve(p,$),S=($,R)=>!(R&&Ao(c,R));if(d!=null&&d!==u){if(So(t),Ce(d))c[d]=null,b(d)&&(m[d]=null);else if(Le(d)){const $=t;S(d,$.k)&&(d.value=null),$.k&&(c[$.k]=null)}}if(re(u))jn(u,a,12,[i,c]);else{const $=Ce(u),R=Le(u);if($||R){const O=()=>{if(e.f){const C=$?b(u)?m[u]:c[u]:S()||!e.k?u.value:c[e.k];if(o)Z(C)&&Ys(C,r);else if(Z(C))C.includes(r)||C.push(r);else if($)c[u]=[r],b(u)&&(m[u]=c[u]);else{const x=[r];S(u,e.k)&&(u.value=x),e.k&&(c[e.k]=x)}}else $?(c[u]=i,b(u)&&(m[u]=i)):R&&(S(u,e.k)&&(u.value=i),e.k&&(c[e.k]=i))};if(i){const C=()=>{O(),Xn.delete(e)};C.id=-1,Xn.set(e,C),ze(C,n)}else So(e),O()}}}function So(e){const t=Xn.get(e);t&&(t.flags|=8,Xn.delete(e))}us().requestIdleCallback;us().cancelIdleCallback;const on=e=>!!e.type.__asyncLoader,co=e=>e.type.__isKeepAlive;function Li(e,t){el(e,"a",t)}function Fi(e,t){el(e,"da",t)}function el(e,t,n=Ue){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ms(t,s,n),n){let o=n.parent;for(;o&&o.parent;)co(o.parent.vnode)&&qi(s,t,n,o),o=o.parent}}function qi(e,t,n,s){const o=ms(t,e,s,!0);nl(()=>{Ys(s[t],o)},n)}function ms(e,t,n=Ue,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{Ot();const a=Un(n),u=ut(t,n,e,i);return a(),Dt(),u});return s?o.unshift(r):o.push(r),r}}const Nt=e=>(t,n=Ue)=>{(!Dn||e==="sp")&&ms(e,(...s)=>t(...s),n)},Hi=Nt("bm"),hs=Nt("m"),Bi=Nt("bu"),Gi=Nt("u"),tl=Nt("bum"),nl=Nt("um"),Wi=Nt("sp"),Ki=Nt("rtg"),zi=Nt("rtc");function Qi(e,t=Ue){ms("ec",e,t)}const sl="components";function mn(e,t){return rl(sl,e,!0,t)||e}const ol=Symbol.for("v-ndc");function Ji(e){return Ce(e)?rl(sl,e,!1)||e:e||ol}function rl(e,t,n=!0,s=!1){const o=Ne||Ue;if(o){const r=o.type;{const a=Da(r,!1);if(a&&(a===t||a===Be(t)||a===is(Be(t))))return r}const i=Eo(o[e]||r[e],t)||Eo(o.appContext[e],t);return!i&&s?r:i}}function Eo(e,t){return e&&(e[t]||e[Be(t)]||e[is(Be(t))])}function xe(e,t,n,s){let o;const r=n,i=Z(e);if(i||Ce(e)){const a=i&&Qt(e);let u=!1,d=!1;a&&(u=!tt(e),d=Mt(e),e=cs(e)),o=new Array(e.length);for(let c=0,m=e.length;c<m;c++)o[c]=t(u?d?an(at(e[c])):at(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(ge(e))if(e[Symbol.iterator])o=Array.from(e,(a,u)=>t(a,u,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let u=0,d=a.length;u<d;u++){const c=a[u];o[u]=t(e[c],c,u,r)}}else o=[];return o}function Yi(e,t,n,s,o,r){if(n==null&&(n={}),Ne.ce||Ne.parent&&on(Ne.parent)&&Ne.parent.ce){const d=n,c=Object.keys(d).length>0;return v(),_e(ee,null,[oe("slot",d,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const a=Tt.length;v();let u;try{const d=i&&ll(i(n)),c=n.key||r||d&&d.key;u=_e(ee,{key:(c&&!it(c)?c:`_${t}`)+(!d&&s?"_fb":"")},d||(s?s():[]),d&&e._===1?64:-2)}catch(d){for(let c=Tt.length;c>a;c--)mo();throw d}finally{i&&i._c&&(i._d=!0)}return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),u}function ll(e){return e.some(t=>Tn(t)?!(t.type===wt||t.type===ee&&!ll(t.children)):!0)?e:null}const Fs=e=>e?El(e)?bs(e):Fs(e.parent):null,An=Ve(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=>Fs(e.parent),$root:e=>Fs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>al(e),$forceUpdate:e=>e.f||(e.f=()=>{ao(e.update)}),$nextTick:e=>e.n||(e.n=io.bind(e.proxy)),$watch:e=>Vi.bind(e)}),Ss=(e,t)=>e!==we&&!e.__isScriptSetup&&ve(e,t),Zi={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:a,appContext:u}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Ss(s,t))return i[t]=1,s[t];if(o!==we&&ve(o,t))return i[t]=2,o[t];if(ve(r,t))return i[t]=3,r[t];if(n!==we&&ve(n,t))return i[t]=4,n[t];qs&&(i[t]=0)}}const d=An[t];let c,m;if(d)return t==="$attrs"&&je(e.attrs,"get",""),d(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==we&&ve(n,t))return i[t]=4,n[t];if(m=u.config.globalProperties,ve(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Ss(o,t)?(o[t]=n,!0):s!==we&&ve(s,t)?(s[t]=n,!0):ve(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:r,type:i}},a){let u;return!!(n[a]||e!==we&&a[0]!=="$"&&ve(e,a)||Ss(t,a)||ve(r,a)||ve(s,a)||ve(An,a)||ve(o.config.globalProperties,a)||(u=i.__cssModules)&&u[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ve(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Io(e){return Z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let qs=!0;function Xi(e){const t=al(e),n=e.proxy,s=e.ctx;qs=!1,t.beforeCreate&&Ro(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:u,inject:d,created:c,beforeMount:m,mounted:p,beforeUpdate:b,updated:S,activated:$,deactivated:R,beforeDestroy:O,beforeUnmount:C,destroyed:x,unmounted:g,render:_,renderTracked:j,renderTriggered:H,errorCaptured:q,serverPrefetch:fe,expose:Y,inheritAttrs:F,components:Se,directives:K,filters:Ge}=t;if(d&&ea(d,s,null),i)for(const pe in i){const de=i[pe];re(de)&&(s[pe]=de.bind(n))}if(o){const pe=o.call(n,n);ge(pe)&&(e.data=ds(pe))}if(qs=!0,r)for(const pe in r){const de=r[pe],nt=re(de)?de.bind(n,n):re(de.get)?de.get.bind(n,n):yt,We=!re(de)&&re(de.set)?de.set.bind(n):yt,et=le({get:nt,set:We});Object.defineProperty(s,pe,{enumerable:!0,configurable:!0,get:()=>et.value,set:Te=>et.value=Te})}if(a)for(const pe in a)il(a[pe],s,n,pe);if(u){const pe=re(u)?u.call(n):u;Reflect.ownKeys(pe).forEach(de=>{Kn(de,pe[de])})}c&&Ro(c,e,"c");function Ee(pe,de){Z(de)?de.forEach(nt=>pe(nt.bind(n))):de&&pe(de.bind(n))}if(Ee(Hi,m),Ee(hs,p),Ee(Bi,b),Ee(Gi,S),Ee(Li,$),Ee(Fi,R),Ee(Qi,q),Ee(zi,j),Ee(Ki,H),Ee(tl,C),Ee(nl,g),Ee(Wi,fe),Z(Y))if(Y.length){const pe=e.exposed||(e.exposed={});Y.forEach(de=>{Object.defineProperty(pe,de,{get:()=>n[de],set:nt=>n[de]=nt,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===yt&&(e.render=_),F!=null&&(e.inheritAttrs=F),Se&&(e.components=Se),K&&(e.directives=K),fe&&Xr(e)}function ea(e,t,n=yt){Z(e)&&(e=Hs(e));for(const s in e){const o=e[s];let r;ge(o)?"default"in o?r=rt(o.from||s,o.default,!0):r=rt(o.from||s):r=rt(o),Le(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function Ro(e,t,n){ut(Z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function il(e,t,n,s){let o=s.includes(".")?Jr(n,s):()=>n[s];if(Ce(e)){const r=t[e];re(r)&&Pt(o,r)}else if(re(e))Pt(o,e.bind(n));else if(ge(e))if(Z(e))e.forEach(r=>il(r,t,n,s));else{const r=re(e.handler)?e.handler.bind(n):t[e.handler];re(r)&&Pt(o,r,e)}}function al(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let u;return a?u=a:!o.length&&!n&&!s?u=t:(u={},o.length&&o.forEach(d=>es(u,d,i,!0)),es(u,t,i)),ge(t)&&r.set(t,u),u}function es(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&es(e,r,n,!0),o&&o.forEach(i=>es(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const a=ta[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const ta={data:Po,props:To,emits:To,methods:xn,computed:xn,beforeCreate:Fe,created:Fe,beforeMount:Fe,mounted:Fe,beforeUpdate:Fe,updated:Fe,beforeDestroy:Fe,beforeUnmount:Fe,destroyed:Fe,unmounted:Fe,activated:Fe,deactivated:Fe,errorCaptured:Fe,serverPrefetch:Fe,components:xn,directives:xn,watch:sa,provide:Po,inject:na};function Po(e,t){return t?e?function(){return Ve(re(e)?e.call(this,this):e,re(t)?t.call(this,this):t)}:t:e}function na(e,t){return xn(Hs(e),Hs(t))}function Hs(e){if(Z(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Fe(e,t){return e?[...new Set([].concat(e,t))]:t}function xn(e,t){return e?Ve(Object.create(null),e,t):t}function To(e,t){return e?Z(e)&&Z(t)?[...new Set([...e,...t])]:Ve(Object.create(null),Io(e),Io(t??{})):t}function sa(e,t){if(!e)return t;if(!t)return e;const n=Ve(Object.create(null),e);for(const s in t)n[s]=Fe(e[s],t[s]);return n}function ul(){return{app:null,config:{isNativeTag:xr,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 oa=0;function ra(e,t){return function(s,o=null){re(s)||(s=Ve({},s)),o!=null&&!ge(o)&&(o=null);const r=ul(),i=new WeakSet,a=[];let u=!1;const d=r.app={_uid:oa++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Na,get config(){return r.config},set config(c){},use(c,...m){return i.has(c)||(c&&re(c.install)?(i.add(c),c.install(d,...m)):re(c)&&(i.add(c),c(d,...m))),d},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),d},component(c,m){return m?(r.components[c]=m,d):r.components[c]},directive(c,m){return m?(r.directives[c]=m,d):r.directives[c]},mount(c,m,p){if(!u){const b=d._ceVNode||oe(s,o);return b.appContext=r,p===!0?p="svg":p===!1&&(p=void 0),e(b,c,p),u=!0,d._container=c,c.__vue_app__=d,bs(b.component)}},onUnmount(c){a.push(c)},unmount(){u&&(ut(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,m){return r.provides[c]=m,d},runWithContext(c){const m=rn;rn=d;try{return c()}finally{rn=m}}};return d}}let rn=null;const la=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Be(t)}Modifiers`]||e[`${Yt(t)}Modifiers`];function ia(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||we;let o=n;const r=t.startsWith("update:"),i=r&&la(s,t.slice(7));i&&(i.trim&&(o=n.map(c=>Ce(c)?c.trim():c)),i.number&&(o=n.map(as)));let a,u=s[a=_s(t)]||s[a=_s(Be(t))];!u&&r&&(u=s[a=_s(Yt(t))]),u&&ut(u,e,6,o);const d=s[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ut(d,e,6,o)}}const aa=new WeakMap;function cl(e,t,n=!1){const s=n?aa:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!re(e)){const u=d=>{const c=cl(d,t,!0);c&&(a=!0,Ve(i,c))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!a?(ge(e)&&s.set(e,null),null):(Z(r)?r.forEach(u=>i[u]=null):Ve(i,r),ge(e)&&s.set(e,i),i)}function vs(e,t){return!e||!os(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ve(e,t[0].toLowerCase()+t.slice(1))||ve(e,Yt(t))||ve(e,t))}function Oo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:u,render:d,renderCache:c,props:m,data:p,setupState:b,ctx:S,inheritAttrs:$}=e,R=Zn(e);let O,C;try{if(n.shapeFlag&4){const g=o||s,_=g;O=bt(d.call(_,g,c,m,b,p,S)),C=a}else{const g=t;O=bt(g.length>1?g(m,{attrs:a,slots:i,emit:u}):g(m,null)),C=t.props?a:ua(a)}}catch(g){Tt.length=0,fs(g,e,1),O=oe(wt)}let x=O;if(C&&$!==!1){const g=Object.keys(C),{shapeFlag:_}=x;g.length&&_&7&&(r&&g.some(rs)&&(C=ca(C,r)),x=un(x,C,!1,!0))}if(n.dirs&&(x=un(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition){const g=ps(x.type)&&Yr(x)||x;uo(g,n.transition)}return O=x,Zn(R),O}const ua=e=>{let t;for(const n in e)(n==="class"||n==="style"||os(n))&&((t||(t={}))[n]=e[n]);return t},ca=(e,t)=>{const n={};for(const s in e)(!rs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function da(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:a,patchFlag:u}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?Do(s,i,d):!!i;if(u&8){const c=t.dynamicProps;for(let m=0;m<c.length;m++){const p=c[m];if(dl(i,s,p)&&!vs(d,p))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:s===i?!1:s?i?Do(s,i,d):!0:!!i;return!1}function Do(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const r=s[o];if(dl(t,e,r)&&!vs(n,r))return!0}return!1}function dl(e,t,n){const s=e[n],o=t[n];return n==="style"&&ge(s)&&ge(o)?!Ft(s,o):s!==o}function fa({vnode:e,parent:t,suspense:n},s){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=s,e=o),o===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const fl={},pl=()=>Object.create(fl),ml=e=>Object.getPrototypeOf(e)===fl;function pa(e,t,n,s=!1){const o={},r=pl();e.propsDefaults=Object.create(null),hl(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Fr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ma(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=he(o),[u]=e.propsOptions;let d=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let m=0;m<c.length;m++){let p=c[m];if(vs(e.emitsOptions,p))continue;const b=t[p];if(u)if(ve(r,p))b!==r[p]&&(r[p]=b,d=!0);else{const S=Be(p);o[S]=Bs(u,a,S,b,e,!1)}else b!==r[p]&&(r[p]=b,d=!0)}}}else{hl(e,t,o,r)&&(d=!0);let c;for(const m in a)(!t||!ve(t,m)&&((c=Yt(m))===m||!ve(t,c)))&&(u?n&&(n[m]!==void 0||n[c]!==void 0)&&(o[m]=Bs(u,a,m,void 0,e,!0)):delete o[m]);if(r!==a)for(const m in r)(!t||!ve(t,m))&&(delete r[m],d=!0)}d&&Et(e.attrs,"set","")}function hl(e,t,n,s){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let u in t){if(wn(u))continue;const d=t[u];let c;o&&ve(o,c=Be(u))?!r||!r.includes(c)?n[c]=d:(a||(a={}))[c]=d:vs(e.emitsOptions,u)||(!(u in s)||d!==s[u])&&(s[u]=d,i=!0)}if(r){const u=he(n),d=a||we;for(let c=0;c<r.length;c++){const m=r[c];n[m]=Bs(o,u,m,d[m],e,!ve(d,m))}}return i}function Bs(e,t,n,s,o,r){const i=e[n];if(i!=null){const a=ve(i,"default");if(a&&s===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&re(u)){const{propsDefaults:d}=o;if(n in d)s=d[n];else{const c=Un(o);s=d[n]=u.call(null,t),c()}}else s=u;o.ce&&o.ce._setProp(n,s)}i[0]&&(r&&!a?s=!1:i[1]&&(s===""||s===Yt(n))&&(s=!0))}return s}const ha=new WeakMap;function vl(e,t,n=!1){const s=n?ha:t.propsCache,o=s.get(e);if(o)return o;const r=e.props,i={},a=[];let u=!1;if(!re(e)){const c=m=>{u=!0;const[p,b]=vl(m,t,!0);Ve(i,p),b&&a.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!u)return ge(e)&&s.set(e,tn),tn;if(Z(r))for(let c=0;c<r.length;c++){const m=Be(r[c]);Mo(m)&&(i[m]=we)}else if(r)for(const c in r){const m=Be(c);if(Mo(m)){const p=r[c],b=i[m]=Z(p)||re(p)?{type:p}:Ve({},p),S=b.type;let $=!1,R=!0;if(Z(S))for(let O=0;O<S.length;++O){const C=S[O],x=re(C)&&C.name;if(x==="Boolean"){$=!0;break}else x==="String"&&(R=!1)}else $=re(S)&&S.name==="Boolean";b[0]=$,b[1]=R,($||ve(b,"default"))&&a.push(m)}}const d=[i,a];return ge(e)&&s.set(e,d),d}function Mo(e){return e[0]!=="$"&&!wn(e)}const fo=e=>e==="_"||e==="_ctx"||e==="$stable",po=e=>Z(e)?e.map(bt):[bt(e)],va=(e,t,n)=>{if(t._n)return t;const s=st((...o)=>po(t(...o)),n);return s._c=!1,s},gl=(e,t,n)=>{const s=e._ctx;for(const o in e){if(fo(o))continue;const r=e[o];if(re(r))t[o]=va(o,r,s);else if(r!=null){const i=po(r);t[o]=()=>i}}},bl=(e,t)=>{const n=po(t);e.slots.default=()=>n},xl=(e,t,n)=>{for(const s in t)(n||!fo(s))&&(e[s]=t[s])},ga=(e,t,n)=>{const s=e.slots=pl();if(e.vnode.shapeFlag&32){const o=t._;o?(xl(s,t,n),n&&kr(s,"_",o,!0)):gl(t,s)}else t&&bl(e,t)},ba=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=we;if(s.shapeFlag&32){const a=t._;a?n&&a===1?r=!1:xl(o,t,n):(r=!t.$stable,gl(t,o)),i=t}else t&&(bl(e,t),i={default:1});if(r)for(const a in o)!fo(a)&&i[a]==null&&delete o[a]},ze=ka;function xa(e){return ya(e)}function ya(e,t){const n=us();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:a,createComment:u,setText:d,setElementText:c,parentNode:m,nextSibling:p,setScopeId:b=yt,insertStaticContent:S}=e,$=(f,h,y,T=null,M=null,P=null,A=void 0,k=null,V=!!h.dynamicChildren)=>{if(f===h)return;f&&!gn(f,h)&&(T=D(f),Te(f,M,P,!0),f=null),h.patchFlag===-2&&(V=!1,h.dynamicChildren=null);const{type:N,ref:E,shapeFlag:U}=h;switch(N){case gs:R(f,h,y,T);break;case wt:O(f,h,y,T);break;case zn:f==null&&C(h,y,T,A);break;case ee:Se(f,h,y,T,M,P,A,k,V);break;default:U&1?_(f,h,y,T,M,P,A,k,V):U&6?K(f,h,y,T,M,P,A,k,V):(U&64||U&128)&&N.process(f,h,y,T,M,P,A,k,V,J)}E!=null&&M?$n(E,f&&f.ref,P,h||f,!h):E==null&&f&&f.ref!=null&&$n(f.ref,null,P,f,!0)},R=(f,h,y,T)=>{if(f==null)s(h.el=a(h.children),y,T);else{const M=h.el=f.el;h.children!==f.children&&d(M,h.children)}},O=(f,h,y,T)=>{f==null?s(h.el=u(h.children||""),y,T):h.el=f.el},C=(f,h,y,T)=>{[f.el,f.anchor]=S(f.children,h,y,T,f.el,f.anchor)},x=({el:f,anchor:h},y,T)=>{let M;for(;f&&f!==h;)M=p(f),s(f,y,T),f=M;s(h,y,T)},g=({el:f,anchor:h})=>{let y;for(;f&&f!==h;)y=p(f),o(f),f=y;o(h)},_=(f,h,y,T,M,P,A,k,V)=>{if(h.type==="svg"?A="svg":h.type==="math"&&(A="mathml"),f==null)j(h,y,T,M,P,A,k,V);else{const N=f.el&&f.el._isVueCE?f.el:null;try{N&&N._beginPatch(),fe(f,h,M,P,A,k,V)}finally{N&&N._endPatch()}}},j=(f,h,y,T,M,P,A,k)=>{let V,N;const{props:E,shapeFlag:U,transition:Q,dirs:te}=f;if(V=f.el=i(f.type,P,E&&E.is,E),U&8?c(V,f.children):U&16&&q(f.children,V,null,T,M,Es(f,P),A,k),te&&Bt(f,null,T,"created"),H(V,f,f.scopeId,A,T),E){for(const ye in E)ye!=="value"&&!wn(ye)&&r(V,ye,null,E[ye],P,T);"value"in E&&r(V,"value",null,E.value,P),(N=E.onVnodeBeforeMount)&&ht(N,T,f)}te&&Bt(f,null,T,"beforeMount");const ce=_a(M,Q);ce&&Q.beforeEnter(V),s(V,h,y),((N=E&&E.onVnodeMounted)||ce||te)&&ze(()=>{try{N&&ht(N,T,f),ce&&Q.enter(V),te&&Bt(f,null,T,"mounted")}finally{}},M)},H=(f,h,y,T,M)=>{if(y&&b(f,y),T)for(let P=0;P<T.length;P++)b(f,T[P]);if(M){let P=M.subTree;if(h===P||kl(P.type)&&(P.ssContent===h||P.ssFallback===h)){const A=M.vnode;H(f,A,A.scopeId,A.slotScopeIds,M.parent)}}},q=(f,h,y,T,M,P,A,k,V=0)=>{for(let N=V;N<f.length;N++){const E=f[N]=k?St(f[N]):bt(f[N]);$(null,E,h,y,T,M,P,A,k)}},fe=(f,h,y,T,M,P,A)=>{const k=h.el=f.el;let{patchFlag:V,dynamicChildren:N,dirs:E}=h;V|=f.patchFlag&16;const U=f.props||we,Q=h.props||we;let te;if(y&&Gt(y,!1),(te=Q.onVnodeBeforeUpdate)&&ht(te,y,h,f),E&&Bt(h,f,y,"beforeUpdate"),y&&Gt(y,!0),N&&(!f.dynamicChildren||f.dynamicChildren.length!==N.length)&&(V=0,A=!1,N=null),(U.innerHTML&&Q.innerHTML==null||U.textContent&&Q.textContent==null)&&c(k,""),N?Y(f.dynamicChildren,N,k,y,T,Es(h,M),P):A||de(f,h,k,null,y,T,Es(h,M),P,!1),V>0){if(V&16)F(k,U,Q,y,M);else if(V&2&&U.class!==Q.class&&r(k,"class",null,Q.class,M),V&4&&r(k,"style",U.style,Q.style,M),V&8){const ce=h.dynamicProps;for(let ye=0;ye<ce.length;ye++){const be=ce[ye],Ie=U[be],De=Q[be];(De!==Ie||be==="value")&&r(k,be,Ie,De,M,y)}}V&1&&f.children!==h.children&&c(k,h.children)}else!A&&N==null&&F(k,U,Q,y,M);((te=Q.onVnodeUpdated)||E)&&ze(()=>{te&&ht(te,y,h,f),E&&Bt(h,f,y,"updated")},T)},Y=(f,h,y,T,M,P,A)=>{for(let k=0;k<h.length;k++){const V=f[k],N=h[k],E=V.el&&(V.type===ee||!gn(V,N)||V.shapeFlag&198)?m(V.el):y;$(V,N,E,null,T,M,P,A,!0)}},F=(f,h,y,T,M)=>{if(h!==y){if(h!==we)for(const P in h)!wn(P)&&!(P in y)&&r(f,P,h[P],null,M,T);for(const P in y){if(wn(P))continue;const A=y[P],k=h[P];A!==k&&P!=="value"&&r(f,P,k,A,M,T)}"value"in y&&r(f,"value",h.value,y.value,M)}},Se=(f,h,y,T,M,P,A,k,V)=>{const N=h.el=f?f.el:a(""),E=h.anchor=f?f.anchor:a("");let{patchFlag:U,dynamicChildren:Q,slotScopeIds:te}=h;te&&(k=k?k.concat(te):te),f==null?(s(N,y,T),s(E,y,T),q(h.children||[],y,E,M,P,A,k,V)):U>0&&U&64&&Q&&f.dynamicChildren&&f.dynamicChildren.length===Q.length?(Y(f.dynamicChildren,Q,y,M,P,A,k),(h.key!=null||M&&h===M.subTree)&&yl(f,h,!0)):de(f,h,y,E,M,P,A,k,V)},K=(f,h,y,T,M,P,A,k,V)=>{h.slotScopeIds=k,f==null?h.shapeFlag&512?M.ctx.activate(h,y,T,A,V):Ge(h,y,T,M,P,A,V):Vt(f,h,V)},Ge=(f,h,y,T,M,P,A)=>{const k=f.component=Ea(f,T,M);if(co(f)&&(k.ctx.renderer=J),Ra(k,!1,A),k.asyncDep){if(M&&M.registerDep(k,Ee,A),!f.el){const V=k.subTree=oe(wt);O(null,V,h,y),f.placeholder=V.el}}else Ee(k,f,h,y,M,P,A)},Vt=(f,h,y)=>{const T=h.component=f.component;if(da(f,h,y))if(T.asyncDep&&!T.asyncResolved){pe(T,h,y);return}else T.next=h,T.update();else h.el=f.el,T.vnode=h},Ee=(f,h,y,T,M,P,A)=>{const k=()=>{if(f.isMounted){let{next:U,bu:Q,u:te,parent:ce,vnode:ye}=f;{const pt=_l(f);if(pt){U&&(U.el=ye.el,pe(f,U,A)),pt.asyncDep.then(()=>{ze(()=>{f.isUnmounted||N()},M)});return}}let be=U,Ie;Gt(f,!1),U?(U.el=ye.el,pe(f,U,A)):U=ye,Q&&Wn(Q),(Ie=U.props&&U.props.onVnodeBeforeUpdate)&&ht(Ie,ce,U,ye),Gt(f,!0);const De=Oo(f),ft=f.subTree;f.subTree=De,$(ft,De,m(ft.el),D(ft),f,M,P),U.el=De.el,be===null&&fa(f,De.el),te&&ze(te,M),(Ie=U.props&&U.props.onVnodeUpdated)&&ze(()=>ht(Ie,ce,U,ye),M)}else{let U;const{el:Q,props:te}=h,{bm:ce,m:ye,parent:be,root:Ie,type:De}=f,ft=on(h);Gt(f,!1),ce&&Wn(ce),!ft&&(U=te&&te.onVnodeBeforeMount)&&ht(U,be,h),Gt(f,!0);{Ie.ce&&Ie.ce._hasShadowRoot()&&Ie.ce._injectChildStyle(De,f.parent?f.parent.type:void 0);const pt=f.subTree=Oo(f);$(null,pt,y,T,f,M,P),h.el=pt.el}if(ye&&ze(ye,M),!ft&&(U=te&&te.onVnodeMounted)){const pt=h;ze(()=>ht(U,be,pt),M)}(h.shapeFlag&256||be&&on(be.vnode)&&be.vnode.shapeFlag&256)&&f.a&&ze(f.a,M),f.isMounted=!0,h=y=T=null}};f.scope.on();const V=f.effect=new Sr(k);f.scope.off();const N=f.update=V.run.bind(V),E=f.job=V.runIfDirty.bind(V);E.i=f,E.id=f.uid,V.scheduler=()=>ao(E),Gt(f,!0),N()},pe=(f,h,y)=>{h.component=f;const T=f.vnode.props;f.vnode=h,f.next=null,ma(f,h.props,T,y),ba(f,h.children,y),Ot(),$o(f),Dt()},de=(f,h,y,T,M,P,A,k,V=!1)=>{const N=f&&f.children,E=f?f.shapeFlag:0,U=h.children,{patchFlag:Q,shapeFlag:te}=h;if(Q>0){if(Q&128){We(N,U,y,T,M,P,A,k,V);return}else if(Q&256){nt(N,U,y,T,M,P,A,k,V);return}}te&8?(E&16&&Ke(N,M,P),U!==N&&c(y,U)):E&16?te&16?We(N,U,y,T,M,P,A,k,V):Ke(N,M,P,!0):(E&8&&c(y,""),te&16&&q(U,y,T,M,P,A,k,V))},nt=(f,h,y,T,M,P,A,k,V)=>{f=f||tn,h=h||tn;const N=f.length,E=h.length,U=Math.min(N,E);let Q;for(Q=0;Q<U;Q++){const te=h[Q]=V?St(h[Q]):bt(h[Q]);$(f[Q],te,y,null,M,P,A,k,V)}N>E?Ke(f,M,P,!0,!1,U):q(h,y,T,M,P,A,k,V,U)},We=(f,h,y,T,M,P,A,k,V)=>{let N=0;const E=h.length;let U=f.length-1,Q=E-1;for(;N<=U&&N<=Q;){const te=f[N],ce=h[N]=V?St(h[N]):bt(h[N]);if(gn(te,ce))$(te,ce,y,null,M,P,A,k,V);else break;N++}for(;N<=U&&N<=Q;){const te=f[U],ce=h[Q]=V?St(h[Q]):bt(h[Q]);if(gn(te,ce))$(te,ce,y,null,M,P,A,k,V);else break;U--,Q--}if(N>U){if(N<=Q){const te=Q+1,ce=te<E?h[te].el:T;for(;N<=Q;)$(null,h[N]=V?St(h[N]):bt(h[N]),y,ce,M,P,A,k,V),N++}}else if(N>Q)for(;N<=U;)Te(f[N],M,P,!0),N++;else{const te=N,ce=N,ye=new Map;for(N=ce;N<=Q;N++){const Ye=h[N]=V?St(h[N]):bt(h[N]);Ye.key!=null&&ye.set(Ye.key,N)}let be,Ie=0;const De=Q-ce+1;let ft=!1,pt=0;const hn=new Array(De);for(N=0;N<De;N++)hn[N]=0;for(N=te;N<=U;N++){const Ye=f[N];if(Ie>=De){Te(Ye,M,P,!0);continue}let mt;if(Ye.key!=null)mt=ye.get(Ye.key);else for(be=ce;be<=Q;be++)if(hn[be-ce]===0&&gn(Ye,h[be])){mt=be;break}mt===void 0?Te(Ye,M,P,!0):(hn[mt-ce]=N+1,mt>=pt?pt=mt:ft=!0,$(Ye,h[mt],y,null,M,P,A,k,V),Ie++)}const bo=ft?wa(hn):tn;for(be=bo.length-1,N=De-1;N>=0;N--){const Ye=ce+N,mt=h[Ye],xo=h[Ye+1],yo=Ye+1<E?xo.el||wl(xo):T;hn[N]===0?$(null,mt,y,yo,M,P,A,k,V):ft&&(be<0||N!==bo[be]?et(mt,y,yo,2):be--)}}},et=(f,h,y,T,M=null)=>{const{el:P,type:A,transition:k,children:V,shapeFlag:N}=f;if(N&6){et(f.component.subTree,h,y,T);return}if(N&128){f.suspense.move(h,y,T);return}if(N&64){A.move(f,h,y,J);return}if(A===ee){s(P,h,y);for(let U=0;U<V.length;U++)et(V[U],h,y,T);s(f.anchor,h,y);return}if(A===zn){x(f,h,y);return}if(T!==2&&N&1&&k)if(T===0)k.persisted&&!P[As]?s(P,h,y):(k.beforeEnter(P),s(P,h,y),ze(()=>k.enter(P),M));else{const{leave:U,delayLeave:Q,afterLeave:te}=k,ce=()=>{f.ctx.isUnmounted?o(P):s(P,h,y)},ye=()=>{const be=P._isLeaving||!!P[As];P._isLeaving&&P[As](!0),k.persisted&&!be?ce():U(P,()=>{ce(),te&&te()})};Q?Q(P,ce,ye):ye()}else s(P,h,y)},Te=(f,h,y,T=!1,M=!1)=>{const{type:P,props:A,ref:k,children:V,dynamicChildren:N,shapeFlag:E,patchFlag:U,dirs:Q,cacheIndex:te,memo:ce}=f;if(U===-2&&(M=!1),k!=null&&(Ot(),$n(k,null,y,f,!0),Dt()),te!=null&&(h.renderCache[te]=void 0),E&256){h.ctx.deactivate(f);return}const ye=E&1&&Q,be=!on(f);let Ie;if(be&&(Ie=A&&A.onVnodeBeforeUnmount)&&ht(Ie,h,f),E&6)dt(f.component,y,T);else{if(E&128){f.suspense.unmount(y,T);return}ye&&Bt(f,null,h,"beforeUnmount"),E&64?f.type.remove(f,h,y,J,T):N&&!N.hasOnce&&(P!==ee||U>0&&U&64)?Ke(N,h,y,!1,!0):(P===ee&&U&384||!M&&E&16)&&Ke(V,h,y),T&&kt(f)}const De=ce!=null&&te==null;(be&&(Ie=A&&A.onVnodeUnmounted)||ye||De)&&ze(()=>{Ie&&ht(Ie,h,f),ye&&Bt(f,null,h,"unmounted"),De&&(f.el=null)},y)},kt=f=>{const{type:h,el:y,anchor:T,transition:M}=f;if(h===ee){Je(y,T);return}if(h===zn){g(f);return}const P=()=>{o(y),M&&!M.persisted&&M.afterLeave&&M.afterLeave()};if(f.shapeFlag&1&&M&&!M.persisted){const{leave:A,delayLeave:k}=M,V=()=>A(y,P);k?k(f.el,P,V):V()}else P()},Je=(f,h)=>{let y;for(;f!==h;)y=p(f),o(f),f=y;o(h)},dt=(f,h,y)=>{const{bum:T,scope:M,job:P,subTree:A,um:k,m:V,a:N}=f;No(V),No(N),T&&Wn(T),M.stop(),P&&(P.flags|=8,Te(A,f,h,y)),k&&ze(k,h),ze(()=>{f.isUnmounted=!0},h)},Ke=(f,h,y,T=!1,M=!1,P=0)=>{for(let A=P;A<f.length;A++)Te(f[A],h,y,T,M)},D=f=>{if(f.shapeFlag&6)return D(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const h=p(f.anchor||f.el),y=h&&h[ji];return y?p(y):h};let W=!1;const G=(f,h,y)=>{let T;f==null?h._vnode&&(Te(h._vnode,null,null,!0),T=h._vnode.component):$(h._vnode||null,f,h,null,null,null,y),h._vnode=f,W||(W=!0,$o(T),Wr(),W=!1)},J={p:$,um:Te,m:et,r:kt,mt:Ge,mc:q,pc:de,pbc:Y,n:D,o:e};return{render:G,hydrate:void 0,createApp:ra(G)}}function Es({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 Gt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function _a(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yl(e,t,n=!1){const s=e.children,o=t.children;if(Z(s)&&Z(o))for(let r=0;r<s.length;r++){const i=s[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=St(o[r]),a.el=i.el),!n&&a.patchFlag!==-2&&yl(i,a)),a.type===gs&&(a.patchFlag===-1&&(a=o[r]=St(a)),a.el=i.el),a.type===wt&&!a.el&&(a.el=i.el)}}function wa(e){const t=e.slice(),n=[0];let s,o,r,i,a;const u=e.length;for(s=0;s<u;s++){const d=e[s];if(d!==0){if(o=n[n.length-1],e[o]<d){t[s]=o,n.push(s);continue}for(r=0,i=n.length-1;r<i;)a=r+i>>1,e[n[a]]<d?r=a+1:i=a;d<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,i=n[r-1];r-- >0;)n[r]=i,i=t[i];return n}function _l(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:_l(t)}function No(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function wl(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?wl(t.subTree):null}const kl=e=>e.__isSuspense;function ka(e,t){t&&t.pendingBranch?Z(e)?t.effects.push(...e):t.effects.push(e):Di(e)}const ee=Symbol.for("v-fgt"),gs=Symbol.for("v-txt"),wt=Symbol.for("v-cmt"),zn=Symbol.for("v-stc"),Tt=[];let Ze=null;function v(e=!1){Tt.push(Ze=e?null:[])}function mo(){Tt.pop(),Ze=Tt[Tt.length-1]||null}let Pn=1;function ts(e,t=!1){Pn+=e,e<0&&Ze&&t&&(Ze.hasOnce=!0)}function Cl(e){return e.dynamicChildren=Pn>0?Ze||tn:null,mo(),Pn>0&&Ze&&Ze.push(e),e}function w(e,t,n,s,o,r){return Cl(l(e,t,n,s,o,r,!0))}function _e(e,t,n,s,o){return Cl(oe(e,t,n,s,o,!0))}function Tn(e){return e?e.__v_isVNode===!0:!1}function gn(e,t){return e.type===t.type&&e.key===t.key}const $l=({key:e})=>e??null,Qn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||Le(e)||re(e)?{i:Ne,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,s=0,o=null,r=e===ee?0:1,i=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$l(t),ref:t&&Qn(t),scopeId:zr,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:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ne};return a?(ns(u,n),r&128&&e.normalize(u)):n&&(u.shapeFlag|=Ce(n)?8:16),Pn>0&&!i&&Ze&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&Ze.push(u),u}const oe=Ca;function Ca(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===ol)&&(e=wt),Tn(e)){const a=un(e,t,!0);return n&&ns(a,n),Pn>0&&!r&&Ze&&(a.shapeFlag&6?Ze[Ze.indexOf(e)]=a:Ze.push(a)),a.patchFlag=-2,a}if(Ma(e)&&(e=e.__vccOpts),t){t=$a(t);let{class:a,style:u}=t;a&&!Ce(a)&&(t.class=ue(a)),ge(u)&&(lo(u)&&!Z(u)&&(u=Ve({},u)),t.style=Jt(u))}const i=Ce(e)?1:kl(e)?128:ps(e)?64:ge(e)?4:re(e)?2:0;return l(e,t,n,s,o,i,r,!0)}function $a(e){return e?lo(e)||ml(e)?Ve({},e):e:null}function un(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:u}=e,d=t?Sl(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&$l(d),ref:t&&t.ref?n&&r?Z(r)?r.concat(Qn(t)):[r,Qn(t)]:Qn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ee?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&un(e.ssContent),ssFallback:e.ssFallback&&un(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&uo(c,u.clone(c)),c}function se(e=" ",t=0){return oe(gs,null,e,t)}function Al(e,t){const n=oe(zn,null,e);return n.staticCount=t,n}function B(e="",t=!1){return t?(v(),_e(wt,null,e)):oe(wt,null,e)}function bt(e){return e==null||typeof e=="boolean"?oe(wt):Z(e)?oe(ee,null,e.slice()):Tn(e)?St(e):oe(gs,null,String(e))}function St(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:un(e)}function ns(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),ns(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ml(t)?t._ctx=Ne:o===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(re(t)){if(s&65){ns(e,{default:t});return}t={default:t,_ctx:Ne},n=32}else t=String(t),s&64?(n=16,t=[se(t)]):n=8;e.children=t,e.shapeFlag|=n}function Sl(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=ue([t.class,s.class]));else if(o==="style")t.style=Jt([t.style,s.style]);else if(os(o)){const r=t[o],i=s[o];i&&r!==i&&!(Z(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!rs(o)&&(t[o]=i)}else o!==""&&(t[o]=s[o])}return t}function ht(e,t,n,s=null){ut(e,t,7,[n,s])}const Aa=ul();let Sa=0;function Ea(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Aa,r={uid:Sa++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ri(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:vl(s,o),emitsOptions:cl(s,o),emit:null,emitted:null,propsDefaults:we,inheritAttrs:s.inheritAttrs,ctx:we,data:we,props:we,attrs:we,slots:we,refs:we,setupState:we,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=ia.bind(null,r),e.ce&&e.ce(r),r}let Ue=null;const Ia=()=>Ue||Ne;let ss,On;{const e=us(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};ss=t("__VUE_INSTANCE_SETTERS__",n=>Ue=n),On=t("__VUE_SSR_SETTERS__",n=>Dn=n)}const Un=e=>{const t=Ue;return ss(e),e.scope.on(),()=>{e.scope.off(),ss(t)}},Vo=()=>{Ue&&Ue.scope.off(),ss(null)};function El(e){return e.vnode.shapeFlag&4}let Dn=!1;function Ra(e,t=!1,n=!1){t&&On(t);const{props:s,children:o}=e.vnode,r=El(e);pa(e,s,r,t),ga(e,o,n||t);const i=r?Pa(e,t):void 0;return t&&On(!1),i}function Pa(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Zi);const{setup:s}=n;if(s){Ot();const o=e.setupContext=s.length>1?Oa(e):null,r=Un(e),i=jn(s,e,0,[e.props,o]),a=yr(i);if(Dt(),r(),(a||e.sp)&&!on(e)&&Xr(e),a){if(i.then(Vo,Vo),t)return i.then(u=>{On(!0);try{jo(e,u,t)}finally{On(!1)}}).catch(u=>{fs(u,e,0)});e.asyncDep=i}else jo(e,i)}else Il(e)}function jo(e,t,n){re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=Hr(t)),Il(e)}function Il(e,t,n){const s=e.type;e.render||(e.render=s.render||yt);{const o=Un(e);Ot();try{Xi(e)}finally{Dt(),o()}}}const Ta={get(e,t){return je(e,"get",""),e[t]}};function Oa(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ta),slots:e.slots,emit:e.emit,expose:t}}function bs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Hr(Ci(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in An)return An[n](e)},has(t,n){return n in t||n in An}})):e.proxy}function Da(e,t=!0){return re(e)?e.displayName||e.name:e.name||t&&e.__name}function Ma(e){return re(e)&&"__vccOpts"in e}const le=(e,t)=>Ii(e,t,Dn);function Rl(e,t,n){try{ts(-1);const s=arguments.length;return s===2?ge(t)&&!Z(t)?Tn(t)?oe(e,null,[t]):oe(e,t):oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Tn(n)&&(n=[n]),oe(e,t,n))}finally{ts(1)}}const Na="3.5.41";/**
|
|
* @vue/runtime-dom v3.5.41
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Gs;const Uo=typeof window<"u"&&window.trustedTypes;if(Uo)try{Gs=Uo.createPolicy("vue",{createHTML:e=>e})}catch{}const Pl=Gs?e=>Gs.createHTML(e):e=>e,Va="http://www.w3.org/2000/svg",ja="http://www.w3.org/1998/Math/MathML",At=typeof document<"u"?document:null,Lo=At&&At.createElement("template"),Ua={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?At.createElementNS(Va,e):t==="mathml"?At.createElementNS(ja,e):n?At.createElement(e,{is:n}):At.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>At.createTextNode(e),createComment:e=>At.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>At.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Lo.innerHTML=Pl(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const a=Lo.content;if(s==="svg"||s==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},La=Symbol("_vtc");function Fa(e,t,n){const s=e[La];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Fo=Symbol("_vod"),qa=Symbol("_vsh"),Ha=Symbol(""),Ba=/(?:^|;)\s*display\s*:/;function Ga(e,t,n){const s=e.style,o=Ce(n);let r=!1;if(n&&!o){if(t)if(Ce(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&yn(s,a,"")}else for(const i in t)n[i]==null&&yn(s,i,"");for(const i in n){i==="display"&&(r=!0);const a=n[i];a!=null?Ka(e,i,!Ce(t)&&t?t[i]:void 0,a)||yn(s,i,a):yn(s,i,"")}}else if(o){if(t!==n){const i=s[Ha];i&&(n+=";"+i),s.cssText=n,r=Ba.test(n)}}else t&&e.removeAttribute("style");Fo in e&&(e[Fo]=r?s.display:"",e[qa]&&(s.display="none"))}const qo=/\s*!important$/;function yn(e,t,n){if(Z(n))n.forEach(s=>yn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Wa(e,t);qo.test(n)?e.setProperty(Yt(s),n.replace(qo,""),"important"):e[s]=n}}const Ho=["Webkit","Moz","ms"],Is={};function Wa(e,t){const n=Is[t];if(n)return n;let s=Be(t);if(s!=="filter"&&s in e)return Is[t]=s;s=is(s);for(let o=0;o<Ho.length;o++){const r=Ho[o]+s;if(r in e)return Is[t]=r}return t}function Ka(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ce(s)&&n===s}const Bo="http://www.w3.org/1999/xlink";function Go(e,t,n,s,o,r=si(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Bo,t.slice(6,t.length)):e.setAttributeNS(Bo,t,n):n==null||r&&!Cr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":it(n)?String(n):n)}function Wo(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Pl(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(a!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Cr(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(o||t)}function Rt(e,t,n,s){e.addEventListener(t,n,s)}function za(e,t,n,s){e.removeEventListener(t,n,s)}const Ko=Symbol("_vei");function Qa(e,t,n,s,o=null){const r=e[Ko]||(e[Ko]={}),i=r[t];if(s&&i)i.value=s;else{const[a,u]=Za(t);if(s){const d=r[t]=tu(s,o);Rt(e,a,d,u)}else i&&(za(e,a,i,u),r[t]=void 0)}}const Ja=/(Once|Passive|Capture)$/,Ya=/^on:?(?:Once|Passive|Capture)$/;function Za(e){let t,n;for(;(n=e.match(Ja))&&!Ya.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Yt(e.slice(2)),t]}let Rs=0;const Xa=Promise.resolve(),eu=()=>Rs||(Xa.then(()=>Rs=0),Rs=Date.now());function tu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Z(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),a=[s];for(let u=0;u<i.length&&!s._stopped;u++){const d=i[u];d&&ut(d,t,5,a)}}else ut(o,t,5,[s])};return n.value=e,n.attached=eu(),n}const zo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,nu=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?Fa(e,s,i):t==="style"?Ga(e,n,s):os(t)?rs(t)||Qa(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):su(e,t,s,i))?(Wo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Go(e,t,s,i,r,t!=="value")):e._isVueCE&&(ou(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ce(s)))?Wo(e,Be(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Go(e,t,s,i))};function su(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&zo(t)&&re(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return zo(t)&&Ce(n)?!1:t in e}function ou(e,t){const n=e._def.props;if(!n)return!1;const s=Be(t);return Array.isArray(n)?n.some(o=>Be(o)===s):Object.keys(n).some(o=>Be(o)===s)}const qt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Z(t)?n=>Wn(t,n):t};function ru(e){e.target.composing=!0}function Qo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Xe=Symbol("_assign"),Hn=Symbol("_initialValue");function Ps(e,t,n){return t&&(e=e.trim()),n&&(e=as(e)),e}const ie={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Hn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Hn]=e.defaultValue.replace(/\r\n?/g,`
|
|
`))),e[Xe]=qt(o);const r=s||o.props&&o.props.type==="number";Rt(e,t?"change":"input",i=>{i.target.composing||e[Xe](Ps(e.value,n,r))}),(n||r)&&Rt(e,"change",()=>{e.value=Ps(e.value,n,r)}),t||(Rt(e,"compositionstart",ru),Rt(e,"compositionend",Qo),Rt(e,"change",Qo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[Hn];delete e[Hn],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Xe](Ps(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[Xe]=qt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?as(e.value):e.value,u=t??"";if(a===u)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===u)||(e.value=u)}},_t={deep:!0,created(e,t,n){e[Xe]=qt(n),Rt(e,"change",()=>{const s=e._modelValue,o=cn(e),r=e.checked,i=e[Xe];if(Z(s)){const a=Xs(s,o),u=a!==-1;if(r&&!u)i(s.concat(o));else if(!r&&u){const d=[...s];d.splice(a,1),i(d)}}else if(pn(s)){const a=new Set(s);r?a.add(o):a.delete(o),i(a)}else i(Tl(e,r))})},mounted:Jo,beforeUpdate(e,t,n){e[Xe]=qt(n),Jo(e,t,n)}};function Jo(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Z(t))o=Xs(t,s.props.value)>-1;else if(pn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ft(t,Tl(e,!0))}e.checked!==o&&(e.checked=o)}const lu={created(e,{value:t},n){e.checked=Ft(t,n.props.value),e[Xe]=qt(n),Rt(e,"change",()=>{e[Xe](cn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[Xe]=qt(s),t!==n&&(e.checked=Ft(t,s.props.value))}},Ht={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Rt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?as(cn(r)):cn(r));e[Xe](e.multiple?pn(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,io(()=>{e._assigning=!1})}),e[Xe]=qt(s)},mounted(e,{value:t}){Yo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Xe]=qt(n)},updated(e,{value:t}){e._assigning||Yo(e,t)}};function Yo(e,t){const n=e.multiple,s=Z(t);if(!(n&&!s&&!pn(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=cn(i);if(n)if(s){const u=typeof a;u==="string"||u==="number"?i.selected=t.some(d=>String(d)===String(a)):i.selected=Xs(t,a)>-1}else i.selected=t.has(a);else if(Ft(cn(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cn(e){return"_value"in e?e._value:e.value}function Tl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const iu=["ctrl","shift","alt","meta"],au={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)=>iu.some(n=>e[`${n}Key`]&&!t.includes(n))},Ae=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...r)=>{for(let i=0;i<t.length;i++){const a=au[t[i]];if(a&&a(o,t))return}return e(o,...r)}))},uu=Ve({patchProp:nu},Ua);let Zo;function cu(){return Zo||(Zo=xa(uu))}const du=((...e)=>{const t=cu().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=pu(s);if(!o)return;const r=t._component;!re(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,fu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function fu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function pu(e){return Ce(e)?document.querySelector(e):e}const mu=["width","height"],Oe={__name:"UiIcono",props:{nombre:{type:String,required:!0},tam:{type:[Number,String],default:16}},setup(e){const t={luna:[["path",{d:"M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5Z"}]],sol:[["circle",{cx:12,cy:12,r:4}],["path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"}]],lapiz:[["path",{d:"M12 20h9"}],["path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"}]],cerrar:[["path",{d:"M18 6 6 18M6 6l12 12"}]],atras:[["path",{d:"M19 12H5M12 19l-7-7 7-7"}]],grafico:[["path",{d:"M3 3v18h18"}],["path",{d:"M7 15v3M12 10v8M17 6v12"}]],cerebro:[["path",{d:"M9.5 3A2.5 2.5 0 0 0 7 5.5v.2A2.7 2.7 0 0 0 5 8.3c0 .8.3 1.5.9 2A2.8 2.8 0 0 0 5 12.5c0 1 .5 1.9 1.3 2.4-.2.4-.3.8-.3 1.2A2.9 2.9 0 0 0 9 19a2.5 2.5 0 0 0 3 2V3.8A2.5 2.5 0 0 0 9.5 3Z"}],["path",{d:"M14.5 3A2.5 2.5 0 0 1 17 5.5v.2a2.7 2.7 0 0 1 2 2.6c0 .8-.3 1.5-.9 2A2.8 2.8 0 0 1 19 12.5c0 1-.5 1.9-1.3 2.4.2.4.3.8.3 1.2A2.9 2.9 0 0 1 15 19a2.5 2.5 0 0 1-3 2"}]],imagen:[["rect",{x:3,y:3,width:18,height:18,rx:2}],["circle",{cx:8.5,cy:8.5,r:1.5}],["path",{d:"m21 15-5-5L5 21"}]],microfono:[["rect",{x:9,y:2,width:6,height:12,rx:3}],["path",{d:"M5 10a7 7 0 0 0 14 0M12 17v5"}]],escribir:[["path",{d:"M3 21h18"}],["path",{d:"M5 17 17.5 4.5a2.1 2.1 0 0 1 3 3L8 20l-4 1Z"}]],archivo:[["path",{d:"M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v5h5"}]],sitio:[["circle",{cx:12,cy:12,r:9}],["path",{d:"M3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18Z"}]],refrescar:[["path",{d:"M21 12a9 9 0 1 1-3-6.7"}],["path",{d:"M21 4v5h-5"}]],descargar:[["path",{d:"M12 3v12"}],["path",{d:"m7 11 5 5 5-5"}],["path",{d:"M4 21h16"}]],alerta:[["path",{d:"M12 9v4M12 17h.01"}],["path",{d:"M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z"}]],ok:[["path",{d:"M20 6 9 17l-5-5"}]],copiar:[["rect",{x:9,y:9,width:12,height:12,rx:2}],["path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}]],mensaje:[["path",{d:"M21 11.5a8.4 8.4 0 0 1-9 8.4 8.5 8.5 0 0 1-3.9-.9L3 21l1.9-5.1A8.4 8.4 0 0 1 4 11.5a8.5 8.5 0 0 1 8.5-8.5A8.4 8.4 0 0 1 21 11.5Z"}]],auto:[["path",{d:"M17 2.1 21 6l-4 3.9"}],["path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}],["path",{d:"M7 21.9 3 18l4-3.9"}],["path",{d:"M21 13v2a4 4 0 0 1-4 4H3"}]]};return(n,s)=>(v(),w("svg",{width:e.tam,height:e.tam,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round",class:"inline-block shrink-0 align-[-0.15em]","aria-hidden":"true"},[(v(!0),w(ee,null,xe(t[e.nombre]||[],(o,r)=>(v(),_e(Ji(o[0]),Sl({key:r},{ref_for:!0},o[1]),null,16))),128))],8,mu))}};/*!
|
|
* vue-router v4.6.4
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/const en=typeof document<"u";function Ol(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function hu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ol(e.default)}const me=Object.assign;function Ts(e,t){const n={};for(const s in t){const o=t[s];n[s]=ct(o)?o.map(e):e(o)}return n}const Sn=()=>{},ct=Array.isArray;function Xo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Dl=/#/g,vu=/&/g,gu=/\//g,bu=/=/g,xu=/\?/g,Ml=/\+/g,yu=/%5B/g,_u=/%5D/g,Nl=/%5E/g,wu=/%60/g,Vl=/%7B/g,ku=/%7C/g,jl=/%7D/g,Cu=/%20/g;function ho(e){return e==null?"":encodeURI(""+e).replace(ku,"|").replace(yu,"[").replace(_u,"]")}function $u(e){return ho(e).replace(Vl,"{").replace(jl,"}").replace(Nl,"^")}function Ws(e){return ho(e).replace(Ml,"%2B").replace(Cu,"+").replace(Dl,"%23").replace(vu,"%26").replace(wu,"`").replace(Vl,"{").replace(jl,"}").replace(Nl,"^")}function Au(e){return Ws(e).replace(bu,"%3D")}function Su(e){return ho(e).replace(Dl,"%23").replace(xu,"%3F")}function Eu(e){return Su(e).replace(gu,"%2F")}function Mn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Iu=/\/$/,Ru=e=>e.replace(Iu,"");function Os(e,t,n="/"){let s,o={},r="",i="";const a=t.indexOf("#");let u=t.indexOf("?");return u=a>=0&&u>a?-1:u,u>=0&&(s=t.slice(0,u),r=t.slice(u,a>0?a:t.length),o=e(r.slice(1))),a>=0&&(s=s||t.slice(0,a),i=t.slice(a,t.length)),s=Du(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:Mn(i)}}function Pu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function er(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Tu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&dn(t.matched[s],n.matched[o])&&Ul(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function dn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ul(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ou(e[n],t[n]))return!1;return!0}function Ou(e,t){return ct(e)?tr(e,t):ct(t)?tr(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function tr(e,t){return ct(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Du(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let r=n.length-1,i,a;for(i=0;i<s.length;i++)if(a=s[i],a!==".")if(a==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(i).join("/")}const jt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ks=(function(e){return e.pop="pop",e.push="push",e})({}),Ds=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Mu(e){if(!e)if(en){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ru(e)}const Nu=/^[^#]+#/;function Vu(e,t){return e.replace(Nu,"#")+t}function ju(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const xs=()=>({left:window.scrollX,top:window.scrollY});function Uu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=ju(o,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 nr(e,t){return(history.state?history.state.position-t:-1)+e}const zs=new Map;function Lu(e,t){zs.set(e,t)}function Fu(e){const t=zs.get(e);return zs.delete(e),t}function qu(e){return typeof e=="string"||e&&typeof e=="object"}function Ll(e){return typeof e=="string"||typeof e=="symbol"}let $e=(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 Fl=Symbol("");$e.MATCHER_NOT_FOUND+"",$e.NAVIGATION_GUARD_REDIRECT+"",$e.NAVIGATION_ABORTED+"",$e.NAVIGATION_CANCELLED+"",$e.NAVIGATION_DUPLICATED+"";function fn(e,t){return me(new Error,{type:e,[Fl]:!0},t)}function $t(e,t){return e instanceof Error&&Fl in e&&(t==null||!!(e.type&t))}const Hu=["params","query","hash"];function Bu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Hu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Gu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<n.length;++s){const o=n[s].replace(Ml," "),r=o.indexOf("="),i=Mn(r<0?o:o.slice(0,r)),a=r<0?null:Mn(o.slice(r+1));if(i in t){let u=t[i];ct(u)||(u=t[i]=[u]),u.push(a)}else t[i]=a}return t}function sr(e){let t="";for(let n in e){const s=e[n];if(n=Au(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(ct(s)?s.map(o=>o&&Ws(o)):[s&&Ws(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Wu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ct(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Ku=Symbol(""),or=Symbol(""),ys=Symbol(""),vo=Symbol(""),Qs=Symbol("");function bn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Lt(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((a,u)=>{const d=p=>{p===!1?u(fn($e.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?u(p):qu(p)?u(fn($e.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[o]===i&&typeof p=="function"&&i.push(p),a())},c=r(()=>e.call(s&&s.instances[o],t,n,d));let m=Promise.resolve(c);e.length<3&&(m=m.then(d)),m.catch(p=>u(p))})}function Ms(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const a in i.components){let u=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Ol(u)){const d=(u.__vccOpts||u)[t];d&&r.push(Lt(d,n,s,i,a,o))}else{let d=u();r.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const m=hu(c)?c.default:c;i.mods[a]=c,i.components[a]=m;const p=(m.__vccOpts||m)[t];return p&&Lt(p,n,s,i,a,o)()}))}}return r}function zu(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;i<r;i++){const a=t.matched[i];a&&(e.matched.find(d=>dn(d,a))?s.push(a):n.push(a));const u=e.matched[i];u&&(t.matched.find(d=>dn(d,u))||o.push(u))}return[n,s,o]}/*!
|
|
* vue-router v4.6.4
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/let Qu=()=>location.protocol+"//"+location.host;function ql(e,t){const{pathname:n,search:s,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,a=o.slice(i);return a[0]!=="/"&&(a="/"+a),er(a,"")}return er(n,e)+s+o}function Ju(e,t,n,s){let o=[],r=[],i=null;const a=({state:p})=>{const b=ql(e,location),S=n.value,$=t.value;let R=0;if(p){if(n.value=b,t.value=p,i&&i===S){i=null;return}R=$?p.position-$.position:0}else s(b);o.forEach(O=>{O(n.value,S,{delta:R,type:Ks.pop,direction:R?R>0?Ds.forward:Ds.back:Ds.unknown})})};function u(){i=n.value}function d(p){o.push(p);const b=()=>{const S=o.indexOf(p);S>-1&&o.splice(S,1)};return r.push(b),b}function c(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(me({},p.state,{scroll:xs()}),"")}}function m(){for(const p of r)p();r=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:u,listen:d,destroy:m}}function rr(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?xs():null}}function Yu(e){const{history:t,location:n}=window,s={value:ql(e,n)},o={value:t.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,d,c){const m=e.indexOf("#"),p=m>-1?(n.host&&document.querySelector("base")?e:e.slice(m))+u:Qu()+e+u;try{t[c?"replaceState":"pushState"](d,"",p),o.value=d}catch(b){console.error(b),n[c?"replace":"assign"](p)}}function i(u,d){r(u,me({},t.state,rr(o.value.back,u,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=u}function a(u,d){const c=me({},o.value,t.state,{forward:u,scroll:xs()});r(c.current,c,!0),r(u,me({},rr(s.value,u,null),{position:c.position+1},d),!1),s.value=u}return{location:s,state:o,push:a,replace:i}}function Zu(e){e=Mu(e);const t=Yu(e),n=Ju(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=me({location:"",base:e,go:s,createHref:Vu.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let Kt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Re=(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})(Re||{});const Xu={type:Kt.Static,value:""},ec=/[a-zA-Z0-9_]/;function tc(e){if(!e)return[[]];if(e==="/")return[[Xu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${d}": ${b}`)}let n=Re.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let a=0,u,d="",c="";function m(){d&&(n===Re.Static?r.push({type:Kt.Static,value:d}):n===Re.Param||n===Re.ParamRegExp||n===Re.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Kt.Param,value:d,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function p(){d+=u}for(;a<e.length;){if(u=e[a++],u==="\\"&&n!==Re.ParamRegExp){s=n,n=Re.EscapeNext;continue}switch(n){case Re.Static:u==="/"?(d&&m(),i()):u===":"?(m(),n=Re.Param):p();break;case Re.EscapeNext:p(),n=s;break;case Re.Param:u==="("?n=Re.ParamRegExp:ec.test(u)?p():(m(),n=Re.Static,u!=="*"&&u!=="?"&&u!=="+"&&a--);break;case Re.ParamRegExp:u===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+u:n=Re.ParamRegExpEnd:c+=u;break;case Re.ParamRegExpEnd:m(),n=Re.Static,u!=="*"&&u!=="?"&&u!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===Re.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),m(),i(),o}const lr="[^/]+?",nc={sensitive:!1,strict:!1,start:!0,end:!0};var qe=(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})(qe||{});const sc=/[.+*?^${}()[\]/\\]/g;function oc(e,t){const n=me({},nc,t),s=[];let o=n.start?"^":"";const r=[];for(const d of e){const c=d.length?[]:[qe.Root];n.strict&&!d.length&&(o+="/");for(let m=0;m<d.length;m++){const p=d[m];let b=qe.Segment+(n.sensitive?qe.BonusCaseSensitive:0);if(p.type===Kt.Static)m||(o+="/"),o+=p.value.replace(sc,"\\$&"),b+=qe.Static;else if(p.type===Kt.Param){const{value:S,repeatable:$,optional:R,regexp:O}=p;r.push({name:S,repeatable:$,optional:R});const C=O||lr;if(C!==lr){b+=qe.BonusCustomRegExp;try{`${C}`}catch(g){throw new Error(`Invalid custom RegExp for param "${S}" (${C}): `+g.message)}}let x=$?`((?:${C})(?:/(?:${C}))*)`:`(${C})`;m||(x=R&&d.length<2?`(?:/${x})`:"/"+x),R&&(x+="?"),o+=x,b+=qe.Dynamic,R&&(b+=qe.BonusOptional),$&&(b+=qe.BonusRepeatable),C===".*"&&(b+=qe.BonusWildcard)}c.push(b)}s.push(c)}if(n.strict&&n.end){const d=s.length-1;s[d][s[d].length-1]+=qe.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function a(d){const c=d.match(i),m={};if(!c)return null;for(let p=1;p<c.length;p++){const b=c[p]||"",S=r[p-1];m[S.name]=b&&S.repeatable?b.split("/"):b}return m}function u(d){let c="",m=!1;for(const p of e){(!m||!c.endsWith("/"))&&(c+="/"),m=!1;for(const b of p)if(b.type===Kt.Static)c+=b.value;else if(b.type===Kt.Param){const{value:S,repeatable:$,optional:R}=b,O=S in d?d[S]:"";if(ct(O)&&!$)throw new Error(`Provided param "${S}" is an array but it is not repeatable (* or + modifiers)`);const C=ct(O)?O.join("/"):O;if(!C)if(R)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):m=!0);else throw new Error(`Missing required param "${S}"`);c+=C}}return c||"/"}return{re:i,score:s,keys:r,parse:a,stringify:u}}function rc(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===qe.Static+qe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===qe.Static+qe.Segment?1:-1:0}function Hl(e,t){let n=0;const s=e.score,o=t.score;for(;n<s.length&&n<o.length;){const r=rc(s[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-s.length)===1){if(ir(s))return 1;if(ir(o))return-1}return o.length-s.length}function ir(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lc={strict:!1,end:!0,sensitive:!1};function ic(e,t,n){const s=oc(tc(e.path),n),o=me(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function ac(e,t){const n=[],s=new Map;t=Xo(lc,t);function o(m){return s.get(m)}function r(m,p,b){const S=!b,$=ur(m);$.aliasOf=b&&b.record;const R=Xo(t,m),O=[$];if("alias"in m){const g=typeof m.alias=="string"?[m.alias]:m.alias;for(const _ of g)O.push(ur(me({},$,{components:b?b.record.components:$.components,path:_,aliasOf:b?b.record:$})))}let C,x;for(const g of O){const{path:_}=g;if(p&&_[0]!=="/"){const j=p.record.path,H=j[j.length-1]==="/"?"":"/";g.path=p.record.path+(_&&H+_)}if(C=ic(g,p,R),b?b.alias.push(C):(x=x||C,x!==C&&x.alias.push(C),S&&m.name&&!cr(C)&&i(m.name)),Bl(C)&&u(C),$.children){const j=$.children;for(let H=0;H<j.length;H++)r(j[H],C,b&&b.children[H])}b=b||C}return x?()=>{i(x)}:Sn}function i(m){if(Ll(m)){const p=s.get(m);p&&(s.delete(m),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(m);p>-1&&(n.splice(p,1),m.record.name&&s.delete(m.record.name),m.children.forEach(i),m.alias.forEach(i))}}function a(){return n}function u(m){const p=dc(m,n);n.splice(p,0,m),m.record.name&&!cr(m)&&s.set(m.record.name,m)}function d(m,p){let b,S={},$,R;if("name"in m&&m.name){if(b=s.get(m.name),!b)throw fn($e.MATCHER_NOT_FOUND,{location:m});R=b.record.name,S=me(ar(p.params,b.keys.filter(x=>!x.optional).concat(b.parent?b.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),m.params&&ar(m.params,b.keys.map(x=>x.name))),$=b.stringify(S)}else if(m.path!=null)$=m.path,b=n.find(x=>x.re.test($)),b&&(S=b.parse($),R=b.record.name);else{if(b=p.name?s.get(p.name):n.find(x=>x.re.test(p.path)),!b)throw fn($e.MATCHER_NOT_FOUND,{location:m,currentLocation:p});R=b.record.name,S=me({},p.params,m.params),$=b.stringify(S)}const O=[];let C=b;for(;C;)O.unshift(C.record),C=C.parent;return{name:R,path:$,params:S,matched:O,meta:cc(O)}}e.forEach(m=>r(m));function c(){n.length=0,s.clear()}return{addRoute:r,resolve:d,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:o}}function ar(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function ur(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:uc(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 uc(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function cr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function cc(e){return e.reduce((t,n)=>me(t,n.meta),{})}function dc(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;Hl(e,t[r])<0?s=r:n=r+1}const o=fc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function fc(e){let t=e;for(;t=t.parent;)if(Bl(t)&&Hl(e,t)===0)return t}function Bl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function dr(e){const t=rt(ys),n=rt(vo),s=le(()=>{const u=Pe(e.to);return t.resolve(u)}),o=le(()=>{const{matched:u}=s.value,{length:d}=u,c=u[d-1],m=n.matched;if(!c||!m.length)return-1;const p=m.findIndex(dn.bind(null,c));if(p>-1)return p;const b=fr(u[d-2]);return d>1&&fr(c)===b&&m[m.length-1].path!==b?m.findIndex(dn.bind(null,u[d-2])):p}),r=le(()=>o.value>-1&&gc(n.params,s.value.params)),i=le(()=>o.value>-1&&o.value===n.matched.length-1&&Ul(n.params,s.value.params));function a(u={}){if(vc(u)){const d=t[Pe(e.replace)?"replace":"push"](Pe(e.to)).catch(Sn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:le(()=>s.value.href),isActive:r,isExactActive:i,navigate:a}}function pc(e){return e.length===1?e[0]:e}const mc=Zr({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:dr,setup(e,{slots:t}){const n=ds(dr(e)),{options:s}=rt(ys),o=le(()=>({[pr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[pr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&pc(t.default(n));return e.custom?r:Rl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),hc=mc;function vc(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 gc(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!ct(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function fr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const pr=(e,t,n)=>e??t??n,bc=Zr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=rt(Qs),o=le(()=>e.route||s.value),r=rt(or,0),i=le(()=>{let d=Pe(r);const{matched:c}=o.value;let m;for(;(m=c[d])&&!m.components;)d++;return d}),a=le(()=>o.value.matched[i.value]);Kn(or,le(()=>i.value+1)),Kn(Ku,a),Kn(Qs,o);const u=L();return Pt(()=>[u.value,a.value,e.name],([d,c,m],[p,b,S])=>{c&&(c.instances[m]=d,b&&b!==c&&d&&d===p&&(c.leaveGuards.size||(c.leaveGuards=b.leaveGuards),c.updateGuards.size||(c.updateGuards=b.updateGuards))),d&&c&&(!b||!dn(c,b)||!p)&&(c.enterCallbacks[m]||[]).forEach($=>$(d))},{flush:"post"}),()=>{const d=o.value,c=e.name,m=a.value,p=m&&m.components[c];if(!p)return mr(n.default,{Component:p,route:d});const b=m.props[c],S=b?b===!0?d.params:typeof b=="function"?b(d):b:null,R=Rl(p,me({},S,t,{onVnodeUnmounted:O=>{O.component.isUnmounted&&(m.instances[c]=null)},ref:u}));return mr(n.default,{Component:R,route:d})||R}}});function mr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const xc=bc;function yc(e){const t=ac(e.routes,e),n=e.parseQuery||Gu,s=e.stringifyQuery||sr,o=e.history,r=bn(),i=bn(),a=bn(),u=$i(jt);let d=jt;en&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Ts.bind(null,D=>""+D),m=Ts.bind(null,Eu),p=Ts.bind(null,Mn);function b(D,W){let G,J;return Ll(D)?(G=t.getRecordMatcher(D),J=W):J=D,t.addRoute(J,G)}function S(D){const W=t.getRecordMatcher(D);W&&t.removeRoute(W)}function $(){return t.getRoutes().map(D=>D.record)}function R(D){return!!t.getRecordMatcher(D)}function O(D,W){if(W=me({},W||u.value),typeof D=="string"){const y=Os(n,D,W.path),T=t.resolve({path:y.path},W),M=o.createHref(y.fullPath);return me(y,T,{params:p(T.params),hash:Mn(y.hash),redirectedFrom:void 0,href:M})}let G;if(D.path!=null)G=me({},D,{path:Os(n,D.path,W.path).path});else{const y=me({},D.params);for(const T in y)y[T]==null&&delete y[T];G=me({},D,{params:m(y)}),W.params=m(W.params)}const J=t.resolve(G,W),ae=D.hash||"";J.params=c(p(J.params));const f=Pu(s,me({},D,{hash:$u(ae),path:J.path})),h=o.createHref(f);return me({fullPath:f,hash:ae,query:s===sr?Wu(D.query):D.query||{}},J,{redirectedFrom:void 0,href:h})}function C(D){return typeof D=="string"?Os(n,D,u.value.path):me({},D)}function x(D,W){if(d!==D)return fn($e.NAVIGATION_CANCELLED,{from:W,to:D})}function g(D){return H(D)}function _(D){return g(me(C(D),{replace:!0}))}function j(D,W){const G=D.matched[D.matched.length-1];if(G&&G.redirect){const{redirect:J}=G;let ae=typeof J=="function"?J(D,W):J;return typeof ae=="string"&&(ae=ae.includes("?")||ae.includes("#")?ae=C(ae):{path:ae},ae.params={}),me({query:D.query,hash:D.hash,params:ae.path!=null?{}:D.params},ae)}}function H(D,W){const G=d=O(D),J=u.value,ae=D.state,f=D.force,h=D.replace===!0,y=j(G,J);if(y)return H(me(C(y),{state:typeof y=="object"?me({},ae,y.state):ae,force:f,replace:h}),W||G);const T=G;T.redirectedFrom=W;let M;return!f&&Tu(s,J,G)&&(M=fn($e.NAVIGATION_DUPLICATED,{to:T,from:J}),et(J,J,!0,!1)),(M?Promise.resolve(M):Y(T,J)).catch(P=>$t(P)?$t(P,$e.NAVIGATION_GUARD_REDIRECT)?P:We(P):de(P,T,J)).then(P=>{if(P){if($t(P,$e.NAVIGATION_GUARD_REDIRECT))return H(me({replace:h},C(P.to),{state:typeof P.to=="object"?me({},ae,P.to.state):ae,force:f}),W||T)}else P=Se(T,J,!0,h,ae);return F(T,J,P),P})}function q(D,W){const G=x(D,W);return G?Promise.reject(G):Promise.resolve()}function fe(D){const W=Je.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(D):D()}function Y(D,W){let G;const[J,ae,f]=zu(D,W);G=Ms(J.reverse(),"beforeRouteLeave",D,W);for(const y of J)y.leaveGuards.forEach(T=>{G.push(Lt(T,D,W))});const h=q.bind(null,D,W);return G.push(h),Ke(G).then(()=>{G=[];for(const y of r.list())G.push(Lt(y,D,W));return G.push(h),Ke(G)}).then(()=>{G=Ms(ae,"beforeRouteUpdate",D,W);for(const y of ae)y.updateGuards.forEach(T=>{G.push(Lt(T,D,W))});return G.push(h),Ke(G)}).then(()=>{G=[];for(const y of f)if(y.beforeEnter)if(ct(y.beforeEnter))for(const T of y.beforeEnter)G.push(Lt(T,D,W));else G.push(Lt(y.beforeEnter,D,W));return G.push(h),Ke(G)}).then(()=>(D.matched.forEach(y=>y.enterCallbacks={}),G=Ms(f,"beforeRouteEnter",D,W,fe),G.push(h),Ke(G))).then(()=>{G=[];for(const y of i.list())G.push(Lt(y,D,W));return G.push(h),Ke(G)}).catch(y=>$t(y,$e.NAVIGATION_CANCELLED)?y:Promise.reject(y))}function F(D,W,G){a.list().forEach(J=>fe(()=>J(D,W,G)))}function Se(D,W,G,J,ae){const f=x(D,W);if(f)return f;const h=W===jt,y=en?history.state:{};G&&(J||h?o.replace(D.fullPath,me({scroll:h&&y&&y.scroll},ae)):o.push(D.fullPath,ae)),u.value=D,et(D,W,G,h),We()}let K;function Ge(){K||(K=o.listen((D,W,G)=>{if(!dt.listening)return;const J=O(D),ae=j(J,dt.currentRoute.value);if(ae){H(me(ae,{replace:!0,force:!0}),J).catch(Sn);return}d=J;const f=u.value;en&&Lu(nr(f.fullPath,G.delta),xs()),Y(J,f).catch(h=>$t(h,$e.NAVIGATION_ABORTED|$e.NAVIGATION_CANCELLED)?h:$t(h,$e.NAVIGATION_GUARD_REDIRECT)?(H(me(C(h.to),{force:!0}),J).then(y=>{$t(y,$e.NAVIGATION_ABORTED|$e.NAVIGATION_DUPLICATED)&&!G.delta&&G.type===Ks.pop&&o.go(-1,!1)}).catch(Sn),Promise.reject()):(G.delta&&o.go(-G.delta,!1),de(h,J,f))).then(h=>{h=h||Se(J,f,!1),h&&(G.delta&&!$t(h,$e.NAVIGATION_CANCELLED)?o.go(-G.delta,!1):G.type===Ks.pop&&$t(h,$e.NAVIGATION_ABORTED|$e.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),F(J,f,h)}).catch(Sn)}))}let Vt=bn(),Ee=bn(),pe;function de(D,W,G){We(D);const J=Ee.list();return J.length?J.forEach(ae=>ae(D,W,G)):console.error(D),Promise.reject(D)}function nt(){return pe&&u.value!==jt?Promise.resolve():new Promise((D,W)=>{Vt.add([D,W])})}function We(D){return pe||(pe=!D,Ge(),Vt.list().forEach(([W,G])=>D?G(D):W()),Vt.reset()),D}function et(D,W,G,J){const{scrollBehavior:ae}=e;if(!en||!ae)return Promise.resolve();const f=!G&&Fu(nr(D.fullPath,0))||(J||!G)&&history.state&&history.state.scroll||null;return io().then(()=>ae(D,W,f)).then(h=>h&&Uu(h)).catch(h=>de(h,D,W))}const Te=D=>o.go(D);let kt;const Je=new Set,dt={currentRoute:u,listening:!0,addRoute:b,removeRoute:S,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:$,resolve:O,options:e,push:g,replace:_,go:Te,back:()=>Te(-1),forward:()=>Te(1),beforeEach:r.add,beforeResolve:i.add,afterEach:a.add,onError:Ee.add,isReady:nt,install(D){D.component("RouterLink",hc),D.component("RouterView",xc),D.config.globalProperties.$router=dt,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>Pe(u)}),en&&!kt&&u.value===jt&&(kt=!0,g(o.location).catch(J=>{}));const W={};for(const J in jt)Object.defineProperty(W,J,{get:()=>u.value[J],enumerable:!0});D.provide(ys,dt),D.provide(vo,Fr(W)),D.provide(Qs,u);const G=D.unmount;Je.add(D),D.unmount=function(){Je.delete(D),Je.size<1&&(d=jt,K&&K(),K=null,u.value=jt,kt=!1,pe=!1),G()}}};function Ke(D){return D.reduce((W,G)=>W.then(()=>fe(G)),Promise.resolve())}return dt}function go(){return rt(ys)}function Gl(e){return rt(vo)}const Bn=window.location.pathname.startsWith("/portal/"),Qe={esPortal:Bn,baseRuta:Bn?"/portal/studio/":"/studio/",apiBase:Bn?"/portal":"/app",urlLogin:Bn?"/portal/login":"/login"};function X(e){return Qe.apiBase+e}async function Gn(e,t={}){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t.headers}}),s=n.headers.get("content-type")||"";if(n.redirected||!s.includes("application/json"))throw window.location.href=Qe.urlLogin,new Error("Sesión expirada");const o=await n.json();if(!n.ok){const r=typeof(o==null?void 0:o.error)=="string"?o.error:o==null?void 0:o.message;throw new Error(r||"Error de servidor")}return o}const ne={get:e=>Gn(e),post:(e,t)=>Gn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Gn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Gn(e,{method:"DELETE"})},_n=L(!1),_c={class:"h-14 px-4 flex items-center gap-2 border-b border-borde"},wc={key:0,class:"px-3 pt-3"},kc={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},Cc={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},$c={key:0,class:"px-2 text-xs text-tenue"},Ac={key:1,class:"px-2 text-xs text-tenue"},Sc={class:"truncate"},Ec={class:"flex items-center gap-1 mt-0.5"},Ic={class:"text-[11px] text-tenue"},Rc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},Pc=["onClick"],Tc=["onClick"],Oc={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Dc={class:"font-semibold text-texto mb-4"},Mc={key:0,class:"grid grid-cols-2 gap-3"},Nc=["value"],Vc={class:"text-[11px] text-tenue mt-1"},jc=["value"],Uc={class:"text-[11px] text-tenue mt-1"},Lc={class:"flex items-center gap-2 text-sm text-texto"},Fc={class:"flex justify-end gap-2 pt-2"},qc={__name:"Sidebar",setup(e,{expose:t}){const n=Gl(),s=go(),o=L([]),r=L([]),i=L([]),a=L(!0),u=L(""),d=L(!1),c=L(null),m=L(b()),p=le(()=>n.params.tenantId||n.params.id);Pt(()=>n.fullPath,()=>{_n.value=!1});function b(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function S(){a.value=!0,u.value="";try{const _=await ne.get(X("/umind/tenants"));o.value=_.items||[]}catch(_){u.value=_.message}finally{a.value=!1}}function $(_){return Array.isArray(_)?_:(_==null?void 0:_.items)||(_==null?void 0:_.registros)||[]}async function R(){if(Qe.esPortal)return;const[_,j]=await Promise.allSettled([ne.get("/app/api/clientes/select"),ne.get("/app/umind-planes/list")]);r.value=_.status==="fulfilled"?$(_.value):[],i.value=j.status==="fulfilled"?$(j.value):[];const H=[];_.status==="rejected"&&H.push("clientes"),j.status==="rejected"&&H.push("planes"),H.length&&(u.value=`No se pudo cargar la lista de ${H.join(" ni ")}.`)}function O(){c.value=null,m.value=b(),d.value=!0}function C(_){c.value=_,m.value={nombre:_.nombre,dominios_permitidos:_.dominios_permitidos,activo:_.activo,cliente_id:_.cliente_id??null,plan_id:_.plan_id??null},d.value=!0}async function x(){const _={...m.value,dominios_permitidos:m.value.dominios_permitidos.split(",").map(j=>j.trim()).filter(Boolean)};try{if(c.value)await ne.put(X(`/umind/tenants/${c.value.ID}`),_),d.value=!1,await S();else{const j=await ne.post(X("/umind/tenants"),_);d.value=!1,await S(),s.push(`/tenants/${j.id}`)}}catch(j){u.value=j.message}}async function g(_){confirm(`¿Eliminar el espacio "${_.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await ne.del(X(`/umind/tenants/${_.ID}`)),p.value===String(_.ID)&&s.push("/"),await S())}return t({recargar:S}),hs(()=>{S(),R()}),(_,j)=>{const H=mn("router-link");return v(),w(ee,null,[Pe(_n)?(v(),w("div",{key:0,class:"fixed inset-0 bg-black/50 z-30 md:hidden",onClick:j[0]||(j[0]=q=>_n.value=!1)})):B("",!0),l("aside",{class:ue(["w-64 shrink-0 flex flex-col border-r border-borde bg-superficie fixed inset-y-0 left-0 z-40 transition-transform duration-200 md:static md:h-screen md:sticky md:top-0 md:translate-x-0",Pe(_n)?"translate-x-0":"-translate-x-full"])},[l("div",_c,[oe(H,{to:"/",class:"flex items-center gap-2 text-base font-semibold text-texto"},{default:st(()=>[...j[8]||(j[8]=[l("svg",{viewBox:"0 0 96 96",class:"w-6 h-6 shrink-0","aria-hidden":"true"},[l("rect",{width:"96",height:"96",rx:"22",fill:"#8eb02f"}),l("path",{d:"M32,42 V58 A14,14 0 0 0 60,58 V42",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round","stroke-linejoin":"round"}),l("path",{d:"M60,58 V64",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round"}),l("circle",{cx:"60",cy:"28",r:"7",fill:"#fff"})],-1),l("span",null,[se("uMind "),l("span",{class:"text-brand"},"Studio")],-1)])]),_:1})]),Pe(Qe).esPortal?B("",!0):(v(),w("div",wc,[l("button",{class:"btn-primary w-full",onClick:O}," + Nuevo espacio ")])),u.value?(v(),w("p",kc,I(u.value),1)):B("",!0),l("nav",Cc,[a.value?(v(),w("p",$c,"Cargando...")):o.value.length===0?(v(),w("p",Ac,I(Pe(Qe).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin espacios todavía."),1)):B("",!0),(v(!0),w(ee,null,xe(o.value,q=>(v(),w("div",{key:q.ID,class:ue(["group flex items-center rounded-lg transition-colors",p.value===String(q.ID)?"bg-brand/10":"hover:bg-elevado"])},[oe(H,{to:`/tenants/${q.ID}`,class:ue(["flex-1 min-w-0 px-2.5 py-2 text-sm",p.value===String(q.ID)?"text-brand font-medium":"text-texto"])},{default:st(()=>[l("div",Sc,I(q.nombre),1),l("div",Ec,[l("span",{class:ue(["w-1.5 h-1.5 rounded-full",q.activo?"bg-green-500":"bg-tenue/40"])},null,2),l("span",Ic,I(q.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Pe(Qe).esPortal?B("",!0):(v(),w("div",Rc,[l("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:fe=>C(q)},[oe(Oe,{nombre:"lapiz",tam:14})],8,Pc),l("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:fe=>g(q)},[oe(Oe,{nombre:"cerrar",tam:14})],8,Tc)]))],2))),128))])],2),d.value?(v(),w("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:j[7]||(j[7]=Ae(q=>d.value=!1,["self"]))},[l("div",Oc,[l("h2",Dc,I(c.value?"Editar espacio":"Nuevo espacio"),1),j[17]||(j[17]=l("p",{class:"text-xs text-tenue mb-3"}," Un espacio es el negocio o sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),l("form",{class:"space-y-3",onSubmit:Ae(x,["prevent"])},[l("div",null,[j[9]||(j[9]=l("label",{class:"label"},"Nombre",-1)),z(l("input",{"onUpdate:modelValue":j[1]||(j[1]=q=>m.value.nombre=q),required:"",class:"input"},null,512),[[ie,m.value.nombre]])]),l("div",null,[j[10]||(j[10]=l("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),z(l("input",{"onUpdate:modelValue":j[2]||(j[2]=q=>m.value.dominios_permitidos=q),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[ie,m.value.dominios_permitidos]])]),Pe(Qe).esPortal?B("",!0):(v(),w("div",Mc,[l("div",null,[j[12]||(j[12]=l("label",{class:"label"},"Cliente",-1)),z(l("select",{"onUpdate:modelValue":j[3]||(j[3]=q=>m.value.cliente_id=q),class:"input"},[j[11]||(j[11]=l("option",{value:null},"— sin asignar —",-1)),(v(!0),w(ee,null,xe(r.value,q=>(v(),w("option",{key:q.ID,value:q.ID},I(q.nombre),9,Nc))),128))],512),[[Ht,m.value.cliente_id]]),l("p",Vc,I(r.value.length?"Define quién ve este espacio desde el portal.":"No hay clientes activos — creá uno en Clientes."),1)]),l("div",null,[j[14]||(j[14]=l("label",{class:"label"},"Plan",-1)),z(l("select",{"onUpdate:modelValue":j[4]||(j[4]=q=>m.value.plan_id=q),class:"input"},[j[13]||(j[13]=l("option",{value:null},"— sin plan —",-1)),(v(!0),w(ee,null,xe(i.value,q=>(v(),w("option",{key:q.ID,value:q.ID},I(q.nombre)+" ("+I(q.max_agentes===0?"∞":q.max_agentes)+" agentes) ",9,jc))),128))],512),[[Ht,m.value.plan_id]]),l("p",Uc,I(i.value.length?"Límite de agentes y precios de consumo.":"No hay planes — creá uno en uMind Planes."),1)])])),l("label",Lc,[z(l("input",{"onUpdate:modelValue":j[5]||(j[5]=q=>m.value.activo=q),type:"checkbox"},null,512),[[_t,m.value.activo]]),j[15]||(j[15]=se(" Activo ",-1))]),l("div",Fc,[l("button",{type:"button",class:"btn-ghost",onClick:j[6]||(j[6]=q=>d.value=!1)}," Cancelar "),j[16]||(j[16]=l("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):B("",!0)],64)}}},Wl="umind-tema";function Hc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const ln=L(localStorage.getItem(Wl)||Hc());function Kl(){document.documentElement.classList.toggle("dark",ln.value==="oscuro")}function hr(){ln.value=ln.value==="oscuro"?"claro":"oscuro",localStorage.setItem(Wl,ln.value),Kl()}Kl();const vr="umind_despertar_visto",gr=1250,Bc={__name:"DespertarUmind",setup(e){const t=L(null),n=L(!1);let s=null,o=null;function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}return hs(()=>{r()||sessionStorage.getItem(vr)||(sessionStorage.setItem(vr,"1"),n.value=!0,o=setTimeout(()=>n.value=!1,gr),requestAnimationFrame(()=>{const i=t.value;if(!i)return;const a=i.getContext("2d"),u=Math.min(window.devicePixelRatio||1,2),d=window.innerWidth,c=window.innerHeight;i.width=Math.round(d*u),i.height=Math.round(c*u),a.setTransform(u,0,0,u,0,0);const m=d<640?22:46,p=Array.from({length:m},()=>({x:Math.random()*d,y:Math.random()*c,r:1+Math.random()*1.6,demora:Math.random()*.45})),b=performance.now(),S=$=>{const R=Math.min(1,($-b)/gr);a.clearRect(0,0,d,c);const O=R<.75?1:1-(R-.75)/.25;for(let C=0;C<p.length;C++){const x=p[C],g=Math.max(0,Math.min(1,(R-x.demora)/.4));if(!(g<=0)){for(let _=C+1;_<p.length;_++){const j=p[_],H=x.x-j.x,q=x.y-j.y,fe=Math.sqrt(H*H+q*q);fe>170||(a.strokeStyle=`rgba(142, 176, 47, ${.16*(1-fe/170)*g*O})`,a.lineWidth=1,a.beginPath(),a.moveTo(x.x,x.y),a.lineTo(j.x,j.y),a.stroke())}a.beginPath(),a.arc(x.x,x.y,x.r*g,0,Math.PI*2),a.fillStyle=`rgba(142, 176, 47, ${.5*g*O})`,a.fill()}}R<1&&(s=requestAnimationFrame(S))};s=requestAnimationFrame(S)}))}),tl(()=>{s&&cancelAnimationFrame(s),o&&clearTimeout(o)}),(i,a)=>n.value?(v(),w("canvas",{key:0,ref_key:"lienzo",ref:t,class:"fixed inset-0 w-full h-full pointer-events-none z-50","aria-hidden":"true"},null,512)):B("",!0)}},Gc={class:"min-h-screen flex"},Wc={class:"flex-1 min-w-0 flex flex-col"},Kc={class:"h-14 shrink-0 flex items-center gap-1 px-4 sm:px-6 border-b border-borde"},zc=["title"],Qc={class:"flex-1 max-w-5xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8 animate-aparecer"},Jc={__name:"App",setup(e){return(t,n)=>{const s=mn("router-view");return v(),w("div",Gc,[oe(Bc),oe(qc),l("main",Wc,[l("header",Kc,[l("button",{class:"btn-ghost !px-2 !py-1.5 md:hidden","aria-label":"Abrir menú",onClick:n[0]||(n[0]=o=>_n.value=!0)},[...n[2]||(n[2]=[l("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),n[3]||(n[3]=l("span",{class:"flex-1"},null,-1)),l("button",{class:"btn-ghost !px-2.5 !py-1.5",title:Pe(ln)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[1]||(n[1]=(...o)=>Pe(hr)&&Pe(hr)(...o))},[oe(Oe,{nombre:Pe(ln)==="oscuro"?"sol":"luna",tam:17},null,8,["nombre"])],8,zc)]),l("div",Qc,[oe(s)])])])}}},Yc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Zc=["width","height","aria-label"],Xc=["fill"],ed=["stroke"],td=["cy"],nd=["cy"],sd=["cy"],od=["cy"],rd={key:1,d:"M41,66 h12 M67,66 h12",class:"umi-linea","stroke-width":"5","stroke-linecap":"round",fill:"none"},ld={key:4,d:"M50,78 q10,8 20,0",class:"umi-linea","stroke-width":"4",fill:"none","stroke-linecap":"round"},id={__name:"UiMascota",props:{estado:{type:String,default:"normal"},tam:{type:[Number,String],default:72}},setup(e){return(t,n)=>(v(),w("svg",{width:e.tam,height:e.tam,viewBox:"0 0 120 120",class:"shrink-0",role:"img","aria-label":`Umi, la mascota de uMind (${e.estado})`},[l("circle",{cx:"60",cy:"26",r:"6",fill:e.estado==="alerta"?"#dc2626":"currentColor",class:ue(e.estado==="pensando"?"umi-late":"")},null,10,Xc),l("line",{x1:"60",y1:"32",x2:"60",y2:"44",stroke:e.estado==="alerta"?"#dc2626":"currentColor","stroke-width":"4","stroke-linecap":"round"},null,8,ed),n[7]||(n[7]=l("path",{d:"M30,46 V76 A30,30 0 0 0 90,76 V46 Z",fill:"currentColor"},null,-1)),e.estado==="normal"||e.estado==="contenta"||e.estado==="alerta"?(v(),w(ee,{key:0},[l("circle",{cx:"47",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,td),l("circle",{cx:"73",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,nd),l("circle",{cx:"48",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,sd),l("circle",{cx:"74",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,od)],64)):e.estado==="durmiendo"?(v(),w("path",rd)):e.estado==="pensando"?(v(),w(ee,{key:2},[n[0]||(n[0]=l("circle",{cx:"45",cy:"66",r:"4.5",class:"umi-ojo umi-p1"},null,-1)),n[1]||(n[1]=l("circle",{cx:"60",cy:"66",r:"4.5",class:"umi-ojo umi-p2"},null,-1)),n[2]||(n[2]=l("circle",{cx:"75",cy:"66",r:"4.5",class:"umi-ojo umi-p3"},null,-1))],64)):e.estado==="buscando"?(v(),w(ee,{key:3},[n[3]||(n[3]=l("circle",{cx:"47",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[4]||(n[4]=l("circle",{cx:"73",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[5]||(n[5]=l("circle",{cx:"50",cy:"66",r:"3",class:"umi-pupila"},null,-1)),n[6]||(n[6]=l("circle",{cx:"76",cy:"66",r:"3",class:"umi-pupila"},null,-1))],64)):B("",!0),e.estado==="contenta"?(v(),w("path",ld)):B("",!0)],8,Zc))}},Nn=Yc(id,[["__scopeId","data-v-551897a0"]]),ad={key:0,class:"flex flex-col items-center justify-center py-24 text-sm text-tenue"},ud={key:1,class:"max-w-md mx-auto text-center py-20"},cd={key:2,class:"flex flex-col items-center justify-center text-center py-24"},dd={class:"text-lg font-medium text-texto"},fd={class:"text-sm text-tenue mt-1"},pd={__name:"Home",setup(e){const t=go(),n=L(Qe.esPortal),s=L(!1);async function o(){if(Qe.esPortal)try{const i=(await ne.get(X("/umind/tenants"))).items||[];if(i.length===0){s.value=!0;return}if(i.length!==1)return;const a=i[0].ID,d=(await ne.get(X(`/umind/agentes?tenant_id=${a}`))).items||[];if(d.length===1){t.replace(`/tenants/${a}/agentes/${d[0].ID}`);return}t.replace(`/tenants/${a}`)}catch{}finally{n.value=!1}}return hs(o),(r,i)=>n.value?(v(),w("div",ad," Abriendo tu asistente… ")):s.value?(v(),w("div",ud,[oe(Nn,{estado:"durmiendo",tam:80,class:"mx-auto mb-4 text-brand"}),i[0]||(i[0]=Al('<h1 class="text-lg font-medium text-texto">Todavía no tenés un asistente activo</h1><p class="text-sm text-tenue mt-2"> uMind contesta por vos en WhatsApp y en tu sitio, con la información de tu negocio. Entiende las notas de voz y lee las fotos y archivos que te mandan tus clientes. </p><a class="btn-primary inline-block mt-5" href="mailto:soporte@u-site.app?subject=Quiero%20activar%20uMind">Quiero activarlo</a><p class="text-xs text-tenue mt-4"><a href="/portal/dashboard" class="underline">Volver al portal</a></p>',4))])):(v(),w("div",cd,[oe(Nn,{estado:"normal",tam:64,class:"mx-auto mb-4 text-brand"}),l("h1",dd,I(Pe(Qe).esPortal?"Elegí tu espacio de la izquierda":"Elegí un espacio de la izquierda"),1),l("p",fd,I(Pe(Qe).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},md={class:"flex flex-col items-center justify-center text-center py-12 px-6"},hd={key:0,class:"text-3xl mb-3 opacity-70"},vd={class:"text-sm font-medium text-texto"},gd={key:2,class:"text-xs text-tenue mt-1.5 max-w-sm leading-relaxed"},bd={key:3,class:"mt-4"},lt={__name:"UiEmptyState",props:{estado:{type:String,default:"durmiendo"},titulo:String,detalle:String,icono:{type:String,default:""}},setup(e){return(t,n)=>(v(),w("div",md,[e.icono?(v(),w("div",hd,I(e.icono),1)):(v(),_e(Nn,{key:1,estado:e.estado,tam:64,class:"mb-3 text-brand"},null,8,["estado"])),l("p",vd,I(e.titulo),1),e.detalle?(v(),w("p",gd,I(e.detalle),1)):B("",!0),t.$slots.default?(v(),w("div",bd,[Yi(t.$slots,"default")])):B("",!0)]))}},xd={key:0,class:"mb-6"},yd={class:"flex items-start justify-between gap-4"},_d={class:"text-xl font-semibold text-texto"},wd={class:"text-xs text-tenue mt-1"},kd={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Cd={class:"flex items-center justify-between mb-4"},$d={class:"flex items-center gap-2"},Ad={key:0,class:"badge-alerta"},Sd={key:1,class:"badge-neutro"},Ed=["disabled"],Id={key:2,class:"text-xs text-tenue -mt-2 mb-4"},Rd={key:3,class:"text-xs text-tenue -mt-2 mb-4"},Pd={key:4,class:"grid gap-3 sm:grid-cols-2"},Td=["disabled"],Od={key:6,class:"grid gap-3 sm:grid-cols-2"},Dd={class:"flex items-start gap-3"},Md={class:"min-w-0 flex-1"},Nd={class:"flex items-center gap-2"},Vd={class:"font-medium text-texto truncate"},jd={class:"text-xs text-tenue mt-0.5 truncate"},Ud={class:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"},Ld=["onClick"],Fd=["onClick"],qd=["onClick"],Hd={class:"flex items-center gap-4 mt-3.5 pt-3 border-t border-borde text-xs text-tenue"},Bd={class:"tabular-nums"},Gd={class:"text-texto font-medium"},Wd={class:"tabular-nums"},Kd={class:"text-texto font-medium"},zd={class:"tabular-nums"},Qd={class:"text-texto font-medium"},Jd={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg max-h-[calc(100vh-2rem)] overflow-y-auto"},Yd={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},Zd={key:0},Xd={class:"grid gap-1.5"},ef=["value"],tf={class:"min-w-0"},nf={class:"block text-sm text-texto"},sf={class:"block text-xs text-tenue"},of={key:0,class:"block text-xs text-tenue mt-0.5"},rf=["value"],lf={class:"flex items-center gap-2"},af={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},uf={class:"flex justify-end gap-2 pt-2"},cf={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},df={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=le(()=>Number(t.id)),s=go(),o=L(null),r=L([]),i=L([]),a=L(""),u=L(!1),d=L(null),c=L(C()),m=L(null),p=L({}),b=L(!0);function S(Y){const F=p.value[Y.ID]||{};return Y.activo?F.documentos>0?{tipo:"ok",texto:"listo"}:{tipo:"alerta",texto:"sin conocimiento"}:{tipo:"neutro",texto:"inactivo"}}function $(Y){const F=p.value[Y.ID]||{};return{documentos:F.documentos||0,canales:F.canales||0,conversaciones:F.conversaciones_7d||0}}function R(Y){return String(Y||"?").trim().split(/\s+/).slice(0,2).map(F=>F[0]).join("").toUpperCase()}const O=le(()=>{if(!m.value)return{sinPlan:!0};const Y=m.value.max_agentes||0;return{sinPlan:!1,nombre:m.value.nombre,ilimitado:Y<=0,max:Y,usados:r.value.length,lleno:Y>0&&r.value.length>=Y}});function C(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0,plantilla_rubro:""}}const x=L([]);async function g(){a.value="",b.value=!0;try{const[Y,F,Se,K]=await Promise.all([ne.get(X("/umind/tenants")),ne.get(X(`/umind/agentes?tenant_id=${t.id}`)),ne.get(X("/umind/ai-configs")),ne.get(X("/umind/plantillas-rubro"))]);o.value=(Y.items||[]).find(Ge=>String(Ge.ID)===t.id)||null,r.value=F.items||[],m.value=F.plan||null,p.value=F.resumen||{},i.value=Se.items||[],x.value=K.items||[]}catch(Y){a.value=Y.message}finally{b.value=!1}}async function _(Y){const F=prompt(`Nombre de la copia de "${Y.nombre}":`,`${Y.nombre} (copia)`);if(F!==null){a.value="";try{const Se=await ne.post(X(`/umind/agentes/${Y.ID}/duplicar`),{tenant_id:Number(n.value),nombre:F.trim()});await g(),Se.aviso&&alert(Se.aviso)}catch(Se){a.value=Se.message}}}function j(){d.value=null,c.value=C(),u.value=!0}function H(Y){d.value=Y,c.value={nombre:Y.nombre,ai_config_id:Y.ai_config_id,tono:Y.tono,mensaje_bienvenida:Y.mensaje_bienvenida,color:Y.color||"#8eb02f",activo:Y.activo},u.value=!0}async function q(){try{if(d.value)await ne.put(X(`/umind/agentes/${d.value.ID}`),{tenant_id:n.value,...c.value}),u.value=!1,await g();else{const Y=await ne.post(X("/umind/agentes"),{tenant_id:n.value,...c.value});u.value=!1,s.push(`/tenants/${n.value}/agentes/${Y.id}`)}}catch(Y){a.value=Y.message}}async function fe(Y){confirm(`¿Eliminar el agente "${Y.nombre}"? Esto no se puede deshacer.`)&&(await ne.del(X(`/umind/agentes/${Y.ID}`)),await g())}return Pt(()=>t.id,g,{immediate:!0}),(Y,F)=>{const Se=mn("router-link");return v(),w("div",null,[o.value?(v(),w("div",xd,[l("div",yd,[l("div",null,[l("h1",_d,I(o.value.nombre),1),l("p",wd,I(o.value.dominios_permitidos||"sin dominios configurados"),1)]),oe(Se,{to:`/tenants/${n.value??e.id}/ia`,class:"btn-ghost"},{default:st(()=>[...F[10]||(F[10]=[se("Tu IA",-1)])]),_:1},8,["to"]),oe(Se,{to:`/tenants/${n.value??e.id}/uso`,class:"btn-ghost inline-flex items-center gap-1.5"},{default:st(()=>[oe(Oe,{nombre:"grafico"}),F[11]||(F[11]=se(" Consumo",-1))]),_:1},8,["to"])])])):B("",!0),a.value?(v(),w("p",kd,I(a.value),1)):B("",!0),l("div",Cd,[l("div",$d,[F[12]||(F[12]=l("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),O.value.sinPlan?(v(),w("span",Ad,"sin plan · sin límite")):O.value.ilimitado?(v(),w("span",Sd,I(O.value.nombre)+" · ilimitado",1)):(v(),w("span",{key:2,class:ue(O.value.lleno?"badge-alerta":"badge-neutro")},I(O.value.nombre)+" · "+I(O.value.usados)+" de "+I(O.value.max),3))]),l("button",{class:"btn-primary",disabled:O.value.lleno,onClick:j},"+ Nuevo agente",8,Ed)]),O.value.sinPlan&&!Pe(Qe).esPortal?(v(),w("p",Id," Este espacio no tiene plan asignado, así que no se le aplica ningún límite de agentes. Asignale uno desde el lápiz del espacio, en la barra izquierda. ")):O.value.lleno?(v(),w("p",Rd," Alcanzaste el máximo de agentes de tu plan. ")):B("",!0),b.value?(v(),w("div",Pd,[(v(),w(ee,null,xe(2,K=>l("div",{key:K,class:"card p-4 animate-pulse"},[...F[13]||(F[13]=[Al('<div class="flex items-center gap-3"><div class="w-10 h-10 rounded-xl bg-elevado"></div><div class="flex-1"><div class="h-3.5 w-28 rounded bg-elevado"></div><div class="h-2.5 w-16 rounded bg-elevado mt-2"></div></div></div><div class="h-2.5 w-full rounded bg-elevado mt-4"></div>',2)])])),64))])):r.value.length===0?(v(),_e(lt,{key:5,class:"card",estado:"durmiendo",titulo:"Todavía no hay agentes",detalle:"Creá el primero y cargale su base de conocimiento para que empiece a responder."},{default:st(()=>[l("button",{class:"btn-primary",disabled:O.value.lleno,onClick:j},"+ Crear el primer agente",8,Td)]),_:1})):(v(),w("div",Od,[(v(!0),w(ee,null,xe(r.value,K=>(v(),_e(Se,{key:K.ID,to:`/tenants/${n.value}/agentes/${K.ID}`,class:"card p-4 relative group hover:shadow-lg hover:-translate-y-0.5 transition-all overflow-hidden"},{default:st(()=>[l("span",{class:"absolute inset-x-0 top-0 h-1",style:Jt({background:K.color||"#8eb02f"})},null,4),l("div",Dd,[l("span",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-white text-sm font-semibold shrink-0",style:Jt({background:K.color||"#8eb02f",opacity:K.activo?1:.4})},I(R(K.nombre)),5),l("div",Md,[l("div",Nd,[l("span",Vd,I(K.nombre),1),l("span",{class:ue(`badge-${S(K).tipo}`)},I(S(K).texto),3)]),l("p",jd,I(K.tono||"sin tono definido"),1)]),l("div",Ud,[l("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:Ae(Ge=>H(K),["prevent","stop"])},[oe(Oe,{nombre:"lapiz",tam:14})],8,Ld),l("button",{class:"p-1 text-tenue hover:text-texto",title:"Duplicar: copia el conocimiento y las herramientas a un agente nuevo",onClick:Ae(Ge=>_(K),["prevent","stop"])},[oe(Oe,{nombre:"copiar",tam:14})],8,Fd),l("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:Ae(Ge=>fe(K),["prevent","stop"])},[oe(Oe,{nombre:"cerrar",tam:14})],8,qd)])]),l("div",Hd,[l("span",Bd,[l("b",Gd,I($(K).conversaciones),1),F[14]||(F[14]=se(" conversaciones · 7d",-1))]),l("span",Wd,[l("b",Kd,I($(K).documentos),1),F[15]||(F[15]=se(" fuentes",-1))]),l("span",zd,[l("b",Qd,I($(K).canales),1),F[16]||(F[16]=se(" canales",-1))])])]),_:2},1032,["to"]))),128))])),u.value?(v(),w("div",{key:7,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:F[9]||(F[9]=Ae(K=>u.value=!1,["self"]))},[l("div",Jd,[l("h2",Yd,I(d.value?"Editar agente":"Nuevo agente"),1),l("form",{class:"space-y-3",onSubmit:Ae(q,["prevent"])},[l("div",null,[F[17]||(F[17]=l("label",{class:"label"},"Nombre",-1)),z(l("input",{"onUpdate:modelValue":F[0]||(F[0]=K=>c.value.nombre=K),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[ie,c.value.nombre]])]),!d.value&&x.value.length?(v(),w("div",Zd,[F[18]||(F[18]=l("label",{class:"label"},"Arrancar con",-1)),l("div",Xd,[(v(!0),w(ee,null,xe([{clave:"",nombre:"Agente en blanco",descripcion:"Sin conocimiento cargado. Lo escribís vos desde cero."},...x.value],K=>(v(),w("label",{key:K.clave,class:ue(["flex gap-2.5 p-2.5 rounded-lg border cursor-pointer transition-colors",c.value.plantilla_rubro===K.clave?"border-brand bg-brand/5":"border-borde hover:border-brand/40"])},[z(l("input",{"onUpdate:modelValue":F[1]||(F[1]=Ge=>c.value.plantilla_rubro=Ge),type:"radio",value:K.clave,class:"mt-1 text-brand focus:ring-brand"},null,8,ef),[[lu,c.value.plantilla_rubro]]),l("span",tf,[l("span",nf,I(K.nombre),1),l("span",sf,I(K.descripcion),1),K.notas?(v(),w("span",of,I(K.notas)+" notas listas para editar · "+I(K.resumen),1)):B("",!0)])],2))),128))]),F[19]||(F[19]=l("p",{class:"text-xs text-tenue mt-1.5"}," Las notas vienen con ejemplos entre corchetes — abrilas y reemplazalas por tus datos reales. ",-1))])):B("",!0),l("div",null,[F[21]||(F[21]=l("label",{class:"label"},"Config de IA",-1)),z(l("select",{"onUpdate:modelValue":F[2]||(F[2]=K=>c.value.ai_config_id=K),class:"input"},[F[20]||(F[20]=l("option",{value:null},"— sin asignar —",-1)),(v(!0),w(ee,null,xe(i.value,K=>(v(),w("option",{key:K.ID,value:K.ID},I(K.nombre)+" ("+I(K.provider)+")",9,rf))),128))],512),[[Ht,c.value.ai_config_id]])]),l("div",null,[F[22]||(F[22]=l("label",{class:"label"},"Tono / personalidad",-1)),z(l("textarea",{"onUpdate:modelValue":F[3]||(F[3]=K=>c.value.tono=K),rows:"2",class:"input"},null,512),[[ie,c.value.tono]])]),l("div",null,[F[23]||(F[23]=l("label",{class:"label"},"Mensaje de bienvenida",-1)),z(l("input",{"onUpdate:modelValue":F[4]||(F[4]=K=>c.value.mensaje_bienvenida=K),class:"input"},null,512),[[ie,c.value.mensaje_bienvenida]])]),l("div",null,[F[24]||(F[24]=l("label",{class:"label"},"Color del widget",-1)),l("div",lf,[z(l("input",{"onUpdate:modelValue":F[5]||(F[5]=K=>c.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),[[ie,c.value.color]]),z(l("input",{"onUpdate:modelValue":F[6]||(F[6]=K=>c.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),[[ie,c.value.color]])])]),l("label",af,[z(l("input",{"onUpdate:modelValue":F[7]||(F[7]=K=>c.value.activo=K),type:"checkbox"},null,512),[[_t,c.value.activo]]),F[25]||(F[25]=se(" Activo ",-1))]),l("div",uf,[l("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:F[8]||(F[8]=K=>u.value=!1)},"Cancelar"),l("button",cf,I(d.value?"Guardar":"Crear"),1)])],32)])])):B("",!0)])}}},ff={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},pf={class:"cursor-pointer flex items-center gap-2 text-sm"},mf={class:"text-tenue text-xs shrink-0"},hf={class:"text-texto truncate"},vf={class:"text-tenue text-xs ml-auto shrink-0"},gf={key:0,class:"mt-2 bg-elevado border border-borde rounded-lg p-2 text-xs text-gray-600 dark:text-gray-400 overflow-x-auto whitespace-pre-wrap"},bf={__name:"TabAuditoria",props:{eventos:{type:Array,default:()=>[]}},setup(e){const t=le(()=>s=>({error:"badge-error",warn:"badge-alerta"})[s]||"badge-neutro");function n(s){try{return new Date(s).toLocaleString()}catch{return s}}return(s,o)=>(v(),w("div",null,[o[0]||(o[0]=l("p",{class:"label mb-4"}," Errores y eventos técnicos de este agente — fallos al llamar a la IA, a una herramienta, al correo o a los canales. Últimos 100. ",-1)),l("div",ff,[e.eventos.length===0?(v(),_e(lt,{key:0,estado:"contenta",titulo:"Ningún problema registrado",detalle:"Acá aparecen los errores: una herramienta que no responde, una fuente que no se pudo leer. Que esté vacío es buena señal."})):B("",!0),(v(!0),w(ee,null,xe(e.eventos,r=>(v(),w("details",{key:r.ID,class:"p-3"},[l("summary",pf,[l("span",{class:ue(["px-1.5 py-0.5 rounded text-xs shrink-0",t.value(r.nivel)])},I(r.nivel),3),l("span",mf,I(r.origen),1),l("span",hf,I(r.mensaje),1),l("span",vf,I(n(r.CreatedAt)),1)]),r.detalle?(v(),w("pre",gf,I(r.detalle),1)):B("",!0)]))),128))])]))}},xf={class:"flex flex-wrap gap-2 mb-4"},yf={class:"grid sm:grid-cols-2 gap-3"},_f={key:0,class:"grid sm:grid-cols-3 gap-3"},wf={key:1,class:"text-sm text-red-600 dark:text-red-400"},kf={class:"flex items-center justify-between"},Cf=["disabled"],$f={class:"card divide-y divide-borde"},Af={class:"flex items-center justify-between gap-3"},Sf={class:"min-w-0"},Ef={class:"font-medium text-texto"},If={class:"ml-2 text-xs text-tenue"},Rf={class:"flex items-center gap-3 shrink-0 text-sm"},Pf=["disabled","onClick"],Tf=["onClick"],Of={__name:"TabConexiones",props:{agenteId:{type:Number,required:!0},conexiones:{type:Array,default:()=>[]}},emits:["recargar"],setup(e,{emit:t}){const n=e,s=t,o=L(!1),r=L(!1),i=L(""),a=L(!1),u=L({email:"",password:"",host:"",puerto:993,encriptado:"ssl"}),d=L(null),c=L({});function m(R){return{google:"Google",microsoft:"Outlook",imap:"Casilla propia"}[R]||R}function p(R){window.location.href=X(`/umind/conexiones/conectar?agente_id=${n.agenteId}&proveedor=${R}`)}async function b(){r.value=!0,i.value="";try{await ne.post(X("/umind/conexiones/imap"),{agente_id:n.agenteId,email:u.value.email,password:u.value.password,host:a.value?u.value.host:"",puerto:a.value?Number(u.value.puerto):0,encriptado:u.value.encriptado}),o.value=!1,u.value={email:"",password:"",host:"",puerto:993,encriptado:"ssl"},a.value=!1,s("recargar")}catch(R){i.value=R.message,!a.value&&/conexión|conectar|resolver/i.test(R.message)&&(a.value=!0)}finally{r.value=!1}}async function S(R){d.value=R.ID,c.value={...c.value,[R.ID]:null};try{const O=await ne.post(X(`/umind/conexiones/${R.ID}/probar`),{});c.value={...c.value,[R.ID]:{ok:!0,texto:O.message}}}catch(O){c.value={...c.value,[R.ID]:{ok:!1,texto:O.message}}}finally{d.value=null}}async function $(R){confirm(`¿Desconectar la cuenta ${R.email||R.proveedor}?`)&&(await ne.del(X(`/umind/conexiones/${R.ID}`)),s("recargar"))}return(R,O)=>(v(),w("div",null,[O[15]||(O[15]=l("p",{class:"label mb-4"},[se(" Las casillas que el agente puede consultar cuando se lo pedís — por ejemplo: "),l("em",null,"«revisame los correos de hoy y haceme un resumen»"),se(". Solo lectura: nunca marca nada como leído ni manda nada. Podés conectar varias. ")],-1)),l("div",xf,[l("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:O[0]||(O[0]=C=>p("google"))}," Conectar Google "),l("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:O[1]||(O[1]=C=>p("microsoft"))}," Conectar Outlook "),l("button",{class:"btn-primary",onClick:O[2]||(O[2]=C=>o.value=!o.value)}," + Casilla propia ")]),o.value?(v(),w("form",{key:0,class:"card p-4 mb-4 space-y-3",onSubmit:Ae(b,["prevent"])},[l("div",yf,[l("div",null,[O[8]||(O[8]=l("label",{class:"label"},"Correo",-1)),z(l("input",{"onUpdate:modelValue":O[3]||(O[3]=C=>u.value.email=C),type:"email",required:"",placeholder:"ventas@tunegocio.com",class:"input"},null,512),[[ie,u.value.email]])]),l("div",null,[O[9]||(O[9]=l("label",{class:"label"},"Contraseña",-1)),z(l("input",{"onUpdate:modelValue":O[4]||(O[4]=C=>u.value.password=C),type:"password",autocomplete:"new-password",required:"",class:"input"},null,512),[[ie,u.value.password]])])]),a.value?(v(),w("div",_f,[l("div",null,[O[10]||(O[10]=l("label",{class:"label"},"Servidor IMAP",-1)),z(l("input",{"onUpdate:modelValue":O[5]||(O[5]=C=>u.value.host=C),placeholder:"mail.tunegocio.com",class:"input font-mono"},null,512),[[ie,u.value.host]])]),l("div",null,[O[11]||(O[11]=l("label",{class:"label"},"Puerto",-1)),z(l("input",{"onUpdate:modelValue":O[6]||(O[6]=C=>u.value.puerto=C),type:"number",class:"input"},null,512),[[ie,u.value.puerto]])]),l("div",null,[O[13]||(O[13]=l("label",{class:"label"},"Encriptación",-1)),z(l("select",{"onUpdate:modelValue":O[7]||(O[7]=C=>u.value.encriptado=C),class:"input"},[...O[12]||(O[12]=[l("option",{value:"ssl"},"SSL (993)",-1),l("option",{value:"starttls"},"STARTTLS (143)",-1)])],512),[[Ht,u.value.encriptado]])])])):B("",!0),i.value?(v(),w("p",wf,I(i.value),1)):B("",!0),l("div",kf,[O[14]||(O[14]=l("p",{class:"text-xs text-tenue"}," Se prueba la conexión antes de guardar. Gmail y Outlook van por sus botones de arriba. ",-1)),l("button",{type:"submit",class:"btn-primary",disabled:r.value},I(r.value?"Probando…":"Conectar"),9,Cf)])],32)):B("",!0),l("div",$f,[e.conexiones.length===0?(v(),_e(lt,{key:0,titulo:"Sin cuentas conectadas",detalle:"Conectá una casilla y vas a poder pedirle al agente que te revise el correo y te lo resuma, sin abrir el webmail."})):B("",!0),(v(!0),w(ee,null,xe(e.conexiones,C=>(v(),w("div",{key:C.ID,class:"p-4"},[l("div",Af,[l("div",Sf,[l("span",Ef,I(C.email),1),l("span",If,I(m(C.proveedor)),1),l("span",{class:ue(["ml-2 px-1.5 py-0.5 rounded text-xs",C.activo?"badge-ok":"badge-neutro"])},I(C.activo?"activa":"inactiva"),3),c.value[C.ID]?(v(),w("p",{key:0,class:ue(["text-xs mt-1",c.value[C.ID].ok?"text-brand":"text-red-600 dark:text-red-400"])},I(c.value[C.ID].texto),3)):B("",!0)]),l("div",Rf,[C.proveedor==="imap"?(v(),w("button",{key:0,class:"text-brand hover:underline disabled:opacity-40",disabled:d.value===C.ID,onClick:x=>S(C)},I(d.value===C.ID?"Probando…":"Probar"),9,Pf)):B("",!0),l("button",{class:"text-red-500 hover:text-red-700",onClick:x=>$(C)},"Desconectar",8,Tf)])])]))),128))])]))}},Df={class:"card p-4 flex flex-col h-[28rem]"},Mf={class:"flex-1 overflow-y-auto space-y-2 mb-3"},Nf={key:0,class:"text-sm text-tenue"},Vf={key:1,class:"flex items-center gap-2"},jf=["disabled"],br={__name:"TabChat",props:{agenteId:{type:Number,required:!0}},setup(e){const t=e,n=`staff-preview-${Math.random().toString(36).slice(2)}`,s=L([]),o=L(""),r=L(!1);async function i(){const a=o.value.trim();if(!(!a||r.value)){o.value="",s.value.push({role:"user",content:a}),r.value=!0;try{const u=await ne.post(X("/umind/chat"),{agente_id:t.agenteId,session_id:n,mensaje:a});s.value.push({role:"assistant",content:u.respuesta})}catch(u){s.value.push({role:"assistant",content:`⚠ ${u.message}`})}finally{r.value=!1}}}return(a,u)=>(v(),w("div",Df,[l("div",Mf,[s.value.length===0?(v(),w("p",Nf," Probá este agente tal cual lo va a ver un visitante — usa la misma config de IA, las mismas herramientas y la misma base de conocimiento. ")):B("",!0),(v(!0),w(ee,null,xe(s.value,(d,c)=>(v(),w("div",{key:c,class:ue(["max-w-[80%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap",d.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},I(d.content),3))),128)),r.value?(v(),w("div",Vf,[oe(Nn,{estado:"pensando",tam:30,class:"text-brand"}),u[1]||(u[1]=l("span",{class:"text-xs text-tenue"},"Pensando…",-1))])):B("",!0)]),l("form",{class:"flex gap-2",onSubmit:Ae(i,["prevent"])},[z(l("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 input"},null,512),[[ie,o.value]]),l("button",{type:"submit",disabled:r.value,class:"btn-primary disabled:opacity-50 transition-colors"}," Enviar ",8,jf)],32)]))}},Uf={class:"grid lg:grid-cols-[minmax(16rem,22rem)_1fr] gap-4 items-start"},Lf={class:"card divide-y divide-borde max-h-[30rem] overflow-y-auto"},Ff=["onClick"],qf={class:"text-sm text-texto line-clamp-2"},Hf={class:"flex items-center gap-2 mt-1.5 text-xs text-tenue"},Bf={class:"tabular-nums"},Gf={class:"ml-auto tabular-nums"},Wf={key:2,class:"flex items-center gap-2 p-3 text-xs text-tenue cursor-pointer select-none"},Kf={class:"card p-4 max-h-[30rem] overflow-y-auto"},zf={key:1,class:"text-sm text-tenue"},Qf={key:2,class:"space-y-2"},Jf={__name:"TabConversaciones",props:{agenteId:{type:Number,required:!0},sesiones:{type:Array,default:()=>[]}},setup(e){const t=e,n=L([]),s=L(null),o=L(!1);function r(p){const b=String(p||"");return b.startsWith("wa:")?{nombre:"WhatsApp",icono:"mensaje",clase:"badge-ok"}:b.startsWith("tg:")?{nombre:"Telegram",icono:"mensaje",clase:"badge-neutro"}:b.startsWith("staff-preview")?{nombre:"Prueba",icono:"escribir",clase:"badge-alerta"}:{nombre:"Tu web",icono:"sitio",clase:"badge-neutro"}}const i=L(!1),a=le(()=>t.sesiones.filter(p=>!String(p.session_id).startsWith("staff-preview"))),u=le(()=>t.sesiones.filter(p=>String(p.session_id).startsWith("staff-preview"))),d=le(()=>i.value?t.sesiones:a.value);function c(p){if(!p)return"";const b=new Date(p),$=Math.floor((new Date().setHours(0,0,0,0)-new Date(b).setHours(0,0,0,0))/864e5),R=new Date(p).toLocaleTimeString("es",{hour:"2-digit",minute:"2-digit"});return $<=0?`hoy ${R}`:$===1?`ayer ${R}`:$<7?`hace ${$} días`:new Date(p).toLocaleDateString("es",{day:"numeric",month:"short"})}async function m(p){s.value=p,o.value=!0;try{const b=await ne.get(X(`/umind/historial?agente_id=${t.agenteId}&session_id=${p}`));n.value=b.items||[]}finally{o.value=!1}}return(p,b)=>(v(),w("div",Uf,[l("div",Lf,[d.value.length===0&&u.value.length===0?(v(),_e(lt,{key:0,titulo:"Nadie escribió todavía",detalle:"Cuando alguien le hable a tu asistente —por WhatsApp, Telegram o tu web— la conversación aparece acá, con lo que preguntó y lo que se le respondió."})):d.value.length===0?(v(),_e(lt,{key:1,estado:"durmiendo",titulo:"Ningún cliente escribió todavía",detalle:`Hay ${u.value.length} ${u.value.length===1?"conversación de prueba tuya":"conversaciones de prueba tuyas"} — activá el filtro de abajo para verlas.`},null,8,["detalle"])):B("",!0),(v(!0),w(ee,null,xe(d.value,S=>(v(),w("button",{key:S.session_id,class:ue(["w-full text-left p-3 hover:bg-elevado transition-colors",s.value===S.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:$=>m(S.session_id)},[l("div",qf,I(S.primer_mensaje||"(sin mensaje)"),1),l("div",Hf,[l("span",{class:ue(["px-1.5 py-0.5 rounded",r(S.session_id).clase])},I(r(S.session_id).nombre),3),l("span",Bf,I(S.mensajes)+" msj",1),l("span",Gf,I(c(S.ultimo)),1)])],10,Ff))),128)),u.value.length?(v(),w("label",Wf,[z(l("input",{"onUpdate:modelValue":b[0]||(b[0]=S=>i.value=S),type:"checkbox",class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,i.value]]),se(" "+I(u.value.length===1?"Mostrar mi prueba":`Mostrar mis ${u.value.length} pruebas`),1)])):B("",!0)]),l("div",Kf,[s.value?o.value?(v(),w("p",zf,"Cargando…")):(v(),w("div",Qf,[(v(!0),w(ee,null,xe(n.value,S=>(v(),w("div",{key:S.ID,class:ue(S.role==="user"?"text-right":"")},[l("div",{class:ue(["inline-block max-w-[80%] px-3 py-2 rounded-lg text-sm text-left whitespace-pre-wrap",S.role==="user"?"bg-brand text-white":"bg-elevado text-texto"])},I(S.content),3),l("div",{class:ue(["text-[10px] text-tenue mt-0.5 tabular-nums",S.role==="user"?"pr-1":"pl-1"])},I(c(S.CreatedAt)),3)],2))),128))])):(v(),_e(lt,{key:0,estado:"normal",titulo:"Elegí una conversación",detalle:"Vas a ver el intercambio completo: lo que escribió la persona y lo que contestó tu asistente. Si una respuesta no te gusta, corregí su información en «Lo que sabe»."}))])]))}},Yf={class:"card divide-y divide-borde"},Zf={class:"text-sm text-texto font-mono"},Xf={class:"label mt-0.5"},ep={class:"text-xs text-tenue mt-0.5"},tp={key:0,class:"ml-1 text-green-600 dark:text-green-400"},np={key:1,class:"ml-1 text-gray-400"},sp={class:"flex gap-3 text-sm shrink-0"},op=["onClick"],rp=["onClick"],lp={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},ip={class:"font-semibold text-texto mb-4"},ap={class:"border border-borde rounded-lg p-3 space-y-2"},up=["onUpdate:modelValue"],cp=["onUpdate:modelValue"],dp=["onUpdate:modelValue"],fp={class:"label flex items-center gap-1"},pp=["onUpdate:modelValue"],mp=["onClick"],hp={key:0,class:"text-xs text-gray-400"},vp={class:"border border-borde rounded-lg p-3 space-y-2"},gp={class:"flex items-center gap-2 label"},bp={class:"flex items-center gap-2 text-sm text-texto"},xp={class:"flex justify-end gap-2 pt-2"},yp={__name:"TabHerramientas",props:{agenteId:{type:Number,required:!0},tools:{type:Array,default:()=>[]}},emits:["recargar","error"],setup(e,{emit:t}){const n=e,s=t,o=L(!1),r=L(null),i=L(a());function a(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}function u(){r.value=null,i.value=a(),o.value=!0}function d(S){r.value=S;let $=[];try{$=JSON.parse(S.parametros_json||"[]")||[]}catch{$=[]}i.value={nombre:S.nombre,descripcion:S.descripcion,url:S.url,auth_header_nombre:S.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:$,activa:S.activa},o.value=!0}function c(){i.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function m(S){i.value.parametros.splice(S,1)}async function p(){const S={agente_id:n.agenteId,nombre:i.value.nombre.trim(),descripcion:i.value.descripcion,url:i.value.url.trim(),auth_header_nombre:i.value.auth_header_nombre,parametros:i.value.parametros,activa:i.value.activa};i.value.tocarAuth&&(S.auth_header_valor=i.value.auth_header_valor);try{r.value?await ne.put(X(`/umind/tools/${r.value.ID}`),S):await ne.post(X("/umind/tools"),S),o.value=!1,s("recargar")}catch($){s("error",$.message)}}async function b(S){confirm(`¿Eliminar la herramienta "${S.nombre}"?`)&&(await ne.del(X(`/umind/tools/${S.ID}`)),s("recargar"))}return(S,$)=>(v(),w("div",null,[l("div",{class:"flex justify-between items-center mb-4"},[$[9]||($[9]=l("p",{class:"label"},"Máximo 10 herramientas activas por agente.",-1)),l("button",{class:"btn-primary",onClick:u}," + Nueva herramienta ")]),l("div",Yf,[e.tools.length===0?(v(),_e(lt,{key:0,titulo:"Sin herramientas conectadas",detalle:"Las herramientas le dejan consultar tus sistemas mientras conversa: stock, estado de un pedido, disponibilidad de turnos. Sin ninguna, responde solo con lo que tiene cargado."})):B("",!0),(v(!0),w(ee,null,xe(e.tools,R=>(v(),w("div",{key:R.ID,class:"p-4 flex items-center justify-between"},[l("div",null,[l("div",Zf,I(R.nombre),1),l("div",Xf,I(R.descripcion),1),l("div",ep,[se(I(R.url)+" ",1),R.auth_configurado?(v(),w("span",tp,"· auth configurada")):B("",!0),R.activa?B("",!0):(v(),w("span",np,"· inactiva"))])]),l("div",sp,[l("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:O=>d(R)},"Editar",8,op),l("button",{class:"text-red-500 hover:text-red-700",onClick:O=>b(R)},"Eliminar",8,rp)])]))),128))]),o.value?(v(),w("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:$[8]||($[8]=Ae(R=>o.value=!1,["self"]))},[l("div",lp,[l("h2",ip,I(r.value?"Editar herramienta":"Nueva herramienta"),1),l("form",{class:"space-y-3",onSubmit:Ae(p,["prevent"])},[l("div",null,[$[10]||($[10]=l("label",{class:"label"},"Nombre (identificador, ej: consultar_stock)",-1)),z(l("input",{"onUpdate:modelValue":$[0]||($[0]=R=>i.value.nombre=R),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"input font-mono"},null,512),[[ie,i.value.nombre]])]),l("div",null,[$[11]||($[11]=l("label",{class:"label"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),z(l("textarea",{"onUpdate:modelValue":$[1]||($[1]=R=>i.value.descripcion=R),rows:"2",required:"",class:"input"},null,512),[[ie,i.value.descripcion]])]),l("div",null,[$[12]||($[12]=l("label",{class:"label"},"URL del webhook (https)",-1)),z(l("input",{"onUpdate:modelValue":$[2]||($[2]=R=>i.value.url=R),type:"url",required:"",placeholder:"https://...",class:"input"},null,512),[[ie,i.value.url]])]),l("div",ap,[l("div",{class:"flex items-center justify-between"},[$[13]||($[13]=l("label",{class:"label"},"Parámetros que completa el modelo",-1)),l("button",{type:"button",class:"text-xs text-brand",onClick:c},"+ agregar")]),(v(!0),w(ee,null,xe(i.value.parametros,(R,O)=>(v(),w("div",{key:O,class:"flex gap-2 items-center"},[z(l("input",{"onUpdate:modelValue":C=>R.nombre=C,placeholder:"nombre",class:"flex-1 border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs font-mono"},null,8,up),[[ie,R.nombre]]),z(l("select",{"onUpdate:modelValue":C=>R.tipo=C,class:"border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},[...$[14]||($[14]=[l("option",{value:"string"},"string",-1),l("option",{value:"number"},"number",-1),l("option",{value:"boolean"},"boolean",-1)])],8,cp),[[Ht,R.tipo]]),z(l("input",{"onUpdate:modelValue":C=>R.descripcion=C,placeholder:"descripción",class:"flex-1 border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},null,8,dp),[[ie,R.descripcion]]),l("label",fp,[z(l("input",{"onUpdate:modelValue":C=>R.requerido=C,type:"checkbox"},null,8,pp),[[_t,R.requerido]]),$[15]||($[15]=se(" req. ",-1))]),l("button",{type:"button",class:"text-red-400 text-xs",onClick:C=>m(O)},[oe(Oe,{nombre:"cerrar",tam:13})],8,mp)]))),128)),i.value.parametros.length===0?(v(),w("p",hp,"Sin parámetros.")):B("",!0)]),l("div",vp,[$[16]||($[16]=l("label",{class:"label"},"Autenticación saliente (opcional)",-1)),z(l("input",{"onUpdate:modelValue":$[3]||($[3]=R=>i.value.auth_header_nombre=R),placeholder:"Nombre del header, ej: Authorization",class:"input"},null,512),[[ie,i.value.auth_header_nombre]]),l("label",gp,[z(l("input",{"onUpdate:modelValue":$[4]||($[4]=R=>i.value.tocarAuth=R),type:"checkbox"},null,512),[[_t,i.value.tocarAuth]]),se(" "+I(r.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),i.value.tocarAuth?z((v(),w("input",{key:0,"onUpdate:modelValue":$[5]||($[5]=R=>i.value.auth_header_valor=R),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"input"},null,512)),[[ie,i.value.auth_header_valor]]):B("",!0)]),l("label",bp,[z(l("input",{"onUpdate:modelValue":$[6]||($[6]=R=>i.value.activa=R),type:"checkbox"},null,512),[[_t,i.value.activa]]),$[17]||($[17]=se(" Activa ",-1))]),l("div",xp,[l("button",{type:"button",class:"btn-ghost",onClick:$[7]||($[7]=R=>o.value=!1)},"Cancelar"),$[18]||($[18]=l("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):B("",!0)]))}},_p={class:"card p-4 mb-4"},wp={class:"flex items-center justify-between mb-2"},kp={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},Cp={class:"card divide-y divide-borde"},$p={class:"flex items-center justify-between"},Ap={class:"font-medium text-texto capitalize"},Sp={class:"flex gap-3 text-sm"},Ep=["onClick"],Ip=["onClick"],Rp={class:"flex gap-4 mt-2 text-xs"},Pp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Tp=["checked","onChange"],Op={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Dp=["checked","onChange"],Mp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Np=["checked","onChange"],Vp={key:0,class:"label mt-1"},jp={key:1,class:"label mt-1 break-all"},Up={class:"bg-elevado px-1 rounded"},Lp={key:2,class:"text-xs text-tenue mt-1"},Fp={key:3,class:"text-xs text-red-600 dark:text-red-400 mt-1"},qp={class:"card p-6 w-full max-w-md"},Hp={key:0},Bp={class:"grid sm:grid-cols-2 gap-3"},Gp={class:"text-xs text-tenue"},Wp={class:"grid sm:grid-cols-2 gap-3 mt-2"},Kp={class:"flex flex-col gap-2 pt-1"},zp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Qp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Jp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Yp={class:"flex justify-end gap-2 pt-2"},Zp={__name:"TabCanales",props:{agenteId:{type:Number,required:!0},siteKey:{type:String,default:""},canales:{type:Array,default:()=>[]}},emits:["recargar","error"],setup(e,{emit:t}){const n=e,s=t,o=L(!1),r=L(d()),i=L(!1),a=le(()=>{const C=n.siteKey||"TU_SITE_KEY";return`<script src="${window.location.origin}/widget/umind.js" data-site="${C}" defer><\/script>`});async function u(){try{await navigator.clipboard.writeText(a.value),i.value=!0,setTimeout(()=>i.value=!1,2e3)}catch{error.value="No se pudo copiar automáticamente — seleccioná el texto y copialo a mano."}}function d(){return{tipo:"telegram",bot_token:"",phone_number_id:"",access_token:"",app_secret:"",verify_token:"",usuario:"",password:"",imap_host:"",smtp_host:"",imap_encriptado:"ssl",smtp_encriptado:"starttls",intervalo_minutos:5,usar_whisper_audio:!1,usar_ocr_imagenes:!1,usar_archivos_docs:!1}}function c(){r.value=d(),o.value=!0}async function m(){let C;if(r.value.tipo==="telegram")C={bot_token:r.value.bot_token};else if(r.value.tipo==="correo"){const x=String(r.value.usuario).split("@")[1]||"";C={usuario:r.value.usuario,password:r.value.password,imap_host:r.value.imap_host||`mail.${x}`,smtp_host:r.value.smtp_host||`mail.${x}`,imap_encriptado:r.value.imap_encriptado,smtp_encriptado:r.value.smtp_encriptado}}else C={phone_number_id:r.value.phone_number_id,access_token:r.value.access_token,app_secret:r.value.app_secret,verify_token:r.value.verify_token};try{await ne.post(X("/umind/canales"),{agente_id:n.agenteId,tipo:r.value.tipo,credenciales:C,activo:!0,intervalo_minutos:Number(r.value.intervalo_minutos)||5,usar_whisper_audio:r.value.usar_whisper_audio,usar_ocr_imagenes:r.value.usar_ocr_imagenes,usar_archivos_docs:r.value.usar_archivos_docs}),o.value=!1,s("recargar")}catch(x){s("error",x.message)}}async function p(C,x){await ne.put(X(`/umind/canales/${C.ID}`),{activo:C.activo,credenciales:{},usar_whisper_audio:C.usar_whisper_audio,usar_ocr_imagenes:C.usar_ocr_imagenes,usar_archivos_docs:C.usar_archivos_docs,...x}),s("recargar")}const b=C=>p(C,{activo:!C.activo}),S=C=>p(C,{usar_whisper_audio:!C.usar_whisper_audio}),$=C=>p(C,{usar_ocr_imagenes:!C.usar_ocr_imagenes}),R=C=>p(C,{usar_archivos_docs:!C.usar_archivos_docs});async function O(C){confirm(`¿Eliminar el canal ${C.tipo}?`)&&(await ne.del(X(`/umind/canales/${C.ID}`)),s("recargar"))}return(C,x)=>(v(),w("div",null,[l("div",_p,[l("div",wp,[x[16]||(x[16]=l("div",null,[l("span",{class:"font-medium text-texto"},"Web (widget)"),l("span",{class:"ml-2 px-1.5 py-0.5 rounded text-xs badge-ok"}," siempre activo ")],-1)),l("button",{class:ue(["text-sm font-medium px-3 py-1.5 rounded-lg transition-colors",i.value?"bg-green-600 text-white":"bg-brand hover:bg-brand-dark text-white"]),onClick:u},[i.value?(v(),_e(Oe,{key:0,nombre:"ok",tam:14})):B("",!0),se(" "+I(i.value?"Copiado":"Copiar código"),1)],2)]),x[17]||(x[17]=l("p",{class:"label mb-2"},[se(" Pegá esto antes de "),l("code",{class:"bg-elevado px-1 rounded"},"</body>"),se(" en las páginas de tu sitio. ")],-1)),l("pre",kp,[l("code",null,I(a.value),1)])]),l("div",{class:"flex justify-end mb-4"},[l("button",{class:"btn-primary",onClick:c}," + Nuevo canal ")]),l("div",Cp,[e.canales.length===0?(v(),_e(lt,{key:0,titulo:"No está atendiendo en ningún lado",detalle:"Conectá WhatsApp o Telegram para que empiece a responderle a tus clientes. El widget de tu web funciona aparte, con la clave de sitio de arriba."})):B("",!0),(v(!0),w(ee,null,xe(e.canales,g=>(v(),w("div",{key:g.ID,class:"p-4"},[l("div",$p,[l("div",null,[l("span",Ap,I(g.tipo),1),l("span",{class:ue(["ml-2 px-1.5 py-0.5 rounded text-xs",g.activo?"badge-ok":"badge-neutro"])},I(g.activo?"activo":"inactivo"),3)]),l("div",Sp,[l("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:_=>b(g)},I(g.activo?"Desactivar":"Activar"),9,Ep),l("button",{class:"text-red-500 hover:text-red-700",onClick:_=>O(g)},"Eliminar",8,Ip)])]),l("div",Rp,[l("label",Pp,[l("input",{type:"checkbox",checked:g.usar_whisper_audio,onChange:_=>S(g),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Tp),x[18]||(x[18]=se(" Transcribir audios (Whisper) ",-1))]),l("label",Op,[l("input",{type:"checkbox",checked:g.usar_ocr_imagenes,onChange:_=>$(g),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Dp),x[19]||(x[19]=se(" Leer texto de imágenes (OCR) ",-1))]),l("label",Mp,[l("input",{type:"checkbox",checked:g.usar_archivos_docs,onChange:_=>R(g),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Np),x[20]||(x[20]=se(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),g.tipo==="correo"?(v(),w("p",Vp," Revisa la casilla cada "+I(g.intervalo_minutos>=60?"1 hora":`${g.intervalo_minutos} minutos`),1)):(v(),w("p",jp,[x[21]||(x[21]=se(" Webhook: ",-1)),l("code",Up,I(g.webhook_url),1)])),g.tipo==="whatsapp"?(v(),w("p",Lp,' Registrá esta URL como "Callback URL" en Meta for Developers → WhatsApp → Configuration, con el mismo verify_token que pusiste acá. ')):B("",!0),g.ultimo_error?(v(),w("p",Fp,I(g.ultimo_error),1)):B("",!0)]))),128))]),o.value?(v(),w("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:x[15]||(x[15]=Ae(g=>o.value=!1,["self"]))},[l("div",qp,[x[42]||(x[42]=l("h2",{class:"font-semibold text-texto mb-4"},"Nuevo canal",-1)),l("form",{class:"space-y-3",onSubmit:Ae(m,["prevent"])},[l("div",null,[x[23]||(x[23]=l("label",{class:"label"},"Tipo",-1)),z(l("select",{"onUpdate:modelValue":x[0]||(x[0]=g=>r.value.tipo=g),class:"input"},[...x[22]||(x[22]=[l("option",{value:"telegram"},"Telegram",-1),l("option",{value:"whatsapp"},"WhatsApp Business",-1),l("option",{value:"correo"},"Correo (tu casilla)",-1)])],512),[[Ht,r.value.tipo]])]),r.value.tipo==="telegram"?(v(),w("div",Hp,[x[24]||(x[24]=l("label",{class:"label"},"Bot token (de @BotFather)",-1)),z(l("input",{"onUpdate:modelValue":x[1]||(x[1]=g=>r.value.bot_token=g),type:"password",required:"",class:"input"},null,512),[[ie,r.value.bot_token]])])):r.value.tipo==="correo"?(v(),w(ee,{key:1},[x[33]||(x[33]=l("p",{class:"text-xs text-tenue"},[se(" El agente va a leer esta casilla y "),l("strong",null,"responder solo"),se(" los correos que lleguen, con su base de conocimiento. Ignora newsletters y correos automáticos. ")],-1)),l("div",Bp,[l("div",null,[x[25]||(x[25]=l("label",{class:"label"},"Correo",-1)),z(l("input",{"onUpdate:modelValue":x[2]||(x[2]=g=>r.value.usuario=g),type:"email",required:"",placeholder:"ventas@tunegocio.com",class:"input"},null,512),[[ie,r.value.usuario]])]),l("div",null,[x[26]||(x[26]=l("label",{class:"label"},"Contraseña",-1)),z(l("input",{"onUpdate:modelValue":x[3]||(x[3]=g=>r.value.password=g),type:"password",autocomplete:"new-password",required:"",class:"input"},null,512),[[ie,r.value.password]])])]),l("div",null,[x[28]||(x[28]=l("label",{class:"label"},"Revisar la casilla cada",-1)),z(l("select",{"onUpdate:modelValue":x[4]||(x[4]=g=>r.value.intervalo_minutos=g),class:"input"},[...x[27]||(x[27]=[l("option",{value:2},"2 minutos — respuesta casi inmediata",-1),l("option",{value:5},"5 minutos",-1),l("option",{value:15},"15 minutos",-1),l("option",{value:30},"30 minutos",-1),l("option",{value:60},"1 hora",-1)])],512),[[Ht,r.value.intervalo_minutos]]),x[29]||(x[29]=l("p",{class:"text-xs text-tenue mt-1"},"Un correo no es un chat: para la mayoría, 5 o 15 minutos sobra.",-1))]),l("details",Gp,[x[32]||(x[32]=l("summary",{class:"cursor-pointer"},"Servidores (solo si la detección automática falla)",-1)),l("div",Wp,[l("div",null,[x[30]||(x[30]=l("label",{class:"label"},"Servidor IMAP",-1)),z(l("input",{"onUpdate:modelValue":x[5]||(x[5]=g=>r.value.imap_host=g),placeholder:"mail.tunegocio.com",class:"input font-mono"},null,512),[[ie,r.value.imap_host]])]),l("div",null,[x[31]||(x[31]=l("label",{class:"label"},"Servidor SMTP",-1)),z(l("input",{"onUpdate:modelValue":x[6]||(x[6]=g=>r.value.smtp_host=g),placeholder:"mail.tunegocio.com",class:"input font-mono"},null,512),[[ie,r.value.smtp_host]])])])])],64)):(v(),w(ee,{key:2},[l("div",null,[x[34]||(x[34]=l("label",{class:"label"},"Phone Number ID",-1)),z(l("input",{"onUpdate:modelValue":x[7]||(x[7]=g=>r.value.phone_number_id=g),required:"",class:"input"},null,512),[[ie,r.value.phone_number_id]])]),l("div",null,[x[35]||(x[35]=l("label",{class:"label"},"Access Token",-1)),z(l("input",{"onUpdate:modelValue":x[8]||(x[8]=g=>r.value.access_token=g),type:"password",required:"",class:"input"},null,512),[[ie,r.value.access_token]])]),l("div",null,[x[36]||(x[36]=l("label",{class:"label"},"App Secret",-1)),z(l("input",{"onUpdate:modelValue":x[9]||(x[9]=g=>r.value.app_secret=g),type:"password",required:"",class:"input"},null,512),[[ie,r.value.app_secret]])]),l("div",null,[x[37]||(x[37]=l("label",{class:"label"},"Verify Token (lo inventás vos, lo vas a usar en Meta)",-1)),z(l("input",{"onUpdate:modelValue":x[10]||(x[10]=g=>r.value.verify_token=g),required:"",class:"input"},null,512),[[ie,r.value.verify_token]])])],64)),l("div",Kp,[l("label",zp,[z(l("input",{type:"checkbox","onUpdate:modelValue":x[11]||(x[11]=g=>r.value.usar_whisper_audio=g),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,r.value.usar_whisper_audio]]),x[38]||(x[38]=se(" Transcribir audios con Whisper ",-1))]),l("label",Qp,[z(l("input",{type:"checkbox","onUpdate:modelValue":x[12]||(x[12]=g=>r.value.usar_ocr_imagenes=g),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,r.value.usar_ocr_imagenes]]),x[39]||(x[39]=se(" Leer texto de imágenes con OCR ",-1))]),l("label",Jp,[z(l("input",{type:"checkbox","onUpdate:modelValue":x[13]||(x[13]=g=>r.value.usar_archivos_docs=g),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,r.value.usar_archivos_docs]]),x[40]||(x[40]=se(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),l("div",Yp,[l("button",{type:"button",class:"btn-ghost",onClick:x[14]||(x[14]=g=>o.value=!1)},"Cancelar"),x[41]||(x[41]=l("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):B("",!0)]))}},Xp={class:"card p-1 mb-6 flex flex-wrap"},em=["onClick"],tm={class:"text-red-700 dark:text-red-400 font-medium"},nm={__name:"EstadoAgente",props:{canales:{type:Array,default:()=>[]},documentos:{type:Array,default:()=>[]},sesiones:{type:Array,default:()=>[]},eventos:{type:Array,default:()=>[]}},emits:["ir"],setup(e,{emit:t}){const n=e,s=t,o=le(()=>n.canales.filter(p=>p.activo)),r={whatsapp:"WhatsApp",telegram:"Telegram",web:"tu web",correo:"tu correo"},i=p=>r[p]||p,a=le(()=>n.documentos.filter(p=>p.estado==="listo")),u=le(()=>a.value.filter(p=>p.procesado_at&&Date.now()-new Date(p.procesado_at)>60*864e5)),d=le(()=>n.eventos.filter(p=>p.nivel==="error").length),c=le(()=>n.sesiones.filter(p=>!String(p.session_id).startsWith("staff-preview"))),m=le(()=>[{clave:"canales",icono:"mensaje",bien:o.value.length>0,texto:o.value.length?`Atendiendo en ${o.value.map(p=>i(p.tipo)).join(" y ")}`:"No está atendiendo en ningún lado",destino:"canales"},{clave:"conocimiento",icono:"escribir",bien:a.value.length>0&&u.value.length===0,texto:a.value.length?u.value.length?`${u.value.length} de ${a.value.length} fuentes están viejas`:`Sabe de ${a.value.length} ${a.value.length===1?"cosa":"cosas"}`:"Todavía no sabe nada de tu negocio",destino:"conocimiento"},{clave:"conversaciones",icono:"grafico",bien:!0,neutro:c.value.length===0,texto:c.value.length?`${c.value.length} ${c.value.length===1?"conversación":"conversaciones"}`:"Nadie escribió todavía",destino:"conversaciones"}]);return(p,b)=>(v(),w("div",Xp,[(v(!0),w(ee,null,xe(m.value,S=>(v(),w("button",{key:S.clave,class:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm hover:bg-elevado transition-colors text-left",onClick:$=>s("ir",S.destino)},[oe(Oe,{nombre:S.bien?S.icono:"alerta",tam:16,class:ue(S.neutro?"text-tenue":S.bien?"text-brand":"text-amber-600 dark:text-amber-400")},null,8,["nombre","class"]),l("span",{class:ue(S.neutro?"text-tenue":S.bien?"text-texto":"text-amber-700 dark:text-amber-400 font-medium")},I(S.texto),3)],8,em))),128)),d.value?(v(),w("button",{key:0,class:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm hover:bg-elevado transition-colors ml-auto",onClick:b[0]||(b[0]=S=>s("ir","auditoria"))},[oe(Oe,{nombre:"alerta",tam:16,class:"text-red-600 dark:text-red-400"}),l("span",tm,I(d.value)+" "+I(d.value===1?"problema":"problemas"),1)])):B("",!0)]))}},sm={class:"card p-5 mb-6"},om={class:"flex items-start gap-4"},rm={class:"min-w-0 flex-1"},lm={class:"flex items-baseline justify-between gap-3"},im={class:"text-xs text-tenue tabular-nums shrink-0"},am={class:"space-y-2.5"},um={class:"min-w-0 flex-1"},cm={key:0,class:"text-xs text-tenue mt-0.5"},dm=["onClick"],fm={__name:"PrimerosPasos",props:{documentos:{type:Array,default:()=>[]},canales:{type:Array,default:()=>[]},sesiones:{type:Array,default:()=>[]}},emits:["ir"],setup(e,{emit:t}){const n=e,s=t,o=le(()=>n.documentos.some(c=>c.estado==="listo")),r=le(()=>n.sesiones.some(c=>String(c.session_id).startsWith("staff-preview"))),i=le(()=>n.canales.some(c=>c.activo)),a=le(()=>[{n:1,hecho:o.value,titulo:"Contale de tu negocio",detalle:"Escribí tus horarios, precios y lo que te preguntan siempre — o subí tu lista de precios, o dale tu sitio web.",accion:"Cargar información",destino:"conocimiento"},{n:2,hecho:r.value,titulo:"Hacele una pregunta",detalle:"Preguntale algo como lo haría un cliente. Si contesta mal, corregí su información y probá de nuevo.",accion:"Probarlo",destino:"conocimiento"},{n:3,hecho:i.value,titulo:"Ponelo a atender",detalle:"Conectá tu WhatsApp o Telegram, o pegá el widget en tu web. Desde ese momento responde solo.",accion:"Elegir dónde",destino:"canales"}]),u=le(()=>a.value.filter(c=>c.hecho).length),d=le(()=>{var c;return((c=a.value.find(m=>!m.hecho))==null?void 0:c.n)??null});return(c,m)=>(v(),w("div",sm,[l("div",om,[oe(Nn,{estado:u.value===0?"durmiendo":"contenta",tam:52,class:"text-brand shrink-0 hidden sm:block"},null,8,["estado"]),l("div",rm,[l("div",lm,[m[0]||(m[0]=l("h2",{class:"font-semibold text-texto"},"Pongamos a andar tu asistente",-1)),l("span",im,I(u.value)+" de "+I(a.value.length),1)]),m[1]||(m[1]=l("p",{class:"text-sm text-tenue mt-0.5 mb-4"}," Tres pasos y empieza a responderle a tus clientes. Diez minutos, sin nada técnico. ",-1)),l("ol",am,[(v(!0),w(ee,null,xe(a.value,p=>(v(),w("li",{key:p.n,class:ue(["flex items-start gap-3 rounded-lg p-2.5 -m-0.5 transition-colors",p.n===d.value?"bg-brand/5 border border-brand/30":""])},[l("span",{class:ue(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold shrink-0 mt-0.5",p.hecho?"bg-brand text-white":p.n===d.value?"border-2 border-brand text-brand":"border border-borde text-tenue"])},[p.hecho?(v(),_e(Oe,{key:0,nombre:"ok",tam:13})):(v(),w(ee,{key:1},[se(I(p.n),1)],64))],2),l("div",um,[l("p",{class:ue(["text-sm font-medium",p.hecho?"text-tenue line-through":"text-texto"])},I(p.titulo),3),p.hecho?B("",!0):(v(),w("p",cm,I(p.detalle),1))]),!p.hecho&&p.n===d.value?(v(),w("button",{key:0,class:"btn-primary !py-1.5 !px-3 text-sm shrink-0",onClick:b=>s("ir",p.destino)},I(p.accion),9,dm)):B("",!0)],2))),128))])])])]))}},pm={key:0,class:"mb-4 mt-1 flex items-start justify-between gap-4"},mm={class:"text-xl font-semibold text-texto min-w-0 truncate"},hm=["href"],vm={key:3,class:"text-sm text-red-600 dark:text-red-400 mb-4"},gm={class:"flex items-center gap-1.5 mb-6 flex-wrap"},bm=["onClick"],xm={class:"text-[10px]"},ym={key:4,class:"flex gap-1.5 mb-6 flex-wrap -mt-3"},_m=["onClick"],wm={key:5,class:"flex gap-1.5 mb-6 flex-wrap"},km=["onClick"],Cm={key:6,class:"grid gap-4 lg:grid-cols-[1fr_21rem] items-start"},$m={class:"card p-4 mb-4"},Am={class:"flex gap-1 mb-3"},Sm=["onClick"],Em={class:"flex items-center justify-between"},Im=["disabled"],Rm={class:"flex items-center justify-between"},Pm=["disabled"],Tm={class:"flex gap-2"},Om={class:"flex items-center justify-between"},Dm={class:"flex items-center gap-2 text-xs text-tenue cursor-pointer"},Mm=["disabled"],Nm={class:"card divide-y divide-borde"},Vm={class:"text-sm text-texto"},jm={class:"text-xs text-tenue mt-0.5"},Um={key:0,class:"latido"},Lm={key:0},Fm={key:1},qm={key:3},Hm={key:4,class:"text-red-600 dark:text-red-400"},Bm={class:"flex items-center gap-3 shrink-0"},Gm=["title","onClick"],Wm=["disabled","onClick"],Km=["onClick"],zm=["disabled","title","onClick"],Qm=["onClick"],Jm={class:"lg:sticky lg:top-4"},Ym={class:"card w-full max-w-2xl p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},Zm={class:"flex items-baseline justify-between gap-3 mb-1"},Xm={class:"font-semibold text-texto truncate"},eh={class:"text-xs text-tenue shrink-0 tabular-nums"},th={key:0,class:"text-sm text-tenue"},nh={key:1,class:"space-y-2"},sh={class:"text-[10px] text-tenue tabular-nums block mb-1"},oh={class:"flex justify-end pt-4"},rh={class:"card w-full max-w-2xl p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},lh={class:"flex justify-end gap-2 pt-1"},ih=["disabled"],ah={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=le(()=>Number(t.agenteId)),s=Gl(),o=L(null),r=L(""),i=L(typeof s.query.tab=="string"?s.query.tab:Qe.esPortal?"conversaciones":"conocimiento"),a=L([]),u=L(""),d=L(30),c=L(!1);async function m(){const A=await ne.get(X(`/umind/agentes?tenant_id=${t.tenantId}`));o.value=(A.items||[]).find(k=>String(k.ID)===t.agenteId)||null}async function p(){const A=await ne.get(X(`/umind/documentos?agente_id=${t.agenteId}`));a.value=A.items||[]}const b=L("texto"),S=L(!0),$=L(""),R=L(""),O=L(null);async function C(){if(u.value.trim()){c.value=!0,r.value="";try{await ne.post(X("/umind/documentos"),{agente_id:n.value,url:u.value.trim(),max_paginas:Number(d.value)||30,auto_actualizar:S.value}),u.value="",await p()}catch(A){r.value=A.message}finally{c.value=!1}}}async function x(){if(R.value.trim()){c.value=!0,r.value="";try{await ne.post(X("/umind/documentos/texto"),{agente_id:n.value,titulo:$.value.trim(),contenido:R.value}),$.value="",R.value="",await p()}catch(A){r.value=A.message}finally{c.value=!1}}}async function g(){var k,V;const A=(V=(k=O.value)==null?void 0:k.files)==null?void 0:V[0];if(A){c.value=!0,r.value="";try{const N=new FormData;N.append("agente_id",String(n.value)),N.append("archivo",A);const E=await fetch(X("/umind/documentos/archivo"),{method:"POST",body:N}),U=await E.json();if(!E.ok)throw new Error(U.error||"No se pudo subir");O.value.value="",await p()}catch(N){r.value=N.message}finally{c.value=!1}}}const _=L(null),j=L([]),H=L(!1);async function q(A){_.value=A,j.value=[],H.value=!0;try{const k=await ne.get(X(`/umind/documentos/${A.ID}/fragmentos`));j.value=k.items||[]}catch(k){r.value=k.message,_.value=null}finally{H.value=!1}}const fe=L(null),Y=L({titulo:"",contenido:""}),F=L(!1);function Se(A){fe.value=A,Y.value={titulo:A.origen,contenido:A.contenido||""}}async function K(){if(fe.value){F.value=!0,r.value="";try{await ne.put(X(`/umind/documentos/${fe.value.ID}`),{titulo:Y.value.titulo,contenido:Y.value.contenido}),fe.value=null,await p()}catch(A){r.value=A.message}finally{F.value=!1}}}async function Ge(A){r.value="";try{await ne.post(X(`/umind/documentos/${A.ID}/reprocesar`),{}),await p()}catch(k){r.value=k.message}}async function Vt(A){try{await ne.put(X(`/umind/documentos/${A.ID}`),{auto_actualizar:!A.auto_actualizar}),await p()}catch(k){r.value=k.message}}function Ee(A){if(!A)return"sin procesar";const k=Math.floor((Date.now()-new Date(A))/864e5);if(k<=0)return"hoy";if(k===1)return"ayer";if(k<30)return`hace ${k} días`;const V=Math.floor(k/30);return V===1?"hace un mes":`hace ${V} meses`}function pe(A){return A.procesado_at?Date.now()-new Date(A.procesado_at)>60*864e5:!1}async function de(A){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await ne.del(X(`/umind/documentos/${A}`)),await p())}const nt=le(()=>A=>({listo:"badge-ok",procesando:"badge-alerta",pendiente:"badge-neutro",error:"badge-error"})[A]||"badge-neutro"),We=L([]);async function et(){const A=await ne.get(X(`/umind/sesiones?agente_id=${t.agenteId}`));We.value=A.items||[]}const Te=L([]);async function kt(){const A=await ne.get(X(`/umind/tools?agente_id=${t.agenteId}`));Te.value=A.items||[]}const Je=L([]);async function dt(){const A=await ne.get(X(`/umind/canales?agente_id=${t.agenteId}`));Je.value=A.items||[]}const Ke=le(()=>{const A=new Date,k=new Date(A.getFullYear(),A.getMonth(),1).toISOString().slice(0,10),V=A.toISOString().slice(0,10);return X(`/umind/reporte.xlsx?agente_id=${t.agenteId}&desde=${k}&hasta=${V}`)}),D=L([]);async function W(){const A=await ne.get(X(`/umind/conexiones?agente_id=${t.agenteId}`));D.value=A.items||[]}const G=[["conversaciones","Conversaciones"],["conocimiento","Lo que sabe"],["canales","Dónde atiende"]],J=[["conocimiento","Información"],["conexiones","Cuentas de correo"],["herramientas","Herramientas"]],ae=le(()=>J.some(([A])=>A===i.value)),f=[["auditoria","Problemas"]],h=le(()=>!a.value.some(A=>A.estado==="listo")||!Je.value.some(A=>A.activo)),y=L(!1);f.some(([A])=>A===i.value)&&(y.value=!0);function T(A){i.value=A,f.some(([k])=>k===A)&&(y.value=!0)}const M=L([]);async function P(){const A=await ne.get(X(`/umind/eventos?agente_id=${t.agenteId}`));M.value=A.items||[]}return Pt(()=>[t.tenantId,t.agenteId],async()=>{r.value="",o.value=null,a.value=[],We.value=[],Te.value=[],Je.value=[],D.value=[],M.value=[];try{await Promise.all([m(),p(),et(),kt(),dt(),W(),P()])}catch(A){r.value=A.message}},{immediate:!0}),(A,k)=>{var N;const V=mn("router-link");return v(),w("div",null,[oe(V,{to:`/tenants/${e.tenantId}`,class:"label hover:text-brand"},{default:st(()=>[...k[14]||(k[14]=[se("← Agentes",-1)])]),_:1},8,["to"]),o.value?(v(),w("div",pm,[l("h1",mm,I(o.value.nombre),1),l("a",{href:Ke.value,class:"btn-ghost shrink-0",title:"Conversaciones y consumo del mes en Excel"},[oe(Oe,{nombre:"descargar",tam:15}),k[15]||(k[15]=se(" Reporte del mes ",-1))],8,hm)])):B("",!0),o.value&&h.value?(v(),_e(fm,{key:1,documentos:a.value,canales:Je.value,sesiones:We.value,onIr:T},null,8,["documentos","canales","sesiones"])):o.value?(v(),_e(nm,{key:2,canales:Je.value,documentos:a.value,sesiones:We.value,eventos:M.value,onIr:T},null,8,["canales","documentos","sesiones","eventos"])):B("",!0),r.value?(v(),w("p",vm,I(r.value),1)):B("",!0),l("div",gm,[(v(),w(ee,null,xe(G,([E,U])=>l("button",{key:E,class:ue(["px-3.5 py-1.5 rounded-full text-sm whitespace-nowrap transition-colors",(E==="conocimiento"?ae.value:i.value===E)?"bg-brand text-white font-medium":"bg-white dark:bg-gray-900 text-gray-600 dark:text-gray-400 border border-borde hover:border-brand/50"]),onClick:Q=>i.value=E},I(U),11,bm)),64)),l("button",{class:"ml-auto text-xs text-tenue hover:text-texto inline-flex items-center gap-1",onClick:k[0]||(k[0]=E=>y.value=!y.value)},[k[16]||(k[16]=se(" Avanzado ",-1)),l("span",xm,I(y.value?"▲":"▼"),1)])]),ae.value?(v(),w("div",ym,[(v(),w(ee,null,xe(J,([E,U])=>l("button",{key:E,class:ue(["px-3 py-1 rounded-full text-xs whitespace-nowrap transition-colors",i.value===E?"bg-brand/15 text-brand font-medium border border-brand/40":"text-tenue border border-transparent hover:text-texto"]),onClick:Q=>i.value=E},I(U),11,_m)),64))])):B("",!0),y.value?(v(),w("div",wm,[(v(),w(ee,null,xe(f,([E,U])=>l("button",{key:E,class:ue(["px-3 py-1 rounded-full text-xs whitespace-nowrap transition-colors",i.value===E?"bg-texto text-white dark:bg-gray-200 dark:text-gray-900 font-medium":"bg-white dark:bg-gray-900 text-tenue border border-borde hover:border-brand/50"]),onClick:Q=>i.value=E},I(U),11,km)),64))])):B("",!0),i.value==="conocimiento"?(v(),w("div",Cm,[l("div",null,[l("div",$m,[l("div",Am,[(v(),w(ee,null,xe([["texto","escribir","Escribir"],["archivo","archivo","Subir archivo"],["url","sitio","Sitio web"]],([E,U,Q])=>l("button",{key:E,class:ue(["px-3 py-1.5 rounded-lg text-sm inline-flex items-center gap-1.5",b.value===E?"bg-brand text-white font-medium":"text-tenue hover:text-texto"]),onClick:te=>b.value=E},[oe(Oe,{nombre:U,tam:15},null,8,["nombre"]),se(" "+I(Q),1)],10,Sm)),64))]),b.value==="texto"?(v(),w("form",{key:0,class:"space-y-2",onSubmit:Ae(x,["prevent"])},[z(l("input",{"onUpdate:modelValue":k[1]||(k[1]=E=>$.value=E),placeholder:"Título (ej: Horarios y zonas de entrega)",class:"input"},null,512),[[ie,$.value]]),z(l("textarea",{"onUpdate:modelValue":k[2]||(k[2]=E=>R.value=E),rows:"5",required:"",placeholder:"Atendemos de lunes a viernes de 9 a 18. No hacemos envíos fuera de la ciudad. La garantía es de 6 meses y cubre…",class:"input font-normal"},null,512),[[ie,R.value]]),l("div",Em,[k[17]||(k[17]=l("p",{class:"text-xs text-tenue"},"Lo que te preguntan todos los días y no está en tu web.",-1)),l("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},I(c.value?"Guardando…":"Guardar"),9,Im)])],32)):b.value==="archivo"?(v(),w("form",{key:1,class:"space-y-2",onSubmit:Ae(g,["prevent"])},[l("input",{ref_key:"archivoRef",ref:O,type:"file",accept:".pdf,.docx,.txt,.md,.csv,.html,image/*",class:"text-sm text-texto"},null,512),l("div",Rm,[k[18]||(k[18]=l("p",{class:"text-xs text-tenue"},"PDF, Word, texto o una foto. Ej: tu lista de precios.",-1)),l("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},I(c.value?"Leyendo…":"Subir"),9,Pm)])],32)):(v(),w("form",{key:2,class:"space-y-2",onSubmit:Ae(C,["prevent"])},[l("div",Tm,[z(l("input",{"onUpdate:modelValue":k[3]||(k[3]=E=>u.value=E),type:"url",placeholder:"https://ejemplo.com",required:"",class:"input flex-1"},null,512),[[ie,u.value]]),z(l("input",{"onUpdate:modelValue":k[4]||(k[4]=E=>d.value=E),type:"number",min:"1",max:"200",class:"input w-24",title:"Máximo de páginas a leer"},null,512),[[ie,d.value]])]),l("div",Om,[l("label",Dm,[z(l("input",{"onUpdate:modelValue":k[5]||(k[5]=E=>S.value=E),type:"checkbox",class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,S.value]]),k[19]||(k[19]=se(" Releer el sitio cada semana ",-1))]),l("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},I(c.value?"Leyendo…":"Leer sitio"),9,Mm)])],32))]),l("div",Nm,[a.value.length===0?(v(),_e(lt,{key:0,estado:"buscando",titulo:"Todavía no sabe nada de tu negocio",detalle:"Sin información cargada va a contestar que no sabe. Empezá por escribir tus horarios y lo que te preguntan todos los días — es lo más rápido y lo que más se nota."})):B("",!0),(v(!0),w(ee,null,xe(a.value,E=>(v(),w("div",{key:E.ID,class:"p-4 flex items-center justify-between"},[l("div",null,[l("div",Vm,I(E.origen),1),l("div",jm,[l("span",{class:ue(["px-1.5 py-0.5 rounded inline-flex items-center gap-1",nt.value(E.estado)])},[E.estado==="procesando"?(v(),w("span",Um)):B("",!0),se(" "+I(E.estado),1)],2),E.tipo?(v(),w("span",Lm," · "+I({url:"sitio",archivo:"archivo",texto:"nota"}[E.tipo]||E.tipo),1)):B("",!0),E.total_chunks?(v(),w("span",Fm," · "+I(E.total_chunks)+" fragmentos",1)):B("",!0),E.procesado_at?(v(),w("span",{key:2,class:ue(pe(E)?"text-amber-600 dark:text-amber-400 font-medium":"")}," · leído "+I(Ee(E.procesado_at)),3)):B("",!0),E.auto_actualizar?(v(),w("span",qm," · se actualiza sola")):B("",!0),E.error?(v(),w("span",Hm," · "+I(E.error),1)):B("",!0)])]),l("div",Bm,[E.tipo==="url"?(v(),w("button",{key:0,class:"text-xs text-tenue hover:text-texto",title:E.auto_actualizar?"Dejar de releer sola":"Releer el sitio cada semana",onClick:U=>Vt(E)},[oe(Oe,{nombre:E.auto_actualizar?"auto":"refrescar",tam:13,class:"mr-1"},null,8,["nombre"]),se(I(E.auto_actualizar?"auto":"manual"),1)],8,Gm)):B("",!0),l("button",{class:ue(["text-sm text-tenue hover:text-texto",E.total_chunks?"":"opacity-40 cursor-default"]),disabled:!E.total_chunks,title:"Ver qué se leyó de esta fuente",onClick:U=>q(E)},"Ver",10,Wm),E.tipo==="texto"||E.tipo==="archivo"?(v(),w("button",{key:1,class:"text-sm text-brand hover:underline",onClick:U=>Se(E)},"Editar",8,Km)):B("",!0),l("button",{class:"text-sm text-tenue hover:text-texto disabled:opacity-40",disabled:E.estado==="procesando",title:E.tipo==="url"?"Volver a leer el sitio":"Rehacer los fragmentos",onClick:U=>Ge(E)},"Actualizar",8,zm),l("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:U=>de(E.ID)},"Eliminar",8,Qm)])]))),128))])]),l("div",Jm,[k[20]||(k[20]=l("p",{class:"label mb-2"},"Probalo",-1)),oe(br,{"agente-id":n.value},null,8,["agente-id"])]),_.value?(v(),w("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:k[7]||(k[7]=Ae(E=>_.value=null,["self"]))},[l("div",Ym,[l("div",Zm,[l("h2",Xm,I(_.value.origen),1),l("span",eh,I(j.value.length)+" "+I(j.value.length===1?"fragmento":"fragmentos"),1)]),k[21]||(k[21]=l("p",{class:"text-xs text-tenue mb-4"}," Esto es exactamente lo que el asistente puede consultar de esta fuente. Si acá falta algo o se leyó mal, eso mismo le va a faltar en las respuestas. ",-1)),H.value?(v(),w("p",th,"Cargando…")):(v(),w("div",nh,[(v(!0),w(ee,null,xe(j.value,(E,U)=>(v(),w("div",{key:E.ID,class:"bg-elevado border border-borde rounded-lg p-3 text-sm text-texto whitespace-pre-wrap"},[l("span",sh,"#"+I(U+1),1),se(I(E.contenido),1)]))),128))])),l("div",oh,[l("button",{class:"btn-ghost",onClick:k[6]||(k[6]=E=>_.value=null)},"Cerrar")])])])):B("",!0),fe.value?(v(),w("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:k[11]||(k[11]=Ae(E=>fe.value=null,["self"]))},[l("div",rh,[k[25]||(k[25]=l("h2",{class:"font-semibold text-texto mb-1"},"Editar fuente",-1)),k[26]||(k[26]=l("p",{class:"text-xs text-tenue mb-4"}," Al guardar se vuelve a leer y el agente empieza a contestar con esto. ",-1)),l("form",{class:"space-y-3",onSubmit:Ae(K,["prevent"])},[l("div",null,[k[22]||(k[22]=l("label",{class:"label"},"Título",-1)),z(l("input",{"onUpdate:modelValue":k[8]||(k[8]=E=>Y.value.titulo=E),required:"",class:"input"},null,512),[[ie,Y.value.titulo]])]),l("div",null,[k[23]||(k[23]=l("label",{class:"label"},"Contenido",-1)),z(l("textarea",{"onUpdate:modelValue":k[9]||(k[9]=E=>Y.value.contenido=E),rows:"16",required:"",class:"input font-normal leading-relaxed"},null,512),[[ie,Y.value.contenido]]),k[24]||(k[24]=l("p",{class:"text-xs text-tenue mt-1.5"}," Si viene de una plantilla, reemplazá lo que está [entre corchetes] por tus datos. Lo que quede sin reemplazar el agente lo va a leer tal cual. ",-1))]),l("div",lh,[l("button",{type:"button",class:"btn-ghost",onClick:k[10]||(k[10]=E=>fe.value=null)},"Cancelar"),l("button",{type:"submit",class:"btn-primary",disabled:F.value},I(F.value?"Guardando…":"Guardar y volver a leer"),9,ih)])],32)])])):B("",!0)])):i.value==="herramientas"?(v(),_e(yp,{key:7,"agente-id":n.value,tools:Te.value,onRecargar:kt,onError:k[12]||(k[12]=E=>r.value=E)},null,8,["agente-id","tools"])):i.value==="canales"?(v(),_e(Zp,{key:8,"agente-id":n.value,"site-key":((N=o.value)==null?void 0:N.site_key)||"",canales:Je.value,onRecargar:dt,onError:k[13]||(k[13]=E=>r.value=E)},null,8,["agente-id","site-key","canales"])):i.value==="conexiones"?(v(),_e(Of,{key:9,"agente-id":n.value,conexiones:D.value,onRecargar:W},null,8,["agente-id","conexiones"])):i.value==="chat"?(v(),_e(br,{key:10,"agente-id":n.value},null,8,["agente-id"])):i.value==="conversaciones"?(v(),_e(Jf,{key:11,"agente-id":n.value,sesiones:We.value},null,8,["agente-id","sesiones"])):(v(),_e(bf,{key:12,eventos:M.value},null,8,["eventos"]))])}}},uh={class:"flex items-start justify-between gap-4 mb-6"},ch={class:"card p-4 mb-4"},dh={class:"flex flex-wrap items-end gap-3"},fh={class:"flex gap-1 ml-auto"},ph={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},mh={key:1,class:"text-sm text-tenue"},hh={class:"grid gap-3 sm:grid-cols-3 mb-4"},vh={class:"card p-4"},gh={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},bh={class:"card p-4"},xh={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},yh={class:"card p-4"},_h={class:"text-lg font-semibold text-texto mt-1"},wh={key:0,class:"text-[11px] text-tenue mt-0.5"},kh={key:0,class:"card p-4 mb-4"},Ch={class:"flex items-center justify-between text-sm mb-2"},$h={class:"text-tenue tabular-nums"},Ah={class:"h-2 rounded-full bg-elevado overflow-hidden"},Sh={key:0,class:"text-xs text-amber-600 dark:text-amber-400 mt-2"},Eh={class:"card divide-y divide-borde mb-4"},Ih={class:"min-w-0 flex-1"},Rh={class:"text-sm text-texto"},Ph={class:"text-xs text-tenue tabular-nums"},Th={key:0,class:"text-sm font-medium text-texto tabular-nums"},Oh={key:1,class:"text-xs text-tenue text-right leading-tight"},Dh={key:1,class:"card p-4"},Mh={class:"flex items-end gap-1 h-28"},Nh=["title"],Vh={class:"flex justify-between text-[11px] text-tenue mt-2"},jh={__name:"Uso",props:{id:{type:String,required:!0}},setup(e){const t=e,n=L(!0),s=L(""),o=L(null),r=new Date,i=L(new Date(r.getFullYear(),r.getMonth(),1).toISOString().slice(0,10)),a=L(r.toISOString().slice(0,10)),u={ia:{nombre:"Inteligencia artificial",icono:"cerebro",color:"#8eb02f"},ocr:{nombre:"Lectura de imágenes",icono:"imagen",color:"#2f7fb0"},whisper:{nombre:"Transcripción de audio",icono:"microfono",color:"#b0752f"}},d=g=>u[g]||{nombre:g,icono:"grafico",color:"#94a3b8"};async function c(){n.value=!0,s.value="";try{o.value=await ne.get(X(`/umind/uso?tenant_id=${t.id}&desde=${i.value}&hasta=${a.value}`))}catch(g){s.value=g.message}finally{n.value=!1}}const m=le(()=>{var g,_;return((_=(g=o.value)==null?void 0:g.plan)==null?void 0:_.moneda)||"COP"}),p=le(()=>{var g;return((g=o.value)==null?void 0:g.resumen)||[]}),b=le(()=>{var g;return((g=o.value)==null?void 0:g.total_periodo)||0}),S=le(()=>{var g,_;return((_=(g=o.value)==null?void 0:g.plan)==null?void 0:_.tope_consumo_mensual)||0}),$=le(()=>S.value?Math.min(100,b.value/S.value*100):0);function R(g){return`${m.value} ${Number(g||0).toLocaleString("es-CO",{maximumFractionDigits:2})}`}function O(g){return Number(g||0).toLocaleString("es-CO",{maximumFractionDigits:0})}const C=le(()=>{var H;const g=new Map;for(const q of((H=o.value)==null?void 0:H.detalle)||[]){const fe=String(q.CreatedAt).slice(0,10);g.set(fe,(g.get(fe)||0)+(q.costo||0))}const _=[...g.entries()].sort((q,fe)=>q[0].localeCompare(fe[0])),j=Math.max(..._.map(q=>q[1]),0);return{dias:_,max:j}});function x(g){const _=new Date,j=new Date;j.setDate(j.getDate()-g),i.value=j.toISOString().slice(0,10),a.value=_.toISOString().slice(0,10),c()}return Pt(()=>t.id,c,{immediate:!0}),(g,_)=>{var H;const j=mn("router-link");return v(),w("div",null,[l("div",uh,[_[6]||(_[6]=l("div",null,[l("h1",{class:"text-xl font-semibold text-texto"},"Consumo"),l("p",{class:"text-sm text-tenue mt-0.5"},"Lo que usaron tus agentes y cuánto cuesta.")],-1)),oe(j,{to:`/tenants/${e.id}`,class:"btn-ghost inline-flex items-center gap-1.5"},{default:st(()=>[oe(Oe,{nombre:"atras",tam:15}),_[5]||(_[5]=se(" Agentes",-1))]),_:1},8,["to"])]),l("div",ch,[l("div",dh,[l("div",null,[_[7]||(_[7]=l("label",{class:"label"},"Desde",-1)),z(l("input",{"onUpdate:modelValue":_[0]||(_[0]=q=>i.value=q),type:"date",class:"input !w-auto"},null,512),[[ie,i.value]])]),l("div",null,[_[8]||(_[8]=l("label",{class:"label"},"Hasta",-1)),z(l("input",{"onUpdate:modelValue":_[1]||(_[1]=q=>a.value=q),type:"date",class:"input !w-auto"},null,512),[[ie,a.value]])]),l("button",{class:"btn-primary",onClick:c},"Aplicar"),l("div",fh,[l("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:_[2]||(_[2]=q=>x(6))},"7 días"),l("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:_[3]||(_[3]=q=>x(29))},"30 días"),l("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:_[4]||(_[4]=q=>x(89))},"90 días")])])]),s.value?(v(),w("p",ph,I(s.value),1)):B("",!0),n.value?(v(),w("p",mh,"Cargando…")):o.value?(v(),w(ee,{key:2},[l("div",hh,[l("div",vh,[_[9]||(_[9]=l("p",{class:"text-xs text-tenue"},"Consumo del período",-1)),l("p",gh,I(R(b.value)),1)]),l("div",bh,[_[10]||(_[10]=l("p",{class:"text-xs text-tenue"},"Pendiente de facturar",-1)),l("p",xh,I(R(o.value.pendiente_facturar)),1),_[11]||(_[11]=l("p",{class:"text-[11px] text-tenue mt-0.5"},"Se suma a tu próxima factura.",-1))]),l("div",yh,[_[12]||(_[12]=l("p",{class:"text-xs text-tenue"},"Plan",-1)),l("p",_h,I(((H=o.value.plan)==null?void 0:H.nombre)||"Sin plan"),1),o.value.plan?(v(),w("p",wh," Mensualidad "+I(R(o.value.plan.precio_mensual)),1)):B("",!0)])]),S.value?(v(),w("div",kh,[l("div",Ch,[_[13]||(_[13]=l("span",{class:"text-texto"},"Tope mensual",-1)),l("span",$h,I(R(b.value))+" / "+I(R(S.value)),1)]),l("div",Ah,[l("div",{class:ue(["h-full rounded-full transition-all duration-500",$.value>=100?"bg-red-500":$.value>=80?"bg-amber-500":"bg-brand"]),style:Jt({width:$.value+"%"})},null,6)]),$.value>=100?(v(),w("p",Sh," Superaste el tope de tu plan. El servicio sigue funcionando y el excedente se cobra en el próximo ciclo. ")):B("",!0)])):B("",!0),l("div",Eh,[_[15]||(_[15]=l("div",{class:"px-4 py-3"},[l("h2",{class:"text-sm font-medium text-texto"},"Desglose")],-1)),p.value.length===0?(v(),_e(lt,{key:0,estado:"durmiendo",titulo:"Sin consumo en este período",detalle:"Cuando tus agentes respondan mensajes, lean imágenes o transcriban audios, vas a verlo acá."})):B("",!0),(v(!0),w(ee,null,xe(p.value,q=>(v(),w("div",{key:q.tipo,class:"px-4 py-3 flex items-center gap-3"},[oe(Oe,{nombre:d(q.tipo).icono,tam:18,class:"text-tenue"},null,8,["nombre"]),l("div",Ih,[l("p",Rh,I(d(q.tipo).nombre),1),l("p",Ph,I(O(q.cantidad))+" "+I(q.unidad)+" · "+I(O(q.eventos))+" usos ",1)]),q.costo>0?(v(),w("span",Th,I(R(q.costo)),1)):(v(),w("span",Oh,[..._[14]||(_[14]=[se(" va por tu",-1),l("br",null,null,-1),se("cuenta de IA ",-1)])]))]))),128))]),C.value.dias.length?(v(),w("div",Dh,[_[16]||(_[16]=l("h2",{class:"text-sm font-medium text-texto mb-3"},"Por día",-1)),l("div",Mh,[(v(!0),w(ee,null,xe(C.value.dias,([q,fe])=>(v(),w("div",{key:q,class:"flex-1 min-w-[3px] bg-brand/70 hover:bg-brand rounded-t transition-colors",style:Jt({height:C.value.max?Math.max(2,fe/C.value.max*100)+"%":"2px"}),title:`${q}: ${R(fe)}`},null,12,Nh))),128))]),l("div",Vh,[l("span",null,I(C.value.dias[0][0]),1),l("span",null,I(C.value.dias[C.value.dias.length-1][0]),1)])])):B("",!0)],64)):B("",!0)])}}},Uh={class:"flex items-start justify-between gap-4 mb-6"},Lh={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Fh={key:1,class:"text-sm text-tenue"},qh={key:3,class:"card divide-y divide-borde"},Hh={class:"flex items-start justify-between gap-4"},Bh={class:"min-w-0"},Gh={class:"text-sm text-texto font-medium"},Wh={class:"text-xs text-tenue mt-0.5"},Kh={class:"font-mono"},zh={class:"flex items-center gap-3 shrink-0 text-sm"},Qh=["disabled","onClick"],Jh=["onClick"],Yh=["onClick"],Zh={key:4,class:"text-xs text-tenue mt-3"},Xh={class:"card w-full max-w-lg p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},ev={class:"font-semibold text-texto mb-4"},tv=["value"],nv={key:0,class:"text-xs text-tenue mt-1"},sv={class:"font-mono"},ov=["placeholder"],rv={key:0},lv={class:"label"},iv={key:0,class:"text-tenue font-normal"},av=["required"],uv={key:1},cv={class:"flex justify-end gap-2 pt-2"},dv=["disabled"],fv={__name:"AiPropia",props:{id:{type:String,required:!0}},setup(e){const t=e,n=L([]),s=L(!0),o=L(""),r=L(!1),i=L(null),a=L(!1),u=L(null),d=L({}),c=[{valor:"openai",nombre:"OpenAI",modelo:"gpt-4o-mini",donde:"platform.openai.com/api-keys"},{valor:"anthropic",nombre:"Anthropic (Claude)",modelo:"claude-sonnet-4-20250514",donde:"console.anthropic.com"},{valor:"gemini",nombre:"Google Gemini",modelo:"gemini-2.0-flash",donde:"aistudio.google.com/apikey"},{valor:"groq",nombre:"Groq",modelo:"llama-3.3-70b-versatile",donde:"console.groq.com/keys"},{valor:"deepseek",nombre:"DeepSeek",modelo:"deepseek-chat",donde:"platform.deepseek.com"},{valor:"qwen",nombre:"Qwen (Alibaba)",modelo:"qwen2.5-72b-instruct",donde:"dashscope.console.aliyun.com"},{valor:"ollama",nombre:"Ollama (tu servidor)",modelo:"llama3.1",donde:""}];function m(){return{nombre:"",provider:"openai",api_key:"",base_url:"",model_name:""}}const p=L(m());function b(g){return c.find(_=>_.valor===g)||c[0]}async function S(){s.value=!0,o.value="";try{const g=await ne.get(X(`/umind/ai-propia?tenant_id=${t.id}`));n.value=g.items||[]}catch(g){o.value=g.message}finally{s.value=!1}}Pt(()=>t.id,S,{immediate:!0});function $(){i.value=null,p.value=m(),r.value=!0}function R(g){i.value=g,p.value={nombre:g.nombre,provider:g.provider,api_key:"",base_url:g.base_url||"",model_name:g.model_name||""},r.value=!0}async function O(){a.value=!0,o.value="";try{const g={tenant_id:Number(t.id),...p.value};i.value?await ne.put(X(`/umind/ai-propia/${i.value.ID}`),g):await ne.post(X("/umind/ai-propia"),g),r.value=!1,await S()}catch(g){o.value=g.message}finally{a.value=!1}}async function C(g){u.value=g.ID,d.value={...d.value,[g.ID]:null};try{const _=await ne.post(X(`/umind/ai-propia/${g.ID}/probar`),{});d.value={...d.value,[g.ID]:{ok:!0,texto:_.respuesta}}}catch(_){d.value={...d.value,[g.ID]:{ok:!1,texto:_.message}}}finally{u.value=null}}async function x(g){if(confirm(`¿Eliminar "${g.nombre}"?`)){o.value="";try{await ne.del(X(`/umind/ai-propia/${g.ID}`)),await S()}catch(_){o.value=_.message}}}return(g,_)=>{const j=mn("router-link");return v(),w("div",null,[l("div",Uh,[l("div",null,[oe(j,{to:`/tenants/${e.id}`,class:"text-sm text-tenue hover:text-texto inline-flex items-center gap-1.5"},{default:st(()=>[oe(Oe,{nombre:"atras",tam:14}),_[7]||(_[7]=se(" Agentes",-1))]),_:1},8,["to"]),_[8]||(_[8]=l("h1",{class:"text-xl font-semibold text-texto mt-1"},"Tu cuenta de IA",-1)),_[9]||(_[9]=l("p",{class:"text-sm text-tenue mt-1 max-w-xl"}," Podés usar tu propia cuenta de OpenAI, Claude o Gemini en vez de la nuestra. El consumo se factura directo con el proveedor y no pasa por tu plan. ",-1))]),l("button",{class:"btn-primary shrink-0",onClick:$},"+ Conectar cuenta")]),o.value?(v(),w("p",Lh,I(o.value),1)):B("",!0),s.value?(v(),w("div",Fh,"Cargando…")):n.value.length===0?(v(),_e(lt,{key:2,class:"card",titulo:"Estás usando la IA de uMind",detalle:"Funciona sin que hagas nada. Conectá tu propia cuenta solo si querés facturar el consumo por tu lado o usar un modelo puntual."},{default:st(()=>[l("button",{class:"btn-primary",onClick:$},"Conectar mi cuenta")]),_:1})):(v(),w("div",qh,[(v(!0),w(ee,null,xe(n.value,H=>(v(),w("div",{key:H.ID,class:"p-4"},[l("div",Hh,[l("div",Bh,[l("div",Gh,I(H.nombre),1),l("div",Wh,[se(I(b(H.provider).nombre)+" · "+I(H.model_name)+" · ",1),l("span",Kh,I(H.api_key_pista),1)]),d.value[H.ID]?(v(),w("p",{key:0,class:ue(["text-xs mt-1.5",d.value[H.ID].ok?"text-brand":"text-red-600 dark:text-red-400"])},I(d.value[H.ID].ok?`Responde bien — dijo "${d.value[H.ID].texto}"`:d.value[H.ID].texto),3)):B("",!0)]),l("div",zh,[l("button",{class:"text-brand hover:underline disabled:opacity-40",disabled:u.value===H.ID,onClick:q=>C(H)},I(u.value===H.ID?"Probando…":"Probar"),9,Qh),l("button",{class:"text-tenue hover:text-texto",onClick:q=>R(H)},"Editar",8,Jh),l("button",{class:"text-red-500 hover:text-red-700",onClick:q=>x(H)},"Eliminar",8,Yh)])])]))),128))])),n.value.length?(v(),w("p",Zh,[..._[10]||(_[10]=[se(" Para que un agente la use, elegila en su campo ",-1),l("strong",null,"Config de IA",-1),se(". ",-1)])])):B("",!0),r.value?(v(),w("div",{key:5,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:_[6]||(_[6]=Ae(H=>r.value=!1,["self"]))},[l("div",Xh,[l("h2",ev,I(i.value?"Editar cuenta de IA":"Conectar tu cuenta de IA"),1),l("form",{class:"space-y-3",onSubmit:Ae(O,["prevent"])},[l("div",null,[_[11]||(_[11]=l("label",{class:"label"},"Nombre",-1)),z(l("input",{"onUpdate:modelValue":_[0]||(_[0]=H=>p.value.nombre=H),required:"",placeholder:"ej: Mi cuenta de OpenAI",class:"input"},null,512),[[ie,p.value.nombre]])]),l("div",null,[_[13]||(_[13]=l("label",{class:"label"},"Proveedor",-1)),z(l("select",{"onUpdate:modelValue":_[1]||(_[1]=H=>p.value.provider=H),class:"input"},[(v(),w(ee,null,xe(c,H=>l("option",{key:H.valor,value:H.valor},I(H.nombre),9,tv)),64))],512),[[Ht,p.value.provider]]),b(p.value.provider).donde?(v(),w("p",nv,[_[12]||(_[12]=se(" La clave se saca de ",-1)),l("span",sv,I(b(p.value.provider).donde),1)])):B("",!0)]),l("div",null,[_[14]||(_[14]=l("label",{class:"label"},"Modelo",-1)),z(l("input",{"onUpdate:modelValue":_[2]||(_[2]=H=>p.value.model_name=H),required:"",placeholder:`ej: ${b(p.value.provider).modelo}`,class:"input font-mono"},null,8,ov),[[ie,p.value.model_name]])]),p.value.provider!=="ollama"?(v(),w("div",rv,[l("label",lv,[_[15]||(_[15]=se(" Clave de API ",-1)),i.value?(v(),w("span",iv,"— dejala vacía para no cambiarla")):B("",!0)]),z(l("input",{"onUpdate:modelValue":_[3]||(_[3]=H=>p.value.api_key=H),type:"password",autocomplete:"new-password",required:!i.value,placeholder:"sk-...",class:"input font-mono"},null,8,av),[[ie,p.value.api_key]]),_[16]||(_[16]=l("p",{class:"text-xs text-tenue mt-1"},"Se guarda cifrada y no se vuelve a mostrar.",-1))])):B("",!0),p.value.provider==="ollama"?(v(),w("div",uv,[_[17]||(_[17]=l("label",{class:"label"},"URL de tu servidor",-1)),z(l("input",{"onUpdate:modelValue":_[4]||(_[4]=H=>p.value.base_url=H),required:"",placeholder:"https://ollama.tudominio.com/v1",class:"input font-mono"},null,512),[[ie,p.value.base_url]])])):B("",!0),l("div",cv,[l("button",{type:"button",class:"btn-ghost",onClick:_[5]||(_[5]=H=>r.value=!1)},"Cancelar"),l("button",{type:"submit",class:"btn-primary",disabled:a.value},I(a.value?"Guardando…":"Guardar"),9,dv)])],32)])])):B("",!0)])}}},pv=yc({history:Zu(Qe.baseRuta),routes:[{path:"/",name:"home",component:pd},{path:"/tenants/:id",name:"tenant-agentes",component:df,props:!0},{path:"/tenants/:id/uso",name:"uso",component:jh,props:!0},{path:"/tenants/:id/ia",name:"ai-propia",component:fv,props:!0},{path:"/tenants/:tenantId/agentes/:agenteId",name:"agente-detail",component:ah,props:!0}]});du(Jc).use(pv).mount("#app");
|