(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 a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/** * @vue/shared v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Zs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const we={},nn=[],wt=()=>{},wa=()=>!1,as=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),rs=e=>e.startsWith("onUpdate:"),je=Object.assign,Xs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Jr=Object.prototype.hasOwnProperty,be=(e,t)=>Jr.call(e,t),se=Array.isArray,sn=e=>Un(e)==="[object Map]",mn=e=>Un(e)==="[object Set]",$o=e=>Un(e)==="[object Date]",ae=e=>typeof e=="function",$e=e=>typeof e=="string",it=e=>typeof e=="symbol",xe=e=>e!==null&&typeof e=="object",ka=e=>(xe(e)||ae(e))&&ae(e.then)&&ae(e.catch),$a=Object.prototype.toString,Un=e=>$a.call(e),Yr=e=>Un(e).slice(8,-1),Ca=e=>Un(e)==="[object Object]",eo=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$n=Zs(",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)))},Zr=/-\w/g,We=ls(e=>e.replace(Zr,t=>t.slice(1).toUpperCase())),Xr=/\B([A-Z])/g,Zt=ls(e=>e.replace(Xr,"-$1").toLowerCase()),is=ls(e=>e.charAt(0).toUpperCase()+e.slice(1)),ws=ls(e=>e?`on${is(e)}`:""),_t=(e,t)=>!Object.is(e,t),zn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},us=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Co;const cs=()=>Co||(Co=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ft(e){if(se(e)){const t={};for(let n=0;n{if(n){const s=n.split(tl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ie(e){let t="";if($e(e))t=e;else if(se(e))for(let n=0;nHt(n,t))}const Ea=e=>!!(e&&e.__v_isRef===!0),S=e=>$e(e)?e:e==null?"":se(e)||xe(e)&&(e.toString===$a||!ae(e.toString))?Ea(e)?S(e.value):JSON.stringify(e,Ia,2):String(e),Ia=(e,t)=>Ea(t)?Ia(e,t.value):sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[ks(s,a)+" =>"]=o,n),{})}:mn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ks(n))}:it(t)?ks(t):xe(t)&&!se(t)&&!Ca(t)?String(t):t,ks=(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 Oe;class ll{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&&Oe&&(Oe.active?(this.parent=Oe,this.index=(Oe.scopes||(Oe.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;t0&&--this._on===0){if(Oe===this)Oe=this.prevScope;else{let t=Oe;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;n0)return;if(An){let t=An;for(An=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Cn;){let t=Cn;for(Cn=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 Ta(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Oa(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),oo(s),ul(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function js(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ma(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ma(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Rn)||(e.globalVersion=Rn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!js(e))))return;e.flags|=2;const t=e.dep,n=ke,s=rt;ke=e,rt=!0;try{Ta(e);const o=e.fn(e._value);(t.version===0||_t(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ke=n,rt=s,Oa(e),e.flags&=-3}}function oo(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 a=n.computed.deps;a;a=a.nextDep)oo(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ul(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let rt=!0;const Na=[];function Tt(){Na.push(rt),rt=!1}function Ot(){const e=Na.pop();rt=e===void 0?!0:e}function Ao(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ke;ke=void 0;try{t()}finally{ke=n}}}let Rn=0;class cl{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 ao{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||!rt||ke===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ke)n=this.activeLink=new cl(ke,this),ke.deps?(n.prevDep=ke.depsTail,ke.depsTail.nextDep=n,ke.depsTail=n):ke.deps=ke.depsTail=n,ja(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++,Rn++,this.notify(t)}notify(t){no();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{so()}}}function ja(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ja(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Vs=new WeakMap,Jt=Symbol(""),Us=Symbol(""),Pn=Symbol("");function Ve(e,t,n){if(rt&&ke){let s=Vs.get(e);s||Vs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ao),o.map=s,o.key=n),o.track()}}function It(e,t,n,s,o,a){const l=Vs.get(e);if(!l){Rn++;return}const i=u=>{u&&u.trigger()};if(no(),t==="clear")l.forEach(i);else{const u=se(e),d=u&&eo(n);if(u&&n==="length"){const c=Number(s);l.forEach((p,f)=>{(f==="length"||f===Pn||!it(f)&&f>=c)&&i(p)})}else switch((n!==void 0||l.has(void 0))&&i(l.get(n)),d&&i(l.get(Pn)),t){case"add":u?d&&i(l.get("length")):(i(l.get(Jt)),sn(e)&&i(l.get(Us)));break;case"delete":u||(i(l.get(Jt)),sn(e)&&i(l.get(Us)));break;case"set":sn(e)&&i(l.get(Jt));break}}so()}function Xt(e){const t=ge(e);return t===e?t:(Ve(t,"iterate",Pn),ot(e)?t:t.map(ut))}function ds(e){return Ve(e=ge(e),"iterate",Pn),e}function xt(e,t){return Mt(e)?un(Yt(e)?ut(t):t):ut(t)}const dl={__proto__:null,[Symbol.iterator](){return Cs(this,Symbol.iterator,e=>xt(this,e))},concat(...e){return Xt(this).concat(...e.map(t=>se(t)?Xt(t):t))},entries(){return Cs(this,"entries",e=>(e[1]=xt(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=>xt(this,s)),arguments)},find(e,t){return Ct(this,"find",e,t,n=>xt(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=>xt(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 As(this,"includes",e)},indexOf(...e){return As(this,"indexOf",e)},join(e){return Xt(this).join(e)},lastIndexOf(...e){return As(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return gn(this,"pop")},push(...e){return gn(this,"push",e)},reduce(e,...t){return So(this,"reduce",e,t)},reduceRight(e,...t){return So(this,"reduceRight",e,t)},shift(){return gn(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return gn(this,"splice",e)},toReversed(){return Xt(this).toReversed()},toSorted(e){return Xt(this).toSorted(e)},toSpliced(...e){return Xt(this).toSpliced(...e)},unshift(...e){return gn(this,"unshift",e)},values(){return Cs(this,"values",e=>xt(this,e))}};function Cs(e,t,n){const s=ds(e),o=s[t]();return s!==e&&!ot(e)&&(o._next=o.next,o.next=()=>{const a=o._next();return a.done||(a.value=n(a.value)),a}),o}const fl=Array.prototype;function Ct(e,t,n,s,o,a){const l=ds(e),i=l!==e&&!ot(e),u=l[t];if(u!==fl[t]){const p=u.apply(e,a);return i?ut(p):p}let d=n;l!==e&&(i?d=function(p,f){return n.call(this,xt(e,p),f,e)}:n.length>2&&(d=function(p,f){return n.call(this,p,f,e)}));const c=u.call(l,d,s);return i&&o?o(c):c}function So(e,t,n,s){const o=ds(e),a=o!==e&&!ot(e);let l=n,i=!1;o!==e&&(a?(i=s.length===0,l=function(d,c,p){return i&&(i=!1,d=xt(e,d)),n.call(this,d,xt(e,c),p,e)}):n.length>3&&(l=function(d,c,p){return n.call(this,d,c,p,e)}));const u=o[t](l,...s);return i?xt(e,u):u}function As(e,t,n){const s=ge(e);Ve(s,"iterate",Pn);const o=s[t](...n);return(o===-1||o===!1)&&io(n[0])?(n[0]=ge(n[0]),s[t](...n)):o}function gn(e,t,n=[]){Tt(),no();const s=ge(e)[t].apply(e,n);return so(),Ot(),s}const pl=Zs("__proto__,__v_isRef,__isVue"),Va=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(it));function ml(e){it(e)||(e=String(e));const t=ge(this);return Ve(t,"has",e),t.hasOwnProperty(e)}class Ua{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,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(o?a?$l:Ha:a?Fa:qa).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const l=se(t);if(!o){let u;if(l&&(u=dl[n]))return u;if(n==="hasOwnProperty")return ml}const i=Reflect.get(t,n,Le(t)?t:s);if((it(n)?Va.has(n):pl(n))||(o||Ve(t,"get",n),a))return i;if(Le(i)){const u=l&&eo(n)?i:i.value;return o&&xe(u)?qs(u):u}return xe(i)?o?qs(i):fs(i):i}}class La extends Ua{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const l=se(t)&&eo(n);if(!this._isShallow){const d=Mt(a);if(!ot(s)&&!Mt(s)&&(a=ge(a),s=ge(s)),!l&&Le(a)&&!Le(s))return d||(a.value=s),!0}const i=l?Number(n)e,Fn=e=>Reflect.getPrototypeOf(e);function xl(e,t,n){return function(...s){const o=this.__v_raw,a=ge(o),l=sn(a),i=e==="entries"||e===Symbol.iterator&&l,u=e==="keys"&&l,d=o[e](...s),c=n?Ls:t?un:ut;return!t&&Ve(a,"iterate",u?Us:Jt),je(Object.create(d),{next(){const{value:p,done:f}=d.next();return f?{value:p,done:f}:{value:i?[c(p[0]),c(p[1])]:c(p),done:f}}})}}function Hn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function yl(e,t){const n={get(o){const a=this.__v_raw,l=ge(a),i=ge(o);e||(_t(o,i)&&Ve(l,"get",o),Ve(l,"get",i));const{has:u}=Fn(l),d=t?Ls:e?un:ut;if(u.call(l,o))return d(a.get(o));if(u.call(l,i))return d(a.get(i));a!==l&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Ve(ge(o),"iterate",Jt),o.size},has(o){const a=this.__v_raw,l=ge(a),i=ge(o);return e||(_t(o,i)&&Ve(l,"has",o),Ve(l,"has",i)),o===i?a.has(o):a.has(o)||a.has(i)},forEach(o,a){const l=this,i=l.__v_raw,u=ge(i),d=t?Ls:e?un:ut;return!e&&Ve(u,"iterate",Jt),i.forEach((c,p)=>o.call(a,d(c),d(p),l))}};return je(n,e?{add:Hn("add"),set:Hn("set"),delete:Hn("delete"),clear:Hn("clear")}:{add(o){const a=ge(this),l=Fn(a),i=ge(o),u=!t&&!ot(o)&&!Mt(o)?i:o;return l.has.call(a,u)||_t(o,u)&&l.has.call(a,o)||_t(i,u)&&l.has.call(a,i)||(a.add(u),It(a,"add",u,u)),this},set(o,a){!t&&!ot(a)&&!Mt(a)&&(a=ge(a));const l=ge(this),{has:i,get:u}=Fn(l);let d=i.call(l,o);d||(o=ge(o),d=i.call(l,o));const c=u.call(l,o);return l.set(o,a),d?_t(a,c)&&It(l,"set",o,a):It(l,"add",o,a),this},delete(o){const a=ge(this),{has:l,get:i}=Fn(a);let u=l.call(a,o);u||(o=ge(o),u=l.call(a,o)),i&&i.call(a,o);const d=a.delete(o);return u&&It(a,"delete",o,void 0),d},clear(){const o=ge(this),a=o.size!==0,l=o.clear();return a&&It(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=xl(o,e,t)}),n}function ro(e,t){const n=yl(e,t);return(s,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(be(n,o)&&o in s?n:s,o,a)}const _l={get:ro(!1,!1)},wl={get:ro(!1,!0)},kl={get:ro(!0,!1)};const qa=new WeakMap,Fa=new WeakMap,Ha=new WeakMap,$l=new WeakMap;function Cl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fs(e){return Mt(e)?e:lo(e,!1,hl,_l,qa)}function Ba(e){return lo(e,!1,bl,wl,Fa)}function qs(e){return lo(e,!0,gl,kl,Ha)}function lo(e,t,n,s,o){if(!xe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=o.get(e);if(a)return a;const l=Cl(Yr(e));if(l===0)return e;const i=new Proxy(e,l===2?s:n);return o.set(e,i),i}function Yt(e){return Mt(e)?Yt(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function ot(e){return!!(e&&e.__v_isShallow)}function io(e){return e?!!e.__v_raw:!1}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}function Al(e){return!be(e,"__v_skip")&&Object.isExtensible(e)&&Aa(e,"__v_skip",!0),e}const ut=e=>xe(e)?fs(e):e,un=e=>xe(e)?qs(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function j(e){return Wa(e,!1)}function Sl(e){return Wa(e,!0)}function Wa(e,t){return Le(e)?e:new El(e,t)}class El{constructor(t,n){this.dep=new ao,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ge(t),this._value=n?t:ut(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ot(t)||Mt(t);t=s?t:ge(t),_t(t,n)&&(this._rawValue=t,this._value=s?t:ut(t),this.dep.trigger())}}function Re(e){return Le(e)?e.value:e}const Il={get:(e,t,n)=>t==="__v_raw"?e:Re(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 Ga(e){return Yt(e)?e:new Proxy(e,Il)}class Rl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ao(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Rn-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 Da(this,!0),!0}get value(){const t=this.dep.track();return Ma(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Pl(e,t,n=!1){let s,o;return ae(e)?s=e:(s=e.get,o=e.set),new Rl(s,o,n)}const Bn={},Yn=new WeakMap;let Kt;function Dl(e,t=!1,n=Kt){if(n){let s=Yn.get(n);s||Yn.set(n,s=[]),s.push(e)}}function Tl(e,t,n=we){const{immediate:s,deep:o,once:a,scheduler:l,augmentJob:i,call:u}=n,d=x=>o?x:ot(x)||o===!1||o===0?Rt(x,1):Rt(x);let c,p,f,_,k=!1,A=!1;if(Le(e)?(p=()=>e.value,k=ot(e)):Yt(e)?(p=()=>d(e),k=!0):se(e)?(A=!0,k=e.some(x=>Yt(x)||ot(x)),p=()=>e.map(x=>{if(Le(x))return x.value;if(Yt(x))return d(x);if(ae(x))return u?u(x,2):x()})):ae(e)?t?p=u?()=>u(e,2):e:p=()=>{if(f){Tt();try{f()}finally{Ot()}}const x=Kt;Kt=c;try{return u?u(e,3,[_]):e(_)}finally{Kt=x}}:p=wt,t&&o){const x=p,$=o===!0?1/0:o;p=()=>Rt(x(),$)}const I=il(),y=()=>{c.stop(),I&&I.active&&Xs(I.effects,c)};if(a&&t){const x=t;t=(...$)=>{const U=x(...$);return y(),U}}let w=A?new Array(e.length).fill(Bn):Bn;const g=x=>{if(!(!(c.flags&1)||!c.dirty&&!x))if(t){const $=c.run();if(x||o||k||(A?$.some((U,F)=>_t(U,w[F])):_t($,w))){f&&f();const U=Kt;Kt=c;try{const F=[$,w===Bn?void 0:A&&w[0]===Bn?[]:w,_];w=$,u?u(t,3,F):t(...F)}finally{Kt=U}}}else c.run()};return i&&i(g),c=new Ra(p),c.scheduler=l?()=>l(g,!1):g,_=x=>Dl(x,!1,c),f=c.onStop=()=>{const x=Yn.get(c);if(x){if(u)u(x,4);else for(const $ of x)$();Yn.delete(c)}},t?s?g(!0):w=c.run():l?l(g.bind(null,!0),!0):c.run(),y.pause=c.pause.bind(c),y.resume=c.resume.bind(c),y.stop=y,y}function Rt(e,t=1/0,n){if(t<=0||!xe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Le(e))Rt(e.value,t,n);else if(se(e))for(let s=0;s{Rt(s,t,n)});else if(Ca(e)){for(const s in e)Rt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Rt(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Ln(e,t,n,s){try{return s?e(...s):e()}catch(o){ps(o,t,n)}}function ct(e,t,n,s){if(ae(e)){const o=Ln(e,t,n,s);return o&&ka(o)&&o.catch(a=>{ps(a,t,n)}),o}if(se(e)){const o=[];for(let a=0;a>>1,o=Be[s],a=Dn(o);a=Dn(n)?Be.push(e):Be.splice(Ml(t),0,e),e.flags|=1,Ka()}}function Ka(){Zn||(Zn=za.then(Ja))}function Nl(e){if(!se(e))Lt&&e.id===-1?Lt.splice(en+1,0,e):e.flags&1||(on.push(e),e.flags|=1);else for(let t=0;tDn(n)-Dn(s));if(on.length=0,Lt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Ja(e){try{for(bt=0;bt{s._d&&ns(-1);const a=Xn(t),l=Dt.length;let i;try{i=e(...o)}finally{for(let u=Dt.length;u>l;u--)ho();Xn(a),s._d&&ns(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function z(e,t){if(Me===null)return e;const n=xs(Me),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&ae(t)?t.call(s&&s.proxy):t}}const jl=Symbol.for("v-scx"),Vl=()=>lt(jl);function Ge(e,t,n){return Za(e,t,n)}function Za(e,t,n=we){const{immediate:s,deep:o,flush:a,once:l}=n,i=je({},n),u=t&&s||!t&&a!=="post";let d;if(Nn){if(a==="sync"){const _=Vl();d=_.__watcherHandles||(_.__watcherHandles=[])}else if(!u){const _=()=>{};return _.stop=wt,_.resume=wt,_.pause=wt,_}}const c=Ue;i.call=(_,k,A)=>ct(_,c,k,A);let p=!1;a==="post"?i.scheduler=_=>{Je(_,c&&c.suspense)}:a!=="sync"&&(p=!0,i.scheduler=(_,k)=>{k?_():co(_)}),i.augmentJob=_=>{t&&(_.flags|=4),p&&(_.flags|=2,c&&(_.id=c.uid,_.i=c))};const f=Tl(e,t,i);return Nn&&(d?d.push(f):u&&f()),f}function Ul(e,t,n){const s=this.proxy,o=$e(e)?e.includes(".")?Xa(s,e):()=>s[e]:e.bind(s,s);let a;ae(t)?a=t:(a=t.handler,n=t);const l=qn(this),i=Za(o,a.bind(s),n);return l(),i}function Xa(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Ss=Symbol("_leaveCb");function ql(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==kt){t=n;break}}return t}function er(e){if(!po(e))return ms(e.type)&&e.children?ql(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&&ae(n.default))return n.default()}}function fo(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;fo(ms(n.type)&&er(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 tr(e,t){return ae(e)?je({name:e.name},t,{setup:e}):e}function nr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Io(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const es=new WeakMap;function Sn(e,t,n,s,o=!1){if(se(e)){e.forEach((A,I)=>Sn(A,t&&(se(t)?t[I]:t),n,s,o));return}if(an(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Sn(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?xs(s.component):s.el,l=o?null:a,{i,r:u}=e,d=t&&t.r,c=i.refs===we?i.refs={}:i.refs,p=i.setupState,f=ge(p),_=p===we?wa:A=>Io(c,A)?!1:be(f,A),k=(A,I)=>!(I&&Io(c,I));if(d!=null&&d!==u){if(Ro(t),$e(d))c[d]=null,_(d)&&(p[d]=null);else if(Le(d)){const A=t;k(d,A.k)&&(d.value=null),A.k&&(c[A.k]=null)}}if(ae(u))Ln(u,i,12,[l,c]);else{const A=$e(u),I=Le(u);if(A||I){const y=()=>{if(e.f){const w=A?_(u)?p[u]:c[u]:k()||!e.k?u.value:c[e.k];if(o)se(w)&&Xs(w,a);else if(se(w))w.includes(a)||w.push(a);else if(A)c[u]=[a],_(u)&&(p[u]=c[u]);else{const g=[a];k(u,e.k)&&(u.value=g),e.k&&(c[e.k]=g)}}else A?(c[u]=l,_(u)&&(p[u]=l)):I&&(k(u,e.k)&&(u.value=l),e.k&&(c[e.k]=l))};if(l){const w=()=>{y(),es.delete(e)};w.id=-1,es.set(e,w),Je(w,n)}else Ro(e),y()}}}function Ro(e){const t=es.get(e);t&&(t.flags|=8,es.delete(e))}cs().requestIdleCallback;cs().cancelIdleCallback;const an=e=>!!e.type.__asyncLoader,po=e=>e.type.__isKeepAlive;function Fl(e,t){sr(e,"a",t)}function Hl(e,t){sr(e,"da",t)}function sr(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(vs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)po(o.parent.vnode)&&Bl(s,t,n,o),o=o.parent}}function Bl(e,t,n,s){const o=vs(t,e,s,!0);ar(()=>{Xs(s[t],o)},n)}function vs(e,t,n=Ue,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...l)=>{Tt();const i=qn(n),u=ct(t,n,e,l);return i(),Ot(),u});return s?o.unshift(a):o.push(a),a}}const jt=e=>(t,n=Ue)=>{(!Nn||e==="sp")&&vs(e,(...s)=>t(...s),n)},Wl=jt("bm"),hs=jt("m"),Gl=jt("bu"),zl=jt("u"),or=jt("bum"),ar=jt("um"),Kl=jt("sp"),Ql=jt("rtg"),Jl=jt("rtc");function Yl(e,t=Ue){vs("ec",e,t)}const rr="components";function Wt(e,t){return ir(rr,e,!0,t)||e}const lr=Symbol.for("v-ndc");function Zl(e){return $e(e)?ir(rr,e,!1)||e:e||lr}function ir(e,t,n=!0,s=!1){const o=Me||Ue;if(o){const a=o.type;{const i=Ni(a,!1);if(i&&(i===t||i===We(t)||i===is(We(t))))return a}const l=Po(o[e]||a[e],t)||Po(o.appContext[e],t);return!l&&s?a:l}}function Po(e,t){return e&&(e[t]||e[We(t)]||e[is(We(t))])}function ce(e,t,n,s){let o;const a=n,l=se(e);if(l||$e(e)){const i=l&&Yt(e);let u=!1,d=!1;i&&(u=!ot(e),d=Mt(e),e=ds(e)),o=new Array(e.length);for(let c=0,p=e.length;ct(i,u,void 0,a));else{const i=Object.keys(e);o=new Array(i.length);for(let u=0,d=i.length;u0;return v(),de(Z,null,[ne("slot",d,s)],c?-2:64)}let l=e[t];l&&l._c&&(l._d=!1);const i=Dt.length;v();let u;try{const d=l&&ur(l(n)),c=n.key||a||d&&d.key;u=de(Z,{key:(c&&!it(c)?c:`_${t}`)+(!d&&s?"_fb":"")},d||(s?s():[]),d&&e._===1?64:-2)}catch(d){for(let c=Dt.length;c>i;c--)ho();throw d}finally{l&&l._c&&(l._d=!0)}return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),u}function ur(e){return e.some(t=>On(t)?!(t.type===kt||t.type===Z&&!ur(t.children)):!0)?e:null}const Fs=e=>e?Rr(e)?xs(e):Fs(e.parent):null,En=je(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=>dr(e),$forceUpdate:e=>e.f||(e.f=()=>{co(e.update)}),$nextTick:e=>e.n||(e.n=uo.bind(e.proxy)),$watch:e=>Ul.bind(e)}),Es=(e,t)=>e!==we&&!e.__isScriptSetup&&be(e,t),ei={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:l,type:i,appContext:u}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(Es(s,t))return l[t]=1,s[t];if(o!==we&&be(o,t))return l[t]=2,o[t];if(be(a,t))return l[t]=3,a[t];if(n!==we&&be(n,t))return l[t]=4,n[t];Hs&&(l[t]=0)}}const d=En[t];let c,p;if(d)return t==="$attrs"&&Ve(e.attrs,"get",""),d(e);if((c=i.__cssModules)&&(c=c[t]))return c;if(n!==we&&be(n,t))return l[t]=4,n[t];if(p=u.config.globalProperties,be(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return Es(o,t)?(o[t]=n,!0):s!==we&&be(s,t)?(s[t]=n,!0):be(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:a,type:l}},i){let u;return!!(n[i]||e!==we&&i[0]!=="$"&&be(e,i)||Es(t,i)||be(a,i)||be(s,i)||be(En,i)||be(o.config.globalProperties,i)||(u=l.__cssModules)&&u[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:be(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Do(e){return se(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Hs=!0;function ti(e){const t=dr(e),n=e.proxy,s=e.ctx;Hs=!1,t.beforeCreate&&To(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:l,watch:i,provide:u,inject:d,created:c,beforeMount:p,mounted:f,beforeUpdate:_,updated:k,activated:A,deactivated:I,beforeDestroy:y,beforeUnmount:w,destroyed:g,unmounted:x,render:$,renderTracked:U,renderTriggered:F,errorCaptured:H,serverPrefetch:me,expose:te,inheritAttrs:B,components:Pe,directives:J,filters:ze}=t;if(d&&ni(d,s,null),l)for(const ve in l){const pe=l[ve];ae(pe)&&(s[ve]=pe.bind(n))}if(o){const ve=o.call(n,n);xe(ve)&&(e.data=fs(ve))}if(Hs=!0,a)for(const ve in a){const pe=a[ve],at=ae(pe)?pe.bind(n,n):ae(pe.get)?pe.get.bind(n,n):wt,Ke=!ae(pe)&&ae(pe.set)?pe.set.bind(n):wt,nt=le({get:at,set:Ke});Object.defineProperty(s,ve,{enumerable:!0,configurable:!0,get:()=>nt.value,set:De=>nt.value=De})}if(i)for(const ve in i)cr(i[ve],s,n,ve);if(u){const ve=ae(u)?u.call(n):u;Reflect.ownKeys(ve).forEach(pe=>{Kn(pe,ve[pe])})}c&&To(c,e,"c");function Se(ve,pe){se(pe)?pe.forEach(at=>ve(at.bind(n))):pe&&ve(pe.bind(n))}if(Se(Wl,p),Se(hs,f),Se(Gl,_),Se(zl,k),Se(Fl,A),Se(Hl,I),Se(Yl,H),Se(Jl,U),Se(Ql,F),Se(or,w),Se(ar,x),Se(Kl,me),se(te))if(te.length){const ve=e.exposed||(e.exposed={});te.forEach(pe=>{Object.defineProperty(ve,pe,{get:()=>n[pe],set:at=>n[pe]=at,enumerable:!0})})}else e.exposed||(e.exposed={});$&&e.render===wt&&(e.render=$),B!=null&&(e.inheritAttrs=B),Pe&&(e.components=Pe),J&&(e.directives=J),me&&nr(e)}function ni(e,t,n=wt){se(e)&&(e=Bs(e));for(const s in e){const o=e[s];let a;xe(o)?"default"in o?a=lt(o.from||s,o.default,!0):a=lt(o.from||s):a=lt(o),Le(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:l=>a.value=l}):t[s]=a}}function To(e,t,n){ct(se(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function cr(e,t,n,s){let o=s.includes(".")?Xa(n,s):()=>n[s];if($e(e)){const a=t[e];ae(a)&&Ge(o,a)}else if(ae(e))Ge(o,e.bind(n));else if(xe(e))if(se(e))e.forEach(a=>cr(a,t,n,s));else{const a=ae(e.handler)?e.handler.bind(n):t[e.handler];ae(a)&&Ge(o,a,e)}}function dr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:l}}=e.appContext,i=a.get(t);let u;return i?u=i:!o.length&&!n&&!s?u=t:(u={},o.length&&o.forEach(d=>ts(u,d,l,!0)),ts(u,t,l)),xe(t)&&a.set(t,u),u}function ts(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&ts(e,a,n,!0),o&&o.forEach(l=>ts(e,l,n,!0));for(const l in t)if(!(s&&l==="expose")){const i=si[l]||n&&n[l];e[l]=i?i(e[l],t[l]):t[l]}return e}const si={data:Oo,props:Mo,emits:Mo,methods:_n,computed:_n,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:_n,directives:_n,watch:ai,provide:Oo,inject:oi};function Oo(e,t){return t?e?function(){return je(ae(e)?e.call(this,this):e,ae(t)?t.call(this,this):t)}:t:e}function oi(e,t){return _n(Bs(e),Bs(t))}function Bs(e){if(se(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${We(t)}Modifiers`]||e[`${Zt(t)}Modifiers`];function ui(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||we;let o=n;const a=t.startsWith("update:"),l=a&&ii(s,t.slice(7));l&&(l.trim&&(o=n.map(c=>$e(c)?c.trim():c)),l.number&&(o=n.map(us)));let i,u=s[i=ws(t)]||s[i=ws(We(t))];!u&&a&&(u=s[i=ws(Zt(t))]),u&&ct(u,e,6,o);const d=s[i+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,ct(d,e,6,o)}}const ci=new WeakMap;function pr(e,t,n=!1){const s=n?ci:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let l={},i=!1;if(!ae(e)){const u=d=>{const c=pr(d,t,!0);c&&(i=!0,je(l,c))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!a&&!i?(xe(e)&&s.set(e,null),null):(se(a)?a.forEach(u=>l[u]=null):je(l,a),xe(e)&&s.set(e,l),l)}function gs(e,t){return!e||!as(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),be(e,t[0].toLowerCase()+t.slice(1))||be(e,Zt(t))||be(e,t))}function No(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:l,attrs:i,emit:u,render:d,renderCache:c,props:p,data:f,setupState:_,ctx:k,inheritAttrs:A}=e,I=Xn(e);let y,w;try{if(n.shapeFlag&4){const x=o||s,$=x;y=yt(d.call($,x,c,p,_,f,k)),w=i}else{const x=t;y=yt(x.length>1?x(p,{attrs:i,slots:l,emit:u}):x(p,null)),w=t.props?i:di(i)}}catch(x){Dt.length=0,ps(x,e,1),y=ne(kt)}let g=y;if(w&&A!==!1){const x=Object.keys(w),{shapeFlag:$}=g;x.length&&$&7&&(a&&x.some(rs)&&(w=fi(w,a)),g=cn(g,w,!1,!0))}if(n.dirs&&(g=cn(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition){const x=ms(g.type)&&er(g)||g;fo(x,n.transition)}return y=g,Xn(I),y}const di=e=>{let t;for(const n in e)(n==="class"||n==="style"||as(n))&&((t||(t={}))[n]=e[n]);return t},fi=(e,t)=>{const n={};for(const s in e)(!rs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function pi(e,t,n){const{props:s,children:o,component:a}=e,{props:l,children:i,patchFlag:u}=t,d=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?jo(s,l,d):!!l;if(u&8){const c=t.dynamicProps;for(let p=0;pObject.create(vr),gr=e=>Object.getPrototypeOf(e)===vr;function vi(e,t,n,s=!1){const o={},a=hr();e.propsDefaults=Object.create(null),br(e,t,o,a);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);n?e.props=s?o:Ba(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function hi(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:l}}=e,i=ge(o),[u]=e.propsOptions;let d=!1;if((s||l>0)&&!(l&16)){if(l&8){const c=e.vnode.dynamicProps;for(let p=0;p{u=!0;const[f,_]=xr(p,t,!0);je(l,f),_&&i.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!u)return xe(e)&&s.set(e,nn),nn;if(se(a))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",vo=e=>se(e)?e.map(yt):[yt(e)],bi=(e,t,n)=>{if(t._n)return t;const s=dt((...o)=>vo(t(...o)),n);return s._c=!1,s},yr=(e,t,n)=>{const s=e._ctx;for(const o in e){if(mo(o))continue;const a=e[o];if(ae(a))t[o]=bi(o,a,s);else if(a!=null){const l=vo(a);t[o]=()=>l}}},_r=(e,t)=>{const n=vo(t);e.slots.default=()=>n},wr=(e,t,n)=>{for(const s in t)(n||!mo(s))&&(e[s]=t[s])},xi=(e,t,n)=>{const s=e.slots=hr();if(e.vnode.shapeFlag&32){const o=t._;o?(wr(s,t,n),n&&Aa(s,"_",o,!0)):yr(t,s)}else t&&_r(e,t)},yi=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,l=we;if(s.shapeFlag&32){const i=t._;i?n&&i===1?a=!1:wr(o,t,n):(a=!t.$stable,yr(t,o)),l=t}else t&&(_r(e,t),l={default:1});if(a)for(const i in o)!mo(i)&&l[i]==null&&delete o[i]},Je=Ci;function _i(e){return wi(e)}function wi(e,t){const n=cs();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:l,createText:i,createComment:u,setText:d,setElementText:c,parentNode:p,nextSibling:f,setScopeId:_=wt,insertStaticContent:k}=e,A=(m,h,C,T=null,M=null,D=null,R=void 0,E=null,L=!!h.dynamicChildren)=>{if(m===h)return;m&&!bn(m,h)&&(T=O(m),De(m,M,D,!0),m=null),h.patchFlag===-2&&(L=!1,h.dynamicChildren=null);const{type:N,ref:P,shapeFlag:q}=h;switch(N){case bs:I(m,h,C,T);break;case kt:y(m,h,C,T);break;case Qn:m==null&&w(h,C,T,R);break;case Z:Pe(m,h,C,T,M,D,R,E,L);break;default:q&1?$(m,h,C,T,M,D,R,E,L):q&6?J(m,h,C,T,M,D,R,E,L):(q&64||q&128)&&N.process(m,h,C,T,M,D,R,E,L,ee)}P!=null&&M?Sn(P,m&&m.ref,D,h||m,!h):P==null&&m&&m.ref!=null&&Sn(m.ref,null,D,m,!0)},I=(m,h,C,T)=>{if(m==null)s(h.el=i(h.children),C,T);else{const M=h.el=m.el;h.children!==m.children&&d(M,h.children)}},y=(m,h,C,T)=>{m==null?s(h.el=u(h.children||""),C,T):h.el=m.el},w=(m,h,C,T)=>{[m.el,m.anchor]=k(m.children,h,C,T,m.el,m.anchor)},g=({el:m,anchor:h},C,T)=>{let M;for(;m&&m!==h;)M=f(m),s(m,C,T),m=M;s(h,C,T)},x=({el:m,anchor:h})=>{let C;for(;m&&m!==h;)C=f(m),o(m),m=C;o(h)},$=(m,h,C,T,M,D,R,E,L)=>{if(h.type==="svg"?R="svg":h.type==="math"&&(R="mathml"),m==null)U(h,C,T,M,D,R,E,L);else{const N=m.el&&m.el._isVueCE?m.el:null;try{N&&N._beginPatch(),me(m,h,M,D,R,E,L)}finally{N&&N._endPatch()}}},U=(m,h,C,T,M,D,R,E)=>{let L,N;const{props:P,shapeFlag:q,transition:X,dirs:oe}=m;if(L=m.el=l(m.type,D,P&&P.is,P),q&8?c(L,m.children):q&16&&H(m.children,L,null,T,M,Is(m,D),R,E),oe&&Gt(m,null,T,"created"),F(L,m,m.scopeId,R,T),P){for(const _e in P)_e!=="value"&&!$n(_e)&&a(L,_e,null,P[_e],D,T);"value"in P&&a(L,"value",null,P.value,D),(N=P.onVnodeBeforeMount)&>(N,T,m)}oe&&Gt(m,null,T,"beforeMount");const fe=ki(M,X);fe&&X.beforeEnter(L),s(L,h,C),((N=P&&P.onVnodeMounted)||fe||oe)&&Je(()=>{try{N&>(N,T,m),fe&&X.enter(L),oe&&Gt(m,null,T,"mounted")}finally{}},M)},F=(m,h,C,T,M)=>{if(C&&_(m,C),T)for(let D=0;D{for(let N=L;N{const E=h.el=m.el;let{patchFlag:L,dynamicChildren:N,dirs:P}=h;L|=m.patchFlag&16;const q=m.props||we,X=h.props||we;let oe;if(C&&zt(C,!1),(oe=X.onVnodeBeforeUpdate)&>(oe,C,h,m),P&&Gt(h,m,C,"beforeUpdate"),C&&zt(C,!0),N&&(!m.dynamicChildren||m.dynamicChildren.length!==N.length)&&(L=0,R=!1,N=null),(q.innerHTML&&X.innerHTML==null||q.textContent&&X.textContent==null)&&c(E,""),N?te(m.dynamicChildren,N,E,C,T,Is(h,M),D):R||pe(m,h,E,null,C,T,Is(h,M),D,!1),L>0){if(L&16)B(E,q,X,C,M);else if(L&2&&q.class!==X.class&&a(E,"class",null,X.class,M),L&4&&a(E,"style",q.style,X.style,M),L&8){const fe=h.dynamicProps;for(let _e=0;_e{oe&>(oe,C,h,m),P&&Gt(h,m,C,"updated")},T)},te=(m,h,C,T,M,D,R)=>{for(let E=0;E{if(h!==C){if(h!==we)for(const D in h)!$n(D)&&!(D in C)&&a(m,D,h[D],null,M,T);for(const D in C){if($n(D))continue;const R=C[D],E=h[D];R!==E&&D!=="value"&&a(m,D,E,R,M,T)}"value"in C&&a(m,"value",h.value,C.value,M)}},Pe=(m,h,C,T,M,D,R,E,L)=>{const N=h.el=m?m.el:i(""),P=h.anchor=m?m.anchor:i("");let{patchFlag:q,dynamicChildren:X,slotScopeIds:oe}=h;oe&&(E=E?E.concat(oe):oe),m==null?(s(N,C,T),s(P,C,T),H(h.children||[],C,P,M,D,R,E,L)):q>0&&q&64&&X&&m.dynamicChildren&&m.dynamicChildren.length===X.length?(te(m.dynamicChildren,X,C,M,D,R,E),(h.key!=null||M&&h===M.subTree)&&kr(m,h,!0)):pe(m,h,C,P,M,D,R,E,L)},J=(m,h,C,T,M,D,R,E,L)=>{h.slotScopeIds=E,m==null?h.shapeFlag&512?M.ctx.activate(h,C,T,R,L):ze(h,C,T,M,D,R,L):Vt(m,h,L)},ze=(m,h,C,T,M,D,R)=>{const E=m.component=Ri(m,T,M);if(po(m)&&(E.ctx.renderer=ee),Di(E,!1,R),E.asyncDep){if(M&&M.registerDep(E,Se,R),!m.el){const L=E.subTree=ne(kt);y(null,L,h,C),m.placeholder=L.el}}else Se(E,m,h,C,M,D,R)},Vt=(m,h,C)=>{const T=h.component=m.component;if(pi(m,h,C))if(T.asyncDep&&!T.asyncResolved){ve(T,h,C);return}else T.next=h,T.update();else h.el=m.el,T.vnode=h},Se=(m,h,C,T,M,D,R)=>{const E=()=>{if(m.isMounted){let{next:q,bu:X,u:oe,parent:fe,vnode:_e}=m;{const vt=$r(m);if(vt){q&&(q.el=_e.el,ve(m,q,R)),vt.asyncDep.then(()=>{Je(()=>{m.isUnmounted||N()},M)});return}}let ye=q,Ee;zt(m,!1),q?(q.el=_e.el,ve(m,q,R)):q=_e,X&&zn(X),(Ee=q.props&&q.props.onVnodeBeforeUpdate)&>(Ee,fe,q,_e),zt(m,!0);const Te=No(m),mt=m.subTree;m.subTree=Te,A(mt,Te,p(mt.el),O(mt),m,M,D),q.el=Te.el,ye===null&&mi(m,Te.el),oe&&Je(oe,M),(Ee=q.props&&q.props.onVnodeUpdated)&&Je(()=>gt(Ee,fe,q,_e),M)}else{let q;const{el:X,props:oe}=h,{bm:fe,m:_e,parent:ye,root:Ee,type:Te}=m,mt=an(h);zt(m,!1),fe&&zn(fe),!mt&&(q=oe&&oe.onVnodeBeforeMount)&>(q,ye,h),zt(m,!0);{Ee.ce&&Ee.ce._hasShadowRoot()&&Ee.ce._injectChildStyle(Te,m.parent?m.parent.type:void 0);const vt=m.subTree=No(m);A(null,vt,C,T,m,M,D),h.el=vt.el}if(_e&&Je(_e,M),!mt&&(q=oe&&oe.onVnodeMounted)){const vt=h;Je(()=>gt(q,ye,vt),M)}(h.shapeFlag&256||ye&&an(ye.vnode)&&ye.vnode.shapeFlag&256)&&m.a&&Je(m.a,M),m.isMounted=!0,h=C=T=null}};m.scope.on();const L=m.effect=new Ra(E);m.scope.off();const N=m.update=L.run.bind(L),P=m.job=L.runIfDirty.bind(L);P.i=m,P.id=m.uid,L.scheduler=()=>co(P),zt(m,!0),N()},ve=(m,h,C)=>{h.component=m;const T=m.vnode.props;m.vnode=h,m.next=null,hi(m,h.props,T,C),yi(m,h.children,C),Tt(),Eo(m),Ot()},pe=(m,h,C,T,M,D,R,E,L=!1)=>{const N=m&&m.children,P=m?m.shapeFlag:0,q=h.children,{patchFlag:X,shapeFlag:oe}=h;if(X>0){if(X&128){Ke(N,q,C,T,M,D,R,E,L);return}else if(X&256){at(N,q,C,T,M,D,R,E,L);return}}oe&8?(P&16&&Qe(N,M,D),q!==N&&c(C,q)):P&16?oe&16?Ke(N,q,C,T,M,D,R,E,L):Qe(N,M,D,!0):(P&8&&c(C,""),oe&16&&H(q,C,T,M,D,R,E,L))},at=(m,h,C,T,M,D,R,E,L)=>{m=m||nn,h=h||nn;const N=m.length,P=h.length,q=Math.min(N,P);let X;for(X=0;XP?Qe(m,M,D,!0,!1,q):H(h,C,T,M,D,R,E,L,q)},Ke=(m,h,C,T,M,D,R,E,L)=>{let N=0;const P=h.length;let q=m.length-1,X=P-1;for(;N<=q&&N<=X;){const oe=m[N],fe=h[N]=L?Et(h[N]):yt(h[N]);if(bn(oe,fe))A(oe,fe,C,null,M,D,R,E,L);else break;N++}for(;N<=q&&N<=X;){const oe=m[q],fe=h[X]=L?Et(h[X]):yt(h[X]);if(bn(oe,fe))A(oe,fe,C,null,M,D,R,E,L);else break;q--,X--}if(N>q){if(N<=X){const oe=X+1,fe=oeX)for(;N<=q;)De(m[N],M,D,!0),N++;else{const oe=N,fe=N,_e=new Map;for(N=fe;N<=X;N++){const Xe=h[N]=L?Et(h[N]):yt(h[N]);Xe.key!=null&&_e.set(Xe.key,N)}let ye,Ee=0;const Te=X-fe+1;let mt=!1,vt=0;const hn=new Array(Te);for(N=0;N=Te){De(Xe,M,D,!0);continue}let ht;if(Xe.key!=null)ht=_e.get(Xe.key);else for(ye=fe;ye<=X;ye++)if(hn[ye-fe]===0&&bn(Xe,h[ye])){ht=ye;break}ht===void 0?De(Xe,M,D,!0):(hn[ht-fe]=N+1,ht>=vt?vt=ht:mt=!0,A(Xe,h[ht],C,null,M,D,R,E,L),Ee++)}const _o=mt?$i(hn):nn;for(ye=_o.length-1,N=Te-1;N>=0;N--){const Xe=fe+N,ht=h[Xe],wo=h[Xe+1],ko=Xe+1{const{el:D,type:R,transition:E,children:L,shapeFlag:N}=m;if(N&6){nt(m.component.subTree,h,C,T);return}if(N&128){m.suspense.move(h,C,T);return}if(N&64){R.move(m,h,C,ee);return}if(R===Z){s(D,h,C);for(let q=0;qE.enter(D),M));else{const{leave:q,delayLeave:X,afterLeave:oe}=E,fe=()=>{m.ctx.isUnmounted?o(D):s(D,h,C)},_e=()=>{const ye=D._isLeaving||!!D[Ss];D._isLeaving&&D[Ss](!0),E.persisted&&!ye?fe():q(D,()=>{fe(),oe&&oe()})};X?X(D,fe,_e):_e()}else s(D,h,C)},De=(m,h,C,T=!1,M=!1)=>{const{type:D,props:R,ref:E,children:L,dynamicChildren:N,shapeFlag:P,patchFlag:q,dirs:X,cacheIndex:oe,memo:fe}=m;if(q===-2&&(M=!1),E!=null&&(Tt(),Sn(E,null,C,m,!0),Ot()),oe!=null&&(h.renderCache[oe]=void 0),P&256){h.ctx.deactivate(m);return}const _e=P&1&&X,ye=!an(m);let Ee;if(ye&&(Ee=R&&R.onVnodeBeforeUnmount)&>(Ee,h,m),P&6)pt(m.component,C,T);else{if(P&128){m.suspense.unmount(C,T);return}_e&&Gt(m,null,h,"beforeUnmount"),P&64?m.type.remove(m,h,C,ee,T):N&&!N.hasOnce&&(D!==Z||q>0&&q&64)?Qe(N,h,C,!1,!0):(D===Z&&q&384||!M&&P&16)&&Qe(L,h,C),T&&$t(m)}const Te=fe!=null&&oe==null;(ye&&(Ee=R&&R.onVnodeUnmounted)||_e||Te)&&Je(()=>{Ee&>(Ee,h,m),_e&&Gt(m,null,h,"unmounted"),Te&&(m.el=null)},C)},$t=m=>{const{type:h,el:C,anchor:T,transition:M}=m;if(h===Z){Ze(C,T);return}if(h===Qn){x(m);return}const D=()=>{o(C),M&&!M.persisted&&M.afterLeave&&M.afterLeave()};if(m.shapeFlag&1&&M&&!M.persisted){const{leave:R,delayLeave:E}=M,L=()=>R(C,D);E?E(m.el,D,L):L()}else D()},Ze=(m,h)=>{let C;for(;m!==h;)C=f(m),o(m),m=C;o(h)},pt=(m,h,C)=>{const{bum:T,scope:M,job:D,subTree:R,um:E,m:L,a:N}=m;Uo(L),Uo(N),T&&zn(T),M.stop(),D&&(D.flags|=8,De(R,m,h,C)),E&&Je(E,h),Je(()=>{m.isUnmounted=!0},h)},Qe=(m,h,C,T=!1,M=!1,D=0)=>{for(let R=D;R{if(m.shapeFlag&6)return O(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const h=f(m.anchor||m.el),C=h&&h[Ll];return C?f(C):h};let G=!1;const W=(m,h,C)=>{let T;m==null?h._vnode&&(De(h._vnode,null,null,!0),T=h._vnode.component):A(h._vnode||null,m,h,null,null,null,C),h._vnode=m,G||(G=!0,Eo(T),Qa(),G=!1)},ee={p:A,um:De,m:nt,r:$t,mt:ze,mc:H,pc:pe,pbc:te,n:O,o:e};return{render:W,hydrate:void 0,createApp:li(W)}}function Is({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 zt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ki(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function kr(e,t,n=!1){const s=e.children,o=t.children;if(se(s)&&se(o))for(let a=0;a>1,e[n[i]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,l=n[a-1];a-- >0;)n[a]=l,l=t[l];return n}function $r(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:$r(t)}function Uo(e){if(e)for(let t=0;te.__isSuspense;function Ci(e,t){t&&t.pendingBranch?se(e)?t.effects.push(...e):t.effects.push(e):Nl(e)}const Z=Symbol.for("v-fgt"),bs=Symbol.for("v-txt"),kt=Symbol.for("v-cmt"),Qn=Symbol.for("v-stc"),Dt=[];let et=null;function v(e=!1){Dt.push(et=e?null:[])}function ho(){Dt.pop(),et=Dt[Dt.length-1]||null}let Tn=1;function ns(e,t=!1){Tn+=e,e<0&&et&&t&&(et.hasOnce=!0)}function Sr(e){return e.dynamicChildren=Tn>0?et||nn:null,ho(),Tn>0&&et&&et.push(e),e}function b(e,t,n,s,o,a){return Sr(r(e,t,n,s,o,a,!0))}function de(e,t,n,s,o){return Sr(ne(e,t,n,s,o,!0))}function On(e){return e?e.__v_isVNode===!0:!1}function bn(e,t){return e.type===t.type&&e.key===t.key}const Er=({key:e})=>e??null,Jn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||Le(e)||ae(e)?{i:Me,r:e,k:t,f:!!n}:e:null);function r(e,t=null,n=null,s=0,o=null,a=e===Z?0:1,l=!1,i=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Er(t),ref:t&&Jn(t),scopeId:Ya,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:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Me};return i?(ss(u,n),a&128&&e.normalize(u)):n&&(u.shapeFlag|=$e(n)?8:16),Tn>0&&!l&&et&&(u.patchFlag>0||a&6)&&u.patchFlag!==32&&et.push(u),u}const ne=Ai;function Ai(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===lr)&&(e=kt),On(e)){const i=cn(e,t,!0);return n&&ss(i,n),Tn>0&&!a&&et&&(i.shapeFlag&6?et[et.indexOf(e)]=i:et.push(i)),i.patchFlag=-2,i}if(ji(e)&&(e=e.__vccOpts),t){t=Si(t);let{class:i,style:u}=t;i&&!$e(i)&&(t.class=ie(i)),xe(u)&&(io(u)&&!se(u)&&(u=je({},u)),t.style=Ft(u))}const l=$e(e)?1:Ar(e)?128:ms(e)?64:xe(e)?4:ae(e)?2:0;return r(e,t,n,s,o,l,a,!0)}function Si(e){return e?io(e)||gr(e)?je({},e):e:null}function cn(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:l,children:i,transition:u}=e,d=t?Ir(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Er(d),ref:t&&t.ref?n&&a?se(a)?a.concat(Jn(t)):[a,Jn(t)]:Jn(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Z?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cn(e.ssContent),ssFallback:e.ssFallback&&cn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&fo(c,u.clone(c)),c}function Y(e=" ",t=0){return ne(bs,null,e,t)}function go(e,t){const n=ne(Qn,null,e);return n.staticCount=t,n}function V(e="",t=!1){return t?(v(),de(kt,null,e)):ne(kt,null,e)}function yt(e){return e==null||typeof e=="boolean"?ne(kt):se(e)?ne(Z,null,e.slice()):On(e)?Et(e):ne(bs,null,String(e))}function Et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cn(e)}function ss(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(se(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),ss(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!gr(t)?t._ctx=Me:o===3&&Me&&(Me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ae(t)){if(s&65){ss(e,{default:t});return}t={default:t,_ctx:Me},n=32}else t=String(t),s&64?(n=16,t=[Y(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ir(...e){const t={};for(let n=0;nUe||Me;let os,Mn;{const e=cs(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(l=>l(a)):o[0](a)}};os=t("__VUE_INSTANCE_SETTERS__",n=>Ue=n),Mn=t("__VUE_SSR_SETTERS__",n=>Nn=n)}const qn=e=>{const t=Ue;return os(e),e.scope.on(),()=>{e.scope.off(),os(t)}},Lo=()=>{Ue&&Ue.scope.off(),os(null)};function Rr(e){return e.vnode.shapeFlag&4}let Nn=!1;function Di(e,t=!1,n=!1){t&&Mn(t);const{props:s,children:o}=e.vnode,a=Rr(e);vi(e,s,a,t),xi(e,o,n||t);const l=a?Ti(e,t):void 0;return t&&Mn(!1),l}function Ti(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ei);const{setup:s}=n;if(s){Tt();const o=e.setupContext=s.length>1?Mi(e):null,a=qn(e),l=Ln(s,e,0,[e.props,o]),i=ka(l);if(Ot(),a(),(i||e.sp)&&!an(e)&&nr(e),i){if(l.then(Lo,Lo),t)return l.then(u=>{Mn(!0);try{qo(e,u,t)}finally{Mn(!1)}}).catch(u=>{ps(u,e,0)});e.asyncDep=l}else qo(e,l)}else Pr(e)}function qo(e,t,n){ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:xe(t)&&(e.setupState=Ga(t)),Pr(e)}function Pr(e,t,n){const s=e.type;e.render||(e.render=s.render||wt);{const o=qn(e);Tt();try{ti(e)}finally{Ot(),o()}}}const Oi={get(e,t){return Ve(e,"get",""),e[t]}};function Mi(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Oi),slots:e.slots,emit:e.emit,expose:t}}function xs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ga(Al(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in En)return En[n](e)},has(t,n){return n in t||n in En}})):e.proxy}function Ni(e,t=!0){return ae(e)?e.displayName||e.name:e.name||t&&e.__name}function ji(e){return ae(e)&&"__vccOpts"in e}const le=(e,t)=>Pl(e,t,Nn);function Dr(e,t,n){try{ns(-1);const s=arguments.length;return s===2?xe(t)&&!se(t)?On(t)?ne(e,null,[t]):ne(e,t):ne(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&On(n)&&(n=[n]),ne(e,t,n))}finally{ns(1)}}const Vi="3.5.41";/** * @vue/runtime-dom v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Gs;const Fo=typeof window<"u"&&window.trustedTypes;if(Fo)try{Gs=Fo.createPolicy("vue",{createHTML:e=>e})}catch{}const Tr=Gs?e=>Gs.createHTML(e):e=>e,Ui="http://www.w3.org/2000/svg",Li="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,Ho=St&&St.createElement("template"),qi={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"?St.createElementNS(Ui,e):t==="mathml"?St.createElementNS(Li,e):n?St.createElement(e,{is:n}):St.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>St.createTextNode(e),createComment:e=>St.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>St.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const l=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{Ho.innerHTML=Tr(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const i=Ho.content;if(s==="svg"||s==="mathml"){const u=i.firstChild;for(;u.firstChild;)i.appendChild(u.firstChild);i.removeChild(u)}t.insertBefore(i,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Fi=Symbol("_vtc");function Hi(e,t,n){const s=e[Fi];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Bo=Symbol("_vod"),Bi=Symbol("_vsh"),Wi=Symbol(""),Gi=/(?:^|;)\s*display\s*:/;function zi(e,t,n){const s=e.style,o=$e(n);let a=!1;if(n&&!o){if(t)if($e(t))for(const l of t.split(";")){const i=l.slice(0,l.indexOf(":")).trim();n[i]==null&&wn(s,i,"")}else for(const l in t)n[l]==null&&wn(s,l,"");for(const l in n){l==="display"&&(a=!0);const i=n[l];i!=null?Qi(e,l,!$e(t)&&t?t[l]:void 0,i)||wn(s,l,i):wn(s,l,"")}}else if(o){if(t!==n){const l=s[Wi];l&&(n+=";"+l),s.cssText=n,a=Gi.test(n)}}else t&&e.removeAttribute("style");Bo in e&&(e[Bo]=a?s.display:"",e[Bi]&&(s.display="none"))}const Wo=/\s*!important$/;function wn(e,t,n){if(se(n))n.forEach(s=>wn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ki(e,t);Wo.test(n)?e.setProperty(Zt(s),n.replace(Wo,""),"important"):e[s]=n}}const Go=["Webkit","Moz","ms"],Rs={};function Ki(e,t){const n=Rs[t];if(n)return n;let s=We(t);if(s!=="filter"&&s in e)return Rs[t]=s;s=is(s);for(let o=0;oPs||(tu.then(()=>Ps=0),Ps=Date.now());function su(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(se(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const l=o.slice(),i=[s];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ou=(e,t,n,s,o,a)=>{const l=o==="svg";t==="class"?Hi(e,s,l):t==="style"?zi(e,n,s):as(t)?rs(t)||Yi(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):au(e,t,s,l))?(Qo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ko(e,t,s,l,a,t!=="value")):e._isVueCE&&(ru(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!$e(s)))?Qo(e,We(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Ko(e,t,s,l))};function au(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Yo(t)&&ae(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 Yo(t)&&$e(n)?!1:t in e}function ru(e,t){const n=e._def.props;if(!n)return!1;const s=We(t);return Array.isArray(n)?n.some(o=>We(o)===s):Object.keys(n).some(o=>We(o)===s)}const Bt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return se(t)?n=>zn(t,n):t};function lu(e){e.target.composing=!0}function Zo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const tt=Symbol("_assign"),Wn=Symbol("_initialValue");function Ds(e,t,n){return t&&(e=e.trim()),n&&(e=us(e)),e}const re={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Wn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Wn]=e.defaultValue.replace(/\r\n?/g,` `))),e[tt]=Bt(o);const a=s||o.props&&o.props.type==="number";Pt(e,t?"change":"input",l=>{l.target.composing||e[tt](Ds(e.value,n,a))}),(n||a)&&Pt(e,"change",()=>{e.value=Ds(e.value,n,a)}),t||(Pt(e,"compositionstart",lu),Pt(e,"compositionend",Zo),Pt(e,"change",Zo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[Wn];delete e[Wn],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[tt](Ds(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},l){if(e[tt]=Bt(l),e.composing)return;const i=(a||e.type==="number")&&!/^0\d/.test(e.value)?us(e.value):e.value,u=t??"";if(i===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)}},st={deep:!0,created(e,t,n){e[tt]=Bt(n),Pt(e,"change",()=>{const s=e._modelValue,o=dn(e),a=e.checked,l=e[tt];if(se(s)){const i=to(s,o),u=i!==-1;if(a&&!u)l(s.concat(o));else if(!a&&u){const d=[...s];d.splice(i,1),l(d)}}else if(mn(s)){const i=new Set(s);a?i.add(o):i.delete(o),l(i)}else l(Or(e,a))})},mounted:Xo,beforeUpdate(e,t,n){e[tt]=Bt(n),Xo(e,t,n)}};function Xo(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(se(t))o=to(t,s.props.value)>-1;else if(mn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ht(t,Or(e,!0))}e.checked!==o&&(e.checked=o)}const zs={created(e,{value:t},n){e.checked=Ht(t,n.props.value),e[tt]=Bt(n),Pt(e,"change",()=>{e[tt](dn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[tt]=Bt(s),t!==n&&(e.checked=Ht(t,s.props.value))}},Nt={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Pt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?us(dn(a)):dn(a));e[tt](e.multiple?mn(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,uo(()=>{e._assigning=!1})}),e[tt]=Bt(s)},mounted(e,{value:t}){ea(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[tt]=Bt(n)},updated(e,{value:t}){e._assigning||ea(e,t)}};function ea(e,t){const n=e.multiple,s=se(t);if(!(n&&!s&&!mn(t))){for(let o=0,a=e.options.length;oString(d)===String(i)):l.selected=to(t,i)>-1}else l.selected=t.has(i);else if(Ht(dn(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function dn(e){return"_value"in e?e._value:e.value}function Or(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const iu=["ctrl","shift","alt","meta"],uu={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,...a)=>{for(let l=0;l{const t=du().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=mu(s);if(!o)return;const a=t._component;!ae(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=n(o,!1,pu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function pu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mu(e){return $e(e)?document.querySelector(e):e}const vu=["width","height"],Ne={__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(),b("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),b(Z,null,ce(t[e.nombre]||[],(o,a)=>(v(),de(Zl(o[0]),Ir({key:a},{ref_for:!0},o[1]),null,16))),128))],8,vu))}};/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */const tn=typeof document<"u";function Mr(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&&Mr(e.default)}const he=Object.assign;function Ts(e,t){const n={};for(const s in t){const o=t[s];n[s]=ft(o)?o.map(e):e(o)}return n}const In=()=>{},ft=Array.isArray;function na(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Nr=/#/g,gu=/&/g,bu=/\//g,xu=/=/g,yu=/\?/g,jr=/\+/g,_u=/%5B/g,wu=/%5D/g,Vr=/%5E/g,ku=/%60/g,Ur=/%7B/g,$u=/%7C/g,Lr=/%7D/g,Cu=/%20/g;function bo(e){return e==null?"":encodeURI(""+e).replace($u,"|").replace(_u,"[").replace(wu,"]")}function Au(e){return bo(e).replace(Ur,"{").replace(Lr,"}").replace(Vr,"^")}function Ks(e){return bo(e).replace(jr,"%2B").replace(Cu,"+").replace(Nr,"%23").replace(gu,"%26").replace(ku,"`").replace(Ur,"{").replace(Lr,"}").replace(Vr,"^")}function Su(e){return Ks(e).replace(xu,"%3D")}function Eu(e){return bo(e).replace(Nr,"%23").replace(yu,"%3F")}function Iu(e){return Eu(e).replace(bu,"%2F")}function jn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ru=/\/$/,Pu=e=>e.replace(Ru,"");function Os(e,t,n="/"){let s,o={},a="",l="";const i=t.indexOf("#");let u=t.indexOf("?");return u=i>=0&&u>i?-1:u,u>=0&&(s=t.slice(0,u),a=t.slice(u,i>0?i:t.length),o=e(a.slice(1))),i>=0&&(s=s||t.slice(0,i),l=t.slice(i,t.length)),s=Mu(s??t,n),{fullPath:s+a+l,path:s,query:o,hash:jn(l)}}function Du(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function sa(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&&fn(t.matched[s],n.matched[o])&&qr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qr(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 ft(e)?oa(e,t):ft(t)?oa(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function oa(e,t){return ft(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Mu(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 a=n.length-1,l,i;for(l=0;l1&&a--;else break;return n.slice(0,a).join("/")+"/"+s.slice(l).join("/")}const Ut={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Qs=(function(e){return e.pop="pop",e.push="push",e})({}),Ms=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Nu(e){if(!e)if(tn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Pu(e)}const ju=/^[^#]+#/;function Vu(e,t){return e.replace(ju,"#")+t}function Uu(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 ys=()=>({left:window.scrollX,top:window.scrollY});function Lu(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=Uu(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 aa(e,t){return(history.state?history.state.position-t:-1)+e}const Js=new Map;function qu(e,t){Js.set(e,t)}function Fu(e){const t=Js.get(e);return Js.delete(e),t}function Hu(e){return typeof e=="string"||e&&typeof e=="object"}function Fr(e){return typeof e=="string"||typeof e=="symbol"}let Ce=(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 Hr=Symbol("");Ce.MATCHER_NOT_FOUND+"",Ce.NAVIGATION_GUARD_REDIRECT+"",Ce.NAVIGATION_ABORTED+"",Ce.NAVIGATION_CANCELLED+"",Ce.NAVIGATION_DUPLICATED+"";function pn(e,t){return he(new Error,{type:e,[Hr]:!0},t)}function At(e,t){return e instanceof Error&&Hr in e&&(t==null||!!(e.type&t))}const Bu=["params","query","hash"];function Wu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Bu)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;so&&Ks(o)):[s&&Ks(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function zu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ft(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Ku=Symbol(""),la=Symbol(""),_s=Symbol(""),xo=Symbol(""),Ys=Symbol("");function xn(){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 qt(e,t,n,s,o,a=l=>l()){const l=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((i,u)=>{const d=f=>{f===!1?u(pn(Ce.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?u(f):Hu(f)?u(pn(Ce.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(l&&s.enterCallbacks[o]===l&&typeof f=="function"&&l.push(f),i())},c=a(()=>e.call(s&&s.instances[o],t,n,d));let p=Promise.resolve(c);e.length<3&&(p=p.then(d)),p.catch(f=>u(f))})}function Ns(e,t,n,s,o=a=>a()){const a=[];for(const l of e)for(const i in l.components){let u=l.components[i];if(!(t!=="beforeRouteEnter"&&!l.instances[i]))if(Mr(u)){const d=(u.__vccOpts||u)[t];d&&a.push(qt(d,n,s,l,i,o))}else{let d=u();a.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${i}" at "${l.path}"`);const p=hu(c)?c.default:c;l.mods[i]=c,l.components[i]=p;const f=(p.__vccOpts||p)[t];return f&&qt(f,n,s,l,i,o)()}))}}return a}function Qu(e,t){const n=[],s=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let l=0;lfn(d,i))?s.push(i):n.push(i));const u=e.matched[l];u&&(t.matched.find(d=>fn(d,u))||o.push(u))}return[n,s,o]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */let Ju=()=>location.protocol+"//"+location.host;function Br(e,t){const{pathname:n,search:s,hash:o}=t,a=e.indexOf("#");if(a>-1){let l=o.includes(e.slice(a))?e.slice(a).length:1,i=o.slice(l);return i[0]!=="/"&&(i="/"+i),sa(i,"")}return sa(n,e)+s+o}function Yu(e,t,n,s){let o=[],a=[],l=null;const i=({state:f})=>{const _=Br(e,location),k=n.value,A=t.value;let I=0;if(f){if(n.value=_,t.value=f,l&&l===k){l=null;return}I=A?f.position-A.position:0}else s(_);o.forEach(y=>{y(n.value,k,{delta:I,type:Qs.pop,direction:I?I>0?Ms.forward:Ms.back:Ms.unknown})})};function u(){l=n.value}function d(f){o.push(f);const _=()=>{const k=o.indexOf(f);k>-1&&o.splice(k,1)};return a.push(_),_}function c(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(he({},f.state,{scroll:ys()}),"")}}function p(){for(const f of a)f();a=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:u,listen:d,destroy:p}}function ia(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?ys():null}}function Zu(e){const{history:t,location:n}=window,s={value:Br(e,n)},o={value:t.state};o.value||a(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(u,d,c){const p=e.indexOf("#"),f=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+u:Ju()+e+u;try{t[c?"replaceState":"pushState"](d,"",f),o.value=d}catch(_){console.error(_),n[c?"replace":"assign"](f)}}function l(u,d){a(u,he({},t.state,ia(o.value.back,u,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=u}function i(u,d){const c=he({},o.value,t.state,{forward:u,scroll:ys()});a(c.current,c,!0),a(u,he({},ia(s.value,u,null),{position:c.position+1},d),!1),s.value=u}return{location:s,state:o,push:i,replace:l}}function Xu(e){e=Nu(e);const t=Zu(e),n=Yu(e,t.state,t.location,t.replace);function s(a,l=!0){l||n.pauseListeners(),history.go(a)}const o=he({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 Qt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Ie=(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})(Ie||{});const ec={type:Qt.Static,value:""},tc=/[a-zA-Z0-9_]/;function nc(e){if(!e)return[[]];if(e==="/")return[[ec]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(_){throw new Error(`ERR (${n})/"${d}": ${_}`)}let n=Ie.Static,s=n;const o=[];let a;function l(){a&&o.push(a),a=[]}let i=0,u,d="",c="";function p(){d&&(n===Ie.Static?a.push({type:Qt.Static,value:d}):n===Ie.Param||n===Ie.ParamRegExp||n===Ie.ParamRegExpEnd?(a.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Qt.Param,value:d,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function f(){d+=u}for(;it.length?t.length===1&&t[0]===He.Static+He.Segment?1:-1:0}function Wr(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const lc={strict:!1,end:!0,sensitive:!1};function ic(e,t,n){const s=ac(nc(e.path),n),o=he(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function uc(e,t){const n=[],s=new Map;t=na(lc,t);function o(p){return s.get(p)}function a(p,f,_){const k=!_,A=fa(p);A.aliasOf=_&&_.record;const I=na(t,p),y=[A];if("alias"in p){const x=typeof p.alias=="string"?[p.alias]:p.alias;for(const $ of x)y.push(fa(he({},A,{components:_?_.record.components:A.components,path:$,aliasOf:_?_.record:A})))}let w,g;for(const x of y){const{path:$}=x;if(f&&$[0]!=="/"){const U=f.record.path,F=U[U.length-1]==="/"?"":"/";x.path=f.record.path+($&&F+$)}if(w=ic(x,f,I),_?_.alias.push(w):(g=g||w,g!==w&&g.alias.push(w),k&&p.name&&!pa(w)&&l(p.name)),Gr(w)&&u(w),A.children){const U=A.children;for(let F=0;F{l(g)}:In}function l(p){if(Fr(p)){const f=s.get(p);f&&(s.delete(p),n.splice(n.indexOf(f),1),f.children.forEach(l),f.alias.forEach(l))}else{const f=n.indexOf(p);f>-1&&(n.splice(f,1),p.record.name&&s.delete(p.record.name),p.children.forEach(l),p.alias.forEach(l))}}function i(){return n}function u(p){const f=fc(p,n);n.splice(f,0,p),p.record.name&&!pa(p)&&s.set(p.record.name,p)}function d(p,f){let _,k={},A,I;if("name"in p&&p.name){if(_=s.get(p.name),!_)throw pn(Ce.MATCHER_NOT_FOUND,{location:p});I=_.record.name,k=he(da(f.params,_.keys.filter(g=>!g.optional).concat(_.parent?_.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),p.params&&da(p.params,_.keys.map(g=>g.name))),A=_.stringify(k)}else if(p.path!=null)A=p.path,_=n.find(g=>g.re.test(A)),_&&(k=_.parse(A),I=_.record.name);else{if(_=f.name?s.get(f.name):n.find(g=>g.re.test(f.path)),!_)throw pn(Ce.MATCHER_NOT_FOUND,{location:p,currentLocation:f});I=_.record.name,k=he({},f.params,p.params),A=_.stringify(k)}const y=[];let w=_;for(;w;)y.unshift(w.record),w=w.parent;return{name:I,path:A,params:k,matched:y,meta:dc(y)}}e.forEach(p=>a(p));function c(){n.length=0,s.clear()}return{addRoute:a,resolve:d,removeRoute:l,clearRoutes:c,getRoutes:i,getRecordMatcher:o}}function da(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function fa(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:cc(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 cc(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 pa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function dc(e){return e.reduce((t,n)=>he(t,n.meta),{})}function fc(e,t){let n=0,s=t.length;for(;n!==s;){const a=n+s>>1;Wr(e,t[a])<0?s=a:n=a+1}const o=pc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function pc(e){let t=e;for(;t=t.parent;)if(Gr(t)&&Wr(e,t)===0)return t}function Gr({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ma(e){const t=lt(_s),n=lt(xo),s=le(()=>{const u=Re(e.to);return t.resolve(u)}),o=le(()=>{const{matched:u}=s.value,{length:d}=u,c=u[d-1],p=n.matched;if(!c||!p.length)return-1;const f=p.findIndex(fn.bind(null,c));if(f>-1)return f;const _=va(u[d-2]);return d>1&&va(c)===_&&p[p.length-1].path!==_?p.findIndex(fn.bind(null,u[d-2])):f}),a=le(()=>o.value>-1&&bc(n.params,s.value.params)),l=le(()=>o.value>-1&&o.value===n.matched.length-1&&qr(n.params,s.value.params));function i(u={}){if(gc(u)){const d=t[Re(e.replace)?"replace":"push"](Re(e.to)).catch(In);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:a,isExactActive:l,navigate:i}}function mc(e){return e.length===1?e[0]:e}const vc=tr({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:ma,setup(e,{slots:t}){const n=fs(ma(e)),{options:s}=lt(_s),o=le(()=>({[ha(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ha(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&mc(t.default(n));return e.custom?a:Dr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},a)}}}),hc=vc;function gc(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 bc(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(!ft(o)||o.length!==s.length||s.some((a,l)=>a.valueOf()!==o[l].valueOf()))return!1}return!0}function va(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ha=(e,t,n)=>e??t??n,xc=tr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=lt(Ys),o=le(()=>e.route||s.value),a=lt(la,0),l=le(()=>{let d=Re(a);const{matched:c}=o.value;let p;for(;(p=c[d])&&!p.components;)d++;return d}),i=le(()=>o.value.matched[l.value]);Kn(la,le(()=>l.value+1)),Kn(Ku,i),Kn(Ys,o);const u=j();return Ge(()=>[u.value,i.value,e.name],([d,c,p],[f,_,k])=>{c&&(c.instances[p]=d,_&&_!==c&&d&&d===f&&(c.leaveGuards.size||(c.leaveGuards=_.leaveGuards),c.updateGuards.size||(c.updateGuards=_.updateGuards))),d&&c&&(!_||!fn(c,_)||!f)&&(c.enterCallbacks[p]||[]).forEach(A=>A(d))},{flush:"post"}),()=>{const d=o.value,c=e.name,p=i.value,f=p&&p.components[c];if(!f)return ga(n.default,{Component:f,route:d});const _=p.props[c],k=_?_===!0?d.params:typeof _=="function"?_(d):_:null,I=Dr(f,he({},k,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(p.instances[c]=null)},ref:u}));return ga(n.default,{Component:I,route:d})||I}}});function ga(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const yc=xc;function _c(e){const t=uc(e.routes,e),n=e.parseQuery||Gu,s=e.stringifyQuery||ra,o=e.history,a=xn(),l=xn(),i=xn(),u=Sl(Ut);let d=Ut;tn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Ts.bind(null,O=>""+O),p=Ts.bind(null,Iu),f=Ts.bind(null,jn);function _(O,G){let W,ee;return Fr(O)?(W=t.getRecordMatcher(O),ee=G):ee=O,t.addRoute(ee,W)}function k(O){const G=t.getRecordMatcher(O);G&&t.removeRoute(G)}function A(){return t.getRoutes().map(O=>O.record)}function I(O){return!!t.getRecordMatcher(O)}function y(O,G){if(G=he({},G||u.value),typeof O=="string"){const C=Os(n,O,G.path),T=t.resolve({path:C.path},G),M=o.createHref(C.fullPath);return he(C,T,{params:f(T.params),hash:jn(C.hash),redirectedFrom:void 0,href:M})}let W;if(O.path!=null)W=he({},O,{path:Os(n,O.path,G.path).path});else{const C=he({},O.params);for(const T in C)C[T]==null&&delete C[T];W=he({},O,{params:p(C)}),G.params=p(G.params)}const ee=t.resolve(W,G),ue=O.hash||"";ee.params=c(f(ee.params));const m=Du(s,he({},O,{hash:Au(ue),path:ee.path})),h=o.createHref(m);return he({fullPath:m,hash:ue,query:s===ra?zu(O.query):O.query||{}},ee,{redirectedFrom:void 0,href:h})}function w(O){return typeof O=="string"?Os(n,O,u.value.path):he({},O)}function g(O,G){if(d!==O)return pn(Ce.NAVIGATION_CANCELLED,{from:G,to:O})}function x(O){return F(O)}function $(O){return x(he(w(O),{replace:!0}))}function U(O,G){const W=O.matched[O.matched.length-1];if(W&&W.redirect){const{redirect:ee}=W;let ue=typeof ee=="function"?ee(O,G):ee;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=w(ue):{path:ue},ue.params={}),he({query:O.query,hash:O.hash,params:ue.path!=null?{}:O.params},ue)}}function F(O,G){const W=d=y(O),ee=u.value,ue=O.state,m=O.force,h=O.replace===!0,C=U(W,ee);if(C)return F(he(w(C),{state:typeof C=="object"?he({},ue,C.state):ue,force:m,replace:h}),G||W);const T=W;T.redirectedFrom=G;let M;return!m&&Tu(s,ee,W)&&(M=pn(Ce.NAVIGATION_DUPLICATED,{to:T,from:ee}),nt(ee,ee,!0,!1)),(M?Promise.resolve(M):te(T,ee)).catch(D=>At(D)?At(D,Ce.NAVIGATION_GUARD_REDIRECT)?D:Ke(D):pe(D,T,ee)).then(D=>{if(D){if(At(D,Ce.NAVIGATION_GUARD_REDIRECT))return F(he({replace:h},w(D.to),{state:typeof D.to=="object"?he({},ue,D.to.state):ue,force:m}),G||T)}else D=Pe(T,ee,!0,h,ue);return B(T,ee,D),D})}function H(O,G){const W=g(O,G);return W?Promise.reject(W):Promise.resolve()}function me(O){const G=Ze.values().next().value;return G&&typeof G.runWithContext=="function"?G.runWithContext(O):O()}function te(O,G){let W;const[ee,ue,m]=Qu(O,G);W=Ns(ee.reverse(),"beforeRouteLeave",O,G);for(const C of ee)C.leaveGuards.forEach(T=>{W.push(qt(T,O,G))});const h=H.bind(null,O,G);return W.push(h),Qe(W).then(()=>{W=[];for(const C of a.list())W.push(qt(C,O,G));return W.push(h),Qe(W)}).then(()=>{W=Ns(ue,"beforeRouteUpdate",O,G);for(const C of ue)C.updateGuards.forEach(T=>{W.push(qt(T,O,G))});return W.push(h),Qe(W)}).then(()=>{W=[];for(const C of m)if(C.beforeEnter)if(ft(C.beforeEnter))for(const T of C.beforeEnter)W.push(qt(T,O,G));else W.push(qt(C.beforeEnter,O,G));return W.push(h),Qe(W)}).then(()=>(O.matched.forEach(C=>C.enterCallbacks={}),W=Ns(m,"beforeRouteEnter",O,G,me),W.push(h),Qe(W))).then(()=>{W=[];for(const C of l.list())W.push(qt(C,O,G));return W.push(h),Qe(W)}).catch(C=>At(C,Ce.NAVIGATION_CANCELLED)?C:Promise.reject(C))}function B(O,G,W){i.list().forEach(ee=>me(()=>ee(O,G,W)))}function Pe(O,G,W,ee,ue){const m=g(O,G);if(m)return m;const h=G===Ut,C=tn?history.state:{};W&&(ee||h?o.replace(O.fullPath,he({scroll:h&&C&&C.scroll},ue)):o.push(O.fullPath,ue)),u.value=O,nt(O,G,W,h),Ke()}let J;function ze(){J||(J=o.listen((O,G,W)=>{if(!pt.listening)return;const ee=y(O),ue=U(ee,pt.currentRoute.value);if(ue){F(he(ue,{replace:!0,force:!0}),ee).catch(In);return}d=ee;const m=u.value;tn&&qu(aa(m.fullPath,W.delta),ys()),te(ee,m).catch(h=>At(h,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_CANCELLED)?h:At(h,Ce.NAVIGATION_GUARD_REDIRECT)?(F(he(w(h.to),{force:!0}),ee).then(C=>{At(C,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&!W.delta&&W.type===Qs.pop&&o.go(-1,!1)}).catch(In),Promise.reject()):(W.delta&&o.go(-W.delta,!1),pe(h,ee,m))).then(h=>{h=h||Pe(ee,m,!1),h&&(W.delta&&!At(h,Ce.NAVIGATION_CANCELLED)?o.go(-W.delta,!1):W.type===Qs.pop&&At(h,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),B(ee,m,h)}).catch(In)}))}let Vt=xn(),Se=xn(),ve;function pe(O,G,W){Ke(O);const ee=Se.list();return ee.length?ee.forEach(ue=>ue(O,G,W)):console.error(O),Promise.reject(O)}function at(){return ve&&u.value!==Ut?Promise.resolve():new Promise((O,G)=>{Vt.add([O,G])})}function Ke(O){return ve||(ve=!O,ze(),Vt.list().forEach(([G,W])=>O?W(O):G()),Vt.reset()),O}function nt(O,G,W,ee){const{scrollBehavior:ue}=e;if(!tn||!ue)return Promise.resolve();const m=!W&&Fu(aa(O.fullPath,0))||(ee||!W)&&history.state&&history.state.scroll||null;return uo().then(()=>ue(O,G,m)).then(h=>h&&Lu(h)).catch(h=>pe(h,O,G))}const De=O=>o.go(O);let $t;const Ze=new Set,pt={currentRoute:u,listening:!0,addRoute:_,removeRoute:k,clearRoutes:t.clearRoutes,hasRoute:I,getRoutes:A,resolve:y,options:e,push:x,replace:$,go:De,back:()=>De(-1),forward:()=>De(1),beforeEach:a.add,beforeResolve:l.add,afterEach:i.add,onError:Se.add,isReady:at,install(O){O.component("RouterLink",hc),O.component("RouterView",yc),O.config.globalProperties.$router=pt,Object.defineProperty(O.config.globalProperties,"$route",{enumerable:!0,get:()=>Re(u)}),tn&&!$t&&u.value===Ut&&($t=!0,x(o.location).catch(ee=>{}));const G={};for(const ee in Ut)Object.defineProperty(G,ee,{get:()=>u.value[ee],enumerable:!0});O.provide(_s,pt),O.provide(xo,Ba(G)),O.provide(Ys,u);const W=O.unmount;Ze.add(O),O.unmount=function(){Ze.delete(O),Ze.size<1&&(d=Ut,J&&J(),J=null,u.value=Ut,$t=!1,ve=!1),W()}}};function Qe(O){return O.reduce((G,W)=>G.then(()=>me(W)),Promise.resolve())}return pt}function yo(){return lt(_s)}function zr(e){return lt(xo)}const Gn=window.location.pathname.startsWith("/portal/"),Ye={esPortal:Gn,baseRuta:Gn?"/portal/studio/":"/studio/",apiBase:Gn?"/portal":"/app",urlLogin:Gn?"/portal/login":"/login"};function K(e){return Ye.apiBase+e}async function yn(e,t={}){const n=t.body instanceof FormData,s=await fetch(e,{...t,headers:n?t.headers:{"Content-Type":"application/json",...t.headers}}),o=s.headers.get("content-type")||"";if(s.redirected||!o.includes("application/json"))throw window.location.href=Ye.urlLogin,new Error("Sesión expirada");const a=await s.json();if(!s.ok){const l=typeof(a==null?void 0:a.error)=="string"?a.error:a==null?void 0:a.message;throw new Error(l||"Error de servidor")}return a}const Q={get:e=>yn(e),postForm:(e,t)=>yn(e,{method:"POST",body:t,headers:{}}),post:(e,t)=>yn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>yn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>yn(e,{method:"DELETE"})},kn=j(!1),wc={class:"h-14 px-4 flex items-center gap-2 border-b border-borde"},kc={key:0,class:"px-3 pt-3"},$c={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"},Ac={key:0,class:"px-2 text-xs text-tenue"},Sc={key:1,class:"px-2 text-xs text-tenue"},Ec={class:"truncate"},Ic={class:"flex items-center gap-1 mt-0.5"},Rc={class:"text-[11px] text-tenue"},Pc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},Dc=["onClick"],Tc=["onClick"],Oc={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Mc={class:"font-semibold text-texto mb-4"},Nc={key:0,class:"grid grid-cols-2 gap-3"},jc=["value"],Vc={class:"text-[11px] text-tenue mt-1"},Uc=["value"],Lc={class:"text-[11px] text-tenue mt-1"},qc={class:"flex items-center gap-2 text-sm text-texto"},Fc={class:"flex justify-end gap-2 pt-2"},Hc={__name:"Sidebar",setup(e,{expose:t}){const n=zr(),s=yo(),o=j([]),a=j([]),l=j([]),i=j(!0),u=j(""),d=j(!1),c=j(null),p=j(_()),f=le(()=>n.params.tenantId||n.params.id);Ge(()=>n.fullPath,()=>{kn.value=!1});function _(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function k(){i.value=!0,u.value="";try{const $=await Q.get(K("/umind/tenants"));o.value=$.items||[]}catch($){u.value=$.message}finally{i.value=!1}}function A($){return Array.isArray($)?$:($==null?void 0:$.items)||($==null?void 0:$.registros)||[]}async function I(){if(Ye.esPortal)return;const[$,U]=await Promise.allSettled([Q.get("/app/api/clientes/select"),Q.get("/app/umind-planes/list")]);a.value=$.status==="fulfilled"?A($.value):[],l.value=U.status==="fulfilled"?A(U.value):[];const F=[];$.status==="rejected"&&F.push("clientes"),U.status==="rejected"&&F.push("planes"),F.length&&(u.value=`No se pudo cargar la lista de ${F.join(" ni ")}.`)}function y(){c.value=null,p.value=_(),d.value=!0}function w($){c.value=$,p.value={nombre:$.nombre,dominios_permitidos:$.dominios_permitidos,activo:$.activo,cliente_id:$.cliente_id??null,plan_id:$.plan_id??null},d.value=!0}async function g(){const $={...p.value,dominios_permitidos:p.value.dominios_permitidos.split(",").map(U=>U.trim()).filter(Boolean)};try{if(c.value)await Q.put(K(`/umind/tenants/${c.value.ID}`),$),d.value=!1,await k();else{const U=await Q.post(K("/umind/tenants"),$);d.value=!1,await k(),s.push(`/tenants/${U.id}`)}}catch(U){u.value=U.message}}async function x($){confirm(`¿Eliminar el espacio "${$.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await Q.del(K(`/umind/tenants/${$.ID}`)),f.value===String($.ID)&&s.push("/"),await k())}return t({recargar:k}),hs(()=>{k(),I()}),($,U)=>{const F=Wt("router-link");return v(),b(Z,null,[Re(kn)?(v(),b("div",{key:0,class:"fixed inset-0 bg-black/50 z-30 md:hidden",onClick:U[0]||(U[0]=H=>kn.value=!1)})):V("",!0),r("aside",{class:ie(["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",Re(kn)?"translate-x-0":"-translate-x-full"])},[r("div",wc,[ne(F,{to:"/",class:"flex items-center gap-2 text-base font-semibold text-texto"},{default:dt(()=>[...U[8]||(U[8]=[r("svg",{viewBox:"0 0 96 96",class:"w-6 h-6 shrink-0","aria-hidden":"true"},[r("rect",{width:"96",height:"96",rx:"22",fill:"#8eb02f"}),r("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"}),r("path",{d:"M60,58 V64",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round"}),r("circle",{cx:"60",cy:"28",r:"7",fill:"#fff"})],-1),r("span",null,[Y("uMind "),r("span",{class:"text-brand"},"Studio")],-1)])]),_:1})]),Re(Ye).esPortal?V("",!0):(v(),b("div",kc,[r("button",{class:"btn-primary w-full",onClick:y}," + Nuevo espacio ")])),u.value?(v(),b("p",$c,S(u.value),1)):V("",!0),r("nav",Cc,[i.value?(v(),b("p",Ac,"Cargando...")):o.value.length===0?(v(),b("p",Sc,S(Re(Ye).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin espacios todavía."),1)):V("",!0),(v(!0),b(Z,null,ce(o.value,H=>(v(),b("div",{key:H.ID,class:ie(["group flex items-center rounded-lg transition-colors",f.value===String(H.ID)?"bg-brand/10":"hover:bg-elevado"])},[ne(F,{to:`/tenants/${H.ID}`,class:ie(["flex-1 min-w-0 px-2.5 py-2 text-sm",f.value===String(H.ID)?"text-brand font-medium":"text-texto"])},{default:dt(()=>[r("div",Ec,S(H.nombre),1),r("div",Ic,[r("span",{class:ie(["w-1.5 h-1.5 rounded-full",H.activo?"bg-green-500":"bg-tenue/40"])},null,2),r("span",Rc,S(H.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Re(Ye).esPortal?V("",!0):(v(),b("div",Pc,[r("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:me=>w(H)},[ne(Ne,{nombre:"lapiz",tam:14})],8,Dc),r("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:me=>x(H)},[ne(Ne,{nombre:"cerrar",tam:14})],8,Tc)]))],2))),128))])],2),d.value?(v(),b("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:U[7]||(U[7]=Ae(H=>d.value=!1,["self"]))},[r("div",Oc,[r("h2",Mc,S(c.value?"Editar espacio":"Nuevo espacio"),1),U[17]||(U[17]=r("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)),r("form",{class:"space-y-3",onSubmit:Ae(g,["prevent"])},[r("div",null,[U[9]||(U[9]=r("label",{class:"label"},"Nombre",-1)),z(r("input",{"onUpdate:modelValue":U[1]||(U[1]=H=>p.value.nombre=H),required:"",class:"input"},null,512),[[re,p.value.nombre]])]),r("div",null,[U[10]||(U[10]=r("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),z(r("input",{"onUpdate:modelValue":U[2]||(U[2]=H=>p.value.dominios_permitidos=H),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[re,p.value.dominios_permitidos]])]),Re(Ye).esPortal?V("",!0):(v(),b("div",Nc,[r("div",null,[U[12]||(U[12]=r("label",{class:"label"},"Cliente",-1)),z(r("select",{"onUpdate:modelValue":U[3]||(U[3]=H=>p.value.cliente_id=H),class:"input"},[U[11]||(U[11]=r("option",{value:null},"— sin asignar —",-1)),(v(!0),b(Z,null,ce(a.value,H=>(v(),b("option",{key:H.ID,value:H.ID},S(H.nombre),9,jc))),128))],512),[[Nt,p.value.cliente_id]]),r("p",Vc,S(a.value.length?"Define quién ve este espacio desde el portal.":"No hay clientes activos — creá uno en Clientes."),1)]),r("div",null,[U[14]||(U[14]=r("label",{class:"label"},"Plan",-1)),z(r("select",{"onUpdate:modelValue":U[4]||(U[4]=H=>p.value.plan_id=H),class:"input"},[U[13]||(U[13]=r("option",{value:null},"— sin plan —",-1)),(v(!0),b(Z,null,ce(l.value,H=>(v(),b("option",{key:H.ID,value:H.ID},S(H.nombre)+" ("+S(H.max_agentes===0?"∞":H.max_agentes)+" agentes) ",9,Uc))),128))],512),[[Nt,p.value.plan_id]]),r("p",Lc,S(l.value.length?"Límite de agentes y precios de consumo.":"No hay planes — creá uno en uMind Planes."),1)])])),r("label",qc,[z(r("input",{"onUpdate:modelValue":U[5]||(U[5]=H=>p.value.activo=H),type:"checkbox"},null,512),[[st,p.value.activo]]),U[15]||(U[15]=Y(" Activo ",-1))]),r("div",Fc,[r("button",{type:"button",class:"btn-ghost",onClick:U[6]||(U[6]=H=>d.value=!1)}," Cancelar "),U[16]||(U[16]=r("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):V("",!0)],64)}}},Kr="umind-tema";function Bc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const ln=j(localStorage.getItem(Kr)||Bc());function Qr(){document.documentElement.classList.toggle("dark",ln.value==="oscuro")}function ba(){ln.value=ln.value==="oscuro"?"claro":"oscuro",localStorage.setItem(Kr,ln.value),Qr()}Qr();const xa="umind_despertar_visto",ya=1250,Wc={__name:"DespertarUmind",setup(e){const t=j(null),n=j(!1);let s=null,o=null;function a(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}return hs(()=>{a()||sessionStorage.getItem(xa)||(sessionStorage.setItem(xa,"1"),n.value=!0,o=setTimeout(()=>n.value=!1,ya),requestAnimationFrame(()=>{const l=t.value;if(!l)return;const i=l.getContext("2d"),u=Math.min(window.devicePixelRatio||1,2),d=window.innerWidth,c=window.innerHeight;l.width=Math.round(d*u),l.height=Math.round(c*u),i.setTransform(u,0,0,u,0,0);const p=d<640?22:46,f=Array.from({length:p},()=>({x:Math.random()*d,y:Math.random()*c,r:1+Math.random()*1.6,demora:Math.random()*.45})),_=performance.now(),k=A=>{const I=Math.min(1,(A-_)/ya);i.clearRect(0,0,d,c);const y=I<.75?1:1-(I-.75)/.25;for(let w=0;w170||(i.strokeStyle=`rgba(142, 176, 47, ${.16*(1-me/170)*x*y})`,i.lineWidth=1,i.beginPath(),i.moveTo(g.x,g.y),i.lineTo(U.x,U.y),i.stroke())}i.beginPath(),i.arc(g.x,g.y,g.r*x,0,Math.PI*2),i.fillStyle=`rgba(142, 176, 47, ${.5*x*y})`,i.fill()}}I<1&&(s=requestAnimationFrame(k))};s=requestAnimationFrame(k)}))}),or(()=>{s&&cancelAnimationFrame(s),o&&clearTimeout(o)}),(l,i)=>n.value?(v(),b("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)):V("",!0)}},Gc={class:"min-h-screen flex"},zc={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"},Qc=["title"],Jc={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"},Yc={__name:"App",setup(e){return(t,n)=>{const s=Wt("router-view");return v(),b("div",Gc,[ne(Wc),ne(Hc),r("main",zc,[r("header",Kc,[r("button",{class:"btn-ghost !px-2 !py-1.5 md:hidden","aria-label":"Abrir menú",onClick:n[0]||(n[0]=o=>kn.value=!0)},[...n[2]||(n[2]=[r("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),n[3]||(n[3]=r("span",{class:"flex-1"},null,-1)),r("button",{class:"btn-ghost !px-2.5 !py-1.5",title:Re(ln)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[1]||(n[1]=(...o)=>Re(ba)&&Re(ba)(...o))},[ne(Ne,{nombre:Re(ln)==="oscuro"?"sol":"luna",tam:17},null,8,["nombre"])],8,Qc)]),r("div",Jc,[ne(s)])])])}}},Zc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Xc=["width","height","aria-label"],ed=["fill"],td=["stroke"],nd=["cy"],sd=["cy"],od=["cy"],ad=["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(),b("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})`},[r("circle",{cx:"60",cy:"26",r:"6",fill:e.estado==="alerta"?"#dc2626":"currentColor",class:ie(e.estado==="pensando"?"umi-late":"")},null,10,ed),r("line",{x1:"60",y1:"32",x2:"60",y2:"44",stroke:e.estado==="alerta"?"#dc2626":"currentColor","stroke-width":"4","stroke-linecap":"round"},null,8,td),n[7]||(n[7]=r("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(),b(Z,{key:0},[r("circle",{cx:"47",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,nd),r("circle",{cx:"73",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,sd),r("circle",{cx:"48",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,od),r("circle",{cx:"74",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,ad)],64)):e.estado==="durmiendo"?(v(),b("path",rd)):e.estado==="pensando"?(v(),b(Z,{key:2},[n[0]||(n[0]=r("circle",{cx:"45",cy:"66",r:"4.5",class:"umi-ojo umi-p1"},null,-1)),n[1]||(n[1]=r("circle",{cx:"60",cy:"66",r:"4.5",class:"umi-ojo umi-p2"},null,-1)),n[2]||(n[2]=r("circle",{cx:"75",cy:"66",r:"4.5",class:"umi-ojo umi-p3"},null,-1))],64)):e.estado==="buscando"?(v(),b(Z,{key:3},[n[3]||(n[3]=r("circle",{cx:"47",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[4]||(n[4]=r("circle",{cx:"73",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[5]||(n[5]=r("circle",{cx:"50",cy:"66",r:"3",class:"umi-pupila"},null,-1)),n[6]||(n[6]=r("circle",{cx:"76",cy:"66",r:"3",class:"umi-pupila"},null,-1))],64)):V("",!0),e.estado==="contenta"?(v(),b("path",ld)):V("",!0)],8,Xc))}},Vn=Zc(id,[["__scopeId","data-v-551897a0"]]),ud={key:0,class:"flex flex-col items-center justify-center py-24 text-sm text-tenue"},cd={key:1,class:"max-w-md mx-auto text-center py-20"},dd={key:2,class:"flex flex-col items-center justify-center text-center py-24"},fd={class:"text-lg font-medium text-texto"},pd={class:"text-sm text-tenue mt-1"},md={__name:"Home",setup(e){const t=yo(),n=j(Ye.esPortal),s=j(!1);async function o(){if(Ye.esPortal)try{const l=(await Q.get(K("/umind/tenants"))).items||[];if(l.length===0){s.value=!0;return}if(l.length!==1)return;const i=l[0].ID,d=(await Q.get(K(`/umind/agentes?tenant_id=${i}`))).items||[];if(d.length===1){t.replace(`/tenants/${i}/agentes/${d[0].ID}`);return}t.replace(`/tenants/${i}`)}catch{}finally{n.value=!1}}return hs(o),(a,l)=>n.value?(v(),b("div",ud," Abriendo tu asistente… ")):s.value?(v(),b("div",cd,[ne(Vn,{estado:"durmiendo",tam:80,class:"mx-auto mb-4 text-brand"}),l[0]||(l[0]=go('

Todavía no tenés un asistente activo

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.

Quiero activarlo

Volver al portal

',4))])):(v(),b("div",dd,[ne(Vn,{estado:"normal",tam:64,class:"mx-auto mb-4 text-brand"}),r("h1",fd,S(Re(Ye).esPortal?"Elegí tu espacio de la izquierda":"Elegí un espacio de la izquierda"),1),r("p",pd,S(Re(Ye).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},vd={class:"flex flex-col items-center justify-center text-center py-12 px-6"},hd={key:0,class:"text-3xl mb-3 opacity-70"},gd={class:"text-sm font-medium text-texto"},bd={key:2,class:"text-xs text-tenue mt-1.5 max-w-sm leading-relaxed"},xd={key:3,class:"mt-4"},qe={__name:"UiEmptyState",props:{estado:{type:String,default:"durmiendo"},titulo:String,detalle:String,icono:{type:String,default:""}},setup(e){return(t,n)=>(v(),b("div",vd,[e.icono?(v(),b("div",hd,S(e.icono),1)):(v(),de(Vn,{key:1,estado:e.estado,tam:64,class:"mb-3 text-brand"},null,8,["estado"])),r("p",gd,S(e.titulo),1),e.detalle?(v(),b("p",bd,S(e.detalle),1)):V("",!0),t.$slots.default?(v(),b("div",xd,[Xl(t.$slots,"default")])):V("",!0)]))}},yd={class:"flex gap-1 flex-wrap mb-6 border-b border-borde pb-2"},_d={key:0,class:"px-1.5 py-0.5 rounded-full bg-amber-500 text-white text-[10px] font-semibold leading-none"},vn={__name:"NavEspacio",props:{tenantId:{type:[String,Number],required:!0}},setup(e){const t=e,n=j(0);async function s(){try{const a=await Q.get(K(`/umind/acciones?tenant_id=${t.tenantId}`));n.value=a.pendientes||0}catch{n.value=0}}Ge(()=>t.tenantId,s,{immediate:!0});const o=[["tenant-agentes","","Agentes"],["pendientes","/pendientes","Pendientes"],["archivos","/archivos","Archivos"],["plantillas","/plantillas","Plantillas"],["uso","/uso","Consumo"],["ai-propia","/ia","Tu IA"]];return(a,l)=>{const i=Wt("router-link");return v(),b("nav",yd,[(v(),b(Z,null,ce(o,([u,d,c])=>ne(i,{key:u,to:`/tenants/${e.tenantId}${d}`,class:ie(["px-3 py-1.5 rounded-lg text-sm transition-colors inline-flex items-center gap-1.5",a.$route.name===u?"bg-brand/10 text-brand font-medium":"text-tenue hover:text-texto hover:bg-elevado"])},{default:dt(()=>[Y(S(c)+" ",1),u==="pendientes"&&n.value>0?(v(),b("span",_d,S(n.value),1)):V("",!0)]),_:2},1032,["to","class"])),64))])}}},wd={key:0,class:"mb-4"},kd={class:"flex items-start justify-between gap-4"},$d={class:"text-xl font-semibold text-texto"},Cd={class:"text-xs text-tenue mt-1"},Ad={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Sd={class:"flex items-center justify-between mb-4"},Ed={class:"flex items-center gap-2"},Id={key:0,class:"badge-alerta"},Rd={key:1,class:"badge-neutro"},Pd=["disabled"],Dd={key:2,class:"text-xs text-tenue -mt-2 mb-4"},Td={key:3,class:"text-xs text-tenue -mt-2 mb-4"},Od={key:4,class:"grid gap-3 sm:grid-cols-2"},Md=["disabled"],Nd={key:6,class:"grid gap-3 sm:grid-cols-2"},jd={class:"flex items-start gap-3"},Vd={class:"min-w-0 flex-1"},Ud={class:"flex items-center gap-2"},Ld={class:"font-medium text-texto truncate"},qd={class:"text-xs text-tenue mt-0.5 truncate"},Fd={class:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"},Hd=["onClick"],Bd=["onClick"],Wd=["onClick"],Gd={class:"flex items-center gap-4 mt-3.5 pt-3 border-t border-borde text-xs text-tenue"},zd={class:"tabular-nums"},Kd={class:"text-texto font-medium"},Qd={class:"tabular-nums"},Jd={class:"text-texto font-medium"},Yd={class:"tabular-nums"},Zd={class:"text-texto font-medium"},Xd={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"},ef={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},tf={key:0},nf={class:"grid gap-1.5"},sf=["value"],of={class:"min-w-0"},af={class:"block text-sm text-texto"},rf={class:"block text-xs text-tenue"},lf={key:0,class:"block text-xs text-tenue mt-0.5"},uf=["value"],cf={class:"flex items-center gap-2"},df={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},ff={class:"flex justify-end gap-2 pt-2"},pf={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},mf={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=le(()=>Number(t.id)),s=yo(),o=j(null),a=j([]),l=j([]),i=j(""),u=j(!1),d=j(null),c=j(w()),p=j(null),f=j({}),_=j(!0);function k(te){const B=f.value[te.ID]||{};return te.activo?B.documentos>0?{tipo:"ok",texto:"listo"}:{tipo:"alerta",texto:"sin conocimiento"}:{tipo:"neutro",texto:"inactivo"}}function A(te){const B=f.value[te.ID]||{};return{documentos:B.documentos||0,canales:B.canales||0,conversaciones:B.conversaciones_7d||0}}function I(te){return String(te||"?").trim().split(/\s+/).slice(0,2).map(B=>B[0]).join("").toUpperCase()}const y=le(()=>{if(!p.value)return{sinPlan:!0};const te=p.value.max_agentes||0;return{sinPlan:!1,nombre:p.value.nombre,ilimitado:te<=0,max:te,usados:a.value.length,lleno:te>0&&a.value.length>=te}});function w(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0,plantilla_rubro:""}}const g=j([]);async function x(){i.value="",_.value=!0;try{const[te,B,Pe,J]=await Promise.all([Q.get(K("/umind/tenants")),Q.get(K(`/umind/agentes?tenant_id=${t.id}`)),Q.get(K("/umind/ai-configs")),Q.get(K("/umind/plantillas-rubro"))]);o.value=(te.items||[]).find(ze=>String(ze.ID)===t.id)||null,a.value=B.items||[],p.value=B.plan||null,f.value=B.resumen||{},l.value=Pe.items||[],g.value=J.items||[]}catch(te){i.value=te.message}finally{_.value=!1}}async function $(te){const B=prompt(`Nombre de la copia de "${te.nombre}":`,`${te.nombre} (copia)`);if(B!==null){i.value="";try{const Pe=await Q.post(K(`/umind/agentes/${te.ID}/duplicar`),{tenant_id:Number(n.value),nombre:B.trim()});await x(),Pe.aviso&&alert(Pe.aviso)}catch(Pe){i.value=Pe.message}}}function U(){d.value=null,c.value=w(),u.value=!0}function F(te){d.value=te,c.value={nombre:te.nombre,ai_config_id:te.ai_config_id,tono:te.tono,mensaje_bienvenida:te.mensaje_bienvenida,color:te.color||"#8eb02f",activo:te.activo},u.value=!0}async function H(){try{if(d.value)await Q.put(K(`/umind/agentes/${d.value.ID}`),{tenant_id:n.value,...c.value}),u.value=!1,await x();else{const te=await Q.post(K("/umind/agentes"),{tenant_id:n.value,...c.value});u.value=!1,s.push(`/tenants/${n.value}/agentes/${te.id}`)}}catch(te){i.value=te.message}}async function me(te){confirm(`¿Eliminar el agente "${te.nombre}"? Esto no se puede deshacer.`)&&(await Q.del(K(`/umind/agentes/${te.ID}`)),await x())}return Ge(()=>t.id,x,{immediate:!0}),(te,B)=>{const Pe=Wt("router-link");return v(),b("div",null,[o.value?(v(),b("div",wd,[r("div",kd,[r("div",null,[r("h1",$d,S(o.value.nombre),1),r("p",Cd,S(o.value.dominios_permitidos||"sin dominios configurados"),1)])])])):V("",!0),ne(vn,{"tenant-id":n.value??e.id},null,8,["tenant-id"]),i.value?(v(),b("p",Ad,S(i.value),1)):V("",!0),r("div",Sd,[r("div",Ed,[B[10]||(B[10]=r("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),y.value.sinPlan?(v(),b("span",Id,"sin plan · sin límite")):y.value.ilimitado?(v(),b("span",Rd,S(y.value.nombre)+" · ilimitado",1)):(v(),b("span",{key:2,class:ie(y.value.lleno?"badge-alerta":"badge-neutro")},S(y.value.nombre)+" · "+S(y.value.usados)+" de "+S(y.value.max),3))]),r("button",{class:"btn-primary",disabled:y.value.lleno,onClick:U},"+ Nuevo agente",8,Pd)]),y.value.sinPlan&&!Re(Ye).esPortal?(v(),b("p",Dd," 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. ")):y.value.lleno?(v(),b("p",Td," Alcanzaste el máximo de agentes de tu plan. ")):V("",!0),_.value?(v(),b("div",Od,[(v(),b(Z,null,ce(2,J=>r("div",{key:J,class:"card p-4 animate-pulse"},[...B[11]||(B[11]=[go('
',2)])])),64))])):a.value.length===0?(v(),de(qe,{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:dt(()=>[r("button",{class:"btn-primary",disabled:y.value.lleno,onClick:U},"+ Crear el primer agente",8,Md)]),_:1})):(v(),b("div",Nd,[(v(!0),b(Z,null,ce(a.value,J=>(v(),de(Pe,{key:J.ID,to:`/tenants/${n.value}/agentes/${J.ID}`,class:"card p-4 relative group hover:shadow-lg hover:-translate-y-0.5 transition-all overflow-hidden"},{default:dt(()=>[r("span",{class:"absolute inset-x-0 top-0 h-1",style:Ft({background:J.color||"#8eb02f"})},null,4),r("div",jd,[r("span",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-white text-sm font-semibold shrink-0",style:Ft({background:J.color||"#8eb02f",opacity:J.activo?1:.4})},S(I(J.nombre)),5),r("div",Vd,[r("div",Ud,[r("span",Ld,S(J.nombre),1),r("span",{class:ie(`badge-${k(J).tipo}`)},S(k(J).texto),3)]),r("p",qd,S(J.tono||"sin tono definido"),1)]),r("div",Fd,[r("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:Ae(ze=>F(J),["prevent","stop"])},[ne(Ne,{nombre:"lapiz",tam:14})],8,Hd),r("button",{class:"p-1 text-tenue hover:text-texto",title:"Duplicar: copia el conocimiento y las herramientas a un agente nuevo",onClick:Ae(ze=>$(J),["prevent","stop"])},[ne(Ne,{nombre:"copiar",tam:14})],8,Bd),r("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:Ae(ze=>me(J),["prevent","stop"])},[ne(Ne,{nombre:"cerrar",tam:14})],8,Wd)])]),r("div",Gd,[r("span",zd,[r("b",Kd,S(A(J).conversaciones),1),B[12]||(B[12]=Y(" conversaciones · 7d",-1))]),r("span",Qd,[r("b",Jd,S(A(J).documentos),1),B[13]||(B[13]=Y(" fuentes",-1))]),r("span",Yd,[r("b",Zd,S(A(J).canales),1),B[14]||(B[14]=Y(" canales",-1))])])]),_:2},1032,["to"]))),128))])),u.value?(v(),b("div",{key:7,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:B[9]||(B[9]=Ae(J=>u.value=!1,["self"]))},[r("div",Xd,[r("h2",ef,S(d.value?"Editar agente":"Nuevo agente"),1),r("form",{class:"space-y-3",onSubmit:Ae(H,["prevent"])},[r("div",null,[B[15]||(B[15]=r("label",{class:"label"},"Nombre",-1)),z(r("input",{"onUpdate:modelValue":B[0]||(B[0]=J=>c.value.nombre=J),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[re,c.value.nombre]])]),!d.value&&g.value.length?(v(),b("div",tf,[B[16]||(B[16]=r("label",{class:"label"},"Arrancar con",-1)),r("div",nf,[(v(!0),b(Z,null,ce([{clave:"",nombre:"Agente en blanco",descripcion:"Sin conocimiento cargado. Lo escribís vos desde cero."},...g.value],J=>(v(),b("label",{key:J.clave,class:ie(["flex gap-2.5 p-2.5 rounded-lg border cursor-pointer transition-colors",c.value.plantilla_rubro===J.clave?"border-brand bg-brand/5":"border-borde hover:border-brand/40"])},[z(r("input",{"onUpdate:modelValue":B[1]||(B[1]=ze=>c.value.plantilla_rubro=ze),type:"radio",value:J.clave,class:"mt-1 text-brand focus:ring-brand"},null,8,sf),[[zs,c.value.plantilla_rubro]]),r("span",of,[r("span",af,S(J.nombre),1),r("span",rf,S(J.descripcion),1),J.notas?(v(),b("span",lf,S(J.notas)+" notas listas para editar · "+S(J.resumen),1)):V("",!0)])],2))),128))]),B[17]||(B[17]=r("p",{class:"text-xs text-tenue mt-1.5"}," Las notas vienen con ejemplos entre corchetes — abrilas y reemplazalas por tus datos reales. ",-1))])):V("",!0),r("div",null,[B[19]||(B[19]=r("label",{class:"label"},"Config de IA",-1)),z(r("select",{"onUpdate:modelValue":B[2]||(B[2]=J=>c.value.ai_config_id=J),class:"input"},[B[18]||(B[18]=r("option",{value:null},"— sin asignar —",-1)),(v(!0),b(Z,null,ce(l.value,J=>(v(),b("option",{key:J.ID,value:J.ID},S(J.nombre)+" ("+S(J.provider)+")",9,uf))),128))],512),[[Nt,c.value.ai_config_id]])]),r("div",null,[B[20]||(B[20]=r("label",{class:"label"},"Tono / personalidad",-1)),z(r("textarea",{"onUpdate:modelValue":B[3]||(B[3]=J=>c.value.tono=J),rows:"2",class:"input"},null,512),[[re,c.value.tono]])]),r("div",null,[B[21]||(B[21]=r("label",{class:"label"},"Mensaje de bienvenida",-1)),z(r("input",{"onUpdate:modelValue":B[4]||(B[4]=J=>c.value.mensaje_bienvenida=J),class:"input"},null,512),[[re,c.value.mensaje_bienvenida]])]),r("div",null,[B[22]||(B[22]=r("label",{class:"label"},"Color del widget",-1)),r("div",cf,[z(r("input",{"onUpdate:modelValue":B[5]||(B[5]=J=>c.value.color=J),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),[[re,c.value.color]]),z(r("input",{"onUpdate:modelValue":B[6]||(B[6]=J=>c.value.color=J),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),[[re,c.value.color]])])]),r("label",df,[z(r("input",{"onUpdate:modelValue":B[7]||(B[7]=J=>c.value.activo=J),type:"checkbox"},null,512),[[st,c.value.activo]]),B[23]||(B[23]=Y(" Activo ",-1))]),r("div",ff,[r("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:B[8]||(B[8]=J=>u.value=!1)},"Cancelar"),r("button",pf,S(d.value?"Guardar":"Crear"),1)])],32)])])):V("",!0)])}}},vf={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},hf={class:"cursor-pointer flex items-center gap-2 text-sm"},gf={class:"text-tenue text-xs shrink-0"},bf={class:"text-texto truncate"},xf={class:"text-tenue text-xs ml-auto shrink-0"},yf={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"},_f={__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(),b("div",null,[o[0]||(o[0]=r("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)),r("div",vf,[e.eventos.length===0?(v(),de(qe,{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."})):V("",!0),(v(!0),b(Z,null,ce(e.eventos,a=>(v(),b("details",{key:a.ID,class:"p-3"},[r("summary",hf,[r("span",{class:ie(["px-1.5 py-0.5 rounded text-xs shrink-0",t.value(a.nivel)])},S(a.nivel),3),r("span",gf,S(a.origen),1),r("span",bf,S(a.mensaje),1),r("span",xf,S(n(a.CreatedAt)),1)]),a.detalle?(v(),b("pre",yf,S(a.detalle),1)):V("",!0)]))),128))])]))}},wf={class:"space-y-6"},kf={key:0,class:"text-sm text-red-600 dark:text-red-400"},$f={key:1,class:"label"},Cf={class:"card divide-y divide-borde"},Af={class:"min-w-0"},Sf={class:"font-medium text-texto"},Ef={class:"text-xs text-tenue mt-0.5"},If={key:0,class:"text-xs text-tenue mt-1"},Rf=["onClick"],Pf={class:"card divide-y divide-borde"},Df={class:"min-w-0"},Tf={class:"flex items-center gap-2 flex-wrap"},Of={class:"font-medium text-texto"},Mf={key:0,class:"px-1.5 py-0.5 rounded text-xs badge-neutro"},Nf={key:1,class:"px-1.5 py-0.5 rounded text-xs bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300"},jf={class:"text-xs text-tenue mt-0.5"},Vf={key:0,class:"text-xs text-red-600 dark:text-red-400 mt-1"},Uf=["onClick"],Lf={__name:"TabAcciones",props:{agenteId:{type:Number,required:!0}},setup(e){const t=e,n=j([]),s=j([]),o=j(!0),a=j("");async function l(){o.value=!0,a.value="";try{const f=await Q.get(K(`/umind/avisos?agente_id=${t.agenteId}`));n.value=(f.items||[]).filter(_=>_.estado==="pendiente")}catch(f){a.value=f.message}try{const f=await Q.get(K(`/umind/vigilancias?agente_id=${t.agenteId}`));s.value=f.items||[]}catch{s.value=[]}o.value=!1}Ge(()=>t.agenteId,l,{immediate:!0});async function i(f){confirm(`¿Cancelar el recordatorio "${f.titulo}"?`)&&(await Q.del(K(`/umind/avisos/${f.ID}`)),await l())}async function u(f){confirm(`¿Apagar la vigilancia "${f.nombre}"?`)&&(await Q.del(K(`/umind/vigilancias/${f.ID}`)),await l())}const d={diario:"todos los días",semanal:"cada semana",mensual:"cada mes",anual:"cada año"};function c(f){return new Date(f).toLocaleString("es",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}function p(f){return!f||f.startsWith("panel:")?"te llega por correo":f.startsWith("tg:")?"te llega por Telegram":f.startsWith("mail:")?`te llega a ${f.slice(5)}`:"te llega por correo"}return(f,_)=>(v(),b("div",wf,[a.value?(v(),b("p",kf,S(a.value),1)):V("",!0),o.value?(v(),b("p",$f,"Cargando…")):(v(),b(Z,{key:2},[r("section",null,[_[0]||(_[0]=r("h3",{class:"text-sm font-medium text-texto mb-1"},"Recordatorios",-1)),_[1]||(_[1]=r("p",{class:"label mb-3"},[Y(" Pediselos hablando: "),r("em",null,"«avisame el 15 de marzo que vence la póliza de Acme, y todos los años»"),Y(". ")],-1)),r("div",Cf,[n.value.length===0?(v(),de(qe,{key:0,titulo:"Sin recordatorios",detalle:"Escribile desde tu canal privado y programá el primero. Te avisa por donde se lo pediste."})):V("",!0),(v(!0),b(Z,null,ce(n.value,k=>(v(),b("div",{key:k.ID,class:"p-4 flex items-center justify-between gap-4"},[r("div",Af,[r("span",Sf,S(k.titulo),1),r("p",Ef,[Y(S(c(k.proximo_at))+" ",1),k.repetir?(v(),b(Z,{key:0},[Y(" · se repite "+S(d[k.repetir]||k.repetir),1)],64)):V("",!0),Y(" · "+S(p(k.destino)),1)]),k.detalle?(v(),b("p",If,S(k.detalle),1)):V("",!0)]),r("button",{class:"text-sm text-red-500 hover:text-red-700 shrink-0",onClick:A=>i(k)},"Cancelar",8,Rf)]))),128))])]),r("section",null,[_[2]||(_[2]=r("h3",{class:"text-sm font-medium text-texto mb-1"},"Vigilancias",-1)),_[3]||(_[3]=r("p",{class:"label mb-3"}," Consultan una de tus herramientas cada tanto y te avisan cuando pasa algo. Solo avisan al entrar en la condición, no cada vez que la revisan. ",-1)),r("div",Pf,[s.value.length===0?(v(),de(qe,{key:0,titulo:"Sin vigilancias",detalle:"Si tenés una herramienta conectada, pedile algo como «avisame cuando esta API devuelva stock en cero»."})):V("",!0),(v(!0),b(Z,null,ce(s.value,k=>(v(),b("div",{key:k.ID,class:"p-4 flex items-center justify-between gap-4"},[r("div",Df,[r("div",Tf,[r("span",Of,S(k.nombre),1),k.activa?k.en_condicion?(v(),b("span",Nf,"se está cumpliendo")):V("",!0):(v(),b("span",Mf,"apagada"))]),r("p",jf,S(k.condicion)+" · revisa cada "+S(k.intervalo_min)+" min · usa "+S(k.herramienta),1),k.ultimo_error?(v(),b("p",Vf,S(k.ultimo_error),1)):V("",!0)]),r("button",{class:"text-sm text-red-500 hover:text-red-700 shrink-0",onClick:A=>u(k)},"Apagar",8,Uf)]))),128))])])],64))]))}},qf={class:"flex flex-wrap gap-2 mb-4"},Ff={class:"grid sm:grid-cols-2 gap-3"},Hf={key:0,class:"grid sm:grid-cols-3 gap-3"},Bf={key:1,class:"text-sm text-red-600 dark:text-red-400"},Wf={class:"flex items-center justify-between"},Gf=["disabled"],zf={class:"card divide-y divide-borde"},Kf={class:"flex items-center justify-between gap-3"},Qf={class:"min-w-0"},Jf={class:"font-medium text-texto"},Yf={class:"ml-2 text-xs text-tenue"},Zf={class:"flex items-center gap-3 shrink-0 text-sm"},Xf=["disabled","onClick"],ep=["onClick"],tp={__name:"TabConexiones",props:{agenteId:{type:Number,required:!0},conexiones:{type:Array,default:()=>[]}},emits:["recargar"],setup(e,{emit:t}){const n=e,s=t,o=j(!1),a=j(!1),l=j(""),i=j(!1),u=j({email:"",password:"",host:"",puerto:993,encriptado:"ssl"}),d=j(null),c=j({});function p(I){return{google:"Google",microsoft:"Outlook",imap:"Casilla propia"}[I]||I}function f(I){window.location.href=K(`/umind/conexiones/conectar?agente_id=${n.agenteId}&proveedor=${I}`)}async function _(){a.value=!0,l.value="";try{await Q.post(K("/umind/conexiones/imap"),{agente_id:n.agenteId,email:u.value.email,password:u.value.password,host:i.value?u.value.host:"",puerto:i.value?Number(u.value.puerto):0,encriptado:u.value.encriptado}),o.value=!1,u.value={email:"",password:"",host:"",puerto:993,encriptado:"ssl"},i.value=!1,s("recargar")}catch(I){l.value=I.message,!i.value&&/conexión|conectar|resolver/i.test(I.message)&&(i.value=!0)}finally{a.value=!1}}async function k(I){d.value=I.ID,c.value={...c.value,[I.ID]:null};try{const y=await Q.post(K(`/umind/conexiones/${I.ID}/probar`),{});c.value={...c.value,[I.ID]:{ok:!0,texto:y.message}}}catch(y){c.value={...c.value,[I.ID]:{ok:!1,texto:y.message}}}finally{d.value=null}}async function A(I){confirm(`¿Desconectar la cuenta ${I.email||I.proveedor}?`)&&(await Q.del(K(`/umind/conexiones/${I.ID}`)),s("recargar"))}return(I,y)=>(v(),b("div",null,[y[15]||(y[15]=r("p",{class:"label mb-4"},[Y(" Las casillas que el agente puede consultar cuando se lo pedís — por ejemplo: "),r("em",null,"«revisame los correos de hoy y haceme un resumen»"),Y(". Solo lectura: nunca marca nada como leído ni manda nada. Podés conectar varias. ")],-1)),r("div",qf,[r("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:y[0]||(y[0]=w=>f("google"))}," Conectar Google "),r("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:y[1]||(y[1]=w=>f("microsoft"))}," Conectar Outlook "),r("button",{class:"btn-primary",onClick:y[2]||(y[2]=w=>o.value=!o.value)}," + Casilla propia ")]),o.value?(v(),b("form",{key:0,class:"card p-4 mb-4 space-y-3",onSubmit:Ae(_,["prevent"])},[r("div",Ff,[r("div",null,[y[8]||(y[8]=r("label",{class:"label"},"Correo",-1)),z(r("input",{"onUpdate:modelValue":y[3]||(y[3]=w=>u.value.email=w),type:"email",required:"",placeholder:"ventas@tunegocio.com",class:"input"},null,512),[[re,u.value.email]])]),r("div",null,[y[9]||(y[9]=r("label",{class:"label"},"Contraseña",-1)),z(r("input",{"onUpdate:modelValue":y[4]||(y[4]=w=>u.value.password=w),type:"password",autocomplete:"new-password",required:"",class:"input"},null,512),[[re,u.value.password]])])]),i.value?(v(),b("div",Hf,[r("div",null,[y[10]||(y[10]=r("label",{class:"label"},"Servidor IMAP",-1)),z(r("input",{"onUpdate:modelValue":y[5]||(y[5]=w=>u.value.host=w),placeholder:"mail.tunegocio.com",class:"input font-mono"},null,512),[[re,u.value.host]])]),r("div",null,[y[11]||(y[11]=r("label",{class:"label"},"Puerto",-1)),z(r("input",{"onUpdate:modelValue":y[6]||(y[6]=w=>u.value.puerto=w),type:"number",class:"input"},null,512),[[re,u.value.puerto]])]),r("div",null,[y[13]||(y[13]=r("label",{class:"label"},"Encriptación",-1)),z(r("select",{"onUpdate:modelValue":y[7]||(y[7]=w=>u.value.encriptado=w),class:"input"},[...y[12]||(y[12]=[r("option",{value:"ssl"},"SSL (993)",-1),r("option",{value:"starttls"},"STARTTLS (143)",-1)])],512),[[Nt,u.value.encriptado]])])])):V("",!0),l.value?(v(),b("p",Bf,S(l.value),1)):V("",!0),r("div",Wf,[y[14]||(y[14]=r("p",{class:"text-xs text-tenue"}," Se prueba la conexión antes de guardar. Gmail y Outlook van por sus botones de arriba. ",-1)),r("button",{type:"submit",class:"btn-primary",disabled:a.value},S(a.value?"Probando…":"Conectar"),9,Gf)])],32)):V("",!0),r("div",zf,[e.conexiones.length===0?(v(),de(qe,{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."})):V("",!0),(v(!0),b(Z,null,ce(e.conexiones,w=>(v(),b("div",{key:w.ID,class:"p-4"},[r("div",Kf,[r("div",Qf,[r("span",Jf,S(w.email),1),r("span",Yf,S(p(w.proveedor)),1),r("span",{class:ie(["ml-2 px-1.5 py-0.5 rounded text-xs",w.activo?"badge-ok":"badge-neutro"])},S(w.activo?"activa":"inactiva"),3),c.value[w.ID]?(v(),b("p",{key:0,class:ie(["text-xs mt-1",c.value[w.ID].ok?"text-brand":"text-red-600 dark:text-red-400"])},S(c.value[w.ID].texto),3)):V("",!0)]),r("div",Zf,[w.proveedor==="imap"?(v(),b("button",{key:0,class:"text-brand hover:underline disabled:opacity-40",disabled:d.value===w.ID,onClick:g=>k(w)},S(d.value===w.ID?"Probando…":"Probar"),9,Xf)):V("",!0),r("button",{class:"text-red-500 hover:text-red-700",onClick:g=>A(w)},"Desconectar",8,ep)])])]))),128))])]))}},np={class:"card p-4 flex flex-col h-[28rem]"},sp={class:"flex-1 overflow-y-auto space-y-2 mb-3"},op={key:0,class:"text-sm text-tenue"},ap={key:1,class:"flex items-center gap-2"},rp=["disabled"],_a={__name:"TabChat",props:{agenteId:{type:Number,required:!0}},setup(e){const t=e,n=`staff-preview-${Math.random().toString(36).slice(2)}`,s=j([]),o=j(""),a=j(!1);async function l(){const i=o.value.trim();if(!(!i||a.value)){o.value="",s.value.push({role:"user",content:i}),a.value=!0;try{const u=await Q.post(K("/umind/chat"),{agente_id:t.agenteId,session_id:n,mensaje:i});s.value.push({role:"assistant",content:u.respuesta})}catch(u){s.value.push({role:"assistant",content:`⚠ ${u.message}`})}finally{a.value=!1}}}return(i,u)=>(v(),b("div",np,[r("div",sp,[s.value.length===0?(v(),b("p",op," 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. ")):V("",!0),(v(!0),b(Z,null,ce(s.value,(d,c)=>(v(),b("div",{key:c,class:ie(["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"])},S(d.content),3))),128)),a.value?(v(),b("div",ap,[ne(Vn,{estado:"pensando",tam:30,class:"text-brand"}),u[1]||(u[1]=r("span",{class:"text-xs text-tenue"},"Pensando…",-1))])):V("",!0)]),r("form",{class:"flex gap-2",onSubmit:Ae(l,["prevent"])},[z(r("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 input"},null,512),[[re,o.value]]),r("button",{type:"submit",disabled:a.value,class:"btn-primary disabled:opacity-50 transition-colors"}," Enviar ",8,rp)],32)]))}},lp={class:"grid lg:grid-cols-[minmax(16rem,22rem)_1fr] gap-4 items-start"},ip={class:"card divide-y divide-borde max-h-[30rem] overflow-y-auto"},up=["onClick"],cp={class:"text-sm text-texto line-clamp-2"},dp={class:"flex items-center gap-2 mt-1.5 text-xs text-tenue"},fp={class:"tabular-nums"},pp={class:"ml-auto tabular-nums"},mp={key:2,class:"flex items-center gap-2 p-3 text-xs text-tenue cursor-pointer select-none"},vp={class:"card p-4 max-h-[30rem] overflow-y-auto"},hp={key:1,class:"text-sm text-tenue"},gp={key:2,class:"space-y-2"},bp={__name:"TabConversaciones",props:{agenteId:{type:Number,required:!0},sesiones:{type:Array,default:()=>[]}},setup(e){const t=e,n=j([]),s=j(null),o=j(!1);function a(f){const _=String(f||"");return _.startsWith("wa:")?{nombre:"WhatsApp",icono:"mensaje",clase:"badge-ok"}:_.startsWith("tg:")?{nombre:"Telegram",icono:"mensaje",clase:"badge-neutro"}:_.startsWith("staff-preview")?{nombre:"Prueba",icono:"escribir",clase:"badge-alerta"}:{nombre:"Tu web",icono:"sitio",clase:"badge-neutro"}}const l=j(!1),i=le(()=>t.sesiones.filter(f=>!String(f.session_id).startsWith("staff-preview"))),u=le(()=>t.sesiones.filter(f=>String(f.session_id).startsWith("staff-preview"))),d=le(()=>l.value?t.sesiones:i.value);function c(f){if(!f)return"";const _=new Date(f),A=Math.floor((new Date().setHours(0,0,0,0)-new Date(_).setHours(0,0,0,0))/864e5),I=new Date(f).toLocaleTimeString("es",{hour:"2-digit",minute:"2-digit"});return A<=0?`hoy ${I}`:A===1?`ayer ${I}`:A<7?`hace ${A} días`:new Date(f).toLocaleDateString("es",{day:"numeric",month:"short"})}async function p(f){s.value=f,o.value=!0;try{const _=await Q.get(K(`/umind/historial?agente_id=${t.agenteId}&session_id=${f}`));n.value=_.items||[]}finally{o.value=!1}}return(f,_)=>(v(),b("div",lp,[r("div",ip,[d.value.length===0&&u.value.length===0?(v(),de(qe,{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(),de(qe,{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"])):V("",!0),(v(!0),b(Z,null,ce(d.value,k=>(v(),b("button",{key:k.session_id,class:ie(["w-full text-left p-3 hover:bg-elevado transition-colors",s.value===k.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:A=>p(k.session_id)},[r("div",cp,S(k.primer_mensaje||"(sin mensaje)"),1),r("div",dp,[r("span",{class:ie(["px-1.5 py-0.5 rounded",a(k.session_id).clase])},S(a(k.session_id).nombre),3),r("span",fp,S(k.mensajes)+" msj",1),r("span",pp,S(c(k.ultimo)),1)])],10,up))),128)),u.value.length?(v(),b("label",mp,[z(r("input",{"onUpdate:modelValue":_[0]||(_[0]=k=>l.value=k),type:"checkbox",class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[st,l.value]]),Y(" "+S(u.value.length===1?"Mostrar mi prueba":`Mostrar mis ${u.value.length} pruebas`),1)])):V("",!0)]),r("div",vp,[s.value?o.value?(v(),b("p",hp,"Cargando…")):(v(),b("div",gp,[(v(!0),b(Z,null,ce(n.value,k=>(v(),b("div",{key:k.ID,class:ie(k.role==="user"?"text-right":"")},[r("div",{class:ie(["inline-block max-w-[80%] px-3 py-2 rounded-lg text-sm text-left whitespace-pre-wrap",k.role==="user"?"bg-brand text-white":"bg-elevado text-texto"])},S(k.content),3),r("div",{class:ie(["text-[10px] text-tenue mt-0.5 tabular-nums",k.role==="user"?"pr-1":"pl-1"])},S(c(k.CreatedAt)),3)],2))),128))])):(v(),de(qe,{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»."}))])]))}},xp={class:"card divide-y divide-borde"},yp={class:"text-sm text-texto font-mono"},_p={class:"label mt-0.5"},wp={class:"text-xs text-tenue mt-0.5"},kp={key:0,class:"ml-1 text-green-600 dark:text-green-400"},$p={key:1,class:"ml-1 text-gray-400"},Cp={class:"flex gap-3 text-sm shrink-0"},Ap=["onClick"],Sp=["onClick"],Ep={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},Ip={class:"font-semibold text-texto mb-4"},Rp={class:"border border-borde rounded-lg p-3 space-y-2"},Pp=["onUpdate:modelValue"],Dp=["onUpdate:modelValue"],Tp=["onUpdate:modelValue"],Op={class:"label flex items-center gap-1"},Mp=["onUpdate:modelValue"],Np=["onClick"],jp={key:0,class:"text-xs text-gray-400"},Vp={class:"border border-borde rounded-lg p-3 space-y-2"},Up={class:"flex items-center gap-2 label"},Lp={class:"flex items-center gap-2 text-sm text-texto"},qp={class:"flex justify-end gap-2 pt-2"},Fp={__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=j(!1),a=j(null),l=j(i());function i(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}function u(){a.value=null,l.value=i(),o.value=!0}function d(k){a.value=k;let A=[];try{A=JSON.parse(k.parametros_json||"[]")||[]}catch{A=[]}l.value={nombre:k.nombre,descripcion:k.descripcion,url:k.url,auth_header_nombre:k.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:A,activa:k.activa},o.value=!0}function c(){l.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function p(k){l.value.parametros.splice(k,1)}async function f(){const k={agente_id:n.agenteId,nombre:l.value.nombre.trim(),descripcion:l.value.descripcion,url:l.value.url.trim(),auth_header_nombre:l.value.auth_header_nombre,parametros:l.value.parametros,activa:l.value.activa};l.value.tocarAuth&&(k.auth_header_valor=l.value.auth_header_valor);try{a.value?await Q.put(K(`/umind/tools/${a.value.ID}`),k):await Q.post(K("/umind/tools"),k),o.value=!1,s("recargar")}catch(A){s("error",A.message)}}async function _(k){confirm(`¿Eliminar la herramienta "${k.nombre}"?`)&&(await Q.del(K(`/umind/tools/${k.ID}`)),s("recargar"))}return(k,A)=>(v(),b("div",null,[r("div",{class:"flex justify-between items-center mb-4"},[A[9]||(A[9]=r("p",{class:"label"},"Máximo 10 herramientas activas por agente.",-1)),r("button",{class:"btn-primary",onClick:u}," + Nueva herramienta ")]),r("div",xp,[e.tools.length===0?(v(),de(qe,{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."})):V("",!0),(v(!0),b(Z,null,ce(e.tools,I=>(v(),b("div",{key:I.ID,class:"p-4 flex items-center justify-between"},[r("div",null,[r("div",yp,S(I.nombre),1),r("div",_p,S(I.descripcion),1),r("div",wp,[Y(S(I.url)+" ",1),I.auth_configurado?(v(),b("span",kp,"· auth configurada")):V("",!0),I.activa?V("",!0):(v(),b("span",$p,"· inactiva"))])]),r("div",Cp,[r("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:y=>d(I)},"Editar",8,Ap),r("button",{class:"text-red-500 hover:text-red-700",onClick:y=>_(I)},"Eliminar",8,Sp)])]))),128))]),o.value?(v(),b("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:A[8]||(A[8]=Ae(I=>o.value=!1,["self"]))},[r("div",Ep,[r("h2",Ip,S(a.value?"Editar herramienta":"Nueva herramienta"),1),r("form",{class:"space-y-3",onSubmit:Ae(f,["prevent"])},[r("div",null,[A[10]||(A[10]=r("label",{class:"label"},"Nombre (identificador, ej: consultar_stock)",-1)),z(r("input",{"onUpdate:modelValue":A[0]||(A[0]=I=>l.value.nombre=I),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"input font-mono"},null,512),[[re,l.value.nombre]])]),r("div",null,[A[11]||(A[11]=r("label",{class:"label"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),z(r("textarea",{"onUpdate:modelValue":A[1]||(A[1]=I=>l.value.descripcion=I),rows:"2",required:"",class:"input"},null,512),[[re,l.value.descripcion]])]),r("div",null,[A[12]||(A[12]=r("label",{class:"label"},"URL del webhook (https)",-1)),z(r("input",{"onUpdate:modelValue":A[2]||(A[2]=I=>l.value.url=I),type:"url",required:"",placeholder:"https://...",class:"input"},null,512),[[re,l.value.url]])]),r("div",Rp,[r("div",{class:"flex items-center justify-between"},[A[13]||(A[13]=r("label",{class:"label"},"Parámetros que completa el modelo",-1)),r("button",{type:"button",class:"text-xs text-brand",onClick:c},"+ agregar")]),(v(!0),b(Z,null,ce(l.value.parametros,(I,y)=>(v(),b("div",{key:y,class:"flex gap-2 items-center"},[z(r("input",{"onUpdate:modelValue":w=>I.nombre=w,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,Pp),[[re,I.nombre]]),z(r("select",{"onUpdate:modelValue":w=>I.tipo=w,class:"border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},[...A[14]||(A[14]=[r("option",{value:"string"},"string",-1),r("option",{value:"number"},"number",-1),r("option",{value:"boolean"},"boolean",-1)])],8,Dp),[[Nt,I.tipo]]),z(r("input",{"onUpdate:modelValue":w=>I.descripcion=w,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,Tp),[[re,I.descripcion]]),r("label",Op,[z(r("input",{"onUpdate:modelValue":w=>I.requerido=w,type:"checkbox"},null,8,Mp),[[st,I.requerido]]),A[15]||(A[15]=Y(" req. ",-1))]),r("button",{type:"button",class:"text-red-400 text-xs",onClick:w=>p(y)},[ne(Ne,{nombre:"cerrar",tam:13})],8,Np)]))),128)),l.value.parametros.length===0?(v(),b("p",jp,"Sin parámetros.")):V("",!0)]),r("div",Vp,[A[16]||(A[16]=r("label",{class:"label"},"Autenticación saliente (opcional)",-1)),z(r("input",{"onUpdate:modelValue":A[3]||(A[3]=I=>l.value.auth_header_nombre=I),placeholder:"Nombre del header, ej: Authorization",class:"input"},null,512),[[re,l.value.auth_header_nombre]]),r("label",Up,[z(r("input",{"onUpdate:modelValue":A[4]||(A[4]=I=>l.value.tocarAuth=I),type:"checkbox"},null,512),[[st,l.value.tocarAuth]]),Y(" "+S(a.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),l.value.tocarAuth?z((v(),b("input",{key:0,"onUpdate:modelValue":A[5]||(A[5]=I=>l.value.auth_header_valor=I),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"input"},null,512)),[[re,l.value.auth_header_valor]]):V("",!0)]),r("label",Lp,[z(r("input",{"onUpdate:modelValue":A[6]||(A[6]=I=>l.value.activa=I),type:"checkbox"},null,512),[[st,l.value.activa]]),A[17]||(A[17]=Y(" Activa ",-1))]),r("div",qp,[r("button",{type:"button",class:"btn-ghost",onClick:A[7]||(A[7]=I=>o.value=!1)},"Cancelar"),A[18]||(A[18]=r("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):V("",!0)]))}},Hp={class:"card p-4 mb-4"},Bp={class:"flex items-center justify-between mb-2"},Wp={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},Gp={class:"card divide-y divide-borde"},zp={class:"flex items-center justify-between"},Kp={class:"font-medium text-texto capitalize"},Qp={key:0,class:"ml-2 px-1.5 py-0.5 rounded text-xs badge-neutro"},Jp={class:"flex gap-3 text-sm"},Yp=["onClick"],Zp=["onClick"],Xp={class:"flex gap-4 mt-2 text-xs"},em={class:"flex items-center gap-1.5 text-texto cursor-pointer"},tm=["checked","onChange"],nm={class:"flex items-center gap-1.5 text-texto cursor-pointer"},sm=["checked","onChange"],om={class:"flex items-center gap-1.5 text-texto cursor-pointer"},am=["checked","onChange"],rm={key:0,class:"label mt-1"},lm={key:1,class:"label mt-1 break-all"},im={class:"bg-elevado px-1 rounded"},um={key:2,class:"text-xs text-tenue mt-1"},cm={key:3,class:"text-xs text-red-600 dark:text-red-400 mt-1"},dm={class:"card p-6 w-full max-w-md"},fm={key:0},pm={class:"grid sm:grid-cols-2 gap-3"},mm={class:"flex flex-col gap-1.5 mt-1"},vm={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},hm={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},gm={class:"text-xs text-tenue"},bm={class:"grid sm:grid-cols-2 gap-3 mt-2"},xm={class:"rounded-lg border border-borde p-3 mt-1"},ym={class:"flex items-start gap-2 text-sm text-texto cursor-pointer"},_m={class:"flex flex-col gap-2 pt-1"},wm={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},km={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},$m={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Cm={class:"flex justify-end gap-2 pt-2"},Am={__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=j(!1),a=j(d()),l=j(!1),i=le(()=>{const w=n.siteKey||"TU_SITE_KEY";return`