import{l as e,g as t,a6 as o,_ as n,k as a,r as i,w as r,E as s,n as l,y as u,a7 as c,o as d,z as v,b as p,c as _,d as m,e as f,B as g,F as h,A as y,C as w,D as k,f as A,H as x}from"./index-4cb6f38c.js";import{h as b}from"./moment-6961f857.js";import{e as S,E as T,a as I}from"./emoEnergyConverter-30c0a2be.js";import{m as D}from"./marketTemperature-7871708f.js";import{u as P}from"./chat-5d3bc291.js";import{m as L}from"./marked.esm-cf4f21f5.js";import{u as E}from"./userPessionCode-376974ca.js";var O,C="/aixiaocaishen/static/images/思考-36f0ab2d.gif",M="/aixiaocaishen/static/images/解析-09c80e32.gif",H="/aixiaocaishen/static/images/生成-34d79152.gif",R={}; /*! * howler.js v2.2.4 * howlerjs.com * * (c) 2013-2020, James Simpson of GoldFire Studios * goldfirestudios.com * * MIT License */ O=R,function(){var t=function(){this.init()};t.prototype={init:function(){var e=this||o;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||o;if(e=parseFloat(e),t.ctx||c(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,o.ctx.currentTime);for(var n=0;n=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,c()),e},codecs:function(e){return(this||o)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||o;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{(new Audio).muted&&(e.noAudio=!0)}catch(t){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||o,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(c){return e}if(!t||"function"!=typeof t.canPlayType)return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),a=e._navigator?e._navigator.userAgent:"",i=a.match(/OPR\/(\d+)/g),r=i&&parseInt(i[0].split("/")[1],10)<33,s=-1!==a.indexOf("Safari")&&-1===a.indexOf("Chrome"),l=a.match(/Version\/(.*?) /),u=s&&l&&parseInt(l[1],10)<15;return e._codecs={mp3:!(r||!n&&!t.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(u||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(u||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||o;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(o){for(;e._html5AudioPool.length0?s._seek:n._sprite[e][0]/1e3),c=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-u),d=1e3*c/Math.abs(s._rate),v=n._sprite[e][0]/1e3,p=(n._sprite[e][0]+n._sprite[e][1])/1e3;s._sprite=e,s._ended=!1;var _=function(){s._paused=!1,s._seek=u,s._start=v,s._stop=p,s._loop=!(!s._loop&&!n._sprite[e][2])};if(!(u>=p)){var m=s._node;if(n._webAudio){var f=function(){n._playLock=!1,_(),n._refreshBuffer(s);var e=s._muted||n._muted?0:s._volume;m.gain.setValueAtTime(e,o.ctx.currentTime),s._playStart=o.ctx.currentTime,void 0===m.bufferSource.start?s._loop?m.bufferSource.noteGrainOn(0,u,86400):m.bufferSource.noteGrainOn(0,u,c):s._loop?m.bufferSource.start(0,u,86400):m.bufferSource.start(0,u,c),d!==1/0&&(n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),d)),t||setTimeout((function(){n._emit("play",s._id),n._loadQueue()}),0)};"running"===o.state&&"interrupted"!==o.ctx.state?f():(n._playLock=!0,n.once("resume",f),n._clearTimer(s._id))}else{var g=function(){m.currentTime=u,m.muted=s._muted||n._muted||o._muted||m.muted,m.volume=s._volume*o.volume(),m.playbackRate=s._rate;try{var a=m.play();if(a&&"undefined"!=typeof Promise&&(a instanceof Promise||"function"==typeof a.then)?(n._playLock=!0,_(),a.then((function(){n._playLock=!1,m._unlocked=!0,t?n._loadQueue():n._emit("play",s._id)})).catch((function(){n._playLock=!1,n._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),s._ended=!0,s._paused=!0}))):t||(n._playLock=!1,_(),n._emit("play",s._id)),m.playbackRate=s._rate,m.paused)return void n._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||s._loop?n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),d):(n._endTimers[s._id]=function(){n._ended(s),m.removeEventListener("ended",n._endTimers[s._id],!1)},m.addEventListener("ended",n._endTimers[s._id],!1))}catch(i){n._emit("playerror",s._id,i)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===m.src&&(m.src=n._src,m.load());var h=window&&window.ejecta||!m.readyState&&o._navigator.isCocoonJS;if(m.readyState>=3||h)g();else{n._playLock=!0,n._state="loading";var y=function(){n._state="loaded",g(),m.removeEventListener(o._canPlayEvent,y,!1)};m.addEventListener(o._canPlayEvent,y,!1),n._clearTimer(s._id)}}return s._id}n._ended(s)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var o=t._getSoundIds(e),n=0;n=0?t=parseInt(i[0],10):e=parseFloat(i[0])}else i.length>=2&&(e=parseFloat(i[0]),t=parseInt(i[1],10));if(!(void 0!==e&&e>=0&&e<=1))return(n=t?a._soundById(t):a._sounds[0])?n._volume:0;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"volume",action:function(){a.volume.apply(a,i)}}),a;void 0===t&&(a._volume=e),t=a._getSoundIds(t);for(var l=0;l0?n/u:n),d=Date.now();e._fadeTo=o,e._interval=setInterval((function(){var a=(Date.now()-d)/n;d=Date.now(),s+=l*a,s=Math.round(100*s)/100,s=l<0?Math.max(o,s):Math.min(o,s),r._webAudio?e._volume=s:r.volume(s,e._id,!0),i&&(r._volume=s),(ot&&s>=o)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,r.volume(o,e._id),r._emit("fade",e._id))}),c)},_stopFade:function(e){var t=this,n=t._soundById(e);return n&&n._interval&&(t._webAudio&&n._node.gain.cancelScheduledValues(o.ctx.currentTime),clearInterval(n._interval),n._interval=null,t.volume(n._fadeTo,e),n._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e,t,o,n=this,a=arguments;if(0===a.length)return n._loop;if(1===a.length){if("boolean"!=typeof a[0])return!!(o=n._soundById(parseInt(a[0],10)))&&o._loop;e=a[0],n._loop=e}else 2===a.length&&(e=a[0],t=parseInt(a[1],10));for(var i=n._getSoundIds(t),r=0;r=0?t=parseInt(i[0],10):e=parseFloat(i[0])}else 2===i.length&&(e=parseFloat(i[0]),t=parseInt(i[1],10));if("number"!=typeof e)return(n=a._soundById(t))?n._rate:a._rate;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"rate",action:function(){a.rate.apply(a,i)}}),a;void 0===t&&(a._rate=e),t=a._getSoundIds(t);for(var l=0;l=0?t=parseInt(a[0],10):n._sounds.length&&(t=n._sounds[0]._id,e=parseFloat(a[0]))}else 2===a.length&&(e=parseFloat(a[0]),t=parseInt(a[1],10));if(void 0===t)return 0;if("number"==typeof e&&("loaded"!==n._state||n._playLock))return n._queue.push({event:"seek",action:function(){n.seek.apply(n,a)}}),n;var s=n._soundById(t);if(s){if(!("number"==typeof e&&e>=0)){if(n._webAudio){var l=n.playing(t)?o.ctx.currentTime-s._playStart:0,u=s._rateSeek?s._rateSeek-s._seek:0;return s._seek+(u+l*Math.abs(s._rate))}return s._node.currentTime}var c=n.playing(t);c&&n.pause(t,!0),s._seek=e,s._ended=!1,n._clearTimer(t),n._webAudio||!s._node||isNaN(s._node.duration)||(s._node.currentTime=e);var d=function(){c&&n.play(t,!0),n._emit("seek",t)};if(c&&!n._webAudio){var v=function(){n._playLock?setTimeout(v,0):d()};setTimeout(v,0)}else d()}return n},playing:function(e){var t=this;if("number"==typeof e){var o=t._soundById(e);return!!o&&!o._paused}for(var n=0;n=0&&o._howls.splice(a,1);var r=!0;for(n=0;n=0){r=!1;break}return i&&r&&delete i[e._src],o.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,o,n){var a=this["_on"+e];return"function"==typeof t&&a.push(n?{id:o,fn:t,once:n}:{id:o,fn:t}),this},off:function(e,t,o){var n=this,a=n["_on"+e],i=0;if("number"==typeof t&&(o=t,t=null),t||o)for(i=0;i=0;i--)a[i].id&&a[i].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,o)}.bind(n,a[i].fn),0),a[i].once&&n.off(e,a[i].fn,a[i].id));return n._loadQueue(e),n},_loadQueue:function(e){var t=this;if(t._queue.length>0){var o=t._queue[0];o.event===e&&(t._queue.shift(),t._loadQueue()),e||o.action()}return t},_ended:function(e){var t=this,n=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;n--){if(o<=t)return;e._sounds[n]._ended&&(e._webAudio&&e._sounds[n]._node&&e._sounds[n]._node.disconnect(0),e._sounds.splice(n,1),o--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],o=0;o=0;if(!e.bufferSource)return this;if(o._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),t))try{e.bufferSource.buffer=o._scratchBuffer}catch(n){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(o._navigator&&o._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var a=function(e){this._parent=e,this.init()};a.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++o._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,n=o._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=void 0===o.ctx.createGain?o.ctx.createGainNode():o.ctx.createGain(),e._node.gain.setValueAtTime(n,o.ctx.currentTime),e._node.paused=!0,e._node.connect(o.masterGain)):o.noAudio||(e._node=o._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(o._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=t._src,e._node.preload=!0===t._preload?"auto":t._preload,e._node.volume=n*o.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++o._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(o._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(10*e._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var i={},r=function(e){var t=e._src;if(i[t])return e._duration=i[t].duration,void u(e);if(/^data:[^;]+;base64,/.test(t)){for(var o=atob(t.split(",")[1]),n=new Uint8Array(o.length),a=0;a0?(i[t._src]=e,u(t,e)):n()};"undefined"!=typeof Promise&&1===o.ctx.decodeAudioData.length?o.ctx.decodeAudioData(e).then(a).catch(n):o.ctx.decodeAudioData(e,a,n)},u=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},c=function(){if(o.usingWebAudio){try{"undefined"!=typeof AudioContext?o.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?o.ctx=new webkitAudioContext:o.usingWebAudio=!1}catch(i){o.usingWebAudio=!1}o.ctx||(o.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(o._navigator&&o._navigator.platform),t=o._navigator&&o._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var a=/safari/.test(o._navigator&&o._navigator.userAgent.toLowerCase());o._navigator&&!a&&(o.usingWebAudio=!1)}o.usingWebAudio&&(o.masterGain=void 0===o.ctx.createGain?o.ctx.createGainNode():o.ctx.createGain(),o.masterGain.gain.setValueAtTime(o._muted?0:o._volume,o.ctx.currentTime),o.masterGain.connect(o.ctx.destination)),o._setup()}};O.Howler=o,O.Howl=n,void 0!==e?(e.HowlerGlobal=t,e.Howler=o,e.Howl=n,e.Sound=a):"undefined"!=typeof window&&(window.HowlerGlobal=t,window.Howler=o,window.Howl=n,window.Sound=a)}(), /*! * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. * * howler.js v2.2.4 * howlerjs.com * * (c) 2013-2020, James Simpson of GoldFire Studios * goldfirestudios.com * * MIT License */ function(){var e;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var o=t._howls.length-1;o>=0;o--)t._howls[o].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,o){var n=this;return n.ctx&&n.ctx.listener?(t="number"!=typeof t?n._pos[1]:t,o="number"!=typeof o?n._pos[2]:o,"number"!=typeof e?n._pos:(n._pos=[e,t,o],void 0!==n.ctx.listener.positionX?(n.ctx.listener.positionX.setTargetAtTime(n._pos[0],Howler.ctx.currentTime,.1),n.ctx.listener.positionY.setTargetAtTime(n._pos[1],Howler.ctx.currentTime,.1),n.ctx.listener.positionZ.setTargetAtTime(n._pos[2],Howler.ctx.currentTime,.1)):n.ctx.listener.setPosition(n._pos[0],n._pos[1],n._pos[2]),n)):n},HowlerGlobal.prototype.orientation=function(e,t,o,n,a,i){var r=this;if(!r.ctx||!r.ctx.listener)return r;var s=r._orientation;return t="number"!=typeof t?s[1]:t,o="number"!=typeof o?s[2]:o,n="number"!=typeof n?s[3]:n,a="number"!=typeof a?s[4]:a,i="number"!=typeof i?s[5]:i,"number"!=typeof e?s:(r._orientation=[e,t,o,n,a,i],void 0!==r.ctx.listener.forwardX?(r.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),r.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),r.ctx.listener.forwardZ.setTargetAtTime(o,Howler.ctx.currentTime,.1),r.ctx.listener.upX.setTargetAtTime(n,Howler.ctx.currentTime,.1),r.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),r.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):r.ctx.listener.setOrientation(e,t,o,n,a,i),r)},Howl.prototype.init=(e=Howl.prototype.init,function(t){var o=this;return o._orientation=t.orientation||[1,0,0],o._stereo=t.stereo||null,o._pos=t.pos||null,o._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},o._onstereo=t.onstereo?[{fn:t.onstereo}]:[],o._onpos=t.onpos?[{fn:t.onpos}]:[],o._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,o){var n=this;if(!n._webAudio)return n;if("loaded"!==n._state)return n._queue.push({event:"stereo",action:function(){n.stereo(e,o)}}),n;var a=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===o){if("number"!=typeof e)return n._stereo;n._stereo=e,n._pos=[e,0,0]}for(var i=n._getSoundIds(o),r=0;r({soundInstance:null,isPlaying:!1,isVoiceEnabled:!0,playbackPosition:0,lastVoiceState:null,ttsUrl:"",isNewInstance:!1,nowSound:"",currentAudioUrl:"",isPaused:!1,duration:0}),actions:{setAudioInstance(e){this.soundInstance=e},play(){!this.soundInstance&&this.currentAudioUrl&&this.createAudioInstance(this.currentAudioUrl),this.soundInstance&&(this.isPaused&&this.playbackPosition>0&&this.soundInstance.seek(this.playbackPosition),this.soundInstance.play(),this.isPlaying=!0,this.isPaused=!1)},pause(){this.soundInstance&&this.isPlaying&&(this.playbackPosition=this.soundInstance.seek()||0,this.soundInstance.pause(),this.isPlaying=!1,this.isPaused=!0)},stop(){this.soundInstance&&(this.soundInstance.stop(),this.isPlaying=!1,this.isPaused=!1,this.playbackPosition=0)},togglePlayPause(){this.isPlaying?this.pause():this.play()},setCurrentAudioUrl(e){this.currentAudioUrl!==e&&(this.stop(),this.currentAudioUrl=e,this.playbackPosition=0,this.isPaused=!1)},toggleVoice(){this.isVoiceEnabled=!this.isVoiceEnabled,this.isVoiceEnabled||this.stop()},resetAudioState(){this.stop(),this.currentAudioUrl="",this.ttsUrl="",this.soundInstance=null,this.nowSound=""},createAudioInstance(e){this.soundInstance&&this.soundInstance.stop();const t=new R.Howl({src:[e],html5:!0,format:["mp3","wav"],onplay:()=>{this.isPlaying=!0,console.log("音频开始播放")},onend:()=>{this.isPlaying=!1,this.isPaused=!1,this.playbackPosition=0,console.log("音频播放结束")},onstop:()=>{this.isPlaying=!1,console.log("音频播放停止")},onpause:()=>{this.isPlaying=!1,console.log("音频播放暂停")},onerror:e=>{this.isPlaying=!1,console.error("音频播放错误:",e)},onload:()=>{this.duration=t.duration(),console.log("音频加载完成,时长:",this.duration)}});this.soundInstance=t,this.nowSound=t}}});const G="https://hwjb.homilychart.com",Q=function(e){return o({url:`${G}/api/workflow/aiGodSecond`,method:"post",data:{language:"cn",parentId:e.parentId,recordId:e.recordId,stockId:e.stockId,token:localStorage.getItem("localToken")}})},X=t("emotion",{state:()=>({history:[],stockList:[],activeStockIndex:0,conversations:[]}),persist:{key:"emotion-store",storage:sessionStorage,paths:["history","stockList","activeStockIndex","conversations"]},getters:{activeStock:e=>e.stockList[e.activeStockIndex]||null,stockCount:e=>e.stockList.length,conversationCount:e=>e.conversations.length,recentConversations:e=>e.conversations.slice(-20)},actions:{addHistory(e){this.history.unshift(e)},clearHistory(){this.history=[]},addStock(e){var t,o;if(!(null==(t=e.stockInfo)?void 0:t.code)||!(null==(o=e.stockInfo)?void 0:o.market)||!e.timestamp)return console.error("股票数据不完整,无法添加:",e),!1;const n=this.generateStockUniqueId(e),a=this.stockList.find((e=>this.generateStockUniqueId(e)===n));if(a){console.log("股票已存在,切换到现有股票:",e.stockInfo.name);const t=this.stockList.indexOf(a);return this.switchStock(t),!1}const i={...e,uniqueId:n};return this.stockList.push(i),this.activeStockIndex=this.stockList.length-1,console.log("成功添加新股票:",e.stockInfo.name,"ID:",n),!0},switchStock(e){e>=0&&e=0&&e=this.stockList.length?this.activeStockIndex=Math.max(0,this.stockList.length-1):this.activeStockIndex>e&&this.activeStockIndex--)},updateStockData(e,t){e>=0&&e=0&&e{this.addConversation(e)}))},clearConversations(){this.conversations=[]},getConversations(){return this.conversations},removeConversation(e){e>=0&&e=0&&eJe.isVoiceEnabled)),et=P();function tt(e){if(!e)return"未知错误";try{L.setOptions({breaks:!0,gfm:!0,sanitize:!1,smartLists:!0,smartypants:!0,xhtml:!1});const t=L(e),o=document.createElement("div");return o.innerHTML=t,o.textContent||o.innerText||e}catch(t){return console.error("处理refuse消息时出错:",t),e}}E();const ot=i([]),nt=i([]),at=i([]),it=i([]),rt=i(null),st=i([]),lt=i(new Set),ut=()=>{vt.value?console.log("正在处理用户消息,跳过对话历史加载"):O.stockList.forEach((e=>{var t;if(!(null==(t=null==e?void 0:e.stockInfo)?void 0:t.code)||!(null==e?void 0:e.timestamp)||!(null==e?void 0:e.queryText))return void console.warn("股票数据不完整,跳过添加:",e);const o=Pt(e);if(o){if(!lt.value.has(o)){st.value.find((t=>"user"===t.sender&&t.text===e.queryText));O.getConversations().find((t=>"user"===t.sender&&t.text===e.queryText)),lt.value.add(o)}}else console.warn("无法生成股票唯一标识,跳过添加:",e)}))};t({handleSendMessage:async function(e,t){if(console.log("发送内容:",e),ht.value=!0,dt.value=!1,!e||!e.trim())return s.warning("输入内容不能为空"),void(t&&"function"==typeof t&&(t(),Lt.value=null));ct.value=!1,vt.value=!0;const n=[...st.value];st.value=[];const a=l({sender:"user",text:e});st.value.push(a),O.addConversation({sender:"user",text:e,timestamp:(new Date).toISOString()});const i=await async function(e=null){const t=l({sender:"ai",text:"AI情绪大模型正在思考",gif:C,flag:!0});st.value.push(t),await new Promise((e=>setTimeout(e,1500))),st.value.pop();const o=l({sender:"ai",text:"正在解析关键数据",gif:M,flag:!0});if(st.value.push(o),!e)return o;await new Promise((e=>setTimeout(e,1500))),st.value.pop();const n=l({sender:"ai",text:`正在生成${e}量子四维矩阵图`,gif:H,flag:!0});st.value.push(n),await new Promise((e=>setTimeout(e,1500))),st.value.pop();const a=l({sender:"ai",text:"报告已生成!"});return st.value.push(a),await new Promise((e=>setTimeout(e,1500))),st.value.pop(),null}();let r=null;try{const s=await(c={token:localStorage.getItem("localToken"),language:"cn",marketList:"hk,cn,usa,my,sg,vi,in,gb",content:a.text},o({url:`${G}/api/workflow/aiGodFirst`,method:"post",data:{token:localStorage.getItem("localToken"),language:"cn",marketList:"hk,cn,usa,my,sg,vi,in,gb",content:c.content}})),v=s.data;if(console.log("第一个接口返回的完整数据:",v),400===s.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=s.msg||"用户输入内容不合法,请重新输入",o=l({sender:"ai",text:tt(e)});return st.value.push(o),O.addConversation({sender:"ai",text:tt(e),timestamp:(new Date).toISOString()}),vt.value=!1,st.value=[...n,...st.value],u((()=>{fo()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(406===s.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=tt(s.msg||"您的使用次数已用完,请联系客服或购买服务包").replace(/获取token次数/g,'获取token次数'),o=l({sender:"ai",text:e,isHtml:!0});return st.value.push(o),O.addConversation({sender:"ai",text:e,isHtml:!0,timestamp:(new Date).toISOString()}),vt.value=!1,st.value=[...n,...st.value],u((()=>{fo()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(200!==s.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=s.msg||"系统异常,请稍后再试",o=l({sender:"ai",text:tt(e)});return st.value.push(o),O.addConversation({sender:"ai",text:tt(e),timestamp:(new Date).toISOString()}),vt.value=!1,st.value=[...n,...st.value],u((()=>{fo()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(!v||!v.market||!v.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=s&&s.msg?s.msg:"系统正在为您努力加载中,请稍后再试",o=l({sender:"ai",text:tt(e)});return st.value.push(o),O.addConversation({sender:"ai",text:tt(e),timestamp:(new Date).toISOString()}),vt.value=!1,st.value=[...n,...st.value],u((()=>{fo()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}i&&v.name&&(r=await async function(e,t){if(!e||!t)return;await new Promise((e=>setTimeout(e,1500)));const o=st.value.indexOf(e);o>-1&&st.value.splice(o,1);const n=l({sender:"ai",text:`正在生成${t}量子四维矩阵图`,gif:H,flag:!0});return st.value.push(n),n}(i,v.name)),ct.value=!1;const p={recordId:v.recordId,parentId:v.parentId,stockId:v.stockId,token:localStorage.getItem("localToken"),language:"cn"};console.log("第二个接口参数:",p);const _=`${v.code}_${v.market}_${(new Date).toISOString()}`,m=!bt.value.has(_);m&&ht.value?(console.log("预设股票为打字机模式:",v.name),St.value.set(_,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.set(_,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1})):(console.log("预设股票为完整显示模式:",v.name),St.value.delete(_),Tt.value.delete(_),m&&(bt.value.set(_,!0),It.value.set(_,!0)));const[f,g]=await Promise.all([Q(p),ao(v.code,v.market,v.name||"未知股票",e.trim(),v.stockId,_)]),h=f;if(h&&200!==h.code){if(r){const e=st.value.indexOf(r);e>-1&&st.value.splice(e,1)}const e=h.msg||"系统正在为您努力加载中,请稍后再试",o=l({sender:"ai",text:e});return st.value.push(o),vt.value=!1,st.value=[...n,...st.value],void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(!(h&&h.data&&g)){if(r){const e=st.value.indexOf(r);e>-1&&st.value.splice(e,1)}if(!h||!h.data){const e=l({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});st.value.push(e)}return vt.value=!1,st.value=[...n,...st.value],ct.value&&O.activeStock&&O.activeStock.apiData&&u((()=>{so(O.activeStock.apiData),console.log("搜索失败,恢复显示之前股票的图表:",O.activeStock.stockInfo.name)})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}r&&await async function(e){if(!e)return;await new Promise((e=>setTimeout(e,1500)));const t=st.value.indexOf(e);t>-1&&st.value.splice(t,1);const o=l({sender:"ai",text:"报告已生成!"});st.value.push(o),await new Promise((e=>setTimeout(e,1500))),st.value.pop()}(r),pt.value=h.data,console.log("第二个接口返回的完整数据结构:",h.data),O.updateActiveStockConclusion(h.data);Pt(v)&&u((()=>{console.log("数据加载完成,股票状态准备就绪:",v.name,"isReady:",jt(v))})),ct.value=!0,u((()=>{st.value=[],lt.value.clear(),yt.value=!1,fo()}));try{await et.getUserCount(),console.log("数据获取成功后,用户次数已更新")}catch(d){console.error("更新用户次数失败:",d)}try{et.searchRecord=!0,console.log("getConclusionAPI成功后,已触发历史记录更新")}catch(d){console.error("触发历史记录更新失败:",d)}u((()=>{if(Bt.value&&Bt.value.apiData){if(so(Bt.value.apiData),ht.value&&Ft.value&&Et.value){const e=Pt(Bt.value);e&&!bt.value.has(e)?(It.value.has(e)?Zt(Ft.value,e,t):(It.value.set(e,!0),oo(Ft.value,!0,t)),bt.value.set(e,!0)):t&&"function"==typeof t&&(t(),Lt.value=null)}ht.value=!1}}))}catch(d){if(r){const e=st.value.indexOf(r);e>-1&&st.value.splice(e,1)}return O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,fo()})),console.log("请求工作流接口失败,但恢复显示之前的股票数据"),u((()=>{so(O.activeStock.apiData),console.log("立即恢复显示之前股票的图表:",O.activeStock.stockInfo.name)}))):ct.value=!1,vt.value=!1,st.value=[...n,...st.value],ct.value&&O.activeStock&&O.activeStock.apiData&&u((()=>{so(O.activeStock.apiData),console.log("请求失败,恢复显示之前股票的图表:",O.activeStock.stockInfo.name)})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}finally{vt.value&&(vt.value=!1)}var c},clearConversations:()=>{st.value=[],O.clearConversations(),lt.value.clear()},addStock:e=>{if(console.log("AiEmotion组件接收到股票数据:",e),!e||!e.stockInfo||!e.stockInfo.code)return console.error("addStock: 股票数据不完整",e),void yo("enableInput");if(dt.value=!0,ht.value=!1,yt.value=!1,ct.value=!1,O.clearAllStocks(),O.clearConversations(),st.value=[],lt.value.clear(),no(),Et.value="",Je.resetAudioState(),$t(),mt.value=!1,ft.value=!1,bt.value.clear(),It.value.clear(),At.value={marketTemperature:!1,emotionDecod:!1,emotionalBottomRadar:!1,emoEnergyConverter:!1},O.addStock(e),ct.value=!0,e.conclusionData){const t=Pt(e);t&&(bt.value.set(t,!0),It.value.set(t,!0)),console.log("历史记录股票已标记为已显示")}u((()=>{yo("enableInput")}))}});const ct=i(!1),dt=i(!1),vt=i(!1);i(1);const pt=i("");i(!1),i(0),i([]);const _t=i(null),mt=i(!1),ft=i(!1),gt=i(null),ht=i(!1),yt=i(!1),wt=i(!1),kt=i(null),At=i({marketTemperature:!0,emotionDecod:!0,emotionalBottomRadar:!0,emoEnergyConverter:!0}),xt=i([]),bt=i(new Map),St=i(new Map),Tt=i(new Map),It=i(new Map),Dt=i(new Map),Pt=e=>{var t,o;if(!e||"object"!=typeof e)return console.warn("getStockUniqueId: 无效的股票对象"),null;if(e.uniqueId)return e.uniqueId;const n=(null==(t=e.stockInfo)?void 0:t.code)||(null==(o=e.stockInfo)?void 0:o.symbol),a=e.timestamp;return n&&a?`${n}_${a}`:(console.warn("getStockUniqueId: 缺少必要字段",{stockCode:n,timestamp:a}),null)},Lt=i(null),Et=i(""),Ot=i(!1),Ct=e=>{const t=Pt(e);return t?Dt.value.get(t)||{isPlaying:!1,isPaused:!1}:(console.warn("getStockAudioState: 无法获取股票唯一标识"),{isPlaying:!1,isPaused:!1})},Mt=(e,t)=>{const o=Pt(e);o?t&&"object"==typeof t?Dt.value.set(o,{...t}):console.warn("setStockAudioState: 无效的状态对象"):console.warn("setStockAudioState: 无法获取股票唯一标识")},Ht=()=>{for(const[e,t]of Dt.value.entries())Dt.value.set(e,{isPlaying:!1,isPaused:!1})},Rt=i(!1),Bt=a((()=>O.activeStock));a((()=>{var e;return(null==(e=Bt.value)?void 0:e.stockInfo.name)||""})),a((()=>{var e,t;return(null==(e=Bt.value)?void 0:e.stockInfo.code)||(null==(t=Bt.value)?void 0:t.stockInfo.symbol)||""})),a((()=>Bt.value?Pt(Bt.value):"")),a((()=>{var e,t;if(!(null==(e=Bt.value)?void 0:e.apiData))return"";const o=null==(t=Bt.value.apiData.GSWDJ)?void 0:t.at(-1);if(!o||!o[0])return"";const n=o[0],a=n.match(/(\d{4})[\-\/](\d{1,2})[\-\/](\d{1,2})/);if(a){const[,e,t,o]=a;return`更新时间:${o.padStart(2,"0")}/${t.padStart(2,"0")}/${e}`}return n})),a((()=>{var e,t;if(!(null==(e=Bt.value)?void 0:e.apiData))return null;const o=null==(t=Bt.value.apiData.GSWDJ)?void 0:t.at(-1);return o?Math.round(o[1]):null})),a((()=>{var e,t;if(!(null==(e=Bt.value)?void 0:e.apiData))return null;const o=null==(t=Bt.value.apiData.GSWDJ)?void 0:t.at(-1);return o?Math.round(o[2]):null}));const Vt=a((()=>{var e;return(null==(e=Bt.value)?void 0:e.conclusionData)||""})),Ft=a((()=>{if(!Vt.value)return null;if("object"==typeof Vt.value)return Vt.value;try{return JSON.parse(Vt.value)}catch(e){return console.error("解析结论数据失败:",e),null}})),Gt=a((()=>O.stockList.filter((e=>{var t;return(null==(t=e.stockInfo)?void 0:t.name)&&e.apiData&&e.queryText})).sort(((e,t)=>new Date(e.timestamp)-new Date(t.timestamp))))),Qt=e=>{var t;if(!(null==e?void 0:e.apiData))return"";const o=null==(t=e.apiData.GSWDJ)?void 0:t.at(-1);if(!o||!o[0])return"";const n=o[0],a=n.match(/(\d{4})[\-\/](\d{1,2})[\-\/](\d{1,2})/);if(a){const[,e,t,o]=a;return`更新时间:${o.padStart(2,"0")}/${t.padStart(2,"0")}/${e}`}return n},Xt=e=>{var t;if(!(null==e?void 0:e.apiData))return null;const o=null==(t=e.apiData.GSWDJ)?void 0:t.at(-1);return o?Math.round(o[1]):null},qt=e=>{var t;if(!(null==e?void 0:e.apiData))return null;const o=null==(t=e.apiData.GSWDJ)?void 0:t.at(-1);return o?Math.round(o[2]):null},Nt=e=>{if(!(null==e?void 0:e.conclusionData))return null;if("object"==typeof e.conclusionData)return e.conclusionData;try{return JSON.parse(e.conclusionData)}catch(t){return console.error("解析股票结论数据失败:",t),null}},Wt=e=>{const t=Pt(e);if(!t)return console.warn("getStockTypewriterTexts: 无法获取股票唯一标识"),null;return St.value.get(t)||null},Ut=e=>{const t=Pt(e);return t?Tt.value.get(t)||null:(console.warn("getStockTypewriterVisibility: 无法获取股票唯一标识"),null)},jt=e=>{const t=Pt(e);if(!t)return!1;if(!Nt(e))return!1;return!!bt.value.has(t)||!ht.value||(St.value.has(t)||St.value.set(t,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.has(t)||Tt.value.set(t,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1}),!0)};function Zt(e,t,o){if(!t&&O.activeStock&&(t=Pt(O.activeStock)),!t)return void console.warn("无法确定股票ID,跳过打字机效果");console.log("开始打字机效果,结论数据:",e,"股票ID:",t),Lt.value=o,console.log("L1字段 - one1:",e.one1),console.log("L1字段 - one2:",e.one2),console.log("L2字段 - two:",e.two),console.log("L3字段 - three:",e.three),console.log("L4字段 - four:",e.four),xt.value.forEach((e=>clearTimeout(e))),xt.value=[],St.value.has(t)||St.value.set(t,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.has(t)||Tt.value.set(t,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1}),St.value.set(t,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.set(t,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1});let n=0;[{key:"one",title:"L1: 情绪监控",contents:[{key:"one1",text:e.one1},{key:"one2",text:e.one2}]},{key:"two",title:"L2: 情绪解码",contents:[{key:"two",text:e.two}]},{key:"three",title:"L3: 情绪推演",contents:[{key:"three",text:e.three}]},{key:"four",title:"L4: 情绪套利",contents:[{key:"four",text:e.four}]}].forEach((e=>{const o=e.contents.some((e=>e.text&&e.text.trim()));if(console.log(`模块 ${e.key} 是否有内容:`,o,"内容:",e.contents.map((e=>e.text))),!o)return;console.log(`开始显示模块 ${e.key}`);const a=setTimeout((()=>{const o=Tt.value.get(t);o&&(o[e.key]=!0,Tt.value.set(t,{...o}))}),n);xt.value.push(a),n+=100,e.contents.forEach((e=>{if(e.text&&e.text.trim()){for(let o=0;o<=e.text.length;o++){const a=setTimeout((()=>{const n=St.value.get(t);n&&(n[e.key]=e.text.substring(0,o),St.value.set(t,{...n}))}),n+200*o);xt.value.push(a)}n+=200*e.text.length+200}})),n+=800}));const a="该内容由AI生成,请注意甄别",i=setTimeout((()=>{const e=Tt.value.get(t);e&&(e.disclaimer=!0,Tt.value.set(t,{...e}))}),n);xt.value.push(i),n+=100;for(let r=0;r<=a.length;r++){const e=setTimeout((()=>{const e=St.value.get(t);e&&(e.disclaimer=a.substring(0,r),St.value.set(t,{...e})),r===a.length&&(console.log("打字机效果完成,调用onComplete回调"),o&&"function"==typeof o&&(o(),Lt.value=null))}),n+200*r);xt.value.push(e)}}function $t(){xt.value.forEach((e=>clearTimeout(e))),xt.value=[]}r((()=>O.stockList),(e=>{0===e.length?(ct.value=!1,no(),Et.value="",Je.resetAudioState(),$t(),mt.value=!1,ft.value=!1,bt.value.clear(),It.value.clear(),lt.value.clear(),At.value={marketTemperature:!1,emotionDecod:!1,emotionalBottomRadar:!1,emoEnergyConverter:!1},console.log("股票列表已清空,页面数据已隐藏")):ut()}),{deep:!0}),r(Bt,(e=>{if(e&&e.apiData){no(),Et.value="",Je.resetAudioState(),$t(),mt.value=!1,ft.value=!1;const o=Pt(e);if(e.conclusionData)try{const t="object"==typeof e.conclusionData?e.conclusionData:JSON.parse(e.conclusionData);if(!(o&&St.value.has(o))){let e=null;t.one1_url?e=t.one1_url.toString().trim().replace(/[`\s]/g,""):t.one2_url?e=t.one2_url.toString().trim().replace(/[`\s]/g,""):t.two_url?e=t.two_url.toString().trim().replace(/[`\s]/g,""):t.three_url?e=t.three_url.toString().trim().replace(/[`\s]/g,""):t.four_url?e=t.four_url.toString().trim().replace(/[`\s]/g,""):t.url?e=t.url.toString().trim().replace(/[`\s]/g,""):t.audioUrl?e=t.audioUrl.toString().trim().replace(/[`\s]/g,""):t.voice_url?e=t.voice_url.toString().trim().replace(/[`\s]/g,""):t.audio?e=t.audio.toString().trim().replace(/[`\s]/g,""):t.tts_url&&(e=t.tts_url.toString().trim().replace(/[`\s]/g,"")),e&&e.startsWith("http")&&(console.log("切换到已显示股票,准备音频URL但不自动播放:",e),Et.value=e,Je.setCurrentAudioUrl(e))}}catch(t){console.error("解析股票结论数据失败:",t)}else Et.value="",Je.resetAudioState(),console.log("当前股票没有结论数据,已清空音频");ct.value?u((()=>{so(e.apiData),console.log("图表数据已准备完成,开始渲染:",e.apiData),setTimeout((()=>{if(_t.value&&_t.value instanceof Element){if(Ft.value){if(o&&bt.value.has(o))return;const e=_t.value.getBoundingClientRect();if(e.top0&&(console.log("股票切换后检测到场景应用部分在视口中"),o))if(bt.value.has(o)){console.log("非第一次股票切换或已触发过,直接显示完整内容");const e=Ft.value;displayedTexts.value={one1:e.one1||"",one2:e.one2||"",two:e.two||"",three:e.three||"",four:e.four||"",disclaimer:"该内容由AI生成,请注意甄别"},displayedTitles.value={one:"L1: 情绪监控",two:"L2: 情绪解码",three:"L3: 情绪推演",four:"L4: 情绪套利"},moduleVisibility.value={one:!(!e.one1&&!e.one2),two:!!e.two,three:!!e.three,four:!!e.four,disclaimer:!0}}else if(ht.value&&Et.value)console.log("用户主动搜索,该股票第一次进入场景应用,开始打字机效果和音频播放"),ft.value=!0,mt.value=!0,It.value.has(o)?Zt(Ft.value,o):(console.log("开始音频播放和打字机效果"),It.value.set(o,!0),oo(Ft.value,!0)),bt.value.set(o,!0);else{if(ht.value&&!Et.value)return void console.log("音频尚未准备好,等待音频加载完成后再触发效果(股票切换后)");console.log("非用户主动搜索,该股票第一次进入场景应用,直接显示完整内容"),Ft.value,bt.value.set(o,!0),It.value.set(o,!0)}}}else console.warn("scenarioApplicationRef.value 不是有效的 DOM 元素,跳过处理")}),500)})):console.log("页面尚未加载完成,等待数据加载完成后再渲染图表")}else console.log("股票数据不存在或API数据未加载"),At.value={marketTemperature:!1,emotionDecod:!1,emotionalBottomRadar:!1,emoEnergyConverter:!1}}),{immediate:!0}),r(Ft,(e=>{if(e){console.log("场景应用结论数据:",e);let t=null;e.one1_url?t=e.one1_url.toString().trim().replace(/[`\s]/g,""):e.one2_url?t=e.one2_url.toString().trim().replace(/[`\s]/g,""):e.two_url?t=e.two_url.toString().trim().replace(/[`\s]/g,""):e.three_url?t=e.three_url.toString().trim().replace(/[`\s]/g,""):e.four_url?t=e.four_url.toString().trim().replace(/[`\s]/g,""):e.url?t=e.url.toString().trim().replace(/[`\s]/g,""):e.audioUrl?t=e.audioUrl.toString().trim().replace(/[`\s]/g,""):e.voice_url?t=e.voice_url.toString().trim().replace(/[`\s]/g,""):e.audio?t=e.audio.toString().trim().replace(/[`\s]/g,""):e.tts_url&&(t=e.tts_url.toString().trim().replace(/[`\s]/g,"")),t&&t.startsWith("http")?(console.log("找到并清理后的语音URL:",t),Et.value=t,Je.setCurrentAudioUrl(t),console.log("音频URL已准备,检查是否需要立即触发效果"),console.log("音频URL已准备完成,等待用户手动触发播放")):(console.log("未找到有效的语音URL,原始URL:",e.url),console.log("结论数据中的所有字段:",Object.keys(e)))}}),{immediate:!0});const Yt=i([]),zt=i(!1);let Jt=0,Kt=!1;const eo={one1_url:1,one2_url:2,two_url:3,three_url:4,four_url:5,url:6,audioUrl:7,voice_url:8,audio:9,tts_url:10},to=()=>{if(console.log("=== playNextAudio 被调用 ==="),console.log("当前队列状态:",{queueLength:Yt.value.length,queueItems:Yt.value.map((e=>e.name)),currentPlayIndex:Jt,isPlayingQueueAudio:zt.value,isCallingPlayNext:Kt,audioStoreIsPlaying:Je.isPlaying}),0===Yt.value.length||zt.value||Kt)return void console.log("❌ 播放条件不满足 - 队列长度:",Yt.value.length,"正在播放:",zt.value,"正在调用:",Kt);Jt>=Yt.value.length&&Yt.value.length>0&&(console.log("🔄 所有音频播放完成,重置索引从第一个开始"),Jt=0,Kt=!1),Kt=!0,zt.value=!0;const e=Yt.value[Jt];console.log(`✅ 开始播放${e.name}音频 (索引:${Jt}),队列总长度:`,Yt.value.length),Je.nowSound&&Je.nowSound.playing()&&Je.nowSound.stop();const t=new R.Howl({src:[e.url],html5:!1,format:["mp3","wav"],onplay:()=>{var t;Ot.value=!0,zt.value=!0,Je.isPlaying=!0,console.log(`开始播放${e.name}音频`);const o=O.activeStock;if(o&&(Mt(o,{isPlaying:!0,isPaused:!1}),console.log("设置当前股票音频状态为播放中:",null==(t=o.stockInfo)?void 0:t.name)),0===Jt&&e.shouldStartTypewriter&&Ft.value&&!Je.isPaused&&0===Je.playbackPosition){console.log("🎬 第一个音频开始播放,同时启动打字机效果");const t=o?Pt(o):null;Zt(Ft.value,t,e.onComplete)}else 0===Jt&&e.shouldStartTypewriter&&console.log("🔄 从暂停状态恢复播放,不重新启动打字机效果")},onpause:()=>{var o;Je.isPlaying=!1,Je.isPaused=!0,t&&t.seek&&(Je.playbackPosition=t.seek()||0),console.log(`${e.name}音频暂停播放,位置:`,Je.playbackPosition);const n=O.activeStock;n&&(Mt(n,{isPlaying:!1,isPaused:!0}),console.log("设置当前股票音频状态为暂停:",null==(o=n.stockInfo)?void 0:o.name))},onresume:()=>{var o;Je.isPlaying=!0,Je.isPaused=!1,Je.playbackPosition>0&&t&&t.seek&&t.seek(Je.playbackPosition),console.log(`${e.name}音频继续播放,位置:`,Je.playbackPosition);const n=O.activeStock;n&&(Mt(n,{isPlaying:!0,isPaused:!1}),console.log("设置当前股票音频状态为播放中:",null==(o=n.stockInfo)?void 0:o.name))},onend:()=>{var t;if(console.log(`${e.name}音频播放完成,准备播放下一个`),Je.isPaused=!1,Je.playbackPosition=0,Jt++,Jt{Kt=!1,zt.value=!1,Je.isPlaying=!0;const e=Yt.value[Jt];e&&e.url&&Je.setCurrentAudioUrl(e.url),to()}),500);else{console.log("🎉 所有音频播放完成"),Je.nowSound=null,Kt=!1,Je.isPlaying=!1,Je.isPaused=!1,Je.playbackPosition=0,Ot.value=!1,zt.value=!1;const o=O.activeStock;o&&(console.log("所有音频播放完成,重置当前股票音频状态:",null==(t=o.stockInfo)?void 0:t.name),Mt(o,{isPlaying:!1,isPaused:!1})),e.onComplete&&"function"==typeof e.onComplete&&(console.log("调用音频播放完成回调"),e.onComplete())}},onstop:()=>{var t;console.log(`${e.name}音频被停止`),Je.isPlaying=!1,Je.isPaused=!1,Je.playbackPosition=0,Ot.value=!1,zt.value=!1;const o=O.activeStock;o&&(console.log("音频被停止,重置当前股票音频状态:",null==(t=o.stockInfo)?void 0:t.name),Mt(o,{isPlaying:!1,isPaused:!1}))},onerror:t=>{console.error(`${e.name}音频播放失败:`,t),Ot.value=!1,zt.value=!1,Kt=!1,setTimeout((()=>{to()}),100)},onload:()=>{Je.duration=t.duration(),console.log(`${e.name}音频加载完成,时长:`,Je.duration)}});Je.setCurrentAudioUrl(e.url),Je.nowSound=t,Je.setAudioInstance(t),console.log(`尝试播放${e.name}音频`),t.play()};function oo(e,t=!1,o=null){var n;if(e)if(console.log("语音功能状态:",Je.isVoiceEnabled),Je.isVoiceEnabled){console.log("开始处理多音频播放...",t?"同时启动打字机效果":"");try{const a="object"==typeof e?e:JSON.parse(e);Yt.value=[],Jt=0,Kt=!1,zt.value=!1;if([{key:"one1_url",name:"one1_url"},{key:"one2_url",name:"one2_url"},{key:"two_url",name:"two_url"},{key:"three_url",name:"three_url"},{key:"four_url",name:"four_url"},{key:"url",name:"url"},{key:"audioUrl",name:"audioUrl"},{key:"voice_url",name:"voice_url"},{key:"audio",name:"audio"},{key:"tts_url",name:"tts_url"}].forEach((e=>{if(a[e.key]){const n=a[e.key].toString().trim().replace(/[`\s]/g,"");n&&n.startsWith("http")&&(console.log(`找到音频URL: ${e.name} = ${n}`),((e,t,o=!1,n=null)=>{if(console.log("=== 添加音频到队列 ==="),console.log("URL:",e),console.log("Name:",t),console.log("是否启动打字机效果:",o),console.log("音频启用状态:",Je.isVoiceEnabled),e&&Je.isVoiceEnabled){const a={url:e,name:t,order:eo[t]||999,shouldStartTypewriter:o,onComplete:n};Yt.value.push(a),Yt.value.sort(((e,t)=>e.order-t.order)),console.log(`音频${t}已添加到播放队列,顺序:${a.order}`),console.log("当前队列顺序:",Yt.value.map((e=>`${e.name}(${e.order})`))),zt.value||Je.isPlaying||1!==Yt.value.length?console.log("⏳ 等待条件:",{isPlayingQueueAudio:zt.value,audioStoreIsPlaying:Je.isPlaying,queueLength:Yt.value.length,reason:Yt.value.length>1?"队列中已有其他音频":"有音频正在播放"}):(console.log("✅ 条件满足:没有音频在播放且这是第一个音频,立即开始播放"),to())}else console.log("❌ 跳过添加音频:",{hasUrl:!!e,voiceEnabled:Je.isVoiceEnabled})})(n,e.name,t&&0===Yt.value.length,o))}})),0===Yt.value.length){if(console.log("未找到有效的音频URL"),t){console.log("没有音频但需要启动打字机效果");const e=O.activeStock,t=e?Pt(e):null;Zt(a,t,o)}}else{console.log(`总共找到 ${Yt.value.length} 个音频,准备播放`);const e=O.activeStock;e&&(console.log("设置当前股票音频状态为播放中:",null==(n=e.stockInfo)?void 0:n.name),Mt(e,{isPlaying:!0,isPaused:!1}))}}catch(a){console.error("处理音频播放失败:",a)}}else console.log("语音功能已关闭,跳过播放");else console.log("没有结论数据,跳过播放")}function no(){Je.nowSound&&Je.nowSound.stop(),Ot.value=!1}async function ao(e,t,o,n,a,i=null){try{const r={stockId:a},s=(await c.post("https://hwjb.homilychart.com/api/workflow/getStockData",r,{headers:{"Content-Type":"application/json"}})).data;if(200===s.code&&s.data){const a=io(s.data);if(!a.isValid){console.log("API返回数据不完整,缺失字段:",a.missingFields),O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,fo()})),console.log("数据验证失败,但恢复显示之前的股票数据"),u((()=>{so(O.activeStock.apiData),console.log("立即恢复显示之前股票的图表:",O.activeStock.stockInfo.name)}))):ct.value=!1;const e=l({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});return st.value.push(e),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()}),!1}const r={queryText:n,stockInfo:{name:o,code:e,market:t},apiData:s.data,conclusionData:pt.value,timestamp:(new Date).toISOString(),uniqueId:i||`${e}_${t}_${(new Date).toISOString()}`};return O.addStock(r),!0}{O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,fo()})),console.log("API请求失败,但恢复显示之前的股票数据"),u((()=>{so(O.activeStock.apiData),console.log("立即恢复显示之前股票的图表:",O.activeStock.stockInfo.name)}))):ct.value=!1;const e=l({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});return st.value.push(e),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()}),!1}}catch(r){O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,fo()})),console.log("网络异常,但恢复显示之前的股票数据"),u((()=>{so(O.activeStock.apiData),console.log("立即恢复显示之前股票的图表:",O.activeStock.stockInfo.name)}))):ct.value=!1;const e=l({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});return st.value.push(e),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()}),!1}}function io(e){const t=["GSWDJ","KLine20","QXJMQ","QXTDLD","WDRL"],o=[];for(const n of t)(!e[n]||Array.isArray(e[n])&&0===e[n].length||"object"==typeof e[n]&&!ro(e[n]))&&o.push(n);return{isValid:0===o.length,missingFields:o}}function ro(e){if(!e||"object"!=typeof e)return!1;for(const t in e)if(e.hasOwnProperty(t)){const o=e[t];if("string"==typeof o){if(""!==o.trim())return!0}else if(Array.isArray(o)){if(o.length>0)return!0}else{if("number"==typeof o&&0!==o)return!0;if("boolean"==typeof o&&!0===o)return!0;if("object"==typeof o&&null!==o&&ro(o))return!0}}return!1}function so(e){console.log("开始渲染图表,数据:",e);const t=JSON.parse(JSON.stringify(e)),o=io(t);if(!o.isValid){console.log("关键数据缺失:",o.missingFields);const e=l({sender:"ai",text:`数据不完整,缺少以下关键数据:${o.missingFields.join("、")}。请稍后重试或联系客服。`});return st.value.push(e),O.addConversation({sender:"ai",text:`数据不完整,缺少以下关键数据:${o.missingFields.join("、")}。请稍后重试或联系客服。`,timestamp:(new Date).toISOString()}),void(ct.value=!1)}At.value={marketTemperature:!!(t.GSWDJ&&t.GSWDJ.length>0),emotionDecod:!!(t.QXJMQ&&t.QXJMQ.length>0),emotionalBottomRadar:!!(t.QXTDLD&&t.QXTDLD.length>0),emoEnergyConverter:!(!t.QXNLZHQ||!(Array.isArray(t.QXNLZHQ)?t.QXNLZHQ.length>0:ro(t.QXNLZHQ)))},console.log("图表显示状态:",At.value),console.log("数据检查:",{GSWDJ:!!(t.GSWDJ&&t.GSWDJ.length>0),QXJMQ:!!(t.QXJMQ&&t.QXJMQ.length>0),QXTDLD:!!(t.QXTDLD&&t.QXTDLD.length>0),QXNLZHQ:!(!t.QXNLZHQ||!(Array.isArray(t.QXNLZHQ)?t.QXNLZHQ.length>0:ro(t.QXNLZHQ)))}),console.log("QXNLZHQ数据详情:",t.QXNLZHQ),u((()=>{setTimeout((()=>{try{console.log("图表组件ref状态:",{marketTemperatureRef:!!ot.value,emotionDecodRef:!!at.value,emotionalBottomRadarRef:!!it.value,emoEnergyConverterRef:!!nt.value}),console.log("DOM元素检查:",{marketTemperatureDOM:!!document.querySelector(".market-temperature-section"),emotionDecodDOM:!!document.querySelector(".emotion-decoder-section"),emotionalBottomRadarDOM:!!document.querySelector(".bottom-radar-section"),emoEnergyConverterDOM:!!document.querySelector(".energy-converter-section")});const e=document.querySelector("emo-energy-converter");console.log("emoEnergyConverter元素:",e),setTimeout((()=>{console.log("延迟检查emoEnergyConverterRef:",!!nt.value),nt.value&&console.log("emoEnergyConverter方法:",typeof nt.value.initQXNLZHEcharts)}),1e3),O.stockList.forEach(((e,t)=>{e.apiData&&async function(e,t=0){console.log(`开始渲染第${t}个股票的图表`);const o=[{name:"股市温度计",ref:ot.value[t],visibility:At.value.marketTemperature,method:"initChart",params:[e.GSWDJ,e.KLine20,e.WDRL]},{name:"情绪解码器",ref:at.value[t],visibility:At.value.emotionDecod,method:"initQXNLZHEcharts",params:[e.KLine20,e.QXJMQ]},{name:"情绪探底雷达",ref:it.value[t],visibility:At.value.emotionalBottomRadar,method:"initEmotionalBottomRadar",params:[e.KLine20,e.QXTDLD]},{name:"情绪能量转化器",ref:nt.value[t],visibility:At.value.emoEnergyConverter,method:"initQXNLZHEcharts",params:[e.KLine20,e.QXNLZHQ]}];for(const a of o)if(a.ref&&a.visibility)if(console.log(`开始渲染第${t}个股票的${a.name}图表`),console.log(`${a.name}Ref方法:`,typeof a.ref[a.method]),"function"==typeof a.ref[a.method])try{const e=0===t?100:300+100*t;await new Promise((t=>setTimeout(t,e))),a.ref[a.method](...a.params),console.log(`第${t}个股票的${a.name}图表渲染成功`),await new Promise((e=>setTimeout(e,800)))}catch(n){console.error(`第${t}个股票的${a.name}图表渲染失败:`,n)}else console.error(`第${t}个股票的${a.name}Ref.${a.method} 方法不存在`);else console.log(`第${t}个股票的${a.name}图表未渲染,ref存在:`,!!a.ref,"数据存在:",a.visibility);console.log(`第${t}个股票的所有图表依次渲染完成`)}(e.apiData,t)})),console.log("图表渲染完成")}catch(e){console.error("图表渲染错误:",e);const t=l({sender:"ai",text:"图表渲染失败,请重试"});st.value.push(t),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()})}}),500)}))}const lo=()=>{wt.value=!0,kt.value&&clearTimeout(kt.value),kt.value=setTimeout((()=>{wt.value=!1,console.log("用户滚动检测:恢复自动滚动")}),2e3)},uo=e=>{lo()},co=e=>{lo()};function vo(){if(!(_t.value&&_t.value instanceof Element))return void console.warn("scenarioApplicationRef.value 不是有效的 DOM 元素,跳过 IntersectionObserver 设置");const e=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){console.log("场景应用部分进入视口");const e=Bt.value?Pt(Bt.value):null;Ft.value&&e&&(bt.value.has(e)?console.log("非第一次进入场景应用或已触发过,直接显示完整内容"):ht.value&&Et.value?(console.log("用户主动搜索,该股票第一次进入场景应用,开始打字机效果和音频播放"),console.log("开始音频播放和打字机效果"),It.value.set(e,!0),oo(Ft.value,!0),bt.value.set(e,!0)):(console.log("非用户主动搜索,该股票第一次进入场景应用,直接显示完整内容"),bt.value.set(e,!0),It.value.set(e,!0)))}}))}),{threshold:.3,rootMargin:"0px 0px -100px 0px"});e.observe(_t.value),gt.value=e}const po=()=>{const e=document.getElementById("top-anchor");e?e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):window.scrollTo({top:0,behavior:"smooth"}),setTimeout((()=>{(window.pageYOffset||document.documentElement.scrollTop)>50&&(document.documentElement.scrollTop=0,document.body.scrollTop=0)}),1e3)},_o=i(null),mo=i(!1),fo=()=>{u((()=>{yo("scrollToBottom")}))},go=()=>{const e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;Rt.value=e>200},ho=()=>{const e=rt.value;if(e){e.scrollTop>200&&(Rt.value=!0)}};d((async()=>{window.handleTokenClick=()=>{yo("showCount")},(()=>{const e=O.getConversations();st.value=e.map((e=>({sender:e.sender,text:e.text,isHtml:e.isHtml||!1})))})(),ut();const e=function(e,t){let o;return function(...n){clearTimeout(o),o=setTimeout((()=>{clearTimeout(o),e(...n)}),t)}}((()=>{console.log("AiEmotion页面:窗口大小变化,触发容器和图表resize");const e=document.querySelector(".main");e&&(e.style.display="none",e.offsetHeight,e.style.display="");const t=[window.emoEnergyConverterResizeHandler,window.marketTempResizeHandler,window.emotionalBottomRadarResizeHandler,window.emotionDecodResizeHandler];t.forEach((e=>{if("function"==typeof e)try{e()}catch(t){console.error("AiEmotion页面:图表resize失败",t)}})),setTimeout((()=>{t.forEach((e=>{if("function"==typeof e)try{e()}catch(t){console.error("AiEmotion页面:延迟图表resize失败",t)}}))}),100)}),150);window.aiEmotionGlobalResizeHandler&&window.removeEventListener("resize",window.aiEmotionGlobalResizeHandler),window.addEventListener("resize",e),window.aiEmotionGlobalResizeHandler=e;const t=rt.value;t&&(t.addEventListener("wheel",uo,{passive:!0}),t.addEventListener("touchmove",co,{passive:!0}),t.addEventListener("scroll",lo,{passive:!0}),t.addEventListener("scroll",ho,{passive:!0})),window.addEventListener("scroll",go,{passive:!0}),document.addEventListener("scroll",go,{passive:!0}),vt.value=!0,setTimeout((()=>{vt.value=!1}),5e3),O.stockList.length>0&&O.activeStock?(console.log("检测到已保存的股票数据,开始恢复页面状态(不自动播放音频)"),ct.value=!0,u((()=>{st.value=[],yt.value=!1})),u((()=>{const e=O.activeStock;if(e&&e.apiData&&(console.log("恢复图表数据:",e.stockInfo.name),so(e.apiData),e.conclusionData)){pt.value=e.conclusionData,pt.value=e.conclusionData;const t=Pt(e);t&&(bt.value.set(t,!0),It.value.set(t,!0))}vo()}))):u((()=>{vo()}))})),v((()=>{$t(),Lt.value&&"function"==typeof Lt.value&&(Lt.value(),Lt.value=null),no(),mt.value=!1,ft.value=!1,mo.value=!1,_o.value&&(_o.value.disconnect(),_o.value.mutationObserver&&(_o.value.mutationObserver.disconnect(),_o.value.mutationObserver=null),_o.value=null),console.log("页面高度监听器已停止"),kt.value&&(clearTimeout(kt.value),kt.value=null),gt.value&&(gt.value.disconnect(),gt.value=null),window.aiEmotionGlobalResizeHandler&&(window.removeEventListener("resize",window.aiEmotionGlobalResizeHandler),window.aiEmotionGlobalResizeHandler=null);const e=rt.value;e&&(e.removeEventListener("wheel",uo),e.removeEventListener("touchmove",co),e.removeEventListener("scroll",lo),e.removeEventListener("scroll",ho)),window.removeEventListener("scroll",go),document.removeEventListener("scroll",go)}));const yo=n;return(e,t)=>(p(),_(h,null,[m(" 顶部锚点 "),t[20]||(t[20]=f("div",{id:"top-anchor",class:"top-anchor"},null,-1)),m(" 主容器:包含对话框和main容器 "),f("div",q,[m(" 对话框区域 "),f("div",{class:"ai-emotion-container",ref_key:"userInputDisplayRef",ref:rt},[m(" 金轮 "),f("div",N,[f("img",{src:"/aixiaocaishen/static/images/金轮-858e9d26.png",class:g(["golden-wheel-img",{"rotating-image":vt.value}]),alt:"金轮图标"},null,2)]),m(" 对话消息显示区域 "),st.value.length>0&&!dt.value?(p(),_("div",W,[f("div",U,[(p(!0),_(h,null,y(st.value,((e,o)=>(p(),_("div",{key:o,class:g(["message-item",{"user-message-item":"user"===e.sender,"ai-message-item":"ai"===e.sender}])},[m(" 用户消息 "),"user"===e.sender?(p(),_("div",j,[f("div",Z,w(e.text),1)])):(p(),_(h,{key:1},[m(" AI消息(包括思考过程) "),f("div",$,[f("div",Y,[e.gif?(p(),_("img",{key:0,src:e.gif,alt:"思考过程",class:"thinking-gif"},null,8,z)):m("v-if",!0),f("div",J,[e.flag?(p(),_("div",K,[f("span",null,w(e.text),1),t[0]||(t[0]=k('......',1))])):(p(),_("div",ee,[e.isHtml?(p(),_("div",{key:0,innerHTML:e.text},null,8,te)):(p(),_("div",oe,w(e.text),1))]))])])])],2112))],2)))),128))])])):m("v-if",!0)],512),m(" 加载提示 "),e.isLoading?(p(),_("div",ne,t[1]||(t[1]=[f("div",{class:"loading-content"},[f("div",{class:"loading-spinner"}),f("div",{class:"loading-text"},"AI情绪大模型正在努力为您加载,请稍候...")],-1)]))):m("v-if",!0),m(" main容器区域 "),m(" 移除股票标签页,改为对话形式展示 "),m(" 渲染整个页面 - 遍历过滤后的股票列表显示所有股票 "),ct.value?(p(!0),_(h,{key:1},y(Gt.value,((e,o)=>{var n;return p(),_("div",{class:"master",key:`stock-${o}-${e.timestamp}`},[m(" 对应股票的消息显示区域 "),f("div",ae,[f("div",ie,[m(" 显示该股票对应的用户输入内容 "),f("div",re,[f("div",se,[f("img",{src:Ke.value&&Ct(e).isPlaying?A(B):A(V),class:g(["user-message-speaker",{"speaker-active":Ke.value&&Ct(e).isPlaying}]),onClick:()=>(e=>{var t,o,n,a;if(Je.isVoiceEnabled){const i=Nt(e),r=Ct(e),s=Je.isPlaying||r.isPlaying;r.isPlaying?(console.log("暂停当前股票音频:",null==(t=e.stockInfo)?void 0:t.name),Je.nowSound&&Je.nowSound.playing()&&(Je.nowSound.pause(),Je.isPaused=!0,Je.isPlaying=!1),Mt(e,{isPlaying:!1,isPaused:!0})):r.isPaused?(console.log("继续播放当前股票音频:",null==(o=e.stockInfo)?void 0:o.name),Je.nowSound&&(Je.playbackPosition>0&&Je.nowSound.seek(Je.playbackPosition),Je.nowSound.play(),Je.isPaused=!1,Je.isPlaying=!0),Mt(e,{isPlaying:!0,isPaused:!1})):(s&&(console.log("停止其他正在播放的音频,准备播放新音频:",null==(n=e.stockInfo)?void 0:n.name),no(),Je.resetAudioState()),Ht(),i&&(i.one1_url||i.two_url||i.three_url||i.four_url)?(console.log("开始播放股票音频:",null==(a=e.stockInfo)?void 0:a.name),Mt(e,{isPlaying:!0,isPaused:!1}),oo(i,!1,(()=>{Mt(e,{isPlaying:!1,isPaused:!1})}))):console.log("该股票没有可播放的音频数据"))}else Je.toggleVoice()})(e),alt:"喇叭"},null,10,le),f("div",ue,w(e.queryText),1)]),dt.value?(p(),_("div",ce,w(A(b)(e.timestamp).format("YYYY-MM-DD HH:mm:ss")),1)):m("v-if",!0)])])]),f("div",de,[f("div",ve,[m(" 四维矩阵图 "),f("div",pe,[m(' 思维矩阵图片 '),f("div",_e,w(e.stockInfo.name)+w(e.stockInfo.name?"量子四维矩阵图":""),1),f("div",me,w(Qt(e)),1)]),At.value.marketTemperature?(p(),_("div",fe,[...t[2]||(t[2]=[f("img",{src:"/aixiaocaishen/static/images/L1-bf15f913.png",alt:"情绪监控图标"},null,-1)])])):m("v-if",!0),m(" 温度计图表 "),At.value.marketTemperature?(p(),_("div",ge,[f("div",he,[t[3]||(t[3]=f("div",{class:"content1"},[f("img",{src:"/aixiaocaishen/static/images/温度计-7ba6b126.png",alt:"温度计图标"}),f("span",{class:"matrix-main-title"},"股市温度计")],-1)),f("div",ye,[f("div",we," 股票温度:"+w(null!=(n=qt(e))?n:"NA"),1),f("div",ke," 市场温度:"+w(Xt(e)),1)])]),x(D,{ref_for:!0,ref:e=>ot.value[o]=e,companyName:e.stockInfo.name,stockCode:e.stockInfo.code},null,8,["companyName","stockCode"])])):m("v-if",!0)]),At.value.emotionDecod?(p(),_("div",Ae,[...t[4]||(t[4]=[f("img",{src:"/aixiaocaishen/static/images/L2-c8e914de.png",alt:"情绪解码图标"},null,-1)])])):m("v-if",!0),m(" 情绪解码器图表 "),At.value.emotionDecod?(p(),_("div",xe,[t[5]||(t[5]=f("div",{class:"emotion-decoder-header"},[f("img",{src:"/aixiaocaishen/static/images/emotionDecod-ea6f54b2.png",alt:"情绪解码器图标"}),f("span",{class:"emotion-decoder-text"},"情绪解码器")],-1)),f("div",be,[x(S,{ref_for:!0,ref:e=>at.value[o]=e},null,512)])])):m("v-if",!0),At.value.emotionalBottomRadar?(p(),_("div",Se,[...t[6]||(t[6]=[f("img",{src:"/aixiaocaishen/static/images/L3-6a18856c.png",alt:"情绪推演图标"},null,-1)])])):m("v-if",!0),m(" 情绪探底雷达图表 "),At.value.emotionalBottomRadar?(p(),_("div",Te,[t[7]||(t[7]=f("div",{class:"bottom-radar-header"},[f("img",{src:"/aixiaocaishen/static/images/探底雷达-7ca9f208.png",alt:"探底雷达图表"}),f("span",{class:"bottom-radar-text"},"情绪探底雷达")],-1)),f("div",Ie,[x(T,{ref_for:!0,ref:e=>it.value[o]=e},null,512)])])):m("v-if",!0),At.value.emoEnergyConverter?(p(),_("div",De,[...t[8]||(t[8]=[f("img",{src:"/aixiaocaishen/static/images/L4-62e261b3.png",alt:"情绪套利"},null,-1)])])):m("v-if",!0),m(" 情绪能量转化器图表 "),At.value.emoEnergyConverter?(p(),_("div",Pe,[t[9]||(t[9]=f("div",{class:"energy-converter-header"},[f("img",{src:"/aixiaocaishen/static/images/能量转化器-3a087b39.png",alt:"能量转化器图标"}),f("span",{class:"energy-converter-text"},"情绪能量转化器")],-1)),f("div",Le,[x(I,{ref_for:!0,ref:e=>nt.value[o]=e},null,512)])])):m("v-if",!0),m(" 核心看点 "),t[17]||(t[17]=k('
核心看点字样

情绪监控-金融宇宙的【量子检测网络】核心任务:构建全市场情绪引力场雷达,实时监测资金流向和情绪波动

情绪解码-主力思维的【神经破译矩阵】核心任务:解构资金行为的量子密码,破译主力操盘意图和策略布局

情绪推演-未来战争的【时空推演舱】核心任务:基于情绪数据推演未来走势,预测市场转折点和机会窗口

情绪套利-财富裂变的【粒子对撞机】核心任务:将情绪差转化为收益粒子流,实现情绪能量的价值转换

',2)),m(" 核心逻辑 "),t[18]||(t[18]=k('
核心逻辑字样
树标题
\x3c!-- <img src="@/assets/img/AiEmotion/tree02.jpg" alt="树图片"> --\x3e
',2)),m(" 场景应用 "),f("div",{class:"scenario-application-section",ref_for:!0,ref_key:"scenarioApplicationRef",ref:_t},[t[16]||(t[16]=f("img",{src:"/aixiaocaishen/static/images/场景应用-d0ed55f3.png",alt:"场景应用标题"},null,-1)),f("div",Ee,[m(" 只有在状态准备好时才显示结论内容 "),jt(e)?(p(),_("div",Oe,[m(" 使用当前股票项的结论数据显示内容,支持打字机效果 "),m(" L1: 情绪监控 "),Ut(e)&&Ut(e).one||Nt(e)&&!Wt(e)&&(Nt(e).one1||Nt(e).one2)?(p(),_("div",Ce,[t[10]||(t[10]=f("h4",{class:"conclusion-title"},"L1: 情绪监控",-1)),m(" 打字机效果文本 "),Wt(e)&&Wt(e).one1?(p(),_("p",Me,w(Wt(e).one1),1)):m("v-if",!0),Wt(e)&&Wt(e).one2?(p(),_("p",He,w(Wt(e).one2),1)):m("v-if",!0),m(" 完整文本 "),!Wt(e)&&Nt(e)&&Nt(e).one1?(p(),_("p",Re,w(Nt(e).one1),1)):m("v-if",!0),!Wt(e)&&Nt(e)&&Nt(e).one2?(p(),_("p",Be,w(Nt(e).one2),1)):m("v-if",!0)])):m("v-if",!0),m(" L2: 情绪解码 "),Ut(e)&&Ut(e).two||Nt(e)&&!Wt(e)&&Nt(e).two?(p(),_("div",Ve,[t[11]||(t[11]=f("h4",{class:"conclusion-title"},"L2: 情绪解码",-1)),m(" 打字机效果文本 "),Wt(e)&&Wt(e).two?(p(),_("p",Fe,w(Wt(e).two),1)):m("v-if",!0),m(" 完整文本 "),!Wt(e)&&Nt(e)&&Nt(e).two?(p(),_("p",Ge,w(Nt(e).two),1)):m("v-if",!0)])):m("v-if",!0),m(" L3: 情绪推演 "),Ut(e)&&Ut(e).three||Nt(e)&&!Wt(e)&&Nt(e).three?(p(),_("div",Qe,[t[12]||(t[12]=f("h4",{class:"conclusion-title"},"L3: 情绪推演",-1)),m(" 打字机效果文本 "),Wt(e)&&Wt(e).three?(p(),_("p",Xe,w(Wt(e).three),1)):m("v-if",!0),m(" 完整文本 "),!Wt(e)&&Nt(e)&&Nt(e).three?(p(),_("p",qe,w(Nt(e).three),1)):m("v-if",!0)])):m("v-if",!0),m(" L4: 情绪套利 "),Ut(e)&&Ut(e).four||Nt(e)&&!Wt(e)&&Nt(e).four?(p(),_("div",Ne,[t[13]||(t[13]=f("h4",{class:"conclusion-title"},"L4: 情绪套利",-1)),m(" 打字机效果文本 "),Wt(e)&&Wt(e).four?(p(),_("p",We,w(Wt(e).four),1)):m("v-if",!0),m(" 完整文本 "),!Wt(e)&&Nt(e)&&Nt(e).four?(p(),_("p",Ue,w(Nt(e).four),1)):m("v-if",!0)])):m("v-if",!0)])):m("v-if",!0),m(" 状态准备中的提示 "),!jt(e)&&Nt(e)?(p(),_("div",je,[...t[14]||(t[14]=[f("p",null,"请稍候...",-1)])])):m("v-if",!0),m(" 等待数据加载的提示 "),Nt(e)&&(Nt(e).one1||Nt(e).one2||Nt(e).two||Nt(e).three||Nt(e).four)?m("v-if",!0):(p(),_("div",Ze,[...t[15]||(t[15]=[f("p",null,"等待股票分析结论...",-1)])]))]),m(" AI生成内容免责声明 "),Ut(e)&&Ut(e).disclaimer||Nt(e)&&!Wt(e)?(p(),_("div",$e,[m(" 打字机效果文本 "),Wt(e)&&Wt(e).disclaimer?(p(),_("p",Ye,w(Wt(e).disclaimer),1)):m("v-if",!0),m(" 完整文本 "),!Wt(e)&&Nt(e)?(p(),_("p",ze," 该内容由AI生成,请注意甄别 ")):m("v-if",!0)])):m("v-if",!0)],512)])])})),128)):m("v-if",!0),m(" 全局返回顶部按钮 "),Gt.value.length>0||st.value.length>0?(p(),_("div",{key:2,class:"back-to-top",onClick:po},t[19]||(t[19]=[f("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[f("path",{d:"M12 4L12 20M12 4L6 10M12 4L18 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m("v-if",!0)])],64))}},[["__scopeId","data-v-6ad5966e"],["__file","C:/Users/Administrator/Desktop/AIxiaocaishen/src/views/AiEmotion.vue"]]),Ke=Object.freeze(Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"}));export{Je as A,V as a,M as b,Ke as c,H as g,R as h,C as t,F as u,B as v};