const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-7cW1Ke0y.js","assets/index-Ks60kpK3.js","assets/index-Ca1BUA6G.js","assets/index-Bn5gnDlc.js","assets/Login-Ban2uodF.js","assets/auth-dJxUj9Nn.js","assets/Login-BH4ngh9v.css","assets/Bind-DbZwylol.js","assets/Bind-Dnw4b3CT.css","assets/index-p_Y1ee2a.css","assets/WeworkOnly-DlOPARYF.js","assets/WeworkOnly-TGfgboZe.css","assets/AutomationProgress-_PB2TTYZ.js","assets/AutomationProgress-sYREh-Yt.css","assets/VideoIntro-DEkPtX2w.js","assets/VideoIntro-Cvkd5Jd7.css"])))=>i.map(i=>d[i]); (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 i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** * @vue/shared v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Za(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const je={},ps=[],ln=()=>{},Kc=()=>!1,hi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),mi=e=>e.startsWith("onUpdate:"),ut=Object.assign,er=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},tp=Object.prototype.hasOwnProperty,Me=(e,t)=>tp.call(e,t),be=Array.isArray,hs=e=>go(e)==="[object Map]",Gc=e=>go(e)==="[object Set]",zr=e=>go(e)==="[object Date]",ke=e=>typeof e=="function",Ue=e=>typeof e=="string",zt=e=>typeof e=="symbol",Fe=e=>e!==null&&typeof e=="object",Jc=e=>(Fe(e)||ke(e))&&ke(e.then)&&ke(e.catch),Xc=Object.prototype.toString,go=e=>Xc.call(e),np=e=>go(e).slice(8,-1),Yc=e=>go(e)==="[object Object]",_i=e=>Ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ks=Za(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},sp=/-\w/g,At=gi(e=>e.replace(sp,t=>t.slice(1).toUpperCase())),op=/\B([A-Z])/g,xn=gi(e=>e.replace(op,"-$1").toLowerCase()),vi=gi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vi=gi(e=>e?`on${vi(e)}`:""),on=(e,t)=>!Object.is(e,t),ji=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ip=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Zc=e=>{const t=Ue(e)?Number(e):NaN;return isNaN(t)?e:t};let Hr;const yi=()=>Hr||(Hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function jt(e){if(be(e)){const t={};for(let n=0;n{if(n){const s=n.split(rp);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function up(e){if(!e)return"";if(Ue(e))return e;let t="";for(const n in e){const s=e[n];if(Ue(s)||typeof s=="number"){const o=n.startsWith("--")?n:xn(n);t+=`${o}:${s};`}}return t}function ge(e){let t="";if(Ue(e))t=e;else if(be(e))for(let n=0;n!!(e&&e.__v_isRef===!0),M=e=>Ue(e)?e:e==null?"":be(e)||Fe(e)&&(e.toString===Xc||!ke(e.toString))?tu(e)?M(e.value):JSON.stringify(e,nu,2):String(e),nu=(e,t)=>tu(t)?nu(e,t.value):hs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],i)=>(n[Ui(s,i)+" =>"]=o,n),{})}:Gc(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ui(n))}:zt(t)?Ui(t):Fe(t)&&!be(t)&&!Yc(t)?String(t):t,Ui=(e,t="")=>{var n;return zt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let ct;class su{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&&ct&&(ct.active?(this.parent=ct,this.index=(ct.scopes||(ct.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)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(ct===this)ct=this.prevScope;else{let t=ct;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(Js){let t=Js;for(Js=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Gs;){let t=Gs;for(Gs=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 cu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function uu(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),ir(s),hp(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function _a(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(du(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function du(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===oo)||(e.globalVersion=oo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_a(e))))return;e.flags|=2;const t=e.dep,n=ze,s=Xt;ze=e,Xt=!0;try{cu(e);const o=e.fn(e._value);(t.version===0||on(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ze=n,Xt=s,uu(e),e.flags&=-3}}function ir(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 i=n.computed.deps;i;i=i.nextDep)ir(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function hp(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Xt=!0;const fu=[];function En(){fu.push(Xt),Xt=!1}function Sn(){const e=fu.pop();Xt=e===void 0?!0:e}function Wr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ze;ze=void 0;try{t()}finally{ze=n}}}let oo=0;class mp{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 ar{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(!ze||!Xt||ze===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ze)n=this.activeLink=new mp(ze,this),ze.deps?(n.prevDep=ze.depsTail,ze.depsTail.nextDep=n,ze.depsTail=n):ze.deps=ze.depsTail=n,pu(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=ze.depsTail,n.nextDep=void 0,ze.depsTail.nextDep=n,ze.depsTail=n,ze.deps===n&&(ze.deps=s)}return n}trigger(t){this.version++,oo++,this.notify(t)}notify(t){sr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{or()}}}function pu(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)pu(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const oi=new WeakMap,Jn=Symbol(""),ga=Symbol(""),io=Symbol("");function yt(e,t,n){if(Xt&&ze){let s=oi.get(e);s||oi.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ar),o.map=s,o.key=n),o.track()}}function mn(e,t,n,s,o,i){const a=oi.get(e);if(!a){oo++;return}const r=l=>{l&&l.trigger()};if(sr(),t==="clear")a.forEach(r);else{const l=be(e),d=l&&_i(n);if(l&&n==="length"){const c=Number(s);a.forEach((u,f)=>{(f==="length"||f===io||!zt(f)&&f>=c)&&r(u)})}else switch((n!==void 0||a.has(void 0))&&r(a.get(n)),d&&r(a.get(io)),t){case"add":l?d&&r(a.get("length")):(r(a.get(Jn)),hs(e)&&r(a.get(ga)));break;case"delete":l||(r(a.get(Jn)),hs(e)&&r(a.get(ga)));break;case"set":hs(e)&&r(a.get(Jn));break}}or()}function _p(e,t){const n=oi.get(e);return n&&n.get(t)}function ss(e){const t=$e(e);return t===e?t:(yt(t,"iterate",io),Bt(e)?t:t.map(Yt))}function bi(e){return yt(e=$e(e),"iterate",io),e}function sn(e,t){return Cn(e)?vs(vn(e)?Yt(t):t):Yt(t)}const gp={__proto__:null,[Symbol.iterator](){return Hi(this,Symbol.iterator,e=>sn(this,e))},concat(...e){return ss(this).concat(...e.map(t=>be(t)?ss(t):t))},entries(){return Hi(this,"entries",e=>(e[1]=sn(this,e[1]),e))},every(e,t){return un(this,"every",e,t,void 0,arguments)},filter(e,t){return un(this,"filter",e,t,n=>n.map(s=>sn(this,s)),arguments)},find(e,t){return un(this,"find",e,t,n=>sn(this,n),arguments)},findIndex(e,t){return un(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return un(this,"findLast",e,t,n=>sn(this,n),arguments)},findLastIndex(e,t){return un(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return un(this,"forEach",e,t,void 0,arguments)},includes(...e){return Wi(this,"includes",e)},indexOf(...e){return Wi(this,"indexOf",e)},join(e){return ss(this).join(e)},lastIndexOf(...e){return Wi(this,"lastIndexOf",e)},map(e,t){return un(this,"map",e,t,void 0,arguments)},pop(){return Is(this,"pop")},push(...e){return Is(this,"push",e)},reduce(e,...t){return Kr(this,"reduce",e,t)},reduceRight(e,...t){return Kr(this,"reduceRight",e,t)},shift(){return Is(this,"shift")},some(e,t){return un(this,"some",e,t,void 0,arguments)},splice(...e){return Is(this,"splice",e)},toReversed(){return ss(this).toReversed()},toSorted(e){return ss(this).toSorted(e)},toSpliced(...e){return ss(this).toSpliced(...e)},unshift(...e){return Is(this,"unshift",e)},values(){return Hi(this,"values",e=>sn(this,e))}};function Hi(e,t,n){const s=bi(e),o=s[t]();return s!==e&&!Bt(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=n(i.value)),i}),o}const vp=Array.prototype;function un(e,t,n,s,o,i){const a=bi(e),r=a!==e&&!Bt(e),l=a[t];if(l!==vp[t]){const u=l.apply(e,i);return r?Yt(u):u}let d=n;a!==e&&(r?d=function(u,f){return n.call(this,sn(e,u),f,e)}:n.length>2&&(d=function(u,f){return n.call(this,u,f,e)}));const c=l.call(a,d,s);return r&&o?o(c):c}function Kr(e,t,n,s){const o=bi(e),i=o!==e&&!Bt(e);let a=n,r=!1;o!==e&&(i?(r=s.length===0,a=function(d,c,u){return r&&(r=!1,d=sn(e,d)),n.call(this,d,sn(e,c),u,e)}):n.length>3&&(a=function(d,c,u){return n.call(this,d,c,u,e)}));const l=o[t](a,...s);return r?sn(e,l):l}function Wi(e,t,n){const s=$e(e);yt(s,"iterate",io);const o=s[t](...n);return(o===-1||o===!1)&&Si(n[0])?(n[0]=$e(n[0]),s[t](...n)):o}function Is(e,t,n=[]){En(),sr();const s=$e(e)[t].apply(e,n);return or(),Sn(),s}const yp=Za("__proto__,__v_isRef,__isVue"),hu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(zt));function bp(e){zt(e)||(e=String(e));const t=$e(this);return yt(t,"has",e),t.hasOwnProperty(e)}class mu{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,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(o?i?wu:bu:i?yu:vu).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=be(t);if(!o){let l;if(a&&(l=gp[n]))return l;if(n==="hasOwnProperty")return bp}const r=Reflect.get(t,n,Xe(t)?t:s);if((zt(n)?hu.has(n):yp(n))||(o||yt(t,"get",n),i))return r;if(Xe(r)){const l=a&&_i(n)?r:r.value;return o&&Fe(l)?ya(l):l}return Fe(r)?o?ya(r):_t(r):r}}class _u extends mu{constructor(t=!1){super(!1,t)}set(t,n,s,o){let i=t[n];const a=be(t)&&_i(n);if(!this._isShallow){const d=Cn(i);if(!Bt(s)&&!Cn(s)&&(i=$e(i),s=$e(s)),!a&&Xe(i)&&!Xe(s))return d||(i.value=s),!0}const r=a?Number(n)e,No=e=>Reflect.getPrototypeOf(e);function xp(e,t,n){return function(...s){const o=this.__v_raw,i=$e(o),a=hs(i),r=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,d=o[e](...s),c=n?va:t?vs:Yt;return!t&&yt(i,"iterate",l?ga:Jn),ut(Object.create(d),{next(){const{value:u,done:f}=d.next();return f?{value:u,done:f}:{value:r?[c(u[0]),c(u[1])]:c(u),done:f}}})}}function Mo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function kp(e,t){const n={get(o){const i=this.__v_raw,a=$e(i),r=$e(o);e||(on(o,r)&&yt(a,"get",o),yt(a,"get",r));const{has:l}=No(a),d=t?va:e?vs:Yt;if(l.call(a,o))return d(i.get(o));if(l.call(a,r))return d(i.get(r));i!==a&&i.get(o)},get size(){const o=this.__v_raw;return!e&&yt($e(o),"iterate",Jn),o.size},has(o){const i=this.__v_raw,a=$e(i),r=$e(o);return e||(on(o,r)&&yt(a,"has",o),yt(a,"has",r)),o===r?i.has(o):i.has(o)||i.has(r)},forEach(o,i){const a=this,r=a.__v_raw,l=$e(r),d=t?va:e?vs:Yt;return!e&&yt(l,"iterate",Jn),r.forEach((c,u)=>o.call(i,d(c),d(u),a))}};return ut(n,e?{add:Mo("add"),set:Mo("set"),delete:Mo("delete"),clear:Mo("clear")}:{add(o){const i=$e(this),a=No(i),r=$e(o),l=!t&&!Bt(o)&&!Cn(o)?r:o;return a.has.call(i,l)||on(o,l)&&a.has.call(i,o)||on(r,l)&&a.has.call(i,r)||(i.add(l),mn(i,"add",l,l)),this},set(o,i){!t&&!Bt(i)&&!Cn(i)&&(i=$e(i));const a=$e(this),{has:r,get:l}=No(a);let d=r.call(a,o);d||(o=$e(o),d=r.call(a,o));const c=l.call(a,o);return a.set(o,i),d?on(i,c)&&mn(a,"set",o,i):mn(a,"add",o,i),this},delete(o){const i=$e(this),{has:a,get:r}=No(i);let l=a.call(i,o);l||(o=$e(o),l=a.call(i,o)),r&&r.call(i,o);const d=i.delete(o);return l&&mn(i,"delete",o,void 0),d},clear(){const o=$e(this),i=o.size!==0,a=o.clear();return i&&mn(o,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=xp(o,e,t)}),n}function wi(e,t){const n=kp(e,t);return(s,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(Me(n,o)&&o in s?n:s,o,i)}const Ap={get:wi(!1,!1)},Tp={get:wi(!1,!0)},Rp={get:wi(!0,!1)},Ip={get:wi(!0,!0)},vu=new WeakMap,yu=new WeakMap,bu=new WeakMap,wu=new WeakMap;function Op(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function _t(e){return Cn(e)?e:Ei(e,!1,wp,Ap,vu)}function Eu(e){return Ei(e,!1,Sp,Tp,yu)}function ya(e){return Ei(e,!0,Ep,Rp,bu)}function Xo(e){return Ei(e,!0,Cp,Ip,wu)}function Ei(e,t,n,s,o){if(!Fe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const a=Op(np(e));if(a===0)return e;const r=new Proxy(e,a===2?s:n);return o.set(e,r),r}function vn(e){return Cn(e)?vn(e.__v_raw):!!(e&&e.__v_isReactive)}function Cn(e){return!!(e&&e.__v_isReadonly)}function Bt(e){return!!(e&&e.__v_isShallow)}function Si(e){return e?!!e.__v_raw:!1}function $e(e){const t=e&&e.__v_raw;return t?$e(t):e}function rr(e){return!Me(e,"__v_skip")&&Object.isExtensible(e)&&Qc(e,"__v_skip",!0),e}const Yt=e=>Fe(e)?_t(e):e,vs=e=>Fe(e)?ya(e):e;function Xe(e){return e?e.__v_isRef===!0:!1}function q(e){return Su(e,!1)}function Dn(e){return Su(e,!0)}function Su(e,t){return Xe(e)?e:new $p(e,t)}class $p{constructor(t,n){this.dep=new ar,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:$e(t),this._value=n?t:Yt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Bt(t)||Cn(t);t=s?t:$e(t),on(t,n)&&(this._rawValue=t,this._value=s?t:Yt(t),this.dep.trigger())}}function Re(e){return Xe(e)?e.value:e}function ms(e){return ke(e)?e():Re(e)}const Pp={get:(e,t,n)=>t==="__v_raw"?e:Re(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Xe(o)&&!Xe(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Cu(e){return vn(e)?e:new Proxy(e,Pp)}function Bp(e){const t=be(e)?new Array(e.length):{};for(const n in e)t[n]=Lp(e,n);return t}class Dp{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=zt(n)?n:String(n),this._raw=$e(t);let o=!0,i=t;if(!be(t)||zt(this._key)||!_i(this._key))do o=!Si(i)||Bt(i);while(o&&(i=i.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=Re(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Xe(this._raw[this._key])){const n=this._object[this._key];if(Xe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return _p(this._raw,this._key)}}function Lp(e,t,n){return new Dp(e,t,n)}class Np{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ar(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=oo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ze!==this)return lu(this,!0),!0}get value(){const t=this.dep.track();return du(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Mp(e,t,n=!1){let s,o;return ke(e)?s=e:(s=e.get,o=e.set),new Np(s,o,n)}const Fo={},ii=new WeakMap;let zn;function Fp(e,t=!1,n=zn){if(n){let s=ii.get(n);s||ii.set(n,s=[]),s.push(e)}}function qp(e,t,n=je){const{immediate:s,deep:o,once:i,scheduler:a,augmentJob:r,call:l}=n,d=x=>o?x:Bt(x)||o===!1||o===0?_n(x,1):_n(x);let c,u,f,p,_=!1,g=!1;if(Xe(e)?(u=()=>e.value,_=Bt(e)):vn(e)?(u=()=>d(e),_=!0):be(e)?(g=!0,_=e.some(x=>vn(x)||Bt(x)),u=()=>e.map(x=>{if(Xe(x))return x.value;if(vn(x))return d(x);if(ke(x))return l?l(x,2):x()})):ke(e)?t?u=l?()=>l(e,2):e:u=()=>{if(f){En();try{f()}finally{Sn()}}const x=zn;zn=c;try{return l?l(e,3,[p]):e(p)}finally{zn=x}}:u=ln,t&&o){const x=u,b=o===!0?1/0:o;u=()=>_n(x(),b)}const m=nr(),v=()=>{c.stop(),m&&m.active&&er(m.effects,c)};if(i&&t){const x=t;t=(...b)=>{x(...b),v()}}let S=g?new Array(e.length).fill(Fo):Fo;const R=x=>{if(!(!(c.flags&1)||!c.dirty&&!x))if(t){const b=c.run();if(o||_||(g?b.some(($,B)=>on($,S[B])):on(b,S))){f&&f();const $=zn;zn=c;try{const B=[b,S===Fo?void 0:g&&S[0]===Fo?[]:S,p];S=b,l?l(t,3,B):t(...B)}finally{zn=$}}}else c.run()};return r&&r(R),c=new au(u),c.scheduler=a?()=>a(R,!1):R,p=x=>Fp(x,!1,c),f=c.onStop=()=>{const x=ii.get(c);if(x){if(l)l(x,4);else for(const b of x)b();ii.delete(c)}},t?s?R(!0):S=c.run():a?a(R.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function _n(e,t=1/0,n){if(t<=0||!Fe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Xe(e))_n(e.value,t,n);else if(be(e))for(let s=0;s{_n(s,t,n)});else if(Yc(e)){for(const s in e)_n(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&_n(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function vo(e,t,n,s){try{return s?e(...s):e()}catch(o){yo(o,t,n)}}function Ht(e,t,n,s){if(ke(e)){const o=vo(e,t,n,s);return o&&Jc(o)&&o.catch(i=>{yo(i,t,n)}),o}if(be(e)){const o=[];for(let i=0;i>>1,o=xt[s],i=ao(o);i=ao(n)?xt.push(e):xt.splice(jp(t),0,e),e.flags|=1,ku()}}function ku(){ai||(ai=xu.then(Tu))}function ba(e){be(e)?_s.push(...e):Pn&&e.id===-1?Pn.splice(us+1,0,e):e.flags&1||(_s.push(e),e.flags|=1),ku()}function Gr(e,t,n=nn+1){for(;nao(n)-ao(s));if(_s.length=0,Pn){Pn.push(...t);return}for(Pn=t,us=0;use.id==null?e.flags&2?-1:1/0:e.id;function Tu(e){try{for(nn=0;nn{s._d&&ui(-1);const i=ri(t);let a;try{a=e(...o)}finally{ri(i),s._d&&ui(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function yn(e,t){if(Pt===null)return e;const n=Ti(Pt),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&ke(t)?t.call(s&&s.proxy):t}}function Up(){return!!(Wt()||Xn)}const zp=Symbol.for("v-scx"),Hp=()=>mt(zp);function Iu(e,t){return cr(e,null,t)}function Ae(e,t,n){return cr(e,t,n)}function cr(e,t,n=je){const{immediate:s,deep:o,flush:i,once:a}=n,r=ut({},n),l=t&&s||!t&&i!=="post";let d;if(co){if(i==="sync"){const p=Hp();d=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=ln,p.resume=ln,p.pause=ln,p}}const c=bt;r.call=(p,_,g)=>Ht(p,c,_,g);let u=!1;i==="post"?r.scheduler=p=>{vt(p,c&&c.suspense)}:i!=="sync"&&(u=!0,r.scheduler=(p,_)=>{_?p():lr(p)}),r.augmentJob=p=>{t&&(p.flags|=4),u&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=qp(e,t,r);return co&&(d?d.push(f):l&&f()),f}function Wp(e,t,n){const s=this.proxy,o=Ue(e)?e.includes(".")?Ou(s,e):()=>s[e]:e.bind(s,s);let i;ke(t)?i=t:(i=t.handler,n=t);const a=bo(this),r=cr(o,i.bind(s),n);return a(),r}function Ou(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Hn=e=>e&&(e.disabled||e.disabled===""),Kp=e=>e&&(e.defer||e.defer===""),Jr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Xr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,wa=(e,t)=>{const n=e&&e.to;return Ue(n)?t?t(n):null:n},Gp={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,i,a,r,l,d){const{mc:c,pc:u,pbc:f,o:{insert:p,querySelector:_,createText:g,createComment:m,parentNode:v}}=d,S=Hn(t.props);let{dynamicChildren:R}=t;const x=(B,G,D)=>{B.shapeFlag&16&&c(B.children,G,D,o,i,a,r,l)},b=(B=t)=>{const G=Hn(B.props),D=B.target=wa(B.props,_),X=Ea(D,B,g,p);D&&(a!=="svg"&&Jr(D)?a="svg":a!=="mathml"&&Xr(D)&&(a="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(D),G||(x(B,D,X),Us(B,!1)))},$=B=>{const G=()=>{if(On.get(B)===G){if(On.delete(B),Hn(B.props)){const D=v(B.el)||n;x(B,D,B.anchor),Us(B,!0)}b(B)}};On.set(B,G),vt(G,i)};if(e==null){const B=t.el=g(""),G=t.anchor=g("");if(p(B,n,s),p(G,n,s),Kp(t.props)||i&&i.pendingBranch){$(t);return}S&&(x(t,n,G),Us(t,!0)),b()}else{t.el=e.el;const B=t.anchor=e.anchor,G=On.get(e);if(G){G.flags|=8,On.delete(e),$(t);return}t.targetStart=e.targetStart;const D=t.target=e.target,X=t.targetAnchor=e.targetAnchor,V=Hn(e.props),O=V?n:D,Z=V?B:X;if(a==="svg"||Jr(D)?a="svg":(a==="mathml"||Xr(D))&&(a="mathml"),R?(f(e.dynamicChildren,R,O,o,i,a,r),mr(e,t,!0)):l||u(e,t,O,Z,o,i,a,r,!1),S)V?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):qo(t,n,B,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const W=t.target=wa(t.props,_);W&&qo(t,W,null,d,0)}else V&&qo(t,D,X,d,1);Us(t,S)}},remove(e,t,n,{um:s,o:{remove:o}},i){const{shapeFlag:a,children:r,anchor:l,targetStart:d,targetAnchor:c,target:u,props:f}=e,p=i||!Hn(f),_=On.get(e);if(_&&(_.flags|=8,On.delete(e)),u&&(o(d),o(c)),i&&o(l),!_&&a&16)for(let g=0;g{e.isMounted=!0}),xs(()=>{e.isUnmounting=!0}),e}const Mt=[Function,Array],Du={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Mt,onEnter:Mt,onAfterEnter:Mt,onEnterCancelled:Mt,onBeforeLeave:Mt,onLeave:Mt,onAfterLeave:Mt,onLeaveCancelled:Mt,onBeforeAppear:Mt,onAppear:Mt,onAfterAppear:Mt,onAppearCancelled:Mt},Lu=e=>{const t=e.subTree;return t.component?Lu(t.component):t},Yp={name:"BaseTransition",props:Du,setup(e,{slots:t}){const n=Wt(),s=Xp();return()=>{const o=t.default&&Fu(t.default(),!0),i=o&&o.length?Nu(o):n.subTree?ae():void 0;if(!i)return;const a=$e(e),{mode:r}=a;if(s.isLeaving)return Ki(i);const l=Yr(i);if(!l)return Ki(i);let d=Sa(l,a,s,n,u=>d=u);l.type!==pt&&ro(l,d);let c=n.subTree&&Yr(n.subTree);if(c&&c.type!==pt&&!an(c,l)&&Lu(n).type!==pt){let u=Sa(c,a,s,n);if(ro(c,u),r==="out-in"&&l.type!==pt)return s.isLeaving=!0,u.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete u.afterLeave,c=void 0},Ki(i);r==="in-out"&&l.type!==pt?u.delayLeave=(f,p,_)=>{const g=Mu(s,c);g[String(c.key)]=c,f[Vt]=()=>{p(),f[Vt]=void 0,delete d.delayedLeave,c=void 0},d.delayedLeave=()=>{_(),delete d.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function Nu(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==pt){t=n;break}}return t}const Qp=Yp;function Mu(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Sa(e,t,n,s,o){const{appear:i,mode:a,persisted:r=!1,onBeforeEnter:l,onEnter:d,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:_,onLeaveCancelled:g,onBeforeAppear:m,onAppear:v,onAfterAppear:S,onAppearCancelled:R}=t,x=String(e.key),b=Mu(n,e),$=(D,X)=>{D&&Ht(D,s,9,X)},B=(D,X)=>{const V=X[1];$(D,X),be(D)?D.every(O=>O.length<=1)&&V():D.length<=1&&V()},G={mode:a,persisted:r,beforeEnter(D){let X=l;if(!n.isMounted)if(i)X=m||l;else return;D[Vt]&&D[Vt](!0);const V=b[x];V&&an(e,V)&&V.el[Vt]&&V.el[Vt](),$(X,[D])},enter(D){if(b[x]===e)return;let X=d,V=c,O=u;if(!n.isMounted)if(i)X=v||d,V=S||c,O=R||u;else return;let Z=!1;D[Os]=oe=>{Z||(Z=!0,oe?$(O,[D]):$(V,[D]),G.delayedLeave&&G.delayedLeave(),D[Os]=void 0)};const W=D[Os].bind(null,!1);X?B(X,[D,W]):W()},leave(D,X){const V=String(e.key);if(D[Os]&&D[Os](!0),n.isUnmounting)return X();$(f,[D]);let O=!1;D[Vt]=W=>{O||(O=!0,X(),W?$(g,[D]):$(_,[D]),D[Vt]=void 0,b[V]===e&&delete b[V])};const Z=D[Vt].bind(null,!1);b[V]=e,p?B(p,[D,Z]):Z()},clone(D){const X=Sa(D,t,n,s,o);return o&&o(X),X}};return G}function Ki(e){if(Ci(e))return e=Ln(e),e.children=null,e}function Yr(e){if(!Ci(e))return Pu(e.type)&&e.children?Nu(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&&ke(n.default))return n.default()}}function ro(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ro(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Fu(e,t=!1,n){let s=[],o=0;for(let i=0;i1)for(let i=0;iXs(g,t&&(be(t)?t[m]:t),n,s,o));return}if(Ys(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Xs(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Ti(s.component):s.el,a=o?null:i,{i:r,r:l}=e,d=t&&t.r,c=r.refs===je?r.refs={}:r.refs,u=r.setupState,f=$e(u),p=u===je?Kc:g=>Qr(c,g)?!1:Me(f,g),_=(g,m)=>!(m&&Qr(c,m));if(d!=null&&d!==l){if(Zr(t),Ue(d))c[d]=null,p(d)&&(u[d]=null);else if(Xe(d)){const g=t;_(d,g.k)&&(d.value=null),g.k&&(c[g.k]=null)}}if(ke(l))vo(l,r,12,[a,c]);else{const g=Ue(l),m=Xe(l);if(g||m){const v=()=>{if(e.f){const S=g?p(l)?u[l]:c[l]:_()||!e.k?l.value:c[e.k];if(o)be(S)&&er(S,i);else if(be(S))S.includes(i)||S.push(i);else if(g)c[l]=[i],p(l)&&(u[l]=c[l]);else{const R=[i];_(l,e.k)&&(l.value=R),e.k&&(c[e.k]=R)}}else g?(c[l]=a,p(l)&&(u[l]=a)):m&&(_(l,e.k)&&(l.value=a),e.k&&(c[e.k]=a))};if(a){const S=()=>{v(),li.delete(e)};S.id=-1,li.set(e,S),vt(S,n)}else Zr(e),v()}}}function Zr(e){const t=li.get(e);t&&(t.flags|=8,li.delete(e))}yi().requestIdleCallback;yi().cancelIdleCallback;const Ys=e=>!!e.type.__asyncLoader,Ci=e=>e.type.__isKeepAlive;function Cs(e,t){Vu(e,"a",t)}function ts(e,t){Vu(e,"da",t)}function Vu(e,t,n=bt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(xi(t,s,n),n){let o=n.parent;for(;o&&o.parent;)Ci(o.parent.vnode)&&Zp(s,t,n,o),o=o.parent}}function Zp(e,t,n,s){const o=xi(t,e,s,!0);Nn(()=>{er(s[t],o)},n)}function xi(e,t,n=bt,s=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{En();const r=bo(n),l=Ht(t,n,e,a);return r(),Sn(),l});return s?o.unshift(i):o.push(i),i}}const kn=e=>(t,n=bt)=>{(!co||e==="sp")&&xi(e,(...s)=>t(...s),n)},eh=kn("bm"),ot=kn("m"),ju=kn("bu"),th=kn("u"),xs=kn("bum"),Nn=kn("um"),nh=kn("sp"),sh=kn("rtg"),oh=kn("rtc");function ih(e,t=bt){xi("ec",e,t)}const ur="components",ah="directives";function rh(e,t){return dr(ur,e,!0,t)||e}const Uu=Symbol.for("v-ndc");function lh(e){return Ue(e)?dr(ur,e,!1)||e:e||Uu}function iT(e){return dr(ah,e)}function dr(e,t,n=!0,s=!1){const o=Pt||bt;if(o){const i=o.type;if(e===ur){const r=Qh(i,!1);if(r&&(r===t||r===At(t)||r===vi(At(t))))return i}const a=el(o[e]||i[e],t)||el(o.appContext[e],t);return!a&&s?i:a}}function el(e,t){return e&&(e[t]||e[At(t)]||e[vi(At(t))])}function Ge(e,t,n,s){let o;const i=n,a=be(e);if(a||Ue(e)){const r=a&&vn(e);let l=!1,d=!1;r&&(l=!Bt(e),d=Cn(e),e=bi(e)),o=new Array(e.length);for(let c=0,u=e.length;ct(r,l,void 0,i));else{const r=Object.keys(e);o=new Array(r.length);for(let l=0,d=r.length;le?ud(e)?Ti(e):Ca(e.parent):null,Qs=ut(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=>Ca(e.parent),$root:e=>Ca(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Hu(e),$forceUpdate:e=>e.f||(e.f=()=>{lr(e.update)}),$nextTick:e=>e.n||(e.n=tt.bind(e.proxy)),$watch:e=>Wp.bind(e)}),Gi=(e,t)=>e!==je&&!e.__isScriptSetup&&Me(e,t),ch={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:i,accessCache:a,type:r,appContext:l}=e;if(t[0]!=="$"){const f=a[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 i[t]}else{if(Gi(s,t))return a[t]=1,s[t];if(o!==je&&Me(o,t))return a[t]=2,o[t];if(Me(i,t))return a[t]=3,i[t];if(n!==je&&Me(n,t))return a[t]=4,n[t];xa&&(a[t]=0)}}const d=Qs[t];let c,u;if(d)return t==="$attrs"&&yt(e.attrs,"get",""),d(e);if((c=r.__cssModules)&&(c=c[t]))return c;if(n!==je&&Me(n,t))return a[t]=4,n[t];if(u=l.config.globalProperties,Me(u,t))return u[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:i}=e;return Gi(o,t)?(o[t]=n,!0):s!==je&&Me(s,t)?(s[t]=n,!0):Me(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:i,type:a}},r){let l;return!!(n[r]||e!==je&&r[0]!=="$"&&Me(e,r)||Gi(t,r)||Me(i,r)||Me(s,r)||Me(Qs,r)||Me(o.config.globalProperties,r)||(l=a.__cssModules)&&l[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Me(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function tl(e){return be(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let xa=!0;function uh(e){const t=Hu(e),n=e.proxy,s=e.ctx;xa=!1,t.beforeCreate&&nl(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:a,watch:r,provide:l,inject:d,created:c,beforeMount:u,mounted:f,beforeUpdate:p,updated:_,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:S,destroyed:R,unmounted:x,render:b,renderTracked:$,renderTriggered:B,errorCaptured:G,serverPrefetch:D,expose:X,inheritAttrs:V,components:O,directives:Z,filters:W}=t;if(d&&dh(d,s,null),a)for(const ee in a){const re=a[ee];ke(re)&&(s[ee]=re.bind(n))}if(o){const ee=o.call(n,n);Fe(ee)&&(e.data=_t(ee))}if(xa=!0,i)for(const ee in i){const re=i[ee],Ee=ke(re)?re.bind(n,n):ke(re.get)?re.get.bind(n,n):ln,Se=!ke(re)&&ke(re.set)?re.set.bind(n):ln,ne=F({get:Ee,set:Se});Object.defineProperty(s,ee,{enumerable:!0,configurable:!0,get:()=>ne.value,set:he=>ne.value=he})}if(r)for(const ee in r)zu(r[ee],s,n,ee);if(l){const ee=ke(l)?l.call(n):l;Reflect.ownKeys(ee).forEach(re=>{cn(re,ee[re])})}c&&nl(c,e,"c");function de(ee,re){be(re)?re.forEach(Ee=>ee(Ee.bind(n))):re&&ee(re.bind(n))}if(de(eh,u),de(ot,f),de(ju,p),de(th,_),de(Cs,g),de(ts,m),de(ih,G),de(oh,$),de(sh,B),de(xs,S),de(Nn,x),de(nh,D),be(X))if(X.length){const ee=e.exposed||(e.exposed={});X.forEach(re=>{Object.defineProperty(ee,re,{get:()=>n[re],set:Ee=>n[re]=Ee,enumerable:!0})})}else e.exposed||(e.exposed={});b&&e.render===ln&&(e.render=b),V!=null&&(e.inheritAttrs=V),O&&(e.components=O),Z&&(e.directives=Z),D&&qu(e)}function dh(e,t,n=ln){be(e)&&(e=ka(e));for(const s in e){const o=e[s];let i;Fe(o)?"default"in o?i=mt(o.from||s,o.default,!0):i=mt(o.from||s):i=mt(o),Xe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[s]=i}}function nl(e,t,n){Ht(be(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function zu(e,t,n,s){let o=s.includes(".")?Ou(n,s):()=>n[s];if(Ue(e)){const i=t[e];ke(i)&&Ae(o,i)}else if(ke(e))Ae(o,e.bind(n));else if(Fe(e))if(be(e))e.forEach(i=>zu(i,t,n,s));else{const i=ke(e.handler)?e.handler.bind(n):t[e.handler];ke(i)&&Ae(o,i,e)}}function Hu(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,r=i.get(t);let l;return r?l=r:!o.length&&!n&&!s?l=t:(l={},o.length&&o.forEach(d=>ci(l,d,a,!0)),ci(l,t,a)),Fe(t)&&i.set(t,l),l}function ci(e,t,n,s=!1){const{mixins:o,extends:i}=t;i&&ci(e,i,n,!0),o&&o.forEach(a=>ci(e,a,n,!0));for(const a in t)if(!(s&&a==="expose")){const r=fh[a]||n&&n[a];e[a]=r?r(e[a],t[a]):t[a]}return e}const fh={data:sl,props:ol,emits:ol,methods:zs,computed:zs,beforeCreate:St,created:St,beforeMount:St,mounted:St,beforeUpdate:St,updated:St,beforeDestroy:St,beforeUnmount:St,destroyed:St,unmounted:St,activated:St,deactivated:St,errorCaptured:St,serverPrefetch:St,components:zs,directives:zs,watch:hh,provide:sl,inject:ph};function sl(e,t){return t?e?function(){return ut(ke(e)?e.call(this,this):e,ke(t)?t.call(this,this):t)}:t:e}function ph(e,t){return zs(ka(e),ka(t))}function ka(e){if(be(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${At(t)}Modifiers`]||e[`${xn(t)}Modifiers`];function vh(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||je;let o=n;const i=t.startsWith("update:"),a=i&&gh(s,t.slice(7));a&&(a.trim&&(o=n.map(c=>Ue(c)?c.trim():c)),a.number&&(o=n.map(ip)));let r,l=s[r=Vi(t)]||s[r=Vi(At(t))];!l&&i&&(l=s[r=Vi(xn(t))]),l&&Ht(l,e,6,o);const d=s[r+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Ht(d,e,6,o)}}const yh=new WeakMap;function Ku(e,t,n=!1){const s=n?yh:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const i=e.emits;let a={},r=!1;if(!ke(e)){const l=d=>{const c=Ku(d,t,!0);c&&(r=!0,ut(a,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!r?(Fe(e)&&s.set(e,null),null):(be(i)?i.forEach(l=>a[l]=null):ut(a,i),Fe(e)&&s.set(e,a),a)}function ki(e,t){return!e||!hi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Me(e,t[0].toLowerCase()+t.slice(1))||Me(e,xn(t))||Me(e,t))}function il(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[i],slots:a,attrs:r,emit:l,render:d,renderCache:c,props:u,data:f,setupState:p,ctx:_,inheritAttrs:g}=e,m=ri(e);let v,S;try{if(n.shapeFlag&4){const x=o||s,b=x;v=Gt(d.call(b,x,c,u,p,f,_)),S=r}else{const x=t;v=Gt(x.length>1?x(u,{attrs:r,slots:a,emit:l}):x(u,null)),S=t.props?r:wh(r)}}catch(x){Zs.length=0,yo(x,e,1),v=C(pt)}let R=v;if(S&&g!==!1){const x=Object.keys(S),{shapeFlag:b}=R;x.length&&b&7&&(i&&x.some(mi)&&(S=Eh(S,i)),R=Ln(R,S,!1,!0))}return n.dirs&&(R=Ln(R,null,!1,!0),R.dirs=R.dirs?R.dirs.concat(n.dirs):n.dirs),n.transition&&ro(R,n.transition),v=R,ri(m),v}function bh(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||hi(n))&&((t||(t={}))[n]=e[n]);return t},Eh=(e,t)=>{const n={};for(const s in e)(!mi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Sh(e,t,n){const{props:s,children:o,component:i}=e,{props:a,children:r,patchFlag:l}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?al(s,a,d):!!a;if(l&8){const c=t.dynamicProps;for(let u=0;uObject.create(Ju),Yu=e=>Object.getPrototypeOf(e)===Ju;function Ch(e,t,n,s=!1){const o={},i=Xu();e.propsDefaults=Object.create(null),Qu(e,t,o,i);for(const a in e.propsOptions[0])a in o||(o[a]=void 0);n?e.props=s?o:Eu(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function xh(e,t,n,s){const{props:o,attrs:i,vnode:{patchFlag:a}}=e,r=$e(o),[l]=e.propsOptions;let d=!1;if((s||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let u=0;u{l=!0;const[f,p]=Zu(u,t,!0);ut(a,f),p&&r.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Fe(e)&&s.set(e,ps),ps;if(be(i))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",hr=e=>be(e)?e.map(Gt):[Gt(e)],Ah=(e,t,n)=>{if(t._n)return t;const s=et((...o)=>hr(t(...o)),n);return s._c=!1,s},ed=(e,t,n)=>{const s=e._ctx;for(const o in e){if(pr(o))continue;const i=e[o];if(ke(i))t[o]=Ah(o,i,s);else if(i!=null){const a=hr(i);t[o]=()=>a}}},td=(e,t)=>{const n=hr(t);e.slots.default=()=>n},nd=(e,t,n)=>{for(const s in t)(n||!pr(s))&&(e[s]=t[s])},Th=(e,t,n)=>{const s=e.slots=Xu();if(e.vnode.shapeFlag&32){const o=t._;o?(nd(s,t,n),n&&Qc(s,"_",o,!0)):ed(t,s)}else t&&td(e,t)},Rh=(e,t,n)=>{const{vnode:s,slots:o}=e;let i=!0,a=je;if(s.shapeFlag&32){const r=t._;r?n&&r===1?i=!1:nd(o,t,n):(i=!t.$stable,ed(t,o)),a=t}else t&&(td(e,t),a={default:1});if(i)for(const r in o)!pr(r)&&a[r]==null&&delete o[r]},vt=qh;function Ih(e){return Oh(e)}function Oh(e,t){const n=yi();n.__VUE__=!0;const{insert:s,remove:o,patchProp:i,createElement:a,createText:r,createComment:l,setText:d,setElementText:c,parentNode:u,nextSibling:f,setScopeId:p=ln,insertStaticContent:_}=e,g=(y,w,A,j=null,J=null,K=null,ie=void 0,se=null,te=!!w.dynamicChildren)=>{if(y===w)return;y&&!an(y,w)&&(j=E(y),he(y,J,K,!0),y=null),w.patchFlag===-2&&(te=!1,w.dynamicChildren=null);const{type:Q,ref:ve,shapeFlag:le}=w;switch(Q){case Ai:m(y,w,A,j);break;case pt:v(y,w,A,j);break;case Yo:y==null&&S(w,A,j,ie);break;case ye:O(y,w,A,j,J,K,ie,se,te);break;default:le&1?b(y,w,A,j,J,K,ie,se,te):le&6?Z(y,w,A,j,J,K,ie,se,te):(le&64||le&128)&&Q.process(y,w,A,j,J,K,ie,se,te,L)}ve!=null&&J?Xs(ve,y&&y.ref,K,w||y,!w):ve==null&&y&&y.ref!=null&&Xs(y.ref,null,K,y,!0)},m=(y,w,A,j)=>{if(y==null)s(w.el=r(w.children),A,j);else{const J=w.el=y.el;w.children!==y.children&&d(J,w.children)}},v=(y,w,A,j)=>{y==null?s(w.el=l(w.children||""),A,j):w.el=y.el},S=(y,w,A,j)=>{[y.el,y.anchor]=_(y.children,w,A,j,y.el,y.anchor)},R=({el:y,anchor:w},A,j)=>{let J;for(;y&&y!==w;)J=f(y),s(y,A,j),y=J;s(w,A,j)},x=({el:y,anchor:w})=>{let A;for(;y&&y!==w;)A=f(y),o(y),y=A;o(w)},b=(y,w,A,j,J,K,ie,se,te)=>{if(w.type==="svg"?ie="svg":w.type==="math"&&(ie="mathml"),y==null)$(w,A,j,J,K,ie,se,te);else{const Q=y.el&&y.el._isVueCE?y.el:null;try{Q&&Q._beginPatch(),D(y,w,J,K,ie,se,te)}finally{Q&&Q._endPatch()}}},$=(y,w,A,j,J,K,ie,se)=>{let te,Q;const{props:ve,shapeFlag:le,transition:me,dirs:Ce}=y;if(te=y.el=a(y.type,K,ve&&ve.is,ve),le&8?c(te,y.children):le&16&&G(y.children,te,null,j,J,Ji(y,K),ie,se),Ce&&Fn(y,null,j,"created"),B(te,y,y.scopeId,ie,j),ve){for(const Ve in ve)Ve!=="value"&&!Ks(Ve)&&i(te,Ve,null,ve[Ve],K,j);"value"in ve&&i(te,"value",null,ve.value,K),(Q=ve.onVnodeBeforeMount)&&tn(Q,j,y)}Ce&&Fn(y,null,j,"beforeMount");const Ie=$h(J,me);Ie&&me.beforeEnter(te),s(te,w,A),((Q=ve&&ve.onVnodeMounted)||Ie||Ce)&&vt(()=>{try{Q&&tn(Q,j,y),Ie&&me.enter(te),Ce&&Fn(y,null,j,"mounted")}finally{}},J)},B=(y,w,A,j,J)=>{if(A&&p(y,A),j)for(let K=0;K{for(let Q=te;Q{const se=w.el=y.el;let{patchFlag:te,dynamicChildren:Q,dirs:ve}=w;te|=y.patchFlag&16;const le=y.props||je,me=w.props||je;let Ce;if(A&&qn(A,!1),(Ce=me.onVnodeBeforeUpdate)&&tn(Ce,A,w,y),ve&&Fn(w,y,A,"beforeUpdate"),A&&qn(A,!0),(le.innerHTML&&me.innerHTML==null||le.textContent&&me.textContent==null)&&c(se,""),Q?X(y.dynamicChildren,Q,se,A,j,Ji(w,J),K):ie||re(y,w,se,null,A,j,Ji(w,J),K,!1),te>0){if(te&16)V(se,le,me,A,J);else if(te&2&&le.class!==me.class&&i(se,"class",null,me.class,J),te&4&&i(se,"style",le.style,me.style,J),te&8){const Ie=w.dynamicProps;for(let Ve=0;Ve{Ce&&tn(Ce,A,w,y),ve&&Fn(w,y,A,"updated")},j)},X=(y,w,A,j,J,K,ie)=>{for(let se=0;se{if(w!==A){if(w!==je)for(const K in w)!Ks(K)&&!(K in A)&&i(y,K,w[K],null,J,j);for(const K in A){if(Ks(K))continue;const ie=A[K],se=w[K];ie!==se&&K!=="value"&&i(y,K,se,ie,J,j)}"value"in A&&i(y,"value",w.value,A.value,J)}},O=(y,w,A,j,J,K,ie,se,te)=>{const Q=w.el=y?y.el:r(""),ve=w.anchor=y?y.anchor:r("");let{patchFlag:le,dynamicChildren:me,slotScopeIds:Ce}=w;Ce&&(se=se?se.concat(Ce):Ce),y==null?(s(Q,A,j),s(ve,A,j),G(w.children||[],A,ve,J,K,ie,se,te)):le>0&&le&64&&me&&y.dynamicChildren&&y.dynamicChildren.length===me.length?(X(y.dynamicChildren,me,A,J,K,ie,se),(w.key!=null||J&&w===J.subTree)&&mr(y,w,!0)):re(y,w,A,ve,J,K,ie,se,te)},Z=(y,w,A,j,J,K,ie,se,te)=>{w.slotScopeIds=se,y==null?w.shapeFlag&512?J.ctx.activate(w,A,j,ie,te):W(w,A,j,J,K,ie,te):oe(y,w,te)},W=(y,w,A,j,J,K,ie)=>{const se=y.component=Kh(y,j,J);if(Ci(y)&&(se.ctx.renderer=L),Gh(se,!1,ie),se.asyncDep){if(J&&J.registerDep(se,de,ie),!y.el){const te=se.subTree=C(pt);v(null,te,w,A),y.placeholder=te.el}}else de(se,y,w,A,J,K,ie)},oe=(y,w,A)=>{const j=w.component=y.component;if(Sh(y,w,A))if(j.asyncDep&&!j.asyncResolved){ee(j,w,A);return}else j.next=w,j.update();else w.el=y.el,j.vnode=w},de=(y,w,A,j,J,K,ie)=>{const se=()=>{if(y.isMounted){let{next:le,bu:me,u:Ce,parent:Ie,vnode:Ve}=y;{const Lt=sd(y);if(Lt){le&&(le.el=Ve.el,ee(y,le,ie)),Lt.asyncDep.then(()=>{vt(()=>{y.isUnmounted||Q()},J)});return}}let Be=le,Ke;qn(y,!1),le?(le.el=Ve.el,ee(y,le,ie)):le=Ve,me&&ji(me),(Ke=le.props&&le.props.onVnodeBeforeUpdate)&&tn(Ke,Ie,le,Ve),qn(y,!0);const nt=il(y),Dt=y.subTree;y.subTree=nt,g(Dt,nt,u(Dt.el),E(Dt),y,J,K),le.el=nt.el,Be===null&&fr(y,nt.el),Ce&&vt(Ce,J),(Ke=le.props&&le.props.onVnodeUpdated)&&vt(()=>tn(Ke,Ie,le,Ve),J)}else{let le;const{el:me,props:Ce}=w,{bm:Ie,m:Ve,parent:Be,root:Ke,type:nt}=y,Dt=Ys(w);qn(y,!1),Ie&&ji(Ie),!Dt&&(le=Ce&&Ce.onVnodeBeforeMount)&&tn(le,Be,w),qn(y,!0);{Ke.ce&&Ke.ce._hasShadowRoot()&&Ke.ce._injectChildStyle(nt,y.parent?y.parent.type:void 0);const Lt=y.subTree=il(y);g(null,Lt,A,j,y,J,K),w.el=Lt.el}if(Ve&&vt(Ve,J),!Dt&&(le=Ce&&Ce.onVnodeMounted)){const Lt=w;vt(()=>tn(le,Be,Lt),J)}(w.shapeFlag&256||Be&&Ys(Be.vnode)&&Be.vnode.shapeFlag&256)&&y.a&&vt(y.a,J),y.isMounted=!0,w=A=j=null}};y.scope.on();const te=y.effect=new au(se);y.scope.off();const Q=y.update=te.run.bind(te),ve=y.job=te.runIfDirty.bind(te);ve.i=y,ve.id=y.uid,te.scheduler=()=>lr(ve),qn(y,!0),Q()},ee=(y,w,A)=>{w.component=y;const j=y.vnode.props;y.vnode=w,y.next=null,xh(y,w.props,j,A),Rh(y,w.children,A),En(),Gr(y),Sn()},re=(y,w,A,j,J,K,ie,se,te=!1)=>{const Q=y&&y.children,ve=y?y.shapeFlag:0,le=w.children,{patchFlag:me,shapeFlag:Ce}=w;if(me>0){if(me&128){Se(Q,le,A,j,J,K,ie,se,te);return}else if(me&256){Ee(Q,le,A,j,J,K,ie,se,te);return}}Ce&8?(ve&16&&ce(Q,J,K),le!==Q&&c(A,le)):ve&16?Ce&16?Se(Q,le,A,j,J,K,ie,se,te):ce(Q,J,K,!0):(ve&8&&c(A,""),Ce&16&&G(le,A,j,J,K,ie,se,te))},Ee=(y,w,A,j,J,K,ie,se,te)=>{y=y||ps,w=w||ps;const Q=y.length,ve=w.length,le=Math.min(Q,ve);let me;for(me=0;meve?ce(y,J,K,!0,!1,le):G(w,A,j,J,K,ie,se,te,le)},Se=(y,w,A,j,J,K,ie,se,te)=>{let Q=0;const ve=w.length;let le=y.length-1,me=ve-1;for(;Q<=le&&Q<=me;){const Ce=y[Q],Ie=w[Q]=te?hn(w[Q]):Gt(w[Q]);if(an(Ce,Ie))g(Ce,Ie,A,null,J,K,ie,se,te);else break;Q++}for(;Q<=le&&Q<=me;){const Ce=y[le],Ie=w[me]=te?hn(w[me]):Gt(w[me]);if(an(Ce,Ie))g(Ce,Ie,A,null,J,K,ie,se,te);else break;le--,me--}if(Q>le){if(Q<=me){const Ce=me+1,Ie=Ceme)for(;Q<=le;)he(y[Q],J,K,!0),Q++;else{const Ce=Q,Ie=Q,Ve=new Map;for(Q=Ie;Q<=me;Q++){const Et=w[Q]=te?hn(w[Q]):Gt(w[Q]);Et.key!=null&&Ve.set(Et.key,Q)}let Be,Ke=0;const nt=me-Ie+1;let Dt=!1,Lt=0;const Mn=new Array(nt);for(Q=0;Q=nt){he(Et,J,K,!0);continue}let Nt;if(Et.key!=null)Nt=Ve.get(Et.key);else for(Be=Ie;Be<=me;Be++)if(Mn[Be-Ie]===0&&an(Et,w[Be])){Nt=Be;break}Nt===void 0?he(Et,J,K,!0):(Mn[Nt-Ie]=Q+1,Nt>=Lt?Lt=Nt:Dt=!0,g(Et,w[Nt],A,null,J,K,ie,se,te),Ke++)}const $o=Dt?Ph(Mn):ps;for(Be=$o.length-1,Q=nt-1;Q>=0;Q--){const Et=Ie+Q,Nt=w[Et],Po=w[Et+1],Bo=Et+1{const{el:K,type:ie,transition:se,children:te,shapeFlag:Q}=y;if(Q&6){ne(y.component.subTree,w,A,j);return}if(Q&128){y.suspense.move(w,A,j);return}if(Q&64){ie.move(y,w,A,L);return}if(ie===ye){s(K,w,A);for(let le=0;lese.enter(K),J));else{const{leave:le,delayLeave:me,afterLeave:Ce}=se,Ie=()=>{y.ctx.isUnmounted?o(K):s(K,w,A)},Ve=()=>{const Be=K._isLeaving||!!K[Vt];K._isLeaving&&K[Vt](!0),se.persisted&&!Be?Ie():le(K,()=>{Ie(),Ce&&Ce()})};me?me(K,Ie,Ve):Ve()}else s(K,w,A)},he=(y,w,A,j=!1,J=!1)=>{const{type:K,props:ie,ref:se,children:te,dynamicChildren:Q,shapeFlag:ve,patchFlag:le,dirs:me,cacheIndex:Ce,memo:Ie}=y;if(le===-2&&(J=!1),se!=null&&(En(),Xs(se,null,A,y,!0),Sn()),Ce!=null&&(w.renderCache[Ce]=void 0),ve&256){w.ctx.deactivate(y);return}const Ve=ve&1&&me,Be=!Ys(y);let Ke;if(Be&&(Ke=ie&&ie.onVnodeBeforeUnmount)&&tn(Ke,w,y),ve&6)H(y.component,A,j);else{if(ve&128){y.suspense.unmount(A,j);return}Ve&&Fn(y,null,w,"beforeUnmount"),ve&64?y.type.remove(y,w,A,L,j):Q&&!Q.hasOnce&&(K!==ye||le>0&&le&64)?ce(Q,w,A,!1,!0):(K===ye&&le&384||!J&&ve&16)&&ce(te,w,A),j&&fe(y)}const nt=Ie!=null&&Ce==null;(Be&&(Ke=ie&&ie.onVnodeUnmounted)||Ve||nt)&&vt(()=>{Ke&&tn(Ke,w,y),Ve&&Fn(y,null,w,"unmounted"),nt&&(y.el=null)},A)},fe=y=>{const{type:w,el:A,anchor:j,transition:J}=y;if(w===ye){Te(A,j);return}if(w===Yo){x(y);return}const K=()=>{o(A),J&&!J.persisted&&J.afterLeave&&J.afterLeave()};if(y.shapeFlag&1&&J&&!J.persisted){const{leave:ie,delayLeave:se}=J,te=()=>ie(A,K);se?se(y.el,K,te):te()}else K()},Te=(y,w)=>{let A;for(;y!==w;)A=f(y),o(y),y=A;o(w)},H=(y,w,A)=>{const{bum:j,scope:J,job:K,subTree:ie,um:se,m:te,a:Q}=y;ll(te),ll(Q),j&&ji(j),J.stop(),K&&(K.flags|=8,he(ie,y,w,A)),se&&vt(se,w),vt(()=>{y.isUnmounted=!0},w)},ce=(y,w,A,j=!1,J=!1,K=0)=>{for(let ie=K;ie{if(y.shapeFlag&6)return E(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const w=f(y.anchor||y.el),A=w&&w[$u];return A?f(A):w};let N=!1;const U=(y,w,A)=>{let j;y==null?w._vnode&&(he(w._vnode,null,null,!0),j=w._vnode.component):g(w._vnode||null,y,w,null,null,null,A),w._vnode=y,N||(N=!0,Gr(j),Au(),N=!1)},L={p:g,um:he,m:ne,r:fe,mt:W,mc:G,pc:re,pbc:X,n:E,o:e};return{render:U,hydrate:void 0,createApp:_h(U)}}function Ji({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 qn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function $h(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function mr(e,t,n=!1){const s=e.children,o=t.children;if(be(s)&&be(o))for(let i=0;i>1,e[n[r]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=t[a];return n}function sd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:sd(t)}function ll(e){if(e)for(let t=0;te.__isSuspense;let Ta=0;const Bh={name:"Suspense",__isSuspense:!0,process(e,t,n,s,o,i,a,r,l,d){if(e==null)Lh(t,n,s,o,i,a,r,l,d);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Nh(e,t,n,s,o,a,r,l,d)}},hydrate:Mh,normalize:Fh},Dh=Bh;function lo(e,t){const n=e.props&&e.props[t];ke(n)&&n()}function Lh(e,t,n,s,o,i,a,r,l){const{p:d,o:{createElement:c}}=l,u=c("div"),f=e.suspense=ad(e,o,s,t,u,n,i,a,r,l);d(null,f.pendingBranch=e.ssContent,u,null,s,f,i,a),f.deps>0?(lo(e,"onPending"),lo(e,"onFallback"),d(null,e.ssFallback,t,n,s,null,i,a),gs(f,e.ssFallback)):f.resolve(!1,!0)}function Nh(e,t,n,s,o,i,a,r,{p:l,um:d,o:{createElement:c}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:_,pendingBranch:g,isInFallback:m,isHydrating:v}=u;if(g)u.pendingBranch=f,an(g,f)?(l(g,f,u.hiddenContainer,null,o,u,i,a,r),u.deps<=0?u.resolve():m&&(v||(l(_,p,n,s,o,null,i,a,r),gs(u,p)))):(u.pendingId=Ta++,v?(u.isHydrating=!1,u.activeBranch=g):d(g,o,u),u.deps=0,u.effects.length=0,u.hiddenContainer=c("div"),m?(l(null,f,u.hiddenContainer,null,o,u,i,a,r),u.deps<=0?u.resolve():(l(_,p,n,s,o,null,i,a,r),gs(u,p))):_&&an(_,f)?(l(_,f,n,s,o,u,i,a,r),u.resolve(!0)):(l(null,f,u.hiddenContainer,null,o,u,i,a,r),u.deps<=0&&u.resolve()));else if(_&&an(_,f))l(_,f,n,s,o,u,i,a,r),gs(u,f);else if(lo(t,"onPending"),u.pendingBranch=f,f.shapeFlag&512?u.pendingId=f.component.suspenseId:u.pendingId=Ta++,l(null,f,u.hiddenContainer,null,o,u,i,a,r),u.deps<=0)u.resolve();else{const{timeout:S,pendingId:R}=u;S>0?setTimeout(()=>{u.pendingId===R&&u.fallback(p)},S):S===0&&u.fallback(p)}}function ad(e,t,n,s,o,i,a,r,l,d,c=!1){const{p:u,m:f,um:p,n:_,o:{parentNode:g,remove:m}}=d;let v;const S=Vh(e);S&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const R=e.props?Zc(e.props.timeout):void 0,x=i,b={vnode:e,parent:t,parentComponent:n,namespace:a,container:s,hiddenContainer:o,deps:0,pendingId:Ta++,timeout:typeof R=="number"?R:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve($=!1,B=!1){const{vnode:G,activeBranch:D,pendingBranch:X,pendingId:V,effects:O,parentComponent:Z,container:W,isInFallback:oe}=b;let de=!1;if(b.isHydrating)b.isHydrating=!1;else if(!$){de=D&&X.transition&&X.transition.mode==="out-in";let Ee=!1;de&&(D.transition.afterLeave=()=>{V===b.pendingId&&(f(X,W,i===x&&!Ee?_(D):i,0),ba(O),oe&&G.ssFallback&&(G.ssFallback.el=null))}),D&&!b.isFallbackMountPending&&(g(D.el)===W&&(i=_(D),Ee=!0),p(D,Z,b,!0),!de&&oe&&G.ssFallback&&vt(()=>G.ssFallback.el=null,b)),de||f(X,W,i,0)}b.isFallbackMountPending=!1,gs(b,X),b.pendingBranch=null,b.isInFallback=!1;let ee=b.parent,re=!1;for(;ee;){if(ee.pendingBranch){ee.effects.push(...O),re=!0;break}ee=ee.parent}!re&&!de&&ba(O),b.effects=[],S&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!B&&t.resolve()),lo(G,"onResolve")},fallback($){if(!b.pendingBranch)return;const{vnode:B,activeBranch:G,parentComponent:D,container:X,namespace:V}=b;lo(B,"onFallback");const O=_(G),Z=()=>{b.isFallbackMountPending=!1,b.isInFallback&&(u(null,$,X,O,D,null,V,r,l),gs(b,$))},W=$.transition&&$.transition.mode==="out-in";W&&(b.isFallbackMountPending=!0,G.transition.afterLeave=Z),b.isInFallback=!0,p(G,D,null,!0),W||Z()},move($,B,G){b.activeBranch&&f(b.activeBranch,$,B,G),b.container=$},next(){return b.activeBranch&&_(b.activeBranch)},registerDep($,B,G){const D=!!b.pendingBranch;D&&b.deps++;const X=$.vnode.el;$.asyncDep.catch(V=>{yo(V,$,0)}).then(V=>{if($.isUnmounted||b.isUnmounted||b.pendingId!==$.suspenseId)return;Ia(),$.asyncResolved=!0;const{vnode:O}=$;Oa($,V),X&&(O.el=X);const Z=!X&&$.subTree.el;B($,O,g(X||$.subTree.el),X?null:_($.subTree),b,a,G),Z&&(O.placeholder=null,m(Z)),fr($,O.el),D&&--b.deps===0&&b.resolve()})},unmount($,B){b.isUnmounted=!0,b.activeBranch&&p(b.activeBranch,n,$,B),b.pendingBranch&&p(b.pendingBranch,n,$,B)}};return b}function Mh(e,t,n,s,o,i,a,r,l){const d=t.suspense=ad(t,s,n,e.parentNode,document.createElement("div"),null,o,i,a,r,!0),c=l(e,d.pendingBranch=t.ssContent,n,d,i,a);return d.deps===0&&d.resolve(!1,!0),c}function Fh(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=cl(s?n.default:n),e.ssFallback=s?cl(n.fallback):C(pt)}function cl(e){let t;if(ke(e)){const n=ys&&e._c;n&&(e._d=!1,k()),e=e(),n&&(e._d=!0,t=Rt,rd())}return be(e)&&(e=bh(e)),e=Gt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function qh(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):ba(e)}function gs(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;n.el=o,s&&s.subTree===n&&(s.vnode.el=o,fr(s,o))}function Vh(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const ye=Symbol.for("v-fgt"),Ai=Symbol.for("v-txt"),pt=Symbol.for("v-cmt"),Yo=Symbol.for("v-stc"),Zs=[];let Rt=null;function k(e=!1){Zs.push(Rt=e?null:[])}function rd(){Zs.pop(),Rt=Zs[Zs.length-1]||null}let ys=1;function ui(e,t=!1){ys+=e,e<0&&Rt&&t&&(Rt.hasOnce=!0)}function ld(e){return e.dynamicChildren=ys>0?Rt||ps:null,rd(),ys>0&&Rt&&Rt.push(e),e}function T(e,t,n,s,o,i){return ld(h(e,t,n,s,o,i,!0))}function ht(e,t,n,s,o){return ld(C(e,t,n,s,o,!0))}function bs(e){return e?e.__v_isVNode===!0:!1}function an(e,t){return e.type===t.type&&e.key===t.key}const cd=({key:e})=>e??null,Qo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ue(e)||Xe(e)||ke(e)?{i:Pt,r:e,k:t,f:!!n}:e:null);function h(e,t=null,n=null,s=0,o=null,i=e===ye?0:1,a=!1,r=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&cd(t),ref:t&&Qo(t),scopeId:Ru,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:i,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Pt};return r?(_r(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Ue(n)?8:16),ys>0&&!a&&Rt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Rt.push(l),l}const C=jh;function jh(e,t=null,n=null,s=0,o=null,i=!1){if((!e||e===Uu)&&(e=pt),bs(e)){const r=Ln(e,t,!0);return n&&_r(r,n),ys>0&&!i&&Rt&&(r.shapeFlag&6?Rt[Rt.indexOf(e)]=r:Rt.push(r)),r.patchFlag=-2,r}if(Zh(e)&&(e=e.__vccOpts),t){t=Uh(t);let{class:r,style:l}=t;r&&!Ue(r)&&(t.class=ge(r)),Fe(l)&&(Si(l)&&!be(l)&&(l=ut({},l)),t.style=jt(l))}const a=Ue(e)?1:id(e)?128:Pu(e)?64:Fe(e)?4:ke(e)?2:0;return h(e,t,n,s,o,a,i,!0)}function Uh(e){return e?Si(e)||Yu(e)?ut({},e):e:null}function Ln(e,t,n=!1,s=!1){const{props:o,ref:i,patchFlag:a,children:r,transition:l}=e,d=t?$t(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&cd(d),ref:t&&t.ref?n&&i?be(i)?i.concat(Qo(t)):[i,Qo(t)]:Qo(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ye?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ln(e.ssContent),ssFallback:e.ssFallback&&Ln(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&ro(c,l.clone(c)),c}function Le(e=" ",t=0){return C(Ai,null,e,t)}function zh(e,t){const n=C(Yo,null,e);return n.staticCount=t,n}function ae(e="",t=!1){return t?(k(),ht(pt,null,e)):C(pt,null,e)}function Gt(e){return e==null||typeof e=="boolean"?C(pt):be(e)?C(ye,null,e.slice()):bs(e)?hn(e):C(Ai,null,String(e))}function hn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ln(e)}function _r(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(be(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),_r(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Yu(t)?t._ctx=Pt:o===3&&Pt&&(Pt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ke(t)?(t={default:t,_ctx:Pt},n=32):(t=String(t),s&64?(n=16,t=[Le(t)]):n=8);e.children=t,e.shapeFlag|=n}function $t(...e){const t={};for(let n=0;nbt||Pt;let di,Ra;{const e=yi(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),i=>{o.length>1?o.forEach(a=>a(i)):o[0](i)}};di=t("__VUE_INSTANCE_SETTERS__",n=>bt=n),Ra=t("__VUE_SSR_SETTERS__",n=>co=n)}const bo=e=>{const t=bt;return di(e),e.scope.on(),()=>{e.scope.off(),di(t)}},Ia=()=>{bt&&bt.scope.off(),di(null)};function ud(e){return e.vnode.shapeFlag&4}let co=!1;function Gh(e,t=!1,n=!1){t&&Ra(t);const{props:s,children:o}=e.vnode,i=ud(e);Ch(e,s,i,t),Th(e,o,n||t);const a=i?Jh(e,t):void 0;return t&&Ra(!1),a}function Jh(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ch);const{setup:s}=n;if(s){En();const o=e.setupContext=s.length>1?Yh(e):null,i=bo(e),a=vo(s,e,0,[e.props,o]),r=Jc(a);if(Sn(),i(),(r||e.sp)&&!Ys(e)&&qu(e),r){if(a.then(Ia,Ia),t)return a.then(l=>{Oa(e,l)}).catch(l=>{yo(l,e,0)});e.asyncDep=a}else Oa(e,a)}else dd(e)}function Oa(e,t,n){ke(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Fe(t)&&(e.setupState=Cu(t)),dd(e)}function dd(e,t,n){const s=e.type;e.render||(e.render=s.render||ln);{const o=bo(e);En();try{uh(e)}finally{Sn(),o()}}}const Xh={get(e,t){return yt(e,"get",""),e[t]}};function Yh(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Xh),slots:e.slots,emit:e.emit,expose:t}}function Ti(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Cu(rr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Qs)return Qs[n](e)},has(t,n){return n in t||n in Qs}})):e.proxy}function Qh(e,t=!0){return ke(e)?e.displayName||e.name:e.name||t&&e.__name}function Zh(e){return ke(e)&&"__vccOpts"in e}const F=(e,t)=>Mp(e,t,co);function gr(e,t,n){try{ui(-1);const s=arguments.length;return s===2?Fe(t)&&!be(t)?bs(t)?C(e,null,[t]):C(e,t):C(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&bs(n)&&(n=[n]),C(e,t,n))}finally{ui(1)}}const em="3.5.35";/** * @vue/runtime-dom v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let $a;const ul=typeof window<"u"&&window.trustedTypes;if(ul)try{$a=ul.createPolicy("vue",{createHTML:e=>e})}catch{}const fd=$a?e=>$a.createHTML(e):e=>e,tm="http://www.w3.org/2000/svg",nm="http://www.w3.org/1998/Math/MathML",pn=typeof document<"u"?document:null,dl=pn&&pn.createElement("template"),sm={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"?pn.createElementNS(tm,e):t==="mathml"?pn.createElementNS(nm,e):n?pn.createElement(e,{is:n}):pn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>pn.createTextNode(e),createComment:e=>pn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,i){const a=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{dl.innerHTML=fd(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const r=dl.content;if(s==="svg"||s==="mathml"){const l=r.firstChild;for(;l.firstChild;)r.appendChild(l.firstChild);r.removeChild(l)}t.insertBefore(r,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Tn="transition",$s="animation",uo=Symbol("_vtc"),pd={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},om=ut({},Du,pd),im=e=>(e.displayName="Transition",e.props=om,e),fo=im((e,{slots:t})=>gr(Qp,am(e),t)),Vn=(e,t=[])=>{be(e)?e.forEach(n=>n(...t)):e&&e(...t)},fl=e=>e?be(e)?e.some(t=>t.length>1):e.length>1:!1;function am(e){const t={};for(const O in e)O in pd||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:d=a,appearToClass:c=r,leaveFromClass:u=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,_=rm(o),g=_&&_[0],m=_&&_[1],{onBeforeEnter:v,onEnter:S,onEnterCancelled:R,onLeave:x,onLeaveCancelled:b,onBeforeAppear:$=v,onAppear:B=S,onAppearCancelled:G=R}=t,D=(O,Z,W,oe)=>{O._enterCancelled=oe,jn(O,Z?c:r),jn(O,Z?d:a),W&&W()},X=(O,Z)=>{O._isLeaving=!1,jn(O,u),jn(O,p),jn(O,f),Z&&Z()},V=O=>(Z,W)=>{const oe=O?B:S,de=()=>D(Z,O,W);Vn(oe,[Z,de]),pl(()=>{jn(Z,O?l:i),dn(Z,O?c:r),fl(oe)||hl(Z,s,g,de)})};return ut(t,{onBeforeEnter(O){Vn(v,[O]),dn(O,i),dn(O,a)},onBeforeAppear(O){Vn($,[O]),dn(O,l),dn(O,d)},onEnter:V(!1),onAppear:V(!0),onLeave(O,Z){O._isLeaving=!0;const W=()=>X(O,Z);dn(O,u),O._enterCancelled?(dn(O,f),gl(O)):(gl(O),dn(O,f)),pl(()=>{O._isLeaving&&(jn(O,u),dn(O,p),fl(x)||hl(O,s,m,W))}),Vn(x,[O,W])},onEnterCancelled(O){D(O,!1,void 0,!0),Vn(R,[O])},onAppearCancelled(O){D(O,!0,void 0,!0),Vn(G,[O])},onLeaveCancelled(O){X(O),Vn(b,[O])}})}function rm(e){if(e==null)return null;if(Fe(e))return[Xi(e.enter),Xi(e.leave)];{const t=Xi(e);return[t,t]}}function Xi(e){return Zc(e)}function dn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[uo]||(e[uo]=new Set)).add(t)}function jn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[uo];n&&(n.delete(t),n.size||(e[uo]=void 0))}function pl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lm=0;function hl(e,t,n,s){const o=e._endId=++lm,i=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:a,timeout:r,propCount:l}=cm(e,t);if(!a)return s();const d=a+"end";let c=0;const u=()=>{e.removeEventListener(d,f),i()},f=p=>{p.target===e&&++c>=l&&u()};setTimeout(()=>{c(n[_]||"").split(", "),o=s(`${Tn}Delay`),i=s(`${Tn}Duration`),a=ml(o,i),r=s(`${$s}Delay`),l=s(`${$s}Duration`),d=ml(r,l);let c=null,u=0,f=0;t===Tn?a>0&&(c=Tn,u=a,f=i.length):t===$s?d>0&&(c=$s,u=d,f=l.length):(u=Math.max(a,d),c=u>0?a>d?Tn:$s:null,f=c?c===Tn?i.length:l.length:0);const p=c===Tn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Tn}Property`).toString());return{type:c,timeout:u,propCount:f,hasTransform:p}}function ml(e,t){for(;e.length_l(n)+_l(e[s])))}function _l(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function gl(e){return(e?e.ownerDocument:document).body.offsetHeight}function um(e,t,n){const s=e[uo];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const fi=Symbol("_vod"),hd=Symbol("_vsh"),bn={name:"show",beforeMount(e,{value:t},{transition:n}){e[fi]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ps(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Ps(e,!0),s.enter(e)):s.leave(e,()=>{Ps(e,!1)}):Ps(e,t))},beforeUnmount(e,{value:t}){Ps(e,t)}};function Ps(e,t){e.style.display=t?e[fi]:"none",e[hd]=!t}const dm=Symbol(""),fm=/(?:^|;)\s*display\s*:/;function pm(e,t,n){const s=e.style,o=Ue(n);let i=!1;if(n&&!o){if(t)if(Ue(t))for(const a of t.split(";")){const r=a.slice(0,a.indexOf(":")).trim();n[r]==null&&Hs(s,r,"")}else for(const a in t)n[a]==null&&Hs(s,a,"");for(const a in n){a==="display"&&(i=!0);const r=n[a];r!=null?mm(e,a,!Ue(t)&&t?t[a]:void 0,r)||Hs(s,a,r):Hs(s,a,"")}}else if(o){if(t!==n){const a=s[dm];a&&(n+=";"+a),s.cssText=n,i=fm.test(n)}}else t&&e.removeAttribute("style");fi in e&&(e[fi]=i?s.display:"",e[hd]&&(s.display="none"))}const vl=/\s*!important$/;function Hs(e,t,n){if(be(n))n.forEach(s=>Hs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=hm(e,t);vl.test(n)?e.setProperty(xn(s),n.replace(vl,""),"important"):e[s]=n}}const yl=["Webkit","Moz","ms"],Yi={};function hm(e,t){const n=Yi[t];if(n)return n;let s=At(t);if(s!=="filter"&&s in e)return Yi[t]=s;s=vi(s);for(let o=0;oQi||(bm.then(()=>Qi=0),Qi=Date.now());function Em(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(be(o)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const a=o.slice(),r=[s];for(let l=0;le.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Sm=(e,t,n,s,o,i)=>{const a=o==="svg";t==="class"?um(e,s,a):t==="style"?pm(e,n,s):hi(t)?mi(t)||vm(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Cm(e,t,s,a))?(El(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&wl(e,t,s,a,i,t!=="value")):e._isVueCE&&(xm(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ue(s)))?El(e,At(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),wl(e,t,s,a))};function Cm(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&xl(t)&&ke(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 xl(t)&&Ue(n)?!1:t in e}function xm(e,t){const n=e._def.props;if(!n)return!1;const s=At(t);return Array.isArray(n)?n.some(o=>At(o)===s):Object.keys(n).some(o=>At(o)===s)}const km=["ctrl","shift","alt","meta"],Am={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)=>km.some(n=>e[`${n}Key`]&&!t.includes(n))},gn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...i)=>{for(let a=0;a{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const i=xn(o.key);if(t.some(a=>a===i||Tm[a]===i))return e(o)})},Rm=ut({patchProp:Sm},sm);let kl;function Im(){return kl||(kl=Ih(Rm))}const _d=(...e)=>{const t=Im().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=$m(s);if(!o)return;const i=t._component;!ke(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const a=n(o,!1,Om(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t};function Om(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $m(e){return Ue(e)?document.querySelector(e):e}function Pa(){}const Je=Object.assign,ks=typeof window<"u",wo=e=>e!==null&&typeof e=="object",it=e=>e!=null,po=e=>typeof e=="function",gd=e=>wo(e)&&po(e.then)&&po(e.catch),vd=e=>typeof e=="number"||/^\d+(\.\d+)?$/.test(e),Pm=()=>ks?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function Al(e,t){const n=t.split(".");let s=e;return n.forEach(o=>{var i;s=wo(s)&&(i=s[o])!=null?i:""}),s}function Qn(e,t,n){return t.reduce((s,o)=>(s[o]=e[o],s),{})}const Tl=e=>Array.isArray(e)?e:[e],Ut=null,Pe=[Number,String],He={type:Boolean,default:!0},Zo=e=>({type:e,required:!0}),yd=e=>({type:Number,default:e}),Jt=e=>({type:Pe,default:e}),De=e=>({type:String,default:e});var As=typeof window<"u";function ho(e){return As?requestAnimationFrame(e):-1}function bd(e){As&&cancelAnimationFrame(e)}function Ws(e){ho(()=>ho(e))}var Bm=e=>e===window,Rl=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),rn=e=>{const t=Re(e);if(Bm(t)){const n=t.innerWidth,s=t.innerHeight;return Rl(n,s)}return t!=null&&t.getBoundingClientRect?t.getBoundingClientRect():Rl(0,0)};function Eo(e){const t=mt(e,null);if(t){const n=Wt(),{link:s,unlink:o,internalChildren:i}=t;s(n),Nn(()=>o(n));const a=F(()=>i.indexOf(n));return{parent:t,index:a}}return{parent:null,index:q(-1)}}function Dm(e){const t=[],n=s=>{Array.isArray(s)&&s.forEach(o=>{var i;bs(o)&&(t.push(o),(i=o.component)!=null&&i.subTree&&(t.push(o.component.subTree),n(o.component.subTree.children)),o.children&&n(o.children))})};return n(e),t}var Il=(e,t)=>{const n=e.indexOf(t);return n===-1?e.findIndex(s=>t.key!==void 0&&t.key!==null&&s.type===t.type&&s.key===t.key):n};function Lm(e,t,n){const s=Dm(e.subTree.children);n.sort((i,a)=>Il(s,i.vnode)-Il(s,a.vnode));const o=n.map(i=>i.proxy);t.sort((i,a)=>{const r=o.indexOf(i),l=o.indexOf(a);return r-l})}function vr(e){const t=_t([]),n=_t([]),s=Wt();return{children:t,linkChildren:i=>{cn(e,Object.assign({link:l=>{l.proxy&&(n.push(l),t.push(l.proxy),Lm(s,t,n))},unlink:l=>{const d=n.indexOf(l);t.splice(d,1),n.splice(d,1)},children:t,internalChildren:n},i))}}}function Ri(e){let t;ot(()=>{e(),tt(()=>{t=!0})}),Cs(()=>{t&&e()})}function ns(e,t,n={}){if(!As)return;const{target:s=window,passive:o=!1,capture:i=!1}=n;let a=!1,r;const l=u=>{if(a)return;const f=Re(u);f&&!r&&(f.addEventListener(e,t,{capture:i,passive:o}),r=!0)},d=u=>{if(a)return;const f=Re(u);f&&r&&(f.removeEventListener(e,t,i),r=!1)};Nn(()=>d(s)),ts(()=>d(s)),Ri(()=>l(s));let c;return Xe(s)&&(c=Ae(s,(u,f)=>{d(f),l(u)})),()=>{c==null||c(),d(s),a=!0}}var Vo,Zi;function Nm(){if(!Vo&&(Vo=q(0),Zi=q(0),As)){const e=()=>{Vo.value=window.innerWidth,Zi.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:Vo,height:Zi}}var Mm=/scroll|auto|overlay/i,wd=As?window:void 0;function Fm(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Ed(e,t=wd){let n=e;for(;n&&n!==t&&Fm(n);){const{overflowY:s}=window.getComputedStyle(n);if(Mm.test(s))return n;n=n.parentNode}return t}function Sd(e,t=wd){const n=q();return ot(()=>{e.value&&(n.value=Ed(e.value,t))}),n}var jo;function qm(){if(!jo&&(jo=q("visible"),As)){const e=()=>{jo.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return jo}var Cd=Symbol("van-field");function xd(e){const t=mt(Cd,null);t&&!t.customValue.value&&(t.customValue.value=e,Ae(e,()=>{t.resetValidation(),t.validateWithTrigger("onChange")}))}function yr(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function Ba(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function br(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function wr(e){Ba(window,e),Ba(document.body,e)}function Ol(e,t){if(e===window)return 0;const n=t?yr(t):br();return rn(e).top+n}const Vm=Pm();function jm(){Vm&&wr(br())}const Um=e=>e.stopPropagation();function wn(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&Um(e)}function mo(e){const t=Re(e);if(!t)return!1;const n=window.getComputedStyle(t),s=n.display==="none",o=t.offsetParent===null&&n.position!=="fixed";return s||o}const{width:So,height:Ii}=Nm();function at(e){if(it(e))return vd(e)?`${e}px`:String(e)}function kd(e){if(it(e)){if(Array.isArray(e))return{width:at(e[0]),height:at(e[1])};const t=at(e);return{width:t,height:t}}}function Ad(e){const t={};return e!==void 0&&(t.zIndex=+e),t}let ea;function zm(){if(!ea){const e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;ea=parseFloat(t)}return ea}function Hm(e){return e=e.replace(/rem/g,""),+e*zm()}function Wm(e){return e=e.replace(/vw/g,""),+e*So.value/100}function Km(e){return e=e.replace(/vh/g,""),+e*Ii.value/100}function Td(e){if(typeof e=="number")return e;if(ks){if(e.includes("rem"))return Hm(e);if(e.includes("vw"))return Wm(e);if(e.includes("vh"))return Km(e)}return parseFloat(e)}const Gm=/-(\w)/g,Rd=e=>e.replace(Gm,(t,n)=>n.toUpperCase()),Jm=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,""),ei=(e,t,n)=>Math.min(Math.max(e,t),n);function $l(e,t,n){const s=e.indexOf(t);return s===-1?e:t==="-"&&s!==0?e.slice(0,s):e.slice(0,s+1)+e.slice(s).replace(n,"")}function Xm(e,t=!0,n=!0){t?e=$l(e,".",/\./g):e=e.split(".")[0],n?e=$l(e,"-",/-/g):e=e.replace(/-/,"");const s=t?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(s,"")}const{hasOwnProperty:Ym}=Object.prototype;function Qm(e,t,n){const s=t[n];it(s)&&(!Ym.call(e,n)||!wo(s)?e[n]=s:e[n]=Id(Object(e[n]),s))}function Id(e,t){return Object.keys(t).forEach(n=>{Qm(e,t,n)}),e}var Zm={name:"姓名",tel:"电话",save:"保存",clear:"清空",undo:"撤销",cancel:"取消",confirm:"确认",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const Pl=q("zh-CN"),Bl=_t({"zh-CN":Zm}),e_={messages(){return Bl[Pl.value]},use(e,t){Pl.value=e,this.add({[e]:t})},add(e={}){Id(Bl,e)}};var t_=e_;function n_(e){const t=Rd(e)+".";return(n,...s)=>{const o=t_.messages(),i=Al(o,t+n)||Al(o,n);return po(i)?i(...s):i}}function Da(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((n,s)=>n+Da(e,s),""):Object.keys(t).reduce((n,s)=>n+(t[s]?Da(e,s):""),""):""}function s_(e){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?`${e}__${t}`:e,`${t}${Da(t,n)}`)}function We(e){const t=`van-${e}`;return[t,s_(t),n_(t)]}const Co="van-hairline",o_=`${Co}--top`,i_=`${Co}--left`,aT=`${Co}--bottom`,a_=`${Co}--surround`,r_=`${Co}--top-bottom`,Od="van-haptics-feedback",l_=Symbol("van-form"),Dl=5;function Er(e,{args:t=[],done:n,canceled:s,error:o}){if(e){const i=e.apply(null,t);gd(i)?i.then(a=>{a?n():s&&s()}).catch(o||Pa):i?n():s&&s()}else n()}function Qe(e){return e.install=t=>{const{name:n}=e;n&&(t.component(n,e),t.component(Rd(`-${n}`),e))},e}const $d=Symbol();function Sr(e){const t=mt($d,null);t&&Ae(t,n=>{n&&e()})}const c_=(e,t)=>{const n=q(),s=()=>{n.value=rn(e).height};return ot(()=>{tt(s);for(let o=1;o<=3;o++)setTimeout(s,100*o)}),Sr(()=>tt(s)),Ae([So,Ii],s),n};function u_(e,t){const n=c_(e);return s=>C("div",{class:t("placeholder"),style:{height:n.value?`${n.value}px`:void 0}},[s()])}const[Pd,Ll]=We("action-bar"),Bd=Symbol(Pd),d_={placeholder:Boolean,safeAreaInsetBottom:He};var f_=we({name:Pd,props:d_,setup(e,{slots:t}){const n=q(),s=u_(n,Ll),{linkChildren:o}=vr(Bd);o();const i=()=>{var a;return C("div",{ref:n,class:[Ll(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[(a=t.default)==null?void 0:a.call(t)])};return()=>e.placeholder?s(i):i()}});const p_=Qe(f_);function Zt(e){const t=Wt();t&&Je(t.proxy,e)}const Oi={to:[String,Object],url:String,replace:Boolean};function Dd({to:e,url:t,replace:n,$router:s}){e&&s?s[n?"replace":"push"](e):t&&(n?location.replace(t):location.href=t)}function Cr(){const e=Wt().proxy;return()=>Dd(e)}const[h_,Nl]=We("badge"),m_={dot:Boolean,max:Pe,tag:De("div"),color:String,offset:Array,content:Pe,showZero:He,position:De("top-right")};var __=we({name:h_,props:m_,setup(e,{slots:t}){const n=()=>{if(t.content)return!0;const{content:r,showZero:l}=e;return it(r)&&r!==""&&(l||r!==0&&r!=="0")},s=()=>{const{dot:r,max:l,content:d}=e;if(!r&&n())return t.content?t.content():it(l)&&vd(d)&&+d>+l?`${l}+`:d},o=r=>r.startsWith("-")?r.replace("-",""):`-${r}`,i=F(()=>{const r={background:e.color};if(e.offset){const[l,d]=e.offset,{position:c}=e,[u,f]=c.split("-");t.default?(typeof d=="number"?r[u]=at(u==="top"?d:-d):r[u]=u==="top"?at(d):o(d),typeof l=="number"?r[f]=at(f==="left"?l:-l):r[f]=f==="left"?at(l):o(l)):(r.marginTop=at(d),r.marginLeft=at(l))}return r}),a=()=>{if(n()||e.dot)return C("div",{class:Nl([e.position,{dot:e.dot,fixed:!!t.default}]),style:i.value},[s()])};return()=>{if(t.default){const{tag:r}=e;return C(r,{class:Nl("wrapper")},{default:()=>[t.default(),a()]})}return a()}}});const Ld=Qe(__);let Nd=2e3;const g_=()=>++Nd,v_=e=>{Nd=e},[Md,y_]=We("config-provider"),Fd=Symbol(Md),b_={tag:De("div"),theme:De("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:De("local"),iconPrefix:String};function w_(e){return e.replace(/([a-zA-Z])(\d)/g,"$1-$2")}function E_(e){const t={};return Object.keys(e).forEach(n=>{const s=w_(Jm(n));t[`--van-${s}`]=e[n]}),t}function Uo(e={},t={}){Object.keys(e).forEach(n=>{e[n]!==t[n]&&document.documentElement.style.setProperty(n,e[n])}),Object.keys(t).forEach(n=>{e[n]||document.documentElement.style.removeProperty(n)})}var S_=we({name:Md,props:b_,setup(e,{slots:t}){const n=F(()=>E_(Je({},e.themeVars,e.theme==="dark"?e.themeVarsDark:e.themeVarsLight)));if(ks){const s=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},o=(i=e.theme)=>{document.documentElement.classList.remove(`van-theme-${i}`)};Ae(()=>e.theme,(i,a)=>{a&&o(a),s()},{immediate:!0}),Cs(s),ts(o),xs(o),Ae(n,(i,a)=>{e.themeVarsScope==="global"&&Uo(i,a)}),Ae(()=>e.themeVarsScope,(i,a)=>{a==="global"&&Uo({},n.value),i==="global"&&Uo(n.value,{})}),e.themeVarsScope==="global"&&Uo(n.value,{})}return cn(Fd,e),Iu(()=>{e.zIndex!==void 0&&v_(e.zIndex)}),()=>C(e.tag,{class:y_(),style:e.themeVarsScope==="local"?n.value:void 0},{default:()=>{var s;return[(s=t.default)==null?void 0:s.call(t)]}})}});const[C_,Ml]=We("icon"),x_=e=>e==null?void 0:e.includes("/"),k_={dot:Boolean,tag:De("i"),name:String,size:Pe,badge:Pe,color:String,badgeProps:Object,classPrefix:String};var A_=we({name:C_,props:k_,setup(e,{slots:t}){const n=mt(Fd,null),s=F(()=>e.classPrefix||(n==null?void 0:n.iconPrefix)||Ml());return()=>{const{tag:o,dot:i,name:a,size:r,badge:l,color:d}=e,c=x_(a);return C(Ld,$t({dot:i,tag:o,class:[s.value,c?"":`${s.value}-${a}`],style:{color:d,fontSize:at(r)},content:l},e.badgeProps),{default:()=>{var u;return[(u=t.default)==null?void 0:u.call(t),c&&C("img",{class:Ml("image"),src:a},null)]}})}}});const ft=Qe(A_),[T_,eo]=We("loading"),R_=Array(12).fill(null).map((e,t)=>C("i",{class:eo("line",String(t+1))},null)),I_=C("svg",{class:eo("circular"),viewBox:"25 25 50 50"},[C("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),O_={size:Pe,type:De("circular"),color:String,vertical:Boolean,textSize:Pe,textColor:String};var $_=we({name:T_,props:O_,setup(e,{slots:t}){const n=F(()=>Je({color:e.color},kd(e.size))),s=()=>{const i=e.type==="spinner"?R_:I_;return C("span",{class:eo("spinner",e.type),style:n.value},[t.icon?t.icon():i])},o=()=>{var i;if(t.default)return C("span",{class:eo("text"),style:{fontSize:at(e.textSize),color:(i=e.textColor)!=null?i:e.color}},[t.default()])};return()=>{const{type:i,vertical:a}=e;return C("div",{class:eo([i,{vertical:a}]),"aria-live":"polite","aria-busy":!0},[s(),o()])}}});const xo=Qe($_),[P_,os]=We("button"),B_=Je({},Oi,{tag:De("button"),text:String,icon:String,type:De("default"),size:De("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:De("button"),loadingSize:Pe,loadingText:String,loadingType:String,iconPosition:De("left")});var D_=we({name:P_,props:B_,emits:["click"],setup(e,{emit:t,slots:n}){const s=Cr(),o=()=>n.loading?n.loading():C(xo,{size:e.loadingSize,type:e.loadingType,class:os("loading")},null),i=()=>{if(e.loading)return o();if(n.icon)return C("div",{class:os("icon")},[n.icon()]);if(e.icon)return C(ft,{name:e.icon,class:os("icon"),classPrefix:e.iconPrefix},null)},a=()=>{let d;if(e.loading?d=e.loadingText:d=n.default?n.default():e.text,d)return C("span",{class:os("text")},[d])},r=()=>{const{color:d,plain:c}=e;if(d){const u={color:c?d:"white"};return c||(u.background=d),d.includes("gradient")?u.border=0:u.borderColor=d,u}},l=d=>{e.loading?wn(d):e.disabled||(t("click",d),s())};return()=>{const{tag:d,type:c,size:u,block:f,round:p,plain:_,square:g,loading:m,disabled:v,hairline:S,nativeType:R,iconPosition:x}=e,b=[os([c,u,{plain:_,block:f,round:p,square:g,loading:m,disabled:v,hairline:S}]),{[a_]:S}];return C(d,{type:R,class:b,style:r(),disabled:v,onClick:l},{default:()=>[C("div",{class:os("content")},[x==="left"&&i(),a(),x==="right"&&i()])]})}}});const Zn=Qe(D_),[L_,N_]=We("action-bar-button"),M_=Je({},Oi,{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean});var F_=we({name:L_,props:M_,setup(e,{slots:t}){const n=Cr(),{parent:s,index:o}=Eo(Bd),i=F(()=>{if(s){const r=s.children[o.value-1];return!(r&&"isButton"in r)}}),a=F(()=>{if(s){const r=s.children[o.value+1];return!(r&&"isButton"in r)}});return Zt({isButton:!0}),()=>{const{type:r,icon:l,text:d,color:c,loading:u,disabled:f}=e;return C(Zn,{class:N_([r,{last:a.value,first:i.value}]),size:"large",type:r,icon:l,color:c,loading:u,disabled:f,onClick:n},{default:()=>[t.default?t.default():d]})}}});const Fl=Qe(F_),xr={show:Boolean,zIndex:Pe,overlay:He,duration:Pe,teleport:[String,Object],lockScroll:He,lazyRender:He,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:Ut,transitionAppear:Boolean,closeOnClickOverlay:He},q_=Object.keys(xr);function V_(e,t){return e>t?"horizontal":t>e?"vertical":""}function kr(){const e=q(0),t=q(0),n=q(0),s=q(0),o=q(0),i=q(0),a=q(""),r=q(!0),l=()=>a.value==="vertical",d=()=>a.value==="horizontal",c=()=>{n.value=0,s.value=0,o.value=0,i.value=0,a.value="",r.value=!0};return{move:p=>{const _=p.touches[0];n.value=(_.clientX<0?0:_.clientX)-e.value,s.value=_.clientY-t.value,o.value=Math.abs(n.value),i.value=Math.abs(s.value);const g=10;(!a.value||o.valueDl||i.value>Dl)&&(r.value=!1)},start:p=>{c(),e.value=p.touches[0].clientX,t.value=p.touches[0].clientY},reset:c,startX:e,startY:t,deltaX:n,deltaY:s,offsetX:o,offsetY:i,direction:a,isVertical:l,isHorizontal:d,isTap:r}}let Bs=0;const ql="van-overflow-hidden";function j_(e,t){const n=kr(),s="01",o="10",i=c=>{n.move(c);const u=n.deltaY.value>0?o:s,f=Ed(c.target,e.value),{scrollHeight:p,offsetHeight:_,scrollTop:g}=f;let m="11";g===0?m=_>=p?"00":"01":g+_>=p&&(m="10"),m!=="11"&&n.isVertical()&&!(parseInt(m,2)&parseInt(u,2))&&wn(c,!0)},a=()=>{document.addEventListener("touchstart",n.start),document.addEventListener("touchmove",i,{passive:!1}),Bs||document.body.classList.add(ql),Bs++},r=()=>{Bs&&(document.removeEventListener("touchstart",n.start),document.removeEventListener("touchmove",i),Bs--,Bs||document.body.classList.remove(ql))},l=()=>t()&&a(),d=()=>t()&&r();Ri(l),ts(d),xs(d),Ae(t,c=>{c?a():r()})}function qd(e){const t=q(!1);return Ae(e,n=>{n&&(t.value=n)},{immediate:!0}),n=>()=>t.value?n():null}const Vl=()=>{var e;const{scopeId:t}=((e=Wt())==null?void 0:e.vnode)||{};return t?{[t]:""}:null},[U_,z_]=We("overlay"),H_={show:Boolean,zIndex:Pe,duration:Pe,className:Ut,lockScroll:He,lazyRender:He,customStyle:Object,teleport:[String,Object]};var W_=we({name:U_,inheritAttrs:!1,props:H_,setup(e,{attrs:t,slots:n}){const s=q(),o=qd(()=>e.show||!e.lazyRender),i=r=>{e.lockScroll&&wn(r,!0)},a=o(()=>{var r;const l=Je(Ad(e.zIndex),e.customStyle);return it(e.duration)&&(l.animationDuration=`${e.duration}s`),yn(C("div",$t({ref:s,style:l,class:[z_(),e.className]},t),[(r=n.default)==null?void 0:r.call(n)]),[[bn,e.show]])});return ns("touchmove",i,{target:s}),()=>{const r=C(fo,{name:"van-fade",appear:!0},{default:a});return e.teleport?C(Bu,{to:e.teleport},{default:()=>[r]}):r}}});const K_=Qe(W_),G_=Je({},xr,{round:Boolean,position:De("center"),closeIcon:De("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:De("top-right"),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[J_,jl]=We("popup");var X_=we({name:J_,inheritAttrs:!1,props:G_,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:t,attrs:n,slots:s}){let o,i;const a=q(),r=q(),l=qd(()=>e.show||!e.lazyRender),d=F(()=>{const $={zIndex:a.value};if(it(e.duration)){const B=e.position==="center"?"animationDuration":"transitionDuration";$[B]=`${e.duration}s`}return $}),c=()=>{o||(o=!0,a.value=e.zIndex!==void 0?+e.zIndex:g_(),t("open"))},u=()=>{o&&Er(e.beforeClose,{done(){o=!1,t("close"),t("update:show",!1)}})},f=$=>{t("clickOverlay",$),e.closeOnClickOverlay&&u()},p=()=>{if(e.overlay){const $=Je({show:e.show,class:e.overlayClass,zIndex:a.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},e.overlayProps);return C(K_,$t($,Vl(),{onClick:f}),{default:s["overlay-content"]})}},_=$=>{t("clickCloseIcon",$),u()},g=()=>{if(e.closeable)return C(ft,{role:"button",tabindex:0,name:e.closeIcon,class:[jl("close-icon",e.closeIconPosition),Od],classPrefix:e.iconPrefix,onClick:_},null)};let m;const v=()=>{m&&clearTimeout(m),m=setTimeout(()=>{t("opened")})},S=()=>t("closed"),R=$=>t("keydown",$),x=l(()=>{var $;const{destroyOnClose:B,round:G,position:D,safeAreaInsetTop:X,safeAreaInsetBottom:V,show:O}=e;if(!(!O&&B))return yn(C("div",$t({ref:r,style:d.value,role:"dialog",tabindex:0,class:[jl({round:G,[D]:D}),{"van-safe-area-top":X,"van-safe-area-bottom":V}],onKeydown:R},n,Vl()),[($=s.default)==null?void 0:$.call(s),g()]),[[bn,O]])}),b=()=>{const{position:$,transition:B,transitionAppear:G}=e,D=$==="center"?"van-fade":`van-popup-slide-${$}`;return C(fo,{name:B||D,appear:G,onAfterEnter:v,onAfterLeave:S},{default:x})};return Ae(()=>e.show,$=>{$&&!o&&(c(),n.tabindex===0&&tt(()=>{var B;(B=r.value)==null||B.focus()})),!$&&o&&(o=!1,t("close"))}),Zt({popupRef:r}),j_(r,()=>e.show&&e.lockScroll),ns("popstate",()=>{e.closeOnPopstate&&(u(),i=!1)}),ot(()=>{e.show&&c()}),Cs(()=>{i&&(t("update:show",!0),i=!1)}),ts(()=>{e.show&&e.teleport&&(u(),i=!0)}),cn($d,()=>e.show),()=>e.teleport?C(Bu,{to:e.teleport},{default:()=>[p(),b()]}):C(ye,null,[p(),b()])}});const Ts=Qe(X_);function Y_(e,t,n){let s,o=0;const i=e.scrollLeft,a=n===0?1:Math.round(n*1e3/16);let r=i;function l(){bd(s)}function d(){r+=(t-i)/a,e.scrollLeft=r,++ot||!a&&it?o=ho(c):s&&(o=ho(s))}return c(),d}let Z_=0;function ko(){const e=Wt(),{name:t="unknown"}=(e==null?void 0:e.type)||{};return`${t}-${++Z_}`}function Vd(){const e=q([]),t=[];return ju(()=>{e.value=[]}),[e,s=>(t[s]||(t[s]=o=>{e.value[s]=o}),t[s])]}function jd(e,t){if(!ks||!window.IntersectionObserver)return;const n=new IntersectionObserver(i=>{t(i[0].intersectionRatio>0)},{root:document.body}),s=()=>{e.value&&n.observe(e.value)},o=()=>{e.value&&n.unobserve(e.value)};ts(o),xs(o),Ri(s)}const[eg,tg]=We("sticky"),ng={zIndex:Pe,position:De("top"),container:Object,offsetTop:Jt(0),offsetBottom:Jt(0)};var sg=we({name:eg,props:ng,emits:["scroll","change"],setup(e,{emit:t,slots:n}){const s=q(),o=Sd(s),i=_t({fixed:!1,width:0,height:0,transform:0}),a=q(!1),r=F(()=>Td(e.position==="top"?e.offsetTop:e.offsetBottom)),l=F(()=>{if(a.value)return;const{fixed:f,height:p,width:_}=i;if(f)return{width:`${_}px`,height:`${p}px`}}),d=F(()=>{if(!i.fixed||a.value)return;const f=Je(Ad(e.zIndex),{width:`${i.width}px`,height:`${i.height}px`,[e.position]:`${r.value}px`});return i.transform&&(f.transform=`translate3d(0, ${i.transform}px, 0)`),f}),c=f=>t("scroll",{scrollTop:f,isFixed:i.fixed}),u=()=>{if(!s.value||mo(s))return;const{container:f,position:p}=e,_=rn(s),g=yr(window);if(i.width=_.width,i.height=_.height,p==="top")if(f){const m=rn(f),v=m.bottom-r.value-i.height;i.fixed=r.value>_.top&&m.bottom>0,i.transform=v<0?v:0}else i.fixed=r.value>_.top;else{const{clientHeight:m}=document.documentElement;if(f){const v=rn(f),S=m-v.top-r.value-i.height;i.fixed=m-r.value<_.bottom&&m>v.top,i.transform=S<0?-S:0}else i.fixed=m-r.value<_.bottom}c(g)};return Ae(()=>i.fixed,f=>t("change",f)),ns("scroll",u,{target:o,passive:!0}),jd(s,u),Ae([So,Ii],()=>{!s.value||mo(s)||!i.fixed||(a.value=!0,tt(()=>{const f=rn(s);i.width=f.width,i.height=f.height,a.value=!1}))}),()=>{var f;return C("div",{ref:s,style:l.value},[C("div",{class:tg({fixed:i.fixed&&!a.value}),style:d.value},[(f=n.default)==null?void 0:f.call(n)])])}}});const og=Qe(sg),[Ud,zo]=We("swipe"),ig={loop:He,width:Pe,height:Pe,vertical:Boolean,autoplay:Jt(0),duration:Jt(500),touchable:He,lazyRender:Boolean,initialSwipe:Jt(0),indicatorColor:String,showIndicators:He,stopPropagation:He},zd=Symbol(Ud);var ag=we({name:Ud,props:ig,emits:["change","dragStart","dragEnd"],setup(e,{emit:t,slots:n}){const s=q(),o=q(),i=_t({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let a=!1;const r=kr(),{children:l,linkChildren:d}=vr(zd),c=F(()=>l.length),u=F(()=>i[e.vertical?"height":"width"]),f=F(()=>e.vertical?r.deltaY.value:r.deltaX.value),p=F(()=>i.rect?(e.vertical?i.rect.height:i.rect.width)-u.value*c.value:0),_=F(()=>u.value?Math.ceil(Math.abs(p.value)/u.value):c.value),g=F(()=>c.value*u.value),m=F(()=>(i.active+c.value)%c.value),v=F(()=>{const ne=e.vertical?"vertical":"horizontal";return r.direction.value===ne}),S=F(()=>{const ne={transitionDuration:`${i.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${+i.offset.toFixed(2)}px)`};if(u.value){const he=e.vertical?"height":"width",fe=e.vertical?"width":"height";ne[he]=`${g.value}px`,ne[fe]=e[fe]?`${e[fe]}px`:""}return ne}),R=ne=>{const{active:he}=i;return ne?e.loop?ei(he+ne,-1,c.value):ei(he+ne,0,_.value):he},x=(ne,he=0)=>{let fe=ne*u.value;e.loop||(fe=Math.min(fe,-p.value));let Te=he-fe;return e.loop||(Te=ei(Te,p.value,0)),Te},b=({pace:ne=0,offset:he=0,emitChange:fe})=>{if(c.value<=1)return;const{active:Te}=i,H=R(ne),ce=x(H,he);if(e.loop){if(l[0]&&ce!==p.value){const E=ce0;l[c.value-1].setOffset(E?-g.value:0)}}i.active=H,i.offset=ce,fe&&H!==Te&&t("change",m.value)},$=()=>{i.swiping=!0,i.active<=-1?b({pace:c.value}):i.active>=c.value&&b({pace:-c.value})},B=()=>{$(),r.reset(),Ws(()=>{i.swiping=!1,b({pace:-1,emitChange:!0})})},G=()=>{$(),r.reset(),Ws(()=>{i.swiping=!1,b({pace:1,emitChange:!0})})};let D;const X=()=>clearTimeout(D),V=()=>{X(),+e.autoplay>0&&c.value>1&&(D=setTimeout(()=>{G(),V()},+e.autoplay))},O=(ne=+e.initialSwipe)=>{if(!s.value)return;const he=()=>{var fe,Te;if(!mo(s)){const H={width:s.value.offsetWidth,height:s.value.offsetHeight};i.rect=H,i.width=+((fe=e.width)!=null?fe:H.width),i.height=+((Te=e.height)!=null?Te:H.height)}c.value&&(ne=Math.min(c.value-1,ne),ne===-1&&(ne=c.value-1)),i.active=ne,i.swiping=!0,i.offset=x(ne),l.forEach(H=>{H.setOffset(0)}),V()};mo(s)?tt().then(he):he()},Z=()=>O(i.active);let W;const oe=ne=>{!e.touchable||ne.touches.length>1||(r.start(ne),a=!1,W=Date.now(),X(),$())},de=ne=>{e.touchable&&i.swiping&&(r.move(ne),v.value&&(!e.loop&&(i.active===0&&f.value>0||i.active===c.value-1&&f.value<0)||(wn(ne,e.stopPropagation),b({offset:f.value}),a||(t("dragStart",{index:m.value}),a=!0))))},ee=()=>{if(!e.touchable||!i.swiping)return;const ne=Date.now()-W,he=f.value/ne;if((Math.abs(he)>.25||Math.abs(f.value)>u.value/2)&&v.value){const Te=e.vertical?r.offsetY.value:r.offsetX.value;let H=0;e.loop?H=Te>0?f.value>0?-1:1:0:H=-Math[f.value>0?"ceil":"floor"](f.value/u.value),b({pace:H,emitChange:!0})}else f.value&&b({pace:0});a=!1,i.swiping=!1,t("dragEnd",{index:m.value}),V()},re=(ne,he={})=>{$(),r.reset(),Ws(()=>{let fe;e.loop&&ne===c.value?fe=i.active===0?0:ne:fe=ne%c.value,he.immediate?Ws(()=>{i.swiping=!1}):i.swiping=!1,b({pace:fe-i.active,emitChange:!0})})},Ee=(ne,he)=>{const fe=he===m.value,Te=fe?{backgroundColor:e.indicatorColor}:void 0;return C("i",{style:Te,class:zo("indicator",{active:fe})},null)},Se=()=>{if(n.indicator)return n.indicator({active:m.value,total:c.value});if(e.showIndicators&&c.value>1)return C("div",{class:zo("indicators",{vertical:e.vertical})},[Array(c.value).fill("").map(Ee)])};return Zt({prev:B,next:G,state:i,resize:Z,swipeTo:re}),d({size:u,props:e,count:c,activeIndicator:m}),Ae(()=>e.initialSwipe,ne=>O(+ne)),Ae(c,()=>O(i.active)),Ae(()=>e.autoplay,V),Ae([So,Ii,()=>e.width,()=>e.height],Z),Ae(qm(),ne=>{ne==="visible"?V():X()}),ot(O),Cs(()=>O(i.active)),Sr(()=>O(i.active)),ts(X),xs(X),ns("touchmove",de,{target:o}),()=>{var ne;return C("div",{ref:s,class:zo()},[C("div",{ref:o,style:S.value,class:zo("track",{vertical:e.vertical}),onTouchstartPassive:oe,onTouchend:ee,onTouchcancel:ee},[(ne=n.default)==null?void 0:ne.call(n)]),Se()])}}});const rg=Qe(ag),[lg,Ul]=We("tabs");var cg=we({name:lg,props:{count:Zo(Number),inited:Boolean,animated:Boolean,duration:Zo(Pe),swipeable:Boolean,lazyRender:Boolean,currentIndex:Zo(Number)},emits:["change"],setup(e,{emit:t,slots:n}){const s=q(),o=r=>t("change",r),i=()=>{var r;const l=(r=n.default)==null?void 0:r.call(n);return e.animated||e.swipeable?C(rg,{ref:s,loop:!1,class:Ul("track"),duration:+e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:o},{default:()=>[l]}):l},a=r=>{const l=s.value;l&&l.state.active!==r&&l.swipeTo(r,{immediate:!e.inited})};return Ae(()=>e.currentIndex,a),ot(()=>{a(e.currentIndex)}),Zt({swipeRef:s}),()=>C("div",{class:Ul("content",{animated:e.animated||e.swipeable})},[i()])}});const[Hd,Ho]=We("tabs"),ug={type:De("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:Jt(0),duration:Jt(.3),animated:Boolean,ellipsis:He,swipeable:Boolean,scrollspy:Boolean,offsetTop:Jt(0),background:String,lazyRender:He,showHeader:He,lineWidth:Pe,lineHeight:Pe,beforeChange:Function,swipeThreshold:Jt(5),titleActiveColor:String,titleInactiveColor:String},Wd=Symbol(Hd);var dg=we({name:Hd,props:ug,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:t,slots:n}){let s,o,i,a,r;const l=q(),d=q(),c=q(),u=q(),f=ko(),p=Sd(l),[_,g]=Vd(),{children:m,linkChildren:v}=vr(Wd),S=_t({inited:!1,position:"",lineStyle:{},currentIndex:-1}),R=F(()=>m.length>+e.swipeThreshold||!e.ellipsis||e.shrink),x=F(()=>({borderColor:e.color,background:e.background})),b=(H,ce)=>{var E;return(E=H.name)!=null?E:ce},$=F(()=>{const H=m[S.currentIndex];if(H)return b(H,S.currentIndex)}),B=F(()=>Td(e.offsetTop)),G=F(()=>e.sticky?B.value+s:0),D=H=>{const ce=d.value,E=_.value;if(!R.value||!ce||!E||!E[S.currentIndex])return;const N=E[S.currentIndex].$el,U=N.offsetLeft-(ce.offsetWidth-N.offsetWidth)/2;a&&a(),a=Y_(ce,U,H?0:+e.duration)},X=()=>{const H=S.inited;tt(()=>{const ce=_.value;if(!ce||!ce[S.currentIndex]||e.type!=="line"||mo(l.value))return;const E=ce[S.currentIndex].$el,{lineWidth:N,lineHeight:U}=e,L=E.offsetLeft+E.offsetWidth/2,z={width:at(N),backgroundColor:e.color,transform:`translateX(${L}px) translateX(-50%)`};if(H&&(z.transitionDuration=`${e.duration}s`),it(U)){const y=at(U);z.height=y,z.borderRadius=y}S.lineStyle=z})},V=H=>{const ce=H=0&&H{const E=V(H);if(!it(E))return;const N=m[E],U=b(N,E),L=S.currentIndex!==null;S.currentIndex!==E&&(S.currentIndex=E,ce||D(),X()),U!==e.active&&(t("update:active",U),L&&t("change",U,N.title)),i&&!e.scrollspy&&wr(Math.ceil(Ol(l.value)-B.value))},Z=(H,ce)=>{const E=m.findIndex((N,U)=>b(N,U)===H);O(E===-1?0:E,ce)},W=(H=!1)=>{if(e.scrollspy){const ce=m[S.currentIndex].$el;if(ce&&p.value){const E=Ol(ce,p.value)-G.value;o=!0,r&&r(),r=Q_(p.value,E,H?0:+e.duration,()=>{o=!1})}}},oe=(H,ce,E)=>{const{title:N,disabled:U}=m[ce],L=b(m[ce],ce);U||(Er(e.beforeChange,{args:[L],done:()=>{O(ce),W()}}),Dd(H)),t("clickTab",{name:L,title:N,event:E,disabled:U})},de=H=>{i=H.isFixed,t("scroll",H)},ee=H=>{tt(()=>{Z(H),W(!0)})},re=()=>{for(let H=0;HG.value)return H===0?0:H-1}return m.length-1},Ee=()=>{if(e.scrollspy&&!o){const H=re();O(H)}},Se=()=>{if(e.type==="line"&&m.length)return C("div",{class:Ho("line"),style:S.lineStyle},null)},ne=()=>{var H,ce,E;const{type:N,border:U,sticky:L}=e,z=[C("div",{ref:L?void 0:c,class:[Ho("wrap"),{[r_]:N==="line"&&U}]},[C("div",{ref:d,role:"tablist",class:Ho("nav",[N,{shrink:e.shrink,complete:R.value}]),style:x.value,"aria-orientation":"horizontal"},[(H=n["nav-left"])==null?void 0:H.call(n),m.map(y=>y.renderTitle(oe)),Se(),(ce=n["nav-right"])==null?void 0:ce.call(n)])]),(E=n["nav-bottom"])==null?void 0:E.call(n)];return L?C("div",{ref:c},[z]):z},he=()=>{X(),tt(()=>{var H,ce;D(!0),(ce=(H=u.value)==null?void 0:H.swipeRef.value)==null||ce.resize()})};Ae(()=>[e.color,e.duration,e.lineWidth,e.lineHeight],X),Ae(So,he),Ae(()=>e.active,H=>{H!==$.value&&Z(H)}),Ae(()=>m.length,()=>{S.inited&&(Z(e.active),X(),tt(()=>{D(!0)}))});const fe=()=>{Z(e.active,!0),tt(()=>{S.inited=!0,c.value&&(s=rn(c.value).height),D(!0)})},Te=(H,ce)=>t("rendered",H,ce);return Zt({resize:he,scrollTo:ee}),Cs(X),Sr(X),Ri(fe),jd(l,X),ns("scroll",Ee,{target:p,passive:!0}),v({id:f,props:e,setLine:X,scrollable:R,onRendered:Te,currentName:$,setTitleRefs:g,scrollIntoView:D}),()=>C("div",{ref:l,class:Ho([e.type])},[e.showHeader?e.sticky?C(og,{container:l.value,offsetTop:B.value,onScroll:de},{default:()=>[ne()]}):ne():null,C(cg,{ref:u,count:m.length,inited:S.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:S.currentIndex,onChange:O},{default:()=>{var H;return[(H=n.default)==null?void 0:H.call(n)]}})])}});const fg=Symbol(),Kd=Symbol(),pg=()=>mt(Kd,null),hg=e=>{const t=pg();cn(fg,e),cn(Kd,F(()=>(t==null||t.value)&&e.value))},[mg,zl]=We("tab"),_g=we({name:mg,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:Pe,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:He},setup(e,{slots:t}){const n=F(()=>{const o={},{type:i,color:a,disabled:r,isActive:l,activeColor:d,inactiveColor:c}=e;a&&i==="card"&&(o.borderColor=a,r||(l?o.backgroundColor=a:o.color=a));const f=l?d:c;return f&&(o.color=f),o}),s=()=>{const o=C("span",{class:zl("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||it(e.badge)&&e.badge!==""?C(Ld,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[o]}):o};return()=>C("div",{id:e.id,role:"tab",class:[zl([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:n.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls,"data-allow-mismatch":"attribute"},[s()])}}),[gg,vg]=We("swipe-item");var yg=we({name:gg,setup(e,{slots:t}){let n;const s=_t({offset:0,inited:!1,mounted:!1}),{parent:o,index:i}=Eo(zd);if(!o)return;const a=F(()=>{const d={},{vertical:c}=o.props;return o.size.value&&(d[c?"height":"width"]=`${o.size.value}px`),s.offset&&(d.transform=`translate${c?"Y":"X"}(${s.offset}px)`),d}),r=F(()=>{const{loop:d,lazyRender:c}=o.props;if(!c||n)return!0;if(!s.mounted)return!1;const u=o.activeIndicator.value,f=o.count.value-1,p=u===0&&d?f:u-1,_=u===f&&d?0:u+1;return n=i.value===u||i.value===p||i.value===_,n}),l=d=>{s.offset=d};return ot(()=>{tt(()=>{s.mounted=!0})}),Zt({setOffset:l}),()=>{var d;return C("div",{class:vg(),style:a.value},[r.value?(d=t.default)==null?void 0:d.call(t):null])}}});const bg=Qe(yg),[wg,ta]=We("tab"),Eg=Je({},Oi,{dot:Boolean,name:Pe,badge:Pe,title:String,disabled:Boolean,titleClass:Ut,titleStyle:[String,Object],showZeroBadge:He});var Sg=we({name:wg,props:Eg,setup(e,{slots:t}){const n=ko(),s=q(!1),o=Wt(),{parent:i,index:a}=Eo(Wd);if(!i)return;const r=()=>{var _;return(_=e.name)!=null?_:a.value},l=()=>{s.value=!0,i.props.lazyRender&&tt(()=>{i.onRendered(r(),e.title)})},d=F(()=>{const _=r()===i.currentName.value;return _&&!s.value&&l(),_}),c=q(""),u=q("");Iu(()=>{const{titleClass:_,titleStyle:g}=e;c.value=_?ge(_):"",u.value=g&&typeof g!="string"?up(jt(g)):g});const f=_=>C(_g,$t({key:n,id:`${i.id}-${a.value}`,ref:i.setTitleRefs(a.value),style:u.value,class:c.value,isActive:d.value,controls:n,scrollable:i.scrollable.value,activeColor:i.props.titleActiveColor,inactiveColor:i.props.titleInactiveColor,onClick:g=>_(o.proxy,a.value,g)},Qn(i.props,["type","color","shrink"]),Qn(e,["dot","badge","title","disabled","showZeroBadge"])),{title:t.title}),p=q(!d.value);return Ae(d,_=>{_?p.value=!1:Ws(()=>{p.value=!0})}),Ae(()=>e.title,()=>{i.setLine(),i.scrollIntoView()}),hg(d),Zt({id:n,renderTitle:f}),()=>{var _;const g=`${i.id}-${a.value}`,{animated:m,swipeable:v,scrollspy:S,lazyRender:R}=i.props;if(!t.default&&!m)return;const x=S||d.value;if(m||v)return C(bg,{id:n,role:"tabpanel",class:ta("panel-wrapper",{inactive:p.value}),tabindex:d.value?0:-1,"aria-hidden":!d.value,"aria-labelledby":g,"data-allow-mismatch":"attribute"},{default:()=>{var B;return[C("div",{class:ta("panel")},[(B=t.default)==null?void 0:B.call(t)])]}});const $=s.value||S||!R?(_=t.default)==null?void 0:_.call(t):null;return yn(C("div",{id:n,role:"tabpanel",class:ta("panel"),tabindex:x?0:-1,"aria-labelledby":g,"data-allow-mismatch":"attribute"},[$]),[[bn,x]])}}});const Cg=Qe(Sg),xg=Qe(dg),[kg,is]=We("cell"),Gd={tag:De("div"),icon:String,size:String,title:Pe,value:Pe,label:Pe,center:Boolean,isLink:Boolean,border:He,iconPrefix:String,valueClass:Ut,labelClass:Ut,titleClass:Ut,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},Ag=Je({},Gd,Oi);var Tg=we({name:kg,props:Ag,setup(e,{slots:t}){const n=Cr(),s=()=>{if(t.label||it(e.label))return C("div",{class:[is("label"),e.labelClass]},[t.label?t.label():e.label])},o=()=>{var l;if(t.title||it(e.title)){const d=(l=t.title)==null?void 0:l.call(t);return Array.isArray(d)&&d.length===0?void 0:C("div",{class:[is("title"),e.titleClass],style:e.titleStyle},[d||C("span",null,[e.title]),s()])}},i=()=>{const l=t.value||t.default;if(l||it(e.value))return C("div",{class:[is("value"),e.valueClass]},[l?l():C("span",null,[e.value])])},a=()=>{if(t.icon)return t.icon();if(e.icon)return C(ft,{name:e.icon,class:is("left-icon"),classPrefix:e.iconPrefix},null)},r=()=>{if(t["right-icon"])return t["right-icon"]();if(e.isLink){const l=e.arrowDirection&&e.arrowDirection!=="right"?`arrow-${e.arrowDirection}`:"arrow";return C(ft,{name:l,class:is("right-icon")},null)}};return()=>{var l;const{tag:d,size:c,center:u,border:f,isLink:p,required:_}=e,g=(l=e.clickable)!=null?l:p,m={center:u,required:!!_,clickable:g,borderless:!f};return c&&(m[c]=!!c),C(d,{class:is(m),role:g?"button":void 0,tabindex:g?0:void 0,onClick:n},{default:()=>{var v;return[a(),o(),i(),r(),(v=t.extra)==null?void 0:v.call(t)]}})}}});const Rg=Qe(Tg);function Jd(e){return Array.isArray(e)?!e.length:e===0?!1:!e}function Ig(e,t){if(Jd(e)){if(t.required)return!1;if(t.validateEmpty===!1)return!0}return!(t.pattern&&!t.pattern.test(String(e)))}function Og(e,t){return new Promise(n=>{const s=t.validator(e,t);if(gd(s)){s.then(n);return}n(s)})}function Hl(e,t){const{message:n}=t;return po(n)?n(e,t):n||""}function $g({target:e}){e.composing=!0}function Wl({target:e}){e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}function Pg(e,t){const n=br();e.style.height="auto";let s=e.scrollHeight;if(wo(t)){const{maxHeight:o,minHeight:i}=t;o!==void 0&&(s=Math.min(s,o)),i!==void 0&&(s=Math.max(s,i))}s&&(e.style.height=`${s}px`,wr(n))}function Bg(e,t){return e==="number"&&(e="text",t??(t="decimal")),e==="digit"&&(e="tel",t??(t="numeric")),{type:e,inputmode:t}}function Ds(e){return[...e].length}function na(e,t){return[...e].slice(0,t).join("")}const[Dg,Ft]=We("field"),Ar={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:Pe,max:Number,min:Number,formatter:Function,clearIcon:De("clear"),modelValue:Jt(""),inputAlign:String,placeholder:String,autocomplete:String,autocapitalize:String,autocorrect:String,errorMessage:String,enterkeyhint:String,clearTrigger:De("focus"),formatTrigger:De("onChange"),spellcheck:{type:Boolean,default:null},error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},inputmode:String},Lg=Je({},Gd,Ar,{rows:Pe,type:De("text"),rules:Array,autosize:[Boolean,Object],labelWidth:Pe,labelClass:Ut,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}});var Ng=we({name:Dg,props:Lg,emits:["blur","focus","clear","keypress","clickInput","endValidate","startValidate","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:n}){const s=ko(),o=_t({status:"unvalidated",focused:!1,validateMessage:""}),i=q(),a=q(),r=q(),{parent:l}=Eo(l_),d=()=>{var E;return String((E=e.modelValue)!=null?E:"")},c=E=>{if(it(e[E]))return e[E];if(l&&it(l.props[E]))return l.props[E]},u=F(()=>{const E=c("readonly");if(e.clearable&&!E){const N=d()!=="",U=e.clearTrigger==="always"||e.clearTrigger==="focus"&&o.focused;return N&&U}return!1}),f=F(()=>r.value&&n.input?r.value():e.modelValue),p=F(()=>{var E;const N=c("required");return N==="auto"?(E=e.rules)==null?void 0:E.some(U=>U.required):N}),_=E=>E.reduce((N,U)=>N.then(()=>{if(o.status==="failed")return;let{value:L}=f;if(U.formatter&&(L=U.formatter(L,U)),!Ig(L,U)){o.status="failed",o.validateMessage=Hl(L,U);return}if(U.validator)return Jd(L)&&U.validateEmpty===!1?void 0:Og(L,U).then(z=>{z&&typeof z=="string"?(o.status="failed",o.validateMessage=z):z===!1&&(o.status="failed",o.validateMessage=Hl(L,U))})}),Promise.resolve()),g=()=>{o.status="unvalidated",o.validateMessage=""},m=()=>t("endValidate",{status:o.status,message:o.validateMessage}),v=(E=e.rules)=>new Promise(N=>{g(),E?(t("startValidate"),_(E).then(()=>{o.status==="failed"?(N({name:e.name,message:o.validateMessage}),m()):(o.status="passed",N(),m())})):N()}),S=E=>{if(l&&e.rules){const{validateTrigger:N}=l.props,U=Tl(N).includes(E),L=e.rules.filter(z=>z.trigger?Tl(z.trigger).includes(E):U);L.length&&v(L)}},R=E=>{var N;const{maxlength:U}=e;if(it(U)&&Ds(E)>+U){const L=d();if(L&&Ds(L)===+U)return L;let z=(N=i.value)==null?void 0:N.selectionEnd;if(o.focused&&z){const y=[...E],w=y.length-+U;return z=Ds(E.slice(0,z)),y.splice(z-w,w),y.join("")}return na(E,+U)}return E},x=(E,N="onChange")=>{var U,L;const z=E;E=R(E);const y=z.length-E.length;if(e.type==="number"||e.type==="digit"){const A=e.type==="number";if(E=Xm(E,A,A),N==="onBlur"&&E!==""&&(e.min!==void 0||e.max!==void 0)){const j=ei(+E,(U=e.min)!=null?U:-1/0,(L=e.max)!=null?L:1/0);+E!==j&&(E=j.toString())}}let w=0;if(e.formatter&&N===e.formatTrigger){const{formatter:A,maxlength:j}=e;if(E=A(E),it(j)&&Ds(E)>+j&&(E=na(E,+j)),i.value&&o.focused){const{selectionEnd:J}=i.value,K=na(z,J);w=A(K).length-K.length}}if(i.value&&i.value.value!==E)if(o.focused){let{selectionStart:A,selectionEnd:j}=i.value;if(i.value.value=E,it(A)&&it(j)){const J=E.length;y?(A-=y,j-=y):w&&(A+=w,j+=w),i.value.setSelectionRange(Math.min(A,J),Math.min(j,J))}}else i.value.value=E;E!==e.modelValue&&t("update:modelValue",E)},b=E=>{E.target.composing||x(E.target.value)},$=()=>{var E;return(E=i.value)==null?void 0:E.blur()},B=()=>{var E;return(E=i.value)==null?void 0:E.focus()},G=()=>{const E=i.value;e.type==="textarea"&&e.autosize&&E&&Pg(E,e.autosize)},D=E=>{o.focused=!0,t("focus",E),tt(G),c("readonly")&&$()},X=E=>{o.focused=!1,x(d(),"onBlur"),t("blur",E),!c("readonly")&&(S("onBlur"),tt(G),jm())},V=E=>t("clickInput",E),O=E=>t("clickLeftIcon",E),Z=E=>t("clickRightIcon",E),W=E=>{wn(E),t("update:modelValue",""),t("clear",E)},oe=F(()=>{if(typeof e.error=="boolean")return e.error;if(l&&l.props.showError&&o.status==="failed")return!0}),de=F(()=>{const E=c("labelWidth"),N=c("labelAlign");if(E&&N!=="top")return{width:at(E)}}),ee=E=>{E.keyCode===13&&(!(l&&l.props.submitOnEnter)&&e.type!=="textarea"&&wn(E),e.type==="search"&&$()),t("keypress",E)},re=()=>e.id||`${s}-input`,Ee=()=>o.status,Se=()=>{const E=Ft("control",[c("inputAlign"),{error:oe.value,custom:!!n.input,"min-height":e.type==="textarea"&&!e.autosize}]);if(n.input)return C("div",{class:E,onClick:V},[n.input()]);const N={id:re(),ref:i,name:e.name,rows:e.rows!==void 0?+e.rows:void 0,class:E,disabled:c("disabled"),readonly:c("readonly"),autofocus:e.autofocus,placeholder:e.placeholder,autocomplete:e.autocomplete,autocapitalize:e.autocapitalize,autocorrect:e.autocorrect,enterkeyhint:e.enterkeyhint,spellcheck:e.spellcheck,"aria-labelledby":e.label?`${s}-label`:void 0,"data-allow-mismatch":"attribute",onBlur:X,onFocus:D,onInput:b,onClick:V,onChange:Wl,onKeypress:ee,onCompositionend:Wl,onCompositionstart:$g};return e.type==="textarea"?C("textarea",$t(N,{inputmode:e.inputmode}),null):C("input",$t(Bg(e.type,e.inputmode),N),null)},ne=()=>{const E=n["left-icon"];if(e.leftIcon||E)return C("div",{class:Ft("left-icon"),onClick:O},[E?E():C(ft,{name:e.leftIcon,classPrefix:e.iconPrefix},null)])},he=()=>{const E=n["right-icon"];if(e.rightIcon||E)return C("div",{class:Ft("right-icon"),onClick:Z},[E?E():C(ft,{name:e.rightIcon,classPrefix:e.iconPrefix},null)])},fe=()=>{if(e.showWordLimit&&e.maxlength){const E=Ds(d());return C("div",{class:Ft("word-limit")},[C("span",{class:Ft("word-num")},[E]),Le("/"),e.maxlength])}},Te=()=>{if(l&&l.props.showErrorMessage===!1)return;const E=e.errorMessage||o.validateMessage;if(E){const N=n["error-message"],U=c("errorMessageAlign");return C("div",{class:Ft("error-message",U)},[N?N({message:E}):E])}},H=()=>{const E=c("labelWidth"),N=c("labelAlign"),U=c("colon")?":":"";if(n.label)return[n.label(),U];if(e.label)return C("label",{id:`${s}-label`,for:n.input?void 0:re(),"data-allow-mismatch":"attribute",onClick:L=>{wn(L),B()},style:N==="top"&&E?{width:at(E)}:void 0},[e.label+U])},ce=()=>[C("div",{class:Ft("body")},[Se(),u.value&&C(ft,{ref:a,name:e.clearIcon,class:Ft("clear")},null),he(),n.button&&C("div",{class:Ft("button")},[n.button()])]),fe(),Te()];return Zt({blur:$,focus:B,validate:v,formValue:f,resetValidation:g,getValidationStatus:Ee}),cn(Cd,{customValue:r,resetValidation:g,validateWithTrigger:S}),Ae(()=>e.modelValue,()=>{x(d()),g(),S("onChange"),tt(G)}),ot(()=>{x(d(),e.formatTrigger),tt(G)}),ns("touchstart",W,{target:F(()=>{var E;return(E=a.value)==null?void 0:E.$el})}),()=>{const E=c("disabled"),N=c("labelAlign"),U=ne(),L=()=>{const z=H();return N==="top"?[U,z].filter(Boolean):z||[]};return C(Rg,{size:e.size,class:Ft({error:oe.value,disabled:E,[`label-${N}`]:N}),center:e.center,border:e.border,isLink:e.isLink,clickable:e.clickable,titleStyle:de.value,valueClass:Ft("value"),titleClass:[Ft("label",[N,{required:p.value}]),e.labelClass],arrowDirection:e.arrowDirection},{icon:U&&N!=="top"?()=>U:null,title:L,value:ce,extra:n.extra})}}});const Tr=Qe(Ng);let Ls=0;function Mg(e){e?(Ls||document.body.classList.add("van-toast--unclickable"),Ls++):Ls&&(Ls--,Ls||document.body.classList.remove("van-toast--unclickable"))}const[Fg,as]=We("toast"),qg=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],Vg={icon:String,show:Boolean,type:De("text"),overlay:Boolean,message:Pe,iconSize:Pe,duration:yd(2e3),position:De("middle"),teleport:[String,Object],wordBreak:String,className:Ut,iconPrefix:String,transition:De("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:Ut,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:Pe};var Xd=we({name:Fg,props:Vg,emits:["update:show"],setup(e,{emit:t,slots:n}){let s,o=!1;const i=()=>{const u=e.show&&e.forbidClick;o!==u&&(o=u,Mg(o))},a=u=>t("update:show",u),r=()=>{e.closeOnClick&&a(!1)},l=()=>clearTimeout(s),d=()=>{const{icon:u,type:f,iconSize:p,iconPrefix:_,loadingType:g}=e;if(u||f==="success"||f==="fail")return C(ft,{name:u||f,size:p,class:as("icon"),classPrefix:_},null);if(f==="loading")return C(xo,{class:as("loading"),size:p,type:g},null)},c=()=>{const{type:u,message:f}=e;if(n.message)return C("div",{class:as("text")},[n.message()]);if(it(f)&&f!=="")return u==="html"?C("div",{key:0,class:as("text"),innerHTML:String(f)},null):C("div",{class:as("text")},[f])};return Ae(()=>[e.show,e.forbidClick],i),Ae(()=>[e.show,e.type,e.message,e.duration],()=>{l(),e.show&&e.duration>0&&(s=setTimeout(()=>{a(!1)},e.duration))}),ot(i),Nn(i),()=>C(Ts,$t({class:[as([e.position,e.wordBreak==="normal"?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:r,onClosed:l,"onUpdate:show":a},Qn(e,qg)),{default:()=>[d(),c()]})}});function Yd(){const e=_t({show:!1}),t=o=>{e.show=o},n=o=>{Je(e,o,{transitionAppear:!0}),t(!0)},s=()=>t(!1);return Zt({open:n,close:s,toggle:t}),{open:n,close:s,state:e,toggle:t}}function Qd(e){const t=_d(e),n=document.createElement("div");return document.body.appendChild(n),{instance:t.mount(n),unmount(){t.unmount(),document.body.removeChild(n)}}}const jg={icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1};let fs=[],Ug=!1,Kl=Je({},jg);const zg=new Map;function Zd(e){return wo(e)?e:{message:e}}function Hg(){const{instance:e}=Qd({setup(){const t=q(""),{open:n,state:s,close:o,toggle:i}=Yd(),a=()=>{},r=()=>C(Xd,$t(s,{onClosed:a,"onUpdate:show":i}),null);return Ae(t,l=>{s.message=l}),Wt().render=r,{open:n,close:o,message:t}}});return e}function Wg(){if(!fs.length||Ug){const e=Hg();fs.push(e)}return fs[fs.length-1]}function xe(e={}){if(!ks)return{};const t=Wg(),n=Zd(e);return t.open(Je({},Kl,zg.get(n.type||Kl.type),n)),t}const Rr=e=>t=>xe(Je({type:e},Zd(t))),Kg=Rr("loading"),rT=Rr("success"),Gg=Rr("fail"),Gl=e=>{fs.length&&fs[0].close()};Qe(Xd);const[Jg]=We("checkbox-group"),Xg=Symbol(Jg),[Yg,Jl]=We("tag"),Qg={size:String,mark:Boolean,show:He,type:De("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean};var Zg=we({name:Yg,props:Qg,emits:["close"],setup(e,{slots:t,emit:n}){const s=a=>{a.stopPropagation(),n("close",a)},o=()=>e.plain?{color:e.textColor||e.color,borderColor:e.color}:{color:e.textColor,background:e.color},i=()=>{var a;const{type:r,mark:l,plain:d,round:c,size:u,closeable:f}=e,p={mark:l,plain:d,round:c};u&&(p[u]=u);const _=f&&C(ft,{name:"cross",class:[Jl("close"),Od],onClick:s},null);return C("span",{style:o(),class:Jl([p,r])},[(a=t.default)==null?void 0:a.call(t),_])};return()=>C(fo,{name:e.closeable?"van-fade":void 0},{default:()=>[e.show?i():null]})}});const ev=Qe(Zg),ef={name:Ut,disabled:Boolean,iconSize:Pe,modelValue:Ut,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var tv=we({props:Je({},ef,{bem:Zo(Function),role:String,shape:String,parent:Object,checked:Boolean,bindGroup:He,indeterminate:{type:Boolean,default:null}}),emits:["click","toggle"],setup(e,{emit:t,slots:n}){const s=q(),o=f=>{if(e.parent&&e.bindGroup)return e.parent.props[f]},i=F(()=>{if(e.parent&&e.bindGroup){const f=o("disabled")||e.disabled;if(e.role==="checkbox"){const p=o("modelValue").length,_=o("max"),g=_&&p>=+_;return f||g&&!e.checked}return f}return e.disabled}),a=F(()=>o("direction")),r=F(()=>{const f=e.checkedColor||o("checkedColor");if(f&&(e.checked||e.indeterminate)&&!i.value)return{borderColor:f,backgroundColor:f}}),l=F(()=>e.shape||o("shape")||"round"),d=f=>{const{target:p}=f,_=s.value,g=_===p||(_==null?void 0:_.contains(p));!i.value&&(g||!e.labelDisabled)&&t("toggle"),t("click",f)},c=()=>{var f,p;const{bem:_,checked:g,indeterminate:m}=e,v=e.iconSize||o("iconSize");return C("div",{ref:s,class:_("icon",[l.value,{disabled:i.value,checked:g,indeterminate:m}]),style:l.value!=="dot"?{fontSize:at(v)}:{width:at(v),height:at(v),borderColor:(f=r.value)==null?void 0:f.borderColor}},[n.icon?n.icon({checked:g,disabled:i.value}):l.value!=="dot"?C(ft,{name:m?"minus":"success",style:r.value},null):C("div",{class:_("icon--dot__icon"),style:{backgroundColor:(p=r.value)==null?void 0:p.backgroundColor}},null)])},u=()=>{const{checked:f}=e;if(n.default)return C("span",{class:e.bem("label",[e.labelPosition,{disabled:i.value}])},[n.default({checked:f,disabled:i.value})])};return()=>{const f=e.labelPosition==="left"?[u(),c()]:[c(),u()];return C("div",{role:e.role,class:e.bem([{disabled:i.value,"label-disabled":e.labelDisabled},a.value]),tabindex:i.value?void 0:0,"aria-checked":e.checked,onClick:d},[f])}}});const[nv,sv]=We("checkbox"),ov=Je({},ef,{shape:String,bindGroup:He,indeterminate:{type:Boolean,default:null}});var iv=we({name:nv,props:ov,emits:["change","update:modelValue"],setup(e,{emit:t,slots:n}){const{parent:s}=Eo(Xg),o=r=>{const{name:l}=e,{max:d,modelValue:c}=s.props,u=c.slice();if(r)!(d&&u.length>=+d)&&!u.includes(l)&&(u.push(l),e.bindGroup&&s.updateValue(u));else{const f=u.indexOf(l);f!==-1&&(u.splice(f,1),e.bindGroup&&s.updateValue(u))}},i=F(()=>s&&e.bindGroup?s.props.modelValue.indexOf(e.name)!==-1:!!e.modelValue),a=(r=!i.value)=>{s&&e.bindGroup?o(r):t("update:modelValue",r),e.indeterminate!==null&&t("change",r)};return Ae(()=>e.modelValue,r=>{e.indeterminate===null&&t("change",r)}),Zt({toggle:a,props:e,checked:i}),xd(()=>e.modelValue),()=>C(tv,$t({bem:sv,role:"checkbox",parent:s,checked:i.value,onToggle:a},e),Qn(n,["default","icon"]))}});const av=Qe(iv),rv=Qe(S_),[lv,Wo]=We("empty"),cv={image:De("default"),imageSize:[Number,String,Array],description:String};var uv=we({name:lv,props:cv,setup(e,{slots:t}){const n=()=>{const v=t.description?t.description():e.description;if(v)return C("p",{class:Wo("description")},[v])},s=()=>{if(t.default)return C("div",{class:Wo("bottom")},[t.default()])},o=ko(),i=v=>`${o}-${v}`,a=v=>`url(#${i(v)})`,r=(v,S,R)=>C("stop",{"stop-color":v,offset:`${S}%`,"stop-opacity":R},null),l=(v,S)=>[r(v,0),r(S,100)],d=v=>[C("defs",null,[C("radialGradient",{id:i(v),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)","data-allow-mismatch":"attribute"},[r("#EBEDF0",0),r("#F2F3F5",100,.3)])]),C("ellipse",{fill:a(v),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8","data-allow-mismatch":"attribute"},null)],c=()=>[C("defs",null,[C("linearGradient",{id:i("a"),x1:"64%",y1:"100%",x2:"64%","data-allow-mismatch":"attribute"},[r("#FFF",0,.5),r("#F2F3F5",100)])]),C("g",{opacity:".8","data-allow-mismatch":"children"},[C("path",{d:"M36 131V53H16v20H2v58h34z",fill:a("a")},null),C("path",{d:"M123 15h22v14h9v77h-31V15z",fill:a("a")},null)])],u=()=>[C("defs",null,[C("linearGradient",{id:i("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%","data-allow-mismatch":"attribute"},[r("#F2F3F5",0,.3),r("#F2F3F5",100)])]),C("g",{opacity:".8","data-allow-mismatch":"children"},[C("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:a("b")},null),C("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:a("b")},null)])],f=()=>C("svg",{viewBox:"0 0 160 160"},[C("defs",{"data-allow-mismatch":"children"},[C("linearGradient",{id:i(1),x1:"64%",y1:"100%",x2:"64%"},[r("#FFF",0,.5),r("#F2F3F5",100)]),C("linearGradient",{id:i(2),x1:"50%",x2:"50%",y2:"84%"},[r("#EBEDF0",0),r("#DCDEE0",100,0)]),C("linearGradient",{id:i(3),x1:"100%",x2:"100%",y2:"100%"},[l("#EAEDF0","#DCDEE0")]),C("radialGradient",{id:i(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[r("#EBEDF0",0),r("#FFF",100,0)])]),C("g",{fill:"none"},[c(),C("path",{fill:a(4),d:"M0 139h160v21H0z","data-allow-mismatch":"attribute"},null),C("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:a(2),"data-allow-mismatch":"attribute"},null),C("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7","data-allow-mismatch":"children"},[C("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:a(3)},null),C("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:a(3)},null),C("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:a(3)},null),C("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:a(3)},null)]),C("g",{transform:"translate(31 105)"},[C("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),C("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),C("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),p=()=>C("svg",{viewBox:"0 0 160 160"},[C("defs",{"data-allow-mismatch":"children"},[C("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:i(5)},[l("#F2F3F5","#DCDEE0")]),C("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:i(6)},[l("#EAEDF1","#DCDEE0")]),C("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:i(7)},[l("#EAEDF1","#DCDEE0")])]),c(),u(),C("g",{transform:"translate(36 50)",fill:"none"},[C("g",{transform:"translate(8)"},[C("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),C("rect",{fill:a(5),width:"64",height:"66",rx:"2","data-allow-mismatch":"attribute"},null),C("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),C("g",{transform:"translate(15 17)",fill:a(6),"data-allow-mismatch":"attribute"},[C("rect",{width:"34",height:"6",rx:"1"},null),C("path",{d:"M0 14h34v6H0z"},null),C("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),C("rect",{fill:a(7),y:"61",width:"88",height:"28",rx:"1","data-allow-mismatch":"attribute"},null),C("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),_=()=>C("svg",{viewBox:"0 0 160 160"},[C("defs",null,[C("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:i(8),"data-allow-mismatch":"attribute"},[l("#EAEDF1","#DCDEE0")])]),c(),u(),d("c"),C("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:a(8),"data-allow-mismatch":"attribute"},null)]),g=()=>C("svg",{viewBox:"0 0 160 160"},[C("defs",{"data-allow-mismatch":"children"},[C("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:i(9)},[l("#EEE","#D8D8D8")]),C("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:i(10)},[l("#F2F3F5","#DCDEE0")]),C("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:i(11)},[l("#F2F3F5","#DCDEE0")]),C("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:i(12)},[l("#FFF","#F7F8FA")])]),c(),u(),d("d"),C("g",{transform:"rotate(-45 113 -4)",fill:"none","data-allow-mismatch":"children"},[C("rect",{fill:a(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),C("rect",{fill:a(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),C("circle",{stroke:a(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),C("circle",{fill:a(12),cx:"27",cy:"27",r:"16"},null),C("path",{d:"M37 7c-8 0-15 5-16 12",stroke:a(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),m=()=>{var v;if(t.image)return t.image();const S={error:_,search:g,network:f,default:p};return((v=S[e.image])==null?void 0:v.call(S))||C("img",{src:e.image},null)};return()=>C("div",{class:Wo()},[C("div",{class:Wo("image"),style:kd(e.imageSize)},[m()]),n(),s()])}});const tf=Qe(uv),[dv,Kt,Ko]=We("dialog"),fv=Je({},xr,{title:String,theme:String,width:Pe,message:[String,Function],callback:Function,allowHtml:Boolean,className:Ut,transition:De("van-dialog-bounce"),messageAlign:String,closeOnPopstate:He,showCancelButton:Boolean,cancelButtonText:String,cancelButtonColor:String,cancelButtonDisabled:Boolean,confirmButtonText:String,confirmButtonColor:String,confirmButtonDisabled:Boolean,showConfirmButton:He,closeOnClickOverlay:Boolean,keyboardEnabled:He,destroyOnClose:Boolean}),pv=[...q_,"transition","closeOnPopstate","destroyOnClose"];var nf=we({name:dv,props:fv,emits:["confirm","cancel","keydown","update:show"],setup(e,{emit:t,slots:n}){const s=q(),o=_t({confirm:!1,cancel:!1}),i=v=>t("update:show",v),a=v=>{var S;i(!1),(S=e.callback)==null||S.call(e,v)},r=v=>()=>{e.show&&(t(v),e.beforeClose?(o[v]=!0,Er(e.beforeClose,{args:[v],done(){a(v),o[v]=!1},canceled(){o[v]=!1}})):a(v))},l=r("cancel"),d=r("confirm"),c=md(v=>{var S,R;if(!e.keyboardEnabled||v.target!==((R=(S=s.value)==null?void 0:S.popupRef)==null?void 0:R.value))return;({Enter:e.showConfirmButton?d:Pa,Escape:e.showCancelButton?l:Pa})[v.key](),t("keydown",v)},["enter","esc"]),u=()=>{const v=n.title?n.title():e.title;if(v)return C("div",{class:Kt("header",{isolated:!e.message&&!n.default})},[v])},f=v=>{const{message:S,allowHtml:R,messageAlign:x}=e,b=Kt("message",{"has-title":v,[x]:x}),$=po(S)?S():S;return R&&typeof $=="string"?C("div",{class:b,innerHTML:$},null):C("div",{class:b},[$])},p=()=>{if(n.default)return C("div",{class:Kt("content")},[n.default()]);const{title:v,message:S,allowHtml:R}=e;if(S){const x=!!(v||n.title);return C("div",{key:R?1:0,class:Kt("content",{isolated:!x})},[f(x)])}},_=()=>C("div",{class:[o_,Kt("footer")]},[e.showCancelButton&&C(Zn,{size:"large",text:e.cancelButtonText||Ko("cancel"),class:Kt("cancel"),style:{color:e.cancelButtonColor},loading:o.cancel,disabled:e.cancelButtonDisabled,onClick:l},null),e.showConfirmButton&&C(Zn,{size:"large",text:e.confirmButtonText||Ko("confirm"),class:[Kt("confirm"),{[i_]:e.showCancelButton}],style:{color:e.confirmButtonColor},loading:o.confirm,disabled:e.confirmButtonDisabled,onClick:d},null)]),g=()=>C(p_,{class:Kt("footer")},{default:()=>[e.showCancelButton&&C(Fl,{type:"warning",text:e.cancelButtonText||Ko("cancel"),class:Kt("cancel"),color:e.cancelButtonColor,loading:o.cancel,disabled:e.cancelButtonDisabled,onClick:l},null),e.showConfirmButton&&C(Fl,{type:"danger",text:e.confirmButtonText||Ko("confirm"),class:Kt("confirm"),color:e.confirmButtonColor,loading:o.confirm,disabled:e.confirmButtonDisabled,onClick:d},null)]}),m=()=>n.footer?n.footer():e.theme==="round-button"?g():_();return()=>{const{width:v,title:S,theme:R,message:x,className:b}=e;return C(Ts,$t({ref:s,role:"dialog",class:[Kt([R]),b],style:{width:at(v)},tabindex:0,"aria-labelledby":S||x,onKeydown:c,"onUpdate:show":i},Qn(e,pv)),{default:()=>[u(),p(),m()]})}}});let La;const hv={title:"",width:"",theme:null,message:"",overlay:!0,callback:null,teleport:"body",className:"",allowHtml:!1,lockScroll:!0,transition:void 0,beforeClose:null,overlayClass:"",overlayStyle:void 0,messageAlign:"",cancelButtonText:"",cancelButtonColor:null,cancelButtonDisabled:!1,confirmButtonText:"",confirmButtonColor:null,confirmButtonDisabled:!1,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1,destroyOnClose:!1};let mv=Je({},hv);function _v(){({instance:La}=Qd({setup(){const{state:t,toggle:n}=Yd();return()=>C(nf,$t(t,{"onUpdate:show":n}),null)}}))}function gv(e){return ks?new Promise((t,n)=>{La||_v(),La.open(Je({},mv,e,{callback:s=>{(s==="confirm"?t:n)(s)}}))}):Promise.resolve(void 0)}const vv=e=>gv(Je({showCancelButton:!0},e)),lT=Qe(nf),[yv,Go]=We("rate");function bv(e,t,n,s){return e>=t?{status:"full",value:1}:e+.5>=t&&n&&!s?{status:"half",value:.5}:e+1>=t&&n&&s?{status:"half",value:Math.round((e-t+1)*1e10)/1e10}:{status:"void",value:0}}const wv={size:Pe,icon:De("star"),color:String,count:Jt(5),gutter:Pe,clearable:Boolean,readonly:Boolean,disabled:Boolean,voidIcon:De("star-o"),allowHalf:Boolean,voidColor:String,touchable:He,iconPrefix:String,modelValue:yd(0),disabledColor:String};var Ev=we({name:yv,props:wv,emits:["change","update:modelValue"],setup(e,{emit:t}){const n=kr(),[s,o]=Vd(),i=q(),a=F(()=>e.readonly||e.disabled),r=F(()=>a.value||!e.touchable),l=F(()=>Array(+e.count).fill("").map((R,x)=>bv(e.modelValue,x+1,e.allowHalf,e.readonly)));let d,c,u=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;const p=()=>{c=rn(i);const R=s.value.map(rn);d=[],R.forEach((x,b)=>{u=Math.min(x.top,u),f=Math.max(x.top,f),e.allowHalf?d.push({score:b+.5,left:x.left,top:x.top,height:x.height},{score:b+1,left:x.left+x.width/2,top:x.top,height:x.height}):d.push({score:b+1,left:x.left,top:x.top,height:x.height})})},_=(R,x)=>{for(let b=d.length-1;b>0;b--)if(x>=c.top&&x<=c.bottom){if(R>d[b].left&&x>=d[b].top&&x<=d[b].top+d[b].height)return d[b].score}else{const $=xd[b].left&&d[b].top===$)return d[b].score}return e.allowHalf?.5:1},g=R=>{a.value||R===e.modelValue||(t("update:modelValue",R),t("change",R))},m=R=>{r.value||(n.start(R),p())},v=R=>{if(!r.value&&(n.move(R),n.isHorizontal()&&!n.isTap.value)){const{clientX:x,clientY:b}=R.touches[0];wn(R),g(_(x,b))}},S=(R,x)=>{const{icon:b,size:$,color:B,count:G,gutter:D,voidIcon:X,disabled:V,voidColor:O,allowHalf:Z,iconPrefix:W,disabledColor:oe}=e,de=x+1,ee=R.status==="full",re=R.status==="void",Ee=Z&&R.value>0&&R.value<1;let Se;D&&de!==+G&&(Se={paddingRight:at(D)});const ne=he=>{p();let fe=Z?_(he.clientX,he.clientY):de;e.clearable&&n.isTap.value&&fe===e.modelValue&&(fe=0),g(fe)};return C("div",{key:x,ref:o(x),role:"radio",style:Se,class:Go("item"),tabindex:V?void 0:0,"aria-setsize":G,"aria-posinset":de,"aria-checked":!re,onClick:ne},[C(ft,{size:$,name:ee?b:X,class:Go("icon",{disabled:V,full:ee}),color:V?oe:ee?B:O,classPrefix:W},null),Ee&&C(ft,{size:$,style:{width:R.value+"em"},name:re?X:b,class:Go("icon",["half",{disabled:V,full:!re}]),color:V?oe:re?O:B,classPrefix:W},null)])};return xd(()=>e.modelValue),ns("touchmove",v,{target:i}),()=>C("div",{ref:i,role:"radiogroup",class:Go({readonly:e.readonly,disabled:e.disabled}),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,"aria-readonly":e.readonly,onTouchstartPassive:m},[l.value.map(S)])}});const Sv=Qe(Ev),[Cv,Ns,xv]=We("search"),kv=Je({},Ar,{label:String,shape:De("square"),leftIcon:De("search"),clearable:He,actionText:String,background:String,showAction:Boolean});var Av=we({name:Cv,props:kv,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:n,attrs:s}){const o=ko(),i=q(),a=()=>{n.action||(t("update:modelValue",""),t("cancel"))},r=b=>{b.keyCode===13&&(wn(b),t("search",e.modelValue))},l=()=>e.id||`${o}-input`,d=()=>{if(n.label||e.label)return C("label",{class:Ns("label"),for:l(),"data-allow-mismatch":"attribute"},[n.label?n.label():e.label])},c=()=>{if(e.showAction){const b=e.actionText||xv("cancel");return C("div",{class:Ns("action"),role:"button",tabindex:0,onClick:a},[n.action?n.action():b])}},u=()=>{var b;return(b=i.value)==null?void 0:b.blur()},f=()=>{var b;return(b=i.value)==null?void 0:b.focus()},p=b=>t("blur",b),_=b=>t("focus",b),g=b=>t("clear",b),m=b=>t("clickInput",b),v=b=>t("clickLeftIcon",b),S=b=>t("clickRightIcon",b),R=Object.keys(Ar),x=()=>{const b=Je({},s,Qn(e,R),{id:l()}),$=B=>t("update:modelValue",B);return C(Tr,$t({ref:i,type:"search",class:Ns("field",{"with-message":b.errorMessage}),border:!1,labelAlign:"left",onBlur:p,onFocus:_,onClear:g,onKeypress:r,onClickInput:m,onClickLeftIcon:v,onClickRightIcon:S,"onUpdate:modelValue":$},b),Qn(n,["left-icon","right-icon"]))};return Zt({focus:f,blur:u}),()=>{var b;return C("div",{class:Ns({"show-action":e.showAction}),style:{background:e.background}},[(b=n.left)==null?void 0:b.call(n),C("div",{class:Ns("content",e.shape)},[d(),x()]),c()])}}});const Tv=Qe(Av);/*! * pinia v2.3.1 * (c) 2025 Eduardo San Martin Morote * @license MIT */let sf;const $i=e=>sf=e,of=Symbol();function Na(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var to;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(to||(to={}));function Rv(){const e=ou(!0),t=e.run(()=>q({}));let n=[],s=[];const o=rr({install(i){$i(o),o._a=i,i.provide(of,o),i.config.globalProperties.$pinia=o,s.forEach(a=>n.push(a)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const af=()=>{};function Xl(e,t,n,s=af){e.push(t);const o=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&nr()&&iu(o),o}function rs(e,...t){e.slice().forEach(n=>{n(...t)})}const Iv=e=>e(),Yl=Symbol(),sa=Symbol();function Ma(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];Na(o)&&Na(s)&&e.hasOwnProperty(n)&&!Xe(s)&&!vn(s)?e[n]=Ma(o,s):e[n]=s}return e}const Ov=Symbol();function $v(e){return!Na(e)||!e.hasOwnProperty(Ov)}const{assign:$n}=Object;function Pv(e){return!!(Xe(e)&&e.effect)}function Bv(e,t,n,s){const{state:o,actions:i,getters:a}=t,r=n.state.value[e];let l;function d(){r||(n.state.value[e]=o?o():{});const c=Bp(n.state.value[e]);return $n(c,i,Object.keys(a||{}).reduce((u,f)=>(u[f]=rr(F(()=>{$i(n);const p=n._s.get(e);return a[f].call(p,p)})),u),{}))}return l=rf(e,d,t,n,s,!0),l}function rf(e,t,n={},s,o,i){let a;const r=$n({actions:{}},n),l={deep:!0};let d,c,u=[],f=[],p;const _=s.state.value[e];!i&&!_&&(s.state.value[e]={});let g;function m(G){let D;d=c=!1,typeof G=="function"?(G(s.state.value[e]),D={type:to.patchFunction,storeId:e,events:p}):(Ma(s.state.value[e],G),D={type:to.patchObject,payload:G,storeId:e,events:p});const X=g=Symbol();tt().then(()=>{g===X&&(d=!0)}),c=!0,rs(u,D,s.state.value[e])}const v=i?function(){const{state:D}=n,X=D?D():{};this.$patch(V=>{$n(V,X)})}:af;function S(){a.stop(),u=[],f=[],s._s.delete(e)}const R=(G,D="")=>{if(Yl in G)return G[sa]=D,G;const X=function(){$i(s);const V=Array.from(arguments),O=[],Z=[];function W(ee){O.push(ee)}function oe(ee){Z.push(ee)}rs(f,{args:V,name:X[sa],store:b,after:W,onError:oe});let de;try{de=G.apply(this&&this.$id===e?this:b,V)}catch(ee){throw rs(Z,ee),ee}return de instanceof Promise?de.then(ee=>(rs(O,ee),ee)).catch(ee=>(rs(Z,ee),Promise.reject(ee))):(rs(O,de),de)};return X[Yl]=!0,X[sa]=D,X},x={_p:s,$id:e,$onAction:Xl.bind(null,f),$patch:m,$reset:v,$subscribe(G,D={}){const X=Xl(u,G,D.detached,()=>V()),V=a.run(()=>Ae(()=>s.state.value[e],O=>{(D.flush==="sync"?c:d)&&G({storeId:e,type:to.direct,events:p},O)},$n({},l,D)));return X},$dispose:S},b=_t(x);s._s.set(e,b);const B=(s._a&&s._a.runWithContext||Iv)(()=>s._e.run(()=>(a=ou()).run(()=>t({action:R}))));for(const G in B){const D=B[G];if(Xe(D)&&!Pv(D)||vn(D))i||(_&&$v(D)&&(Xe(D)?D.value=_[G]:Ma(D,_[G])),s.state.value[e][G]=D);else if(typeof D=="function"){const X=R(D,G);B[G]=X,r.actions[G]=D}}return $n(b,B),$n($e(b),B),Object.defineProperty(b,"$state",{get:()=>s.state.value[e],set:G=>{m(D=>{$n(D,G)})}}),s._p.forEach(G=>{$n(b,a.run(()=>G({store:b,app:s._a,pinia:s,options:r})))}),_&&i&&n.hydrate&&n.hydrate(b.$state,_),d=!0,c=!0,b}/*! #__NO_SIDE_EFFECTS__ */function Ir(e,t,n){let s,o;const i=typeof t=="function";typeof e=="string"?(s=e,o=i?n:t):(o=e,s=e.id);function a(r,l){const d=Up();return r=r||(d?mt(of,null):null),r&&$i(r),r=sf,r._s.has(s)||(i?rf(s,t,o,r):Bv(s,o,r)),r._s.get(s)}return a.$id=s,a}const lf="it_desk_h5_theme";function Ql(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem(lf,e)}function Dv(){const e=localStorage.getItem(lf);return e==="dark"||e==="light"?e:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const cf=Ir("theme",()=>{const e=q("light");function t(){const s=e.value==="light"?"dark":"light";e.value=s,Ql(s)}function n(){const s=Dv();e.value=s,Ql(s)}return{currentTheme:e,toggleTheme:t,initTheme:n}}),Lv={class:"app-loading"},Nv={key:1,class:"app-loading"},Mv=we({__name:"App",setup(e){const t=cf(),n=q(!1);return ot(()=>{t.initTheme(),n.value=!0}),(s,o)=>{const i=xo,a=rh("router-view"),r=rv;return k(),ht(r,{theme:Re(t).currentTheme},{default:et(()=>[n.value?(k(),ht(a,{key:0},{default:et(({Component:l})=>[(k(),ht(Dh,null,{fallback:et(()=>[h("div",Lv,[C(i,{type:"spinner",color:"#1989fa",size:"36"}),o[0]||(o[0]=h("div",{class:"app-loading__text"},"正在加载...",-1))])]),default:et(()=>[(k(),ht(lh(l)))]),_:2},1024))]),_:1})):(k(),T("div",Nv,[C(i,{type:"spinner",color:"#1989fa",size:"36"}),o[1]||(o[1]=h("div",{class:"app-loading__text"},"正在加载...",-1))]))]),_:1},8,["theme"])}}}),Fv="modulepreload",qv=function(e){return"/h5/"+e},Zl={},Wn=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),r=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=qv(l),l in Zl)return;Zl[l]=!0;const d=l.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const u=document.createElement("link");if(u.rel=d?"stylesheet":Fv,d||(u.as="script"),u.crossOrigin="",u.href=l,r&&u.setAttribute("nonce",r),document.head.appendChild(u),d)return new Promise((f,p)=>{u.addEventListener("load",f),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(a){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=a,window.dispatchEvent(r),!r.defaultPrevented)throw a}return o.then(a=>{for(const r of a||[])r.status==="rejected"&&i(r.reason);return t().catch(i)})};/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */const ds=typeof document<"u";function uf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Vv(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&uf(e.default)}const Ne=Object.assign;function oa(e,t){const n={};for(const s in t){const o=t[s];n[s]=Qt(o)?o.map(e):e(o)}return n}const no=()=>{},Qt=Array.isArray;function ec(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const df=/#/g,jv=/&/g,Uv=/\//g,zv=/=/g,Hv=/\?/g,ff=/\+/g,Wv=/%5B/g,Kv=/%5D/g,pf=/%5E/g,Gv=/%60/g,hf=/%7B/g,Jv=/%7C/g,mf=/%7D/g,Xv=/%20/g;function Or(e){return e==null?"":encodeURI(""+e).replace(Jv,"|").replace(Wv,"[").replace(Kv,"]")}function Yv(e){return Or(e).replace(hf,"{").replace(mf,"}").replace(pf,"^")}function Fa(e){return Or(e).replace(ff,"%2B").replace(Xv,"+").replace(df,"%23").replace(jv,"%26").replace(Gv,"`").replace(hf,"{").replace(mf,"}").replace(pf,"^")}function Qv(e){return Fa(e).replace(zv,"%3D")}function Zv(e){return Or(e).replace(df,"%23").replace(Hv,"%3F")}function ey(e){return Zv(e).replace(Uv,"%2F")}function _o(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const ty=/\/$/,ny=e=>e.replace(ty,"");function ia(e,t,n="/"){let s,o={},i="",a="";const r=t.indexOf("#");let l=t.indexOf("?");return l=r>=0&&l>r?-1:l,l>=0&&(s=t.slice(0,l),i=t.slice(l,r>0?r:t.length),o=e(i.slice(1))),r>=0&&(s=s||t.slice(0,r),a=t.slice(r,t.length)),s=ay(s??t,n),{fullPath:s+i+a,path:s,query:o,hash:_o(a)}}function sy(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function tc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function oy(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&ws(t.matched[s],n.matched[o])&&_f(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ws(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function _f(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!iy(e[n],t[n]))return!1;return!0}function iy(e,t){return Qt(e)?nc(e,t):Qt(t)?nc(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function nc(e,t){return Qt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function ay(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 i=n.length-1,a,r;for(a=0;a1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(a).join("/")}const Rn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let qa=function(e){return e.pop="pop",e.push="push",e}({}),aa=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function ry(e){if(!e)if(ds){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ny(e)}const ly=/^[^#]+#/;function cy(e,t){return e.replace(ly,"#")+t}function uy(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 Pi=()=>({left:window.scrollX,top:window.scrollY});function dy(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=uy(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 sc(e,t){return(history.state?history.state.position-t:-1)+e}const Va=new Map;function fy(e,t){Va.set(e,t)}function py(e){const t=Va.get(e);return Va.delete(e),t}function hy(e){return typeof e=="string"||e&&typeof e=="object"}function gf(e){return typeof e=="string"||typeof e=="symbol"}let Ze=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 vf=Symbol("");Ze.MATCHER_NOT_FOUND+"",Ze.NAVIGATION_GUARD_REDIRECT+"",Ze.NAVIGATION_ABORTED+"",Ze.NAVIGATION_CANCELLED+"",Ze.NAVIGATION_DUPLICATED+"";function Es(e,t){return Ne(new Error,{type:e,[vf]:!0},t)}function fn(e,t){return e instanceof Error&&vf in e&&(t==null||!!(e.type&t))}const my=["params","query","hash"];function _y(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of my)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function gy(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Fa(o)):[s&&Fa(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function vy(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Qt(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const yy=Symbol(""),ic=Symbol(""),Bi=Symbol(""),$r=Symbol(""),ja=Symbol("");function Ms(){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 Bn(e,t,n,s,o,i=a=>a()){const a=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((r,l)=>{const d=f=>{f===!1?l(Es(Ze.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?l(f):hy(f)?l(Es(Ze.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(a&&s.enterCallbacks[o]===a&&typeof f=="function"&&a.push(f),r())},c=i(()=>e.call(s&&s.instances[o],t,n,d));let u=Promise.resolve(c);e.length<3&&(u=u.then(d)),u.catch(f=>l(f))})}function ra(e,t,n,s,o=i=>i()){const i=[];for(const a of e)for(const r in a.components){let l=a.components[r];if(!(t!=="beforeRouteEnter"&&!a.instances[r]))if(uf(l)){const d=(l.__vccOpts||l)[t];d&&i.push(Bn(d,n,s,a,r,o))}else{let d=l();i.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${r}" at "${a.path}"`);const u=Vv(c)?c.default:c;a.mods[r]=c,a.components[r]=u;const f=(u.__vccOpts||u)[t];return f&&Bn(f,n,s,a,r,o)()}))}}return i}function by(e,t){const n=[],s=[],o=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aws(d,r))?s.push(r):n.push(r));const l=e.matched[a];l&&(t.matched.find(d=>ws(d,l))||o.push(l))}return[n,s,o]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */let wy=()=>location.protocol+"//"+location.host;function yf(e,t){const{pathname:n,search:s,hash:o}=t,i=e.indexOf("#");if(i>-1){let a=o.includes(e.slice(i))?e.slice(i).length:1,r=o.slice(a);return r[0]!=="/"&&(r="/"+r),tc(r,"")}return tc(n,e)+s+o}function Ey(e,t,n,s){let o=[],i=[],a=null;const r=({state:f})=>{const p=yf(e,location),_=n.value,g=t.value;let m=0;if(f){if(n.value=p,t.value=f,a&&a===_){a=null;return}m=g?f.position-g.position:0}else s(p);o.forEach(v=>{v(n.value,_,{delta:m,type:qa.pop,direction:m?m>0?aa.forward:aa.back:aa.unknown})})};function l(){a=n.value}function d(f){o.push(f);const p=()=>{const _=o.indexOf(f);_>-1&&o.splice(_,1)};return i.push(p),p}function c(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(Ne({},f.state,{scroll:Pi()}),"")}}function u(){for(const f of i)f();i=[],window.removeEventListener("popstate",r),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",r),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:l,listen:d,destroy:u}}function ac(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?Pi():null}}function Sy(e){const{history:t,location:n}=window,s={value:yf(e,n)},o={value:t.state};o.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,d,c){const u=e.indexOf("#"),f=u>-1?(n.host&&document.querySelector("base")?e:e.slice(u))+l:wy()+e+l;try{t[c?"replaceState":"pushState"](d,"",f),o.value=d}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function a(l,d){i(l,Ne({},t.state,ac(o.value.back,l,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=l}function r(l,d){const c=Ne({},o.value,t.state,{forward:l,scroll:Pi()});i(c.current,c,!0),i(l,Ne({},ac(s.value,l,null),{position:c.position+1},d),!1),s.value=l}return{location:s,state:o,push:r,replace:a}}function Cy(e){e=ry(e);const t=Sy(e),n=Ey(e,t.state,t.location,t.replace);function s(i,a=!0){a||n.pauseListeners(),history.go(i)}const o=Ne({location:"",base:e,go:s,createHref:cy.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 Kn=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var lt=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}(lt||{});const xy={type:Kn.Static,value:""},ky=/[a-zA-Z0-9_]/;function Ay(e){if(!e)return[[]];if(e==="/")return[[xy]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${d}": ${p}`)}let n=lt.Static,s=n;const o=[];let i;function a(){i&&o.push(i),i=[]}let r=0,l,d="",c="";function u(){d&&(n===lt.Static?i.push({type:Kn.Static,value:d}):n===lt.Param||n===lt.ParamRegExp||n===lt.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Kn.Param,value:d,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),d="")}function f(){d+=l}for(;rt.length?t.length===1&&t[0]===Ct.Static+Ct.Segment?1:-1:0}function bf(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const $y={strict:!1,end:!0,sensitive:!1};function Py(e,t,n){const s=Iy(Ay(e.path),n),o=Ne(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function By(e,t){const n=[],s=new Map;t=ec($y,t);function o(u){return s.get(u)}function i(u,f,p){const _=!p,g=uc(u);g.aliasOf=p&&p.record;const m=ec(t,u),v=[g];if("alias"in u){const x=typeof u.alias=="string"?[u.alias]:u.alias;for(const b of x)v.push(uc(Ne({},g,{components:p?p.record.components:g.components,path:b,aliasOf:p?p.record:g})))}let S,R;for(const x of v){const{path:b}=x;if(f&&b[0]!=="/"){const $=f.record.path,B=$[$.length-1]==="/"?"":"/";x.path=f.record.path+(b&&B+b)}if(S=Py(x,f,m),p?p.alias.push(S):(R=R||S,R!==S&&R.alias.push(S),_&&u.name&&!dc(S)&&a(u.name)),wf(S)&&l(S),g.children){const $=g.children;for(let B=0;B<$.length;B++)i($[B],S,p&&p.children[B])}p=p||S}return R?()=>{a(R)}:no}function a(u){if(gf(u)){const f=s.get(u);f&&(s.delete(u),n.splice(n.indexOf(f),1),f.children.forEach(a),f.alias.forEach(a))}else{const f=n.indexOf(u);f>-1&&(n.splice(f,1),u.record.name&&s.delete(u.record.name),u.children.forEach(a),u.alias.forEach(a))}}function r(){return n}function l(u){const f=Ny(u,n);n.splice(f,0,u),u.record.name&&!dc(u)&&s.set(u.record.name,u)}function d(u,f){let p,_={},g,m;if("name"in u&&u.name){if(p=s.get(u.name),!p)throw Es(Ze.MATCHER_NOT_FOUND,{location:u});m=p.record.name,_=Ne(cc(f.params,p.keys.filter(R=>!R.optional).concat(p.parent?p.parent.keys.filter(R=>R.optional):[]).map(R=>R.name)),u.params&&cc(u.params,p.keys.map(R=>R.name))),g=p.stringify(_)}else if(u.path!=null)g=u.path,p=n.find(R=>R.re.test(g)),p&&(_=p.parse(g),m=p.record.name);else{if(p=f.name?s.get(f.name):n.find(R=>R.re.test(f.path)),!p)throw Es(Ze.MATCHER_NOT_FOUND,{location:u,currentLocation:f});m=p.record.name,_=Ne({},f.params,u.params),g=p.stringify(_)}const v=[];let S=p;for(;S;)v.unshift(S.record),S=S.parent;return{name:m,path:g,params:_,matched:v,meta:Ly(v)}}e.forEach(u=>i(u));function c(){n.length=0,s.clear()}return{addRoute:i,resolve:d,removeRoute:a,clearRoutes:c,getRoutes:r,getRecordMatcher:o}}function cc(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function uc(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Dy(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 Dy(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 dc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ly(e){return e.reduce((t,n)=>Ne(t,n.meta),{})}function Ny(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;bf(e,t[i])<0?s=i:n=i+1}const o=My(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function My(e){let t=e;for(;t=t.parent;)if(wf(t)&&bf(e,t)===0)return t}function wf({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function fc(e){const t=mt(Bi),n=mt($r),s=F(()=>{const l=Re(e.to);return t.resolve(l)}),o=F(()=>{const{matched:l}=s.value,{length:d}=l,c=l[d-1],u=n.matched;if(!c||!u.length)return-1;const f=u.findIndex(ws.bind(null,c));if(f>-1)return f;const p=pc(l[d-2]);return d>1&&pc(c)===p&&u[u.length-1].path!==p?u.findIndex(ws.bind(null,l[d-2])):f}),i=F(()=>o.value>-1&&Uy(n.params,s.value.params)),a=F(()=>o.value>-1&&o.value===n.matched.length-1&&_f(n.params,s.value.params));function r(l={}){if(jy(l)){const d=t[Re(e.replace)?"replace":"push"](Re(e.to)).catch(no);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:F(()=>s.value.href),isActive:i,isExactActive:a,navigate:r}}function Fy(e){return e.length===1?e[0]:e}const qy=we({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:fc,setup(e,{slots:t}){const n=_t(fc(e)),{options:s}=mt(Bi),o=F(()=>({[hc(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[hc(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Fy(t.default(n));return e.custom?i:gr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},i)}}}),Vy=qy;function jy(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 Uy(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(!Qt(o)||o.length!==s.length||s.some((i,a)=>i.valueOf()!==o[a].valueOf()))return!1}return!0}function pc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const hc=(e,t,n)=>e??t??n,zy=we({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=mt(ja),o=F(()=>e.route||s.value),i=mt(ic,0),a=F(()=>{let d=Re(i);const{matched:c}=o.value;let u;for(;(u=c[d])&&!u.components;)d++;return d}),r=F(()=>o.value.matched[a.value]);cn(ic,F(()=>a.value+1)),cn(yy,r),cn(ja,o);const l=q();return Ae(()=>[l.value,r.value,e.name],([d,c,u],[f,p,_])=>{c&&(c.instances[u]=d,p&&p!==c&&d&&d===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),d&&c&&(!p||!ws(c,p)||!f)&&(c.enterCallbacks[u]||[]).forEach(g=>g(d))},{flush:"post"}),()=>{const d=o.value,c=e.name,u=r.value,f=u&&u.components[c];if(!f)return mc(n.default,{Component:f,route:d});const p=u.props[c],_=p?p===!0?d.params:typeof p=="function"?p(d):p:null,m=gr(f,Ne({},_,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(u.instances[c]=null)},ref:l}));return mc(n.default,{Component:m,route:d})||m}}});function mc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Hy=zy;function Wy(e){const t=By(e.routes,e),n=e.parseQuery||gy,s=e.stringifyQuery||oc,o=e.history,i=Ms(),a=Ms(),r=Ms(),l=Dn(Rn);let d=Rn;ds&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=oa.bind(null,E=>""+E),u=oa.bind(null,ey),f=oa.bind(null,_o);function p(E,N){let U,L;return gf(E)?(U=t.getRecordMatcher(E),L=N):L=E,t.addRoute(L,U)}function _(E){const N=t.getRecordMatcher(E);N&&t.removeRoute(N)}function g(){return t.getRoutes().map(E=>E.record)}function m(E){return!!t.getRecordMatcher(E)}function v(E,N){if(N=Ne({},N||l.value),typeof E=="string"){const A=ia(n,E,N.path),j=t.resolve({path:A.path},N),J=o.createHref(A.fullPath);return Ne(A,j,{params:f(j.params),hash:_o(A.hash),redirectedFrom:void 0,href:J})}let U;if(E.path!=null)U=Ne({},E,{path:ia(n,E.path,N.path).path});else{const A=Ne({},E.params);for(const j in A)A[j]==null&&delete A[j];U=Ne({},E,{params:u(A)}),N.params=u(N.params)}const L=t.resolve(U,N),z=E.hash||"";L.params=c(f(L.params));const y=sy(s,Ne({},E,{hash:Yv(z),path:L.path})),w=o.createHref(y);return Ne({fullPath:y,hash:z,query:s===oc?vy(E.query):E.query||{}},L,{redirectedFrom:void 0,href:w})}function S(E){return typeof E=="string"?ia(n,E,l.value.path):Ne({},E)}function R(E,N){if(d!==E)return Es(Ze.NAVIGATION_CANCELLED,{from:N,to:E})}function x(E){return B(E)}function b(E){return x(Ne(S(E),{replace:!0}))}function $(E,N){const U=E.matched[E.matched.length-1];if(U&&U.redirect){const{redirect:L}=U;let z=typeof L=="function"?L(E,N):L;return typeof z=="string"&&(z=z.includes("?")||z.includes("#")?z=S(z):{path:z},z.params={}),Ne({query:E.query,hash:E.hash,params:z.path!=null?{}:E.params},z)}}function B(E,N){const U=d=v(E),L=l.value,z=E.state,y=E.force,w=E.replace===!0,A=$(U,L);if(A)return B(Ne(S(A),{state:typeof A=="object"?Ne({},z,A.state):z,force:y,replace:w}),N||U);const j=U;j.redirectedFrom=N;let J;return!y&&oy(s,L,U)&&(J=Es(Ze.NAVIGATION_DUPLICATED,{to:j,from:L}),ne(L,L,!0,!1)),(J?Promise.resolve(J):X(j,L)).catch(K=>fn(K)?fn(K,Ze.NAVIGATION_GUARD_REDIRECT)?K:Se(K):re(K,j,L)).then(K=>{if(K){if(fn(K,Ze.NAVIGATION_GUARD_REDIRECT))return B(Ne({replace:w},S(K.to),{state:typeof K.to=="object"?Ne({},z,K.to.state):z,force:y}),N||j)}else K=O(j,L,!0,w,z);return V(j,L,K),K})}function G(E,N){const U=R(E,N);return U?Promise.reject(U):Promise.resolve()}function D(E){const N=Te.values().next().value;return N&&typeof N.runWithContext=="function"?N.runWithContext(E):E()}function X(E,N){let U;const[L,z,y]=by(E,N);U=ra(L.reverse(),"beforeRouteLeave",E,N);for(const A of L)A.leaveGuards.forEach(j=>{U.push(Bn(j,E,N))});const w=G.bind(null,E,N);return U.push(w),ce(U).then(()=>{U=[];for(const A of i.list())U.push(Bn(A,E,N));return U.push(w),ce(U)}).then(()=>{U=ra(z,"beforeRouteUpdate",E,N);for(const A of z)A.updateGuards.forEach(j=>{U.push(Bn(j,E,N))});return U.push(w),ce(U)}).then(()=>{U=[];for(const A of y)if(A.beforeEnter)if(Qt(A.beforeEnter))for(const j of A.beforeEnter)U.push(Bn(j,E,N));else U.push(Bn(A.beforeEnter,E,N));return U.push(w),ce(U)}).then(()=>(E.matched.forEach(A=>A.enterCallbacks={}),U=ra(y,"beforeRouteEnter",E,N,D),U.push(w),ce(U))).then(()=>{U=[];for(const A of a.list())U.push(Bn(A,E,N));return U.push(w),ce(U)}).catch(A=>fn(A,Ze.NAVIGATION_CANCELLED)?A:Promise.reject(A))}function V(E,N,U){r.list().forEach(L=>D(()=>L(E,N,U)))}function O(E,N,U,L,z){const y=R(E,N);if(y)return y;const w=N===Rn,A=ds?history.state:{};U&&(L||w?o.replace(E.fullPath,Ne({scroll:w&&A&&A.scroll},z)):o.push(E.fullPath,z)),l.value=E,ne(E,N,U,w),Se()}let Z;function W(){Z||(Z=o.listen((E,N,U)=>{if(!H.listening)return;const L=v(E),z=$(L,H.currentRoute.value);if(z){B(Ne(z,{replace:!0,force:!0}),L).catch(no);return}d=L;const y=l.value;ds&&fy(sc(y.fullPath,U.delta),Pi()),X(L,y).catch(w=>fn(w,Ze.NAVIGATION_ABORTED|Ze.NAVIGATION_CANCELLED)?w:fn(w,Ze.NAVIGATION_GUARD_REDIRECT)?(B(Ne(S(w.to),{force:!0}),L).then(A=>{fn(A,Ze.NAVIGATION_ABORTED|Ze.NAVIGATION_DUPLICATED)&&!U.delta&&U.type===qa.pop&&o.go(-1,!1)}).catch(no),Promise.reject()):(U.delta&&o.go(-U.delta,!1),re(w,L,y))).then(w=>{w=w||O(L,y,!1),w&&(U.delta&&!fn(w,Ze.NAVIGATION_CANCELLED)?o.go(-U.delta,!1):U.type===qa.pop&&fn(w,Ze.NAVIGATION_ABORTED|Ze.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),V(L,y,w)}).catch(no)}))}let oe=Ms(),de=Ms(),ee;function re(E,N,U){Se(E);const L=de.list();return L.length?L.forEach(z=>z(E,N,U)):console.error(E),Promise.reject(E)}function Ee(){return ee&&l.value!==Rn?Promise.resolve():new Promise((E,N)=>{oe.add([E,N])})}function Se(E){return ee||(ee=!E,W(),oe.list().forEach(([N,U])=>E?U(E):N()),oe.reset()),E}function ne(E,N,U,L){const{scrollBehavior:z}=e;if(!ds||!z)return Promise.resolve();const y=!U&&py(sc(E.fullPath,0))||(L||!U)&&history.state&&history.state.scroll||null;return tt().then(()=>z(E,N,y)).then(w=>w&&dy(w)).catch(w=>re(w,E,N))}const he=E=>o.go(E);let fe;const Te=new Set,H={currentRoute:l,listening:!0,addRoute:p,removeRoute:_,clearRoutes:t.clearRoutes,hasRoute:m,getRoutes:g,resolve:v,options:e,push:x,replace:b,go:he,back:()=>he(-1),forward:()=>he(1),beforeEach:i.add,beforeResolve:a.add,afterEach:r.add,onError:de.add,isReady:Ee,install(E){E.component("RouterLink",Vy),E.component("RouterView",Hy),E.config.globalProperties.$router=H,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>Re(l)}),ds&&!fe&&l.value===Rn&&(fe=!0,x(o.location).catch(L=>{}));const N={};for(const L in Rn)Object.defineProperty(N,L,{get:()=>l.value[L],enumerable:!0});E.provide(Bi,H),E.provide($r,Eu(N)),E.provide(ja,l);const U=E.unmount;Te.add(E),E.unmount=function(){Te.delete(E),Te.size<1&&(d=Rn,Z&&Z(),Z=null,l.value=Rn,fe=!1,ee=!1),U()}}};function ce(E){return E.reduce((N,U)=>N.then(()=>D(U)),Promise.resolve())}return H}function Ef(){return mt(Bi)}function Sf(e){return mt($r)}function Cf(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ky}=Object.prototype,{getPrototypeOf:Di}=Object,{iterator:Li,toStringTag:xf}=Symbol,Ni=(e=>t=>{const n=Ky.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),en=e=>(e=e.toLowerCase(),t=>Ni(t)===e),Mi=e=>t=>typeof t===e,{isArray:Rs}=Array,Ss=Mi("undefined");function Ao(e){return e!==null&&!Ss(e)&&e.constructor!==null&&!Ss(e.constructor)&&It(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kf=en("ArrayBuffer");function Gy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kf(e.buffer),t}const Jy=Mi("string"),It=Mi("function"),Af=Mi("number"),To=e=>e!==null&&typeof e=="object",Xy=e=>e===!0||e===!1,ti=e=>{if(Ni(e)!=="object")return!1;const t=Di(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(xf in e)&&!(Li in e)},Yy=e=>{if(!To(e)||Ao(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Qy=en("Date"),Zy=en("File"),eb=e=>!!(e&&typeof e.uri<"u"),tb=e=>e&&typeof e.getParts<"u",nb=en("Blob"),sb=en("FileList"),ob=e=>To(e)&&It(e.pipe);function ib(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const _c=ib(),gc=typeof _c.FormData<"u"?_c.FormData:void 0,ab=e=>{if(!e)return!1;if(gc&&e instanceof gc)return!0;const t=Di(e);if(!t||t===Object.prototype||!It(e.append))return!1;const n=Ni(e);return n==="formdata"||n==="object"&&It(e.toString)&&e.toString()==="[object FormData]"},rb=en("URLSearchParams"),[lb,cb,ub,db]=["ReadableStream","Request","Response","Headers"].map(en),fb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ro(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),Rs(e))for(s=0,o=e.length;s0;)if(o=n[s],t===o.toLowerCase())return o;return null}const Gn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rf=e=>!Ss(e)&&e!==Gn;function Ua(...e){const{caseless:t,skipUndefined:n}=Rf(this)&&this||{},s={},o=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const r=t&&Tf(s,a)||a,l=za(s,r)?s[r]:void 0;ti(l)&&ti(i)?s[r]=Ua(l,i):ti(i)?s[r]=Ua({},i):Rs(i)?s[r]=i.slice():(!n||!Ss(i))&&(s[r]=i)};for(let i=0,a=e.length;i(Ro(t,(o,i)=>{n&&It(o)?Object.defineProperty(e,i,{__proto__:null,value:Cf(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),hb=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mb=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},_b=(e,t,n,s)=>{let o,i,a;const r={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!s||s(a,e,t))&&!r[a]&&(t[a]=e[a],r[a]=!0);e=n!==!1&&Di(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},vb=e=>{if(!e)return null;if(Rs(e))return e;let t=e.length;if(!Af(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Di(Uint8Array)),bb=(e,t)=>{const s=(e&&e[Li]).call(e);let o;for(;(o=s.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},wb=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Eb=en("HTMLFormElement"),Sb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),za=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Cb=en("RegExp"),If=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Ro(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(s[i]=a||o)}),Object.defineProperties(e,s)},xb=e=>{If(e,(t,n)=>{if(It(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];if(It(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},kb=(e,t)=>{const n={},s=o=>{o.forEach(i=>{n[i]=!0})};return Rs(e)?s(e):s(String(e).split(t)),n},Ab=()=>{},Tb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Rb(e){return!!(e&&It(e.append)&&e[xf]==="FormData"&&e[Li])}const Ib=e=>{const t=new WeakSet,n=s=>{if(To(s)){if(t.has(s))return;if(Ao(s))return s;if(!("toJSON"in s)){t.add(s);const o=Rs(s)?[]:{};return Ro(s,(i,a)=>{const r=n(i);!Ss(r)&&(o[a]=r)}),t.delete(s),o}}return s};return n(e)},Ob=en("AsyncFunction"),$b=e=>e&&(To(e)||It(e))&&It(e.then)&&It(e.catch),Of=((e,t)=>e?setImmediate:t?((n,s)=>(Gn.addEventListener("message",({source:o,data:i})=>{o===Gn&&i===n&&s.length&&s.shift()()},!1),o=>{s.push(o),Gn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",It(Gn.postMessage)),Pb=typeof queueMicrotask<"u"?queueMicrotask.bind(Gn):typeof process<"u"&&process.nextTick||Of,Bb=e=>e!=null&&It(e[Li]),P={isArray:Rs,isArrayBuffer:kf,isBuffer:Ao,isFormData:ab,isArrayBufferView:Gy,isString:Jy,isNumber:Af,isBoolean:Xy,isObject:To,isPlainObject:ti,isEmptyObject:Yy,isReadableStream:lb,isRequest:cb,isResponse:ub,isHeaders:db,isUndefined:Ss,isDate:Qy,isFile:Zy,isReactNativeBlob:eb,isReactNative:tb,isBlob:nb,isRegExp:Cb,isFunction:It,isStream:ob,isURLSearchParams:rb,isTypedArray:yb,isFileList:sb,forEach:Ro,merge:Ua,extend:pb,trim:fb,stripBOM:hb,inherits:mb,toFlatObject:_b,kindOf:Ni,kindOfTest:en,endsWith:gb,toArray:vb,forEachEntry:bb,matchAll:wb,isHTMLForm:Eb,hasOwnProperty:za,hasOwnProp:za,reduceDescriptors:If,freezeMethods:xb,toObjectSet:kb,toCamelCase:Sb,noop:Ab,toFiniteNumber:Tb,findKey:Tf,global:Gn,isContextDefined:Rf,isSpecCompliantForm:Rb,toJSONObject:Ib,isAsyncFn:Ob,isThenable:$b,setImmediate:Of,asap:Pb,isIterable:Bb},Db=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lb=e=>{const t={};let n,s,o;return e&&e.split(` `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),s=a.substring(o+1).trim(),!(!n||t[n]&&Db[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t};function Nb(e){let t=0,n=e.length;for(;tt;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Mb=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Fb=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Pr(e,t){return P.isArray(e)?e.map(n=>Pr(n,t)):Nb(String(e).replace(t,""))}const qb=e=>Pr(e,Mb),Vb=e=>Pr(e,Fb);function $f(e){const t=Object.create(null);return P.forEach(e.toJSON(),(n,s)=>{t[s]=Vb(n)}),t}const vc=Symbol("internals");function Fs(e){return e&&String(e).trim().toLowerCase()}function ni(e){return e===!1||e==null?e:P.isArray(e)?e.map(ni):qb(String(e))}function jb(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Ub=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function la(e,t,n,s,o){if(P.isFunction(s))return s.call(this,t,n);if(o&&(t=n),!!P.isString(t)){if(P.isString(s))return t.indexOf(s)!==-1;if(P.isRegExp(s))return s.test(t)}}function zb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Hb(e,t){const n=P.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(o,i,a){return this[s].call(this,t,o,i,a)},configurable:!0})})}let Tt=class{constructor(t){t&&this.set(t)}set(t,n,s){const o=this;function i(r,l,d){const c=Fs(l);if(!c)throw new Error("header name must be a non-empty string");const u=P.findKey(o,c);(!u||o[u]===void 0||d===!0||d===void 0&&o[u]!==!1)&&(o[u||l]=ni(r))}const a=(r,l)=>P.forEach(r,(d,c)=>i(d,c,l));if(P.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(P.isString(t)&&(t=t.trim())&&!Ub(t))a(Lb(t),n);else if(P.isObject(t)&&P.isIterable(t)){let r={},l,d;for(const c of t){if(!P.isArray(c))throw TypeError("Object iterator must return a key-value pair");r[d=c[0]]=(l=r[d])?P.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}a(r,n)}else t!=null&&i(n,t,s);return this}get(t,n){if(t=Fs(t),t){const s=P.findKey(this,t);if(s){const o=this[s];if(!n)return o;if(n===!0)return jb(o);if(P.isFunction(n))return n.call(this,o,s);if(P.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Fs(t),t){const s=P.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||la(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let o=!1;function i(a){if(a=Fs(a),a){const r=P.findKey(s,a);r&&(!n||la(s,s[r],r,n))&&(delete s[r],o=!0)}}return P.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const i=n[s];(!t||la(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,s={};return P.forEach(this,(o,i)=>{const a=P.findKey(s,i);if(a){n[a]=ni(o),delete n[i];return}const r=t?zb(i):String(i).trim();r!==i&&delete n[i],n[r]=ni(o),s[r]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return P.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=t&&P.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[vc]=this[vc]={accessors:{}}).accessors,o=this.prototype;function i(a){const r=Fs(a);s[r]||(Hb(o,a),s[r]=!0)}return P.isArray(t)?t.forEach(i):i(t),this}};Tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(Tt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});P.freezeMethods(Tt);const Wb="[REDACTED ****]";function Kb(e){if(P.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(P.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Gb(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),s=[],o=i=>{if(i===null||typeof i!="object"||P.isBuffer(i))return i;if(s.indexOf(i)!==-1)return;i instanceof Tt&&(i=i.toJSON()),s.push(i);let a;if(P.isArray(i))a=[],i.forEach((r,l)=>{const d=o(r);P.isUndefined(d)||(a[l]=d)});else{if(!P.isPlainObject(i)&&Kb(i))return s.pop(),i;a=Object.create(null);for(const[r,l]of Object.entries(i)){const d=n.has(r.toLowerCase())?Wb:o(l);P.isUndefined(d)||(a[r]=d)}}return s.pop(),a};return o(e)}let pe=class Pf extends Error{static from(t,n,s,o,i,a){const r=new Pf(t.message,n||t.code,s,o,i);return r.cause=t,r.name=t.name,t.status!=null&&r.status==null&&(r.status=t.status),a&&Object.assign(r,a),r}constructor(t,n,s,o,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&P.hasOwnProp(t,"redact")?t.redact:void 0,s=P.isArray(n)&&n.length>0?Gb(t,n):P.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};pe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pe.ERR_BAD_OPTION="ERR_BAD_OPTION";pe.ECONNABORTED="ECONNABORTED";pe.ETIMEDOUT="ETIMEDOUT";pe.ECONNREFUSED="ECONNREFUSED";pe.ERR_NETWORK="ERR_NETWORK";pe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pe.ERR_DEPRECATED="ERR_DEPRECATED";pe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pe.ERR_CANCELED="ERR_CANCELED";pe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pe.ERR_INVALID_URL="ERR_INVALID_URL";pe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Jb=null;function Ha(e){return P.isPlainObject(e)||P.isArray(e)}function Bf(e){return P.endsWith(e,"[]")?e.slice(0,-2):e}function ca(e,t,n){return e?e.concat(t).map(function(o,i){return o=Bf(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Xb(e){return P.isArray(e)&&!e.some(Ha)}const Yb=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function Fi(e,t,n){if(!P.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=P.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!P.isUndefined(v[m])});const s=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,r=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,d=r&&P.isSpecCompliantForm(t);if(!P.isFunction(o))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(P.isDate(g))return g.toISOString();if(P.isBoolean(g))return g.toString();if(!d&&P.isBlob(g))throw new pe("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(g)||P.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,m,v){let S=g;if(P.isReactNative(t)&&P.isReactNativeBlob(g))return t.append(ca(v,m,i),c(g)),!1;if(g&&!v&&typeof g=="object"){if(P.endsWith(m,"{}"))m=s?m:m.slice(0,-2),g=JSON.stringify(g);else if(P.isArray(g)&&Xb(g)||(P.isFileList(g)||P.endsWith(m,"[]"))&&(S=P.toArray(g)))return m=Bf(m),S.forEach(function(x,b){!(P.isUndefined(x)||x===null)&&t.append(a===!0?ca([m],b,i):a===null?m:m+"[]",c(x))}),!1}return Ha(g)?!0:(t.append(ca(v,m,i),c(g)),!1)}const f=[],p=Object.assign(Yb,{defaultVisitor:u,convertValue:c,isVisitable:Ha});function _(g,m,v=0){if(!P.isUndefined(g)){if(v>l)throw new pe("Object is too deeply nested ("+v+" levels). Max depth: "+l,pe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(g),P.forEach(g,function(R,x){(!(P.isUndefined(R)||R===null)&&o.call(t,R,P.isString(x)?x.trim():x,m,p))===!0&&_(R,m?m.concat(x):[x],v+1)}),f.pop()}}if(!P.isObject(e))throw new TypeError("data must be an object");return _(e),t}function yc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function Br(e,t){this._pairs=[],e&&Fi(e,this,t)}const Df=Br.prototype;Df.append=function(t,n){this._pairs.push([t,n])};Df.toString=function(t){const n=t?function(s){return t.call(this,s,yc)}:yc;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Qb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lf(e,t,n){if(!t)return e;const s=n&&n.encode||Qb,o=P.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let a;if(i?a=i(t,o):a=P.isURLSearchParams(t)?t.toString():new Br(t,o).toString(s),a){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class bc{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){P.forEach(this.handlers,function(s){s!==null&&t(s)})}}const Dr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Zb=typeof URLSearchParams<"u"?URLSearchParams:Br,ew=typeof FormData<"u"?FormData:null,tw=typeof Blob<"u"?Blob:null,nw={isBrowser:!0,classes:{URLSearchParams:Zb,FormData:ew,Blob:tw},protocols:["http","https","file","blob","url","data"]},Lr=typeof window<"u"&&typeof document<"u",Wa=typeof navigator=="object"&&navigator||void 0,sw=Lr&&(!Wa||["ReactNative","NativeScript","NS"].indexOf(Wa.product)<0),ow=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iw=Lr&&window.location.href||"http://localhost",aw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lr,hasStandardBrowserEnv:sw,hasStandardBrowserWebWorkerEnv:ow,navigator:Wa,origin:iw},Symbol.toStringTag,{value:"Module"})),wt={...aw,...nw};function rw(e,t){return Fi(e,new wt.classes.URLSearchParams,{visitor:function(n,s,o,i){return wt.isNode&&P.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function lw(e){return P.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function cw(e){const t={},n=Object.keys(e);let s;const o=n.length;let i;for(s=0;s=n.length;return a=!a&&P.isArray(o)?o.length:a,l?(P.hasOwnProp(o,a)?o[a]=P.isArray(o[a])?o[a].concat(s):[o[a],s]:o[a]=s,!r):((!P.hasOwnProp(o,a)||!P.isObject(o[a]))&&(o[a]=[]),t(n,s,o[a],i)&&P.isArray(o[a])&&(o[a]=cw(o[a])),!r)}if(P.isFormData(e)&&P.isFunction(e.entries)){const n={};return P.forEachEntry(e,(s,o)=>{t(lw(s),o,n,0)}),n}return null}const ls=(e,t)=>e!=null&&P.hasOwnProp(e,t)?e[t]:void 0;function uw(e,t,n){if(P.isString(e))try{return(t||JSON.parse)(e),P.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Io={transitional:Dr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,i=P.isObject(t);if(i&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return o?JSON.stringify(Nf(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(i){const l=ls(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return rw(t,l).toString();if((r=P.isFileList(t))||s.indexOf("multipart/form-data")>-1){const d=ls(this,"env"),c=d&&d.FormData;return Fi(r?{"files[]":t}:t,c&&new c,l)}}return i||o?(n.setContentType("application/json",!1),uw(t)):t}],transformResponse:[function(t){const n=ls(this,"transitional")||Io.transitional,s=n&&n.forcedJSONParsing,o=ls(this,"responseType"),i=o==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.isString(t)&&(s&&!o||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,ls(this,"parseReviver"))}catch(l){if(r)throw l.name==="SyntaxError"?pe.from(l,pe.ERR_BAD_RESPONSE,this,null,ls(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wt.classes.FormData,Blob:wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch","query"],e=>{Io.headers[e]={}});function ua(e,t){const n=this||Io,s=t||n,o=Tt.from(s.headers);let i=s.data;return P.forEach(e,function(r){i=r.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Mf(e){return!!(e&&e.__CANCEL__)}let Oo=class extends pe{constructor(t,n,s){super(t??"canceled",pe.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function Ff(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new pe("Request failed with status code "+n.status,n.status>=400&&n.status<500?pe.ERR_BAD_REQUEST:pe.ERR_BAD_RESPONSE,n.config,n.request,n))}function dw(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function fw(e,t){e=e||10;const n=new Array(e),s=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const d=Date.now(),c=s[i];a||(a=d),n[o]=l,s[o]=d;let u=i,f=0;for(;u!==o;)f+=n[u++],u=u%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),d-a{n=c,o=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const c=Date.now(),u=c-n;u>=s?a(d,c):(o=d,i||(i=setTimeout(()=>{i=null,a(o)},s-u)))},()=>o&&a(o)]}const pi=(e,t,n=3)=>{let s=0;const o=fw(50,250);return pw(i=>{if(!i||typeof i.loaded!="number")return;const a=i.loaded,r=i.lengthComputable?i.total:void 0,l=r!=null?Math.min(a,r):a,d=Math.max(0,l-s),c=o(d);s=Math.max(s,l);const u={loaded:l,total:r,progress:r?l/r:void 0,bytes:d,rate:c||void 0,estimated:c&&r?(r-l)/c:void 0,event:i,lengthComputable:r!=null,[t?"download":"upload"]:!0};e(u)},n)},wc=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Ec=e=>(...t)=>P.asap(()=>e(...t)),hw=wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wt.origin),wt.navigator&&/(msie|trident)/i.test(wt.navigator.userAgent)):()=>!0,mw=wt.hasStandardBrowserEnv?{write(e,t,n,s,o,i,a){if(typeof document>"u")return;const r=[`${e}=${encodeURIComponent(t)}`];P.isNumber(n)&&r.push(`expires=${new Date(n).toUTCString()}`),P.isString(s)&&r.push(`path=${s}`),P.isString(o)&&r.push(`domain=${o}`),i===!0&&r.push("secure"),P.isString(a)&&r.push(`SameSite=${a}`),document.cookie=r.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof Tt?{...e}:e;function es(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(d,c,u,f){return P.isPlainObject(d)&&P.isPlainObject(c)?P.merge.call({caseless:f},d,c):P.isPlainObject(c)?P.merge({},c):P.isArray(c)?c.slice():c}function o(d,c,u,f){if(P.isUndefined(c)){if(!P.isUndefined(d))return s(void 0,d,u,f)}else return s(d,c,u,f)}function i(d,c){if(!P.isUndefined(c))return s(void 0,c)}function a(d,c){if(P.isUndefined(c)){if(!P.isUndefined(d))return s(void 0,d)}else return s(void 0,c)}function r(d,c,u){if(P.hasOwnProp(t,u))return s(d,c);if(P.hasOwnProp(e,u))return s(void 0,d)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:r,headers:(d,c,u)=>o(Sc(d),Sc(c),u,!0)};return P.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const u=P.hasOwnProp(l,c)?l[c]:o,f=P.hasOwnProp(e,c)?e[c]:void 0,p=P.hasOwnProp(t,c)?t[c]:void 0,_=u(f,p,c);P.isUndefined(_)&&u!==r||(n[c]=_)}),n}const vw=["content-type","content-length"];function yw(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([s,o])=>{vw.includes(s.toLowerCase())&&e.set(s,o)})}const bw=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Vf=e=>{const t=es({},e),n=f=>P.hasOwnProp(t,f)?t[f]:void 0,s=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),a=n("xsrfCookieName");let r=n("headers");const l=n("auth"),d=n("baseURL"),c=n("allowAbsoluteUrls"),u=n("url");if(t.headers=r=Tt.from(r),t.url=Lf(qf(d,u,c),e.params,e.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?bw(l.password):""))),P.isFormData(s)&&(wt.hasStandardBrowserEnv||wt.hasStandardBrowserWebWorkerEnv?r.setContentType(void 0):P.isFunction(s.getHeaders)&&yw(r,s.getHeaders(),n("formDataHeaderPolicy"))),wt.hasStandardBrowserEnv&&(P.isFunction(o)&&(o=o(t)),o===!0||o==null&&hw(t.url))){const p=i&&a&&mw.read(a);p&&r.set(i,p)}return t},ww=typeof XMLHttpRequest<"u",Ew=ww&&function(e){return new Promise(function(n,s){const o=Vf(e);let i=o.data;const a=Tt.from(o.headers).normalize();let{responseType:r,onUploadProgress:l,onDownloadProgress:d}=o,c,u,f,p,_;function g(){p&&p(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function v(){if(!m)return;const R=Tt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),b={data:!r||r==="text"||r==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:R,config:e,request:m};Ff(function(B){n(B),g()},function(B){s(B),g()},b),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(v)},m.onabort=function(){m&&(s(new pe("Request aborted",pe.ECONNABORTED,e,m)),g(),m=null)},m.onerror=function(x){const b=x&&x.message?x.message:"Network Error",$=new pe(b,pe.ERR_NETWORK,e,m);$.event=x||null,s($),g(),m=null},m.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const b=o.transitional||Dr;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),s(new pe(x,b.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,m)),g(),m=null},i===void 0&&a.setContentType(null),"setRequestHeader"in m&&P.forEach($f(a),function(x,b){m.setRequestHeader(b,x)}),P.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),r&&r!=="json"&&(m.responseType=o.responseType),d&&([f,_]=pi(d,!0),m.addEventListener("progress",f)),l&&m.upload&&([u,p]=pi(l),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(c=R=>{m&&(s(!R||R.type?new Oo(null,e,m):R),m.abort(),g(),m=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const S=dw(o.url);if(S&&!wt.protocols.includes(S)){s(new pe("Unsupported protocol "+S+":",pe.ERR_BAD_REQUEST,e));return}m.send(i||null)})},Sw=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const o=function(l){if(!s){s=!0,a();const d=l instanceof Error?l:this.reason;n.abort(d instanceof pe?d:new Oo(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,o(new pe(`timeout of ${t}ms exceeded`,pe.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:r}=n;return r.unsubscribe=()=>P.asap(a),r},Cw=function*(e,t){let n=e.byteLength;if(n{const o=xw(e,t);let i=0,a,r=l=>{a||(a=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:d,value:c}=await o.next();if(d){r(),l.close();return}let u=c.byteLength;if(n){let f=i+=u;n(f)}l.enqueue(new Uint8Array(c))}catch(d){throw r(d),d}},cancel(l){return r(l),o.return()}},{highWaterMark:2})};function Aw(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),s=e.slice(t+1);if(/;base64/i.test(n)){let a=s.length;const r=s.length;for(let p=0;p=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(a-=2,p+=2)}let l=0,d=r-1;const c=p=>p>=2&&s.charCodeAt(p-2)===37&&s.charCodeAt(p-1)===51&&(s.charCodeAt(p)===68||s.charCodeAt(p)===100);d>=0&&(s.charCodeAt(d)===61?(l++,d--):c(d)&&(l++,d-=3)),l===1&&d>=0&&(s.charCodeAt(d)===61||c(d))&&l++;const f=Math.floor(a/4)*3-(l||0);return f>0?f:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(s,"utf8");let i=0;for(let a=0,r=s.length;a=55296&&l<=56319&&a+1=56320&&d<=57343?(i+=4,a++):i+=3}else i+=3}return i}const Nr="1.16.1",xc=64*1024,{isFunction:Jo}=P,kc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Tw=e=>{const t=P.global!==void 0&&P.global!==null?P.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=P.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:a}=e,r=o?Jo(o):typeof fetch=="function",l=Jo(i),d=Jo(a);if(!r)return!1;const c=r&&Jo(n),u=r&&(typeof s=="function"?(v=>S=>v.encode(S))(new s):async v=>new Uint8Array(await new i(v).arrayBuffer())),f=l&&c&&kc(()=>{let v=!1;const S=new i(wt.origin,{body:new n,method:"POST",get duplex(){return v=!0,"half"}}),R=S.headers.has("Content-Type");return S.body!=null&&S.body.cancel(),v&&!R}),p=d&&c&&kc(()=>P.isReadableStream(new a("").body)),_={stream:p&&(v=>v.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!_[v]&&(_[v]=(S,R)=>{let x=S&&S[v];if(x)return x.call(S);throw new pe(`Response type '${v}' is not supported`,pe.ERR_NOT_SUPPORT,R)})});const g=async v=>{if(v==null)return 0;if(P.isBlob(v))return v.size;if(P.isSpecCompliantForm(v))return(await new i(wt.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(P.isArrayBufferView(v)||P.isArrayBuffer(v))return v.byteLength;if(P.isURLSearchParams(v)&&(v=v+""),P.isString(v))return(await u(v)).byteLength},m=async(v,S)=>{const R=P.toFiniteNumber(v.getContentLength());return R??g(S)};return async v=>{let{url:S,method:R,data:x,signal:b,cancelToken:$,timeout:B,onDownloadProgress:G,onUploadProgress:D,responseType:X,headers:V,withCredentials:O="same-origin",fetchOptions:Z,maxContentLength:W,maxBodyLength:oe}=Vf(v);const de=P.isNumber(W)&&W>-1,ee=P.isNumber(oe)&&oe>-1;let re=o||fetch;X=X?(X+"").toLowerCase():"text";let Ee=Sw([b,$&&$.toAbortSignal()],B),Se=null;const ne=Ee&&Ee.unsubscribe&&(()=>{Ee.unsubscribe()});let he;try{if(de&&typeof S=="string"&&S.startsWith("data:")&&Aw(S)>W)throw new pe("maxContentLength size of "+W+" exceeded",pe.ERR_BAD_RESPONSE,v,Se);if(ee&&R!=="get"&&R!=="head"){const N=await m(V,x);if(typeof N=="number"&&isFinite(N)&&N>oe)throw new pe("Request body larger than maxBodyLength limit",pe.ERR_BAD_REQUEST,v,Se)}if(D&&f&&R!=="get"&&R!=="head"&&(he=await m(V,x))!==0){let N=new i(S,{method:"POST",body:x,duplex:"half"}),U;if(P.isFormData(x)&&(U=N.headers.get("content-type"))&&V.setContentType(U),N.body){const[L,z]=wc(he,pi(Ec(D)));x=Cc(N.body,xc,L,z)}}P.isString(O)||(O=O?"include":"omit");const fe=l&&"credentials"in i.prototype;if(P.isFormData(x)){const N=V.getContentType();N&&/^multipart\/form-data/i.test(N)&&!/boundary=/i.test(N)&&V.delete("content-type")}V.set("User-Agent","axios/"+Nr,!1);const Te={...Z,signal:Ee,method:R.toUpperCase(),headers:$f(V.normalize()),body:x,duplex:"half",credentials:fe?O:void 0};Se=l&&new i(S,Te);let H=await(l?re(Se,Z):re(S,Te));if(de){const N=P.toFiniteNumber(H.headers.get("content-length"));if(N!=null&&N>W)throw new pe("maxContentLength size of "+W+" exceeded",pe.ERR_BAD_RESPONSE,v,Se)}const ce=p&&(X==="stream"||X==="response");if(p&&H.body&&(G||de||ce&&ne)){const N={};["status","statusText","headers"].forEach(A=>{N[A]=H[A]});const U=P.toFiniteNumber(H.headers.get("content-length")),[L,z]=G&&wc(U,pi(Ec(G),!0))||[];let y=0;const w=A=>{if(de&&(y=A,y>W))throw new pe("maxContentLength size of "+W+" exceeded",pe.ERR_BAD_RESPONSE,v,Se);L&&L(A)};H=new a(Cc(H.body,xc,w,()=>{z&&z(),ne&&ne()}),N)}X=X||"text";let E=await _[P.findKey(_,X)||"text"](H,v);if(de&&!p&&!ce){let N;if(E!=null&&(typeof E.byteLength=="number"?N=E.byteLength:typeof E.size=="number"?N=E.size:typeof E=="string"&&(N=typeof s=="function"?new s().encode(E).byteLength:E.length)),typeof N=="number"&&N>W)throw new pe("maxContentLength size of "+W+" exceeded",pe.ERR_BAD_RESPONSE,v,Se)}return!ce&&ne&&ne(),await new Promise((N,U)=>{Ff(N,U,{data:E,headers:Tt.from(H.headers),status:H.status,statusText:H.statusText,config:v,request:Se})})}catch(fe){if(ne&&ne(),Ee&&Ee.aborted&&Ee.reason instanceof pe){const Te=Ee.reason;throw Te.config=v,Se&&(Te.request=Se),fe!==Te&&(Te.cause=fe),Te}throw fe&&fe.name==="TypeError"&&/Load failed|fetch/i.test(fe.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,v,Se,fe&&fe.response),{cause:fe.cause||fe}):pe.from(fe,fe&&fe.code,v,Se,fe&&fe.response)}}},Rw=new Map,jf=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:o}=t,i=[s,o,n];let a=i.length,r=a,l,d,c=Rw;for(;r--;)l=i[r],d=c.get(l),d===void 0&&c.set(l,d=r?new Map:Tw(t)),c=d;return d};jf();const Mr={http:Jb,xhr:Ew,fetch:{get:jf}};P.forEach(Mr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ac=e=>`- ${e}`,Iw=e=>P.isFunction(e)||e===null||e===!1;function Ow(e,t){e=P.isArray(e)?e:[e];const{length:n}=e;let s,o;const i={};for(let a=0;a`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=n?a.length>1?`since : `+a.map(Ac).join(` `):" "+Ac(a[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return o}const Uf={getAdapter:Ow,adapters:Mr};function da(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Oo(null,e)}function Tc(e){return da(e),e.headers=Tt.from(e.headers),e.data=ua.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Uf.getAdapter(e.adapter||Io.adapter,e)(e).then(function(s){da(e),e.response=s;try{s.data=ua.call(e,e.transformResponse,s)}finally{delete e.response}return s.headers=Tt.from(s.headers),s},function(s){if(!Mf(s)&&(da(e),s&&s.response)){e.response=s.response;try{s.response.data=ua.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=Tt.from(s.response.headers)}return Promise.reject(s)})}const qi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qi[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Rc={};qi.transitional=function(t,n,s){function o(i,a){return"[Axios v"+Nr+"] Transitional option '"+i+"'"+a+(s?". "+s:"")}return(i,a,r)=>{if(t===!1)throw new pe(o(a," has been removed"+(n?" in "+n:"")),pe.ERR_DEPRECATED);return n&&!Rc[a]&&(Rc[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,r):!0}};qi.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function $w(e,t,n){if(typeof e!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let o=s.length;for(;o-- >0;){const i=s[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){const r=e[i],l=r===void 0||a(r,i,e);if(l!==!0)throw new pe("option "+i+" must be "+l,pe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pe("Unknown option "+i,pe.ERR_BAD_OPTION)}}const si={assertOptions:$w,validators:qi},qt=si.validators;let Yn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new bc,response:new bc}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=(()=>{if(!o.stack)return"";const a=o.stack.indexOf(` `);return a===-1?"":o.stack.slice(a+1)})();try{if(!s.stack)s.stack=i;else if(i){const a=i.indexOf(` `),r=a===-1?-1:i.indexOf(` `,a+1),l=r===-1?"":i.slice(r+1);String(s.stack).endsWith(l)||(s.stack+=` `+i)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=es(this.defaults,n);const{transitional:s,paramsSerializer:o,headers:i}=n;s!==void 0&&si.assertOptions(s,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean),legacyInterceptorReqResOrdering:qt.transitional(qt.boolean)},!1),o!=null&&(P.isFunction(o)?n.paramsSerializer={serialize:o}:si.assertOptions(o,{encode:qt.function,serialize:qt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),si.assertOptions(n,{baseUrl:qt.spelling("baseURL"),withXsrfToken:qt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&P.merge(i.common,i[n.method]);i&&P.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete i[_]}),n.headers=Tt.concat(a,i);const r=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const m=n.transitional||Dr;m&&m.legacyInterceptorReqResOrdering?r.unshift(g.fulfilled,g.rejected):r.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let c,u=0,f;if(!l){const _=[Tc.bind(this),void 0];for(_.unshift(...r),_.push(...d),f=_.length,c=Promise.resolve(n);u{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](o);s._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(r=>{s.subscribe(r),i=r}).then(o);return a.cancel=function(){s.unsubscribe(i)},a},t(function(i,a,r){s.reason||(s.reason=new Oo(i,a,r),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new zf(function(o){t=o}),cancel:t}}};function Bw(e){return function(n){return e.apply(null,n)}}function Dw(e){return P.isObject(e)&&e.isAxiosError===!0}const Ka={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ka).forEach(([e,t])=>{Ka[t]=e});function Hf(e){const t=new Yn(e),n=Cf(Yn.prototype.request,t);return P.extend(n,Yn.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Hf(es(e,o))},n}const Ye=Hf(Io);Ye.Axios=Yn;Ye.CanceledError=Oo;Ye.CancelToken=Pw;Ye.isCancel=Mf;Ye.VERSION=Nr;Ye.toFormData=Fi;Ye.AxiosError=pe;Ye.Cancel=Ye.CanceledError;Ye.all=function(t){return Promise.all(t)};Ye.spread=Bw;Ye.isAxiosError=Dw;Ye.mergeConfig=es;Ye.AxiosHeaders=Tt;Ye.formToJSON=e=>Nf(P.isHTMLForm(e)?new FormData(e):e);Ye.getAdapter=Uf.getAdapter;Ye.HttpStatusCode=Ka;Ye.default=Ye;const{Axios:fT,AxiosError:pT,CanceledError:hT,isCancel:mT,CancelToken:_T,VERSION:gT,all:vT,Cancel:yT,isAxiosError:bT,spread:wT,toFormData:ET,AxiosHeaders:ST,HttpStatusCode:CT,formToJSON:xT,getAdapter:kT,mergeConfig:AT,create:TT}=Ye;let Ga=null;function Lw(e){Ga=e}async function Nw(){return Ga?(await Ga(),!0):!1}const qe=Ye.create({baseURL:"/api",timeout:2e4,headers:{"Content-Type":"application/json"}});qe.interceptors.request.use(e=>{const t=localStorage.getItem("h5_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));qe.interceptors.response.use(e=>{const t=e.data;return t.code!==0?t.code===1002?(Oc("biz1002"),Promise.reject({code:1002,message:t.message||"未授权"})):(xe(t.message||"请求失败"),Promise.reject({code:t.code,message:t.message||"请求失败"})):t.data},async e=>{let t="网络异常,请稍后重试",n=-1;if(e.response)switch(n=e.response.status,e.response.status){case 401:await Oc("http401");break;case 403:t="拒绝访问";break;case 404:t="请求的资源不存在";break;case 500:t="服务器内部错误";break;default:t=`请求失败 (${e.response.status})`}else e.code==="ECONNABORTED"&&(t="请求超时,请稍后重试");return n!==401&&xe(t),Promise.reject({code:n,message:t})});const Mw="oauth_redirect_count",Ic=3;let qs=null;async function Oc(e){const t=e==="http401"?"HTTP 401":"业务码 1002";return qs?(console.warn(`[API] ${t} 未授权 — 已有处理进行中,等待完成`),qs):(console.warn(`[API] ${t} 未授权,清除凭证并跳转登录`),qs=(async()=>{try{if(localStorage.removeItem("h5_token"),localStorage.removeItem("employee_id"),localStorage.removeItem("employee_name"),"wwa8c87970b2011f41"){const s=parseInt(localStorage.getItem(Mw)||"0",10);if(s>=Ic){console.error("[API] OAuth2 重定向次数超限,疑似无限循环,停止重定向"),xe("登录状态异常,请刷新页面重试");return}console.warn(`[API] OAuth2 重定向计数: ${s}/${Ic}`),await Nw()||(console.warn("[API] 认证过期处理器未注册,降级为刷新页面"),window.location.reload())}}catch(n){console.warn("[API] 401 处理失败,刷新页面:",n),window.location.reload()}finally{qs=null}})(),qs)}function Ja(e){return{message_id:e.id||e.message_id||"",conversation_id:e.conversation_id||"",message_type:e.sender_type||e.message_type||"text",msg_type:e.msg_type,content:typeof e.content=="string"?e.content:e.content?JSON.stringify(e.content):"",sender_name:e.sender_name||"",created_at:e.created_at||"",media_url:e.media_url,file_name:e.file_name,file_size:e.file_size,extra_data:e.extra_data,reply_to_id:e.reply_to_id}}function Wf(e){return(e||[]).map(Ja)}async function Fw(){return await qe.get("/h5/user")}function qw(e){return e?{conversation_id:e.id||e.conversation_id||"",employee_id:e.employee_id||"",employee_name:e.employee_name||"",status:e.status||"waiting",agent_id:e.assigned_agent_id||e.agent_id||"",agent_name:e.agent_name||"",created_at:e.created_at||"",updated_at:e.updated_at||"",ai_substantive_reply_count:e.ai_substantive_reply_count??0,can_call_agent:e.can_call_agent??!1,participants:e.participants||[]}:null}async function Vw(){const e=await qe.get("/h5/conversations/current");return qw(e)}async function $c(e){const t=await qe.post("/h5/conversations/current/messages",e,{timeout:3e4});return{user_message:Ja(t.user_message),ai_reply:t.ai_reply?Ja(t.ai_reply):t.ai_reply,is_guidance:t.is_guidance,ai_reply_count:t.ai_reply_count,can_call_agent:t.can_call_agent}}async function jw(e){const n=await qe.get("/h5/conversations/current/messages/poll",{params:e}),s=(n==null?void 0:n.items)||n||[];return Wf(s)}async function Pc(e){const n=await qe.get("/h5/conversations/current/messages",{params:e}),s=(n==null?void 0:n.items)||[];return{items:Wf(s),has_more:(n==null?void 0:n.has_more)||!1}}async function Uw(e){return await qe.post("/h5/conversations/current/shake",e)}async function zw(){const t=await qe.get("/h5/approval-links");return(t==null?void 0:t.items)||t||[]}async function Hw(){return await qe.get("/approval/keywords")||[]}async function Ww(e){return await qe.post("/approval/jump",{template_id:e})}async function Kw(){const t=await qe.get("/h5/software-downloads");return(t==null?void 0:t.items)||t||[]}async function Gw(e){return await qe.post(`/h5/conversations/${e}/join`)}async function Jw(e){return await qe.post(`/h5/conversations/${e}/leave-participant`)}async function Xw(e,t){return await qe.post(`/conversation/${e}/evaluate`,t)}async function Yw(e){return await qe.get(`/conversation/${e}/evaluation`)}async function Qw(e){return await qe.post("/h5/oauth/callback",e)}async function Zw(e){return await qe.post("/h5/mock-login",e)}async function e0(){return await qe.get("/h5/me")}async function t0(){const e=window.location.origin+"/h5/";return await qe.get("/h5/oauth/authorize",{params:{redirect_uri:e}})}const fa="h5_token",Un="employee_id",cs="employee_name",Vs="oauth_redirect_count",Bc=3,kt=Ir("employee",()=>{const e=q(localStorage.getItem(fa)||"");e.value&&!a(e.value)&&localStorage.removeItem(Vs);const t=q(null),n=q(!1),s=F(()=>e.value?!a(e.value):!1),o=F(()=>{var b;return((b=t.value)==null?void 0:b.employee_id)||localStorage.getItem(Un)||""}),i=F(()=>{var b;return((b=t.value)==null?void 0:b.employee_name)||localStorage.getItem(cs)||""});function a(b){try{const $=b.split(".");if($.length!==3)return!1;const B=JSON.parse(atob($[1]));return B.exp?Math.floor(Date.now()/1e3)>=B.exp-60:!1}catch{return!1}}function r(b){e.value=b,localStorage.setItem(fa,b)}function l(){e.value="",t.value=null,localStorage.removeItem(fa),localStorage.removeItem(Un),localStorage.removeItem(cs)}function d(){localStorage.removeItem(Vs)}function c(){const $=parseInt(localStorage.getItem(Vs)||"0",10)+1;return localStorage.setItem(Vs,String($)),$}function u(){return parseInt(localStorage.getItem(Vs)||"0",10)>=Bc}async function f(b,$){n.value=!0;try{const B=await Qw({code:b,state:$});return r(B.token),localStorage.setItem(Un,B.employee_id),localStorage.setItem(cs,B.employee_name),t.value={employee_id:B.employee_id,employee_name:B.employee_name,department:B.department,position:B.position,mobile:"",email:"",avatar:B.avatar,is_vip:!1},console.log("[EmployeeStore] OAuth2 登录成功:",B.employee_name),d(),B}catch(B){throw console.error("[EmployeeStore] OAuth2 登录失败:",B),B}finally{n.value=!1}}async function p(b,$){n.value=!0;try{const B=await Zw({employee_id:b,employee_name:$||"测试用户"});return r(B.token),localStorage.setItem(Un,B.employee_id),localStorage.setItem(cs,B.employee_name),t.value={employee_id:B.employee_id,employee_name:B.employee_name,department:B.department,position:B.position,mobile:"",email:"",avatar:B.avatar,is_vip:!1},console.log("[EmployeeStore] Mock 登录成功:",B.employee_name),d(),B}catch(B){throw console.error("[EmployeeStore] Mock 登录失败:",B),B}finally{n.value=!1}}async function _(){if(e.value)try{const b=await e0();t.value=b,localStorage.setItem(Un,b.employee_id),localStorage.setItem(cs,b.employee_name),console.log("[EmployeeStore] 获取员工信息成功:",b.employee_name)}catch(b){throw console.error("[EmployeeStore] 获取员工信息失败:",b),b}}async function g(){const b=new URLSearchParams(window.location.search),$=b.get("invite"),B=b.get("eid");$&&(sessionStorage.setItem("h5_invite_conv_id",$),B&&sessionStorage.setItem("h5_invite_eid",B));const G=window.location.origin+"/h5/";try{const O=await t0();if(O.authorize_url){window.location.href=O.authorize_url;return}}catch(O){console.warn("[EmployeeStore] 从后端获取授权URL失败,尝试本地构造:",O)}const D="wwa8c87970b2011f41",X=encodeURIComponent(G),V=`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${D}&redirect_uri=${X}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`;window.location.href=V}async function m(){if(console.warn("[EmployeeStore] Token 已过期或无效,重新授权"),u()){console.error("[EmployeeStore] OAuth2 重定向次数超限,疑似无限循环,停止重定向"),l(),d();const{showToast:$}=await Wn(async()=>{const{showToast:B}=await import("./index-7cW1Ke0y.js");return{showToast:B}},__vite__mapDeps([0,1,2,3]));$("登录状态异常,请刷新页面重试");return}l();const b=c();console.warn(`[EmployeeStore] OAuth2 重定向计数: ${b}/${Bc}`),await g()}function v(b){localStorage.setItem(Un,b),e.value="",t.value={employee_id:b,employee_name:"开发测试用户",department:"IT部",position:"开发工程师",mobile:"",email:"",avatar:"",is_vip:!1},console.log("[EmployeeStore] 开发模式登录:",b)}function S(){l(),console.log("[EmployeeStore] 已登出")}function R(b){r(b),d()}function x(b){t.value={employee_id:b.userid,employee_name:b.name,department:b.department||"",position:"",mobile:b.phone||"",email:b.email||"",avatar:b.avatar||"",is_vip:!1},localStorage.setItem(Un,b.userid),localStorage.setItem(cs,b.name)}return Lw(m),{token:e,employeeInfo:t,authenticating:n,isAuthenticated:s,employeeId:o,employeeName:i,handleOAuthCallback:f,mockLogin:p,fetchEmployeeInfo:_,redirectToOAuth:g,handleUnauthorized:m,devLogin:v,logout:S,setToken:R,setUserInfo:x}}),n0=Object.freeze(Object.defineProperty({__proto__:null,useEmployeeStore:kt},Symbol.toStringTag,{value:"Module"})),s0=3e4,o0=3e4,i0=1e3;let so=null;function a0(e){return so&&so.readyState===WebSocket.OPEN?(so.send(JSON.stringify(e)),!0):(console.warn("[H5 WS] WebSocket 未连接,无法发送消息:",e),!1)}function r0(){let e=null,t=null,n=null,s=0,o=!1;function i(){const u=kt(),f=u.employeeId,p=u.token;if(!f||!p){console.warn("[H5 WS] 未登录或缺少token,跳过连接");return}e&&a(),o=!1;const _=window.location.protocol==="https:"?"wss:":"ws:",g=window.location.host,m=`${_}//${g}/ws/h5/${f}`;console.log(`[H5 WS] 正在连接: ${m}`),e=new WebSocket(m,[`bearer.${p}`]),so=e,e.onopen=()=>{console.log("[H5 WS] 连接成功"),s=0,r(),Ot().stopPolling()},e.onmessage=v=>{try{const S=JSON.parse(v.data);c(S)}catch(S){console.error("[H5 WS] 消息解析失败:",S)}},e.onclose=()=>{if(console.log("[H5 WS] 连接关闭"),l(),e=null,!o){const v=Ot();v.cancelStreamingBubble(),v.startPolling(),d()}},e.onerror=v=>{console.error("[H5 WS] 连接错误:",v)}}function a(){o=!0,n&&(clearTimeout(n),n=null),l(),e&&(e.close(),e=null),so=null,s=0,console.log("[H5 WS] 已主动断开连接")}function r(){l(),t=setInterval(()=>{e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"ping"}))},s0)}function l(){t&&(clearInterval(t),t=null)}function d(){if(o)return;const u=Math.min(i0*Math.pow(2,s),o0);s++,console.log(`[H5 WS] 将在 ${u/1e3} 秒后重连(第 ${s} 次)`),n&&clearTimeout(n),n=setTimeout(()=>{console.log("[H5 WS] 正在重连..."),i()},u)}function c(u){var p,_,g,m,v;const f=Ot();switch(u.type){case"participant_invited":(p=u.data)!=null&&p.participants&&f.updateParticipants(u.data.participants);break;case"participant_joined":(_=u.data)!=null&&_.participants&&f.updateParticipants(u.data.participants);break;case"participant_removed":if((g=u.data)!=null&&g.participants&&f.updateParticipants(u.data.participants),(m=u.data)!=null&&m.changed){const S=kt();u.data.changed.map(x=>x.id).includes(S.employeeId)&&(console.log("[H5 WS] 当前用户被移除会话"),f.handleRemovedFromConversation())}break;case"participant_left":(v=u.data)!=null&&v.participants&&f.updateParticipants(u.data.participants);break;case"new_message":u.data&&f.handleNewMessage(u.data);break;case"ai_reply_chunk":u.data&&f.handleAiReplyChunk(u.data);break;case"ai_reply":u.data&&f.handleAiReply(u.data);break;case"ai_reply_failed":u.data&&f.handleAiReplyFailed(u.data);break;case"ai_thinking":u.data&&f.handleAiThinking(u.data);break;case"dynamic_recommend":u.data&&f.handleDynamicRecommend(u.data);break;case"asset_recommend":u.data&&f.handleAssetRecommend(u.data);break;case"pong":break;case"queue_position_update":u.data&&f.handleQueuePositionUpdate(u.data);break;case"conversation_resolved":u.data&&f.handleConversationResolved(u.data);break;case"pending_close_request":u.data&&f.handlePendingCloseRequest(u.data);break;case"quiz_diagnostic_answer":u.data&&f.handleQuizDiagnosticAnswer(u.data);break;default:console.warn(`[H5 WS] 未知消息类型: ${u.type}`)}}return{connect:i,disconnect:a}}const l0="h5_messages_cache",c0=7,u0=100;function Fr(e){return`${l0}_${e}`}function d0(e){try{const t=Fr(e),n=localStorage.getItem(t);if(!n)return null;const s=JSON.parse(n),o=s.timestamp||0,i=Date.now(),a=c0*24*60*60*1e3;return i-o>a?(localStorage.removeItem(t),null):s.messages||null}catch(t){return console.warn("[Store] 读取消息缓存失败:",t),null}}function js(e,t){try{const n=Fr(e),s=t.slice(-u0);localStorage.setItem(n,JSON.stringify({messages:s,timestamp:Date.now()}))}catch(n){console.warn("[Store] 保存消息缓存失败:",n)}}function f0(e){try{const t=Fr(e);localStorage.removeItem(t)}catch(t){console.warn("[Store] 清除消息缓存失败:",t)}}function p0(e,t){const n=new Map;return e.forEach(s=>n.set(s.message_id,s)),t.forEach(s=>n.set(s.message_id,s)),Array.from(n.values()).sort((s,o)=>new Date(s.created_at).getTime()-new Date(o.created_at).getTime())}const Ot=Ir("conversation",()=>{const e=q(null),t=q(null),n=q([]),s=q(!1),o=q(!1),i=q(!1),a=q(!0),r=q(null),l=q(!1),d=q([]),c=q(!1),u=q(""),f=q([]),p=q(""),_=q(!1),g=q([]),m=q(""),v=q(null),S=q([]),R=q(!1),x=q([]),b=q(0),$=q([]);function B(I){!I.recommends||I.recommends.length===0||($.value.push(...I.recommends),$.value.length>5&&$.value.splice(0,$.value.length-5),b.value+=I.recommends.length,console.log("[Store] 资产推荐已接收:",I.recommends.length,"条, 未读:",b.value))}function G(){$.value=[]}const D=q(null),X=q(new Set),V=F(()=>kt().isAuthenticated),O=F(()=>t.value?t.value.status!=="resolved":!1),Z=F(()=>!t.value||!e.value||t.value.employee_id===e.value.employee_id?!1:S.value.some(I=>{var Y;return I.id===((Y=e.value)==null?void 0:Y.employee_id)})),W=F(()=>S.value.filter(Y=>Y.joined).length),oe=F(()=>{const I={};for(const Y of d.value)I[Y.category]||(I[Y.category]=[]),I[Y.category].push(Y);return I}),de=F(()=>{const I={};for(const Y of f.value)I[Y.category]||(I[Y.category]=[]),I[Y.category].push(Y);return I});function ee(I){const Y=X.value;if(Y.delete(I),Y.add(I),Y.size>500){const ue=Y.values().next().value;ue&&Y.delete(ue)}}function re(I){if(X.value.has(I.message_id)){console.log(`[H5 WS去重] 跳过重复消息: ${I.message_id}`);return}ee(I.message_id),n.value.push({message_id:I.message_id,conversation_id:I.conversation_id,message_type:I.sender_type||"system",msg_type:I.msg_type||"text",content:typeof I.content=="string"?I.content:I.content?JSON.stringify(I.content):"",sender_name:I.sender_name||"",created_at:new Date().toISOString()}),p.value=I.message_id}async function Ee(I,Y){await kt().handleOAuthCallback(I,Y)}async function Se(){try{const I=kt();I.employeeInfo&&(e.value={employee_id:I.employeeInfo.employee_id,employee_name:I.employeeInfo.employee_name,department:I.employeeInfo.department,position:I.employeeInfo.position,level:"",is_vip:I.employeeInfo.is_vip,avatar_url:I.employeeInfo.avatar});const Y=await Fw();e.value=Y,console.log("[Store] 获取用户信息成功:",Y.employee_name)}catch(I){throw console.error("[Store] 获取用户信息失败:",I),I}}async function ne(){try{const I=await Vw();t.value=I,i.value=(I==null?void 0:I.can_call_agent)??!1,S.value=(I==null?void 0:I.participants)||[],console.log("[Store] 获取当前会话:",I?I.conversation_id:"无活跃会话","参与者:",S.value.length)}catch(I){console.error("[Store] 获取当前会话失败:",I)}}async function he(I,Y){var gt,An,jr,Ur;if(console.log("[Store] sendNewMessage 开始执行, content:",I,"options:",Y),!I.trim()){console.warn("[Store] content 为空,直接返回");return}const ue=kt(),_e=`temp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,Oe={message_id:_e,conversation_id:((gt=t.value)==null?void 0:gt.conversation_id)||"",message_type:"employee",msg_type:(Y==null?void 0:Y.msg_type)||"text",content:I.trim(),sender_name:ue.employeeName||"我",created_at:new Date().toISOString(),status:"sending"};n.value.push(Oe),console.log("[Store] 乐观更新:临时消息已添加到列表, tempMessageId:",_e),s.value=!0;try{const dt={content:I.trim()};Y!=null&&Y.msg_type&&(dt.msg_type=Y.msg_type,dt.media_url=Y.media_url,dt.file_name=Y.file_name,dt.file_size=Y.file_size),console.log("[Store] 请求参数:",JSON.stringify(dt));const st=await $c(dt);if(console.log("[Store] API 响应:",st),!st)throw console.error("[Store] API 响应为空"),new Error("API 响应为空");if(!st.user_message)throw console.error("[Store] API 响应缺少 user_message"),new Error("API 响应格式错误:缺少 user_message");const Do=n.value.findIndex(Lo=>Lo.message_id===_e);if(Do!==-1){n.value[Do]={...st.user_message,status:"sent"},ee(st.user_message.message_id),p.value=st.user_message.message_id,console.log("[Store] 乐观更新成功:临时消息已替换为真实消息");const Lo=(An=t.value)==null?void 0:An.conversation_id;Lo&&js(Lo,n.value)}else n.value.push({...st.user_message,status:"sent"}),ee(st.user_message.message_id),p.value=st.user_message.message_id;i.value=st.can_call_agent??!1,t.value&&(t.value.can_call_agent=st.can_call_agent??!1,t.value.ai_substantive_reply_count=st.ai_reply_count??0),!t.value&&((jr=st.user_message)!=null&&jr.conversation_id)&&(console.log("[Store] 发送消息后 currentConversation 为 null,重新获取会话信息..."),await ne(),t.value&&(t.value.can_call_agent=st.can_call_agent??!1,t.value.ai_substantive_reply_count=st.ai_reply_count??0,console.log("[Store] 新会话已获取:",t.value.conversation_id))),console.log("[Store] 消息发送成功, AI回复计数:",st.ai_reply_count,"可呼叫坐席:",st.can_call_agent,"是否引导:",st.is_guidance)}catch(dt){console.error("[Store] 消息发送失败:",dt),console.error("[Store] 错误详情:",dt==null?void 0:dt.message,(Ur=dt==null?void 0:dt.response)==null?void 0:Ur.data,dt==null?void 0:dt.stack);const st=n.value.findIndex(Do=>Do.message_id===_e);throw st!==-1&&(n.value[st].status="failed",console.log("[Store] 乐观更新失败:临时消息状态已改为 failed")),dt}finally{s.value=!1,console.log("[Store] sendNewMessage finally 执行完成")}}async function fe(){var I;if(!(!V.value||!O.value))try{const Y=p.value?{after_message_id:p.value}:void 0,ue=await jw(Y);if(ue&&ue.length>0){const _e=ue.filter(Oe=>X.value.has(Oe.message_id)?(console.log(`[H5轮询去重] 跳过重复消息: ${Oe.message_id}`),!1):(ee(Oe.message_id),!0));if(_e.length>0){n.value.push(..._e),p.value=_e[_e.length-1].message_id,console.log("[Store] 轮询到新消息:",_e.length,"条");const Oe=(I=t.value)==null?void 0:I.conversation_id;Oe&&js(Oe,n.value)}}}catch(Y){console.error("[Store] 轮询消息失败:",Y)}}async function Te(I){var Y;if(!(!V.value||!O.value))try{const ue=await Pc(I);if(ue.items&&ue.items.length>0){const _e=ue.items.filter(Oe=>X.value.has(Oe.message_id)?!1:(ee(Oe.message_id),!0));if(_e.length>0){I!=null&&I.before?n.value.push(..._e):n.value=_e;const Oe=_e[_e.length-1];Oe&&(p.value=Oe.message_id),console.log("[Store] 获取到历史消息:",_e.length,"条");const gt=(Y=t.value)==null?void 0:Y.conversation_id;gt&&js(gt,n.value)}}}catch(ue){console.error("[Store] 获取历史消息失败:",ue)}}function H(){r.value||(console.log("[Store] 启动消息轮询(3秒间隔)"),r.value=setInterval(()=>{fe()},3e3))}function ce(){r.value&&(console.log("[Store] 停止消息轮询"),clearInterval(r.value),r.value=null)}async function E(){var I,Y;if(o.value)return"pending";o.value=!0;try{const ue=kt(),_e=await Uw({employee_id:ue.employeeId,employee_name:ue.employeeName});console.log("[Store] 招手成功:",_e);const Oe={message_id:`sys_shake_${Date.now()}`,conversation_id:((I=t.value)==null?void 0:I.conversation_id)||"",message_type:"system",content:_e.funny_phrase,sender_name:"系统",created_at:new Date().toISOString()};return n.value.push(Oe),_e.assign_result==="assigned"&&_e.assigned_agent_id?(Oe.content=`${_e.funny_phrase} 坐席正在查看您的信息,请等待处理回复!`,t.value&&(t.value.status="serving")):_e.assign_result==="queued"&&(Oe.content=`${_e.funny_phrase} ⏳ 当前无空闲坐席,您已进入排队,请耐心等待...`),((Y=_e.conversation)==null?void 0:Y.status)==="serving"&&await ne(),_e.assign_result||"queued"}catch(ue){return console.error("[Store] 招手失败:",ue),"error"}finally{o.value=!1}}async function N(){try{const I=await zw();d.value=I,console.log("[Store] 获取审批链接成功:",I.length,"条")}catch(I){console.error("[Store] 获取审批链接失败:",I)}}function U(){c.value=!1,u.value=""}function L(I=""){var ue;const Y={message_id:`approval_card_${Date.now()}`,conversation_id:((ue=t.value)==null?void 0:ue.conversation_id)||"",message_type:"system",msg_type:"approval_card",content:"",sender_name:"",created_at:new Date().toISOString(),extra_data:{approval_type:"",confidence:0}};n.value.push(Y),console.log("[Store] 手动插入审批卡片消息(快捷按钮触发)")}async function z(){try{const I=await Kw();f.value=I,console.log("[Store] 获取软件下载列表成功:",I.length,"条")}catch(I){console.error("[Store] 获取软件下载列表失败:",I)}}function y(){l.value=!l.value}async function w(I){try{await ne();const Y=t.value;Y&&Y.conversation_id!==I&&console.warn("[Store] 当前会话ID不匹配, 期望:",I,"实际:",Y.conversation_id),n.value=[],p.value="",await Te(),console.log("[Store] 已切换到邀请会话:",I)}catch(Y){console.error("[Store] 切换会话失败:",Y)}}async function A(){if(!t.value)return;const I=t.value.conversation_id;try{await Jw(I),console.log("[Store] 已退出会话:",I),t.value=null,S.value=[],n.value=[],p.value="",ce()}catch(Y){throw console.error("[Store] 退出会话失败:",Y),Y}}function j(){R.value=!R.value}async function J(I){const Y=n.value.findIndex(Oe=>Oe.message_id===I);if(Y===-1){console.warn("[Store] 重试消息找不到:",I);return}const ue=n.value[Y];if(ue.status!=="failed"){console.warn("[Store] 消息状态不是 failed,无法重试:",I);return}const _e=ue.content;n.value.splice(Y,1),console.log("[Store] 删除失败消息:",I),await he(_e,{msg_type:ue.msg_type,media_url:ue.media_url,file_name:ue.file_name,file_size:ue.file_size})}function K(I){S.value=I,t.value&&(t.value.participants=I),console.log("[Store] 参与者列表已通过WS更新:",I.length,"人")}function ie(){console.log("[Store] 当前用户被移除会话,清空状态"),t.value=null,S.value=[],n.value=[],p.value="",R.value=!1,ce()}function se(I){var ue;if(((ue=t.value)==null?void 0:ue.conversation_id)!==I.conversation_id||!I.chunk)return;if(!D.value){const _e=`ai_stream_${I.conversation_id}_${Date.now()}`;D.value=_e,n.value.push({message_id:_e,conversation_id:I.conversation_id,message_type:"ai",msg_type:"text",content:"",sender_name:"Duckula(达寇拉)",created_at:new Date().toISOString()})}const Y=n.value.findIndex(_e=>_e.message_id===D.value);Y!==-1&&(n.value[Y].content+=I.chunk)}function te(I){var Oe,gt;if(((Oe=t.value)==null?void 0:Oe.conversation_id)!==I.conversation_id)return;const Y={message_id:I.message_id,conversation_id:I.conversation_id,message_type:I.sender_type||"ai",msg_type:I.msg_type||"text",content:typeof I.content=="string"?I.content:I.content?JSON.stringify(I.content):"",sender_name:I.sender_name||"Duckula(达寇拉)",created_at:new Date().toISOString(),status:"sent",extra_data:I.extra_data||void 0},ue=D.value?n.value.findIndex(An=>An.message_id===D.value):-1;if(ue!==-1?n.value[ue]=Y:n.value.push(Y),D.value=null,ee(I.message_id),p.value=I.message_id,i.value=I.can_call_agent??!1,t.value){t.value.can_call_agent=I.can_call_agent??!1,t.value.ai_substantive_reply_count=I.ai_reply_count??0;const An={ai_handling:"waiting",queued:"waiting",serving:"serving",resolved:"resolved"};t.value.status=An[I.conversation_status]||t.value.status}const _e=(gt=t.value)==null?void 0:gt.conversation_id;_e&&js(_e,n.value)}function Q(I){var _e;if(((_e=t.value)==null?void 0:_e.conversation_id)!==I.conversation_id)return;const Y={message_id:`ai_failed_${I.conversation_id}_${Date.now()}`,conversation_id:I.conversation_id,message_type:"ai",msg_type:"text",content:I.message||"⚠️ AI 服务异常,请输入「IT」转人工或稍后重试。",sender_name:"Duckula(达寇拉)",created_at:new Date().toISOString(),status:"sent"},ue=D.value?n.value.findIndex(Oe=>Oe.message_id===D.value):-1;ue!==-1?n.value[ue]=Y:n.value.push(Y),D.value=null}function ve(I){var Oe;if(((Oe=t.value)==null?void 0:Oe.conversation_id)!==I.conversation_id)return;const Y=D.value,ue=Y?n.value.findIndex(gt=>gt.message_id===Y):-1,_e=I.status==="still_thinking"?"仍在思考中,请稍候...":"正在思考...";if(ue!==-1)n.value[ue].content=_e;else{const gt=`ai_thinking_${I.conversation_id}_${Date.now()}`;D.value=gt,n.value.push({message_id:gt,conversation_id:I.conversation_id,message_type:"ai",msg_type:"text",content:_e,sender_name:"Duckula(达寇拉)",created_at:new Date().toISOString()})}}function le(I){x.value.push(I),x.value.length>3&&x.value.shift(),b.value+=1,console.log("[Store] 动态推荐已接收:",I.title,"未读:",b.value)}function me(){b.value=0}function Ce(I){const Y=x.value.findIndex(ue=>ue.recommend_id===I);Y!==-1&&x.value.splice(Y,1)}function Ie(I,Y){var gt;const ue=(gt=t.value)==null?void 0:gt.conversation_id;if(!ue)return;const _e=kt();n.value.push({message_id:`option_select_${Date.now()}`,conversation_id:ue,message_type:"employee",msg_type:"text",content:Y,sender_name:_e.employeeName||"我",created_at:new Date().toISOString(),status:"sent"}),a0({type:"option_select",data:{conversation_id:ue,option_value:I,option_label:Y}})||(console.warn("[Store] WS 未连接,选项选择降级为 HTTP 消息发送"),$c({content:Y,msg_type:"text"}).catch(An=>{console.error("[Store] 选项选择 HTTP 降级发送失败:",An)})),console.log("[Store] 选项选择已发送:",I,Y)}function Ve(){if(!D.value)return;const I=n.value.findIndex(Y=>Y.message_id===D.value);I!==-1&&n.value.splice(I,1),D.value=null}const Be=q(null),Ke=q(null),nt=q(null);function Dt(I){var Y;((Y=t.value)==null?void 0:Y.conversation_id)===I.conversation_id&&(Be.value={position:I.position,segment:I.segment,ahead_count:I.ahead_count,queue_priority:I.queue_priority})}function Lt(I){var ue;if(((ue=t.value)==null?void 0:ue.conversation_id)!==I.conversation_id)return;t.value&&(t.value.status="resolved"),nt.value={conversation_id:I.conversation_id,resolved_by:I.resolved_by,resolved_method:I.resolved_method,resolve_summary:I.resolve_summary||""},Ke.value=null;const Y={message_id:`resolve_${I.conversation_id}_${Date.now()}`,conversation_id:I.conversation_id,message_type:"system",msg_type:"text",content:Po(I.resolved_method),sender_name:"系统",created_at:new Date().toISOString(),status:"sent"};n.value.push(Y)}function Mn(I){var ue;if(((ue=t.value)==null?void 0:ue.conversation_id)!==I.conversation_id)return;t.value&&(t.value.status="waiting"),Ke.value={conversation_id:I.conversation_id,resolve_summary:I.resolve_summary||"",agent_name:I.agent_name||"坐席"};const Y={message_id:`pending_close_${I.conversation_id}_${Date.now()}`,conversation_id:I.conversation_id,message_type:"system",msg_type:"text",content:`📋 ${I.agent_name||"坐席"}发起了结单请求,请确认`,sender_name:"系统",created_at:new Date().toISOString(),status:"sent"};n.value.push(Y)}function $o(I){const Y={message_id:`quiz_diag_${I.conversation_id}_${Date.now()}`,conversation_id:I.conversation_id,message_type:"system",msg_type:"text",content:`📝 诊断信息已传递给坐席:${I.question} → ${I.selected_answer}`,sender_name:"系统",created_at:new Date().toISOString(),status:"sent"};n.value.push(Y)}function Et(){Ke.value=null}function Nt(){nt.value=null,Be.value=null}function Po(I){return I==="ai_self"?"✅ 问题已解决,会话已关闭。24小时内可重新打开。":I==="agent_confirm"?"✅ 坐席已结单,会话已关闭。24小时内可重新打开。":I==="employee_initiative"?"✅ 会话已关闭。24小时内可重新打开。":I==="system_timeout"?"⏰ 会话因长时间无响应已自动关闭。24小时内可重新打开。":"✅ 会话已关闭。24小时内可重新打开。"}async function Bo(){var I;if(!_.value)try{console.log("[Store] 开始初始化应用..."),await Promise.all([Se(),ne()]);const Y=(I=t.value)==null?void 0:I.conversation_id;if(Y){const ue=d0(Y);if(ue&&ue.length>0){console.log(`[Store] 加载缓存消息 ${ue.length} 条`),n.value=ue;const _e=ue[ue.length-1];_e&&(p.value=_e.message_id)}}Promise.resolve().then(async()=>{try{const ue=await Pc({limit:50});if(ue.items&&ue.items.length>0){const _e=ue.items.filter(Oe=>X.value.has(Oe.message_id)?!1:(ee(Oe.message_id),!0));if(_e.length>0){Y&&n.value.length>0?n.value=p0(n.value,_e):n.value=_e;const Oe=_e[_e.length-1];Oe&&(p.value=Oe.message_id),Y&&js(Y,n.value),console.log(`[Store] 历史消息已加载,共 ${n.value.length} 条`)}}}catch(ue){console.warn("[Store] 加载历史消息失败:",ue)}}),setTimeout(()=>{Promise.all([N(),z()]).catch(ue=>console.warn("[Store] 加载面板数据失败:",ue))},500),H(),_.value=!0,console.log("[Store] 应用初始化完成(缓存优先显示)")}catch(Y){console.error("[Store] 应用初始化失败:",Y)}}function ep(){var I;(I=t.value)!=null&&I.conversation_id&&f0(t.value.conversation_id),ce()}return{userInfo:e,currentConversation:t,messages:n,loading:s,shaking:o,canCallAgent:i,agentOnline:a,assistantPanelVisible:l,approvalLinks:d,approvalCardVisible:c,approvalCardTriggerText:u,softwareDownloads:f,lastMessageId:p,initialized:_,troubleshootingSteps:g,troubleshootingTemplateName:m,troubleshootingCurrentNode:v,participants:S,participantPanelVisible:R,isLoggedIn:V,hasActiveConversation:O,isParticipant:Z,joinedParticipantCount:W,approvalLinksByCategory:oe,softwareDownloadsByCategory:de,handleOAuthCallback:Ee,fetchUserInfo:Se,fetchCurrentConversation:ne,fetchMessages:Te,sendNewMessage:he,pollNewMessages:fe,startPolling:H,stopPolling:ce,shakeAgent:E,fetchApprovalLinks:N,closeApprovalCard:U,showApprovalCard:L,fetchSoftwareDownloads:z,toggleAssistantPanel:y,switchToConversation:w,leaveAsParticipant:A,toggleParticipantPanel:j,retryMessage:J,updateParticipants:K,handleRemovedFromConversation:ie,initialize:Bo,cleanup:ep,handleNewMessage:re,handleAiReplyChunk:se,handleAiReply:te,handleAiReplyFailed:Q,cancelStreamingBubble:Ve,handleAiThinking:ve,handleDynamicRecommend:le,clearUnreadRecommend:me,removeRecommend:Ce,sendOptionSelect:Ie,dynamicRecommendations:x,unreadRecommendCount:b,handleAssetRecommend:B,clearAssetRecommend:G,assetRecommendations:$,queuePositionData:Be,pendingCloseRequest:Ke,resolvedInfo:nt,handleQueuePositionUpdate:Dt,handleConversationResolved:Lt,handlePendingCloseRequest:Mn,handleQuizDiagnosticAnswer:$o,clearPendingCloseRequest:Et,clearResolvedInfo:Nt}}),h0="/h5/duckula.webp";function m0(e,t){return nr()?(iu(e,t),!0):!1}const qr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _0=Object.prototype.toString,g0=e=>_0.call(e)==="[object Object]";function v0(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const s=t;t=void 0,s&&await s},n}function pa(e){return Array.isArray(e)?e:[e]}function y0(e,t,n={}){const{immediate:s=!0,immediateCallback:o=!1}=n,i=Dn(!1);let a;function r(){a&&(clearTimeout(a),a=void 0)}function l(){i.value=!1,r()}function d(...c){o&&e(),r(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=void 0,e(...c)},ms(t))}return s&&(i.value=!0,qr&&d()),m0(l),{isPending:Xo(i),start:d,stop:l}}function b0(e,t,n){return Ae(e,t,{...n,immediate:!0})}const w0=qr?window:void 0,Kf=qr?window.navigator:void 0;function E0(e){var t;const n=ms(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Gf(...e){const t=(s,o,i,a)=>(s.addEventListener(o,i,a),()=>s.removeEventListener(o,i,a)),n=F(()=>{const s=pa(ms(e[0])).filter(o=>o!=null);return s.every(o=>typeof o!="string")?s:void 0});return b0(()=>{var s,o;return[(s=(o=n.value)===null||o===void 0?void 0:o.map(i=>E0(i)))!==null&&s!==void 0?s:[w0].filter(i=>i!=null),pa(ms(n.value?e[1]:e[0])),pa(Re(n.value?e[2]:e[1])),ms(n.value?e[3]:e[2])]},([s,o,i,a],r,l)=>{if(!(s!=null&&s.length)||!(o!=null&&o.length)||!(i!=null&&i.length))return;const d=g0(a)?{...a}:a,c=s.flatMap(u=>o.flatMap(f=>i.map(p=>t(u,f,p,d))));l(()=>{c.forEach(u=>u())})},{flush:"post"})}function S0(){const e=Dn(!1),t=Wt();return t&&ot(()=>{e.value=!0},t),e}function Jf(e){const t=S0();return F(()=>(t.value,!!e()))}function Dc(e,t={}){const{controls:n=!1,navigator:s=Kf}=t,o=Jf(()=>s&&"permissions"in s),i=Dn(),a=typeof e=="string"?{name:e}:e,r=Dn(),l=()=>{var c,u;r.value=(c=(u=i.value)===null||u===void 0?void 0:u.state)!==null&&c!==void 0?c:"prompt"};Gf(i,"change",l,{passive:!0});const d=v0(async()=>{if(o.value){if(!i.value)try{i.value=await s.permissions.query(a)}catch{i.value=void 0}finally{l()}if(n)return $e(i.value)}});return d(),n?{state:r,isSupported:o,query:d}:r}function C0(e={}){const{navigator:t=Kf,read:n=!1,source:s,copiedDuring:o=1500,legacy:i=!1}=e,a=Jf(()=>t&&"clipboard"in t),r=Dc("clipboard-read"),l=Dc("clipboard-write"),d=F(()=>a.value||i),c=Dn(""),u=Dn(!1),f=Dn(!1),p=y0(()=>u.value=!1,o,{immediate:!1});let _=0;async function g(){let b=!(a.value&&x(r.value));if(!b)try{c.value=await t.clipboard.readText()}catch{b=!0}b&&(c.value=R())}d.value&&n&&Gf(["copy","cut"],g,{passive:!0});async function m(b){const $=b??ms(s);if(d.value&&$!=null){f.value=!0;let B=!(a.value&&x(l.value));if(!B)try{const G=v($);await t.clipboard.write([G])}catch{B=!0}if(B)if(typeof $=="string")c.value=$,S($);else{const G=++_,D=await $();D!=null&&G===_&&(c.value=D,S(D))}u.value=!0,p.start(),f.value=!1}}function v(b){return typeof b=="string"?(c.value=b,new ClipboardItem({"text/plain":b})):new ClipboardItem({"text/plain":b().then(($="")=>(c.value=$,new Blob([$],{type:"text/plain"})))})}function S(b){const $=document.createElement("textarea");$.value=b,$.style.position="absolute",$.style.opacity="0",$.setAttribute("readonly",""),document.body.appendChild($),$.select(),document.execCommand("copy"),$.remove()}function R(){var b,$,B;return(b=($=document)===null||$===void 0||(B=$.getSelection)===null||B===void 0||(B=B.call($))===null||B===void 0?void 0:B.toString())!==null&&b!==void 0?b:""}function x(b){return b==="granted"||b==="prompt"}return{copyPending:Xo(f),isSupported:d,text:Xo(c),copied:Xo(u),copy:m}}async function Xf(e,t=!1){return qe.get("/wecom/jsapi-config",{params:{url:e,with_agent_config:t}})}const x0="https://res.wx.qq.com/open/js/jweixin-1.2.0.js",Lc=8e3,Nc=8e3,k0=1e4,A0=8e3,T0=["agentConfig","thirdPartyOpenPage","checkJsApi"],R0=["thirdPartyOpenPage"];function Xa(){const e=q(!1),t=q(!1),n=q(null);let s=!1;function o(){return/wxwork/i.test(navigator.userAgent)}function i(p){const _=p.match(/template_id=([^&]+)/);return _?_[1]:null}function a(p){return p.includes("template_id=")}function r(){return new Promise((p,_)=>{if(typeof window.wx<"u"){p();return}const g=setTimeout(()=>{m.onload=null,m.onerror=null,_(new Error("加载企微 JS-SDK 脚本超时"))},k0),m=document.createElement("script");m.src=x0,m.async=!0,m.onload=()=>{clearTimeout(g),typeof window.wx<"u"?p():_(new Error("JS-SDK 脚本已加载但 window.wx 未挂载"))},m.onerror=()=>{clearTimeout(g),_(new Error("加载企微 JS-SDK 脚本失败"))},document.head.appendChild(m)})}function l(p){return new Promise((_,g)=>{const m=window.wx;if(!m||typeof m.config!="function"){g(new Error("wx.config 不可用,JS-SDK 未正确加载"));return}let v=!1;const S=setTimeout(()=>{v||(v=!0,g(new Error(`wx.config 鉴权超时(${Lc/1e3}秒无响应)`)))},Lc);m.ready(()=>{v||(v=!0,clearTimeout(S),_())}),m.error(R=>{v||(v=!0,clearTimeout(S),g(new Error(`wx.config 失败: ${R.errMsg}`)))}),m.config({beta:!0,debug:!1,appId:p.corp_id,timestamp:p.timestamp,nonceStr:p.nonce_str,signature:p.signature,jsApiList:T0})})}function d(p){return new Promise((_,g)=>{const m=window.wx;if(!m||typeof m.agentConfig!="function"){g(new Error("wx.agentConfig 不可用"));return}let v=!1;const S=setTimeout(()=>{v||(v=!0,g(new Error(`wx.agentConfig 超时(${Nc/1e3}秒无响应)`)))},Nc);m.agentConfig({corpid:p.corp_id,agentid:p.agent_id,timestamp:p.agent_config.timestamp,nonceStr:p.agent_config.nonce_str,signature:p.agent_config.signature,jsApiList:R0,success:()=>{v||(v=!0,clearTimeout(S),_())},fail:R=>{v||(v=!0,clearTimeout(S),g(new Error(`wx.agentConfig 失败: ${R.errMsg}`)))}})})}function c(p){return new Promise(_=>{const g=window.wx;if(!g||typeof g.invoke!="function"){_(!1);return}const m={oaType:"10001",templateId:p,thirdNo:`itsmartdesk_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,extData:{fieldList:[]}};let v=!1;const S=setTimeout(()=>{v||(v=!0,_(!1))},A0);g.invoke("thirdPartyOpenPage",m,R=>{v||(v=!0,clearTimeout(S),_(R.err_msg==="thirdPartyOpenPage:ok"))})})}async function u(){if(!s){t.value=!0,n.value=null;try{await r();const p=window.location.href.split("#")[0],_=await Xf(p,!0);if(!_.agent_config)throw new Error("后端未返回 agent_config 签名");await l(_),await d({corp_id:_.corp_id,agent_id:_.agent_id,timestamp:_.timestamp,agent_config:_.agent_config}),s=!0,e.value=!0}catch(p){n.value=(p==null?void 0:p.message)||"JS-SDK 初始化失败"}finally{t.value=!1}}}async function f(p){if(!o()){window.location.href=p;return}if(!a(p)){window.location.href=p;return}const _=i(p);if(!_){window.location.href=p;return}if(s||await u(),!e.value){window.location.href=p;return}await c(_)||(window.location.href=p)}return{isReady:e,isLoading:t,error:n,isWecomEnv:o,openUrl:f,init:u}}const I0={class:"approval-card-inline"},O0={class:"approval-card-inline__header"},$0={class:"approval-card-inline__title-row"},P0={key:0,class:"approval-card-inline__tag"},B0={class:"approval-card-inline__options"},D0=["onClick"],L0={class:"approval-card-inline__option-icon"},N0={class:"approval-card-inline__option-content"},M0={class:"approval-card-inline__option-name"},F0={class:"approval-card-inline__option-desc"},q0=we({__name:"ApprovalCardModal",props:{approvalType:{default:""}},setup(e){const t=e,{openUrl:n}=Xa(),s={设备申请:[{name:"IT资产领用",icon:"orders-o",desc:"申请新设备",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4c8qt31AbSHwN9MuaFhYXt4Qwsx6ZLCftAFh6X1w&sp_id=&from=template_list"},{name:"IT资产借用",icon:"orders-o",desc:"临时借用设备",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3TmACnFs8oqgYcasxVh4BfSMGNX7p9sb6ydBX77mK&sp_id=&from=template_list"},{name:"IT资产升级",icon:"orders-o",desc:"设备升级换新",url:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=IT%E8%AE%BE%E5%A4%87%E5%8D%87%E7%BA%A7%E4%B8%8E%E7%A1%AC%E4%BB%B6%E7%BB%B4%E4%BF%AE"}],账号权限申请:[{name:"VPN账号申请",icon:"lock",desc:"零信任VPN",url:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%91%98%E5%B7%A5%E9%9B%B6%E4%BF%A1%E4%BB%BB%EF%BC%88%E5%8E%9FVPN%EF%BC%89%E8%B4%A6%E5%8F%B7%E7%94%B3%E8%AF%B7"},{name:"企微外联权限",icon:"lock",desc:"外部联系人权限",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4WrCbZd214XrDMZJiHDho7ZQHWX7gsabb7x2fF72&sp_id=&from=template_list"},{name:"公共邮箱账号",icon:"lock",desc:"共享邮箱",url:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%85%AC%E5%85%B1%E9%82%AE%E7%AE%B1%E8%B4%A6%E5%8F%B7%E7%94%B3%E8%AF%B7"}],软件服务申请:[{name:"商业软件申请",icon:"apps-o",desc:"正版软件授权",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3TmACf8DsJy5yr7aymanLskywC4EDhFLuz1KuBBQK&sp_id=&from=template_list"}],资产处置申请:[{name:"IT资产外修",icon:"warn-o",desc:"设备送修",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=Bs7ucTLPo42dtj8Y1LzBoujijsa6geRWaRxZJjk4X&sp_id=&from=template_list"},{name:"IT资产报废",icon:"delete-o",desc:"设备报废",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4WroCDfWuHKyujQjatjm3AjNv67imXk5C6WNooFkb&sp_id=&from=template_list"},{name:"资产退还",icon:"back-top",desc:"退还设备",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4c8qt33AZ52a7n9BBWDh6PmsDnpM5B6w8geqqqoHz&sp_id=&from=template_list"}],办公用品申请:[{name:"办公用品超额领用",icon:"gift-o",desc:"超配额申领",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3WN6zRucbjycdnR94gBvkSVuXRamX7pKW4PrmNFh&sp_id=&from=template_list"}],会议室故障报修:[{name:"会议室故障报修",icon:"warn-o",desc:"会议室设备故障",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4ZXJMtjQJiPXo6N5vNMK26uPRT3KTi9VvkH2NScg&sp_id=&from=template_list"}],企业应用管理:[{name:"企业应用管理",icon:"apps-o",desc:"企业应用开通管理",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3WLJnRg2Se1fwizQtNvFtcYMgci1mhRJZhMw2FFKb&sp_id=&from=template_list"}],资产变更确认:[{name:"资产变更确认",icon:"exchange",desc:"资产信息变更",url:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4cA2owjRcXRRPQ46otZvUHoWNEKL5t25tHHfeePip&sp_id=&from=template_list"}],终端设备网络准入:[{name:"终端设备网络准入申请",icon:"lock",desc:"终端网络准入",url:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E7%BB%88%E7%AB%AF%E8%AE%BE%E5%A4%87%E7%BD%91%E7%BB%9C%E5%87%86%E5%85%A5%E7%94%B3%E8%AF%B7"}],活动与会议技术支持:[{name:"活动与会议技术支持",icon:"calendar-o",desc:"活动会议技术保障",url:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E6%B4%BB%E5%8A%A8%E4%B8%8E%E4%BC%9A%E8%AE%AE%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81"}],员工IT支持与故障报修:[{name:"员工IT支持与故障报修",icon:"warn-o",desc:"IT支持与故障报修",url:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%91%98%E5%B7%A5IT%E6%94%AF%E6%8C%81%E4%B8%8E%E6%95%85%E9%9A%9C%E6%8A%A5%E4%BF%AE"}],公共邮箱账号申请:[{name:"公共邮箱账号申请",icon:"lock",desc:"公共邮箱账号",url:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%85%AC%E5%85%B1%E9%82%AE%E7%AE%B1%E8%B4%A6%E5%8F%B7%E7%94%B3%E8%AF%B7"}]},o=F(()=>t.approvalType&&s[t.approvalType]?s[t.approvalType]:Object.values(s).flat()),i=q([]);async function a(){if(!(i.value.length>0))try{i.value=await Hw()}catch(l){console.error("[ApprovalCard] 加载审批关键词失败:",l)}}ot(()=>{a()});async function r(l){if(l.url){await n(l.url);return}try{const d=i.value.find(c=>c.template_name===t.approvalType||c.keyword===l.name);if(d)if(d.type==="jump"){const c=await Ww(d.template_id);await n(c.url)}else xe("该功能正在开发中");else xe(`${l.name} — 审批模板配置中,请稍后`)}catch(d){console.error("[ApprovalCard] 打开审批失败:",d),xe("打开审批失败,请重试")}}return(l,d)=>{const c=ft;return k(),T("div",I0,[h("div",O0,[h("div",$0,[C(c,{name:"orders-o",size:"16",color:"#07c160"}),d[0]||(d[0]=h("span",{class:"approval-card-inline__title"},"审批快捷入口",-1)),e.approvalType?(k(),T("span",P0,M(e.approvalType),1)):ae("",!0)]),d[1]||(d[1]=h("div",{class:"approval-card-inline__subtitle"}," 检测到您可能需要提交审批,请选择对应类型 ",-1))]),h("div",B0,[(k(!0),T(ye,null,Ge(o.value,u=>(k(),T("div",{key:u.name,class:"approval-card-inline__option",onClick:f=>r(u)},[h("div",L0,[C(c,{name:u.icon,size:"20"},null,8,["name"])]),h("div",N0,[h("div",M0,M(u.name),1),h("div",F0,M(u.desc),1)]),C(c,{name:"arrow",class:"approval-card-inline__option-arrow"})],8,D0))),128))])])}}}),rt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Mc=rt(q0,[["__scopeId","data-v-5d1a743f"]]),V0={class:"byod-card__header"},j0={class:"byod-card__title-row"},U0={class:"byod-card__title"},z0={class:"byod-card__subtitle"},H0={class:"byod-card__info-section"},W0={class:"byod-card__info-row"},K0={class:"byod-card__info-value"},G0={key:0,class:"byod-card__info-row"},J0={class:"byod-card__info-value"},X0={key:0,class:"byod-card__notes"},Y0={class:"byod-card__notes-title"},Q0={class:"byod-card__notes-list"},Z0={key:1,class:"byod-card__reason"},e1={class:"byod-card__reason-text"},t1={key:2,class:"byod-card__action"},n1=["href"],s1=we({__name:"ByodSubsidyCard",props:{eligible:{type:Boolean,default:!1},hasSubsidy:{type:Boolean,default:!1},position:{default:""},applicationUrl:{default:""},notes:{default:()=>[]},reason:{default:""},matchedCategory:{default:""}},setup(e){const t=e,n=F(()=>t.eligible?"byod-card--eligible":t.applicationUrl?"byod-card--register":"byod-card--ineligible"),s=F(()=>t.eligible?"passed":t.applicationUrl?"edit":"close"),o=F(()=>t.eligible?"#07c160":t.applicationUrl?"#ff9800":"#969799"),i=F(()=>t.eligible?"自备电脑补贴资格":t.applicationUrl?"自备电脑登记":"自备电脑补贴资格"),a=F(()=>t.eligible?"byod-card__tag--eligible":t.applicationUrl?"byod-card__tag--register":"byod-card__tag--ineligible"),r=F(()=>t.eligible?"可申请":t.applicationUrl?"可登记":"不可申请"),l=F(()=>t.eligible?"您的岗位符合自备电脑补贴申请资格":t.applicationUrl?"您的岗位可进行自备电脑登记(无补贴)":"您的岗位暂不符合自备电脑补贴申请资格");function d(c){c.preventDefault();const u=c.currentTarget.href;u&&(window.location.href=u)}return(c,u)=>{const f=ft;return k(),T("div",{class:ge(["byod-card",n.value])},[h("div",V0,[h("div",j0,[C(f,{name:s.value,size:"16",color:o.value},null,8,["name","color"]),h("span",U0,M(i.value),1),h("span",{class:ge(["byod-card__tag",a.value])},M(r.value),3)]),h("div",z0,M(l.value),1)]),h("div",H0,[h("div",W0,[u[0]||(u[0]=h("span",{class:"byod-card__info-label"},"当前岗位",-1)),h("span",K0,M(e.position||"未获取到岗位信息"),1)]),e.matchedCategory?(k(),T("div",G0,[u[1]||(u[1]=h("span",{class:"byod-card__info-label"},"资格类别",-1)),h("span",J0,M(e.matchedCategory),1)])):ae("",!0)]),e.notes.length>0?(k(),T("div",X0,[h("div",Y0,[C(f,{name:"info-o",size:"13",color:o.value},null,8,["color"]),h("span",null,M(e.eligible?"申请须知":"登记须知"),1)]),h("ul",Q0,[(k(!0),T(ye,null,Ge(e.notes,(p,_)=>(k(),T("li",{key:_,class:"byod-card__note-item"},M(p),1))),128))])])):ae("",!0),!e.eligible&&e.reason?(k(),T("div",Z0,[C(f,{name:"warning-o",size:"14",color:o.value},null,8,["color"]),h("span",e1,M(e.reason),1)])):ae("",!0),e.applicationUrl?(k(),T("div",t1,[h("a",{href:e.applicationUrl,class:ge(["byod-card__btn",e.eligible?"byod-card__btn--eligible":"byod-card__btn--register"]),onClick:d},[C(f,{name:"arrow",size:"14",color:"#ffffff"}),h("span",null,M(e.eligible?"去申请":"去登记"),1)],10,n1)])):ae("",!0)],2)}}}),o1=rt(s1,[["__scopeId","data-v-7197147e"]]),i1={class:"contact-card"},a1={class:"contact-card__header"},r1=["src"],l1={key:1},c1={class:"contact-card__name-row"},u1={class:"contact-card__name"},d1={class:"contact-card__dept"},f1={class:"contact-card__body"},p1={class:"contact-card__info-item"},h1={class:"contact-card__info-value contact-card__info-value--highlight"},m1={key:0,class:"contact-card__info-item"},_1={class:"contact-card__info-value"},g1={key:1,class:"contact-card__info-item"},v1={class:"contact-card__info-label"},y1={class:"contact-card__info-value"},b1=we({__name:"ContactCard",props:{contact:{}},setup(e){const t=e,n=F(()=>t.contact.name?t.contact.name.charAt(0):"?"),s=F(()=>{const l=["gradient-1","gradient-2","gradient-3","gradient-4","gradient-5"];if(!t.contact.name)return l[0];const d=t.contact.name.charCodeAt(0);return l[d%l.length]}),o=F(()=>t.contact.gender==="female"?"♀":"♂"),i=F(()=>t.contact.gender==="female"?"gender-female":"gender-male"),a=F(()=>t.contact.business_category==="行政-物业"?"办公地点":"服务区域");function r(){const l=t.contact.wecom_userid;if(!l){xe("暂时无法发起聊天,请联系管理员");return}const d=window.wx;if(!d||!d.invoke){xe("暂时无法发起聊天,请联系管理员");return}try{d.invoke("openEnterpriseChat",{userids:l,chatTitle:t.contact.name},c=>{c&&c.err_msg&&c.err_msg!=="openEnterpriseChat:ok"&&(console.error("[ContactCard] openEnterpriseChat 失败:",c.err_msg),xe("暂时无法发起聊天,请联系管理员"))})}catch(c){console.error("[ContactCard] openEnterpriseChat 调用异常:",c),xe("暂时无法发起聊天,请联系管理员")}}return(l,d)=>(k(),T("div",i1,[h("div",a1,[h("div",{class:ge(["contact-card__avatar",s.value])},[e.contact.avatar_url?(k(),T("img",{key:0,src:e.contact.avatar_url,alt:"",class:"contact-card__avatar-img"},null,8,r1)):(k(),T("span",l1,M(n.value),1))],2),h("div",c1,[h("div",u1,[Le(M(e.contact.name)+" ",1),h("span",{class:ge(["contact-card__gender",i.value])},M(o.value),3)]),h("div",d1,M(e.contact.department)+" · "+M(e.contact.position),1)]),d[0]||(d[0]=h("span",{class:"contact-card__badge"},"员工名片",-1))]),h("div",f1,[h("div",p1,[d[1]||(d[1]=h("span",{class:"contact-card__info-label"},"负责业务",-1)),h("span",h1,M(e.contact.responsibility),1)]),e.contact.extension?(k(),T("div",m1,[d[2]||(d[2]=h("span",{class:"contact-card__info-label"},"分机号",-1)),h("span",_1,M(e.contact.extension),1)])):ae("",!0),e.contact.service_area?(k(),T("div",g1,[h("span",v1,M(a.value),1),h("span",y1,M(e.contact.service_area),1)])):ae("",!0)]),h("div",{class:"contact-card__footer"},[h("button",{class:"contact-card__action-btn",onClick:r},[...d[3]||(d[3]=[h("span",{class:"contact-card__action-icon"},"💬",-1),h("span",null,"联系TA",-1)])])])]))}}),w1=rt(b1,[["__scopeId","data-v-ab0a689c"]]),E1={key:0,class:"message-bubble message-bubble--approval-card"},S1={key:1,class:"message-bubble message-bubble--byod-card"},C1={key:2,class:"message-bubble message-bubble--contact-card"},x1={key:3,class:"message-bubble message-bubble--system"},k1={class:"message-bubble__system-text"},A1={key:0,class:"message-bubble__sender"},T1={key:0,src:h0,class:"message-bubble__ai-avatar",alt:"Duckula"},R1={class:"message-bubble__sender-name"},I1={class:"reply-quote__text"},O1={class:"reply-quote__sender"},$1={key:1,class:"message-bubble__text",style:{"white-space":"pre-wrap"}},P1={class:"message-bubble__text",style:{"white-space":"pre-wrap"}},B1={key:0,class:"ai-options"},D1=["onClick"],L1={key:1,class:"ai-action"},N1=["src","alt"],M1={key:1,class:"media-card"},F1={class:"media-card__info"},q1={key:0,class:"media-card__name"},V1=["href"],j1={class:"media-card__info"},U1={class:"media-card__label"},z1={key:0,class:"media-card__size"},H1={key:1,class:"media-card"},W1={class:"media-card__info"},K1={class:"media-card__label"},G1={key:0,class:"media-card__size"},J1={key:5,class:"media-card"},X1={class:"media-card__icon"},Y1={class:"media-card__info"},Q1={class:"media-card__label"},Z1={key:0,class:"media-card__name"},eE={key:1,class:"media-card__size"},tE={key:6,class:"message-bubble__actions"},nE=we({__name:"MessageBubble",props:{msg:{}},emits:["scrollToMessage"],setup(e){const t=e,n=Ot(),{copy:s}=C0(),o=q(!1),i=q(!1);async function a(){try{await s(t.msg.content),i.value=!0,xe("已复制"),setTimeout(()=>{i.value=!1},1500)}catch(x){console.error("复制失败:",x)}}const r=F(()=>{const x=[`message-bubble--${t.msg.message_type}`];return t.msg.status==="sending"?x.push("message-bubble--sending"):t.msg.status==="failed"&&x.push("message-bubble--failed"),t.msg.message_type==="ai"&&l.value&&x.push("message-bubble--thinking"),x.join(" ")}),l=F(()=>{if(t.msg.message_type!=="ai")return!1;const x=t.msg.content||"";return x.startsWith("正在思考")||x.startsWith("仍在思考")}),d=F(()=>`message-bubble__content--${t.msg.message_type}`),c=F(()=>t.msg.message_type==="employee"?"message-bubble__time--right":"message-bubble__time--left"),u=F(()=>t.msg.message_type==="agent"?t.msg.sender_name||"IT坐席":t.msg.message_type==="ai"?"Duckula(达寇拉)":t.msg.sender_name),f=F(()=>({image:"🖼️",voice:"🎤",video:"🎬",file:"📎",location:"📍"})[t.msg.msg_type||""]||"📄"),p=F(()=>({image:"图片消息",voice:"语音消息",video:"视频消息",file:"文件消息",location:"位置消息"})[t.msg.msg_type||""]||"媒体消息"),_=F(()=>t.msg.reply_to_id?"...":""),g=F(()=>(t.msg.reply_to_id,""));function m(x){if(!x)return"";const b=new Date(x),$=b.getHours().toString().padStart(2,"0"),B=b.getMinutes().toString().padStart(2,"0");return`${$}:${B}`}function v(x){return x<1024?`${x} B`:x<1024*1024?`${(x/1024).toFixed(1)} KB`:`${(x/(1024*1024)).toFixed(1)} MB`}function S(){var b;const x=t.msg.media_url||((b=t.msg.extra_data)==null?void 0:b.pic_url);x&&window.open(x,"_blank")}function R(x){n.sendOptionSelect(x.value,x.label||x.value)}return(x,b)=>{var $,B,G,D,X,V,O,Z,W,oe,de,ee,re,Ee,Se,ne,he,fe,Te,H,ce,E;return e.msg.msg_type==="approval_card"?(k(),T("div",E1,[C(Mc,{"approval-type":(($=e.msg.extra_data)==null?void 0:$.approval_type)||""},null,8,["approval-type"])])):e.msg.msg_type==="byod_card"?(k(),T("div",S1,[C(o1,{eligible:((G=(B=e.msg.extra_data)==null?void 0:B.byod_result)==null?void 0:G.eligible)??!1,"has-subsidy":((X=(D=e.msg.extra_data)==null?void 0:D.byod_result)==null?void 0:X.has_subsidy)??!1,position:((O=(V=e.msg.extra_data)==null?void 0:V.byod_result)==null?void 0:O.position)??"","application-url":((W=(Z=e.msg.extra_data)==null?void 0:Z.byod_result)==null?void 0:W.application_url)??"",notes:((de=(oe=e.msg.extra_data)==null?void 0:oe.byod_result)==null?void 0:de.notes)??[],reason:((re=(ee=e.msg.extra_data)==null?void 0:ee.byod_result)==null?void 0:re.reason)??"","matched-category":((Se=(Ee=e.msg.extra_data)==null?void 0:Ee.byod_result)==null?void 0:Se.matched_category)??""},null,8,["eligible","has-subsidy","position","application-url","notes","reason","matched-category"])])):e.msg.msg_type==="contact_card"?(k(),T("div",C1,[C(w1,{contact:((ne=e.msg.extra_data)==null?void 0:ne.contact)??{}},null,8,["contact"])])):e.msg.message_type==="system"?(k(),T("div",x1,[h("span",k1,M(e.msg.content),1)])):(k(),T("div",{key:4,class:ge(["message-bubble",r.value]),onMouseenter:b[2]||(b[2]=N=>o.value=!0),onMouseleave:b[3]||(b[3]=N=>o.value=!1)},[e.msg.message_type!=="employee"?(k(),T("div",A1,[e.msg.message_type==="ai"?(k(),T("img",T1)):ae("",!0),h("span",R1,M(u.value),1)])):ae("",!0),h("div",{class:ge(["message-bubble__content",d.value])},[e.msg.reply_to_id&&_.value?(k(),T("div",{key:0,class:"reply-quote",onClick:b[0]||(b[0]=gn(N=>x.$emit("scrollToMessage",e.msg.reply_to_id),["stop"]))},[b[4]||(b[4]=h("div",{class:"reply-quote__bar"},null,-1)),h("div",I1,[h("span",O1,M(g.value),1),Le(" "+M(_.value),1)])])):ae("",!0),!e.msg.msg_type||e.msg.msg_type==="text"?(k(),T("p",$1,M(e.msg.content),1)):e.msg.msg_type==="ai_structured"?(k(),T(ye,{key:2},[h("p",P1,M(e.msg.content),1),(fe=(he=e.msg.extra_data)==null?void 0:he.options)!=null&&fe.length?(k(),T("div",B1,[(k(!0),T(ye,null,Ge(e.msg.extra_data.options,(N,U)=>(k(),T("button",{key:U,class:"ai-options__btn",onClick:gn(L=>R(N),["stop"])},M(N.label||N.value),9,D1))),128))])):ae("",!0),(H=(Te=e.msg.extra_data)==null?void 0:Te.action)!=null&&H.approval_type?(k(),T("div",L1,[C(Mc,{"approval-type":e.msg.extra_data.action.approval_type},null,8,["approval-type"])])):ae("",!0)],64)):e.msg.msg_type==="image"?(k(),T("div",{key:3,class:"image-message",onClick:S},[e.msg.media_url||(ce=e.msg.extra_data)!=null&&ce.pic_url?(k(),T("img",{key:0,src:e.msg.media_url||((E=e.msg.extra_data)==null?void 0:E.pic_url),alt:e.msg.file_name||"图片",class:"image-message__thumbnail",loading:"lazy"},null,8,N1)):(k(),T("div",M1,[b[6]||(b[6]=h("div",{class:"media-card__icon"},"🖼️",-1)),h("div",F1,[b[5]||(b[5]=h("span",{class:"media-card__label"},"图片消息",-1)),e.msg.file_name?(k(),T("span",q1,M(e.msg.file_name),1)):ae("",!0)])]))])):e.msg.msg_type==="file"?(k(),T(ye,{key:4},[e.msg.media_url?(k(),T("a",{key:0,href:e.msg.media_url,target:"_blank",class:"media-card media-card--link",onClick:b[1]||(b[1]=gn(()=>{},["stop"]))},[b[7]||(b[7]=h("div",{class:"media-card__icon"},"📎",-1)),h("div",j1,[h("span",U1,M(e.msg.file_name||"文件消息"),1),e.msg.file_size?(k(),T("span",z1,M(v(e.msg.file_size)),1)):ae("",!0)])],8,V1)):(k(),T("div",H1,[b[8]||(b[8]=h("div",{class:"media-card__icon"},"📎",-1)),h("div",W1,[h("span",K1,M(e.msg.file_name||"文件消息"),1),e.msg.file_size?(k(),T("span",G1,M(v(e.msg.file_size)),1)):ae("",!0)])]))],64)):(k(),T("div",J1,[h("div",X1,M(f.value),1),h("div",Y1,[h("span",Q1,M(p.value),1),e.msg.file_name?(k(),T("span",Z1,M(e.msg.file_name),1)):ae("",!0),e.msg.file_size?(k(),T("span",eE,M(v(e.msg.file_size)),1)):ae("",!0)])])),o.value?(k(),T("div",tE,[!e.msg.msg_type||e.msg.msg_type==="text"?(k(),T("button",{key:0,class:"action-btn",title:"复制消息",onClick:gn(a,["stop"])},M(i.value?"✓":"📋"),1)):ae("",!0)])):ae("",!0)],2),h("div",{class:ge(["message-bubble__time",c.value])},M(m(e.msg.created_at)),3)],34))}}}),sE=rt(nE,[["__scopeId","data-v-88de109e"]]);async function ha(e,t="paste"){const n=new FormData;if(e instanceof Blob&&!(e instanceof File)){const s=`${t}_${Date.now()}.png`;n.append("file",e,s)}else n.append("file",e);return await oE(n)}async function oE(e,t=3){for(let n=0;n<=t;n++)try{return await qe.post("/upload",e,{headers:{"Content-Type":void 0},timeout:6e4})}catch(s){if(n===t)throw s;const o=1e3*Math.pow(2,n);console.warn(`[Upload H5] 上传失败,${o/1e3}秒后重试(第 ${n+1}/${t} 次)`),await new Promise(i=>setTimeout(i,o))}throw new Error("上传失败:已达最大重试次数")}const Fc="https://res.wx.qq.com/open/js/jweixin-1.2.0.js",iE=59e3,qc=8e3,aE=1e4,Vc=!1,jc=["startRecord","stopRecord","translateVoice","checkJsApi"];function rE(){const e=_t({isReady:!1,isRecording:!1,isTranslating:!1,error:null});let t=!1,n=null;function s(){return new Promise((d,c)=>{if(typeof window.wx<"u"){console.log("[WecomVoice] JS-SDK 已加载(window.wx 存在),跳过动态加载"),d();return}console.log("[WecomVoice] 动态加载 JS-SDK 脚本:",Fc);const u=setTimeout(()=>{f.onload=null,f.onerror=null,c(new Error("加载企微 JS-SDK 脚本超时(10秒),请检查网络连接"))},aE),f=document.createElement("script");f.src=Fc,f.async=!0,f.onload=()=>{clearTimeout(u),typeof window.wx<"u"?(console.log("[WecomVoice] JS-SDK 脚本加载成功,window.wx 已挂载"),d()):(console.error("[WecomVoice] JS-SDK 脚本已加载,但 window.wx 未挂载"),c(new Error("企微 JS-SDK 脚本已加载,但 window.wx 未挂载")))},f.onerror=()=>{clearTimeout(u),console.error("[WecomVoice] JS-SDK 脚本加载失败"),c(new Error("加载企微 JS-SDK 脚本失败,请检查网络连接"))},document.head.appendChild(f)})}function o(d){return new Promise((c,u)=>{const f=window.wx;if(!f||typeof f.config!="function"){const g="wx.config 不可用,JS-SDK 未正确加载";console.error("[WecomVoice]",g),e.isReady=!1,e.error=g,u(new Error(g));return}let p=!1;const _=setTimeout(()=>{p||(p=!0,e.isReady=!1,e.error=`wx.config 鉴权超时(${qc/1e3}秒无响应),可能是签名无效或企微环境异常`,console.error("[WecomVoice]",e.error),u(new Error(e.error)))},qc);f.ready(()=>{p||(p=!0,clearTimeout(_),e.isReady=!0,console.log("[WecomVoice] wx.config 鉴权成功(ready 回调触发)"),c())}),f.error(g=>{p||(p=!0,clearTimeout(_),e.isReady=!1,e.error=`JS-SDK 鉴权失败: ${g.errMsg}`,console.error("[WecomVoice] wx.config 鉴权失败:",g.errMsg),u(new Error(e.error)))}),console.log("[WecomVoice] 调用 wx.config:",{appId:d.corp_id,timestamp:d.timestamp,debug:Vc,jsApiList:jc}),f.config({beta:!0,debug:Vc,appId:d.corp_id,timestamp:d.timestamp,nonceStr:d.nonce_str,signature:d.signature,jsApiList:jc})})}async function i(){if(t){console.log("[WecomVoice] 已初始化,跳过");return}console.log("[WecomVoice] ===== 开始初始化 =====");try{console.log("[WecomVoice] Step 1/3: 加载 JS-SDK 脚本"),await s(),console.log("[WecomVoice] Step 2/3: 获取签名配置");const d=window.location.href.split("#")[0];console.log("[WecomVoice] 签名 URL:",d);const c=await Xf(d);console.log("[WecomVoice] 签名配置:",{corp_id:c.corp_id,agent_id:c.agent_id,timestamp:c.timestamp,nonce_str:c.nonce_str,signature:c.signature?c.signature.substring(0,10)+"...":"(空)"}),console.log("[WecomVoice] Step 3/3: wx.config 鉴权"),await o(c),window.wx&&typeof window.wx.checkJsApi=="function"&&window.wx.checkJsApi({jsApiList:["startRecord","stopRecord","translateVoice"],success:u=>{console.log("[WecomVoice] checkJsApi 结果:",JSON.stringify(u))},fail:u=>{console.warn("[WecomVoice] checkJsApi 失败(不阻塞):",u)}}),t=!0,e.error=null,console.log("[WecomVoice] ===== 初始化完成 =====")}catch(d){throw e.error=(d==null?void 0:d.message)||"JS-SDK 初始化失败",console.error("[WecomVoice] ===== 初始化失败 =====",e.error),d}}async function a(){if(e.isRecording){console.log("[WecomVoice] 已在录音中,跳过");return}e.isReady||(console.log("[WecomVoice] SDK 未就绪,先调用 init()..."),await i());const d=window.wx;if(!d||typeof d.startRecord!="function"){const c="wx.startRecord 不可用,JS-SDK 未正确初始化";throw console.error("[WecomVoice]",c),e.error=c,new Error(c)}return new Promise((c,u)=>{let f=!1;const p=setTimeout(()=>{f||(f=!0,n&&(clearTimeout(n),n=null),e.error="录音启动超时,当前企微版本可能不支持语音录制接口",console.error("[WecomVoice] startRecord 15秒无回调,可能不支持此接口"),u(new Error(e.error)))},15e3);n=setTimeout(()=>{e.isRecording&&(console.log("[WecomVoice] 59秒自动停止录音"),r().catch(_=>{e.error=`自动停止录音失败: ${(_==null?void 0:_.message)||"未知错误"}`}))},iE),console.log("[WecomVoice] 调用 wx.startRecord..."),d.startRecord({success:()=>{f||(f=!0,clearTimeout(p),e.isRecording=!0,e.error=null,console.log("[WecomVoice] 录音开始成功(startRecord success 回调)"),c())},fail:_=>{f||(f=!0,clearTimeout(p),n&&(clearTimeout(n),n=null),e.error=`开始录音失败: ${_.errMsg}`,console.error("[WecomVoice] 录音开始失败:",_.errMsg),u(new Error(e.error)))},cancel:()=>{f||(f=!0,clearTimeout(p),n&&(clearTimeout(n),n=null),e.error="用户拒绝了录音权限",console.warn("[WecomVoice] 用户拒绝录音权限"),u(new Error(e.error)))}})})}async function r(){const d=window.wx;return n&&(clearTimeout(n),n=null),e.isRecording?(console.log("[WecomVoice] 调用 wx.stopRecord..."),new Promise((c,u)=>{d.stopRecord({success:f=>{e.isRecording=!1;const p=f.localId;if(console.log("[WecomVoice] 停止录音成功,localId:",p),!p){u(new Error("未获取到录音 localId"));return}e.isTranslating=!0,console.log("[WecomVoice] 调用 wx.translateVoice..."),d.translateVoice({localId:p,isShowProgressTips:1,success:_=>{e.isTranslating=!1;const g=(_.translateResult||"").trim();console.log("[WecomVoice] 语音转文字成功:",g),c(g)},fail:_=>{e.isTranslating=!1,e.error=`语音转文字失败: ${_.errMsg}`,console.error("[WecomVoice] 语音转文字失败:",_.errMsg),u(new Error(e.error))}})},fail:f=>{e.isRecording=!1,e.error=`停止录音失败: ${f.errMsg}`,console.error("[WecomVoice] 停止录音失败:",f.errMsg),u(new Error(e.error))}})})):(console.log("[WecomVoice] 未在录音中,跳过 stopAndTranslate"),"")}function l(){const d=navigator.userAgent,c=/wxwork/i.test(d),u=/Mobile|Android|iPhone|iPad|iPod/i.test(d);return c&&u}return{state:e,init:i,startRecording:a,stopAndTranslate:r,isSupported:l}}const In=16e3;function lE(e){let t=0;for(const o of e)t+=o.length;const n=new Float32Array(t);let s=0;for(const o of e)n.set(o,s),s+=o.length;return n}function cE(e,t,n){if(t===n)return e;const s=t/n,o=Math.round(e.length/s),i=new Float32Array(o);for(let a=0;a{if(r)return;const _=p.inputBuffer.getChannelData(0);i.push(new Float32Array(_))},s.connect(o),o.connect(t.destination),e.value=!0,console.log(`[AudioRecorder] 录音开始(native=${a}Hz, target=${In}Hz)`)}catch(f){c();const p=f;throw(p==null?void 0:p.name)==="NotAllowedError"||(p==null?void 0:p.name)==="SecurityError"?new Error("麦克风权限被拒绝,请在浏览器设置中允许使用麦克风"):(p==null?void 0:p.name)==="NotFoundError"||(p==null?void 0:p.name)==="OverconstrainedError"?new Error("未找到麦克风设备,请检查设备连接"):(p==null?void 0:p.name)==="NotReadableError"?new Error("麦克风被其他程序占用,请关闭后重试"):p instanceof Error?p:new Error((p==null?void 0:p.message)||"录音启动失败")}}function d(){r=!0,c();const u=lE(i),f=a!==In?cE(u,a,In):u,p=uE(f),_=new Blob([p],{type:"audio/pcm"});return console.log(`[AudioRecorder] 录音停止,PCM 数据: ${_.size} bytes`+(a!==In?` (重采样 ${a}→${In}Hz)`:"")),e.value=!1,i=[],_}function c(){if(o){try{o.disconnect()}catch{}o.onaudioprocess=null,o=null}if(s){try{s.disconnect()}catch{}s=null}n&&(n.getTracks().forEach(u=>u.stop()),n=null),t&&(t.close().catch(()=>{}),t=null)}return{isRecording:e,start:l,stop:d}}async function fE(e){const t=new FormData;t.append("audio",e,"recording.pcm");const n=await qe.post("/voice/asr",t,{headers:{"Content-Type":void 0},timeout:3e4});return{text:(n==null?void 0:n.text)||"",error:n==null?void 0:n.error}}const pE={class:"input-bar"},hE={class:"input-bar__row"},mE={key:0,class:"emoji-panel"},_E={class:"emoji-panel__grid"},gE=["onClick"],vE={key:1,class:"input-bar__voice-status"},yE={key:0},bE={key:1},wE={class:"input-bar__input-row"},EE={class:"input-bar__controls"},SE=["disabled","title"],CE={class:"call-agent-btn__icon"},xE={class:"call-agent-btn__text"},kE={class:"input-bar__controls-row"},AE=["title","disabled"],TE={key:1,class:"input-bar__guide"},RE=we({__name:"InputBar",emits:["call-agent"],setup(e,{emit:t}){function n(L){return L?typeof L=="string"?L:Array.isArray(L)?L.map(z=>z.loc&&z.msg?`${z.loc.slice(1).join(".")}: ${z.msg}`:z.msg?z.msg:JSON.stringify(z)).join("; "):typeof L=="object"?JSON.stringify(L):String(L):""}const s=Ot(),o=t,i=["电脑无法启动","网络无法连接","多人不能上网","无法上网","开不了机","连不上网","全部断网"],a=F(()=>{const L=s.currentConversation;return!L||L.status==="resolved"||L.status==="serving"?"hidden":f()?"urgent":s.canCallAgent?"active":"disabled"}),r=F(()=>a.value!=="hidden"),l=F(()=>({"call-agent-btn--disabled":a.value==="disabled","call-agent-btn--active":a.value==="active","call-agent-btn--urgent":a.value==="urgent"})),d=F(()=>a.value==="urgent"?"🚨":a.value==="active"?"🎧":"🔒"),c=F(()=>"人工坐席"),u=F(()=>a.value==="urgent"?"检测到紧急问题,直接呼叫人工坐席":a.value==="active"?"点击呼叫人工坐席":"再多描述几句话即可激活");function f(){var z;const L=s.messages.filter(y=>y.message_type==="employee").slice(-5);for(const y of L){const w=((z=y.content)==null?void 0:z.toLowerCase())||"";for(const A of i)if(w.includes(A.toLowerCase()))return!0}return!1}function p(){a.value!=="disabled"&&o("call-agent")}const _=q(""),g=q(null),m=q(null),v=F(()=>_.value.trim().length>0&&!s.loading&&s.isLoggedIn),S=q(!1),R=q(!1),{state:x,init:b,startRecording:$,stopAndTranslate:B,isSupported:G}=rE(),D=F(()=>{if(G())return"wecom";if(navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function")return"baidu";const L=navigator.userAgent,z=/wxwork/i.test(L),y=/Mobile|Android|iPhone|iPad|iPod/i.test(L),w=/Macintosh|Mac OS X/i.test(L);return z&&!y&&!w?"baidu":"none"}),X=F(()=>D.value!=="none"),V=dE(),O=F(()=>V.isRecording.value),Z=q(!1),W=F(()=>D.value==="wecom"?x.isRecording:D.value==="baidu"?O.value||Z.value:!1);function oe(L){return L.length>0&&!L.endsWith(" ")&&!L.endsWith(` `)}ot(()=>{document.addEventListener("paste",de),document.addEventListener("keydown",N),G()&&b().catch(L=>{console.warn("[InputBar] 企微 JS-SDK 初始化失败:",L)})}),Nn(()=>{document.removeEventListener("paste",de),document.removeEventListener("keydown",N),V.isRecording.value&&V.stop()});async function de(L){var w;const z=L.target;if(z.tagName==="TEXTAREA"||z.isContentEditable)return;const y=(w=L.clipboardData)==null?void 0:w.items;if(y){for(const A of Array.from(y))if(A.kind==="file"){L.preventDefault();const j=A.getAsFile();if(!j)continue;j.type.startsWith("image/")?await he(j):await fe(j);return}}}const ee=["😀","😃","😄","😁","😆","😅","🤣","😂","🙂","😊","😇","🥰","😍","🤩","😘","😗","😚","😙","😋","😛","😜","🤪","😝","🤑","🤗","🤭","🤫","🤔","🤐","🤨","😐","😑","😶","😏","😒","🙄","😬","😮","🤯","😲","😳","🥺","😢","😭","😤","😠","😡","🤬","👍","👎","👏","🙌","🤝","💪","✌️","🤞","❤️","🧡","💛","💚","💙","💜","💯","✅"];function re(L){_.value+=L,R.value=!1,tt(()=>{var y,w;const z=(w=(y=g.value)==null?void 0:y.$el)==null?void 0:w.querySelector("textarea");z==null||z.focus()})}function Ee(L){/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)||L.shiftKey||(L.preventDefault(),Se())}async function Se(){const L=_.value.trim();!L||s.loading||(_.value="",await s.sendNewMessage(L))}async function ne(L){var y;const z=(y=L.clipboardData)==null?void 0:y.items;if(z){for(const w of Array.from(z))if(w.kind==="file"){L.preventDefault();const A=w.getAsFile();if(!A)continue;A.type.startsWith("image/")?await he(A):await fe(A);return}}}async function he(L){var z,y;try{xe("图片上传中...");const w=await ha(L),A=L instanceof File?L.name:"截图";await s.sendNewMessage(`[图片] ${A}`,{msg_type:"image",media_url:w.url,file_name:w.filename,file_size:w.file_size}),xe("图片发送成功")}catch(w){console.error("图片上传失败:",w),xe(n((y=(z=w==null?void 0:w.response)==null?void 0:z.data)==null?void 0:y.detail)||(w==null?void 0:w.message)||"图片上传失败,请重试")}}async function fe(L){var z,y;try{const w=L instanceof File?L.name:"文件";xe(`文件上传中: ${w}`);const A=await ha(L);await s.sendNewMessage(`[文件] ${A.filename}`,{msg_type:"file",media_url:A.url,file_name:A.filename,file_size:A.file_size}),xe("文件发送成功")}catch(w){console.error("文件上传失败:",w),xe(n((y=(z=w==null?void 0:w.response)==null?void 0:z.data)==null?void 0:y.detail)||(w==null?void 0:w.message)||"文件上传失败,请重试")}}async function Te(L){const z=L.target,y=z.files;if(!(!y||y.length===0)){for(const w of Array.from(y))try{xe(`正在上传: ${w.name}`);const A=await ha(w);xe(`${w.name} 上传成功`),console.log("[InputBar] 文件上传成功:",A.url)}catch(A){console.error("文件上传失败:",A),xe(`${w.name} 上传失败`)}z.value=""}}function H(){R.value=!R.value}function ce(){m.value&&(m.value.accept="",m.value.multiple=!0,m.value.click())}async function E(L){if(L==null||L.preventDefault(),L==null||L.stopPropagation(),D.value!=="none"){if(D.value==="wecom")try{if(x.isRecording){const z=await B();z?(oe(_.value)&&(_.value+=" "),_.value+=z,xe("语音识别完成")):xe("未识别到语音内容")}else await $(),xe("正在录音,点击停止")}catch(z){const y=x.error||(z==null?void 0:z.message)||"语音识别失败";xe(y),console.error("[InputBar] 企微语音识别错误:",z)}else if(D.value==="baidu")if(O.value){const z=V.stop();if(z.size<1600){xe("录音过短,请说更多内容");return}Z.value=!0;try{const y=await fE(z);y.error?xe(y.error):y.text?(oe(_.value)&&(_.value+=" "),_.value+=y.text,xe("语音识别完成")):xe("未识别到语音内容")}catch(y){xe((y==null?void 0:y.message)||"语音识别失败"),console.error("[InputBar] 百度ASR识别错误:",y)}finally{Z.value=!1}}else try{await V.start(),xe("开始语音输入")}catch(z){xe((z==null?void 0:z.message)||"录音启动失败"),console.error("[InputBar] 百度录音启动失败:",z)}}}function N(L){if(L.ctrlKey&&(L.key==="d"||L.key==="D")){if(L.preventDefault(),!X.value)return;E()}}function U(L){S.value=!0;const z=L.clientY,y=L.target.closest(".input-bar"),w=y?y.offsetHeight:100;function A(J){if(!S.value)return;const K=z-J.clientY;let ie=w+K;ie=Math.max(100,Math.min(400,ie)),y&&(y.style.height=`${ie}px`,y.style.flexShrink="0")}function j(){S.value=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",j),document.body.style.cursor="",document.body.style.userSelect=""}document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",A),document.addEventListener("mouseup",j)}return(L,z)=>{const y=Tr,w=Zn;return k(),T("div",pE,[h("div",{class:"input-bar__resize-handle",onMousedown:U},[...z[2]||(z[2]=[h("div",{class:"input-bar__resize-track"},null,-1)])],32),h("div",hE,[h("div",{class:"input-bar__toolbar"},[h("button",{class:"input-bar__tool-btn",title:"表情",onClick:H},[...z[3]||(z[3]=[h("span",null,"😊",-1)])]),h("button",{class:"input-bar__tool-btn",title:"文件",onClick:ce},[...z[4]||(z[4]=[h("span",null,"📎",-1)])])]),R.value?(k(),T("div",mE,[h("div",_E,[(k(),T(ye,null,Ge(ee,A=>h("button",{key:A,class:"emoji-panel__item",onClick:j=>re(A)},M(A),9,gE)),64))])])):ae("",!0),W.value&&D.value==="baidu"?(k(),T("div",vE,[Z.value?(k(),T("span",yE,"正在识别语音...")):(k(),T("span",bE,"正在语音输入... 点击⏹停止"))])):ae("",!0),h("div",wE,[C(y,{ref_key:"inputFieldRef",ref:g,modelValue:_.value,"onUpdate:modelValue":z[0]||(z[0]=A=>_.value=A),class:"input-bar__field",placeholder:"请输入消息...",type:"textarea",autosize:{minHeight:54,maxHeight:200},rows:"3",disabled:!Re(s).isLoggedIn,onKeydown:md(Ee,["enter"]),onPaste:ne},null,8,["modelValue","disabled"]),h("div",EE,[r.value?(k(),T("button",{key:0,class:ge(["call-agent-btn",l.value]),disabled:a.value==="disabled",onClick:p,title:u.value},[h("span",CE,M(d.value),1),h("span",xE,M(c.value),1)],10,SE)):ae("",!0),h("div",kE,[X.value?(k(),T("button",{key:0,class:ge(["input-bar__voice-btn",{"input-bar__voice-btn--recording":W.value}]),title:Z.value?"正在识别...":W.value?"点击停止":"语音输入 (Ctrl+D)",disabled:Z.value,onMousedown:gn(E,["prevent"]),onClick:gn(E,["prevent"]),onTouchstart:gn(E,["prevent"])},M(Z.value?"⏳":W.value?"⏹":"🎤"),43,AE)):ae("",!0),C(w,{class:"input-bar__send-btn",type:"primary",size:"small",disabled:!v.value,loading:Re(s).loading,onClick:Se},{default:et(()=>[...z[5]||(z[5]=[Le(" 发送 ",-1)])]),_:1},8,["disabled","loading"])])])])]),R.value?(k(),T("div",{key:0,class:"emoji-panel__overlay",onClick:z[1]||(z[1]=A=>R.value=!1)})):a.value==="active"?(k(),T("div",TE," 请描述你遇到的问题,AI 助手会帮你分析 💡 ")):ae("",!0),h("input",{ref_key:"fileInputRef",ref:m,type:"file",style:{display:"none"},onChange:Te},null,544)])}}}),IE=rt(RE,[["__scopeId","data-v-2fa97ec5"]]),OE={key:0,class:"ts-flow"},$E={class:"ts-flow__path"},PE={class:"ts-flow__path-bar"},BE={class:"ts-flow__label"},DE={class:"ts-flow__card"},LE={key:0,class:"ts-flow__question"},NE={class:"ts-flow__question-header"},ME={class:"ts-flow__question-text"},FE={class:"ts-flow__options"},qE=["disabled"],VE=["disabled"],jE={key:1,class:"ts-flow__instruction"},UE={class:"ts-flow__instruction-header"},zE={class:"ts-flow__instruction-title"},HE={key:0,class:"ts-flow__instruction-steps"},WE={class:"ts-flow__sub-dot"},KE={class:"ts-flow__sub-label"},GE={key:2,class:"ts-flow__waiting"},JE={class:"ts-flow__sync-status"},XE=we({__name:"TroubleshootFlow",setup(e){const t=Ot(),n=q(!1),s=F(()=>t.troubleshootingSteps||[]),o=F(()=>t.troubleshootingTemplateName||"排查中"),i=F(()=>t.troubleshootingCurrentNode||null);function a(l){var d,c;if(!n.value){n.value=!0;try{i.value&&(i.value.status="done");const u=l==="yes"?(d=i.value)==null?void 0:d.yes_branch:(c=i.value)==null?void 0:c.no_branch;u&&(t.troubleshootingCurrentNode=u,u.status="current",u.type==="step"&&r(u)),console.log("[TroubleshootFlow] 用户选择:",l,"下一节点:",u==null?void 0:u.label)}finally{setTimeout(()=>{n.value=!1},500)}}}function r(l){const d=t.troubleshootingSteps;if(!d||d.length===0)return;const c=d.findIndex(u=>u.label===l.label);if(c>=0){const u=d.map((f,p)=>({...f,status:p{var c,u;return s.value.length>0?(k(),T("div",OE,[h("div",$E,[h("div",PE,[(k(!0),T(ye,null,Ge(s.value,(f,p)=>(k(),T(ye,{key:p},[h("div",{class:ge(["ts-flow__step",`ts-flow__step--${f.status}`])},[h("span",{class:ge(["ts-flow__dot",`ts-flow__dot--${f.status}`])},[f.status==="done"?(k(),T(ye,{key:0},[Le("✓")],64)):(k(),T(ye,{key:1},[Le(M(p+1),1)],64))],2),h("span",BE,M(f.label),1)],2),pa("yes")),disabled:n.value},[d[3]||(d[3]=h("span",{class:"ts-flow__option-icon"},"✅",-1)),h("span",null,M(((c=i.value.yes_branch)==null?void 0:c.label)||"是"),1)],8,qE),h("button",{class:"ts-flow__option ts-flow__option--no",onClick:d[1]||(d[1]=f=>a("no")),disabled:n.value},[d[4]||(d[4]=h("span",{class:"ts-flow__option-icon"},"❌",-1)),h("span",null,M(((u=i.value.no_branch)==null?void 0:u.label)||"否"),1)],8,VE)])])):i.value&&i.value.type==="step"?(k(),T("div",jE,[h("div",UE,[d[5]||(d[5]=h("span",{class:"ts-flow__instruction-icon"},"📋",-1)),h("span",zE,"正在执行:"+M(i.value.label),1)]),i.value.children&&i.value.children.length>0?(k(),T("div",HE,[(k(!0),T(ye,null,Ge(i.value.children,(f,p)=>(k(),T("div",{key:f.id,class:ge(["ts-flow__sub-step",`ts-flow__sub-step--${f.status||"pending"}`])},[h("span",WE,M(p+1),1),h("span",KE,M(f.label),1)],2))),128))])):ae("",!0),d[6]||(d[6]=h("div",{class:"ts-flow__instruction-hint"},[h("span",null,"💡 请按坐席指引操作,完成后坐席会推进到下一步")],-1))])):(k(),T("div",GE,[...d[7]||(d[7]=[h("span",{class:"ts-flow__waiting-icon"},"⏳",-1),h("span",null,"坐席正在选择排查流程,请稍候...",-1)])])),h("div",JE,[d[8]||(d[8]=h("span",{class:"ts-flow__sync-dot"},null,-1)),h("span",null,"排查进度实时同步 · "+M(o.value),1)])])])):ae("",!0)}}}),YE=rt(XE,[["__scopeId","data-v-412334b8"]]),Ya={primary_agent:"#3b82f6",collaborator:"#07C160",owner:"#FF9800",invitee:"transparent"};function Yf(){const e=Ot(),t=kt(),n=F(()=>{var a;return((a=e.userInfo)==null?void 0:a.employee_id)||""}),s=F(()=>{var d;const a=e.currentConversation;if(!a)return[];const r=[];if(a.agent_name&&r.push({id:a.agent_id||"agent_primary",name:a.agent_name,avatar:"",department:"IT坐席",role:"primary_agent",joined:!0,isSelf:!1}),a.employee_name){const c=a.employee_id===n.value;r.push({id:a.employee_id,name:c?"我":a.employee_name,avatar:c&&((d=t.employeeInfo)==null?void 0:d.avatar)||"",department:"",role:"owner",joined:!0,isSelf:c})}const l=(e.participants||[]).slice().sort((c,u)=>c.joined!==u.joined?c.joined?-1:1:c.joined_at&&u.joined_at?new Date(c.joined_at).getTime()-new Date(u.joined_at).getTime():0);for(const c of l)r.push({id:c.id,name:c.name,avatar:c.avatar||"",department:c.department||"",role:"invitee",joined:c.joined??!1,isSelf:c.id===n.value,joinedAt:c.joined_at});return r}),o=F(()=>s.value.length),i=F(()=>s.value.some(a=>!a.joined));return{normalizedParticipants:s,totalCount:o,hasPending:i,currentUserId:n}}async function QE(e){return await qe.get("/h5/employees/search",{params:{keyword:e}})}async function ZE(){return await qe.get("/h5/org/tree")}async function eS(e,t,n="recent10"){return await qe.post(`/h5/conversations/${e}/invite-participant`,{participants:t,history_mode:n})}const tS={class:"invite-sheet"},nS={class:"invite-sheet__header"},sS={class:"invite-sheet__content"},oS={key:0,class:"invite-sheet__loading"},iS={key:1,class:"invite-sheet__empty"},aS={key:2},rS=["onClick"],lS={class:"invite-cell__avatar"},cS={class:"invite-cell__info"},uS={class:"invite-cell__name"},dS={key:0,class:"invite-cell__dept"},fS={key:0,class:"invite-cell__badge"},pS={class:"invite-sheet__content"},hS={key:0,class:"invite-sheet__loading"},mS={key:2,class:"org-tree-flat"},_S=["onClick"],gS={class:"org-tree-node__label"},vS={class:"org-tree-node__count"},yS={class:"invite-cell__avatar"},bS={class:"invite-cell__info"},wS={class:"invite-cell__name"},ES={key:0,class:"invite-cell__dept"},SS={key:0,class:"invite-cell__badge"},CS={class:"invite-sheet__footer"},xS={class:"invite-sheet__count"},kS=we({__name:"InviteParticipantSheet",props:{show:{type:Boolean,default:!1},conversationId:{default:""},existingParticipantIds:{default:()=>[]}},emits:["update:show","invited"],setup(e,{emit:t}){const n=e,s=t,o=q(0),i=q(""),a=q([]),r=q(!1),l=q([]),d=q(!1),c=q(!1),u=q([]),f=q(!1),p=q(new Map),_=F(()=>p.value.size),g=F(()=>{const W=[];function oe(de,ee){for(const re of de)if(re.isLeaf)W.push({id:re.id,label:re.label,isLeaf:!0,department:re.department,depth:ee,childCount:0});else{const Ee=$(re);W.push({id:re.id,label:re.label,isLeaf:!1,department:re.department,depth:ee,childCount:Ee}),u.value.includes(re.id)&&re.children&&oe(re.children,ee+1)}}return oe(l.value,0),W});function m(W){return(W||"?").charAt(0)}function v(W){return p.value.has(W)}function S(W){return n.existingParticipantIds.includes(W)}function R(W){S(W.id)||(p.value.has(W.id)?p.value.delete(W.id):p.value.set(W.id,W))}function x(W){R({id:W.id,name:W.name,department:W.department||""})}function b(W){R({id:W.id,name:W.label,department:W.department||""})}function $(W){if(W.isLeaf)return 1;let oe=0;for(const de of W.children||[])oe+=$(de);return oe}function B(W){return u.value.includes(W)}function G(W){const oe=u.value.indexOf(W);oe>=0?u.value.splice(oe,1):u.value.push(W)}let D=null;function X(W){D&&clearTimeout(D),D=setTimeout(()=>{V(W)},300)}async function V(W){const oe=(W||"").trim();if(!oe){a.value=[];return}r.value=!0;try{a.value=await QE(oe)}catch(de){console.error("[InviteSheet] 搜索失败:",de)}finally{r.value=!1}}async function O(){if(!c.value){d.value=!0;try{l.value=await ZE(),c.value=!0,u.value=l.value.filter(W=>!W.isLeaf).map(W=>W.id)}catch(W){console.error("[InviteSheet] 获取组织架构树失败:",W)}finally{d.value=!1}}}async function Z(){if(!(_.value===0||!n.conversationId)){f.value=!0;try{const W=Array.from(p.value.values()).map(oe=>({id:oe.id,name:oe.name,department:oe.department,type:"employee"}));await eS(n.conversationId,W,"recent10"),xe("邀请已发送"),p.value.clear(),s("update:show",!1),s("invited")}catch(W){console.error("[InviteSheet] 邀请失败:",W)}finally{f.value=!1}}}return Ae(()=>n.show,W=>{W&&(p.value.clear(),i.value="",a.value=[],o.value=0)}),Ae(o,W=>{W===1&&!c.value&&!d.value&&O()}),(W,oe)=>{const de=Tv,ee=xo,re=av,Ee=Cg,Se=tf,ne=ft,he=xg,fe=Zn,Te=Ts;return k(),ht(Te,{show:e.show,position:"bottom",round:"",teleport:"body",style:{maxHeight:"85vh",minHeight:"50vh"},"onUpdate:show":oe[3]||(oe[3]=H=>W.$emit("update:show",H))},{default:et(()=>[h("div",tS,[h("div",nS,[oe[4]||(oe[4]=h("span",{class:"invite-sheet__title"},"邀请参与者",-1)),h("button",{class:"invite-sheet__close",onClick:oe[0]||(oe[0]=H=>W.$emit("update:show",!1))}," × ")]),C(he,{active:o.value,"onUpdate:active":oe[2]||(oe[2]=H=>o.value=H),shrink:""},{default:et(()=>[C(Ee,{title:"搜索"},{default:et(()=>[C(de,{modelValue:i.value,"onUpdate:modelValue":[oe[1]||(oe[1]=H=>i.value=H),X],placeholder:"搜索姓名或工号",shape:"round"},null,8,["modelValue"]),h("div",sS,[r.value?(k(),T("div",oS,[C(ee,{type:"spinner",size:"24px"},{default:et(()=>[...oe[5]||(oe[5]=[Le("搜索中...",-1)])]),_:1})])):i.value&&a.value.length===0?(k(),T("div",iS," 未找到匹配的员工 ")):(k(),T("div",aS,[(k(!0),T(ye,null,Ge(a.value,H=>(k(),T("div",{key:H.id,class:ge(["invite-cell",{"invite-cell--disabled":S(H.id)}]),onClick:ce=>x(H)},[C(re,{"model-value":v(H.id),disabled:S(H.id),shape:"square"},null,8,["model-value","disabled"]),h("div",lS,M(m(H.name)),1),h("div",cS,[h("span",uS,M(H.name),1),H.department?(k(),T("span",dS,M(H.department),1)):ae("",!0)]),S(H.id)?(k(),T("span",fS,"已在会话中")):ae("",!0)],10,rS))),128))]))])]),_:1}),C(Ee,{title:"组织架构"},{default:et(()=>[h("div",pS,[d.value?(k(),T("div",hS,[C(ee,{type:"spinner",size:"24px"},{default:et(()=>[...oe[6]||(oe[6]=[Le("加载中...",-1)])]),_:1})])):l.value.length===0?(k(),ht(Se,{key:1,description:"暂无组织架构数据",image:"search"})):(k(),T("div",mS,[(k(!0),T(ye,null,Ge(g.value,H=>(k(),T("div",{key:H.id,class:ge(["org-tree-node",{"org-tree-node--dept":!H.isLeaf,"org-tree-node--emp":H.isLeaf,"invite-cell--disabled":H.isLeaf&&S(H.id)}]),style:jt({paddingLeft:`${H.depth*16+12}px`}),onClick:ce=>H.isLeaf?b(H):G(H.id)},[H.isLeaf?(k(),T(ye,{key:1},[C(re,{"model-value":v(H.id),disabled:S(H.id),shape:"square"},null,8,["model-value","disabled"]),h("div",yS,M(m(H.label)),1),h("div",bS,[h("span",wS,M(H.label),1),H.department?(k(),T("span",ES,M(H.department),1)):ae("",!0)]),S(H.id)?(k(),T("span",SS,"已在会话中")):ae("",!0)],64)):(k(),T(ye,{key:0},[C(ne,{name:B(H.id)?"arrow-down":"arrow",class:"org-tree-node__arrow"},null,8,["name"]),h("span",gS,M(H.label),1),h("span",vS,M(H.childCount)+"人",1)],64))],14,_S))),128))]))])]),_:1})]),_:1},8,["active"]),h("div",CS,[h("span",xS,[oe[7]||(oe[7]=Le(" 已选 ",-1)),h("strong",null,M(_.value),1),oe[8]||(oe[8]=Le(" 人 ",-1))]),C(fe,{type:"success",size:"small",round:"",loading:f.value,disabled:_.value===0||!e.conversationId,onClick:Z},{default:et(()=>[...oe[9]||(oe[9]=[Le(" 确认邀请 ",-1)])]),_:1},8,["loading","disabled"])])])]),_:1},8,["show"])}}}),Qf=rt(kS,[["__scopeId","data-v-61086f47"]]),AS={class:"participant-strip__count"},TS={class:"participant-strip__avatars"},RS=["onMouseenter"],IS=["src","alt","onError"],OS={key:1,class:"participant-strip__avatar-letter"},$S={key:0,class:"participant-strip__overflow"},PS={key:1,class:"participant-strip__badge-dot"},BS={class:"participant-strip__tooltip-name"},DS={key:0,class:"participant-strip__tooltip-dept"},Uc=4,LS=we({__name:"ParticipantStrip",setup(e){const t=Ot(),n=kt(),s=q({}),o=q(null),i=q(!1),{normalizedParticipants:a,totalCount:r,hasPending:l}=Yf(),d=F(()=>a.value.slice(0,Uc)),c=F(()=>Math.max(0,a.value.length-Uc)),u=F(()=>{const v=t.currentConversation;return v?v.employee_id===n.employeeId?!0:a.value.some(S=>S.id===n.employeeId):!1});function f(v){return v.role==="primary_agent"?"主责坐席":v.role==="collaborator"?"协作坐席":v.role==="owner"?"发起人":v.joined?"已加入":"待加入"}const p=F(()=>a.value.map(v=>v.id).filter(Boolean));async function _(){i.value=!1,await t.fetchCurrentConversation()}function g(v){return(v||"?").charAt(0)}function m(){t.participantPanelVisible=!0}return(v,S)=>{var R;return k(),T("div",{class:ge(["participant-strip",{"participant-strip--has-pending":Re(l)}]),onClick:m},[h("span",AS,M(Re(r))+"人在群",1),h("div",TS,[(k(!0),T(ye,null,Ge(d.value,x=>(k(),T("div",{key:x.id,class:ge(["participant-strip__avatar",{"participant-strip__avatar--self":x.isSelf}]),style:jt({borderColor:Re(Ya)[x.role]}),onMouseenter:b=>o.value=x,onMouseleave:S[0]||(S[0]=b=>o.value=null)},[x.avatar&&!s.value[x.id]?(k(),T("img",{key:0,src:x.avatar,alt:x.name,class:"participant-strip__avatar-img",onError:b=>s.value[x.id]=!0},null,40,IS)):(k(),T("span",OS,M(g(x.name)),1))],46,RS))),128)),c.value>0?(k(),T("span",$S," +"+M(c.value),1)):ae("",!0)]),u.value?(k(),T("button",{key:0,class:"participant-strip__invite-btn",title:"邀请同事加入会话",onClick:S[1]||(S[1]=gn(x=>i.value=!0,["stop"]))}," + 邀请 ")):ae("",!0),S[3]||(S[3]=h("span",{class:"participant-strip__arrow"},"▼",-1)),Re(l)?(k(),T("span",PS)):ae("",!0),o.value?(k(),T("div",{key:2,class:"participant-strip__tooltip",style:jt({borderColor:Re(Ya)[o.value.role]})},[h("div",BS,[Le(M(o.value.name)+" ",1),h("span",{class:ge(["participant-strip__tooltip-role",`participant-strip__tooltip-role--${o.value.role}`])},M(f(o.value)),3)]),o.value.department?(k(),T("div",DS,M(o.value.department),1)):ae("",!0)],4)):ae("",!0),C(Qf,{show:i.value,"onUpdate:show":S[2]||(S[2]=x=>i.value=x),"conversation-id":((R=Re(t).currentConversation)==null?void 0:R.conversation_id)||"","existing-participant-ids":p.value,onInvited:_},null,8,["show","conversation-id","existing-participant-ids"])],2)}}}),NS=rt(LS,[["__scopeId","data-v-b54d15e0"]]),MS={class:"participant-list"},FS={class:"participant-list__header"},qS={class:"participant-list__items"},VS=["src","alt","onError"],jS={key:1,class:"participant-item__avatar-letter"},US={class:"participant-item__info"},zS={class:"participant-item__name"},HS={key:0,class:"participant-item__self-tag"},WS={key:0,class:"participant-item__dept"},KS={key:0,class:"participant-item__badge participant-item__badge--agent"},GS={key:1,class:"participant-item__badge participant-item__badge--owner"},JS={key:2,class:"participant-item__badge participant-item__badge--joined"},XS={key:3,class:"participant-item__badge participant-item__badge--pending"},YS={key:0,class:"participant-list__invite-section"},QS={key:1,class:"participant-list__footer"},ZS=["disabled"],eC=we({__name:"ParticipantList",setup(e){const t=Ot(),n=kt(),s=q(!1),o=q({}),{normalizedParticipants:i}=Yf(),a=q(!1),r=F(()=>{const f=t.currentConversation;return f?f.employee_id===n.employeeId?!0:i.value.some(p=>p.id===n.employeeId):!1}),l=F(()=>i.value.map(f=>f.id).filter(Boolean));async function d(){a.value=!1,await t.fetchCurrentConversation()}function c(f){return(f||"?").charAt(0)}async function u(){try{await vv({title:"退出会话",message:"确定要退出该会话吗?退出后将无法查看会话消息。",confirmButtonText:"确定退出",cancelButtonText:"再想想",confirmButtonColor:"#ee0a24"}),s.value=!0,await t.leaveAsParticipant(),xe("已退出会话"),t.participantPanelVisible=!1}catch(f){f!=="cancel"&&(console.error("[ParticipantList] 退出失败:",f),xe("退出失败,请重试"))}finally{s.value=!1}}return(f,p)=>{var _;return k(),T("div",MS,[h("div",FS,[p[3]||(p[3]=h("span",{class:"participant-list__title"},"参与者",-1)),h("button",{class:"participant-list__close-btn",onClick:p[0]||(p[0]=g=>Re(t).participantPanelVisible=!1)}," × ")]),h("div",qS,[(k(!0),T(ye,null,Ge(Re(i),g=>(k(),T("div",{key:g.id,class:ge(["participant-item",{"participant-item--self":g.isSelf}])},[h("div",{class:ge(["participant-item__avatar",{"participant-item__avatar--self":g.isSelf,"participant-item__avatar--agent":g.role==="primary_agent"}]),style:jt({borderColor:Re(Ya)[g.role]})},[g.avatar&&!o.value[g.id]?(k(),T("img",{key:0,src:g.avatar,alt:g.name,class:"participant-item__avatar-img",onError:m=>o.value[g.id]=!0},null,40,VS)):(k(),T("span",jS,M(c(g.name)),1))],6),h("div",US,[h("span",zS,[Le(M(g.name)+" ",1),g.isSelf?(k(),T("span",HS,"(我)")):ae("",!0)]),g.department?(k(),T("span",WS,M(g.department),1)):ae("",!0)]),g.role==="primary_agent"?(k(),T("span",KS,"坐席")):g.role==="owner"?(k(),T("span",GS,"发起人")):g.joined?(k(),T("span",JS,"已加入")):(k(),T("span",XS,"待加入"))],2))),128))]),r.value?(k(),T("div",YS,[h("button",{class:"participant-list__invite-btn",onClick:p[1]||(p[1]=g=>a.value=!0)},[...p[4]||(p[4]=[h("span",{class:"participant-list__invite-icon"},"+",-1),Le(" 邀请参与者 ",-1)])])])):ae("",!0),Re(t).isParticipant?(k(),T("div",QS,[h("button",{class:"participant-list__leave-btn",disabled:s.value,onClick:u},M(s.value?"退出中...":"退出会话"),9,ZS)])):ae("",!0),C(Qf,{show:a.value,"onUpdate:show":p[2]||(p[2]=g=>a.value=g),"conversation-id":((_=Re(t).currentConversation)==null?void 0:_.conversation_id)||"","existing-participant-ids":l.value,onInvited:d},null,8,["show","conversation-id","existing-participant-ids"])])}}}),tC=rt(eC,[["__scopeId","data-v-df70b1a6"]]),nC={class:"evaluation-dialog"},sC={class:"evaluation-dialog__section"},oC={class:"star-rating"},iC={class:"star-label"},aC={class:"evaluation-dialog__section"},rC={class:"emoji-selector"},lC={class:"evaluation-dialog__section"},cC={class:"evaluation-dialog__actions"},uC={class:"evaluation-dialog__skip"},dC=we({__name:"EvaluationDialog",props:{modelValue:{type:Boolean,default:!1},conversationId:{default:""}},emits:["update:modelValue","submitted"],setup(e,{expose:t,emit:n}){const s=e,o=n,i=F({get:()=>s.modelValue,set:g=>o("update:modelValue",g)}),a=q({star_rating:0,emoji:"",feedback_text:""}),r=q(!1),l=F(()=>({0:"",1:"非常差",2:"较差",3:"一般",4:"满意",5:"非常满意"})[a.value.star_rating]||""),d=F(()=>a.value.star_rating>0&&a.value.emoji!=="");Ae(i,async g=>{if(g&&s.conversationId)try{await Yw(s.conversationId)&&(i.value=!1,xe("您已评价过该会话"))}catch(m){console.warn("[EvaluationDialog] 检查评价状态失败:",m)}});function c(g){a.value.emoji=g}function u(g){g>=4?a.value.emoji="satisfied":g>=2?a.value.emoji="neutral":a.value.emoji="dissatisfied"}async function f(){if(!(!d.value||r.value)){r.value=!0;try{await Xw(s.conversationId,{star_rating:a.value.star_rating,emoji:a.value.emoji,feedback_text:a.value.feedback_text||void 0}),xe("评价成功,感谢您的反馈!"),i.value=!1,o("submitted")}catch(g){console.error("[EvaluationDialog] 提交评价失败:",g)}finally{r.value=!1}}}function p(){i.value=!1}function _(){a.value={star_rating:0,emoji:"",feedback_text:""},r.value=!1}return t({resetForm:_}),(g,m)=>{const v=Sv,S=Tr,R=Zn,x=Ts;return k(),ht(x,{show:i.value,"onUpdate:show":m[5]||(m[5]=b=>i.value=b),round:"","close-on-click-overlay":!1,class:"evaluation-popup"},{default:et(()=>[h("div",nC,[m[14]||(m[14]=h("div",{class:"evaluation-dialog__header"},[h("h3",{class:"evaluation-dialog__title"},"请对本次服务进行评价"),h("p",{class:"evaluation-dialog__subtitle"},"您的评价对我们非常重要")],-1)),h("div",sC,[m[6]||(m[6]=h("div",{class:"evaluation-dialog__label"},"服务评分",-1)),h("div",oC,[C(v,{modelValue:a.value.star_rating,"onUpdate:modelValue":m[0]||(m[0]=b=>a.value.star_rating=b),count:5,size:"32",color:"#FFD21E","void-color":"#E5E5E5",onChange:u},null,8,["modelValue"]),h("span",iC,M(l.value),1)])]),h("div",aC,[m[10]||(m[10]=h("div",{class:"evaluation-dialog__label"},"整体感受",-1)),h("div",rC,[h("div",{class:ge(["emoji-item",{"emoji-item--selected":a.value.emoji==="satisfied"}]),onClick:m[1]||(m[1]=b=>c("satisfied"))},[...m[7]||(m[7]=[h("span",{class:"emoji-icon"},"😀",-1),h("span",{class:"emoji-text"},"满意",-1)])],2),h("div",{class:ge(["emoji-item",{"emoji-item--selected":a.value.emoji==="neutral"}]),onClick:m[2]||(m[2]=b=>c("neutral"))},[...m[8]||(m[8]=[h("span",{class:"emoji-icon"},"😐",-1),h("span",{class:"emoji-text"},"一般",-1)])],2),h("div",{class:ge(["emoji-item",{"emoji-item--selected":a.value.emoji==="dissatisfied"}]),onClick:m[3]||(m[3]=b=>c("dissatisfied"))},[...m[9]||(m[9]=[h("span",{class:"emoji-icon"},"😞",-1),h("span",{class:"emoji-text"},"不满意",-1)])],2)])]),h("div",lC,[m[11]||(m[11]=h("div",{class:"evaluation-dialog__label"},[Le(" 改进建议 "),h("span",{class:"evaluation-dialog__optional"},"(选填)")],-1)),C(S,{modelValue:a.value.feedback_text,"onUpdate:modelValue":m[4]||(m[4]=b=>a.value.feedback_text=b),type:"textarea",placeholder:"您对本次服务有什么建议?",maxlength:"200","show-word-limit":"",rows:"3",class:"evaluation-dialog__textarea"},null,8,["modelValue"])]),h("div",cC,[C(R,{type:"primary",size:"large",loading:r.value,disabled:!d.value,onClick:f},{default:et(()=>[...m[12]||(m[12]=[Le(" 提交评价 ",-1)])]),_:1},8,["loading","disabled"])]),h("div",uC,[C(R,{size:"small",type:"default",disabled:r.value,onClick:p},{default:et(()=>[...m[13]||(m[13]=[Le(" 暂不评价 ",-1)])]),_:1},8,["disabled"])])])]),_:1},8,["show"])}}}),fC=rt(dC,[["__scopeId","data-v-4e60a09d"]]),pC={class:"chat-panel"},hC={class:"chat-panel__header"},mC={class:"chat-panel__header-left"},_C={key:0,class:"chat-panel__status chat-panel__status--online"},gC={key:1,class:"chat-panel__status chat-panel__status--offline"},vC={class:"chat-panel__header-actions"},yC=["title"],bC={class:"chat-panel__user-info"},wC=["src","alt"],EC={key:1,class:"chat-panel__avatar chat-panel__avatar--fallback"},SC={class:"chat-panel__username"},CC={key:0,class:"chat-panel__troubleshoot-fixed"},xC={key:0,class:"chat-panel__not-logged"},kC={key:1,class:"chat-panel__empty"},AC=we({__name:"ChatPanel",setup(e){const t=Ot(),n=cf(),s=kt(),o=q(!1),i=F(()=>{const m=s.employeeName;return m?m.charAt(0).toUpperCase():"?"});function a(){o.value=!0}const r=q(null),l=q(!1),d=q(""),c=q(""),u=q(!0);async function f(){await tt(),r.value&&(r.value.scrollTop=r.value.scrollHeight)}function p(){if(!r.value)return;const{scrollTop:m,scrollHeight:v,clientHeight:S}=r.value;u.value=v-m-S<100}async function _(){if(!t.currentConversation){xe("会话未就绪,请稍后再试");return}Kg({message:"正在呼叫人工坐席...",forbidClick:!0,duration:0});try{await t.shakeAgent(),Gl()}catch(m){Gl(),xe("呼叫失败,请稍后重试"),console.error("[ChatPanel] handleDirectCall failed:",m)}}function g(){console.log("[ChatPanel] 评价已提交")}return Ae(()=>t.messages.length,()=>{f()}),Ae(()=>{var m;return(m=t.currentConversation)==null?void 0:m.conversation_id},()=>{t.participantPanelVisible=!1}),Ae(()=>{var m;return(m=t.currentConversation)==null?void 0:m.status},(m,v)=>{var S;if(v==="serving"&&m==="resolved"){const R=(S=t.currentConversation)==null?void 0:S.conversation_id;R&&setTimeout(()=>{d.value=R,l.value=!0},3e3)}c.value=m||""}),ot(()=>{var m;f(),c.value=((m=t.currentConversation)==null?void 0:m.status)||""}),(m,v)=>{var x,b;const S=tf,R=Ts;return k(),T("div",pC,[h("div",hC,[h("div",mC,[v[5]||(v[5]=h("span",{class:"logo-block"},"IT",-1)),v[6]||(v[6]=h("span",{class:"chat-panel__title"},"智能IT服务",-1)),Re(t).agentOnline?(k(),T("span",_C,[...v[3]||(v[3]=[h("span",{class:"chat-panel__status-dot"},null,-1),Le(" 坐席在线 ",-1)])])):(k(),T("span",gC,[...v[4]||(v[4]=[h("span",{class:"chat-panel__status-dot"},null,-1),Le(" 坐席离线 ",-1)])]))]),h("div",vC,[h("div",{class:"theme-switch",title:Re(n).currentTheme==="light"?"切换到深色模式":"切换到浅色模式",onClick:v[0]||(v[0]=$=>Re(n).toggleTheme())},[...v[7]||(v[7]=[h("span",{class:"switch-icon"},"☀️",-1),h("div",{class:"switch-track"},[h("div",{class:"switch-thumb"})],-1),h("span",{class:"switch-icon"},"🌙",-1)])],8,yC),h("div",bC,[(x=Re(s).employeeInfo)!=null&&x.avatar&&!o.value?(k(),T("img",{key:0,src:Re(s).employeeInfo.avatar,class:"chat-panel__avatar",alt:Re(s).employeeName,onError:a},null,40,wC)):(k(),T("span",EC,M(i.value),1)),h("span",SC,M(Re(s).employeeName),1)])])]),(b=Re(t).troubleshootingSteps)!=null&&b.length?(k(),T("div",CC,[C(YE)])):ae("",!0),Re(t).participants.length>0?(k(),ht(NS,{key:1})):ae("",!0),h("div",{ref_key:"messageListRef",ref:r,class:"chat-panel__messages",onScroll:p},[Re(t).isLoggedIn?Re(t).messages.length===0?(k(),T("div",kC,[...v[8]||(v[8]=[h("div",{class:"chat-panel__empty-icon"},"💬",-1),h("p",{class:"chat-panel__empty-text"},"暂无消息",-1),h("p",{class:"chat-panel__empty-hint"},'输入问题咨询,或点击下方"人工坐席"按钮',-1)])])):(k(!0),T(ye,{key:2},Ge(Re(t).messages,$=>(k(),ht(sE,{key:$.message_id,msg:$},null,8,["msg"]))),128)):(k(),T("div",xC,[C(S,{description:"正在获取身份信息...",image:"search"})]))],544),C(IE,{onCallAgent:_}),C(fC,{modelValue:l.value,"onUpdate:modelValue":v[1]||(v[1]=$=>l.value=$),"conversation-id":d.value,onSubmitted:g},null,8,["modelValue","conversation-id"]),C(R,{show:Re(t).participantPanelVisible,"onUpdate:show":v[2]||(v[2]=$=>Re(t).participantPanelVisible=$),position:"bottom",round:"",teleport:"body",style:{maxHeight:"60vh"}},{default:et(()=>[C(tC)]),_:1},8,["show"])])}}}),TC=rt(AC,[["__scopeId","data-v-2c37691d"]]);function RC(){return qe.get("/h5/it-health")}const IC={class:"basic-info-card"},OC={key:0,class:"basic-info-card__loading"},$C={class:"basic-info-card__tabs"},PC={key:0,class:"basic-info-card__current"},BC={class:"device-header"},DC={class:"device-header__left"},LC={class:"device-header__name"},NC={class:"info-grid"},MC={class:"info-grid__main"},FC={class:"info-row"},qC={class:"info-row__value"},VC={class:"info-row__value"},jC={class:"info-row"},UC={class:"info-row__value"},zC={class:"info-row__value"},HC={class:"info-row"},WC={class:"info-row__value"},KC={class:"info-row__value"},GC={class:"info-row"},JC={class:"info-row__value"},XC={class:"info-row__value"},YC={class:"health-badge__score"},QC={key:0,class:"perf-section"},ZC={key:0,class:"perf-item"},ex={class:"perf-item__header"},tx={class:"perf-item__value"},nx={class:"perf-item__bar"},sx={key:1,class:"perf-item"},ox={class:"perf-item__header"},ix={class:"perf-item__value"},ax={class:"perf-item__bar"},rx={class:"perf-item__header"},lx={class:"perf-item__label"},cx={class:"perf-item__value"},ux={class:"perf-item__bar"},dx={key:1,class:"data-source-badge"},fx={key:1,class:"basic-info-card__other"},px={key:0,class:"other-empty"},hx={key:1,class:"other-list"},mx={class:"other-item__left"},_x={class:"other-item__type"},gx={class:"other-item__name"},vx={class:"other-item__right"},yx={class:"other-item__time"},bx={class:"other-item__location"},wx=we({__name:"BasicInfoCard",setup(e){const t=q("current"),n=q(!0),s=q("mock"),o=q({deviceName:"",isOnline:!0,assetTag:"",activateDate:"",ipAddress:"",publicIp:"",location:"",os:"",mac:"",uptime:"",cpu:{usage:0,model:""},memory:{usage:0,total:""},disks:[],securityChecks:[],complianceChecks:[],healthScore:100}),i=q([]);ot(async()=>{await a()});async function a(){n.value=!0;try{const c=await RC();if(c){const u=c.current_device;o.value={deviceName:u.device_name,isOnline:u.is_online,assetTag:u.asset_tag,activateDate:u.activate_date,ipAddress:u.ip_address,publicIp:u.public_ip,location:u.location,os:u.os,mac:u.mac,uptime:u.uptime,cpu:u.cpu,memory:u.memory,disks:u.disks,securityChecks:u.security_checks,complianceChecks:u.compliance_checks,healthScore:u.health_score??100},i.value=(c.other_devices||[]).map(f=>({deviceType:f.device_type||"设备",deviceName:f.device_name||"",lastLoginTime:f.last_login_time||"",lastLoginLocation:f.last_login_location||""})),s.value=c.data_source||"mock"}}catch(c){console.warn("[BasicInfoCard] IT 健康数据获取失败,使用降级数据:",c),s.value="mock"}finally{n.value=!1}}const r=F(()=>{if(o.value.healthScore!==void 0)return o.value.healthScore;let c=100;for(const u of o.value.securityChecks)u.status==="danger"?c-=15:u.status==="warning"&&(c-=8);for(const u of o.value.complianceChecks)u.status==="warning"?c-=5:u.status==="danger"&&(c-=10);return o.value.isOnline||(c=Math.round(c*.6)),Math.max(0,c)}),l=F(()=>{const c=r.value;return c>=80?"good":c>=60?"fair":"poor"});function d(c){return c>85?"fill--danger":c>60?"fill--warning":"fill--normal"}return(c,u)=>{var f,p,_,g,m;return k(),T("div",IC,[n.value?(k(),T("div",OC,[...u[2]||(u[2]=[h("span",null,"正在获取设备信息...",-1)])])):(k(),T(ye,{key:1},[h("div",$C,[h("button",{class:ge(["tab-btn",{"tab-btn--active":t.value==="current"}]),onClick:u[0]||(u[0]=v=>t.value="current")}," 当前设备 ",2),h("button",{class:ge(["tab-btn",{"tab-btn--active":t.value==="other"}]),onClick:u[1]||(u[1]=v=>t.value="other")}," 其他设备 ("+M(i.value.length)+") ",3)]),t.value==="current"?(k(),T("div",PC,[h("div",BC,[h("div",DC,[h("span",{class:ge(["device-header__dot",o.value.isOnline?"dot--online":"dot--offline"])},null,2),h("span",LC,M(o.value.deviceName),1)]),h("span",{class:ge(["device-header__status",o.value.isOnline?"status--online":"status--offline"])},M(o.value.isOnline?"在线":"离线"),3)]),h("div",NC,[h("div",MC,[h("div",FC,[u[3]||(u[3]=h("span",{class:"info-row__label"},"资产编号",-1)),h("span",qC,M(o.value.assetTag||"-"),1),u[4]||(u[4]=h("span",{class:"info-row__label info-row__label--indent"},"启用时间",-1)),h("span",VC,M(o.value.activateDate||"-"),1)]),h("div",jC,[u[5]||(u[5]=h("span",{class:"info-row__label"},"内网IP",-1)),h("span",UC,M(o.value.ipAddress||"-"),1),u[6]||(u[6]=h("span",{class:"info-row__label info-row__label--indent"},"公网出口",-1)),h("span",zC,M(o.value.publicIp||"-"),1)]),h("div",HC,[u[7]||(u[7]=h("span",{class:"info-row__label"},"办公地点",-1)),h("span",WC,M(o.value.location||"-"),1),u[8]||(u[8]=h("span",{class:"info-row__label info-row__label--indent"},"操作系统",-1)),h("span",KC,M(o.value.os||"-"),1)]),h("div",GC,[u[9]||(u[9]=h("span",{class:"info-row__label"},"MAC地址",-1)),h("span",JC,M(o.value.mac||"-"),1),u[10]||(u[10]=h("span",{class:"info-row__label info-row__label--indent"},"运行时长",-1)),h("span",XC,M(o.value.uptime||"-"),1)])]),h("div",{class:ge(["health-badge",`health-badge--${l.value}`])},[h("span",YC,M(r.value),1),u[11]||(u[11]=h("span",{class:"health-badge__label"},"健康评分",-1))],2)]),(f=o.value.cpu)!=null&&f.model||(p=o.value.memory)!=null&&p.total||(_=o.value.disks)!=null&&_.length?(k(),T("div",QC,[(g=o.value.cpu)!=null&&g.model?(k(),T("div",ZC,[h("div",ex,[u[12]||(u[12]=h("span",{class:"perf-item__label"},"CPU",-1)),h("span",tx,M(o.value.cpu.usage)+"% · "+M(o.value.cpu.model),1)]),h("div",nx,[h("div",{class:ge(["perf-item__fill",d(o.value.cpu.usage)]),style:jt({width:o.value.cpu.usage+"%"})},null,6)])])):ae("",!0),(m=o.value.memory)!=null&&m.total?(k(),T("div",sx,[h("div",ox,[u[13]||(u[13]=h("span",{class:"perf-item__label"},"内存",-1)),h("span",ix,M(o.value.memory.usage)+"% · "+M(o.value.memory.total),1)]),h("div",ax,[h("div",{class:ge(["perf-item__fill",d(o.value.memory.usage)]),style:jt({width:o.value.memory.usage+"%"})},null,6)])])):ae("",!0),(k(!0),T(ye,null,Ge(o.value.disks,v=>(k(),T("div",{class:"perf-item",key:v.label},[h("div",rx,[h("span",lx,M(v.label),1),h("span",cx,M(v.usage)+"% · "+M(v.used)+"/"+M(v.total),1)]),h("div",ux,[h("div",{class:ge(["perf-item__fill",d(v.usage)]),style:jt({width:v.usage+"%"})},null,6)])]))),128))])):ae("",!0),s.value==="mock"?(k(),T("div",dx," ⚠️ 数据来源:模拟(集成未配置) ")):ae("",!0)])):(k(),T("div",fx,[i.value.length===0?(k(),T("div",px," 暂无其他设备 ")):(k(),T("div",hx,[(k(!0),T(ye,null,Ge(i.value,v=>(k(),T("div",{key:v.deviceName,class:"other-item"},[h("div",mx,[h("span",_x,M(v.deviceType),1),h("span",gx,M(v.deviceName),1)]),h("div",vx,[h("span",yx,M(v.lastLoginTime),1),h("span",bx,M(v.lastLoginLocation),1)])]))),128))]))]))],64))])}}}),Ex=rt(wx,[["__scopeId","data-v-751fb5f6"]]),Sx={class:"self-diag"},Cx={class:"self-diag__header"},xx=["disabled"],kx={class:"self-diag__tabs"},Ax=["onClick"],Tx={key:0,class:"tab-btn__badge"},Rx={class:"self-diag__content"},Ix={class:"diag-chips"},Ox=["disabled","onClick"],$x={class:"diag-chip__name"},Px={class:"diag-chip__icon"},Bx={key:0,class:"diag-results"},Dx={class:"result-item__header"},Lx={class:"result-item__name"},Nx={key:0,class:"result-item__detail"},Mx={key:1,class:"risk-list"},Fx=["onClick"],qx={class:"risk-item__icon"},Vx={class:"risk-item__name"},jx={class:"risk-item__toggle"},Ux={key:0,class:"risk-item__detail"},zx=["onClick"],Hx=we({__name:"SelfDiagnosis",setup(e){const t=q([{key:"network",label:"网络联通",diagItems:[{key:"net_connect",label:"网络连通性",status:"idle",detail:""},{key:"net_dns",label:"DNS解析",status:"idle",detail:""},{key:"net_gateway",label:"网关检测",status:"idle",detail:""},{key:"net_proxy",label:"代理检测",status:"idle",detail:""},{key:"net_vpn",label:"VPN诊断",status:"idle",detail:""},{key:"net_fileshare",label:"文件共享",status:"idle",detail:""}],riskItems:[]},{key:"account",label:"账号权限",diagItems:[],riskItems:[{key:"ad_password",label:"域账号密码到期",icon:"🔑",level:"warning",statusText:"5天",detailLines:["到期时间: 2026-07-17 14:30","修改方式: Ctrl+Alt+Del → 更改密码","密码规则: 至少8位, 含大小写字母+数字+特殊字符"],actionText:"查看修改指南"},{key:"zero_trust",label:"零信任账号",icon:"🛡️",level:"normal",statusText:"正常",detailLines:["账号状态: 正常","最近登录: 2026-07-12 08:45","登录设备: DESKTOP-SIMON01"],actionText:""},{key:"cloud_disk",label:"税友云盘",icon:"☁️",level:"normal",statusText:"正常",detailLines:["状态: 正常","已用容量: 12.3GB / 50GB","最近同步: 2026-07-12 09:00"],actionText:""},{key:"email_status",label:"税友邮箱",icon:"📧",level:"normal",statusText:"正常",detailLines:["邮箱: songxian@servyou.com.cn","密码到期: 2026-08-15","容量: 2.1GB / 5GB"],actionText:""}]},{key:"hardware",label:"设备硬件",diagItems:[],riskItems:[{key:"hw_cpu",label:"CPU 使用率",icon:"🔲",level:"normal",statusText:"23%",detailLines:["型号: Intel i7-12700 (12核)","当前使用率: 23%","温度: 52°C (正常)","阈值: 使用率 >85% 或温度 >85°C 触发警告"],actionText:""},{key:"hw_memory",label:"内存健康",icon:"📏",level:"normal",statusText:"45%",detailLines:["总容量: 16GB","已用: 7.2GB (45%)","类型: DDR5-4800","阈值: 使用率 >85% 触发警告"],actionText:""},{key:"hw_disk",label:"硬盘SMART",icon:"💿",level:"warning",statusText:"1个警告",detailLines:["C盘 (SSD 256GB): SMART 正常, 使用率 67%","D盘 (SSD 256GB): SMART 正常, 使用率 43%","警告: C盘剩余空间不足 84GB (<100GB)","建议: 清理临时文件或迁移大文件至D盘"],actionText:"查看清理建议"},{key:"hw_driver",label:"驱动状态",icon:"🔌",level:"normal",statusText:"正常",detailLines:["显卡驱动: NVIDIA 552.22 (最新)","网卡驱动: Intel 12.2.1 (最新)","声卡驱动: Realtek 6.0 (最新)","蓝牙驱动: 正常"],actionText:""},{key:"hw_peripheral",label:"外设连接",icon:"🖱️",level:"normal",statusText:"3个设备",detailLines:["显示器: DELL U2723QE (USB-C 连接)","键鼠: 罗技 MX Keys + MX Master (蓝牙)","打印机: \\\\print-srv\\HP-5F (网络)","摄像头: 内置 (正常)"],actionText:""}]},{key:"system",label:"系统软件",diagItems:[{key:"sys_service",label:"系统服务",status:"idle",detail:""},{key:"sys_cert",label:"证书检测",status:"idle",detail:""}],riskItems:[{key:"sys_patches",label:"系统补丁",icon:"🔧",level:"warning",statusText:"2个高危",detailLines:["KB5037: Windows 安全更新 (高危)","KB5039: .NET Framework 更新 (高危)","建议: 尽快安装, 可联系IT协助"],actionText:"申请安装补丁"},{key:"sys_risk_sw",label:"高危软件",icon:"📦",level:"normal",statusText:"未发现",detailLines:["扫描时间: 2026-07-12 09:00","结果: 未发现高危软件"],actionText:""},{key:"sys_email_client",label:"邮件客户端",icon:"📧",level:"warning",statusText:"配置异常",detailLines:["客户端: Outlook 2019","问题: 邮箱密码可能已过期","建议: 检查邮箱密码或重新配置"],actionText:"查看配置指南"},{key:"sys_printer",label:"打印机状态",icon:"🖨️",level:"normal",statusText:"正常",detailLines:["默认打印机: \\\\print-srv\\HP-5F","状态: 在线, 墨粉充足","队列: 0 个任务"],actionText:""}]},{key:"security",label:"终端安全",diagItems:[],riskItems:[{key:"sec_huorong",label:"火绒安装",icon:"🛡️",level:"normal",statusText:"已安装",detailLines:["版本: v2.4.1","病毒库: 2026-07-12","最近全盘扫描: 2026-07-01"],actionText:""},{key:"sec_virus",label:"病毒状态",icon:"🦠",level:"normal",statusText:"安全",detailLines:["状态: 无病毒事件","最近扫描: 2026-07-01 全盘扫描","实时防护: 已开启"],actionText:""},{key:"sec_internal",label:"内部攻击",icon:"⚔️",level:"pending",statusText:"接入中",detailLines:["数据源: SIEM/IDS (接入中)","预计完成: 2026-Q4","当前状态: 暂无数据"],actionText:""},{key:"sec_proxy",label:"网络代理",icon:"🌐",level:"pending",statusText:"接入中",detailLines:["数据源: 联软网络准入 (接入中)","预计完成: 2026-Q4","当前状态: 暂无数据"],actionText:""}]},{key:"compliance",label:"合规检查",diagItems:[],riskItems:[{key:"comp_byod",label:"自备电脑",icon:"💻",level:"normal",statusText:"公司配发",detailLines:["设备类型: 公司配发设备","资产编号: SY-PC-00821","登记状态: 已登记"],actionText:""},{key:"comp_unapproved",label:"未审批商业软件",icon:"📋",level:"warning",statusText:"1个未审批",detailLines:["软件: Adobe Photoshop 2024 (未审批)","发现时间: 2026-07-10","建议: 提交软件安装审批申请"],actionText:"提交审批申请"}]}]),n=q("network"),s=_t(new Set),o=q(!1),i=F(()=>t.value.find(_=>_.key===n.value)||t.value[0]),a=F(()=>t.value.map(_=>{const g=_.diagItems.filter(v=>v.status==="warning"||v.status==="fail").length,m=_.riskItems.filter(v=>v.level==="warning"||v.level==="danger").length;return{key:_.key,label:_.label,badge:g+m}})),r=F(()=>i.value.diagItems.some(_=>_.status==="pass"||_.status==="warning"||_.status==="fail")),l={net_connect:{status:"pass",detail:"ping 10.90.5.1 -> 2ms, 丢包率 0%"},net_dns:{status:"pass",detail:"DNS解析正常, 解析时间 3ms"},net_gateway:{status:"pass",detail:"默认网关 10.90.5.1 可达"},net_proxy:{status:"warning",detail:"检测到系统代理 127.0.0.1:8080, 可能影响内网访问"},net_vpn:{status:"fail",detail:"aTrust VPN 连接超时 (10s), 可能需要重新认证"},net_fileshare:{status:"pass",detail:"文件服务器 \\\\file-srv 可访问"},sys_service:{status:"pass",detail:"关键服务运行正常 (5/5): DHCP, DNS, Windows Update, Firewall, Defender"},sys_cert:{status:"fail",detail:"发现1个过期证书: CN=old-ca (过期日: 2025-12-01), 建议更新"}};async function d(_){const g=i.value.diagItems.find(v=>v.key===_);if(!g||g.status==="running")return;g.status="running",g.detail="",await new Promise(v=>setTimeout(v,800+Math.random()*700));const m=l[_];m?(g.status=m.status,g.detail=m.detail):(g.status="pass",g.detail="诊断完成")}async function c(){if(i.value.diagItems.length!==0){o.value=!0;for(const _ of i.value.diagItems)await d(_.key);o.value=!1}}function u(_){s.has(_)?s.delete(_):s.add(_)}function f(_){console.log("[Diag] risk action:",_.key,_.actionText)}function p(_){switch(_){case"pass":return"通过";case"warning":return"警告";case"fail":return"失败";default:return""}}return(_,g)=>(k(),T("div",Sx,[h("div",Cx,[g[0]||(g[0]=h("span",{class:"header__title"},"自助诊断",-1)),i.value.diagItems.length>0?(k(),T("button",{key:0,class:"header__btn",disabled:o.value,onClick:c},M(o.value?"诊断中...":"一键诊断"),9,xx)):ae("",!0)]),h("div",kx,[(k(!0),T(ye,null,Ge(a.value,m=>(k(),T("button",{key:m.key,class:ge(["tab-btn",{"tab-btn--active":n.value===m.key}]),onClick:v=>n.value=m.key},[Le(M(m.label)+" ",1),m.badge>0?(k(),T("span",Tx,M(m.badge),1)):ae("",!0)],10,Ax))),128))]),h("div",Rx,[i.value.diagItems.length>0?(k(),T(ye,{key:0},[h("div",Ix,[(k(!0),T(ye,null,Ge(i.value.diagItems,m=>(k(),T("button",{key:m.key,class:ge(["diag-chip",`diag-chip--${m.status}`]),disabled:m.status==="running",onClick:v=>d(m.key)},[h("span",$x,M(m.label),1),h("span",Px,[m.status==="running"?(k(),T(ye,{key:0},[Le("...")],64)):m.status==="pass"?(k(),T(ye,{key:1},[Le("✓")],64)):m.status==="warning"?(k(),T(ye,{key:2},[Le("!")],64)):m.status==="fail"?(k(),T(ye,{key:3},[Le("✕")],64)):(k(),T(ye,{key:4},[Le("›")],64))])],10,Ox))),128))]),r.value?(k(),T("div",Bx,[g[1]||(g[1]=h("div",{class:"diag-results__label"},"诊断结果",-1)),(k(!0),T(ye,null,Ge(i.value.diagItems.filter(m=>m.status==="pass"||m.status==="warning"||m.status==="fail"),m=>(k(),T("div",{key:m.key,class:ge(["result-item",`result-item--${m.status}`])},[h("div",Dx,[h("span",Lx,M(m.label),1),h("span",{class:ge(["result-item__status",`result-item__status--${m.status}`])},M(p(m.status)),3)]),m.detail?(k(),T("div",Nx,M(m.detail),1)):ae("",!0)],2))),128))])):ae("",!0)],64)):ae("",!0),i.value.riskItems.length>0?(k(),T("div",Mx,[(k(!0),T(ye,null,Ge(i.value.riskItems,m=>(k(),T("div",{key:m.key,class:ge(["risk-item",[`risk-item--${m.level}`,{"risk-item--pending":m.level==="pending"}]])},[h("div",{class:"risk-item__header",onClick:v=>u(m.key)},[h("span",qx,M(m.icon),1),h("span",Vx,M(m.label),1),h("span",{class:ge(["risk-item__status",`risk-item__status--${m.level}`])},M(m.statusText),3),h("span",jx,M(s.has(m.key)?"▴":"▾"),1)],8,Fx),s.has(m.key)?(k(),T("div",Ux,[(k(!0),T(ye,null,Ge(m.detailLines,v=>(k(),T("div",{key:v,class:"detail-line"},M(v),1))),128)),m.actionText?(k(),T("button",{key:0,class:"risk-item__action",onClick:gn(v=>f(m),["stop"])},M(m.actionText),9,zx)):ae("",!0)])):ae("",!0)],2))),128))])):ae("",!0)])]))}}),Wx=rt(Hx,[["__scopeId","data-v-9a55e083"]]),Kx={class:"recommend-card__header"},Gx={class:"recommend-card__icon"},Jx={class:"recommend-card__title-area"},Xx={class:"recommend-card__title"},Yx={key:0,class:"recommend-card__desc"},Qx={key:0,class:"recommend-card__items"},Zx=["onClick"],ek={class:"item-label"},tk={key:1,class:"recommend-card__action"},nk={class:"recommend-card__source"},sk={class:"source-tag"},ok=we({__name:"RecommendCard",props:{card:{}},setup(e){const t={设备申请:"_SHOW_OPTIONS_",IT资产领用:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4c8qt31AbSHwN9MuaFhYXt4Qwsx6ZLCftAFh6X1w&sp_id=&from=template_list",IT资产借用:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3TmACnFs8oqgYcasxVh4BfSMGNX7p9sb6ydBX77mK&sp_id=&from=template_list",IT资产升级:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=IT%E8%AE%BE%E5%A4%87%E5%8D%87%E7%BA%A7%E4%B8%8E%E7%A1%AC%E4%BB%B6%E7%BB%B4%E4%BF%AE",账号权限申请:"_SHOW_OPTIONS_",VPN账号申请:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%91%98%E5%B7%A5%E9%9B%B6%E4%BF%A1%E4%BB%BB%EF%BC%88%E5%8E%9FVPN%EF%BC%89%E8%B4%A6%E5%8F%B7%E7%94%B3%E8%AF%B7",企微外联权限:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4WrCbZd214XrDMZJiHDho7ZQHWX7gsabb7x2fF72&sp_id=&from=template_list",公共邮箱账号:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%85%AC%E5%85%B1%E9%82%AE%E7%AE%B1%E8%B4%A6%E5%8F%B7%E7%94%B3%E8%AF%B7",软件服务申请:"_SHOW_OPTIONS_",商业软件申请:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3TmACf8DsJy5yr7aymanLskywC4EDhFLuz1KuBBQK&sp_id=&from=template_list",资产处置申请:"_SHOW_OPTIONS_",IT资产外修:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=Bs7ucTLPo42dtj8Y1LzBoujijsa6geRWaRxZJjk4X&sp_id=&from=template_list",IT资产报废:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4WroCDfWuHKyujQjatjm3AjNv67imXk5C6WNooFkb&sp_id=&from=template_list",资产退还:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4c8qt33AZ52a7n9BBWDh6PmsDnpM5B6w8geqqqoHz&sp_id=&from=template_list",办公用品申请:"_SHOW_OPTIONS_",办公用品超额领用:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3WN6zRucbjycdnR94gBvkSVuXRamX7pKW4PrmNFh&sp_id=&from=template_list",会议室故障报修:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4ZXJMtjQJiPXo6N5vNMK26uPRT3KTi9VvkH2NScg&sp_id=&from=template_list",企业应用管理:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=3WLJnRg2Se1fwizQtNvFtcYMgci1mhRJZhMw2FFKb&sp_id=&from=template_list",资产变更确认:"https://app.work.weixin.qq.com/wework_admin/approval_v3#/?template_id=C4cA2owjRcXRRPQ46otZvUHoWNEKL5t25tHHfeePip&sp_id=&from=template_list",终端设备网络准入:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E7%BB%88%E7%AB%AF%E8%AE%BE%E5%A4%87%E7%BD%91%E7%BB%9C%E5%87%86%E5%85%A5%E7%94%B3%E8%AF%B7",活动与会议技术支持:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E6%B4%BB%E5%8A%A8%E4%B8%8E%E4%BC%9A%E8%AE%AE%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81",员工IT支持与故障报修:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%91%98%E5%B7%A5IT%E6%94%AF%E6%8C%81%E4%B8%8E%E6%95%85%E9%9A%9C%E6%8A%A5%E4%BF%AE",公共邮箱账号申请:"https://devops.dc.servyou-it.com/ITSM/workflow/service/createTicket?name=%E5%85%AC%E5%85%B1%E9%82%AE%E7%AE%B1%E8%B4%A6%E5%8F%B7%E7%94%B3%E8%AF%B7"},n=e,s=F(()=>`card-layer-${(n.card.layer||"L1").toLowerCase()}`),o=F(()=>`card-source-${n.card.source||"unknown"}`),i=F(()=>n.card.icon?n.card.icon:{dify_action:"💬",dify_intent:"💬",keyword_assets:"📦",profile_trigger:"⚠️",role_assets:"👤",approval:"📋",action:"⚡",info:"ℹ️"}[n.card.source]||"💡"),a=F(()=>({dify_action:"AI 智能推荐",dify_intent:"AI 智能推荐",keyword_assets:"知识库匹配",profile_trigger:"系统检测",role_assets:"常用资源",approval:"审批入口",action:"操作建议"})[n.card.source]||n.card.source);function r(f){return!!(f.url||f.action||f.type==="info"||f.copyable)}function l(f){return{download:"down",approval:"description",info:"info-o",doc:"certificate",guide:"question-o",link:"link",contact:"phone-o"}[f]||"arrow"}function d(f){if(r(f))switch(f.type){case"download":f.url&&window.open(f.url,"_blank");break;case"approval":c(f.approval_type||"");break;case"info":f.copyable&&f.value&&navigator.clipboard.writeText(f.value).then(()=>{xe("已复制到剪贴板")}).catch(()=>{xe("复制失败")});break;case"doc":case"guide":case"link":f.url&&window.open(f.url,"_blank");break;case"contact":f.value&&navigator.clipboard.writeText(f.value).then(()=>{xe("已复制联系方式")}).catch(()=>{xe("复制失败")});break}}async function c(f){if(!f){xe("审批类型未知");return}const p=t[f];if(p&&p!=="_SHOW_OPTIONS_"){const{openUrl:_}=Xa();await _(p);return}console.warn("[RecommendCard] 审批类型需要选择:",f),xe('可在右侧"智能推荐"查看更多审批选项')}async function u(){if(n.card.action_url){const{openUrl:f}=Xa();await f(n.card.action_url)}else n.card.approval_type?await c(n.card.approval_type):xe("无法打开链接")}return(f,p)=>{const _=ev,g=ft,m=Zn;return k(),T("div",{class:ge(["recommend-card",[s.value,o.value]])},[h("div",Kx,[h("span",Gx,M(i.value),1),h("div",Jx,[h("div",Xx,M(e.card.title),1),e.card.description?(k(),T("div",Yx,M(e.card.description),1)):ae("",!0)]),e.card.confidence?(k(),ht(_,{key:0,size:"small",type:"primary"},{default:et(()=>[Le(M(Math.round(e.card.confidence*100))+"% ",1)]),_:1})):ae("",!0)]),e.card.items&&e.card.items.length>0?(k(),T("div",Qx,[(k(!0),T(ye,null,Ge(e.card.items,(v,S)=>(k(),T("div",{key:S,class:ge(["recommend-card__item",{"item-clickable":r(v)}]),onClick:R=>d(v)},[C(g,{name:l(v.type),class:"item-icon"},null,8,["name"]),h("span",ek,M(v.label),1),r(v)?(k(),ht(g,{key:0,name:"arrow",class:"item-arrow"})):ae("",!0)],10,Zx))),128))])):e.card.action_url||e.card.approval_type?(k(),T("div",tk,[C(m,{type:"primary",size:"small",block:"",onClick:u},{default:et(()=>[Le(M(e.card.action_label||"打开审批表单"),1)]),_:1})])):ae("",!0),h("div",nk,[h("span",sk,M(a.value),1)])],2)}}}),ma=rt(ok,[["__scopeId","data-v-b90bf405"]]),ik={class:"dynamic-recommend"},ak={key:0,class:"dynamic-recommend__empty"},rk={key:1,class:"dynamic-recommend__layers"},lk={key:0,class:"recommend-layer layer-l1"},ck={class:"layer-count"},uk={class:"layer-content"},dk={key:1,class:"recommend-layer layer-l2"},fk={class:"layer-count"},pk={class:"layer-content"},hk={key:2,class:"recommend-layer layer-l3"},mk={class:"layer-count"},_k={class:"layer-content"},gk=we({__name:"DynamicRecommend",setup(e){const t=Ot(),n=q(["L1"]),s=F(()=>{const r=t.dynamicRecommendations||[],l=t.assetRecommendations||[];return[...r,...l]}),o=F(()=>{const r={L1:[],L2:[],L3:[]};return s.value.forEach(l=>{const d=l.layer||"L1";r[d]?r[d].push(l):r.L1.push(l)}),r});function i(r){const l=n.value.indexOf(r);l>=0?n.value.splice(l,1):n.value.push(r)}function a(r){return{id:r.id||r.recommend_id||`rec_${Date.now()}`,layer:r.layer||"L1",layer_label:r.layer_label||"相关推荐",source:r.source||r.card_type||"unknown",title:r.title||"",description:r.description||"",icon:r.icon,items:r.items,action_url:r.action_url,action_label:r.action_label,confidence:r.confidence,relevance:r.relevance||"high",card_type:r.card_type,approval_type:r.approval_type}}return ot(()=>{t.clearUnreadRecommend()}),(r,l)=>{const d=ft;return k(),T("div",ik,[s.value.length===0?(k(),T("div",ak,[...l[3]||(l[3]=[h("div",{class:"dynamic-recommend__empty-icon"},"💡",-1),h("p",{class:"dynamic-recommend__empty-text"},"暂无智能推荐",-1),h("p",{class:"dynamic-recommend__empty-hint"},"向 Duckula 提问后将显示相关推荐",-1)])])):(k(),T("div",rk,[o.value.L1.length>0?(k(),T("div",lk,[h("div",{class:"layer-header",onClick:l[0]||(l[0]=c=>i("L1"))},[l[4]||(l[4]=h("span",{class:"layer-icon"},"💬",-1)),l[5]||(l[5]=h("span",{class:"layer-title"},"相关推荐",-1)),h("span",ck,M(o.value.L1.length)+" 项",1),C(d,{name:n.value.includes("L1")?"arrow-up":"arrow-down",class:"layer-arrow"},null,8,["name"])]),yn(h("div",uk,[(k(!0),T(ye,null,Ge(o.value.L1,c=>(k(),ht(ma,{key:c.id||c.recommend_id,card:a(c),class:"layer-card"},null,8,["card"]))),128))],512),[[bn,n.value.includes("L1")]])])):ae("",!0),o.value.L2.length>0?(k(),T("div",dk,[h("div",{class:"layer-header",onClick:l[1]||(l[1]=c=>i("L2"))},[l[6]||(l[6]=h("span",{class:"layer-icon"},"⚠️",-1)),l[7]||(l[7]=h("span",{class:"layer-title"},"运维提醒",-1)),h("span",fk,M(o.value.L2.length)+" 项",1),C(d,{name:n.value.includes("L2")?"arrow-up":"arrow-down",class:"layer-arrow"},null,8,["name"])]),yn(h("div",pk,[(k(!0),T(ye,null,Ge(o.value.L2,c=>(k(),ht(ma,{key:c.id||c.recommend_id,card:a(c),class:"layer-card"},null,8,["card"]))),128))],512),[[bn,n.value.includes("L2")]])])):ae("",!0),o.value.L3.length>0?(k(),T("div",hk,[h("div",{class:"layer-header",onClick:l[2]||(l[2]=c=>i("L3"))},[l[8]||(l[8]=h("span",{class:"layer-icon"},"👤",-1)),l[9]||(l[9]=h("span",{class:"layer-title"},"常用资源",-1)),h("span",mk,M(o.value.L3.length)+" 项",1),C(d,{name:n.value.includes("L3")?"arrow-up":"arrow-down",class:"layer-arrow"},null,8,["name"])]),yn(h("div",_k,[(k(!0),T(ye,null,Ge(o.value.L3,c=>(k(),ht(ma,{key:c.id||c.recommend_id,card:a(c),class:"layer-card"},null,8,["card"]))),128))],512),[[bn,n.value.includes("L3")]])])):ae("",!0)]))])}}}),vk=rt(gk,[["__scopeId","data-v-81205bca"]]);function yk(e){return qe.get("/h5/queue/status",{params:{employee_id:e}})}function bk(e,t){return qe.get("/h5/quiz/question",{params:{employee_id:e,conversation_id:t||void 0}})}function wk(e){return qe.post("/h5/quiz/answer",e)}const Ek={class:"queue-waiting"},Sk={class:"queue-waiting__segment-badge"},Ck={class:"segment-badge__icon"},xk={class:"segment-badge__text"},kk={class:"queue-waiting__position-number"},Ak={key:0,class:"queue-waiting__ahead"},Tk={key:1,class:"queue-waiting__ahead queue-waiting__ahead--first"},Rk={key:2,class:"queue-waiting__ahead"},Ik={key:3,class:"queue-waiting__eta"},Ok={key:4,class:"queue-waiting__jump-progress"},$k={class:"jump-progress__header"},Pk={class:"jump-progress__priority"},Bk={class:"jump-progress__bar"},Dk={key:0,class:"jump-progress__check"},Lk={key:0,class:"jump-progress__hint"},Nk={key:1,class:"jump-progress__hint jump-progress__hint--max"},Mk={class:"queue-waiting__stats"},Fk={class:"stats__grid"},qk={class:"stats__item"},Vk={class:"stats__value"},jk={class:"stats__item stats__item--queued"},Uk={class:"stats__value"},zk={class:"stats__item stats__item--serving"},Hk={class:"stats__value"},Wk={class:"stats__item stats__item--ai"},Kk={class:"stats__value"},Gk={key:0,class:"queue-waiting__points"},Jk={class:"level-badge__icon"},Xk={class:"level-badge__name"},Yk={class:"points__info"},Qk={class:"points__value"},Zk={key:0,class:"points__next"},eA={key:1,class:"points__next points__next--max"},tA={class:"queue-waiting__quiz"},nA={class:"quiz__header"},sA={class:"quiz__title"},oA={key:0,class:"quiz__type-badge quiz__type-badge--diag"},iA={key:1,class:"quiz__type-badge quiz__type-badge--knowledge"},aA={key:0,class:"quiz__loading"},rA={key:1,class:"quiz__empty"},lA={class:"quiz__question"},cA={class:"quiz__options"},uA=["disabled","onClick"],dA={class:"quiz__option-label"},fA={class:"quiz__option-text"},pA={key:0,class:"quiz__result-icon"},hA={key:1,class:"quiz__result-icon"},mA={class:"quiz__result-content"},_A={class:"quiz__result-text"},gA={key:0,class:"quiz__result-explanation"},vA={key:1,class:"quiz__result-jump"},yA={key:3,class:"quiz__no-more"},bA=we({__name:"QueueWaiting",setup(e,{expose:t}){const n=Ot(),s=kt(),o=q(null),i=q(null),a=q(!1),r=q(!1),l=q(-1),d=q(null);let c=null;const u=["A","B","C","D","E","F"],f=F(()=>{var V,O;return((O=(V=o.value)==null?void 0:V.queue)==null?void 0:O.position)||0}),p=F(()=>{var V,O;return((O=(V=o.value)==null?void 0:V.queue)==null?void 0:O.estimated_wait_text)||""}),_=F(()=>{var V;return((V=o.value)==null?void 0:V.platform)||{total_active:0,queued:0,serving:0,ai_handling:0}}),g=F(()=>{var V;return((V=o.value)==null?void 0:V.points)||null}),m=F(()=>{var O,Z;const V=(Z=(O=o.value)==null?void 0:O.queue)==null?void 0:Z.segment;return V==="vip"?"⭐":V==="completed"?"✅":V==="incomplete"?"⏳":"📋"}),v=F(()=>{var O,Z;const V=(Z=(O=o.value)==null?void 0:O.queue)==null?void 0:Z.segment;return{"position-card--vip":V==="vip","position-card--completed":V==="completed","position-card--incomplete":V==="incomplete"}}),S=F(()=>{var Z;const V=((Z=g.value)==null?void 0:Z.level_index)||1;return["🐣","🌱","⚡","🔥","👑"][Math.min(V-1,4)]||"⭐"}),R=F(()=>{var V;return((V=i.value)==null?void 0:V.type)==="diagnostic"?"回答问题帮助坐席更快定位":"答题赢积分+插队"});function x(){return s.employeeId||localStorage.getItem("employee_id")||""}function b(){var V;return((V=n.currentConversation)==null?void 0:V.conversation_id)||null}async function $(){const V=x();if(V)try{const O=await yk(V);o.value=O}catch(O){console.error("[QueueWaiting] 加载排队状态失败:",O)}}async function B(){const V=x();if(V){a.value=!0;try{const O=await bk(V,b());i.value=O,r.value=!1,l.value=-1,d.value=null}catch(O){console.error("[QueueWaiting] 加载题目失败:",O),i.value=null}finally{a.value=!1}}}function G(V){i.value=V,r.value=!1,l.value=-1,d.value=null}async function D(V){var Z;if(r.value||!i.value)return;const O=x();if(O){r.value=!0,l.value=V;try{const W=await wk({employee_id:O,question_id:i.value.question_id,selected_index:V,conversation_id:b()});d.value=W,W.queue_priority_changed&&await $(),o.value&&W.points!==void 0&&(o.value.points={points:W.points,level_name:W.level_name,level_index:W.level_index,to_next_level:0,next_level_name:null}),(Z=o.value)!=null&&Z.quiz&&(o.value.quiz.answered_in_session=W.answered_in_session,o.value.quiz.queue_priority=W.queue_priority,o.value.quiz.remaining_for_next_jump=W.remaining_for_next_jump,o.value.quiz.can_jump_more=W.can_jump_more)}catch(W){console.error("[QueueWaiting] 提交答案失败:",W),r.value=!1}}}function X(V){var O;(O=o.value)!=null&&O.queue&&(o.value.queue.position=V.position,o.value.queue.segment=V.segment,o.value.queue.ahead_count=V.ahead_count,o.value.queue.queue_priority=V.queue_priority)}return ot(async()=>{var O;await $();const V=(O=o.value)==null?void 0:O.conversation_status;(V==="queued"||V==="ai_handling")&&await B(),c=setInterval(async()=>{await $()},15e3)}),Nn(()=>{c&&(clearInterval(c),c=null)}),t({handleQueuePositionUpdate:X,loadQueueStatus:$,loadQuestion:B,currentPosition:f}),(V,O)=>{var Z,W,oe,de,ee,re;return k(),T("div",Ek,[h("div",{class:ge(["queue-waiting__position-card",v.value])},[h("div",Sk,[h("span",Ck,M(m.value),1),h("span",xk,M(((W=(Z=o.value)==null?void 0:Z.queue)==null?void 0:W.segment_label)||"等待中"),1)]),h("div",kk,[C(fo,{name:"position-flip",mode:"out-in"},{default:et(()=>[(k(),T("span",{key:f.value,class:"position-number__value"},M(f.value>0?f.value:"—"),1))]),_:1}),O[1]||(O[1]=h("span",{class:"position-number__label"},"您的排队位置",-1))]),f.value>1?(k(),T("div",Ak,[O[2]||(O[2]=Le(" 前方还有 ",-1)),h("strong",null,M(((de=(oe=o.value)==null?void 0:oe.queue)==null?void 0:de.ahead_count)||0),1),O[3]||(O[3]=Le(" 位同事等待 ",-1))])):f.value===1?(k(),T("div",Tk," 即将轮到您,请准备好! ")):(k(),T("div",Rk," 正在为您分配坐席… ")),p.value&&f.value>0?(k(),T("div",Ik,[O[4]||(O[4]=h("span",{class:"eta-icon"},"⏱️",-1)),h("span",null,"预计等待 "+M(p.value),1)])):ae("",!0),(ee=o.value)!=null&&ee.quiz?(k(),T("div",Ok,[h("div",$k,[O[5]||(O[5]=h("span",{class:"jump-progress__title"},"答题插队",-1)),h("span",Pk," 已前移 "+M(o.value.quiz.queue_priority)+"/"+M(o.value.quiz.max_priority)+" 位 ",1)]),h("div",Bk,[(k(!0),T(ye,null,Ge(o.value.quiz.max_priority,Ee=>(k(),T("div",{key:Ee,class:ge(["jump-progress__dot",{"jump-progress__dot--filled":Ee<=o.value.quiz.queue_priority}])},[Ee<=o.value.quiz.queue_priority?(k(),T("span",Dk,"✓")):ae("",!0)],2))),128))]),o.value.quiz.can_jump_more?(k(),T("div",Lk," 再答 "+M(o.value.quiz.remaining_for_next_jump)+" 题可前移 1 位 ",1)):(k(),T("div",Nk," 已达最大插队次数 "))])):ae("",!0)],2),h("div",Mk,[O[10]||(O[10]=h("div",{class:"stats__header"},[h("span",{class:"stats__title"},"平台实时状态"),h("span",{class:"stats__live-indicator"},[h("span",{class:"live-dot"}),h("span",null,"实时")])],-1)),h("div",Fk,[h("div",qk,[h("div",Vk,M(_.value.total_active),1),O[6]||(O[6]=h("div",{class:"stats__label"},"总活跃",-1))]),h("div",jk,[h("div",Uk,M(_.value.queued),1),O[7]||(O[7]=h("div",{class:"stats__label"},"排队中",-1))]),h("div",zk,[h("div",Hk,M(_.value.serving),1),O[8]||(O[8]=h("div",{class:"stats__label"},"服务中",-1))]),h("div",Wk,[h("div",Kk,M(_.value.ai_handling),1),O[9]||(O[9]=h("div",{class:"stats__label"},"AI处理",-1))])])]),g.value?(k(),T("div",Gk,[h("div",{class:ge(["points__level-badge",`points__level-badge--${g.value.level_index}`])},[h("span",Jk,M(S.value),1),h("span",Xk,M(g.value.level_name),1)],2),h("div",Yk,[h("span",Qk,M(g.value.points)+" 积分",1),g.value.next_level_name?(k(),T("span",Zk," 距 "+M(g.value.next_level_name)+" 还差 "+M(g.value.to_next_level)+" 分 ",1)):(k(),T("span",eA," 已达最高等级 🏆 "))])])):ae("",!0),h("div",tA,[h("div",nA,[h("span",sA,M(R.value),1),((re=i.value)==null?void 0:re.type)==="diagnostic"?(k(),T("span",oA," 诊断题 ")):(k(),T("span",iA," 知识题 "))]),a.value?(k(),T("div",aA,[...O[11]||(O[11]=[h("span",{class:"quiz__loading-spinner"},null,-1),h("span",null,"加载题目中…",-1)])])):i.value?(k(),T(ye,{key:2},[h("div",lA,M(i.value.question),1),h("div",cA,[(k(!0),T(ye,null,Ge(i.value.options,(Ee,Se)=>(k(),T("button",{key:Se,class:ge(["quiz__option",{"quiz__option--correct":r.value&&Se===i.value.correct_index,"quiz__option--wrong":r.value&&l.value===Se&&Se!==i.value.correct_index,"quiz__option--disabled":r.value}]),disabled:r.value,onClick:ne=>D(Se)},[h("span",dA,M(u[Se]),1),h("span",fA,M(Ee),1)],10,uA))),128))]),C(fo,{name:"fade"},{default:et(()=>[r.value&&d.value?(k(),T("div",{key:0,class:ge(["quiz__result",d.value.is_correct?"quiz__result--correct":"quiz__result--wrong"])},[d.value.is_correct?(k(),T("span",pA,"✅")):(k(),T("span",hA,"❌")),h("div",mA,[h("div",_A,M(d.value.is_correct?`答对啦!+${d.value.points_delta} 积分`:"答错了"),1),d.value.explanation?(k(),T("div",gA,M(d.value.explanation),1)):ae("",!0),d.value.queue_priority_changed?(k(),T("div",vA," 🎉 恭喜!排队位置前移 1 位! ")):ae("",!0)]),d.value.next_question?(k(),T("button",{key:2,class:"quiz__next-btn",onClick:O[0]||(O[0]=Ee=>G(d.value.next_question))}," 下一题 → ")):(k(),T("div",yA,"暂无更多题目"))],2)):ae("",!0)]),_:1})],64)):(k(),T("div",rA,[...O[12]||(O[12]=[h("span",null,"📋 暂无更多题目",-1)])]))])])}}}),wA=rt(bA,[["__scopeId","data-v-c37ebe5d"]]),EA={class:"right-panel"},SA={class:"right-panel__accordion"},CA={class:"accordion-item__toggle"},xA={class:"accordion-item__content"},kA={class:"accordion-item__toggle"},AA={class:"accordion-item__content"},TA={class:"right-panel__recommend-section"},RA={class:"queue-collapsed-bar__left"},IA={class:"queue-collapsed-bar__icon"},OA={key:0,class:"queue-collapsed-bar__text"},$A={key:1,class:"queue-collapsed-bar__text"},PA={key:0,class:"queue-collapsed-bar__position"},BA={class:"queue-collapsed-bar__toggle"},DA={key:0,class:"queue-header__badge"},LA={class:"right-panel__queue-content"},NA=we({__name:"RightPanel",setup(e,{expose:t}){const n=Ot(),s=q(null);function o(c){s.value===c?s.value=null:s.value=c}Ae(()=>n.unreadRecommendCount,c=>{c>0&&n.clearUnreadRecommend()});const i=q(null),a=F(()=>{var u,f;return((u=n.currentConversation)==null?void 0:u.status)==="waiting"&&((f=n.currentConversation)==null?void 0:f.agent_id)===""}),r=F(()=>{var c;return((c=i.value)==null?void 0:c.currentPosition)||0}),l=q(!1);Ae(a,c=>{c&&(l.value=!0)},{immediate:!0});function d(){l.value=!l.value}return t({queueWaitingRef:i}),(c,u)=>(k(),T("div",EA,[h("div",SA,[h("div",{class:ge(["accordion-item",{"accordion-item--active":s.value==="device"}])},[h("div",{class:"accordion-item__header",onClick:u[0]||(u[0]=f=>o("device"))},[u[2]||(u[2]=h("span",{class:"accordion-item__icon"},"💻",-1)),u[3]||(u[3]=h("span",{class:"accordion-item__title"},"设备信息",-1)),h("span",CA,M(s.value==="device"?"▾":"▸"),1)]),yn(h("div",xA,[C(Ex)],512),[[bn,s.value==="device"]])],2),h("div",{class:ge(["accordion-item",{"accordion-item--active":s.value==="diagnosis"}])},[h("div",{class:"accordion-item__header",onClick:u[1]||(u[1]=f=>o("diagnosis"))},[u[4]||(u[4]=h("span",{class:"accordion-item__icon"},"🩺",-1)),u[5]||(u[5]=h("span",{class:"accordion-item__title"},"自助诊断",-1)),h("span",kA,M(s.value==="diagnosis"?"▾":"▸"),1)]),yn(h("div",AA,[C(Wx)],512),[[bn,s.value==="diagnosis"]])],2)]),u[10]||(u[10]=h("div",{class:"right-panel__divider"},null,-1)),h("div",TA,[C(vk)]),u[11]||(u[11]=h("div",{class:"right-panel__divider"},null,-1)),h("div",{class:ge(["right-panel__queue-section",{"right-panel__queue-section--collapsed":!l.value}])},[l.value?(k(),T(ye,{key:1},[h("div",{class:"queue-header",onClick:d},[u[7]||(u[7]=h("span",{class:"queue-header__icon"},"⏳",-1)),u[8]||(u[8]=h("span",{class:"queue-header__title"},"排队等待",-1)),a.value?(k(),T("span",DA)):ae("",!0),u[9]||(u[9]=h("span",{class:"queue-header__toggle"},"收起 ▴",-1))]),yn(h("div",LA,[C(wA,{ref_key:"queueWaitingRef",ref:i},null,512)],512),[[bn,l.value]])],64)):(k(),T("div",{key:0,class:"queue-collapsed-bar",onClick:d},[h("div",RA,[h("span",IA,M(a.value?"⏳":"✅"),1),a.value?(k(),T("span",$A,[u[6]||(u[6]=Le(" 排队中 ",-1)),r.value>0?(k(),T("span",PA,"#"+M(r.value),1)):ae("",!0)])):(k(),T("span",OA,"当前无排队"))]),h("span",BA,M(a.value?"展开查看":"展开")+" ▾",1)]))],2)]))}}),Qa=rt(NA,[["__scopeId","data-v-90a73e1d"]]),MA={class:"chat-view"},FA={key:1,class:"chat-view__right"},qA=we({__name:"ChatView",setup(e){const t=Ef(),n=Sf(),s=kt(),o=Ot(),i=r0(),a=q(window.innerWidth),r=q(60),l=q(!1),d=F(()=>a.value<500),c=F(()=>!d.value);function u(g){l.value=!0;const m=g.clientX,v=r.value,S=a.value;function R(b){if(!l.value)return;const B=(b.clientX-m)/S*100;let G=v+B;G=Math.max(40,Math.min(80,G)),r.value=G}function x(){l.value=!1,document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",x),document.body.style.cursor="",document.body.style.userSelect=""}document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",R),document.addEventListener("mouseup",x)}function f(){a.value=window.innerWidth}ot(()=>{if(window.addEventListener("resize",f),!s.isAuthenticated){console.warn("[ChatView] 未登录,跳转登录页"),t.push("/login");return}o.initialize(),i.connect()});const p=n.query.invite,_=n.query.eid;if(p&&_){console.log(`[ChatView] 检测到邀请链接: conv=${p}, eid=${_}`);const g=Ae(()=>o.initialized,async m=>{var v,S;if(m){g();try{await Gw(p),console.log("[ChatView] 已成功加入邀请的会话"),await o.switchToConversation(p)}catch(R){console.error("[ChatView] 加入会话失败:",R);const x=(S=(v=R==null?void 0:R.response)==null?void 0:v.data)==null?void 0:S.code;if(x!==3034&&x!==3033)try{await o.switchToConversation(p)}catch(b){console.error("[ChatView] 切换会话也失败:",b)}}finally{t.replace({path:n.path,query:{}})}}},{immediate:!0})}return Nn(()=>{window.removeEventListener("resize",f),i.disconnect(),o.cleanup()}),(g,m)=>(k(),T("div",MA,[h("div",{class:ge(["chat-view__left",{"chat-view__left--full":!c.value}]),style:jt(!d.value&&c.value?{flex:`0 0 ${r.value}%`,maxWidth:`${r.value}%`}:{})},[C(TC)],6),c.value&&!d.value?(k(),T("div",{key:0,class:"chat-view__resize-handle",onMousedown:u},[...m[0]||(m[0]=[h("div",{class:"chat-view__resize-grip"},null,-1)])],32)):ae("",!0),c.value?(k(),T("div",FA,[C(Qa)])):ae("",!0)]))}}),VA=rt(qA,[["__scopeId","data-v-8734f543"]]),jA={class:"emergency-dispatcher"},UA={class:"emergency-dispatcher__panel"},zA={class:"subtitle"},HA={key:1,class:"error-msg"},WA=we({__name:"EmergencyDispatcher",setup(e){const t=Ef(),n=q(!0),s=q(""),o=q("正在检测身份...");function i(){return new Promise((c,u)=>{if(typeof window.wx<"u"&&window.wx.agentConfig){c();return}const f=document.createElement("script");f.src="https://res.wx.qq.com/wwopen/js/wwLogin-1.2.7.js",f.onload=()=>{const p=document.createElement("script");p.src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js",p.onload=()=>c(),p.onerror=()=>u(new Error("加载企微 agent SDK 失败")),document.head.appendChild(p)},f.onerror=()=>u(new Error("加载企微 JS-SDK 失败")),document.head.appendChild(f)})}async function a(c){const u=await Ye.get("/api/wecom/jsapi-config",{params:{url:c}});if(u.data.code!==0)throw new Error(`拿签名失败: ${u.data.message}`);return u.data.data}function r(c){return new Promise((u,f)=>{const p=window.wx;p.config({beta:!0,debug:!1,appId:c.corp_id,timestamp:c.timestamp,nonceStr:c.nonce_str,signature:c.signature,jsApiList:["agentConfig"]}),p.ready(()=>u()),p.error(_=>f(new Error(`wx.config 失败: ${JSON.stringify(_)}`)))})}function l(c){return new Promise((u,f)=>{window.wx.agentConfig({corpid:c.corp_id,agentid:c.agent_id,timestamp:c.timestamp,nonceStr:c.nonce_str,signature:c.signature,jsApiList:["selectExternalContact"],success:_=>{const g=window.wecom_userid||"";u({userId:g})},fail:_=>f(new Error(`wx.agentConfig 失败: ${JSON.stringify(_)}`))})})}async function d(c){const u=await Ye.get("/api/wecom/check-role",{params:{userid:c}});if(u.data.code!==0)throw new Error(`检查角色失败: ${u.data.message}`);return u.data.data}return ot(async()=>{try{o.value="正在加载企微 SDK...",await i(),o.value="正在获取鉴权签名...";const c=window.location.href.split("#")[0],u=await a(c);o.value="正在初始化企微...",await r(u),o.value="正在获取身份...";const{userId:f}=await l(u);if(!f)throw new Error("未能获取当前用户 userid");o.value="正在检查角色...";const p=await d(f);console.log("[EmergencyDispatcher] 角色检测:",p),o.value=`角色: ${p.role},正在跳转...`,p.role==="agent"?window.location.href="/itagent/agent-preview?userid="+encodeURIComponent(f):t.push({path:"/h5-preview",query:{userid:f}})}catch(c){console.error("[EmergencyDispatcher] 错误:",c),s.value=c.message||"未知错误",n.value=!1,Gg({message:s.value,duration:5e3}),setTimeout(()=>{t.push({path:"/h5-preview"})},3e3)}}),(c,u)=>{const f=xo;return k(),T("div",jA,[h("div",UA,[u[0]||(u[0]=h("div",{class:"logo"},null,-1)),u[1]||(u[1]=h("h2",{class:"title"},"智能IT服务",-1)),h("p",zA,M(o.value),1),n.value?(k(),ht(f,{key:0,type:"spinner",color:"#1989fa",size:"32"})):ae("",!0),s.value?(k(),T("div",HA,M(s.value),1)):ae("",!0)])])}}}),KA=rt(WA,[["__scopeId","data-v-12d9965e"]]),GA={class:"h5-preview"},JA={class:"h5-preview__topbar"},XA={key:1,class:"userid-tag"},YA={key:0,class:"h5-preview__content"},QA={class:"h5-preview__drawer-header"},ZA={class:"h5-preview__drawer-body"},eT={key:2,class:"h5-preview__mobile-hint"},tT=we({__name:"H5PreviewView",setup(e){const t=Sf(),n=q(!1),s=F(()=>t.query.userid||""),o=F(()=>window.innerWidth<500);return s.value&&xe({message:"员工模式",duration:1500}),(i,a)=>{const r=ft,l=Ts;return k(),T("div",GA,[h("div",JA,[a[4]||(a[4]=zh('

员工自助

智能IT服务 · 应急模式

',1)),o.value?(k(),T("button",{key:0,class:"topbar-menu-btn",onClick:a[0]||(a[0]=d=>n.value=!0)},[C(r,{name:"apps-o",size:"22"}),a[3]||(a[3]=h("span",null,"右栏",-1))])):(k(),T("div",XA," userid: "+M(s.value||"anonymous"),1))]),o.value?ae("",!0):(k(),T("div",YA,[C(Qa)])),o.value?(k(),ht(l,{key:1,show:n.value,"onUpdate:show":a[2]||(a[2]=d=>n.value=d),position:"top",style:{height:"85%"},"close-on-click-overlay":!0,closeable:"","safe-area-inset-top":""},{default:et(()=>[h("div",QA,[a[5]||(a[5]=h("span",{class:"drawer-title"},"📋 右栏内容",-1)),C(r,{name:"cross",size:"20",class:"drawer-close",onClick:a[1]||(a[1]=d=>n.value=!1)})]),h("div",ZA,[C(Qa)])]),_:1},8,["show"])):ae("",!0),o.value?(k(),T("div",eT,[...a[6]||(a[6]=[h("p",null,"💡 电脑端访问可获得完整体验(右栏常驻显示)",-1),h("p",null,'移动端请点上方"右栏"按钮打开内容',-1)])])):ae("",!0)])}}}),nT=rt(tT,[["__scopeId","data-v-3aa64e02"]]);function zc(){return typeof navigator>"u"?!1:/wxwork/i.test(navigator.userAgent)}const sT=[{path:"/",name:"ChatView",component:VA,meta:{title:"智能IT服务",requiresAuth:!0}},{path:"/login",name:"Login",component:()=>Wn(()=>import("./Login-Ban2uodF.js"),__vite__mapDeps([4,5,6])),meta:{title:"登录",requiresAuth:!1}},{path:"/bind",name:"Bind",component:()=>Wn(()=>import("./Bind-DbZwylol.js"),__vite__mapDeps([7,5,2,3,8,9])),meta:{title:"账号绑定",requiresAuth:!1}},{path:"/wework-only",name:"WeworkOnly",component:()=>Wn(()=>import("./WeworkOnly-DlOPARYF.js"),__vite__mapDeps([10,11])),meta:{title:"请在企业微信中打开",requiresAuth:!1}},{path:"/emergency",name:"EmergencyDispatcher",component:KA,meta:{title:"应急身份检测",requiresAuth:!1}},{path:"/h5-preview",name:"H5Preview",component:nT,meta:{title:"员工自助",requiresAuth:!1}},{path:"/automation/:id",name:"AutomationProgress",component:()=>Wn(()=>import("./AutomationProgress-_PB2TTYZ.js"),__vite__mapDeps([12,1,2,13,9])),meta:{title:"自动化处置",requiresAuth:!0}},{path:"/intro",name:"VideoIntro",component:()=>Wn(()=>import("./VideoIntro-DEkPtX2w.js"),__vite__mapDeps([14,15])),meta:{title:"智能IT服务",requiresAuth:!1}},{path:"/:pathMatch(.*)*",redirect:"/"}],Zf=Wy({history:Cy("/h5/"),routes:sT});Zf.beforeEach(async(e,t,n)=>{const s=/^localhost(:\d+)?$/.test(window.location.hostname)||window.location.hostname==="127.0.0.1";if(e.name==="WeworkOnly"||e.name==="Bind"||e.name==="EmergencyDispatcher"||e.name==="H5Preview"||e.name==="VideoIntro"){n();return}if(e.name==="Login"){if(!s&&!zc()){n({name:"WeworkOnly"});return}n();return}const o=new URLSearchParams(window.location.search),i=e.query.token||o.get("token");if(i){localStorage.setItem("h5_token",i),o.delete("token");const c=o.toString(),u=c?`${window.location.pathname}?${c}`:window.location.pathname;window.history.replaceState({},"",u)}const{useEmployeeStore:a}=await Wn(async()=>{const{useEmployeeStore:c}=await Promise.resolve().then(()=>n0);return{useEmployeeStore:c}},void 0),r=a();if(i){r.$patch({token:i});try{await r.fetchEmployeeInfo()}catch(c){console.warn("[Router] Portal token 验证失败:",c)}}if(!s&&!zc()){if(r.isAuthenticated){n();return}n({name:"WeworkOnly"});return}const l=e.query.invite||new URLSearchParams(window.location.search).get("invite");if(l&&localStorage.setItem("h5_video_intro_watched_v2","1"),!l&&e.name!=="VideoIntro"&&!localStorage.getItem("h5_video_intro_watched_v2")&&!(e.query.code||new URLSearchParams(window.location.search).get("code"))){n({name:"VideoIntro"});return}const d=e.query.code||new URLSearchParams(window.location.search).get("code");if(d){try{await r.handleOAuthCallback(d);const c=new URLSearchParams(window.location.search);c.delete("code"),c.delete("state");const u=c.toString(),f=u?`${window.location.pathname}?${u}`:window.location.pathname;window.history.replaceState({},"",f);const p=sessionStorage.getItem("h5_invite_conv_id");if(p){const _=sessionStorage.getItem("h5_invite_eid")||"";sessionStorage.removeItem("h5_invite_conv_id"),sessionStorage.removeItem("h5_invite_eid");const g={invite:p};_&&(g.eid=_),n({path:e.path,query:g});return}n()}catch(c){console.error("[Router] OAuth2 授权失败:",c),r.redirectToOAuth()}return}if(r.isAuthenticated){n();return}r.redirectToOAuth()});const Vr=_d(Mv);Vr.use(Rv());Vr.use(Zf);const oT=Date.now(),Hc=500;Vr.mount("#app");const Wc=Date.now()-oT;Wc>=Hc?document.body.classList.add("app-loaded"):setTimeout(()=>{document.body.classList.add("app-loaded")},Hc-Wc);export{pg as $,p_ as A,Ld as B,Rg as C,lT as D,tf as E,Tr as F,wv as G,kv as H,ft as I,v_ as J,vv as K,xo as L,gv as M,Gg as N,K_ as O,Ts as P,Kg as Q,Sv as R,Tv as S,Cg as T,rT as U,ng as V,ig as W,Eg as X,ug as Y,Qg as Z,Vg as _,Fl as a,ns as a$,g_ as a0,qe as a1,rt as a2,k as a3,T as a4,zh as a5,we as a6,He as a7,C as a8,ye as a9,Eo as aA,Qn as aB,tv as aC,Je as aD,ef as aE,xr as aF,De as aG,Wt as aH,ks as aI,xs as aJ,tt as aK,F as aL,yn as aM,iT as aN,at as aO,it as aP,qd as aQ,Ws as aR,ho as aS,bn as aT,Gd as aU,u_ as aV,Od as aW,aT as aX,Ad as aY,Sr as aZ,Ri as a_,$t as aa,Vl as ab,r_ as ac,We as ad,Qe as ae,Ef as af,kt as ag,ot as ah,Nn as ai,h as aj,et as ak,Le as al,ae as am,M as an,q as ao,Sf as ap,ht as aq,_t as ar,Pe as as,Zt as at,vr as au,l_ as av,wn as aw,Ut as ax,Ae as ay,xd as az,Zn as b,rn as b0,Jt as b1,Co as b2,Ir as b3,Re as b4,Ge as b5,av as c,rv as d,e_ as e,og as f,rg as g,bg as h,xg as i,ev as j,M_ as k,d_ as l,m_ as m,B_ as n,Ag as o,ov as p,Gl as q,b_ as r,xe as s,fv as t,cv as u,Lg as v,k_ as w,O_ as x,H_ as y,G_ as z};