st-comp 0.0.232 → 0.0.234

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -140,7 +140,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,curr
140
140
  入参: ${JSON.stringify(u.method==="post"?u.data:u.params)}`))}),{get:(a,l={},u={})=>s({method:"GET",url:`${uJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/get"}${a}`,params:l,...u}),post:(a,l={},u={})=>s({method:"POST",url:`${uJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/post"}${a}`,data:l,...u})}},Det=Object.freeze(Object.defineProperty({__proto__:null,initRequest:xet},Symbol.toStringTag,{value:"Module"}));var Net=Object.defineProperty,Eet=(n,e,t)=>e in n?Net(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wp=(n,e,t)=>Eet(n,typeof e!="symbol"?e+"":e,t);class cJ{constructor(e,t={}){wp(this,"dom"),wp(this,"resizeRo"),wp(this,"callback"),wp(this,"visibilitychangeFn"),wp(this,"timer"),wp(this,"config",{debounce:50}),this.dom=e,this.config={...this.config,...t}}listen(e){this.callback=e;let t=!0;this.resizeRo=new ResizeObserver(()=>{if(t){t=!1;return}clearTimeout(this.timer),this.timer=setTimeout(()=>{this.callback&&this.callback(),clearTimeout(this.timer)},this.config.debounce)}),this.resizeRo.observe(this.dom),this.visibilitychangeFn=()=>{(document.visibilityState==="visible"||!document.hidden)&&this.callback&&this.callback()},document.addEventListener("visibilitychange",this.visibilitychangeFn)}dispose(){var e;(e=this.resizeRo)==null||e.disconnect(),document.removeEventListener("visibilitychange",this.visibilitychangeFn)}}const ket=n=>new cJ(n),Let=Object.freeze(Object.defineProperty({__proto__:null,ResizeListener:cJ,addResizeListener:ket},Symbol.toStringTag,{value:"Module"}));`${new Date().getTime()}${Math.floor(Math.random()*1e9)}`;const Met=n=>{n?zH("token",n):console.error("token不能为空")},Tet=n=>{n?zH("userData",n):console.error("用户数据不能为空")},dJ=()=>HH("token"),hJ=n=>{const e=HH("userData");return n?e==null?void 0:e[n]:e},Aet=()=>!!dJ(),Iet=()=>{const n=hJ();return(n==null?void 0:n.username)==="admin"},fJ=(n="")=>location.href=`${location.origin}/login/index.html?url=${encodeURIComponent(n||location.href)}`,Ret=(n=!0,e)=>{if(jH("token"),jH("userData"),n){fJ();return}e&&(location.href=e)},Oet=Object.freeze(Object.defineProperty({__proto__:null,getToken:dJ,getUserData:hJ,isAdmin:Iet,isLogin:Aet,login:fJ,loginout:Ret,setToken:Met,setUserData:Tet},Symbol.toStringTag,{value:"Module"})),Cl=Cet,{initRequest:pJ}=Det,{addResizeListener:gJ}=Let,{setToken:xMt,setUserData:YE,getToken:mJ,getUserData:R1,isLogin:bJ,isAdmin:SMt,login:Fet,loginout:QE}=Oet,p0=(n,e=500,t=!1)=>{let i=null;return function(...r){if(clearTimeout(i),t){const o=!i;i=setTimeout(()=>{i=null},e),o&&n.apply(this,r)}else i=setTimeout(()=>{n.apply(this,r)},e)}},Pet={__name:"index",props:{env:{type:Object,default:()=>({})}},setup(n){const e=r=>{const o=pJ(r,{handleReq:s=>{bJ()&&(s.headers.token=mJ(),s.headers.userId=R1("userId"))},handleRes:s=>{const{data:a}=s;if(a.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:QE(),!0}});return{get:o.get,post:o.post}},t=n,i=c.reactive({env:t.env,request:e(t.env)});return c.watch(()=>t,r=>{Object.assign(i,toRefs(r)),console.log("已更新神兔组件库配置: ",i)},{deep:!0}),console.log("%c√ 已成功注入神兔组件库配置: ","color: green",i),c.provide("stConfig",i),(r,o)=>c.renderSlot(r.$slots,"default")}},Bet={install(n){n.component("st-configProvider",Pet)}},DMt="",Vet=Jt({__name:"index",emits:["close","open"],setup(n,{emit:e}){const t=e,i=c.ref(),r=c.ref(),o=c.ref({x:0,y:0}),s=c.ref(!1),a=c.computed(()=>({display:s.value?"block":"none",top:`${o.value.y}px`,left:`${o.value.x}px`})),l=()=>{s.value=!1,t("close"),document.removeEventListener("click",l)},u=f=>{var p;(p=r.value)!=null&&p.contains(f.relatedTarget)||l()},d=async f=>{if(f.preventDefault(),s.value&&r.value){const y=r.value.getBoundingClientRect();if(f.clientX>=y.left&&f.clientX<=y.right&&f.clientY>=y.top&&f.clientY<=y.bottom)return}const p=i.value.getBoundingClientRect();let g=f.clientX-p.left,m=f.clientY-p.top;o.value={x:g,y:m},s.value=!0,t("open"),await c.nextTick(),h(),document.addEventListener("click",l)},h=()=>{if(!r.value||!i.value)return;const f=i.value.getBoundingClientRect(),p=r.value.getBoundingClientRect();let{x:g,y:m}=o.value;g+p.width>f.width&&(g=Math.max(0,g-p.width)),m+p.height>f.height&&(m=Math.max(0,m-p.height)),g<0&&(g=0),m<0&&(m=0),o.value={x:g,y:m}};return(f,p)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"contextmenuRef",ref:i,class:"contextmenu",onMouseleave:u,onContextmenu:d},[c.renderSlot(f.$slots,"default",{},void 0,!0),s.value?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:r,class:"contextmenu-popover",style:c.normalizeStyle(a.value),onContextmenu:p[0]||(p[0]=c.withModifiers(()=>{},["stop"]))},[c.renderSlot(f.$slots,"popover",{},void 0,!0)],36)):c.createCommentVNode("",!0)],544))}},[["__scopeId","data-v-34926651"]]),zet={install(n){n.component("st-contextmenu",Vet)}},EMt="",kMt="",LMt="",MMt="",TMt="",AMt="",IMt="",RMt="",OMt="",FMt="",PMt="",BMt="",VMt="",zMt="",HMt="",jMt="",WMt="",$Mt="",UMt="",ZE=n=>(c.pushScopeId("data-v-b5dcb4b8"),n=n(),c.popScopeId(),n),Het={class:"custom-header"},jet={class:"left"},Wet=["id"],$et={class:"right"},Uet={class:"manage-dialog-body"},qet={class:"func-list"},Ket={class:"search"},Get=ZE(()=>c.createElementVNode("span",null,"输入函数关键字",-1)),Yet=["onClick"],Qet={class:"icon-box"},Zet={class:"rule-form"},Xet={class:"header"},Jet=ZE(()=>c.createElementVNode("span",null,"函数名称:",-1)),ett={class:"right"},ttt=ZE(()=>c.createElementVNode("div",{class:"tip-box"},"说明: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算",-1)),ntt={class:"custom-header"},itt={class:"left"},rtt=["id"],ott={class:"right"},stt={class:"content"},att={class:"dialog-footer"},ltt=Jt({__name:"ManageDialog",props:{data:{type:Array,default:()=>[]}},emits:["refreshData"],setup(n,{expose:e,emit:t}){const{request:i}=c.inject("stConfig"),r=c.ref(null),o=c.ref(null),s=t,a=n,l=c.ref(!1),u=c.reactive({save:!1,test:!1}),d=c.ref(null),h=c.computed(()=>d.value?a.data.filter(N=>N.funcName.includes(d.value)):a.data),f=c.reactive({id:null,funcName:"",funcExpression:""}),p=c.reactive({result:null,detail:"",code:""}),g=c.ref(!1),m=()=>{var N;Object.assign(f,{id:null,funcName:"",funcExpression:""}),(N=r.value)==null||N.setValue(f.funcExpression)},y=N=>{var k;Object.assign(f,{id:N.id,funcName:N.funcName,funcExpression:N.funcExpression}),(k=r.value)==null||k.setValue(f.funcExpression)},_=N=>{var k;Object.assign(f,{id:null,funcName:`${N.funcName}-复制`,funcExpression:N.funcExpression}),(k=r.value)==null||k.setValue(f.funcExpression)},C=async N=>{var k;N.id===f.id&&(Object.assign(f,{id:null,funcName:"",funcExpression:""}),(k=r.value)==null||k.setValue(f.funcExpression)),await i.post("/common/qt/deleteSearchFunctionById",{id:N.id}),s("refreshData")},b=p0(async()=>{try{if(u.save=!0,f.funcExpression=r.value.getValue(),!f.funcName)return Xt.error("函数名称不可为空");if(!f.funcExpression)return Xt.error("函数内容不可为空");await i.post("/common/qt/saveOrUpdateSearchFunction",f),Xt.success("操作成功"),s("refreshData"),f.id||m()}finally{u.save=!1}}),v=N=>new Promise(k=>{const E=c.ref(N.reduce((R,I)=>(R[I]="",R),{})),L=c.ref({}),A=()=>{let R=!0;const I={};return N.forEach(M=>{var O;(O=E.value[M])!=null&&O.trim()||(I[M]=`请输入${M}的值`,R=!1)}),L.value=I,R},F={setup(){return()=>c.h("div",[c.h(Od,{model:E.value},()=>N.map(R=>c.h(Fd,{label:`${R}: `,prop:R,error:L.value[R],"label-width":"90px"},()=>c.h(Ko,{modelValue:E.value[R],"onUpdate:modelValue":I=>{E.value[R]=I,L.value[R]&&delete L.value[R]},placeholder:`请输入 ${R} 的值`,status:L.value[R]?"error":""}))))])}};t7({title:"填写变量值用于接口测试",message:c.h(F),showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",customClass:"variable-input-dialog",beforeClose:async(R,I,M)=>{R!=="confirm"&&(k(!1),M()),await c.nextTick(),A()&&(k({...E.value}),M())}}).catch(()=>k(!1))}),w=N=>{const k=/\$\{([^}]*)\}/g,E=[];let L;for(;(L=k.exec(N))!==null;)E.push(L[1]);return[...new Set(E)]},x=(N,k)=>N.replace(/\$\{([^}]*)\}/g,(E,L)=>k[L]!==void 0?k[L]:E),S=async N=>{switch(N){case"submit":{let k=r.value.getValue();if(!k)return Xt.error("函数内容不可为空");if(/\$\{[^}]*\}/.test(k)){const E=w(k),L=await v(E);if(!L)return;k=x(k,L)}try{u.test=!0;const{body:E}=await i.post("/common/qt/testFactorSelect",{factorSelectExpr:k}),{result:L,detail:A}=E;Object.assign(p,{result:L,detail:A,code:k}),L===1?Xt.success("测试通过"):(Xt.error("测试未能通过"),g.value=!0)}finally{u.test=!1}break}case"log":{if(p.result===null)return Xt.warning("请先进行测试, 等待测试完成后可查看日志");g.value=!0;break}}},D=()=>{o.value.open(r.value)};return c.watch(()=>l.value,N=>{N||(o.value.close(),g.value=!1)}),e({open:N=>{l.value=!0,c.nextTick(()=>{var k;if((k=r.value)==null||k.resize(),d.value=null,Object.assign(p,{result:null,detail:"",code:""}),N){const E={id:N.id,funcName:N.funcName,funcExpression:N.funcExpression};y(E)}else h.value.length?y(h.value[0]):m()})}}),(N,k)=>{const E=rn,L=Ko,A=xr,F=z6,R=x3,I=a1,M=c.resolveComponent("st-monacoEditor"),O=c.resolveComponent("st-varSelectDialog"),P=T6,U=Sa;return c.openBlock(),c.createBlock(U,{"modal-class":"manage-dialog",modelValue:l.value,"onUpdate:modelValue":k[8]||(k[8]=Y=>l.value=Y),width:"1600","align-center":"","append-to-body":"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:Y,titleClass:j})=>[c.createElementVNode("div",Het,[c.createElementVNode("div",jet,[c.createElementVNode("span",{id:Y,class:c.normalizeClass(j)}," 自定义函数管理面板 ",10,Wet)]),c.createElementVNode("div",$et,[c.createVNode(E,{onClick:k[0]||(k[0]=z=>l.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(rl))]),_:1})])])]),default:c.withCtx(()=>[c.createElementVNode("div",Uet,[c.createElementVNode("div",qet,[c.createElementVNode("div",Ket,[Get,c.createVNode(L,{modelValue:d.value,"onUpdate:modelValue":k[1]||(k[1]=Y=>d.value=Y),clearable:""},null,8,["modelValue"]),c.createVNode(A,{type:"primary",onClick:m},{default:c.withCtx(()=>[c.createTextVNode("新建")]),_:1})]),c.createVNode(I,{class:"list"},{default:c.withCtx(()=>[h.value.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(h.value,Y=>(c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass([{"active-list-item":f.id===Y.id},"list-item"])},[c.createElementVNode("span",{class:"func-name",onClick:j=>y(Y)},c.toDisplayString(Y.funcName),9,Yet),c.createElementVNode("div",Qet,[c.createVNode(E,null,{default:c.withCtx(()=>[c.createVNode(c.unref(QP),{onClick:j=>_(Y)},null,8,["onClick"])]),_:2},1024),c.createVNode(F,{title:"确认是否删除?","confirm-button-text":"确认","cancel-button-text":"取消",onConfirm:j=>C(Y)},{reference:c.withCtx(()=>[c.createVNode(E,{onClick:c.withModifiers(()=>{},["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Nx))]),_:1})]),_:2},1032,["onConfirm"])])],2))),128)):(c.openBlock(),c.createBlock(R,{key:1,description:"暂无数据"}))]),_:1})]),c.createElementVNode("div",Zet,[c.createElementVNode("div",Xet,[Jet,c.createVNode(L,{modelValue:f.funcName,"onUpdate:modelValue":k[2]||(k[2]=Y=>f.funcName=Y)},null,8,["modelValue"]),c.createElementVNode("div",ett,[c.createVNode(A,{type:"primary",onClick:c.unref(b),loading:u.save},{default:c.withCtx(()=>[c.createTextVNode(" 保存 ")]),_:1},8,["onClick","loading"]),c.createVNode(A,{loading:u.test,onClick:k[3]||(k[3]=Y=>S("submit"))},{default:c.withCtx(()=>[c.createTextVNode(" 测试 ")]),_:1},8,["loading"]),c.createVNode(A,{icon:c.unref(ZP),onClick:k[4]||(k[4]=Y=>S("log"))},{default:c.withCtx(()=>[c.createTextVNode(" 日志明细 ")]),_:1},8,["icon"]),c.createVNode(A,{type:"primary",onClick:D},{default:c.withCtx(()=>[c.createTextVNode(" 变量选择器 ")]),_:1})])]),ttt,c.createVNode(M,{ref_key:"stMonacoEditorRef",ref:r,language:"lua",style:{width:"100%",height:"calc(80vh - 75px)"}},null,512)])]),c.createVNode(O,{ref_key:"stVarSelectDialogRef",ref:o},null,512),c.createVNode(U,{"modal-class":"log-dialog",modelValue:g.value,"onUpdate:modelValue":k[7]||(k[7]=Y=>g.value=Y),width:"830","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:Y,titleClass:j})=>[c.createElementVNode("div",ntt,[c.createElementVNode("div",itt,[c.createElementVNode("span",{id:Y,class:c.normalizeClass(j)}," 日志明细 ",10,rtt)]),c.createElementVNode("div",ott,[c.createVNode(E,{onClick:k[5]||(k[5]=z=>g.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(rl))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",att,[c.createVNode(A,{onClick:k[6]||(k[6]=Y=>g.value=!1)},{default:c.withCtx(()=>[c.createTextVNode(" 关闭 ")]),_:1})])]),default:c.withCtx(()=>[c.createElementVNode("div",stt,[c.createVNode(I,{class:"code",height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",null,c.toDisplayString(p.code),1)]),_:1}),c.createVNode(P,{direction:"vertical"}),c.createVNode(I,{height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",{class:c.normalizeClass(p.result===1?"success-log":"error-log")},c.toDisplayString(p.result===1?`✅️ 测试通过
141
141
  ${p.detail}`:p.detail),3)]),_:1})])]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},[["__scopeId","data-v-b5dcb4b8"]]),KMt="",GMt="",utt={class:"custom-function"},ctt={class:"func-option"},dtt={class:"icons"},htt=Jt({__name:"index",props:{size:{type:String,default:"small"},selectWidth:{type:String,default:"200px"}},emits:["insert"],setup(n,{emit:e}){const{request:t}=c.inject("stConfig"),i=c.ref(null),r=e,o=c.ref(null),s=c.ref(""),a=c.ref([]),l=async()=>{const{body:f}=await t.post("/common/qt/querySearchFunctions");if(a.value=f??[],o.value===null)s.value="";else{const p=a.value.find(({id:g})=>g===o.value);s.value=p?p.funcName:""}},u=f=>{var p;f?o.value=(p=a.value.find(g=>g.funcName===f))==null?void 0:p.id:o.value=null},d=()=>{if(!s.value)return Xt.error("请先选择自定义函数后, 再执行插入");const{funcName:f,funcExpression:p}=a.value.find(g=>g.funcName===s.value);r("insert",f,p)},h=async(f,p)=>{switch(f){case"open":{i.value.open();break}case"copy":{const g={id:null,funcName:`${p.funcName}-复制`,funcExpression:p.funcExpression};i.value.open(g);break}case"edit":{const g={id:p.id,funcName:p.funcName,funcExpression:p.funcExpression};i.value.open(g);break}case"delete":{await t.post("/common/qt/deleteSearchFunctionById",{id:p.id}),l();break}}};return c.onMounted(()=>{l()}),(f,p)=>{const g=rn,m=z6,y=ul,_=ll,C=xr;return c.openBlock(),c.createElementBlock("div",utt,[c.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=b=>s.value=b),size:n.size,placeholder:"自定义函数","no-match-text":"无匹配选项","no-data-text":"无选项数据",clearable:"",filterable:"",onChange:u,style:c.normalizeStyle({width:n.selectWidth})},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,b=>(c.openBlock(),c.createBlock(y,{key:b.id,label:b.funcName,value:b.funcName,onClick:d},{default:c.withCtx(()=>[c.createElementVNode("div",ctt,[c.createElementVNode("span",null,c.toDisplayString(b.funcName),1),c.createElementVNode("div",dtt,[c.createVNode(g,{onClick:c.withModifiers(v=>h("copy",b),["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(QP))]),_:2},1032,["onClick"]),c.createVNode(g,{onClick:c.withModifiers(v=>h("edit",b),["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Fge))]),_:2},1032,["onClick"]),c.createVNode(m,{title:"确认是否删除?","confirm-button-text":"确认","cancel-button-text":"取消",onConfirm:v=>h("delete",b)},{reference:c.withCtx(()=>[c.createVNode(g,{onClick:c.withModifiers(()=>{},["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Nx))]),_:1})]),_:2},1032,["onConfirm"])])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","size","style"]),c.createVNode(C,{type:"primary",size:n.size,onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 插入 ")]),_:1},8,["size"]),c.createVNode(C,{type:"primary",size:n.size,onClick:p[1]||(p[1]=b=>h("open"))},{default:c.withCtx(()=>[c.createTextVNode(" 函数管理 ")]),_:1},8,["size"]),c.createVNode(ltt,{ref_key:"ManageDialogRef",ref:i,data:a.value,onRefreshData:l},null,8,["data"])])}}},[["__scopeId","data-v-d2f2ff3e"]]),ftt={install(n){n.component("st-customFunction",htt)}},QMt="",ZMt="",XMt="",JMt="",eTt="",tTt="",nTt="",iTt="",rTt="";var XE={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const ptt={ruleFormPrice:!0,ruleFormMark:!0,tableStatus:!0,tableCreateTime:!0,tableMark:!0,tableEnable:!0},oTt="",__=n=>(c.pushScopeId("data-v-b2d15520"),n=n(),c.popScopeId(),n),gtt={class:"st-factorWarning"},mtt={class:"custom-header"},btt=__(()=>c.createElementVNode("span",{style:{"margin-right":"4px"}},"因子预警",-1)),_tt={class:"factor-name"},ytt=["onClick"],vtt={class:"factor-name"},Ctt=["onClick"],wtt={style:{display:"flex","align-items":"start"}},xtt={key:0,style:{flex:"1"}},Stt=__(()=>c.createElementVNode("span",{style:{margin:"0 5px"}},"~",-1)),Dtt={key:0,style:{color:"#f56c6c"}},Ntt={key:1,style:{color:"#67c23a"}},Ett={key:0},ktt={key:1},Ltt={key:2},Mtt={class:"shortcut-title"},Ttt=__(()=>c.createElementVNode("span",null,"我的配置",-1)),Att={class:"shortcut-config"},Itt={key:1,class:"empty"},Rtt={class:"shortcut-title"},Ott=__(()=>c.createElementVNode("span",null,"新增配置",-1)),Ftt={class:"custom-footer"},Ptt=Jt({__name:"index",props:c.mergeModels({title:{type:[String,null],default:null},moreFactorOptions:{type:Array,default:()=>[]},emptyFactorOptions:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},shortcutData:{type:Array,default:()=>[]},showConfig:{type:Object,default:()=>({})},allowOperation:{type:Boolean,default:!0}},{visible:{default:!1},visibleModifiers:{}}),emits:c.mergeModels(["add","delete","enabled","closed","shortcutAdd","shortcutDelete"],["update:visible"]),setup(n,{emit:e}){const t=c.ref("ruleForm"),i=c.useModel(n,"visible"),r=e,o=n,s=Object.assign(ptt,o.showConfig),a=c.ref(null),l=c.ref({factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null}),u=c.ref({factorType:[{required:!0,message:"请选择交易类型",trigger:"blur"}],factorSelectedList:[{required:!0,message:"请选择预警因子",trigger:"blur"}],totalCount:[{required:!0,message:"请填写预警次数",trigger:"blur"}]}),d=c.ref(null),h=c.ref({shortcutName:null,factorType:1,factorSelectedList:[],totalCount:1}),f=c.ref({factorType:[{required:!0,message:"请选择交易类型",trigger:"blur"}],factorSelectedList:[{required:!0,message:"请选择预警因子",trigger:"blur"}],totalCount:[{required:!0,message:"请填写预警次数",trigger:"blur"}],shortcutName:[{required:!0,message:"请填写配置名称",trigger:"blur"}]}),p=()=>{l.value={factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null},h.value={shortcutName:null,factorType:1,factorSelectedList:[],totalCount:1}},g=async v=>{Object.assign(l.value,{factorSelectedList:[v],totalCount:3});const w={factorSelectedList:l.value.factorSelectedList.map(S=>{let D=3;const N=o.tableData.find(({factorExtendName:k})=>k===S);if(N){const k=N.totalCount-N.currentCount;k===0?D=3:D=Math.min(3,12-k>=0?12-k:0)}return{factorName:S,...l.value,totalCount:D}})},x=()=>{const S=l.value.factorType;p(),l.value.factorType=S};y(a.value,w,x)},m=async v=>{const w=JSON.parse(v.data);Object.assign(l.value,{factorType:w.factorType,factorSelectedList:w.factorSelectedList,totalCount:w.totalCount});const x={factorSelectedList:l.value.factorSelectedList.map(D=>{let N=w.totalCount;const k=o.tableData.find(({factorExtendName:E})=>E===D);if(k){const E=k.totalCount-k.currentCount;E===0?N=w.totalCount:N=Math.min(w.totalCount,10-E>=0?10-E:0)}return{factorName:D,...l.value,totalCount:N}})},S=()=>p();y(a.value,x,S)},y=p0(async(v,w,x)=>{v&&await v.validate(S=>{if(!S)return!1;const D=w??{factorSelectedList:l.value.factorSelectedList.map(N=>({factorName:N,...l.value}))};r("add",D),x?x():i.value=!1})},200),_=async v=>{v&&await v.validate(w=>{if(!w)return!1;const x={shortcutName:h.value.shortcutName,data:JSON.stringify(h.value)};r("shortcutAdd",x),p()})},C=v=>{h.value=JSON.parse(v.data)},b=v=>{t7.confirm(`是否确认删除配置: ${v.shortcutName} ?`,"删除提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>r("shortcutDelete",v))};return c.watch(()=>i.value,v=>{v&&(t.value=o.allowOperation?"ruleForm":"table",p())},{immediate:!0}),(v,w)=>{const x=AH,S=xr,D=Fd,N=nc,k=yV,E=P6,L=X6,A=Ko,F=Od,R=XS,I=z6,M=ZS,O=rn,P=wa,U=w3,Y=Sa,j=nS;return c.openBlock(),c.createElementBlock("div",gtt,[c.createVNode(j,{locale:c.unref(XE)},{default:c.withCtx(()=>[c.createVNode(Y,{modelValue:i.value,"onUpdate:modelValue":w[17]||(w[17]=z=>i.value=z),width:"1020","align-center":"","destroy-on-close":"",onClosed:w[18]||(w[18]=z=>r("closed"))},{header:c.withCtx(({close:z,titleId:re,titleClass:ce})=>[c.createElementVNode("div",mtt,[c.createElementVNode("div",{class:c.normalizeClass(ce)},[btt,c.createElementVNode("span",null,c.toDisplayString(n.title),1)],2),c.createVNode(x,{modelValue:t.value,"onUpdate:modelValue":w[0]||(w[0]=le=>t.value=le),size:"default",options:[{label:"添加",value:"ruleForm",disabled:!n.allowOperation},{label:"管理",value:"table",disabled:!1},{label:"快捷配置",value:"shortcut",disabled:!n.allowOperation}]},null,8,["modelValue","options"])])]),footer:c.withCtx(()=>[c.createElementVNode("div",Ftt,[c.createVNode(S,{size:"default",onClick:w[14]||(w[14]=z=>i.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("关闭")]),_:1}),t.value==="ruleForm"?(c.openBlock(),c.createBlock(S,{key:0,size:"default",type:"primary",onClick:w[15]||(w[15]=z=>c.unref(y)(a.value))},{default:c.withCtx(()=>[c.createTextVNode(" 确认 ")]),_:1})):c.createCommentVNode("",!0),t.value==="shortcut"?(c.openBlock(),c.createBlock(S,{key:1,size:"default",type:"primary",onClick:w[16]||(w[16]=z=>_(d.value))},{default:c.withCtx(()=>[c.createTextVNode(" 保存配置 ")]),_:1})):c.createCommentVNode("",!0)])]),default:c.withCtx(()=>[t.value==="ruleForm"?(c.openBlock(),c.createBlock(F,{key:0,ref_key:"ruleFormRef",ref:a,model:l.value,rules:u.value,size:"default","label-width":"90px"},{default:c.withCtx(()=>[c.createVNode(D,{label:"交易类型:",prop:"factorType"},{default:c.withCtx(()=>[c.createVNode(S,{type:"danger",plain:l.value.factorType!==1,onClick:w[1]||(w[1]=()=>{l.value.factorType===-1&&(l.value.factorSelectedList=[]),l.value.factorType=1})},{default:c.withCtx(()=>[c.createTextVNode(" 多 ")]),_:1},8,["plain"]),c.createVNode(S,{type:"success",plain:l.value.factorType!==-1,onClick:w[2]||(w[2]=()=>{l.value.factorType===1&&(l.value.factorSelectedList=[]),l.value.factorType=-1})},{default:c.withCtx(()=>[c.createTextVNode(" 空 ")]),_:1},8,["plain"])]),_:1}),c.createVNode(D,{label:"预警因子:",prop:"factorSelectedList"},{default:c.withCtx(()=>[c.createVNode(k,{modelValue:l.value.factorSelectedList,"onUpdate:modelValue":w[3]||(w[3]=z=>l.value.factorSelectedList=z)},{default:c.withCtx(()=>[l.value.factorType===1?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(n.moreFactorOptions,(z,re)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:re},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",_tt,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ce=>g(z.factorTypeName)},"+3",8,ytt)]))),128)):c.createCommentVNode("",!0),l.value.factorType===-1?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(n.emptyFactorOptions,(z,re)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:re},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",vtt,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ce=>g(z.factorTypeName)},"+3",8,Ctt)]))),128)):c.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),c.createVNode(D,{label:"预警次数:",prop:"totalCount"},{default:c.withCtx(()=>[c.createElementVNode("div",wtt,[c.createVNode(E,{modelValue:l.value.totalCount,"onUpdate:modelValue":w[4]||(w[4]=z=>l.value.totalCount=z),min:1,"controls-position":"right",style:{"margin-right":"20px"}},null,8,["modelValue"]),n.shortcutData.length?(c.openBlock(),c.createElementBlock("div",xtt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.shortcutData,z=>(c.openBlock(),c.createBlock(S,{key:z.id,onClick:re=>m(z),style:{margin:"0 12px 4px 0"}},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(z.shortcutName),1)]),_:2},1032,["onClick"]))),128))])):(c.openBlock(),c.createBlock(L,{key:1,type:"primary",style:{cursor:"pointer"},onClick:w[5]||(w[5]=()=>t.value="shortcut")},{default:c.withCtx(()=>[c.createTextVNode(" 暂无快捷配置, 是否点击前往自定义配置? ")]),_:1}))])]),_:1}),c.unref(s).ruleFormPrice?(c.openBlock(),c.createBlock(D,{key:0,label:"价格范围:"},{default:c.withCtx(()=>[c.createVNode(E,{modelValue:l.value.minPrice,"onUpdate:modelValue":w[6]||(w[6]=z=>l.value.minPrice=z),min:-999,placeholder:"请输入",max:999,"controls-position":"right"},null,8,["modelValue"]),Stt,c.createVNode(E,{modelValue:l.value.maxPrice,"onUpdate:modelValue":w[7]||(w[7]=z=>l.value.maxPrice=z),placeholder:"请输入",min:-999,max:999,"controls-position":"right"},null,8,["modelValue"])]),_:1})):c.createCommentVNode("",!0),c.unref(s).ruleFormMark?(c.openBlock(),c.createBlock(D,{key:1,label:"备注:"},{default:c.withCtx(()=>[c.createVNode(A,{modelValue:l.value.mark,"onUpdate:modelValue":w[8]||(w[8]=z=>l.value.mark=z),type:"textarea",placeholder:"请输入关键字",rows:2,style:{width:"380px"}},null,8,["modelValue"])]),_:1})):c.createCommentVNode("",!0)]),_:1},8,["model","rules"])):c.createCommentVNode("",!0),t.value==="table"?(c.openBlock(),c.createBlock(M,{key:1,data:n.tableData,size:"small"},{default:c.withCtx(()=>[c.createVNode(R,{label:"预警周期",width:"70"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.freqName||"-"),1)]),_:1}),c.createVNode(R,{label:"交易类型",width:"70"},{default:c.withCtx(z=>[z.row.factorExtendValue==1?(c.openBlock(),c.createElementBlock("span",Dtt,"多")):(c.openBlock(),c.createElementBlock("span",Ntt,"空"))]),_:1}),c.createVNode(R,{label:"预警因子"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.factorExtendName||"-"),1)]),_:1}),c.createVNode(R,{label:"预警次数",width:"70"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(`${z.row.currentCount} / ${z.row.totalCount}`),1)]),_:1}),c.unref(s).tableStatus?(c.openBlock(),c.createBlock(R,{key:0,label:"状态",width:"70"},{default:c.withCtx(z=>[c.createElementVNode("div",null,[z.row.enable===1?(c.openBlock(),c.createElementBlock("span",Ett,"未触发")):z.row.enable===2?(c.openBlock(),c.createElementBlock("span",ktt,"已触发")):(c.openBlock(),c.createElementBlock("span",Ltt,"-"))])]),_:1})):c.createCommentVNode("",!0),c.unref(s).tableCreateTime?(c.openBlock(),c.createBlock(R,{key:1,label:"设置时间",width:"136"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.createdTime||"-"),1)]),_:1})):c.createCommentVNode("",!0),c.unref(s).tableMark?(c.openBlock(),c.createBlock(R,{key:2,label:"备注",width:"70"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.mark||"-"),1)]),_:1})):c.createCommentVNode("",!0),n.allowOperation?(c.openBlock(),c.createBlock(R,{key:3,label:"操作",width:"140"},{default:c.withCtx(z=>[c.unref(s).tableEnable?(c.openBlock(),c.createBlock(S,{key:0,disabled:z.row.currentCount!==z.row.totalCount,size:"small",onClick:re=>r("enabled",z.row)},{default:c.withCtx(()=>[c.createTextVNode(" 启用 ")]),_:2},1032,["disabled","onClick"])):c.createCommentVNode("",!0),c.createVNode(I,{title:"确定删除?",onConfirm:re=>r("delete",z.row)},{reference:c.withCtx(()=>[c.createVNode(S,{size:"small"},{default:c.withCtx(()=>[c.createTextVNode("删除")]),_:1})]),_:2},1032,["onConfirm"])]),_:1})):c.createCommentVNode("",!0)]),_:1},8,["data"])):c.createCommentVNode("",!0),t.value==="shortcut"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[c.createElementVNode("div",Mtt,[Ttt,c.createVNode(P,{effect:"dark",content:"如有配置数据, 可点击查看该配置的具体信息",placement:"right-start"},{default:c.withCtx(()=>[c.createVNode(O,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ed))]),_:1})]),_:1})]),c.createElementVNode("div",Att,[n.shortcutData.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(n.shortcutData,z=>(c.openBlock(),c.createBlock(U,{key:z.id,type:"primary",size:"default",closable:"",onClick:re=>C(z),onClose:re=>b(z)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(z.shortcutName),1)]),_:2},1032,["onClick","onClose"]))),128)):(c.openBlock(),c.createElementBlock("span",Itt,"暂无数据"))]),c.createElementVNode("div",Rtt,[Ott,c.createVNode(P,{effect:"dark",content:"同名配置将会进行覆盖",placement:"right-start"},{default:c.withCtx(()=>[c.createVNode(O,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ed))]),_:1})]),_:1})]),c.createVNode(F,{ref_key:"shortcut_ruleFormRef",ref:d,model:h.value,rules:f.value,"label-width":"90px",size:"default"},{default:c.withCtx(()=>[c.createVNode(D,{label:"配置名称:",prop:"shortcutName"},{default:c.withCtx(()=>[c.createVNode(A,{modelValue:h.value.shortcutName,"onUpdate:modelValue":w[9]||(w[9]=z=>h.value.shortcutName=z),maxlength:"6","show-word-limit":"",style:{width:"160px"}},null,8,["modelValue"])]),_:1}),c.createVNode(D,{label:"交易类型:",prop:"factorType"},{default:c.withCtx(()=>[c.createVNode(S,{type:"danger",plain:h.value.factorType!==1,onClick:w[10]||(w[10]=()=>{h.value.factorType===-1&&(h.value.factorSelectedList=[]),h.value.factorType=1})},{default:c.withCtx(()=>[c.createTextVNode(" 多 ")]),_:1},8,["plain"]),c.createVNode(S,{type:"success",plain:h.value.factorType!==-1,onClick:w[11]||(w[11]=()=>{h.value.factorType===1&&(h.value.factorSelectedList=[]),h.value.factorType=-1})},{default:c.withCtx(()=>[c.createTextVNode(" 空 ")]),_:1},8,["plain"])]),_:1}),c.createVNode(D,{label:"预警因子:",prop:"factorSelectedList"},{default:c.withCtx(()=>[c.createVNode(k,{modelValue:h.value.factorSelectedList,"onUpdate:modelValue":w[12]||(w[12]=z=>h.value.factorSelectedList=z)},{default:c.withCtx(()=>[h.value.factorType===1?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(n.moreFactorOptions,(z,re)=>(c.openBlock(),c.createBlock(N,{key:re,label:z.factorTypeName,value:z.factorTypeName,style:{width:"200px"}},null,8,["label","value"]))),128)):c.createCommentVNode("",!0),h.value.factorType===-1?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(n.emptyFactorOptions,(z,re)=>(c.openBlock(),c.createBlock(N,{key:re,label:z.factorTypeName,value:z.factorTypeName,style:{width:"200px"}},null,8,["label","value"]))),128)):c.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),c.createVNode(D,{label:"预警次数:",prop:"totalCount"},{default:c.withCtx(()=>[c.createVNode(E,{modelValue:h.value.totalCount,"onUpdate:modelValue":w[13]||(w[13]=z=>h.value.totalCount=z),min:1,max:10,"controls-position":"right",style:{"margin-right":"20px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])],64)):c.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1},8,["locale"])])}}},[["__scopeId","data-v-b2d15520"]]),Btt={install(n){n.component("st-factorWarning",Ptt)}},Vtt=c.defineComponent({__name:"index",props:{data:{type:Object,default:()=>({})},config:{type:Object,default:()=>({})}},setup(n,{expose:e}){const t={tooltipFormatter:null,dataZoom:null,grid:{left:"60px",bottom:"20px",right:"0",top:0}};let i,r;const o=n,s=c.ref(),a=c.computed(()=>({...t,...o.config}));c.watch(()=>[o.data],()=>{l()},{deep:!0}),c.onMounted(()=>{i=Kr.init(s.value),l();let u=!0;r=new ResizeObserver(()=>{if(u){u=null;return}i.resize()}),r.observe(s.value)}),c.onUnmounted(()=>{i.dispose(),r.disconnect(),r=null});const l=()=>{i.setOption({tooltip:{confine:!0,formatter:a.value.tooltipFormatter?u=>a.value.tooltipFormatter(u,o.data):null},grid:a.value.grid,xAxis:{type:"category",data:o.data.date},yAxis:{type:"category",inverse:!0,data:o.data.data.map(u=>u.name)},visualMap:{type:"piecewise",show:!1,inRange:[]},dataZoom:a.value.dataZoom,series:[{name:"热力图",type:"heatmap",info:o.data,data:o.data.data.reduce((u,d,h)=>[...u,...d.data.reduce((f,p,g)=>p===null?f:[...f,{value:[g,h,p.value],itemStyle:{color:p.color}}],[])],[]),label:{show:!1}}]})};return e({reset:()=>{l()}}),(u,d)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"chartRef",ref:s,class:"chart"},null,512))}}),aTt="",ztt=Jt(Vtt,[["__scopeId","data-v-4c74604d"]]),Htt={install(n){n.component("st-heatMap",ztt)}},lTt="",uTt="",jtt={class:"st-kline-tips"},Wtt={class:"st-kline-tips-row"},$tt=c.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",jtt,[c.createElementVNode("div",Wtt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,i=>(c.openBlock(),c.createElementBlock("div",{class:"st-kline-tips-row-item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),256))])]))}}),cTt="",JE=Jt($tt,[["__scopeId","data-v-78aed210"]]),Utt=c.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(n,{emit:e}){const t=e,i=c.ref(),r=c.ref(),o=c.ref({display:"none",top:"0px",left:"0px"}),s=()=>{o.value.display="none",t("closeContextMenuCallBack"),document.removeEventListener("click",s)},a=l=>{if(l.preventDefault(),l.stopPropagation(),o.value.display==="block"){const{offsetX:u,offsetY:d}=l,{offsetWidth:h,offsetHeight:f}=r.value;if(u<=h&&d<=f)return}i.value.click(),o.value={display:"block",top:`${l.offsetY}px`,left:`${l.offsetX}px`},c.nextTick(()=>{const{bottom:u,height:d,right:h,width:f}=r.value.getBoundingClientRect();u>window.innerHeight?o.value={display:"block",top:`${l.offsetY-d}px`,left:`${l.offsetX}px`}:h>window.innerWidth&&(o.value={display:"block",top:`${l.offsetY}px`,left:`${l.offsetX-f}px`})}),document.addEventListener("click",s)};return(l,u)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"contextmenuRef",ref:i,class:"contextmenu",onContextmenu:a,onMouseleave:s},[c.renderSlot(l.$slots,"default",{},void 0,!0),o.value.display!=="none"?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:r,class:"contextmenu-popover",style:c.normalizeStyle(o.value)},[c.renderSlot(l.$slots,"popover",{},void 0,!0)],4)):c.createCommentVNode("",!0)],544))}}),dTt="",qtt=Jt(Utt,[["__scopeId","data-v-249fd104"]]);var ek=function(){var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(n=n||__filename),function(e){e=e||{};var t=typeof e<"u"?e:{},i,r;t.ready=new Promise(function(Ee,Te){i=Ee,r=Te});var o={},s;for(s in t)t.hasOwnProperty(s)&&(o[s]=t[s]);var a=function(Ee,Te){throw Te},l=!1,u=!1,d=!1,h=!1;l=typeof window=="object",u=typeof importScripts=="function",d=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",h=!l&&!d&&!u;var f="";function p(Ee){return t.locateFile?t.locateFile(Ee,f):f+Ee}var g,m,y,_;d?(u?f=require("path").dirname(f)+"/":f=__dirname+"/",g=function(Te,Ue){return y||(y=require("fs")),_||(_=require("path")),Te=_.normalize(Te),y.readFileSync(Te,Ue?null:"utf8")},m=function(Te){var Ue=g(Te,!0);return Ue.buffer||(Ue=new Uint8Array(Ue)),F(Ue.buffer),Ue},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(Ee){if(!(Ee instanceof Ne))throw Ee}),process.on("unhandledRejection",fe),a=function(Ee){process.exit(Ee)},t.inspect=function(){return"[Emscripten Module object]"}):h?(typeof read<"u"&&(g=function(Te){return read(Te)}),m=function(Te){var Ue;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Te)):(Ue=read(Te,"binary"),F(typeof Ue=="object"),Ue)},typeof scriptArgs<"u"&&scriptArgs,typeof quit=="function"&&(a=function(Ee){quit(Ee)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(l||u)&&(u?f=self.location.href:document.currentScript&&(f=document.currentScript.src),n&&(f=n),f.indexOf("blob:")!==0?f=f.substr(0,f.lastIndexOf("/")+1):f="",g=function(Te){var Ue=new XMLHttpRequest;return Ue.open("GET",Te,!1),Ue.send(null),Ue.responseText},u&&(m=function(Te){var Ue=new XMLHttpRequest;return Ue.open("GET",Te,!1),Ue.responseType="arraybuffer",Ue.send(null),new Uint8Array(Ue.response)})),t.print||console.log.bind(console);var C=t.printErr||console.warn.bind(console);for(s in o)o.hasOwnProperty(s)&&(t[s]=o[s]);o=null,t.arguments&&t.arguments,t.thisProgram&&t.thisProgram,t.quit&&(a=t.quit);var b=16;function v(Ee,Te){return Te||(Te=b),Math.ceil(Ee/Te)*Te}function w(Ee,Te){if(typeof WebAssembly.Function=="function"){for(var Ue={i:"i32",j:"i64",f:"f32",d:"f64"},tt={parameters:[],results:Te[0]=="v"?[]:[Ue[Te[0]]]},Ut=1;Ut<Te.length;++Ut)tt.parameters.push(Ue[Te[Ut]]);return new WebAssembly.Function(tt,Ee)}var Zt=[1,0,1,96],Lt=Te.slice(0,1),zt=Te.slice(1),nr={i:127,j:126,f:125,d:124};Zt.push(zt.length);for(var Ut=0;Ut<zt.length;++Ut)Zt.push(nr[zt[Ut]]);Lt=="v"?Zt.push(0):Zt=Zt.concat([1,nr[Lt]]),Zt[1]=Zt.length-2;var mi=new Uint8Array([0,97,115,109,1,0,0,0].concat(Zt,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0])),lr=new WebAssembly.Module(mi),n1=new WebAssembly.Instance(lr,{e:{f:Ee}}),n3=n1.exports.f;return n3}var x=[],S;function D(Ee,Te){var Ue=ve;if(!S){S=new WeakMap;for(var tt=0;tt<Ue.length;tt++){var Ut=Ue.get(tt);Ut&&S.set(Ut,tt)}}if(S.has(Ee))return S.get(Ee);var Zt;if(x.length)Zt=x.pop();else{Zt=Ue.length;try{Ue.grow(1)}catch(zt){throw zt instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":zt}}try{Ue.set(Zt,Ee)}catch(zt){if(!(zt instanceof TypeError))throw zt;var Lt=w(Ee,Te);Ue.set(Zt,Lt)}return S.set(Ee,Zt),Zt}function N(Ee,Te){return D(Ee,Te)}var k;t.wasmBinary&&(k=t.wasmBinary);var E;t.noExitRuntime&&(E=t.noExitRuntime),typeof WebAssembly!="object"&&fe("no native wasm support detected");var L,ve,A=!1;function F(Ee,Te){Ee||fe("Assertion failed: "+Te)}function R(Ee){var Te=t["_"+Ee];return F(Te,"Cannot call unknown function "+Ee+", make sure it is exported"),Te}function I(Ee,Te,Ue,tt,Ut){var Zt={string:function(_a){var Sd=0;if(_a!=null&&_a!==0){var ya=(_a.length<<2)+1;Sd=Fe(ya),z(_a,Sd,ya)}return Sd},array:function(_a){var Sd=Fe(_a.length);return re(_a,Sd),Sd}};function Lt(_a){return Te==="string"?Y(_a):Te==="boolean"?!!_a:_a}var zt=R(Ee),nr=[],mi=0;if(tt)for(var lr=0;lr<tt.length;lr++){var n1=Zt[Ue[lr]];n1?(mi===0&&(mi=t1()),nr[lr]=n1(tt[lr])):nr[lr]=tt[lr]}var n3=zt.apply(null,nr);return n3=Lt(n3),mi!==0&&Za(mi),n3}var M=1;function O(Ee,Te){var Ue;return Te==M?Ue=Fe(Ee.length):Ue=Uo(Ee.length),Ee.subarray||Ee.slice?oe.set(Ee,Ue):oe.set(new Uint8Array(Ee),Ue),Ue}var P=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function U(Ee,Te,Ue){for(var tt=Te+Ue,Ut=Te;Ee[Ut]&&!(Ut>=tt);)++Ut;if(Ut-Te>16&&Ee.subarray&&P)return P.decode(Ee.subarray(Te,Ut));for(var Zt="";Te<Ut;){var Lt=Ee[Te++];if(!(Lt&128)){Zt+=String.fromCharCode(Lt);continue}var zt=Ee[Te++]&63;if((Lt&224)==192){Zt+=String.fromCharCode((Lt&31)<<6|zt);continue}var nr=Ee[Te++]&63;if((Lt&240)==224?Lt=(Lt&15)<<12|zt<<6|nr:Lt=(Lt&7)<<18|zt<<12|nr<<6|Ee[Te++]&63,Lt<65536)Zt+=String.fromCharCode(Lt);else{var mi=Lt-65536;Zt+=String.fromCharCode(55296|mi>>10,56320|mi&1023)}}return Zt}function Y(Ee,Te){return Ee?U(oe,Ee,Te):""}function j(Ee,Te,Ue,tt){if(!(tt>0))return 0;for(var Ut=Ue,Zt=Ue+tt-1,Lt=0;Lt<Ee.length;++Lt){var zt=Ee.charCodeAt(Lt);if(zt>=55296&&zt<=57343){var nr=Ee.charCodeAt(++Lt);zt=65536+((zt&1023)<<10)|nr&1023}if(zt<=127){if(Ue>=Zt)break;Te[Ue++]=zt}else if(zt<=2047){if(Ue+1>=Zt)break;Te[Ue++]=192|zt>>6,Te[Ue++]=128|zt&63}else if(zt<=65535){if(Ue+2>=Zt)break;Te[Ue++]=224|zt>>12,Te[Ue++]=128|zt>>6&63,Te[Ue++]=128|zt&63}else{if(Ue+3>=Zt)break;Te[Ue++]=240|zt>>18,Te[Ue++]=128|zt>>12&63,Te[Ue++]=128|zt>>6&63,Te[Ue++]=128|zt&63}}return Te[Ue]=0,Ue-Ut}function z(Ee,Te,Ue){return j(Ee,oe,Te,Ue)}function re(Ee,Te){ne.set(Ee,Te)}var ce=65536,le,ne,oe;function he(Ee){le=Ee,t.HEAP8=ne=new Int8Array(Ee),t.HEAP16=new Int16Array(Ee),t.HEAP32=new Int32Array(Ee),t.HEAPU8=oe=new Uint8Array(Ee),t.HEAPU16=new Uint16Array(Ee),t.HEAPU32=new Uint32Array(Ee),t.HEAPF32=new Float32Array(Ee),t.HEAPF64=new Float64Array(Ee)}var pe=5247776;t.___heap_base=5247776;var de=t.INITIAL_MEMORY||16777216;t.wasmMemory?L=t.wasmMemory:L=new WebAssembly.Memory({initial:de/ce,maximum:de/ce}),L&&(le=L.buffer),de=le.byteLength,he(le);var ve=new WebAssembly.Table({initial:1,element:"anyfunc"}),Le=[],ie=[],W=[],te=[],Z=!1;function X(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)J(t.preRun.shift());be(Le)}function ee(){Z=!0,be(ie)}function K(){be(W)}function Q(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)B(t.postRun.shift());be(te)}function J(Ee){Le.unshift(Ee)}function B(Ee){te.unshift(Ee)}var V=0,q=null;function G(Ee){V++,t.monitorRunDependencies&&t.monitorRunDependencies(V)}function ae(Ee){if(V--,t.monitorRunDependencies&&t.monitorRunDependencies(V),V==0&&q){var Te=q;q=null,Te()}}t.preloadedImages={},t.preloadedAudios={},t.preloadedWasm={},J(zl);function fe(Ee){t.onAbort&&t.onAbort(Ee),Ee+="",C(Ee),A=!0,Ee="abort("+Ee+"). Build with -s ASSERTIONS=1 for more info.";var Te=new WebAssembly.RuntimeError(Ee);throw r(Te),Te}function we(Ee,Te){return String.prototype.startsWith?Ee.startsWith(Te):Ee.indexOf(Te)===0}var _e="data:application/octet-stream;base64,";function xe(Ee){return we(Ee,_e)}var Se="file://";function $e(Ee){return we(Ee,Se)}var Ve="talib.wasm";xe(Ve)||(Ve=p(Ve));function Ie(){try{if(k)return new Uint8Array(k);if(m)return m(Ve);throw"both async and sync fetching of the wasm failed"}catch(Ee){fe(Ee)}}function rt(){return!k&&(l||u)&&typeof fetch=="function"&&!$e(Ve)?fetch(Ve,{credentials:"same-origin"}).then(function(Ee){if(!Ee.ok)throw"failed to load wasm binary file at '"+Ve+"'";return Ee.arrayBuffer()}).catch(function(){return Ie()}):Promise.resolve().then(Ie)}function H(){var Ee={env:xd,wasi_snapshot_preview1:xd};function Te(Lt,zt){var nr=Lt.exports;nr=$o(nr,1024),t.asm=nr,ae()}G();function Ue(Lt){Te(Lt.instance)}function tt(Lt){return rt().then(function(zt){return WebAssembly.instantiate(zt,Ee)}).then(Lt,function(zt){C("failed to asynchronously prepare wasm: "+zt),fe(zt)})}function Ut(){if(!k&&typeof WebAssembly.instantiateStreaming=="function"&&!xe(Ve)&&!$e(Ve)&&typeof fetch=="function")fetch(Ve,{credentials:"same-origin"}).then(function(Lt){var zt=WebAssembly.instantiateStreaming(Lt,Ee);return zt.then(Ue,function(nr){return C("wasm streaming compile failed: "+nr),C("falling back to ArrayBuffer instantiation"),tt(Ue)})});else return tt(Ue)}if(t.instantiateWasm)try{var Zt=t.instantiateWasm(Ee,Te);return Zt}catch(Lt){return C("Module.instantiateWasm callback failed with error: "+Lt),!1}return Ut(),{}}function be(Ee){for(;Ee.length>0;){var Te=Ee.shift();if(typeof Te=="function"){Te(t);continue}var Ue=Te.func;typeof Ue=="number"?Te.arg===void 0?ve.get(Ue)():ve.get(Ue)(Te.arg):Ue(Te.arg===void 0?null:Te.arg)}}function De(Ee,Te,Ue){return Ue&&Ue.length?t["dynCall_"+Ee].apply(null,[Te].concat(Ue)):t["dynCall_"+Ee].call(null,Te)}function je(Ee,Te,Ue){return Ee.indexOf("j")!=-1?De(Ee,Te,Ue):ve.get(Te).apply(null,Ue)}var lt={nextHandle:1,loadedLibs:{},loadedLibNames:{}};function Dt(Ee){return function(){var Te=t1();try{return je(Ee,arguments[0],Array.prototype.slice.call(arguments,1))}catch(Ue){if(Za(Te),Ue!==Ue+0&&Ue!=="longjmp")throw Ue;_setThrew(1,0)}}}function Ni(Ee){if(Z)return Uo(Ee);var Te=t.___heap_base,Ue=Te+Ee+15&-16;return t.___heap_base=Ue,Te}function $o(Ee,Te,Ue){var tt={};for(var Ut in Ee){var Zt=Ee[Ut];typeof Zt=="object"&&(Zt=Zt.value),typeof Zt=="number"&&(Zt+=Te),tt[Ut]=Zt,Ue&&(Ue["_"+Ut]=Zt)}return tt}function ba(Ee){var Te=["setTempRet0","getTempRet0","stackAlloc","stackSave","stackRestore"];return Ee.indexOf("dynCall_")==0||Te.indexOf(Ee)!=-1?Ee:"_"+Ee}function Ya(Ee,Te){var Ue=new Uint32Array(new Uint8Array(Ee.subarray(0,24)).buffer);F(Ue[0]==1836278016,"need to see wasm magic number"),F(Ee[8]===0,"need the dylink section to be first");var tt=9;function Ut(){for(var ya=0,xg=1;;){var Eh=Ee[tt++];if(ya+=(Eh&127)*xg,xg*=128,!(Eh&128))break}return ya}Ut(),F(Ee[tt]===6),tt++,F(Ee[tt]==="d".charCodeAt(0)),tt++,F(Ee[tt]==="y".charCodeAt(0)),tt++,F(Ee[tt]==="l".charCodeAt(0)),tt++,F(Ee[tt]==="i".charCodeAt(0)),tt++,F(Ee[tt]==="n".charCodeAt(0)),tt++,F(Ee[tt]==="k".charCodeAt(0)),tt++;var Zt=Ut(),Lt=Ut(),zt=Ut();Ut();for(var nr=Ut(),mi=[],lr=0;lr<nr;++lr){var n1=Ut(),n3=Ee.subarray(tt,tt+n1);tt+=n1;var _a=U(n3,0);mi.push(_a)}function Sd(){Lt=Math.pow(2,Lt),Lt=Math.max(Lt,b);var ya=v(Ni(Zt+Lt),Lt),xg=xd,Eh=ve,GO=Eh.length,$Lt=Eh;Eh.grow(zt),F(Eh===$Lt);for(var i3=ya;i3<ya+Zt;i3++)ne[i3]=0;for(var i3=GO;i3<GO+zt;i3++)Eh.set(i3,null);var YO={},QO=function(_s,va,kh){kh&&(_s="orig$"+_s);var Ks=t.asm[_s];if(!Ks){var Y8=ba(_s);Ks=t[Y8],Ks||(Ks=YO[Y8]),!Ks&&_s.startsWith("invoke_")&&(Ks=Dt(_s.split("_")[1]))}return Ks};for(var ZO in t)ZO in xg||(xg[ZO]=t[ZO]);var ULt={get:function(_s,va){switch(va){case"__memory_base":return ya;case"__table_base":return GO}if(va in _s)return _s[va];if(va.startsWith("g$")){var kh=va.substr(2);return _s[va]=function(){return QO(kh)}}if(va.startsWith("fp$")){var Ks=va.split("$");F(Ks.length==3);var kh=Ks[1],Y8=Ks[2],KLt=Y8.indexOf("j")>=0,XO=0;return _s[va]=function(){if(!XO){var GLt=QO(kh,"function",KLt);XO=N(GLt,Y8)}return XO}}return _s[va]=function(){return QO(va).apply(null,arguments)}}},b0e=new Proxy(xg,ULt),_0e={global:{NaN:NaN,Infinity:1/0},"global.Math":Math,env:b0e,wasi_snapshot_preview1:b0e};function y0e(_s,va){var kh=$o(_s.exports,ya,va),Ks=kh.__post_instantiate;return Ks&&(Z?Ks():ie.push(Ks)),kh}if(Te.loadAsync)return WebAssembly.instantiate(Ee,_0e).then(function(_s){return y0e(_s.instance,YO)});var qLt=new WebAssembly.Instance(new WebAssembly.Module(Ee),_0e);return y0e(qLt,YO)}return Te.loadAsync?Promise.all(mi.map(function(ya){return ms(ya,Te)})).then(function(){return Sd()}):(mi.forEach(function(ya){ms(ya,Te)}),Sd())}function Qa(Ee){return fetch(Ee,{credentials:"same-origin"}).then(function(Te){if(!Te.ok)throw"failed to load binary file at '"+Ee+"'";return Te.arrayBuffer()}).then(function(Te){return new Uint8Array(Te)})}function ms(Ee,Te){Ee=="__self__"&&!lt.loadedLibNames[Ee]&&(lt.loadedLibs[-1]={refcount:1/0,name:"__self__",module:t.asm,global:!0},lt.loadedLibNames.__self__=-1),Te=Te||{global:!0,nodelete:!0};var Ue=lt.loadedLibNames[Ee],tt;if(Ue)return tt=lt.loadedLibs[Ue],Te.global&&!tt.global&&(tt.global=!0,tt.module!=="loading"&&zt(tt.module)),Te.nodelete&&tt.refcount!==1/0&&(tt.refcount=1/0),tt.refcount++,Te.loadAsync?Promise.resolve(Ue):Ue;Ue=lt.nextHandle++,tt={refcount:Te.nodelete?1/0:1,name:Ee,module:"loading",global:Te.global},lt.loadedLibNames[Ee]=Ue,lt.loadedLibs[Ue]=tt;function Ut(mi){if(Te.fs){var lr=Te.fs.readFile(mi,{encoding:"binary"});return lr instanceof Uint8Array||(lr=new Uint8Array(lib_data)),Te.loadAsync?Promise.resolve(lr):lr}return Te.loadAsync?Qa(mi):m(mi)}function Zt(mi){return Ya(mi,Te)}function Lt(){if(t.preloadedWasm!==void 0&&t.preloadedWasm[Ee]!==void 0){var mi=t.preloadedWasm[Ee];return Te.loadAsync?Promise.resolve(mi):mi}return Te.loadAsync?Ut(Ee).then(function(lr){return Zt(lr)}):Zt(Ut(Ee))}function zt(mi){for(var lr in mi)if(mi.hasOwnProperty(lr)){var n1=ba(lr);t.hasOwnProperty(n1)||(t[n1]=mi[lr])}}function nr(mi){tt.global&&zt(mi),tt.module=mi}return Te.loadAsync?Lt().then(function(mi){return nr(mi),Ue}):(nr(Lt()),Ue)}function zl(){var Ee=[];if(t.dynamicLibraries&&(Ee=Ee.concat(t.dynamicLibraries)),!!Ee.length){if(!m){G(),Promise.all(Ee.map(function(Te){return ms(Te,{loadAsync:!0,global:!0,nodelete:!0})})).then(function(){ae()});return}Ee.forEach(function(Te){ms(Te,{global:!0,nodelete:!0})})}}function bs(Ee,Te,Ue){oe.copyWithin(Ee,Te,Te+Ue)}function Uu(Ee){fe("OOM")}function qu(Ee){Uu()}function Ku(){return t.___heap_base}ie.push({func:function(){ot()}},{func:function(){Gu()}});var xd={__indirect_function_table:ve,__memory_base:1024,__stack_pointer:pe,__table_base:1,emscripten_memcpy_big:bs,emscripten_resize_heap:qu,g$__heap_base:Ku,memory:L};H();var Gu=t.___wasm_call_ctors=function(){return(Gu=t.___wasm_call_ctors=t.asm.__wasm_call_ctors).apply(null,arguments)};t._TA_ACCBANDS=function(){return(t._TA_ACCBANDS=t.asm.TA_ACCBANDS).apply(null,arguments)};var Uo=t._malloc=function(){return(Uo=t._malloc=t.asm.malloc).apply(null,arguments)};t._free=function(){return(t._free=t.asm.free).apply(null,arguments)},t._TA_SMA=function(){return(t._TA_SMA=t.asm.TA_SMA).apply(null,arguments)},t._TA_ACOS=function(){return(t._TA_ACOS=t.asm.TA_ACOS).apply(null,arguments)},t._TA_AD=function(){return(t._TA_AD=t.asm.TA_AD).apply(null,arguments)},t._TA_ADD=function(){return(t._TA_ADD=t.asm.TA_ADD).apply(null,arguments)},t._TA_ADOSC=function(){return(t._TA_ADOSC=t.asm.TA_ADOSC).apply(null,arguments)},t._TA_ADX=function(){return(t._TA_ADX=t.asm.TA_ADX).apply(null,arguments)},t._TA_ADXR=function(){return(t._TA_ADXR=t.asm.TA_ADXR).apply(null,arguments)},t._TA_APO=function(){return(t._TA_APO=t.asm.TA_APO).apply(null,arguments)},t._TA_MA=function(){return(t._TA_MA=t.asm.TA_MA).apply(null,arguments)},t._TA_AROON=function(){return(t._TA_AROON=t.asm.TA_AROON).apply(null,arguments)},t._TA_AROONOSC=function(){return(t._TA_AROONOSC=t.asm.TA_AROONOSC).apply(null,arguments)},t._TA_ASIN=function(){return(t._TA_ASIN=t.asm.TA_ASIN).apply(null,arguments)},t._TA_ATAN=function(){return(t._TA_ATAN=t.asm.TA_ATAN).apply(null,arguments)},t._TA_ATR=function(){return(t._TA_ATR=t.asm.TA_ATR).apply(null,arguments)},t._TA_TRANGE=function(){return(t._TA_TRANGE=t.asm.TA_TRANGE).apply(null,arguments)},t._TA_AVGDEV=function(){return(t._TA_AVGDEV=t.asm.TA_AVGDEV).apply(null,arguments)},t._TA_AVGPRICE=function(){return(t._TA_AVGPRICE=t.asm.TA_AVGPRICE).apply(null,arguments)},t._TA_BBANDS=function(){return(t._TA_BBANDS=t.asm.TA_BBANDS).apply(null,arguments)},t._TA_STDDEV=function(){return(t._TA_STDDEV=t.asm.TA_STDDEV).apply(null,arguments)},t._TA_BETA=function(){return(t._TA_BETA=t.asm.TA_BETA).apply(null,arguments)},t._TA_BOP=function(){return(t._TA_BOP=t.asm.TA_BOP).apply(null,arguments)},t._TA_CCI=function(){return(t._TA_CCI=t.asm.TA_CCI).apply(null,arguments)},t._TA_CDL2CROWS=function(){return(t._TA_CDL2CROWS=t.asm.TA_CDL2CROWS).apply(null,arguments)},t._TA_CDL3BLACKCROWS=function(){return(t._TA_CDL3BLACKCROWS=t.asm.TA_CDL3BLACKCROWS).apply(null,arguments)},t._TA_CDL3INSIDE=function(){return(t._TA_CDL3INSIDE=t.asm.TA_CDL3INSIDE).apply(null,arguments)},t._TA_CDL3LINESTRIKE=function(){return(t._TA_CDL3LINESTRIKE=t.asm.TA_CDL3LINESTRIKE).apply(null,arguments)},t._TA_CDL3OUTSIDE=function(){return(t._TA_CDL3OUTSIDE=t.asm.TA_CDL3OUTSIDE).apply(null,arguments)},t._TA_CDL3STARSINSOUTH=function(){return(t._TA_CDL3STARSINSOUTH=t.asm.TA_CDL3STARSINSOUTH).apply(null,arguments)},t._TA_CDL3WHITESOLDIERS=function(){return(t._TA_CDL3WHITESOLDIERS=t.asm.TA_CDL3WHITESOLDIERS).apply(null,arguments)},t._TA_CDLABANDONEDBABY=function(){return(t._TA_CDLABANDONEDBABY=t.asm.TA_CDLABANDONEDBABY).apply(null,arguments)},t._TA_CDLADVANCEBLOCK=function(){return(t._TA_CDLADVANCEBLOCK=t.asm.TA_CDLADVANCEBLOCK).apply(null,arguments)},t._TA_CDLBELTHOLD=function(){return(t._TA_CDLBELTHOLD=t.asm.TA_CDLBELTHOLD).apply(null,arguments)},t._TA_CDLBREAKAWAY=function(){return(t._TA_CDLBREAKAWAY=t.asm.TA_CDLBREAKAWAY).apply(null,arguments)},t._TA_CDLCLOSINGMARUBOZU=function(){return(t._TA_CDLCLOSINGMARUBOZU=t.asm.TA_CDLCLOSINGMARUBOZU).apply(null,arguments)},t._TA_CDLCONCEALBABYSWALL=function(){return(t._TA_CDLCONCEALBABYSWALL=t.asm.TA_CDLCONCEALBABYSWALL).apply(null,arguments)},t._TA_CDLCOUNTERATTACK=function(){return(t._TA_CDLCOUNTERATTACK=t.asm.TA_CDLCOUNTERATTACK).apply(null,arguments)},t._TA_CDLDARKCLOUDCOVER=function(){return(t._TA_CDLDARKCLOUDCOVER=t.asm.TA_CDLDARKCLOUDCOVER).apply(null,arguments)},t._TA_CDLDOJI=function(){return(t._TA_CDLDOJI=t.asm.TA_CDLDOJI).apply(null,arguments)},t._TA_CDLDOJISTAR=function(){return(t._TA_CDLDOJISTAR=t.asm.TA_CDLDOJISTAR).apply(null,arguments)},t._TA_CDLDRAGONFLYDOJI=function(){return(t._TA_CDLDRAGONFLYDOJI=t.asm.TA_CDLDRAGONFLYDOJI).apply(null,arguments)},t._TA_CDLENGULFING=function(){return(t._TA_CDLENGULFING=t.asm.TA_CDLENGULFING).apply(null,arguments)},t._TA_CDLEVENINGDOJISTAR=function(){return(t._TA_CDLEVENINGDOJISTAR=t.asm.TA_CDLEVENINGDOJISTAR).apply(null,arguments)},t._TA_CDLEVENINGSTAR=function(){return(t._TA_CDLEVENINGSTAR=t.asm.TA_CDLEVENINGSTAR).apply(null,arguments)},t._TA_CDLGAPSIDESIDEWHITE=function(){return(t._TA_CDLGAPSIDESIDEWHITE=t.asm.TA_CDLGAPSIDESIDEWHITE).apply(null,arguments)},t._TA_CDLGRAVESTONEDOJI=function(){return(t._TA_CDLGRAVESTONEDOJI=t.asm.TA_CDLGRAVESTONEDOJI).apply(null,arguments)},t._TA_CDLHAMMER=function(){return(t._TA_CDLHAMMER=t.asm.TA_CDLHAMMER).apply(null,arguments)},t._TA_CDLHANGINGMAN=function(){return(t._TA_CDLHANGINGMAN=t.asm.TA_CDLHANGINGMAN).apply(null,arguments)},t._TA_CDLHARAMI=function(){return(t._TA_CDLHARAMI=t.asm.TA_CDLHARAMI).apply(null,arguments)},t._TA_CDLHARAMICROSS=function(){return(t._TA_CDLHARAMICROSS=t.asm.TA_CDLHARAMICROSS).apply(null,arguments)},t._TA_CDLHIGHWAVE=function(){return(t._TA_CDLHIGHWAVE=t.asm.TA_CDLHIGHWAVE).apply(null,arguments)},t._TA_CDLHIKKAKE=function(){return(t._TA_CDLHIKKAKE=t.asm.TA_CDLHIKKAKE).apply(null,arguments)},t._TA_CDLHIKKAKEMOD=function(){return(t._TA_CDLHIKKAKEMOD=t.asm.TA_CDLHIKKAKEMOD).apply(null,arguments)},t._TA_CDLHOMINGPIGEON=function(){return(t._TA_CDLHOMINGPIGEON=t.asm.TA_CDLHOMINGPIGEON).apply(null,arguments)},t._TA_CDLIDENTICAL3CROWS=function(){return(t._TA_CDLIDENTICAL3CROWS=t.asm.TA_CDLIDENTICAL3CROWS).apply(null,arguments)},t._TA_CDLINNECK=function(){return(t._TA_CDLINNECK=t.asm.TA_CDLINNECK).apply(null,arguments)},t._TA_CDLINVERTEDHAMMER=function(){return(t._TA_CDLINVERTEDHAMMER=t.asm.TA_CDLINVERTEDHAMMER).apply(null,arguments)},t._TA_CDLKICKING=function(){return(t._TA_CDLKICKING=t.asm.TA_CDLKICKING).apply(null,arguments)},t._TA_CDLKICKINGBYLENGTH=function(){return(t._TA_CDLKICKINGBYLENGTH=t.asm.TA_CDLKICKINGBYLENGTH).apply(null,arguments)},t._TA_CDLLADDERBOTTOM=function(){return(t._TA_CDLLADDERBOTTOM=t.asm.TA_CDLLADDERBOTTOM).apply(null,arguments)},t._TA_CDLLONGLEGGEDDOJI=function(){return(t._TA_CDLLONGLEGGEDDOJI=t.asm.TA_CDLLONGLEGGEDDOJI).apply(null,arguments)},t._TA_CDLLONGLINE=function(){return(t._TA_CDLLONGLINE=t.asm.TA_CDLLONGLINE).apply(null,arguments)},t._TA_CDLMARUBOZU=function(){return(t._TA_CDLMARUBOZU=t.asm.TA_CDLMARUBOZU).apply(null,arguments)},t._TA_CDLMATCHINGLOW=function(){return(t._TA_CDLMATCHINGLOW=t.asm.TA_CDLMATCHINGLOW).apply(null,arguments)},t._TA_CDLMATHOLD=function(){return(t._TA_CDLMATHOLD=t.asm.TA_CDLMATHOLD).apply(null,arguments)},t._TA_CDLMORNINGDOJISTAR=function(){return(t._TA_CDLMORNINGDOJISTAR=t.asm.TA_CDLMORNINGDOJISTAR).apply(null,arguments)},t._TA_CDLMORNINGSTAR=function(){return(t._TA_CDLMORNINGSTAR=t.asm.TA_CDLMORNINGSTAR).apply(null,arguments)},t._TA_CDLONNECK=function(){return(t._TA_CDLONNECK=t.asm.TA_CDLONNECK).apply(null,arguments)},t._TA_CDLPIERCING=function(){return(t._TA_CDLPIERCING=t.asm.TA_CDLPIERCING).apply(null,arguments)},t._TA_CDLRICKSHAWMAN=function(){return(t._TA_CDLRICKSHAWMAN=t.asm.TA_CDLRICKSHAWMAN).apply(null,arguments)},t._TA_CDLRISEFALL3METHODS=function(){return(t._TA_CDLRISEFALL3METHODS=t.asm.TA_CDLRISEFALL3METHODS).apply(null,arguments)},t._TA_CDLSEPARATINGLINES=function(){return(t._TA_CDLSEPARATINGLINES=t.asm.TA_CDLSEPARATINGLINES).apply(null,arguments)},t._TA_CDLSHOOTINGSTAR=function(){return(t._TA_CDLSHOOTINGSTAR=t.asm.TA_CDLSHOOTINGSTAR).apply(null,arguments)},t._TA_CDLSHORTLINE=function(){return(t._TA_CDLSHORTLINE=t.asm.TA_CDLSHORTLINE).apply(null,arguments)},t._TA_CDLSPINNINGTOP=function(){return(t._TA_CDLSPINNINGTOP=t.asm.TA_CDLSPINNINGTOP).apply(null,arguments)},t._TA_CDLSTALLEDPATTERN=function(){return(t._TA_CDLSTALLEDPATTERN=t.asm.TA_CDLSTALLEDPATTERN).apply(null,arguments)},t._TA_CDLSTICKSANDWICH=function(){return(t._TA_CDLSTICKSANDWICH=t.asm.TA_CDLSTICKSANDWICH).apply(null,arguments)},t._TA_CDLTAKURI=function(){return(t._TA_CDLTAKURI=t.asm.TA_CDLTAKURI).apply(null,arguments)},t._TA_CDLTASUKIGAP=function(){return(t._TA_CDLTASUKIGAP=t.asm.TA_CDLTASUKIGAP).apply(null,arguments)},t._TA_CDLTHRUSTING=function(){return(t._TA_CDLTHRUSTING=t.asm.TA_CDLTHRUSTING).apply(null,arguments)},t._TA_CDLTRISTAR=function(){return(t._TA_CDLTRISTAR=t.asm.TA_CDLTRISTAR).apply(null,arguments)},t._TA_CDLUNIQUE3RIVER=function(){return(t._TA_CDLUNIQUE3RIVER=t.asm.TA_CDLUNIQUE3RIVER).apply(null,arguments)},t._TA_CDLUPSIDEGAP2CROWS=function(){return(t._TA_CDLUPSIDEGAP2CROWS=t.asm.TA_CDLUPSIDEGAP2CROWS).apply(null,arguments)},t._TA_CDLXSIDEGAP3METHODS=function(){return(t._TA_CDLXSIDEGAP3METHODS=t.asm.TA_CDLXSIDEGAP3METHODS).apply(null,arguments)},t._TA_CEIL=function(){return(t._TA_CEIL=t.asm.TA_CEIL).apply(null,arguments)},t._TA_CMO=function(){return(t._TA_CMO=t.asm.TA_CMO).apply(null,arguments)},t._TA_CORREL=function(){return(t._TA_CORREL=t.asm.TA_CORREL).apply(null,arguments)},t._TA_COS=function(){return(t._TA_COS=t.asm.TA_COS).apply(null,arguments)},t._TA_COSH=function(){return(t._TA_COSH=t.asm.TA_COSH).apply(null,arguments)},t._TA_DEMA=function(){return(t._TA_DEMA=t.asm.TA_DEMA).apply(null,arguments)},t._TA_DIV=function(){return(t._TA_DIV=t.asm.TA_DIV).apply(null,arguments)},t._TA_DX=function(){return(t._TA_DX=t.asm.TA_DX).apply(null,arguments)},t._TA_EMA=function(){return(t._TA_EMA=t.asm.TA_EMA).apply(null,arguments)},t._TA_EXP=function(){return(t._TA_EXP=t.asm.TA_EXP).apply(null,arguments)},t._TA_FLOOR=function(){return(t._TA_FLOOR=t.asm.TA_FLOOR).apply(null,arguments)},t._TA_HT_DCPERIOD=function(){return(t._TA_HT_DCPERIOD=t.asm.TA_HT_DCPERIOD).apply(null,arguments)},t._TA_HT_DCPHASE=function(){return(t._TA_HT_DCPHASE=t.asm.TA_HT_DCPHASE).apply(null,arguments)},t._TA_HT_PHASOR=function(){return(t._TA_HT_PHASOR=t.asm.TA_HT_PHASOR).apply(null,arguments)},t._TA_HT_SINE=function(){return(t._TA_HT_SINE=t.asm.TA_HT_SINE).apply(null,arguments)},t._TA_HT_TRENDLINE=function(){return(t._TA_HT_TRENDLINE=t.asm.TA_HT_TRENDLINE).apply(null,arguments)},t._TA_HT_TRENDMODE=function(){return(t._TA_HT_TRENDMODE=t.asm.TA_HT_TRENDMODE).apply(null,arguments)},t._TA_IMI=function(){return(t._TA_IMI=t.asm.TA_IMI).apply(null,arguments)},t._TA_KAMA=function(){return(t._TA_KAMA=t.asm.TA_KAMA).apply(null,arguments)},t._TA_LINEARREG=function(){return(t._TA_LINEARREG=t.asm.TA_LINEARREG).apply(null,arguments)},t._TA_LINEARREG_ANGLE=function(){return(t._TA_LINEARREG_ANGLE=t.asm.TA_LINEARREG_ANGLE).apply(null,arguments)},t._TA_LINEARREG_INTERCEPT=function(){return(t._TA_LINEARREG_INTERCEPT=t.asm.TA_LINEARREG_INTERCEPT).apply(null,arguments)},t._TA_LINEARREG_SLOPE=function(){return(t._TA_LINEARREG_SLOPE=t.asm.TA_LINEARREG_SLOPE).apply(null,arguments)},t._TA_LN=function(){return(t._TA_LN=t.asm.TA_LN).apply(null,arguments)},t._TA_LOG10=function(){return(t._TA_LOG10=t.asm.TA_LOG10).apply(null,arguments)},t._TA_WMA=function(){return(t._TA_WMA=t.asm.TA_WMA).apply(null,arguments)},t._TA_TEMA=function(){return(t._TA_TEMA=t.asm.TA_TEMA).apply(null,arguments)},t._TA_TRIMA=function(){return(t._TA_TRIMA=t.asm.TA_TRIMA).apply(null,arguments)},t._TA_MAMA=function(){return(t._TA_MAMA=t.asm.TA_MAMA).apply(null,arguments)},t._TA_T3=function(){return(t._TA_T3=t.asm.TA_T3).apply(null,arguments)},t._TA_MACD=function(){return(t._TA_MACD=t.asm.TA_MACD).apply(null,arguments)},t._TA_MACDEXT=function(){return(t._TA_MACDEXT=t.asm.TA_MACDEXT).apply(null,arguments)},t._TA_MACDFIX=function(){return(t._TA_MACDFIX=t.asm.TA_MACDFIX).apply(null,arguments)},t._TA_MAVP=function(){return(t._TA_MAVP=t.asm.TA_MAVP).apply(null,arguments)},t._TA_MAX=function(){return(t._TA_MAX=t.asm.TA_MAX).apply(null,arguments)},t._TA_MAXINDEX=function(){return(t._TA_MAXINDEX=t.asm.TA_MAXINDEX).apply(null,arguments)},t._TA_MEDPRICE=function(){return(t._TA_MEDPRICE=t.asm.TA_MEDPRICE).apply(null,arguments)},t._TA_MFI=function(){return(t._TA_MFI=t.asm.TA_MFI).apply(null,arguments)},t._TA_MIDPOINT=function(){return(t._TA_MIDPOINT=t.asm.TA_MIDPOINT).apply(null,arguments)},t._TA_MIDPRICE=function(){return(t._TA_MIDPRICE=t.asm.TA_MIDPRICE).apply(null,arguments)},t._TA_MIN=function(){return(t._TA_MIN=t.asm.TA_MIN).apply(null,arguments)},t._TA_MININDEX=function(){return(t._TA_MININDEX=t.asm.TA_MININDEX).apply(null,arguments)},t._TA_MINMAX=function(){return(t._TA_MINMAX=t.asm.TA_MINMAX).apply(null,arguments)},t._TA_MINMAXINDEX=function(){return(t._TA_MINMAXINDEX=t.asm.TA_MINMAXINDEX).apply(null,arguments)},t._TA_MINUS_DI=function(){return(t._TA_MINUS_DI=t.asm.TA_MINUS_DI).apply(null,arguments)},t._TA_MINUS_DM=function(){return(t._TA_MINUS_DM=t.asm.TA_MINUS_DM).apply(null,arguments)},t._TA_MOM=function(){return(t._TA_MOM=t.asm.TA_MOM).apply(null,arguments)},t._TA_MULT=function(){return(t._TA_MULT=t.asm.TA_MULT).apply(null,arguments)},t._TA_NATR=function(){return(t._TA_NATR=t.asm.TA_NATR).apply(null,arguments)},t._TA_OBV=function(){return(t._TA_OBV=t.asm.TA_OBV).apply(null,arguments)},t._TA_PLUS_DI=function(){return(t._TA_PLUS_DI=t.asm.TA_PLUS_DI).apply(null,arguments)},t._TA_PLUS_DM=function(){return(t._TA_PLUS_DM=t.asm.TA_PLUS_DM).apply(null,arguments)},t._TA_PPO=function(){return(t._TA_PPO=t.asm.TA_PPO).apply(null,arguments)},t._TA_ROC=function(){return(t._TA_ROC=t.asm.TA_ROC).apply(null,arguments)},t._TA_ROCP=function(){return(t._TA_ROCP=t.asm.TA_ROCP).apply(null,arguments)},t._TA_ROCR=function(){return(t._TA_ROCR=t.asm.TA_ROCR).apply(null,arguments)},t._TA_ROCR100=function(){return(t._TA_ROCR100=t.asm.TA_ROCR100).apply(null,arguments)},t._TA_RSI=function(){return(t._TA_RSI=t.asm.TA_RSI).apply(null,arguments)},t._TA_SAR=function(){return(t._TA_SAR=t.asm.TA_SAR).apply(null,arguments)},t._TA_SAREXT=function(){return(t._TA_SAREXT=t.asm.TA_SAREXT).apply(null,arguments)},t._TA_SIN=function(){return(t._TA_SIN=t.asm.TA_SIN).apply(null,arguments)},t._TA_SINH=function(){return(t._TA_SINH=t.asm.TA_SINH).apply(null,arguments)},t._TA_SQRT=function(){return(t._TA_SQRT=t.asm.TA_SQRT).apply(null,arguments)},t._TA_STOCH=function(){return(t._TA_STOCH=t.asm.TA_STOCH).apply(null,arguments)},t._TA_STOCHF=function(){return(t._TA_STOCHF=t.asm.TA_STOCHF).apply(null,arguments)},t._TA_STOCHRSI=function(){return(t._TA_STOCHRSI=t.asm.TA_STOCHRSI).apply(null,arguments)},t._TA_SUB=function(){return(t._TA_SUB=t.asm.TA_SUB).apply(null,arguments)},t._TA_SUM=function(){return(t._TA_SUM=t.asm.TA_SUM).apply(null,arguments)},t._TA_TAN=function(){return(t._TA_TAN=t.asm.TA_TAN).apply(null,arguments)},t._TA_TANH=function(){return(t._TA_TANH=t.asm.TA_TANH).apply(null,arguments)},t._TA_TRIX=function(){return(t._TA_TRIX=t.asm.TA_TRIX).apply(null,arguments)},t._TA_TSF=function(){return(t._TA_TSF=t.asm.TA_TSF).apply(null,arguments)},t._TA_TYPPRICE=function(){return(t._TA_TYPPRICE=t.asm.TA_TYPPRICE).apply(null,arguments)},t._TA_ULTOSC=function(){return(t._TA_ULTOSC=t.asm.TA_ULTOSC).apply(null,arguments)},t._TA_VAR=function(){return(t._TA_VAR=t.asm.TA_VAR).apply(null,arguments)},t._TA_WCLPRICE=function(){return(t._TA_WCLPRICE=t.asm.TA_WCLPRICE).apply(null,arguments)},t._TA_WILLR=function(){return(t._TA_WILLR=t.asm.TA_WILLR).apply(null,arguments)};var t1=t.stackSave=function(){return(t1=t.stackSave=t.asm.stackSave).apply(null,arguments)},Za=t.stackRestore=function(){return(Za=t.stackRestore=t.asm.stackRestore).apply(null,arguments)},Fe=t.stackAlloc=function(){return(Fe=t.stackAlloc=t.asm.stackAlloc).apply(null,arguments)},ot=t.___assign_got_enties=function(){return(ot=t.___assign_got_enties=t.asm.__assign_got_enties).apply(null,arguments)};t._TA_Globals=1448,t.___data_end=4888;for(var dn in["TA_Globals","__data_end"])(function(Ee){t["g$"+Ee]=function(){return t[Ee]}})(dn);t.ccall=I,t.allocate=O;var ut;function Ne(Ee){this.name="ExitStatus",this.message="Program terminated with exit("+Ee+")",this.status=Ee}q=function Ee(){ut||at(),ut||(q=Ee)};function Qe(Ee){var Te=t._main;if(Te){var Ue=0,tt=0;try{var Ut=Te(Ue,tt);Bn(Ut,!0)}catch(Lt){if(Lt instanceof Ne)return;if(Lt=="unwind"){E=!0;return}else{var Zt=Lt;Lt&&typeof Lt=="object"&&Lt.stack&&(Zt=[Lt,Lt.stack]),C("exception thrown: "+Zt),a(1,Lt)}}finally{}}}function at(Ee){if(V>0||(X(),V>0))return;function Te(){ut||(ut=!0,t.calledRun=!0,!A&&(ee(),K(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),gi&&Qe(),Q()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),Te()},1)):Te()}t.run=at;function Bn(Ee,Te){Te&&E&&Ee===0||(E||(t.onExit&&t.onExit(Ee),A=!0),a(Ee,new Ne(Ee)))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var gi=!0;return t.noInitialRun&&(gi=!1),E=!0,at(),e.ready}}();const Re={ACCBANDS:{name:"ACCBANDS",camelCaseName:"accBands",group:"Overlap Studies",description:"Acceleration Bands",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:20,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"upperBand",type:"Double[]",plotHint:"limit_upper"},{name:"middleBand",type:"Double[]",plotHint:"line"},{name:"lowerBand",type:"Double[]",plotHint:"limit_lower"}]},ACOS:{name:"ACOS",camelCaseName:"acos",group:"Math Transform",description:"Vector Trigonometric ACos",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},AD:{name:"AD",camelCaseName:"ad",group:"Volume Indicators",description:"Chaikin A/D Line",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"},{name:"volume",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ADD:{name:"ADD",camelCaseName:"add",group:"Math Operators",description:"Vector Arithmetic Add",inputs:[{name:"inReal0",type:"Double[]"},{name:"inReal1",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ADOSC:{name:"ADOSC",camelCaseName:"adOsc",group:"Volume Indicators",description:"Chaikin A/D Oscillator",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"},{name:"volume",type:"Double[]"}],options:[{name:"fastPeriod",displayName:"Fast Period",defaultValue:3,hint:"Number of period for the fast MA",type:"Integer",range:{min:2,max:1e5}},{name:"slowPeriod",displayName:"Slow Period",defaultValue:10,hint:"Number of period for the slow MA",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ADX:{name:"ADX",camelCaseName:"adx",group:"Momentum Indicators",description:"Average Directional Movement Index",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ADXR:{name:"ADXR",camelCaseName:"adxr",group:"Momentum Indicators",description:"Average Directional Movement Index Rating",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},APO:{name:"APO",camelCaseName:"apo",group:"Momentum Indicators",description:"Absolute Price Oscillator",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"fastPeriod",displayName:"Fast Period",defaultValue:12,hint:"Number of period for the fast MA",type:"Integer",range:{min:2,max:1e5}},{name:"slowPeriod",displayName:"Slow Period",defaultValue:26,hint:"Number of period for the slow MA",type:"Integer",range:{min:2,max:1e5}},{name:"MAType",displayName:"MA Type",defaultValue:0,hint:"Type of Moving Average",type:"MAType"}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},AROON:{name:"AROON",camelCaseName:"aroon",group:"Momentum Indicators",description:"Aroon",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"aroonDown",type:"Double[]",plotHint:"line_dash"},{name:"aroonUp",type:"Double[]",plotHint:"line"}]},AROONOSC:{name:"AROONOSC",camelCaseName:"aroonOsc",group:"Momentum Indicators",description:"Aroon Oscillator",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ASIN:{name:"ASIN",camelCaseName:"asin",group:"Math Transform",description:"Vector Trigonometric ASin",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ATAN:{name:"ATAN",camelCaseName:"atan",group:"Math Transform",description:"Vector Trigonometric ATan",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ATR:{name:"ATR",camelCaseName:"atr",group:"Volatility Indicators",description:"Average True Range",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},AVGDEV:{name:"AVGDEV",camelCaseName:"avgDev",group:"Price Transform",description:"Average Deviation",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},AVGPRICE:{name:"AVGPRICE",camelCaseName:"avgPrice",group:"Price Transform",description:"Average Price",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},BBANDS:{name:"BBANDS",camelCaseName:"bbands",group:"Overlap Studies",description:"Bollinger Bands",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:5,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}},{name:"nbDevUp",displayName:"Deviations up",defaultValue:2,hint:"Deviation multiplier for upper band",type:"Double",range:{min:-3e37,max:3e37}},{name:"nbDevDn",displayName:"Deviations down",defaultValue:2,hint:"Deviation multiplier for lower band",type:"Double",range:{min:-3e37,max:3e37}},{name:"MAType",displayName:"MA Type",defaultValue:0,hint:"Type of Moving Average",type:"MAType"}],outputs:[{name:"upperBand",type:"Double[]",plotHint:"limit_upper"},{name:"middleBand",type:"Double[]",plotHint:"line"},{name:"lowerBand",type:"Double[]",plotHint:"limit_lower"}]},BETA:{name:"BETA",camelCaseName:"beta",group:"Statistic Functions",description:"Beta",inputs:[{name:"inReal0",type:"Double[]"},{name:"inReal1",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:5,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},BOP:{name:"BOP",camelCaseName:"bop",group:"Momentum Indicators",description:"Balance Of Power",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},CCI:{name:"CCI",camelCaseName:"cci",group:"Momentum Indicators",description:"Commodity Channel Index",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},CDL2CROWS:{name:"CDL2CROWS",camelCaseName:"cdl2Crows",group:"Pattern Recognition",description:"Two Crows",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDL3BLACKCROWS:{name:"CDL3BLACKCROWS",camelCaseName:"cdl3BlackCrows",group:"Pattern Recognition",description:"Three Black Crows",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDL3INSIDE:{name:"CDL3INSIDE",camelCaseName:"cdl3Inside",group:"Pattern Recognition",description:"Three Inside Up/Down",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDL3LINESTRIKE:{name:"CDL3LINESTRIKE",camelCaseName:"cdl3LineStrike",group:"Pattern Recognition",description:"Three-Line Strike ",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDL3OUTSIDE:{name:"CDL3OUTSIDE",camelCaseName:"cdl3Outside",group:"Pattern Recognition",description:"Three Outside Up/Down",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDL3STARSINSOUTH:{name:"CDL3STARSINSOUTH",camelCaseName:"cdl3StarsInSouth",group:"Pattern Recognition",description:"Three Stars In The South",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDL3WHITESOLDIERS:{name:"CDL3WHITESOLDIERS",camelCaseName:"cdl3WhiteSoldiers",group:"Pattern Recognition",description:"Three Advancing White Soldiers",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLABANDONEDBABY:{name:"CDLABANDONEDBABY",camelCaseName:"cdlAbandonedBaby",group:"Pattern Recognition",description:"Abandoned Baby",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"penetration",displayName:"Penetration",defaultValue:.3,hint:"Percentage of penetration of a candle within another candle",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLADVANCEBLOCK:{name:"CDLADVANCEBLOCK",camelCaseName:"cdlAdvanceBlock",group:"Pattern Recognition",description:"Advance Block",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLBELTHOLD:{name:"CDLBELTHOLD",camelCaseName:"cdlBeltHold",group:"Pattern Recognition",description:"Belt-hold",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLBREAKAWAY:{name:"CDLBREAKAWAY",camelCaseName:"cdlBreakaway",group:"Pattern Recognition",description:"Breakaway",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLCLOSINGMARUBOZU:{name:"CDLCLOSINGMARUBOZU",camelCaseName:"cdlClosingMarubozu",group:"Pattern Recognition",description:"Closing Marubozu",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLCONCEALBABYSWALL:{name:"CDLCONCEALBABYSWALL",camelCaseName:"cdlConcealBabysWall",group:"Pattern Recognition",description:"Concealing Baby Swallow",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLCOUNTERATTACK:{name:"CDLCOUNTERATTACK",camelCaseName:"cdlCounterAttack",group:"Pattern Recognition",description:"Counterattack",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLDARKCLOUDCOVER:{name:"CDLDARKCLOUDCOVER",camelCaseName:"cdlDarkCloudCover",group:"Pattern Recognition",description:"Dark Cloud Cover",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"penetration",displayName:"Penetration",defaultValue:.5,hint:"Percentage of penetration of a candle within another candle",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLDOJI:{name:"CDLDOJI",camelCaseName:"cdlDoji",group:"Pattern Recognition",description:"Doji",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLDOJISTAR:{name:"CDLDOJISTAR",camelCaseName:"cdlDojiStar",group:"Pattern Recognition",description:"Doji Star",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLDRAGONFLYDOJI:{name:"CDLDRAGONFLYDOJI",camelCaseName:"cdlDragonflyDoji",group:"Pattern Recognition",description:"Dragonfly Doji",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLENGULFING:{name:"CDLENGULFING",camelCaseName:"cdlEngulfing",group:"Pattern Recognition",description:"Engulfing Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLEVENINGDOJISTAR:{name:"CDLEVENINGDOJISTAR",camelCaseName:"cdlEveningDojiStar",group:"Pattern Recognition",description:"Evening Doji Star",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"penetration",displayName:"Penetration",defaultValue:.3,hint:"Percentage of penetration of a candle within another candle",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLEVENINGSTAR:{name:"CDLEVENINGSTAR",camelCaseName:"cdlEveningStar",group:"Pattern Recognition",description:"Evening Star",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"penetration",displayName:"Penetration",defaultValue:.3,hint:"Percentage of penetration of a candle within another candle",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLGAPSIDESIDEWHITE:{name:"CDLGAPSIDESIDEWHITE",camelCaseName:"cdlGapSideSideWhite",group:"Pattern Recognition",description:"Up/Down-gap side-by-side white lines",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLGRAVESTONEDOJI:{name:"CDLGRAVESTONEDOJI",camelCaseName:"cdlGravestoneDoji",group:"Pattern Recognition",description:"Gravestone Doji",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHAMMER:{name:"CDLHAMMER",camelCaseName:"cdlHammer",group:"Pattern Recognition",description:"Hammer",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHANGINGMAN:{name:"CDLHANGINGMAN",camelCaseName:"cdlHangingMan",group:"Pattern Recognition",description:"Hanging Man",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHARAMI:{name:"CDLHARAMI",camelCaseName:"cdlHarami",group:"Pattern Recognition",description:"Harami Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHARAMICROSS:{name:"CDLHARAMICROSS",camelCaseName:"cdlHaramiCross",group:"Pattern Recognition",description:"Harami Cross Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHIGHWAVE:{name:"CDLHIGHWAVE",camelCaseName:"cdlHignWave",group:"Pattern Recognition",description:"High-Wave Candle",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHIKKAKE:{name:"CDLHIKKAKE",camelCaseName:"cdlHikkake",group:"Pattern Recognition",description:"Hikkake Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHIKKAKEMOD:{name:"CDLHIKKAKEMOD",camelCaseName:"cdlHikkakeMod",group:"Pattern Recognition",description:"Modified Hikkake Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLHOMINGPIGEON:{name:"CDLHOMINGPIGEON",camelCaseName:"cdlHomingPigeon",group:"Pattern Recognition",description:"Homing Pigeon",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLIDENTICAL3CROWS:{name:"CDLIDENTICAL3CROWS",camelCaseName:"cdlIdentical3Crows",group:"Pattern Recognition",description:"Identical Three Crows",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLINNECK:{name:"CDLINNECK",camelCaseName:"cdlInNeck",group:"Pattern Recognition",description:"In-Neck Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLINVERTEDHAMMER:{name:"CDLINVERTEDHAMMER",camelCaseName:"cdlInvertedHammer",group:"Pattern Recognition",description:"Inverted Hammer",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLKICKING:{name:"CDLKICKING",camelCaseName:"cdlKicking",group:"Pattern Recognition",description:"Kicking",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLKICKINGBYLENGTH:{name:"CDLKICKINGBYLENGTH",camelCaseName:"cdlKickingByLength",group:"Pattern Recognition",description:"Kicking - bull/bear determined by the longer marubozu",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLLADDERBOTTOM:{name:"CDLLADDERBOTTOM",camelCaseName:"cdlLadderBottom",group:"Pattern Recognition",description:"Ladder Bottom",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLLONGLEGGEDDOJI:{name:"CDLLONGLEGGEDDOJI",camelCaseName:"cdlLongLeggedDoji",group:"Pattern Recognition",description:"Long Legged Doji",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLLONGLINE:{name:"CDLLONGLINE",camelCaseName:"cdlLongLine",group:"Pattern Recognition",description:"Long Line Candle",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLMARUBOZU:{name:"CDLMARUBOZU",camelCaseName:"cdlMarubozu",group:"Pattern Recognition",description:"Marubozu",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLMATCHINGLOW:{name:"CDLMATCHINGLOW",camelCaseName:"cdlMatchingLow",group:"Pattern Recognition",description:"Matching Low",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLMATHOLD:{name:"CDLMATHOLD",camelCaseName:"cdlMatHold",group:"Pattern Recognition",description:"Mat Hold",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"penetration",displayName:"Penetration",defaultValue:.5,hint:"Percentage of penetration of a candle within another candle",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLMORNINGDOJISTAR:{name:"CDLMORNINGDOJISTAR",camelCaseName:"cdlMorningDojiStar",group:"Pattern Recognition",description:"Morning Doji Star",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"penetration",displayName:"Penetration",defaultValue:.3,hint:"Percentage of penetration of a candle within another candle",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLMORNINGSTAR:{name:"CDLMORNINGSTAR",camelCaseName:"cdlMorningStar",group:"Pattern Recognition",description:"Morning Star",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"penetration",displayName:"Penetration",defaultValue:.3,hint:"Percentage of penetration of a candle within another candle",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLONNECK:{name:"CDLONNECK",camelCaseName:"cdlOnNeck",group:"Pattern Recognition",description:"On-Neck Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLPIERCING:{name:"CDLPIERCING",camelCaseName:"cdlPiercing",group:"Pattern Recognition",description:"Piercing Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLRICKSHAWMAN:{name:"CDLRICKSHAWMAN",camelCaseName:"cdlRickshawMan",group:"Pattern Recognition",description:"Rickshaw Man",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLRISEFALL3METHODS:{name:"CDLRISEFALL3METHODS",camelCaseName:"cdlRiseFall3Methods",group:"Pattern Recognition",description:"Rising/Falling Three Methods",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLSEPARATINGLINES:{name:"CDLSEPARATINGLINES",camelCaseName:"cdlSeperatingLines",group:"Pattern Recognition",description:"Separating Lines",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLSHOOTINGSTAR:{name:"CDLSHOOTINGSTAR",camelCaseName:"cdlShootingStar",group:"Pattern Recognition",description:"Shooting Star",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLSHORTLINE:{name:"CDLSHORTLINE",camelCaseName:"cdlShortLine",group:"Pattern Recognition",description:"Short Line Candle",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLSPINNINGTOP:{name:"CDLSPINNINGTOP",camelCaseName:"cdlSpinningTop",group:"Pattern Recognition",description:"Spinning Top",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLSTALLEDPATTERN:{name:"CDLSTALLEDPATTERN",camelCaseName:"cdlStalledPattern",group:"Pattern Recognition",description:"Stalled Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLSTICKSANDWICH:{name:"CDLSTICKSANDWICH",camelCaseName:"cdlStickSandwhich",group:"Pattern Recognition",description:"Stick Sandwich",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLTAKURI:{name:"CDLTAKURI",camelCaseName:"cdlTakuri",group:"Pattern Recognition",description:"Takuri (Dragonfly Doji with very long lower shadow)",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLTASUKIGAP:{name:"CDLTASUKIGAP",camelCaseName:"cdlTasukiGap",group:"Pattern Recognition",description:"Tasuki Gap",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLTHRUSTING:{name:"CDLTHRUSTING",camelCaseName:"cdlThrusting",group:"Pattern Recognition",description:"Thrusting Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLTRISTAR:{name:"CDLTRISTAR",camelCaseName:"cdlTristar",group:"Pattern Recognition",description:"Tristar Pattern",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLUNIQUE3RIVER:{name:"CDLUNIQUE3RIVER",camelCaseName:"cdlUnique3River",group:"Pattern Recognition",description:"Unique 3 River",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLUPSIDEGAP2CROWS:{name:"CDLUPSIDEGAP2CROWS",camelCaseName:"cdlUpsideGap2Crows",group:"Pattern Recognition",description:"Upside Gap Two Crows",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CDLXSIDEGAP3METHODS:{name:"CDLXSIDEGAP3METHODS",camelCaseName:"cdlXSideGap3Methods",group:"Pattern Recognition",description:"Upside/Downside Gap Three Methods",inputs:[{name:"open",type:"Double[]"},{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},CEIL:{name:"CEIL",camelCaseName:"ceil",group:"Math Transform",description:"Vector Ceil",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},CMO:{name:"CMO",camelCaseName:"cmo",group:"Momentum Indicators",description:"Chande Momentum Oscillator",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},CORREL:{name:"CORREL",camelCaseName:"correl",group:"Statistic Functions",description:"Pearson's Correlation Coefficient (r)",inputs:[{name:"inReal0",type:"Double[]"},{name:"inReal1",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},COS:{name:"COS",camelCaseName:"cos",group:"Math Transform",description:"Vector Trigonometric Cos",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},COSH:{name:"COSH",camelCaseName:"cosh",group:"Math Transform",description:"Vector Trigonometric Cosh",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},DEMA:{name:"DEMA",camelCaseName:"dema",group:"Overlap Studies",description:"Double Exponential Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},DIV:{name:"DIV",camelCaseName:"div",group:"Math Operators",description:"Vector Arithmetic Div",inputs:[{name:"inReal0",type:"Double[]"},{name:"inReal1",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},DX:{name:"DX",camelCaseName:"dx",group:"Momentum Indicators",description:"Directional Movement Index",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},EMA:{name:"EMA",camelCaseName:"ema",group:"Overlap Studies",description:"Exponential Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},EXP:{name:"EXP",camelCaseName:"exp",group:"Math Transform",description:"Vector Arithmetic Exp",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},FLOOR:{name:"FLOOR",camelCaseName:"floor",group:"Math Transform",description:"Vector Floor",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},HT_DCPERIOD:{name:"HT_DCPERIOD",camelCaseName:"htDcPeriod",group:"Cycle Indicators",description:"Hilbert Transform - Dominant Cycle Period",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},HT_DCPHASE:{name:"HT_DCPHASE",camelCaseName:"htDcPhase",group:"Cycle Indicators",description:"Hilbert Transform - Dominant Cycle Phase",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},HT_PHASOR:{name:"HT_PHASOR",camelCaseName:"htPhasor",group:"Cycle Indicators",description:"Hilbert Transform - Phasor Components",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"inPhase",type:"Double[]",plotHint:"line"},{name:"quadrature",type:"Double[]",plotHint:"line_dash"}]},HT_SINE:{name:"HT_SINE",camelCaseName:"htSine",group:"Cycle Indicators",description:"Hilbert Transform - SineWave",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"sine",type:"Double[]",plotHint:"line"},{name:"leadSine",type:"Double[]",plotHint:"line_dash"}]},HT_TRENDLINE:{name:"HT_TRENDLINE",camelCaseName:"htTrendline",group:"Overlap Studies",description:"Hilbert Transform - Instantaneous Trendline",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},HT_TRENDMODE:{name:"HT_TRENDMODE",camelCaseName:"htTrendMode",group:"Cycle Indicators",description:"Hilbert Transform - Trend vs Cycle Mode",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},IMI:{name:"IMI",camelCaseName:"imi",group:"Momentum Indicators",description:"Intraday Momentum Index",inputs:[{name:"open",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},KAMA:{name:"KAMA",camelCaseName:"kama",group:"Overlap Studies",description:"Kaufman Adaptive Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},LINEARREG:{name:"LINEARREG",camelCaseName:"linearReg",group:"Statistic Functions",description:"Linear Regression",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},LINEARREG_ANGLE:{name:"LINEARREG_ANGLE",camelCaseName:"linearRegAngle",group:"Statistic Functions",description:"Linear Regression Angle",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},LINEARREG_INTERCEPT:{name:"LINEARREG_INTERCEPT",camelCaseName:"linearRegIntercept",group:"Statistic Functions",description:"Linear Regression Intercept",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},LINEARREG_SLOPE:{name:"LINEARREG_SLOPE",camelCaseName:"linearRegSlope",group:"Statistic Functions",description:"Linear Regression Slope",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},LN:{name:"LN",camelCaseName:"ln",group:"Math Transform",description:"Vector Log Natural",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},LOG10:{name:"LOG10",camelCaseName:"log10",group:"Math Transform",description:"Vector Log10",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MA:{name:"MA",camelCaseName:"movingAverage",group:"Overlap Studies",description:"Moving average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}},{name:"MAType",displayName:"MA Type",defaultValue:0,hint:"Type of Moving Average",type:"MAType"}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MACD:{name:"MACD",camelCaseName:"macd",group:"Momentum Indicators",description:"Moving Average Convergence/Divergence",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"fastPeriod",displayName:"Fast Period",defaultValue:12,hint:"Number of period for the fast MA",type:"Integer",range:{min:2,max:1e5}},{name:"slowPeriod",displayName:"Slow Period",defaultValue:26,hint:"Number of period for the slow MA",type:"Integer",range:{min:2,max:1e5}},{name:"signalPeriod",displayName:"Signal Period",defaultValue:9,hint:"Smoothing for the signal line (nb of period)",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"MACD",type:"Double[]",plotHint:"line"},{name:"MACDSignal",type:"Double[]",plotHint:"line_dash"},{name:"MACDHist",type:"Double[]",plotHint:"histogram"}]},MACDEXT:{name:"MACDEXT",camelCaseName:"macdExt",group:"Momentum Indicators",description:"MACD with controllable MA type",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"fastPeriod",displayName:"Fast Period",defaultValue:12,hint:"Number of period for the fast MA",type:"Integer",range:{min:2,max:1e5}},{name:"fastMAType",displayName:"Fast MA",defaultValue:0,hint:"Type of Moving Average for fast MA",type:"MAType"},{name:"slowPeriod",displayName:"Slow Period",defaultValue:26,hint:"Number of period for the slow MA",type:"Integer",range:{min:2,max:1e5}},{name:"slowMAType",displayName:"Slow MA",defaultValue:0,hint:"Type of Moving Average for slow MA",type:"MAType"},{name:"signalPeriod",displayName:"Signal Period",defaultValue:9,hint:"Smoothing for the signal line (nb of period)",type:"Integer",range:{min:1,max:1e5}},{name:"signalMAType",displayName:"Signal MA",defaultValue:0,hint:"Type of Moving Average for signal line",type:"MAType"}],outputs:[{name:"MACD",type:"Double[]",plotHint:"line"},{name:"MACDSignal",type:"Double[]",plotHint:"line_dash"},{name:"MACDHist",type:"Double[]",plotHint:"histogram"}]},MACDFIX:{name:"MACDFIX",camelCaseName:"macdFix",group:"Momentum Indicators",description:"Moving Average Convergence/Divergence Fix 12/26",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"signalPeriod",displayName:"Signal Period",defaultValue:9,hint:"Smoothing for the signal line (nb of period)",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"MACD",type:"Double[]",plotHint:"line"},{name:"MACDSignal",type:"Double[]",plotHint:"line_dash"},{name:"MACDHist",type:"Double[]",plotHint:"histogram"}]},MAMA:{name:"MAMA",camelCaseName:"mama",group:"Overlap Studies",description:"MESA Adaptive Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"fastLimit",displayName:"Fast Limit",defaultValue:.5,hint:"Upper limit use in the adaptive algorithm",type:"Double",range:{min:.01,max:.99}},{name:"slowLimit",displayName:"Slow Limit",defaultValue:.05,hint:"Lower limit use in the adaptive algorithm",type:"Double",range:{min:.01,max:.99}}],outputs:[{name:"MAMA",type:"Double[]",plotHint:"line"},{name:"FAMA",type:"Double[]",plotHint:"line_dash"}]},MAVP:{name:"MAVP",camelCaseName:"movingAverageVariablePeriod",group:"Overlap Studies",description:"Moving average with variable period",inputs:[{name:"inReal",type:"Double[]"},{name:"inPeriods",type:"Double[]"}],options:[{name:"minPeriod",displayName:"Minimum Period",defaultValue:2,hint:"Value less than minimum will be changed to Minimum period",type:"Integer",range:{min:2,max:1e5}},{name:"maxPeriod",displayName:"Maximum Period",defaultValue:30,hint:"Value higher than maximum will be changed to Maximum period",type:"Integer",range:{min:2,max:1e5}},{name:"MAType",displayName:"MA Type",defaultValue:0,hint:"Type of Moving Average",type:"MAType"}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MAX:{name:"MAX",camelCaseName:"max",group:"Math Operators",description:"Highest value over a specified period",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MAXINDEX:{name:"MAXINDEX",camelCaseName:"maxIndex",group:"Math Operators",description:"Index of highest value over a specified period",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},MEDPRICE:{name:"MEDPRICE",camelCaseName:"medPrice",group:"Price Transform",description:"Median Price",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MFI:{name:"MFI",camelCaseName:"mfi",group:"Momentum Indicators",description:"Money Flow Index",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"},{name:"volume",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MIDPOINT:{name:"MIDPOINT",camelCaseName:"midPoint",group:"Overlap Studies",description:"MidPoint over period",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MIDPRICE:{name:"MIDPRICE",camelCaseName:"midPrice",group:"Overlap Studies",description:"Midpoint Price over period",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MIN:{name:"MIN",camelCaseName:"min",group:"Math Operators",description:"Lowest value over a specified period",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MININDEX:{name:"MININDEX",camelCaseName:"minIndex",group:"Math Operators",description:"Index of lowest value over a specified period",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Integer[]",plotHint:"line"}]},MINMAX:{name:"MINMAX",camelCaseName:"minMax",group:"Math Operators",description:"Lowest and highest values over a specified period",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"min",type:"Double[]",plotHint:"line"},{name:"max",type:"Double[]",plotHint:"line"}]},MINMAXINDEX:{name:"MINMAXINDEX",camelCaseName:"minMaxIndex",group:"Math Operators",description:"Indexes of lowest and highest values over a specified period",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"minIdx",type:"Integer[]",plotHint:"line"},{name:"maxIdx",type:"Integer[]",plotHint:"line"}]},MINUS_DI:{name:"MINUS_DI",camelCaseName:"minusDI",group:"Momentum Indicators",description:"Minus Directional Indicator",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MINUS_DM:{name:"MINUS_DM",camelCaseName:"minusDM",group:"Momentum Indicators",description:"Minus Directional Movement",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MOM:{name:"MOM",camelCaseName:"mom",group:"Momentum Indicators",description:"Momentum",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:10,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},MULT:{name:"MULT",camelCaseName:"mult",group:"Math Operators",description:"Vector Arithmetic Mult",inputs:[{name:"inReal0",type:"Double[]"},{name:"inReal1",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},NATR:{name:"NATR",camelCaseName:"natr",group:"Volatility Indicators",description:"Normalized Average True Range",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},OBV:{name:"OBV",camelCaseName:"obv",group:"Volume Indicators",description:"On Balance Volume",inputs:[{name:"inReal",type:"Double[]"},{name:"volume",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},PLUS_DI:{name:"PLUS_DI",camelCaseName:"plusDI",group:"Momentum Indicators",description:"Plus Directional Indicator",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},PLUS_DM:{name:"PLUS_DM",camelCaseName:"plusDM",group:"Momentum Indicators",description:"Plus Directional Movement",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},PPO:{name:"PPO",camelCaseName:"ppo",group:"Momentum Indicators",description:"Percentage Price Oscillator",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"fastPeriod",displayName:"Fast Period",defaultValue:12,hint:"Number of period for the fast MA",type:"Integer",range:{min:2,max:1e5}},{name:"slowPeriod",displayName:"Slow Period",defaultValue:26,hint:"Number of period for the slow MA",type:"Integer",range:{min:2,max:1e5}},{name:"MAType",displayName:"MA Type",defaultValue:0,hint:"Type of Moving Average",type:"MAType"}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ROC:{name:"ROC",camelCaseName:"roc",group:"Momentum Indicators",description:"Rate of change : ((price/prevPrice)-1)*100",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:10,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ROCP:{name:"ROCP",camelCaseName:"rocP",group:"Momentum Indicators",description:"Rate of change Percentage: (price-prevPrice)/prevPrice",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:10,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ROCR:{name:"ROCR",camelCaseName:"rocR",group:"Momentum Indicators",description:"Rate of change ratio: (price/prevPrice)",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:10,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ROCR100:{name:"ROCR100",camelCaseName:"rocR100",group:"Momentum Indicators",description:"Rate of change ratio 100 scale: (price/prevPrice)*100",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:10,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},RSI:{name:"RSI",camelCaseName:"rsi",group:"Momentum Indicators",description:"Relative Strength Index",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},SAR:{name:"SAR",camelCaseName:"sar",group:"Overlap Studies",description:"Parabolic SAR",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[{name:"acceleration",displayName:"Acceleration Factor",defaultValue:.02,hint:"Acceleration Factor used up to the Maximum value",type:"Double",range:{min:0,max:3e37}},{name:"maximum",displayName:"AF Maximum",defaultValue:.2,hint:"Acceleration Factor Maximum value",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},SAREXT:{name:"SAREXT",camelCaseName:"sarExt",group:"Overlap Studies",description:"Parabolic SAR - Extended",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"}],options:[{name:"startValue",displayName:"Start Value",defaultValue:0,hint:"Start value and direction. 0 for Auto, >0 for Long, <0 for Short",type:"Double",range:{min:-3e37,max:3e37}},{name:"offsetOnReverse",displayName:"Offset on Reverse",defaultValue:0,hint:"Percent offset added/removed to initial stop on short/long reversal",type:"Double",range:{min:0,max:3e37}},{name:"accelerationInitLong",displayName:"AF Init Long",defaultValue:.02,hint:"Acceleration Factor initial value for the Long direction",type:"Double",range:{min:0,max:3e37}},{name:"accelerationLong",displayName:"AF Long",defaultValue:.02,hint:"Acceleration Factor for the Long direction",type:"Double",range:{min:0,max:3e37}},{name:"accelerationMaxLong",displayName:"AF Max Long",defaultValue:.2,hint:"Acceleration Factor maximum value for the Long direction",type:"Double",range:{min:0,max:3e37}},{name:"accelerationInitShort",displayName:"AF Init Short",defaultValue:.02,hint:"Acceleration Factor initial value for the Short direction",type:"Double",range:{min:0,max:3e37}},{name:"accelerationShort",displayName:"AF Short",defaultValue:.02,hint:"Acceleration Factor for the Short direction",type:"Double",range:{min:0,max:3e37}},{name:"accelerationMaxShort",displayName:"AF Max Short",defaultValue:.2,hint:"Acceleration Factor maximum value for the Short direction",type:"Double",range:{min:0,max:3e37}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},SIN:{name:"SIN",camelCaseName:"sin",group:"Math Transform",description:"Vector Trigonometric Sin",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},SINH:{name:"SINH",camelCaseName:"sinh",group:"Math Transform",description:"Vector Trigonometric Sinh",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},SMA:{name:"SMA",camelCaseName:"sma",group:"Overlap Studies",description:"Simple Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},SQRT:{name:"SQRT",camelCaseName:"sqrt",group:"Math Transform",description:"Vector Square Root",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},STDDEV:{name:"STDDEV",camelCaseName:"stdDev",group:"Statistic Functions",description:"Standard Deviation",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:5,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}},{name:"nbDev",displayName:"Deviations",defaultValue:1,hint:"Nb of deviations",type:"Double",range:{min:-3e37,max:3e37}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},STOCH:{name:"STOCH",camelCaseName:"stoch",group:"Momentum Indicators",description:"Stochastic",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"fastK_Period",displayName:"Fast-K Period",defaultValue:5,hint:"Time period for building the Fast-K line",type:"Integer",range:{min:1,max:1e5}},{name:"slowK_Period",displayName:"Slow-K Period",defaultValue:3,hint:"Smoothing for making the Slow-K line. Usually set to 3",type:"Integer",range:{min:1,max:1e5}},{name:"slowK_MAType",displayName:"Slow-K MA",defaultValue:0,hint:"Type of Moving Average for Slow-K",type:"MAType"},{name:"slowD_Period",displayName:"Slow-D Period",defaultValue:3,hint:"Smoothing for making the Slow-D line",type:"Integer",range:{min:1,max:1e5}},{name:"slowD_MAType",displayName:"Slow-D MA",defaultValue:0,hint:"Type of Moving Average for Slow-D",type:"MAType"}],outputs:[{name:"slowK",type:"Double[]",plotHint:"line_dash"},{name:"slowD",type:"Double[]",plotHint:"line_dash"}]},STOCHF:{name:"STOCHF",camelCaseName:"stochF",group:"Momentum Indicators",description:"Stochastic Fast",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"fastK_Period",displayName:"Fast-K Period",defaultValue:5,hint:"Time period for building the Fast-K line",type:"Integer",range:{min:1,max:1e5}},{name:"fastD_Period",displayName:"Fast-D Period",defaultValue:3,hint:"Smoothing for making the Fast-D line. Usually set to 3",type:"Integer",range:{min:1,max:1e5}},{name:"fastD_MAType",displayName:"Fast-D MA",defaultValue:0,hint:"Type of Moving Average for Fast-D",type:"MAType"}],outputs:[{name:"fastK",type:"Double[]",plotHint:"line"},{name:"fastD",type:"Double[]",plotHint:"line"}]},STOCHRSI:{name:"STOCHRSI",camelCaseName:"stochRsi",group:"Momentum Indicators",description:"Stochastic Relative Strength Index",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}},{name:"fastK_Period",displayName:"Fast-K Period",defaultValue:5,hint:"Time period for building the Fast-K line",type:"Integer",range:{min:1,max:1e5}},{name:"fastD_Period",displayName:"Fast-D Period",defaultValue:3,hint:"Smoothing for making the Fast-D line. Usually set to 3",type:"Integer",range:{min:1,max:1e5}},{name:"fastD_MAType",displayName:"Fast-D MA",defaultValue:0,hint:"Type of Moving Average for Fast-D",type:"MAType"}],outputs:[{name:"fastK",type:"Double[]",plotHint:"line"},{name:"fastD",type:"Double[]",plotHint:"line"}]},SUB:{name:"SUB",camelCaseName:"sub",group:"Math Operators",description:"Vector Arithmetic Substraction",inputs:[{name:"inReal0",type:"Double[]"},{name:"inReal1",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},SUM:{name:"SUM",camelCaseName:"sum",group:"Math Operators",description:"Summation",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},T3:{name:"T3",camelCaseName:"t3",group:"Overlap Studies",description:"Triple Exponential Moving Average (T3)",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:5,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}},{name:"VFactor",displayName:"Volume Factor",defaultValue:.7,hint:"Volume Factor",type:"Double",range:{min:0,max:1}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TAN:{name:"TAN",camelCaseName:"tan",group:"Math Transform",description:"Vector Trigonometric Tan",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TANH:{name:"TANH",camelCaseName:"tanh",group:"Math Transform",description:"Vector Trigonometric Tanh",inputs:[{name:"inReal",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TEMA:{name:"TEMA",camelCaseName:"tema",group:"Overlap Studies",description:"Triple Exponential Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TRANGE:{name:"TRANGE",camelCaseName:"trueRange",group:"Volatility Indicators",description:"True Range",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TRIMA:{name:"TRIMA",camelCaseName:"trima",group:"Overlap Studies",description:"Triangular Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TRIX:{name:"TRIX",camelCaseName:"trix",group:"Momentum Indicators",description:"1-day Rate-Of-Change (ROC) of a Triple Smooth EMA",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TSF:{name:"TSF",camelCaseName:"tsf",group:"Statistic Functions",description:"Time Series Forecast",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},TYPPRICE:{name:"TYPPRICE",camelCaseName:"typPrice",group:"Price Transform",description:"Typical Price",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},ULTOSC:{name:"ULTOSC",camelCaseName:"ultOsc",group:"Momentum Indicators",description:"Ultimate Oscillator",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod1",displayName:"First Period",defaultValue:7,hint:"Number of bars for 1st period.",type:"Integer",range:{min:1,max:1e5}},{name:"timePeriod2",displayName:"Second Period",defaultValue:14,hint:"Number of bars fro 2nd period",type:"Integer",range:{min:1,max:1e5}},{name:"timePeriod3",displayName:"Third Period",defaultValue:28,hint:"Number of bars for 3rd period",type:"Integer",range:{min:1,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},VAR:{name:"VAR",camelCaseName:"variance",group:"Statistic Functions",description:"Variance",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:5,hint:"Number of period",type:"Integer",range:{min:1,max:1e5}},{name:"nbDev",displayName:"Deviations",defaultValue:1,hint:"Nb of deviations",type:"Double",range:{min:-3e37,max:3e37}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},WCLPRICE:{name:"WCLPRICE",camelCaseName:"wclPrice",group:"Price Transform",description:"Weighted Close Price",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},WILLR:{name:"WILLR",camelCaseName:"willR",group:"Momentum Indicators",description:"Williams' %R",inputs:[{name:"high",type:"Double[]"},{name:"low",type:"Double[]"},{name:"close",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:14,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]},WMA:{name:"WMA",camelCaseName:"wma",group:"Overlap Studies",description:"Weighted Moving Average",inputs:[{name:"inReal",type:"Double[]"}],options:[{name:"timePeriod",displayName:"Time Period",defaultValue:30,hint:"Number of period",type:"Integer",range:{min:2,max:1e5}}],outputs:[{name:"output",type:"Double[]",plotHint:"line"}]}};var ek=ek;let g0;function _J(n,e){const t=n._malloc(e*8);return n.HEAPF64.set(new Float64Array(e),t/8),{data:n.HEAPF64.subarray(t/8,t/8+e),offset:t}}const Ktt={0:"TA_SUCCESS",1:"TA_LIB_NOT_INITIALIZE",2:"TA_BAD_PARAM",3:"TA_ALLOC_ERR",4:"TA_GROUP_NOT_FOUND",5:"TA_FUNC_NOT_FOUND",6:"TA_INVALID_HANDLE",7:"TA_INVALID_PARAM_HOLDER",8:"TA_INVALID_PARAM_HOLDER_TYPE",9:"TA_INVALID_PARAM_FUNCTION",10:"TA_INPUT_NOT_ALL_INITIALIZE",11:"TA_OUTPUT_NOT_ALL_INITIALIZE",12:"TA_OUT_OF_RANGE_START_INDEX",13:"TA_OUT_OF_RANGE_END_INDEX",14:"TA_INVALID_LIST_TYPE",15:"TA_BAD_OBJECT",16:"TA_NOT_SUPPORTED",5e3:"TA_INTERNAL_ERROR",65535:"TA_UNKNOWN_ERR"};function Oe(n,e){const t=`TA_${n.name}`;if(!g0)throw Error(`${n.name}() called before initialization.`);const i=2+n.inputs.length+n.options.length+2+n.outputs.length,r=new Array(i).fill("number");for(const{name:p}of n.inputs)if(!Array.isArray(e[p]))throw e[p]===void 0?Error(`Bad Param: "${p}" is required`):Error(`Bad Param: "${p}" should be array of number`);for(const{name:p,defaultValue:g,range:m}of n.options)if(e[p]===void 0)e[p]=g;else if(m&&(e[p]<m.min||e[p]>m.max))throw Error(`Bad Param: "${p}" out of range (min: ${m.min}, max: ${m.max})`);let{startIdx:o,endIdx:s}=e;o===void 0&&(o=0);const a=n.inputs.map(({name:p})=>e[p].length);s===void 0&&(s=Math.min(...a));const l=[o,s],u=[];n.inputs.forEach(({name:p})=>{const g=_J(g0,s-o),m=e[p];for(const y in m)g.data[y]=m[y];u.push(g),l.push(g.offset)}),n.options.forEach(({name:p})=>l.push(e[p])),l.push(0),l.push(0);const d=n.outputs.map(({name:p})=>{const g=_J(g0,s-o);return u.push(g),l.push(g.offset),{name:p,array:g}}),h=g0.ccall(t,"number",r,l);u.forEach(p=>g0._free(p.offset));const f=d.reduce((p,g)=>(p[g.name]=Array.from(g.array.data),p),{});if(h===0)return f;throw Error("[C_ERROR] "+Ktt[h])}var tk;(function(n){n[n.SMA=0]="SMA",n[n.EMA=1]="EMA",n[n.WMA=2]="WMA",n[n.DEMA=3]="DEMA",n[n.TEMA=4]="TEMA",n[n.TRIMA=5]="TRIMA",n[n.KAMA=6]="KAMA",n[n.MAMA=7]="MAMA",n[n.T3=8]="T3"})(tk||(tk={}));function nk(n){return g0?Promise.resolve(g0):n&&typeof n!="string"?Promise.reject(new Error('Invalid argument, "init(wasmBinaryFilePath)" expects a string that specifies the location of wasm binary file')):ek({locateFile:n?()=>n:void 0}).then(t=>g0=t).catch(t=>{let i="TA-Lib WASM runtime init fail.";throw t&&t.message?i+=`
142
142
  Error:
143
- `+t.message:i+="Unknown reason. Perhaps you specify the wrong file path to wasm binary?",new Error(i)})}let Gtt=Re.ACCBANDS;function yJ(n){return Oe(Gtt,n)}const Ytt=yJ;let Qtt=Re.ACOS;function vJ(n){return Oe(Qtt,n)}const Ztt=vJ;let Xtt=Re.AD;function CJ(n){return Oe(Xtt,n)}const Jtt=CJ;let ent=Re.ADD;function wJ(n){return Oe(ent,n)}const tnt=wJ;let nnt=Re.ADOSC;function xJ(n){return Oe(nnt,n)}const int=xJ;let rnt=Re.ADX;function SJ(n){return Oe(rnt,n)}const ont=SJ;let snt=Re.ADXR;function DJ(n){return Oe(snt,n)}const ant=DJ;let lnt=Re.APO;function NJ(n){return Oe(lnt,n)}const unt=NJ;let cnt=Re.AROON;function EJ(n){return Oe(cnt,n)}const dnt=EJ;let hnt=Re.AROONOSC;function kJ(n){return Oe(hnt,n)}const fnt=kJ;let pnt=Re.ASIN;function LJ(n){return Oe(pnt,n)}const gnt=LJ;let mnt=Re.ATAN;function MJ(n){return Oe(mnt,n)}const bnt=MJ;let _nt=Re.ATR;function TJ(n){return Oe(_nt,n)}const ynt=TJ;let vnt=Re.AVGDEV;function AJ(n){return Oe(vnt,n)}const Cnt=AJ;let wnt=Re.AVGPRICE;function IJ(n){return Oe(wnt,n)}const xnt=IJ;let Snt=Re.BBANDS;function RJ(n){return Oe(Snt,n)}const Dnt=RJ;let Nnt=Re.BETA;function OJ(n){return Oe(Nnt,n)}const Ent=OJ;let knt=Re.BOP;function FJ(n){return Oe(knt,n)}const Lnt=FJ;let Mnt=Re.CCI;function PJ(n){return Oe(Mnt,n)}const Tnt=PJ;let Ant=Re.CDL2CROWS;function BJ(n){return Oe(Ant,n)}const Int=BJ;let Rnt=Re.CDL3BLACKCROWS;function VJ(n){return Oe(Rnt,n)}const Ont=VJ;let Fnt=Re.CDL3INSIDE;function zJ(n){return Oe(Fnt,n)}const Pnt=zJ;let Bnt=Re.CDL3LINESTRIKE;function HJ(n){return Oe(Bnt,n)}const Vnt=HJ;let znt=Re.CDL3OUTSIDE;function jJ(n){return Oe(znt,n)}const Hnt=jJ;let jnt=Re.CDL3STARSINSOUTH;function WJ(n){return Oe(jnt,n)}const Wnt=WJ;let $nt=Re.CDL3WHITESOLDIERS;function $J(n){return Oe($nt,n)}const Unt=$J;let qnt=Re.CDLABANDONEDBABY;function UJ(n){return Oe(qnt,n)}const Knt=UJ;let Gnt=Re.CDLADVANCEBLOCK;function qJ(n){return Oe(Gnt,n)}const Ynt=qJ;let Qnt=Re.CDLBELTHOLD;function KJ(n){return Oe(Qnt,n)}const Znt=KJ;let Xnt=Re.CDLBREAKAWAY;function GJ(n){return Oe(Xnt,n)}const Jnt=GJ;let eit=Re.CDLCLOSINGMARUBOZU;function YJ(n){return Oe(eit,n)}const tit=YJ;let nit=Re.CDLCONCEALBABYSWALL;function QJ(n){return Oe(nit,n)}const iit=QJ;let rit=Re.CDLCOUNTERATTACK;function ZJ(n){return Oe(rit,n)}const oit=ZJ;let sit=Re.CDLDARKCLOUDCOVER;function XJ(n){return Oe(sit,n)}const ait=XJ;let lit=Re.CDLDOJI;function JJ(n){return Oe(lit,n)}const uit=JJ;let cit=Re.CDLDOJISTAR;function eee(n){return Oe(cit,n)}const dit=eee;let hit=Re.CDLDRAGONFLYDOJI;function tee(n){return Oe(hit,n)}const fit=tee;let pit=Re.CDLENGULFING;function nee(n){return Oe(pit,n)}const git=nee;let mit=Re.CDLEVENINGDOJISTAR;function iee(n){return Oe(mit,n)}const bit=iee;let _it=Re.CDLEVENINGSTAR;function ree(n){return Oe(_it,n)}const yit=ree;let vit=Re.CDLGAPSIDESIDEWHITE;function oee(n){return Oe(vit,n)}const Cit=oee;let wit=Re.CDLGRAVESTONEDOJI;function see(n){return Oe(wit,n)}const xit=see;let Sit=Re.CDLHAMMER;function aee(n){return Oe(Sit,n)}const Dit=aee;let Nit=Re.CDLHANGINGMAN;function lee(n){return Oe(Nit,n)}const Eit=lee;let kit=Re.CDLHARAMI;function uee(n){return Oe(kit,n)}const Lit=uee;let Mit=Re.CDLHARAMICROSS;function cee(n){return Oe(Mit,n)}const Tit=cee;let Ait=Re.CDLHIGHWAVE;function dee(n){return Oe(Ait,n)}const Iit=dee;let Rit=Re.CDLHIKKAKE;function hee(n){return Oe(Rit,n)}const Oit=hee;let Fit=Re.CDLHIKKAKEMOD;function fee(n){return Oe(Fit,n)}const Pit=fee;let Bit=Re.CDLHOMINGPIGEON;function pee(n){return Oe(Bit,n)}const Vit=pee;let zit=Re.CDLIDENTICAL3CROWS;function gee(n){return Oe(zit,n)}const Hit=gee;let jit=Re.CDLINNECK;function mee(n){return Oe(jit,n)}const Wit=mee;let $it=Re.CDLINVERTEDHAMMER;function bee(n){return Oe($it,n)}const Uit=bee;let qit=Re.CDLKICKING;function _ee(n){return Oe(qit,n)}const Kit=_ee;let Git=Re.CDLKICKINGBYLENGTH;function yee(n){return Oe(Git,n)}const Yit=yee;let Qit=Re.CDLLADDERBOTTOM;function vee(n){return Oe(Qit,n)}const Zit=vee;let Xit=Re.CDLLONGLEGGEDDOJI;function Cee(n){return Oe(Xit,n)}const Jit=Cee;let ert=Re.CDLLONGLINE;function wee(n){return Oe(ert,n)}const trt=wee;let nrt=Re.CDLMARUBOZU;function xee(n){return Oe(nrt,n)}const irt=xee;let rrt=Re.CDLMATCHINGLOW;function See(n){return Oe(rrt,n)}const ort=See;let srt=Re.CDLMATHOLD;function Dee(n){return Oe(srt,n)}const art=Dee;let lrt=Re.CDLMORNINGDOJISTAR;function Nee(n){return Oe(lrt,n)}const urt=Nee;let crt=Re.CDLMORNINGSTAR;function Eee(n){return Oe(crt,n)}const drt=Eee;let hrt=Re.CDLONNECK;function kee(n){return Oe(hrt,n)}const frt=kee;let prt=Re.CDLPIERCING;function Lee(n){return Oe(prt,n)}const grt=Lee;let mrt=Re.CDLRICKSHAWMAN;function Mee(n){return Oe(mrt,n)}const brt=Mee;let _rt=Re.CDLRISEFALL3METHODS;function Tee(n){return Oe(_rt,n)}const yrt=Tee;let vrt=Re.CDLSEPARATINGLINES;function Aee(n){return Oe(vrt,n)}const Crt=Aee;let wrt=Re.CDLSHOOTINGSTAR;function Iee(n){return Oe(wrt,n)}const xrt=Iee;let Srt=Re.CDLSHORTLINE;function Ree(n){return Oe(Srt,n)}const Drt=Ree;let Nrt=Re.CDLSPINNINGTOP;function Oee(n){return Oe(Nrt,n)}const Ert=Oee;let krt=Re.CDLSTALLEDPATTERN;function Fee(n){return Oe(krt,n)}const Lrt=Fee;let Mrt=Re.CDLSTICKSANDWICH;function Pee(n){return Oe(Mrt,n)}const Trt=Pee;let Art=Re.CDLTAKURI;function Bee(n){return Oe(Art,n)}const Irt=Bee;let Rrt=Re.CDLTASUKIGAP;function Vee(n){return Oe(Rrt,n)}const Ort=Vee;let Frt=Re.CDLTHRUSTING;function zee(n){return Oe(Frt,n)}const Prt=zee;let Brt=Re.CDLTRISTAR;function Hee(n){return Oe(Brt,n)}const Vrt=Hee;let zrt=Re.CDLUNIQUE3RIVER;function jee(n){return Oe(zrt,n)}const Hrt=jee;let jrt=Re.CDLUPSIDEGAP2CROWS;function Wee(n){return Oe(jrt,n)}const Wrt=Wee;let $rt=Re.CDLXSIDEGAP3METHODS;function $ee(n){return Oe($rt,n)}const Urt=$ee;let qrt=Re.CEIL;function Uee(n){return Oe(qrt,n)}const Krt=Uee;let Grt=Re.CMO;function qee(n){return Oe(Grt,n)}const Yrt=qee;let Qrt=Re.CORREL;function Kee(n){return Oe(Qrt,n)}const Zrt=Kee;let Xrt=Re.COS;function Gee(n){return Oe(Xrt,n)}const Jrt=Gee;let eot=Re.COSH;function Yee(n){return Oe(eot,n)}const tot=Yee;let not=Re.DEMA;function Qee(n){return Oe(not,n)}const iot=Qee;let rot=Re.DIV;function Zee(n){return Oe(rot,n)}const oot=Zee;let sot=Re.DX;function Xee(n){return Oe(sot,n)}const aot=Xee;let lot=Re.EMA;function Jee(n){return Oe(lot,n)}const uot=Jee;let cot=Re.EXP;function ete(n){return Oe(cot,n)}const dot=ete;let hot=Re.FLOOR;function tte(n){return Oe(hot,n)}const fot=tte;let pot=Re.HT_DCPERIOD;function nte(n){return Oe(pot,n)}const got=nte;let mot=Re.HT_DCPHASE;function ite(n){return Oe(mot,n)}const bot=ite;let _ot=Re.HT_PHASOR;function rte(n){return Oe(_ot,n)}const yot=rte;let vot=Re.HT_SINE;function ote(n){return Oe(vot,n)}const Cot=ote;let wot=Re.HT_TRENDLINE;function ste(n){return Oe(wot,n)}const xot=ste;let Sot=Re.HT_TRENDMODE;function ate(n){return Oe(Sot,n)}const Dot=ate;let Not=Re.IMI;function lte(n){return Oe(Not,n)}const Eot=lte;let kot=Re.KAMA;function ute(n){return Oe(kot,n)}const Lot=ute;let Mot=Re.LINEARREG;function cte(n){return Oe(Mot,n)}const Tot=cte;let Aot=Re.LINEARREG_ANGLE;function dte(n){return Oe(Aot,n)}const Iot=dte;let Rot=Re.LINEARREG_INTERCEPT;function hte(n){return Oe(Rot,n)}const Oot=hte;let Fot=Re.LINEARREG_SLOPE;function fte(n){return Oe(Fot,n)}const Pot=fte;let Bot=Re.LN;function pte(n){return Oe(Bot,n)}const Vot=pte;let zot=Re.LOG10;function gte(n){return Oe(zot,n)}const Hot=gte;let jot=Re.MA;function mte(n){return Oe(jot,n)}const Wot=mte;let $ot=Re.MACD;function bte(n){return Oe($ot,n)}const Uot=bte;let qot=Re.MACDEXT;function _te(n){return Oe(qot,n)}const Kot=_te;let Got=Re.MACDFIX;function yte(n){return Oe(Got,n)}const Yot=yte;let Qot=Re.MAMA;function vte(n){return Oe(Qot,n)}const Zot=vte;let Xot=Re.MAVP;function Cte(n){return Oe(Xot,n)}const Jot=Cte;let est=Re.MAX;function wte(n){return Oe(est,n)}const tst=wte;let nst=Re.MAXINDEX;function xte(n){return Oe(nst,n)}const ist=xte;let rst=Re.MEDPRICE;function Ste(n){return Oe(rst,n)}const ost=Ste;let sst=Re.MFI;function Dte(n){return Oe(sst,n)}const ast=Dte;let lst=Re.MIDPOINT;function Nte(n){return Oe(lst,n)}const ust=Nte;let cst=Re.MIDPRICE;function Ete(n){return Oe(cst,n)}const dst=Ete;let hst=Re.MIN;function kte(n){return Oe(hst,n)}const fst=kte;let pst=Re.MININDEX;function Lte(n){return Oe(pst,n)}const gst=Lte;let mst=Re.MINMAX;function Mte(n){return Oe(mst,n)}const bst=Mte;let _st=Re.MINMAXINDEX;function Tte(n){return Oe(_st,n)}const yst=Tte;let vst=Re.MINUS_DI;function Ate(n){return Oe(vst,n)}const Cst=Ate;let wst=Re.MINUS_DM;function Ite(n){return Oe(wst,n)}const xst=Ite;let Sst=Re.MOM;function Rte(n){return Oe(Sst,n)}const Dst=Rte;let Nst=Re.MULT;function Ote(n){return Oe(Nst,n)}const Est=Ote;let kst=Re.NATR;function Fte(n){return Oe(kst,n)}const Lst=Fte;let Mst=Re.OBV;function Pte(n){return Oe(Mst,n)}const Tst=Pte;let Ast=Re.PLUS_DI;function Bte(n){return Oe(Ast,n)}const Ist=Bte;let Rst=Re.PLUS_DM;function Vte(n){return Oe(Rst,n)}const Ost=Vte;let Fst=Re.PPO;function zte(n){return Oe(Fst,n)}const Pst=zte;let Bst=Re.ROC;function Hte(n){return Oe(Bst,n)}const Vst=Hte;let zst=Re.ROCP;function jte(n){return Oe(zst,n)}const Hst=jte;let jst=Re.ROCR;function Wte(n){return Oe(jst,n)}const Wst=Wte;let $st=Re.ROCR100;function $te(n){return Oe($st,n)}const Ust=$te;let qst=Re.RSI;function Ute(n){return Oe(qst,n)}const Kst=Ute;let Gst=Re.SAR;function qte(n){return Oe(Gst,n)}const Yst=qte;let Qst=Re.SAREXT;function Kte(n){return Oe(Qst,n)}const Zst=Kte;let Xst=Re.SIN;function Gte(n){return Oe(Xst,n)}const Jst=Gte;let eat=Re.SINH;function Yte(n){return Oe(eat,n)}const tat=Yte;let nat=Re.SMA;function Qte(n){return Oe(nat,n)}const iat=Qte;let rat=Re.SQRT;function Zte(n){return Oe(rat,n)}const oat=Zte;let sat=Re.STDDEV;function Xte(n){return Oe(sat,n)}const aat=Xte;let lat=Re.STOCH;function Jte(n){return Oe(lat,n)}const uat=Jte;let cat=Re.STOCHF;function ene(n){return Oe(cat,n)}const dat=ene;let hat=Re.STOCHRSI;function tne(n){return Oe(hat,n)}const fat=tne;let pat=Re.SUB;function nne(n){return Oe(pat,n)}const gat=nne;let mat=Re.SUM;function ine(n){return Oe(mat,n)}const bat=ine;let _at=Re.T3;function rne(n){return Oe(_at,n)}const yat=rne;let vat=Re.TAN;function one(n){return Oe(vat,n)}const Cat=one;let wat=Re.TANH;function sne(n){return Oe(wat,n)}const xat=sne;let Sat=Re.TEMA;function ane(n){return Oe(Sat,n)}const Dat=ane;let Nat=Re.TRANGE;function lne(n){return Oe(Nat,n)}const Eat=lne;let kat=Re.TRIMA;function une(n){return Oe(kat,n)}const Lat=une;let Mat=Re.TRIX;function cne(n){return Oe(Mat,n)}const Tat=cne;let Aat=Re.TSF;function dne(n){return Oe(Aat,n)}const Iat=dne;let Rat=Re.TYPPRICE;function hne(n){return Oe(Rat,n)}const Oat=hne;let Fat=Re.ULTOSC;function fne(n){return Oe(Fat,n)}const Pat=fne;let Bat=Re.VAR;function pne(n){return Oe(Bat,n)}const Vat=pne;let zat=Re.WCLPRICE;function gne(n){return Oe(zat,n)}const Hat=gne;let jat=Re.WILLR;function mne(n){return Oe(jat,n)}const Wat=mne;let $at=Re.WMA;function bne(n){return Oe($at,n)}const s5=Object.freeze(Object.defineProperty({__proto__:null,ACCBANDS:yJ,ACOS:vJ,AD:CJ,ADD:wJ,ADOSC:xJ,ADX:SJ,ADXR:DJ,APO:NJ,AROON:EJ,AROONOSC:kJ,ASIN:LJ,ATAN:MJ,ATR:TJ,AVGDEV:AJ,AVGPRICE:IJ,BBANDS:RJ,BETA:OJ,BOP:FJ,CCI:PJ,CDL2CROWS:BJ,CDL3BLACKCROWS:VJ,CDL3INSIDE:zJ,CDL3LINESTRIKE:HJ,CDL3OUTSIDE:jJ,CDL3STARSINSOUTH:WJ,CDL3WHITESOLDIERS:$J,CDLABANDONEDBABY:UJ,CDLADVANCEBLOCK:qJ,CDLBELTHOLD:KJ,CDLBREAKAWAY:GJ,CDLCLOSINGMARUBOZU:YJ,CDLCONCEALBABYSWALL:QJ,CDLCOUNTERATTACK:ZJ,CDLDARKCLOUDCOVER:XJ,CDLDOJI:JJ,CDLDOJISTAR:eee,CDLDRAGONFLYDOJI:tee,CDLENGULFING:nee,CDLEVENINGDOJISTAR:iee,CDLEVENINGSTAR:ree,CDLGAPSIDESIDEWHITE:oee,CDLGRAVESTONEDOJI:see,CDLHAMMER:aee,CDLHANGINGMAN:lee,CDLHARAMI:uee,CDLHARAMICROSS:cee,CDLHIGHWAVE:dee,CDLHIKKAKE:hee,CDLHIKKAKEMOD:fee,CDLHOMINGPIGEON:pee,CDLIDENTICAL3CROWS:gee,CDLINNECK:mee,CDLINVERTEDHAMMER:bee,CDLKICKING:_ee,CDLKICKINGBYLENGTH:yee,CDLLADDERBOTTOM:vee,CDLLONGLEGGEDDOJI:Cee,CDLLONGLINE:wee,CDLMARUBOZU:xee,CDLMATCHINGLOW:See,CDLMATHOLD:Dee,CDLMORNINGDOJISTAR:Nee,CDLMORNINGSTAR:Eee,CDLONNECK:kee,CDLPIERCING:Lee,CDLRICKSHAWMAN:Mee,CDLRISEFALL3METHODS:Tee,CDLSEPARATINGLINES:Aee,CDLSHOOTINGSTAR:Iee,CDLSHORTLINE:Ree,CDLSPINNINGTOP:Oee,CDLSTALLEDPATTERN:Fee,CDLSTICKSANDWICH:Pee,CDLTAKURI:Bee,CDLTASUKIGAP:Vee,CDLTHRUSTING:zee,CDLTRISTAR:Hee,CDLUNIQUE3RIVER:jee,CDLUPSIDEGAP2CROWS:Wee,CDLXSIDEGAP3METHODS:$ee,CEIL:Uee,CMO:qee,CORREL:Kee,COS:Gee,COSH:Yee,DEMA:Qee,DIV:Zee,DX:Xee,EMA:Jee,EXP:ete,FLOOR:tte,HT_DCPERIOD:nte,HT_DCPHASE:ite,HT_PHASOR:rte,HT_SINE:ote,HT_TRENDLINE:ste,HT_TRENDMODE:ate,IMI:lte,KAMA:ute,LINEARREG:cte,LINEARREG_ANGLE:dte,LINEARREG_INTERCEPT:hte,LINEARREG_SLOPE:fte,LN:pte,LOG10:gte,MA:mte,MACD:bte,MACDEXT:_te,MACDFIX:yte,MAMA:vte,get MAType(){return tk},MAVP:Cte,MAX:wte,MAXINDEX:xte,MEDPRICE:Ste,MFI:Dte,MIDPOINT:Nte,MIDPRICE:Ete,MIN:kte,MININDEX:Lte,MINMAX:Mte,MINMAXINDEX:Tte,MINUS_DI:Ate,MINUS_DM:Ite,MOM:Rte,MULT:Ote,NATR:Fte,OBV:Pte,PLUS_DI:Bte,PLUS_DM:Vte,PPO:zte,ROC:Hte,ROCP:jte,ROCR:Wte,ROCR100:$te,RSI:Ute,SAR:qte,SAREXT:Kte,SIN:Gte,SINH:Yte,SMA:Qte,SQRT:Zte,STDDEV:Xte,STOCH:Jte,STOCHF:ene,STOCHRSI:tne,SUB:nne,SUM:ine,T3:rne,TAN:one,TANH:sne,TEMA:ane,TRANGE:lne,TRIMA:une,TRIX:cne,TSF:dne,TYPPRICE:hne,ULTOSC:fne,VAR:pne,WCLPRICE:gne,WILLR:mne,WMA:bne,accBands:Ytt,acos:Ztt,ad:Jtt,adOsc:int,add:tnt,adx:ont,adxr:ant,apo:unt,aroon:dnt,aroonOsc:fnt,asin:gnt,atan:bnt,atr:ynt,avgDev:Cnt,avgPrice:xnt,bbands:Dnt,beta:Ent,bop:Lnt,cci:Tnt,cdl2Crows:Int,cdl3BlackCrows:Ont,cdl3Inside:Pnt,cdl3LineStrike:Vnt,cdl3Outside:Hnt,cdl3StarsInSouth:Wnt,cdl3WhiteSoldiers:Unt,cdlAbandonedBaby:Knt,cdlAdvanceBlock:Ynt,cdlBeltHold:Znt,cdlBreakaway:Jnt,cdlClosingMarubozu:tit,cdlConcealBabysWall:iit,cdlCounterAttack:oit,cdlDarkCloudCover:ait,cdlDoji:uit,cdlDojiStar:dit,cdlDragonflyDoji:fit,cdlEngulfing:git,cdlEveningDojiStar:bit,cdlEveningStar:yit,cdlGapSideSideWhite:Cit,cdlGravestoneDoji:xit,cdlHammer:Dit,cdlHangingMan:Eit,cdlHarami:Lit,cdlHaramiCross:Tit,cdlHignWave:Iit,cdlHikkake:Oit,cdlHikkakeMod:Pit,cdlHomingPigeon:Vit,cdlIdentical3Crows:Hit,cdlInNeck:Wit,cdlInvertedHammer:Uit,cdlKicking:Kit,cdlKickingByLength:Yit,cdlLadderBottom:Zit,cdlLongLeggedDoji:Jit,cdlLongLine:trt,cdlMarubozu:irt,cdlMatHold:art,cdlMatchingLow:ort,cdlMorningDojiStar:urt,cdlMorningStar:drt,cdlOnNeck:frt,cdlPiercing:grt,cdlRickshawMan:brt,cdlRiseFall3Methods:yrt,cdlSeperatingLines:Crt,cdlShootingStar:xrt,cdlShortLine:Drt,cdlSpinningTop:Ert,cdlStalledPattern:Lrt,cdlStickSandwhich:Trt,cdlTakuri:Irt,cdlTasukiGap:Ort,cdlThrusting:Prt,cdlTristar:Vrt,cdlUnique3River:Hrt,cdlUpsideGap2Crows:Wrt,cdlXSideGap3Methods:Urt,ceil:Krt,cmo:Yrt,correl:Zrt,cos:Jrt,cosh:tot,dema:iot,div:oot,dx:aot,ema:uot,exp:dot,floor:fot,htDcPeriod:got,htDcPhase:bot,htPhasor:yot,htSine:Cot,htTrendMode:Dot,htTrendline:xot,imi:Eot,init:nk,kama:Lot,linearReg:Tot,linearRegAngle:Iot,linearRegIntercept:Oot,linearRegSlope:Pot,ln:Vot,log10:Hot,macd:Uot,macdExt:Kot,macdFix:Yot,mama:Zot,max:tst,maxIndex:ist,medPrice:ost,mfi:ast,midPoint:ust,midPrice:dst,min:fst,minIndex:gst,minMax:bst,minMaxIndex:yst,minusDI:Cst,minusDM:xst,mom:Dst,movingAverage:Wot,movingAverageVariablePeriod:Jot,mult:Est,natr:Lst,obv:Tst,plusDI:Ist,plusDM:Ost,ppo:Pst,roc:Vst,rocP:Hst,rocR:Wst,rocR100:Ust,rsi:Kst,sar:Yst,sarExt:Zst,sin:Jst,sinh:tat,sma:iat,sqrt:oat,stdDev:aat,stoch:uat,stochF:dat,stochRsi:fat,sub:gat,sum:bat,t3:yat,tan:Cat,tanh:xat,tema:Dat,trima:Lat,trix:Tat,trueRange:Eat,tsf:Iat,typPrice:Oat,ultOsc:Pat,variance:Vat,wclPrice:Hat,willR:Wat,wma:bne},Symbol.toStringTag,{value:"Module"}));let _ne=!1,yne=!0,vne=[];const Cne=n=>{const e=[],t=[],i=[],r=[],o=[],s=[];return n.forEach((a,l)=>{e.push(a[0]),t.push(a[1]),i.push(a[4]),r.push(a[2]),o.push(a[3]),s.push([a[1],a[4],a[3],a[2],Number(a[6]),l===0?a[4]:n[l-1][4]])}),{time:e,open:t,close:i,high:r,low:o,kLineData:s}},Uat=async()=>{if(!_ne)_ne=!0,await nk("./talib.wasm"),yne=!1,vne.forEach(n=>{n()});else if(yne)return new Promise(n=>{vne.push(n)})},y_=(n,e)=>n.length>e?n.slice(n.length-e):n,qat=(n,e,t)=>n.calculationFn?n.calculationFn(s5,e,t):new Array(e.time.length).fill(null),Kat=async(n,e,t)=>{const i=Cne(n);let r=[];return r=Cne(r),await Uat(),{originData:y_(n,t),kLine:y_(i.kLineData,t),time:y_(i.time,t),indicator:e.config.reduce((o,s)=>(o.push({key:s.key,color:s.color,data:y_(qat(s,i,r),t)}),o),[])}},ik="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40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LjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",a5=(n,e)=>{const{type:t="log",color:i="black"}=e??{};localStorage.getItem("st-kline-console-show")==="true"&&console[t](`%c${n}`,`color:${i}`)},Aa=n=>n||n===0?Math.round(n*1e3)/1e3:null,Gat=n=>n>=1e12?`${(n/1e12).toFixed(2)}万亿`:n>=1e8?`${(n/1e8).toFixed(2)}亿`:n>=1e4?`${(n/1e4).toFixed(2)}万`:n.toFixed(2),Yat=n=>{const{y:e,text:t,info:i,gridLeft:r,gridRight:o,echartsWidth:s,echartsInstance:a}=n,{config:l,event:u}=i;let d=0;return{type:"group",draggable:l.draggable?"vertical":!1,children:[{type:"line",info:i,shape:{x1:r,y1:e,x2:s-o,y2:e},style:{stroke:l.lineColor,lineWidth:1,lineDash:[8,4]},z:10},{type:"group",x:s,y:e-5,children:[{type:"text",left:-1*o,info:i,style:{fill:l.textColor,text:t,stroke:"#000",lineWidth:1,opacity:1},z:10}]}],onmouseover:h=>{u.onmouseover instanceof Function&&u.onmouseover(h,i)},onmouseout:h=>{u.onmouseout instanceof Function&&u.onmouseout(h,i)},ondragstart:h=>{u.ondragstart instanceof Function&&l.draggable&&(d=h.offsetY,u.ondragstart(h,i))},ondragend:h=>{if(u.ondragend instanceof Function&&l.draggable){const p=h.offsetY-d;if(p===0)return;const g=a.convertFromPixel({yAxisIndex:0},e+p);u.ondragend(h,i,g)}}}},Qat=n=>{const{y:e,text:t,info:i,gridLeft:r,gridRight:o,echartsWidth:s,echartsInstance:a}=n,{config:l,event:u}=i;let d=0;const h=p=>{let g=null;p.target.type==="line"?g=p.target.parent:p.target.type==="tspan"&&(g=p.target.parent.parent.parent),g.children()[1].children()[0].animate("style",!1).when(200,{opacity:1}).start()},f=p=>{let g=null;p.target.type==="line"?g=p.target.parent:p.target.type==="tspan"&&(g=p.target.parent.parent.parent),g.children()[1].children()[0].animate("style",!1).when(200,{opacity:0}).start()};return{type:"group",draggable:l.draggable?"vertical":!1,children:[{type:"line",info:i,shape:{x1:r,y1:e,x2:s-o,y2:e},style:{stroke:l.lineColor,lineWidth:1},z:10},{type:"group",x:s/2,y:e-5,children:[{type:"text",left:"center",info:i,style:{fill:l.textColor,text:t,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:p=>{u.onmouseover instanceof Function?u.onmouseover(p,i):h(p)},onmouseout:p=>{u.onmouseout instanceof Function?u.onmouseout(p,i):f(p)},ondragstart:p=>{u.ondragstart instanceof Function&&l.draggable&&(d=p.offsetY,u.ondragstart(p,i))},ondragend:p=>{if(u.ondragend instanceof Function&&l.draggable){const m=p.offsetY-d;if(m===0)return;const y=a.convertFromPixel({yAxisIndex:0},e+m);u.ondragend(p,i,y)}}}},Zat=n=>{const{y:e,text:t,profitY:i,profitText:r,lossY:o,lossText:s,info:a,gridLeft:l,gridRight:u,echartsWidth:d,echartsInstance:h}=n,{config:f,event:p}=a;let g=0,m=null,y=null;const _=(v,w)=>{var x,S,D,N;(x=v.children()[2])==null||x.animate("style",!1).when(200,{opacity:~~w}).start(),(S=v.children()[3].children()[0])==null||S.animate("style",!1).when(200,{opacity:~~w}).start(),(D=v.children()[4])==null||D.animate("style",!1).when(200,{opacity:~~w}).start(),(N=v.children()[5].children()[0])==null||N.animate("style",!1).when(200,{opacity:~~w}).start()},C=v=>{let w=null;v.target.type==="line"?w=v.target.parent:v.target.type==="tspan"&&(w=v.target.parent.parent.parent),m=x=>{x.preventDefault(),(x.code==="AltLeft"||x.code==="AltRight")&&_(w,!0)},y=x=>{(x.code==="AltLeft"||x.code==="AltRight")&&_(w,!1)},window.addEventListener("keydown",m),window.addEventListener("keyup",y)},b=v=>{let w=null;v.target.type==="line"?w=v.target.parent:v.target.type==="tspan"&&(w=v.target.parent.parent.parent),_(w,!1),window.removeEventListener("keydown",m),window.removeEventListener("keyup",y)};return{type:"group",draggable:f.draggable?"vertical":!1,children:[{type:"line",info:a,shape:{x1:l,y1:e,x2:d-u,y2:e},style:{stroke:f.lineColor,lineWidth:1},z:10},{type:"group",x:d/2,y:e-5,children:[{type:"text",left:"center",info:a,style:{fill:f.textColor,text:t,stroke:"#000",lineWidth:1,opacity:1},z:10}]},{type:"line",info:a,shape:{x1:l,y1:i,x2:d-u,y2:i},style:{stroke:f.profitLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:i-5,children:[{type:"text",left:"center",info:a,style:{fill:f.profitTextColor,text:r,stroke:"#000",lineWidth:1,opacity:0},z:10}]},{type:"line",info:a,shape:{x1:l,y1:o,x2:d-u,y2:o},style:{stroke:f.lossLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:o-5,children:[{type:"text",left:"center",info:a,style:{fill:f.lossTextColor,text:s,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:v=>{p.onmouseover instanceof Function?p.onmouseover(v,a):C(v)},onmouseout:v=>{p.onmouseout instanceof Function?p.onmouseout(v,a):b(v)},ondragstart:v=>{p.ondragstart instanceof Function&&f.draggable&&(g=v.offsetY,p.ondragstart(v,a))},ondragend:v=>{if(p.ondragend instanceof Function&&f.draggable){const x=v.offsetY-g;if(x===0)return;const S=h.convertFromPixel({yAxisIndex:0},e+x);p.ondragend(v,a,S)}}}},v_=(n,e)=>{const{direction:t="",tradeAction:i="",tradeType:r=""}=n;if(e==="sellBuy"){const o=r??t+i;return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(o)}else if(e==="openClose")return r??t+i},Xat=(n,e)=>n.reduce((t,i)=>{var d;const r=v_(i,"sellBuy"),o=n.filter(h=>h.time===i.time);let s="image://"+new URL(Object.assign({"./images/buy.svg":ik,"./images/sell.svg":rk,"./images/t.svg":ok})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href;o.length>1?[...new Set(o.map(f=>v_(f,"sellBuy")))].length>1?s="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDA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jYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":ik,"./images/sell.svg":rk,"./images/t.svg":ok})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":ik,"./images/sell.svg":rk,"./images/t.svg":ok})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href;const l=(e.find(h=>h[0]===i.time)??[])[2],u=((d=i==null?void 0:i.markLineTarget)==null?void 0:d.map(h=>{const f=i.time,p=l+"",g=h.time,m=e.find(_=>_[0]===h.time),y=m?m[3]:null;return[{coord:[f,p],lineStyle:h.lineStyle},{coord:[g,y]}]}))??null;return t.push({symbol:s,symbolSize:25,animation:!1,coord:[i.time+"",l],symbolRotate:0,symbolOffset:[0,"-7"],markLineTarget:u}),t},[]),Jat=(n,e)=>n.reduce((t,i,r)=>{var h;const o=v_(i,"openClose"),s=o==="开多"||o==="开空"?"top":"bottom",a=e.find(f=>f[0]===i.time)??[],l=s==="top"?a[2]:a[3];let u=7;u+=n.slice(0,r).filter(f=>{const p=v_(f,"openClose");return(p==="开多"||p==="开空"?"top":"bottom")===s&&f.time===i.time}).length*7;const d=((h=i==null?void 0:i.markLineTarget)==null?void 0:h.map(f=>{const p=i.time,g=l+"",m=f.time,y=e.find(_=>_[0]===f.time)[3];return[{coord:[p,g],lineStyle:f.lineStyle},{coord:[m,y]}]}))??null;return t.push({symbol:"triangle",symbolSize:[10,12],animation:!1,coord:[i.time+"",l],symbolRotate:s==="top"?180:0,symbolOffset:[0,`${s==="top"?u*-1:u}`],itemStyle:{color:s==="top"?"#FF0000":"#389e0d"},label:{show:!0,position:s,color:"#fff",formatter:`${o} ${s==="top"?"+":"-"} ${i.amount}手 ${i.part?`(${i.part}份)`:""}`},markLineTarget:d}),t},[]),elt=(n,e)=>n.reduce((t,i)=>{const{key:r,data:o}=i;if(o===null||o.length===0)return t;const a=new Map([["sellBuy",()=>Xat(o,e)],["openClose",()=>Jat(o,e)],["signal",()=>{}]]).get(r);return a instanceof Function&&t.push(...a()),t},[]),sk=async(n,e,t,i,r,o)=>{const{totalBarCount:s,defaultShowBarCount:a,maxValueSpan:l,gridLeft:u,gridTop:d,gridRight:h,gridBottom:f,zoomLock:p}=i,{time:g,kLine:m,originData:y,indicator:_}=await Kat(n,t,s),C=_.map(w=>{const{key:x,data:S,color:D}=w;return{name:x,type:"line",silent:!0,symbol:"none",data:S,lineStyle:{width:1},itemStyle:{color:D}}}),b=elt(e,y);let v=[];return b.forEach(w=>{w.markLineTarget&&(v=[...v,...w.markLineTarget])}),{animation:!1,dataset:{id:"data",source:{klineData:m,indicatorData:_}},grid:{left:`${u}px`,top:`${d}px`,right:`${h}px`,bottom:`${f}px`},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{formatter:w=>{const{axisDimension:x,value:S}=w;return x==="x"?S:String(Aa(S))}}},formatter:w=>{let x=null,S="";return w.forEach(D=>{D.seriesName==="资产持仓净值"&&D.data!==null&&(S+=`<div>资产持仓净值: ${D.data}</div>`),D.componentSubType==="candlestick"&&e.forEach(N=>{const{key:k,data:E}=N;if(k==="sellBuy"){const L=E.filter(R=>R.time===D.axisValue);let A=0,F=0;L.forEach(R=>{R.tradeType==="开多"||R.tradeType==="平空"?A+=R.amount:F+=R.amount}),A&&(S+=`<div>买: ${A}</div>`),F&&(S+=`<div>卖: ${F}</div>`)}k==="openClose"&&E.forEach(L=>{L.time===D.axisValue&&(S+=L.tooltip)})}),S&&(x=`<div><span style="font-weight: bold;">${D.axisValue}</span>${S}</div>`)}),x}},xAxis:{type:"category",data:g,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},axisLabel:{show:!0,formatter:w=>w}},yAxis:[{index:0,splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:w=>{const{min:x,max:S}=w,D=Math.abs((S-x)/10);return x-D},max:w=>{const{min:x,max:S}=w,D=Math.abs((S-x)/10);return S+D},axisLine:{show:!0},axisLabel:{formatter:w=>Aa(w),showMaxLabel:!1}},{show:!1,min:"dataMin"}],dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:p,maxValueSpan:l,start:m.length>=a?(m.length-a)/m.length*100:0,end:99.99}],series:[{name:"k线",type:"candlestick",data:m,markPoint:{data:b},markLine:{position:"middle",textStyle:{color:"blue",fontSize:15},animation:!1,data:v,lineStyle:{width:3,type:"solid"},symbol:["none","none"]},itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1},z:1},...C,{name:"资产持仓净值",type:"line",data:r??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#666"}},{name:"二腿相关度",type:"line",data:o??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#FFF"},lineStyle:{width:2},label:{show:!0,position:"top",formatter:w=>`相关度: ${w.data[1]}`,textStyle:{color:"#FFF",fontSize:14}}}],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:1},brushStyle:{color:"rgba(120,140,180,0)",borderColor:"rgba(255,255,255,0.4)"}}}},tlt=(n,e,t)=>{var h;const{gridLeft:i,gridRight:r,gridBottom:o,warningConfig:s,positionConfig:a,conditionConfig:l,isOpenDS:u}=e;let d=[];if((h=t==null?void 0:t.getModel())!=null&&h.getComponent){const[f,p]=t.getModel().getComponent("yAxis").axis.scale._extent;let g=[],m={},y=[],_={},C=[],b={};if(n.forEach(({key:v,data:w,...x})=>{v==="warning"?(g=w,m=x):v==="position"?(y=w,_=x):v==="condition"&&(C=w,b=x)}),g.length>0&&(d=g.reduce((v,w)=>{const{value:x,text:S,info:D,config:N}=w;if(x>p||x<f)return v;const k={y:t.convertToPixel({yAxisIndex:0},x),text:S,info:{info:D,config:{...s,...N},event:{...m}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Yat(k)]},d)),y.length>0&&(d=y.reduce((v,w)=>{const{value:x,text:S,info:D,config:N}=w;if(x>p||x<f)return v;const k={y:t.convertToPixel({yAxisIndex:0},x),text:S,info:{info:D,config:{...a,...N},event:{..._}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Qat(k)]},d)),C.length>0&&(d=C.reduce((v,w)=>{const{value:x,text:S,profitValue:D,profitText:N,lossValue:k,lossText:E,info:L,config:A}=w;if(x>p||x<f)return v;const F={y:t.convertToPixel({yAxisIndex:0},x),text:S,profitY:t.convertToPixel({yAxisIndex:0},D),profitText:N,lossY:t.convertToPixel({yAxisIndex:0},k),lossText:E,info:{info:L,config:{...l,...A},event:{...b}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Zat(F)]},d)),u){const v=t.getOption(),w=v.dataset[0].source.klineData.slice(v.dataZoom[0].startValue,v.dataZoom[0].endValue+1),x={};w.forEach(F=>{x[F[1]]?x[F[1]]+=1:x[F[1]]=1});const S=w[w.length-1][1],D=w.reduce((F,R)=>F+R[1],0)/w.length,N=S-D,k=ilt(w,1,50),E=rlt(w),L=E?N/E:0,A=nlt(w,1,S);d=[...d,{type:"group",draggable:!1,children:Object.keys(x).map(F=>({type:"line",shape:{x1:t.getWidth()-r-100*x[F],y1:t.convertToPixel({yAxisIndex:0},F),x2:t.getWidth()-r,y2:t.convertToPixel({yAxisIndex:0},F)},style:{stroke:"rgb(124,124,124)",lineWidth:1},z:10}))},{type:"text",x:i+6,y:t.getHeight()-o-20,style:{fill:"#FFF",text:`均值: ${Aa(D)}    距均值: ${Aa(N)}    中值: ${Aa(k)}    标准差: ${Aa(E)}    距均值/标准差: ${Aa(L)}    百分位: ${Aa(A)}%`,lineWidth:1,opacity:1},z:10}]}}return{elements:d}},nlt=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=Cl,l=n.map(d=>d[e]).sort((d,h)=>d-h);let u=0;for(let d=0;d<l.length;d++)if(l[d]===t){u=d;break}else if(l[d]>=t){u=r(d,a(o(l[d+1],l[d]),l[d]));break}return i(a(s(u,100),n.length+1))},ilt=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=Cl,l=n.map(f=>f[e]).sort((f,p)=>f-p),u=s(n.length+1,a(t,100)),d=Math.floor(u),h=o(u,d);return i(h===0?l[u]:r(l[d],s(o(l[d>=n.length-1?d:d+1],l[d]),h)))};function rlt(n){const e=n.map(s=>s[1]),t=e.length;let i=0,r=0;for(const s of e)i+=s;const o=i/t;for(const s of e)r+=Math.pow(s-o,2);return Math.sqrt(r/t)}const olt={class:"st-kline"},slt={class:"st-kline-header"},alt=300,llt=c.defineComponent({__name:"index",props:{indicator:{type:Object,default:()=>({})},klineData:{type:Array,default:()=>[]},markData:{type:Array,default:()=>[]},lineData:{type:Array,default:()=>[]},netPositionData:{type:Array,default:()=>[]},relevanceData:{type:Array,default:()=>[]},priceTrendData:{type:Array,default:()=>[]},priceTrendPercentData:{type:Array,default:()=>[]},brushRange:{type:Array,default:()=>[]},defaultMenuData:{type:Array,default:()=>[]},isSelect:{type:Boolean,default:()=>!1},config:{type:Object,default:()=>({})}},setup(n){const e=n,t={totalBarCount:2e3,defaultShowBarCount:200,preBarCount:800,maxValueSpan:1e4,gridLeft:60,gridTop:0,gridRight:60,gridBottom:30,warningConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff"},positionConfig:{draggable:!1,lineColor:"#e45d07",textColor:"#fff"},conditionConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff",profitLineColor:"#b71e44",profitTextColor:"#fff",lossLineColor:"#749b66",lossTextColor:"#fff"},tipsConfig:{open:!0,heigh:!0,low:!0,close:!0,business:!0,riseAndFall:!0},dynamicLoadConfig:{historyVisible:!1,historyLoadCallBack:()=>{},futureVisible:!1,futureLoadCallBack:()=>{}},zoomLock:!1,isOpenDS:!1},i=c.computed(()=>({...t,...e.config})),r=c.ref(null),o=c.ref(-1),s=c.computed(()=>{var F,R;if(r.value&&((R=(F=r.value.dataset[0])==null?void 0:F.source)!=null&&R.klineData[o.value])){const I=r.value.dataset[0].source.klineData[o.value],M=[],{open:O,heigh:P,low:U,close:Y,business:j,riseAndFall:z}=i.value.tipsConfig;if(O&&M.push({label:"开",value:I[0],color:"rgb(153, 153, 153)"}),P&&M.push({label:"高",value:I[3],color:"rgb(153, 153, 153)"}),U&&M.push({label:"低",value:I[2],color:"rgb(153, 153, 153)"}),Y&&M.push({label:"收",value:I[1],color:"rgb(153, 153, 153)"}),j&&M.push({label:"额",value:Gat(I[4]),color:"rgb(153, 153, 153)"}),z){let re=((I[1]-I[5])/I[1]*100).toFixed(2),ce=+re==0?"white":+re>0?"red":"#00ff00";M.push({label:"涨跌",value:`${re}%`,color:ce})}return M}return[]}),a=c.computed(()=>{var F,R;return r.value&&((R=(F=r.value.dataset[0])==null?void 0:F.source)!=null&&R.indicatorData)?r.value.dataset[0].source.indicatorData.reduce((I,M)=>(M.data[o.value]&&I.push({label:M.key,value:Aa(M.data[o.value]),color:M.color}),I),[]):[]}),l=c.computed(()=>{const F=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"];if(e.priceTrendData.length>0){const R=[];return e.priceTrendData.forEach((I,M)=>{var P;(I.data[o.value]?Aa(I.data[o.value][1]):null)!==null&&R.push({label:I.name,value:Aa((P=I.data[o.value])==null?void 0:P[1]),color:F[M]})}),R}if(e.priceTrendPercentData.length>0){const R=[];return m.getOption().series.filter(M=>M.name.includes("二腿价格走势百分比图")).forEach((M,O)=>{var U;(M.data[o.value]?Aa(M.data[o.value][1]):null)!==null&&R.push({label:M.name.split("-")[1],value:`${Aa((U=M.data[o.value])==null?void 0:U[1])}%`,color:F[O]})}),R}return[]});c.watch(()=>[e.klineData,e.indicator,e.markData,e.netPositionData,e.relevanceData],()=>{u()},{deep:!0}),c.watch(()=>e.lineData,async()=>{a5("st-kline组件消息:props.lineData监控,额外画线数据发生改变,重绘->line",{color:"red"}),u("line")},{deep:!0}),c.watch(()=>e.brushRange,async()=>{a5("st-kline组件消息:props.brushRange监控,区域刷选数据发生改变,重绘->brush",{color:"red"}),u("brush")},{deep:!0}),c.watch(()=>e.priceTrendData,async()=>{u("priceTrend")},{deep:!0}),c.watch(()=>e.priceTrendPercentData,async()=>{u("priceTrendPercent")},{deep:!0});const u=async F=>{const I=new Map([["kline",async()=>{const M=await sk(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData),{graphic:O}=m.getOption()??{graphic:[]};r.value={...M,graphic:O},m.setOption(r.value,!0),a5("st-kline组件消息:K线绘制完毕-draw",{color:"green"})}],["line",()=>{const M=m.getOption(),O=tlt(e.lineData,i.value,m);r.value={...M,graphic:O},m.setOption(r.value,{replaceMerge:["graphic"]}),a5("st-kline组件消息:额外画线绘制完毕-draw",{color:"green"})}],["brush",()=>{const{brushRange:M}=e;M instanceof Array&&M.length>0&&(m.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[M[0]+"",M[1]+""],xAxisIndex:0}]}),a5("st-kline组件消息:区域刷选绘制完毕-draw",{color:"green"}))}],[void 0,async()=>{await u("kline"),await u("line"),await u("priceTrend"),await u("priceTrendPercent"),await u("brush")}],["history",async()=>{const M=m.getOption(),O=await sk(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData),P=O.dataset.source.klineData.length-M.dataset[0].source.klineData.length;m.setOption({...O,dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:i.value.zoomLock,maxValueSpan:i.value.maxValueSpan,startValue:M.dataZoom[0].startValue+P,endValue:M.dataZoom[0].endValue+P}]},!0),await u("priceTrend")}],["future",async()=>{const M=m.getOption(),O=await sk(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData);O.dataZoom[0].start=(e.klineData.length-M.dataZoom[0].endValue+M.dataZoom[0].startValue)/e.klineData.length*100,m.setOption(O,!0),await u("priceTrend")}],["priceTrend",()=>{if(e.priceTrendData.length===0)return;const M=m.getOption(),O=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],P=e.priceTrendData.reduce((U,Y,j)=>{const{name:z,data:re}=Y,ce={name:`二腿价格走势图-${z}`,type:"line",data:re,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[j]},lineStyle:{type:"dashed",width:1}};return U.push(ce),U},[]);r.value={...M,series:[...M.series,...P]},m.setOption(r.value,{replaceMerge:["series"]})}],["priceTrendPercent",async()=>{if(e.priceTrendPercentData.length===0)return;const M=m.getOption(),O=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],P=M.dataZoom[0].startValue,U=e.priceTrendPercentData.reduce((Y,j,z)=>{const{name:re,data:ce}=j,le=ce.length>i.value.totalBarCount?ce.slice(ce.length-i.value.totalBarCount):ce,ne=le[P][1],oe=le.map(pe=>[pe[0],(pe[1]-ne)/ne*100]),he={name:`二腿价格走势百分比图-${re}`,type:"line",data:oe,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[z]},lineStyle:{type:"dashed",width:1}};return Y.push(he),Y},[]);M.series=[...M.series.filter(Y=>!Y.name.includes("二腿价格走势百分比图")),...U],m.setOption(M,!0)}]]).get(F);I instanceof Function&&await I()},d=c.ref(!1),h=c.ref([]),f=F=>{const{callBack:R}=F;R instanceof Function&&R(m,d)},p=()=>{h.value=e.defaultMenuData},g=c.ref();let m,y;const _=(F,R)=>{var I,M;if(F)o.value=typeof((I=F==null?void 0:F.batch[0])==null?void 0:I.dataIndex)=="number"?(M=F==null?void 0:F.batch[0])==null?void 0:M.dataIndex:-1;else{const O=R.getOption();O.dataZoom instanceof Array&&(o.value=O.dataZoom[0].endValue)}};let C=null,b=!1,v=c.ref(!1),w=!1,x=c.ref(!1);const S=async F=>{const R=F.batch?F.batch[0].start*i.value.totalBarCount:F.startValue;i.value.dynamicLoadConfig.historyVisible&&R<=100&&!b&&!v.value&&(b=!0,await i.value.dynamicLoadConfig.historyLoadCallBack(v),await u("history"),b=!1);const I=F.batch?F.batch[0].end===100:F.endValue>=e.klineData.length-i.value.preBarCount-1,M=F.actionIsWheel;i.value.dynamicLoadConfig.futureVisible&&I&&!w&&!x.value&&!M&&(w=!0,await i.value.dynamicLoadConfig.futureLoadCallBack(x),await u("future"),w=!1),clearTimeout(C),C=setTimeout(()=>{u("line"),u("priceTrendPercent"),clearTimeout(C),C=null},alt)};let D=null;const N=F=>{D=setTimeout(()=>{var R;if(F.componentType==="graphic"){const{oncontextmenu:I}=((R=F.info)==null?void 0:R.event)??{};I instanceof Function&&I(F,F.info,h)}clearTimeout(D),D=null})},k=()=>{m.on("highlight",F=>{_(F,m)}),m.on("globalout",()=>{_(null,m)}),m.on("contextmenu",F=>{N(F)}),m.on("datazoom",F=>{S(F)})},E=()=>{m.off("highlight"),m.off("globalout"),m.off("contextmenu"),m.off("datazoom")},L=F=>{if(!m||!(F.ctrlKey||e.isSelect))return;const R=m.getOption();let{startValue:I,endValue:M,start:O,end:P}=R.dataZoom[0];const U=()=>{I!==0&&(I=I-1,M=M-1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,maxValueSpan:i.value.maxValueSpan}))},Y=()=>{if(i.value.dynamicLoadConfig.futureVisible&&!w&&!x.value)I=I+1,M=M+1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,maxValueSpan:i.value.maxValueSpan});else{if(M===R.xAxis[0].data.length-1)return;I=I+1,M=M+1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,maxValueSpan:i.value.maxValueSpan})}},j=()=>{if(M-I<5)return;const le=Math.floor((o.value-I)/2)+1,ne=Math.floor((M-o.value)/2)+1;I=I+le,M=M-ne,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,actionIsWheel:!0,maxValueSpan:i.value.maxValueSpan})},z=()=>{O=O-(P-O)/4,m.dispatchAction({type:"dataZoom",start:O,end:P,actionIsWheel:!0,maxValueSpan:i.value.maxValueSpan})},ce=new Map([["ArrowLeft",U],["ArrowRight",Y],["ArrowUp",j],["ArrowDown",z]]).get(F.code);ce instanceof Function&&ce()},A=async()=>{let F=!0;m=Kr.init(g.value),await u(),h.value=e.defaultMenuData,o.value=m.getOption().dataZoom[0].endValue??-1,k(),y=new ResizeObserver(()=>{if(F){F=null;return}m.resize(),u("line")}),y.observe(g.value),window.addEventListener("keydown",L)};return c.onMounted(()=>{A()}),c.onUnmounted(()=>{E(),window.removeEventListener("keydown",L),m.dispose(),y.disconnect(),y=null}),(F,R)=>{const I=dz,M=cz;return c.openBlock(),c.createElementBlock("div",olt,[c.createElementVNode("div",slt,[c.createVNode(JE,{data:s.value},null,8,["data"]),c.createVNode(JE,{data:a.value},null,8,["data"]),c.createVNode(JE,{data:l.value},null,8,["data"])]),c.createVNode(qtt,{class:"st-kline-body",onCloseContextMenuCallBack:p},{popover:c.withCtx(()=>[c.createVNode(M,{class:"menu"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(h.value,O=>(c.openBlock(),c.createBlock(I,{key:O.label,index:O.label,class:"menuItem",onClick:P=>f(O)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(O.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",{ref_key:"echartsRef",ref:g,class:c.normalizeClass(d.value?"st-kline-chart cursorPen":"st-kline-chart")},null,2)]),_:1})])}}}),fTt="",pTt="",ult=Jt(llt,[["__scopeId","data-v-57c04894"]]),clt={class:"kline-tips"},dlt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",clt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:"kline-tips-item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}}),gTt="",ak=Jt(dlt,[["__scopeId","data-v-dc7d381b"]]),mTt="",hlt={class:"klineSub"},flt={class:"klineSub-tips"},plt={key:0,class:"klineSub-tips-select"},glt=Jt({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const{round:i}=Cl;let r,o;const s=t,a=n,l=c.ref(),u=c.computed({get(){return a.modelValue},set(f){s("update:modelValue",f)}}),d=c.computed(()=>{var g;const{data:f,activeIndex:p}=a;return((g=f==null?void 0:f.subIndicator)==null?void 0:g.map(m=>({label:m.key,color:m.color,value:m.data[p]||"-"})))||[]});c.onMounted(()=>{r=Kr.init(l.value);let f=!0;o=new ResizeObserver(()=>{if(f){f=null;return}r.resize()}),o.observe(l.value)}),c.onUnmounted(()=>{r.dispose(),o.disconnect(),o=null});const h=(f,p)=>{const g=f[p],m=p===0?f[p]:f[p-1];return g[0]===g[1]?g[0]>=m[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:g[1]>g[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return e({connect:f=>{Kr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:_,rightYAxisRange:C}=a.data.subIndicator[0],b=a.data.subIndicator.map(v=>{if(v.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:v.data.map((w,x)=>v.seriesColor==="kline"?{value:w,itemStyle:h(a.data.data,x)}:v.seriesColor==="value"?{value:w,itemStyle:{color:w>=0?"#FF0000":"#00FFFF"}}:{value:w,itemStyle:{color:v.seriesColor}})};if(v.series==="line")return{xAxisIndex:0,yAxisIndex:v.yAxis==="right"?2:1,name:v.key,type:"line",silent:!0,symbol:"none",data:v.data,lineStyle:{width:1},itemStyle:{color:v.color}}});r.setOption({animation:!1,grid:{left:`${p.gridLeft}px`,top:"10px",right:`${p.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:g,endValue:m,maxValueSpan:y}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:v=>{const{axisDimension:w,value:x}=v;if(w==="x")return x;if(v.axisIndex===1)return String(i(x))}}},formatter:()=>""},xAxis:{type:"category",data:a.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:v=>v}},yAxis:[{position:"right"},{position:"left",min:_==="cover"?v=>v.min:null,max:_==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:C==="cover"?v=>v.min:null,max:C==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:b},!0)})}}),(f,p)=>{const g=ul,m=ll;return c.openBlock(),c.createElementBlock("div",hlt,[c.createElementVNode("div",flt,[d.value.length?(c.openBlock(),c.createElementBlock("div",plt,[c.createVNode(m,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=y=>u.value=y),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.subIndicatorList,y=>(c.openBlock(),c.createBlock(g,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),c.createVNode(ak,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-aba58678"]]),_Tt="",mlt={class:"kline-tips"},blt=Jt({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=Cl,i=n,r=c.computed(()=>{const{data:s,activeIndex:a}=i;if(s.data&&s.data[a]){const l=s.data[a],u=[{label:"开",value:l[0]},{label:"高",value:l[3]},{label:"低",value:l[2]},{label:"收",value:l[1]}];l[4]!==null&&u.push({label:"额",value:t(l[4])});let d;return l[6]>0?d="red":l[6]<0&&(d="green"),u.push({label:"涨跌",value:`${e(l[6])}%`,color:d}),u}return[]}),o=c.computed(()=>{var l;const{data:s,activeIndex:a}=i;return((l=s==null?void 0:s.mainIndicator)==null?void 0:l.map(u=>({label:u.key,value:e(u.data[a]),color:u.color})))||[]});return(s,a)=>(c.openBlock(),c.createElementBlock("div",mlt,[c.createVNode(ak,{data:r.value},null,8,["data"]),c.createVNode(ak,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-09ec31e8"]]),_lt={__name:"index",setup(n,{expose:e}){return e({handleKeyDown:(t,i)=>{let{startValue:r,endValue:o,maxIndex:s}=i;if(t.code==="ArrowLeft"){if(r===0)return;r=r-1,o=o-1}else if(t.code==="ArrowRight"){if(o===s)return;r=r+1,o=o+1}else if(t.code==="ArrowUp"){if(o-r<5)return;const a=Math.floor((o-r)/2)+1;r=r+a,o-r<5&&(r=o-4)}else if(t.code==="ArrowDown"){const a=Math.min(500,o-r);r=r-a-1}return{startValue:r,endValue:o}},mergeData:(t,i)=>({time:[...t.time,...i.time.slice(1)],data:[...t.data,...i.data.slice(1)],mainIndicator:t.mainIndicator.map((r,o)=>({...r,data:[...r.data,...i.mainIndicator[o].data.slice(1)]})),subIndicator:t.subIndicator.map((r,o)=>({...r,data:[...r.data,...i.subIndicator[o].data.slice(1)]}))}),getDataZoomInfoByTime:t=>{const{showStartTime:i,showEndTime:r,maxShowDays:o}=t;let s=-1,a=-1,l={};return t.time.forEach((u,d)=>{const h=u.split(" ")[0];l[h]=l[h]||0,l[h]+=1,s===-1&&new Date(u)>=new Date(i)&&(s=d),a===-1&&new Date(u)>=new Date(r)&&(a=d)}),a=a===-1?t.time.length-1:a,{startValue:s,endValue:a,maxValueSpan:Math.max(...Object.values(l))*o}}}),(t,i)=>null}},vTt="",ylt=Jt({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(n,{expose:e,emit:t}){let i,r,o=null;const s=t,a=n,l=c.ref();c.watch(()=>a.data,()=>{h()},{deep:!0}),c.onMounted(()=>{i=Kr.init(l.value),u(),h();let f=!0;r=new ResizeObserver(()=>{if(f){f=null;return}i.resize()}),r.observe(l.value)}),c.onUnmounted(()=>{i.off("datazoom"),i.dispose(),r.disconnect(),r=null});const u=()=>{i.on("datazoom",f=>{f.dataZoomId&&(clearTimeout(o),o=setTimeout(()=>{const{data:p}=a,{start:g,end:m}=f,y=Math.floor(g*p.length/100),_=m===100?p.length-1:Math.floor(m*p.length/100);d(y,_),clearTimeout(o)},100))})},d=(f,p)=>{const g=a.data;if(g.length===0)return;const m=g[f][0].split(" ")[0],y=g[p][0].split(" ")[0];s("change",{startTime:`${m} 00:00:00`,endTime:`${y} 24:00:00`})},h=()=>{const{data:f}=a;if(f.length===0)return;const p=f.map(m=>m[0].split(" ")[0]),g=f.map(m=>m[1]);i.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:p,show:!1},yAxis:{type:"value"},series:[{data:g,type:"line"}]},!0)};return e({resetSlide:(f,p,g)=>{let m=-1,y=-1;a.data.forEach((_,C)=>{m===-1&&_[0]===f?m=C:m===-1&&new Date(_[0])>new Date(f)&&(m=C-1),(y===-1&&_[0]===p||y===-1&&new Date(_[0])>new Date(p))&&(y=C)}),y=y===-1?a.data.length-1:y,i.setOption({dataZoom:[{show:!0,startValue:m,endValue:y,maxValueSpan:g,textStyle:{color:"#ccc"}},{type:"inside",startValue:m,endValue:y,maxValueSpan:g}]})},resize:()=>{i==null||i.resize()}}),(f,p)=>(c.openBlock(),c.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:l},null,512))}},[["__scopeId","data-v-7a2f3dd0"]]),vlt={install(n){n.component("st-kline",ult),n.component("st-kline-sub-new",glt),n.component("st-kline-tips-new",blt),n.component("st-kline-slide-new",ylt),n.component("st-kline-utils-new",_lt)}};let P2=null;const Clt=n=>{const e=pJ(n,{handleReq:t=>{bJ()&&(t.headers.token=mJ())},handleRes:t=>{const{data:i}=t;if(i.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:QE(),!0}});e.get,P2=e.post},wlt=n=>P2("/middleLayer/kline/getKlineBasic",{...n,userId:R1("id")}),xlt=n=>P2("/middleLayer/kline/getKline",n),Slt=async n=>P2("/alarm/deliversign/addAlarmPrice",{...n,userId:R1("id")}),Dlt=async n=>P2("/alarm/deliversign/findAlarmPriceByUserId",{...n,userId:R1("id")}),wne=async n=>P2("/alarm/deliversign/updateAlarmPrice",{...n,userId:R1("id")}),Nlt=async n=>P2("/alarm/deliversign/deleteAlarmPrice",{...n,userId:R1("id")}),{round:B2}=Cl,Elt=(n,e,t,i,r)=>{const{data:o,time:s}=n,{gridTop:a,gridRight:l,gridLeft:u,maxShowCounts:d,showSubChart:h}=e;return{animation:!1,grid:{top:`${a}px`,right:`${l}px`,bottom:h?"6px":"24px",left:`${u}px`},dataZoom:[{type:"inside",startValue:t,endValue:i,maxValueSpan:d}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:f=>{const{axisDimension:p,value:g}=f;return p==="x"?h?"":["6","7","8"].includes(r)?bt(g).format("YYYY-MM-DD"):g:String(B2(g))}}},formatter:()=>""},xAxis:{show:!h,type:"category",data:s,splitLine:{show:!1},axisLabel:{formatter:f=>["6","7","8"].includes(r)?bt(f).format("YYYY-MM-DD"):f}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:f=>B2(f.min),max:f=>B2(f.max)},series:[{type:"candlestick",data:o,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...n.mainIndicator.map(f=>({name:f.key,type:"line",silent:!0,symbol:"none",data:f.data,lineStyle:{width:f.width||1},itemStyle:{color:f.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},klt=(n,e,t,i,r)=>{const{variety:o,featureId:s,featureType:a}=t,{gridTop:l,gridLeft:u,gridRight:d}=i;return e.reduce((h,f)=>{const{warnPrice:p}=f,g=n==null?void 0:n.convertToPixel({yAxisIndex:0},p);if(g<=l||g>=(n==null?void 0:n.getHeight()))return h;let m=0;return[...h,{type:"group",name:"warningLine",info:f,draggable:"vertical",children:[{type:"line",info:f,shape:{x1:u,y1:g,x2:(n==null?void 0:n.getWidth())-d,y2:g},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:f,x:(n==null?void 0:n.getWidth())-d,y:g-5,style:{fill:"#FFF",text:p,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:y=>{m=y.offsetY},ondrag:y=>{var _;if(y.target&&y.target.childAt(1)){const C=n.convertFromPixel({yAxisIndex:0},g+(y.offsetY-m));(_=y.target.childAt(1))==null||_.animate("style",!1).when(1,{text:B2(C,3)}).start()}},ondragend:async y=>{const C=y.offsetY-m;if(C!==0){const b=n==null?void 0:n.convertFromPixel({yAxisIndex:0},C+g),v={id:f.id,warnPrice:B2(b,3),featureId:s,featureCode:o,featureType:a};await wne(v),Xt.success("画线预警修改成功"),r&&r()}}}]},[])};function xne(n){function e(i){if(typeof i=="number")return Number.isFinite(i)?i:null;if(typeof i=="string"){const r=i.trim();if(r==="")return null;const o=Number(r);return Number.isFinite(o)?o:null}return null}const t=e(n);if(t===null)return"-";try{if(t>=1||t<=-1)return B2(t);{const i=t.toPrecision(3);return B2(i,i.split(".")[1].length-1)}}catch{return"-"}}const Llt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){const e=n,t=c.ref(null),i=c.ref([]);return c.watch(()=>e.data,()=>{i.value.length===0&&c.nextTick(()=>{Array.from(t.value.children).forEach((r,o)=>{var s,a,l,u,d,h,f,p;((a=(s=e.data)==null?void 0:s[o])==null?void 0:a.label)==="涨跌"?i.value[o]="85px":((u=(l=e.data)==null?void 0:l[o])==null?void 0:u.label)==="至今涨幅"?i.value[o]="115px":((h=(d=e.data)==null?void 0:d[o])==null?void 0:h.label)==="额"?i.value[o]="85px":["开","高","低","收"].includes((p=(f=e.data)==null?void 0:f[o])==null?void 0:p.label)?i.value[o]=`${r.offsetWidth+20}px`:i.value[o]=`${r.offsetWidth+36}px`})})}),(r,o)=>(c.openBlock(),c.createElementBlock("div",{class:"kline-tips",ref_key:"tipsRef",ref:t},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(s,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"kline-tips-item",style:c.normalizeStyle({color:s.color,width:i.value[a]?i.value[a]:null})},c.toDisplayString(s.label)+" "+c.toDisplayString(s.value),5))),128))],512))}}),wTt="",Sne=Jt(Llt,[["__scopeId","data-v-1ccf76bf"]]),xTt="",Mlt={class:"kline-tips"},Tlt=Jt({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},variety:{type:[String,Number],default:()=>null}},setup(n){const{round:e,formatValue:t}=Cl,i=n,r=c.ref(null);c.watch(()=>i.activeIndex,()=>{r.value===null&&(r.value=i.data.data[i.activeIndex][1])}),c.watch(()=>i.data,()=>{r.value===null&&(r.value=i.data.data[i.activeIndex][1])}),c.watch(()=>i.variety,()=>{r.value=null});const o=c.computed(()=>{const{data:a,activeIndex:l}=i;if(a.data&&a.data[l]){const u=a.data[l],d=[{label:"开",value:u[0]},{label:"高",value:u[3]},{label:"低",value:u[2]},{label:"收",value:u[1]}];u[4]!==null&&d.push({label:"额",value:t(u[4])});let h;u[6]>0?h="red":u[6]<0&&(h="green"),d.push({label:"涨跌",value:`${e(u[6])}%`,color:h});const f=(r.value/u[1]-1)*100;let p;return f>0?p="red":f<0&&(p="green"),d.push({label:"至今涨幅",value:`${e(f)}%`,color:p}),d}return[]}),s=c.computed(()=>{var u;const{data:a,activeIndex:l}=i;return((u=a==null?void 0:a.mainIndicator)==null?void 0:u.map(d=>({label:d.key,value:xne(d.data[l]),color:d.color})))||[]});return(a,l)=>(c.openBlock(),c.createElementBlock("div",Mlt,[c.createVNode(Sne,{data:o.value},null,8,["data"]),c.createVNode(Sne,{data:s.value},null,8,["data"])]))}},[["__scopeId","data-v-5be4d504"]]),Alt={class:"kline-averageTips"},Ilt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Alt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:"kline-averageTips-item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}}),DTt="",Rlt=Jt(Ilt,[["__scopeId","data-v-2ce54548"]]),NTt="",Olt={class:"klineSub"},Flt={class:"klineSub-tips"},Plt={key:0,class:"klineSub-tips-select"},Blt=Jt({__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const{round:i}=Cl;let r,o;const s=t,a=n,l=c.ref(),u=c.computed({get(){return a.modelValue},set(f){s("update:modelValue",f)}}),d=c.computed(()=>{var g;const{data:f,activeIndex:p}=a;return((g=f==null?void 0:f.subIndicator)==null?void 0:g.map(m=>({label:m.key,color:m.color,value:`${m.data[p]}-${xne(m.data[p])}`})))||[]});c.onMounted(()=>{r=Kr.init(l.value);let f=!0;o=new ResizeObserver(()=>{if(f){f=null;return}r.resize()}),o.observe(l.value)}),c.onUnmounted(()=>{r.dispose(),o.disconnect(),o=null});const h=(f,p)=>{const g=f[p],m=p===0?f[p]:f[p-1];return g[0]===g[1]?g[0]>=m[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:g[1]>g[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return e({connect:f=>{Kr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:_,rightYAxisRange:C}=a.data.subIndicator[0],b=a.data.subIndicator.map(v=>{if(v.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:v.data.map((w,x)=>v.seriesColor==="kline"?{value:w,itemStyle:h(a.data.data,x)}:v.seriesColor==="value"?{value:w,itemStyle:{color:w>=0?"#FF0000":"#00FFFF"}}:{value:w,itemStyle:{color:v.seriesColor}})};if(v.series==="line")return{xAxisIndex:0,yAxisIndex:v.yAxis==="right"?2:1,name:v.key,type:"line",silent:!0,symbol:"none",data:v.data,lineStyle:{width:1},itemStyle:{color:v.color}}});r.setOption({animation:!1,grid:{left:`${p.gridLeft}px`,top:"10px",right:`${p.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:g,endValue:m,maxValueSpan:y}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:v=>{const{axisDimension:w,value:x}=v;if(w==="x")return["6","7","8"].includes(a.cycle)?bt(x).format("YYYY-MM-DD"):x;if(v.axisIndex===1)return String(i(x))}}},formatter:()=>""},xAxis:{type:"category",data:a.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:v=>["6","7","8"].includes(a.cycle)?bt(v).format("YYYY-MM-DD"):v}},yAxis:[{position:"right"},{position:"left",min:_==="cover"?v=>v.min:null,max:_==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:C==="cover"?v=>v.min:null,max:C==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:b},!0)})}}),(f,p)=>{const g=ul,m=ll;return c.openBlock(),c.createElementBlock("div",Olt,[c.createElementVNode("div",Flt,[d.value.length?(c.openBlock(),c.createElementBlock("div",Plt,[c.createVNode(m,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=y=>u.value=y),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.subIndicatorList,y=>(c.openBlock(),c.createBlock(g,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),c.createVNode(Rlt,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-9af636f9"]]),Vlt=c.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(n,{emit:e}){const t=e,i=c.ref(),r=c.ref(),o=c.ref({display:"none",top:"0px",left:"0px"}),s=()=>{o.value.display="none",t("closeContextMenuCallBack"),document.removeEventListener("click",s)},a=l=>{if(l.preventDefault(),o.value.display==="block"){const{offsetX:u,offsetY:d}=l,{offsetWidth:h,offsetHeight:f}=r.value;if(u<=h&&d<=f)return}i.value.click(),o.value={display:"block",top:`${l.offsetY}px`,left:`${l.offsetX}px`},c.nextTick(()=>{const u=i.value.getBoundingClientRect(),d=r.value.getBoundingClientRect();d.left+d.width>=u.right&&(o.value.left=`${l.offsetX-d.width}px`),d.top+d.height>=u.bottom&&(console.log("高度超出"),o.value.top=`${l.offsetY-d.height}px`)}),document.addEventListener("click",s)};return(l,u)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"contextmenuRef",ref:i,class:"contextmenu",onContextmenu:a,onMouseleave:s},[c.renderSlot(l.$slots,"default",{},void 0,!0),o.value.display!=="none"?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:r,class:"contextmenu-popover",style:c.normalizeStyle(o.value)},[c.renderSlot(l.$slots,"popover",{},void 0,!0)],4)):c.createCommentVNode("",!0)],544))}}),kTt="",zlt=Jt(Vlt,[["__scopeId","data-v-811db6b4"]]),LTt="",Dne=n=>(c.pushScopeId("data-v-e675b051"),n=n(),c.popScopeId(),n),Hlt={class:"klineBasic-tips"},jlt={key:0,class:"klineBasic-sub"},Wlt={key:1,class:"klineBasic-empty"},$lt={key:2,class:"klineBasic-error"},Ult=Dne(()=>c.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),qlt={style:{"text-align":"center"}},Klt=Dne(()=>c.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Glt={class:"dialog-footer"},Ylt=Jt({__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(n,{expose:e,emit:t}){const i=[{label:"画线预警",key:"drawWarningLine"}];let r=null,o=null,s,a,l=!1,u=!1;const d=t,h=n,f=c.ref(!1),p=c.ref(!1),g=c.ref(!1),m=c.ref(null),y=c.ref(null),_=c.ref("VOL"),C=c.ref(0),b=c.ref({}),v=c.ref([]),w=c.ref({}),x=c.ref(!1),S=c.ref(""),D=c.ref([...i]),N=c.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...h.config}));c.watch(()=>{var j,z;return[h.variety,h.cycle,h.mainIndicator,_.value,(j=h.indicatorStore)==null?void 0:j.filterIndicator,(z=h.indicatorStore)==null?void 0:z.customIndicator]},()=>{A()},{deep:!0}),c.onMounted(()=>{Clt(h.env),A(),window.addEventListener("keydown",E)}),c.onUnmounted(()=>{o==null||o.off("datazoom"),o==null||o.off("highlight"),o==null||o.off("globalout"),o==null||o.dispose(),r==null||r.dispose(),window.removeEventListener("keydown",E)});const k=()=>{o||(o=Kr.init(m.value),L(),N.value.showSubChart&&y.value.connect(o),r=gJ(m.value),r.listen(()=>{requestAnimationFrame(()=>{o.resize()})}))},E=({code:j,ctrlKey:z})=>{if(!(z||f.value))return;const{xAxis:re,dataZoom:ce}=o.getOption(),{data:le}=(re==null?void 0:re[0])??{data:[]};let{startValue:ne,endValue:oe}=(ce==null?void 0:ce[0])??{};if(le!=null&&le.length){switch(j){case"ArrowUp":{if(oe-ne<5)return;const he=Math.floor((oe-ne)/2)+1;ne=ne+he,oe-ne<5&&(ne=oe-4);break}case"ArrowDown":{const he=Math.min(500,oe-ne);ne=ne-he-1;break}case"ArrowLeft":{ne>0&&(ne-=1,oe-=1),C.value>0&&(C.value-=1);break}case"ArrowRight":{oe<le.length-1&&(ne+=1,oe+=1),f.value&&C.value<le.length-1&&(C.value+=1);break}}o.dispatchAction({type:"dataZoom",startValue:ne,endValue:oe}),o.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:f.value?C.value:null}),o.dispatchAction({type:"highlight",dataIndex:f.value?C.value:oe})}},L=()=>{o==null||o.on("datazoom",z=>{clearTimeout(a),a=setTimeout(()=>{var ce,le,ne,oe;const{loadCheckCounts:re}=N.value;if((le=(ce=o==null?void 0:o.getOption())==null?void 0:ce.dataZoom)!=null&&le[0]){const{startValue:he}=(oe=(ne=o==null?void 0:o.getOption())==null?void 0:ne.dataZoom)==null?void 0:oe[0];he<re&&l===!1&&u===!1&&(l=!0,F("history")),I()}clearTimeout(a)},100)}),o==null||o.on("highlight",z=>{var ce,le;let re=z.dataIndex||-1;z.batch&&(re=typeof((ce=z==null?void 0:z.batch[0])==null?void 0:ce.dataIndex)=="number"?(le=z==null?void 0:z.batch[0])==null?void 0:le.dataIndex:-1),clearTimeout(s),s=setTimeout(()=>{C.value=re,clearTimeout(s)},20)}),o==null||o.on("globalout",()=>{const z=setTimeout(()=>{var ce,le,ne;clearTimeout(z);const re=(ne=(le=(ce=o==null?void 0:o.getOption())==null?void 0:ce.dataZoom)==null?void 0:le[0])==null?void 0:ne.endValue;C.value=re},30)});let j=null;o==null||o.on("contextmenu",z=>{j=setTimeout(()=>{z.componentType==="graphic"&&(w.value=z.info,D.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(j),j=null})})},A=async()=>{var j,z,re,ce,le,ne;try{if(!h.variety||!h.cycle)return;const{variety:oe,featureId:he,cycle:pe,indicatorStore:de,mainIndicator:ve,right:Le,startTime:ie,endTime:W}=h,{defaultShowCounts:te,addCounts:Z,showWarningLine:X,getFactorData:ee}=N.value,K={variety:oe,featureId:he,cycle:pe,mainIndicatorList:de.getIndicatorParams(ve),subIndicator:_.value,right:Le,showWarningLine:X,getFactorData:ee};ie&&W?(K.startTime=ie,K.endTime=W):ie?(K.startTime=ie,K.limit=te+Z):W?(K.endTime=W,K.limit=te+Z):(K.endTime=bt().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),K.limit=te+Z);const Q=await wlt(K);if((re=(z=(j=Q==null?void 0:Q.body)==null?void 0:j.kline)==null?void 0:z.time)!=null&&re.length)p.value=!1,g.value=!1;else{p.value=!0,g.value=!1;return}b.value=(ce=Q==null?void 0:Q.body)==null?void 0:ce.kline,v.value=((le=Q==null?void 0:Q.body)==null?void 0:le.warningLine)||[],R(),I(),ee&&d("getFactorData",(ne=Q==null?void 0:Q.body)==null?void 0:ne.factor)}catch(oe){throw g.value=!0,p.value=!1,new Error(oe)}},F=async j=>{const{variety:z,cycle:re,indicatorStore:ce,mainIndicator:le,right:ne}=h,{addCounts:oe}=N.value,{time:he}=b.value;if(j==="history"){const pe=await xlt({variety:z,cycle:re,endTime:he[0],limit:oe,mainIndicatorList:ce.getIndicatorParams(le),subIndicator:_.value,right:ne});b.value={time:[...pe.body.time,...b.value.time.slice(1)],data:[...pe.body.data,...b.value.data.slice(1)],mainIndicator:b.value.mainIndicator.map((de,ve)=>{var Le;return{...de,data:[...((Le=pe.body.mainIndicator[ve])==null?void 0:Le.data)??[],...de.data.slice(1)]}}),subIndicator:b.value.subIndicator.map((de,ve)=>{var Le;return{...de,data:[...((Le=pe.body.subIndicator[ve])==null?void 0:Le.data)??[],...de.data.slice(1)]}})},R(!0),pe.body.data.length<oe&&(u=!0),l=!1}},R=(j=!1)=>{var ve,Le,ie;k();const{time:z}=b.value,{gridRight:re,gridLeft:ce,defaultShowCounts:le,maxShowCounts:ne,showSubChart:oe}=N.value;let he=z.length-1-le,pe=z.length-1;if(j){const W=o.getOption(),te=(Le=(ve=W==null?void 0:W.xAxis)==null?void 0:ve[0])==null?void 0:Le.data,Z=(ie=W==null?void 0:W.dataZoom)==null?void 0:ie[0],X=te[Z==null?void 0:Z.startValue],ee=te[Z==null?void 0:Z.endValue];he=z.findIndex(K=>K===X),pe=z.findIndex(K=>K===ee)}const de=Elt(b.value,N.value,he,pe,h.cycle);if(o.setOption(de,!0),C.value=pe,h.brushRange){let W=null,te=null;switch(h.cycle){case"6":{W=z.find(Z=>new Date(Z).getTime()>=new Date(h.brushRange[0]).getTime()||bt(Z).format("YYYY-MM-DD")===bt(h.brushRange[0]).format("YYYY-MM-DD")),te=z.findLast(Z=>new Date(Z).getTime()<=new Date(h.brushRange[1]).getTime()||bt(Z).format("YYYY-MM-DD")===bt(h.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{W=z.find(Z=>bt(Z).day(5).format("YYYY-MM-DD")===bt(h.brushRange[0]).day(5).format("YYYY-MM-DD")),te=z.findLast(Z=>bt(Z).day(5).format("YYYY-MM-DD")===bt(h.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{W=z.find(Z=>bt(Z).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[0]).endOf("month").format("YYYY-MM-DD")),te=z.findLast(Z=>bt(Z).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:W=z.find(Z=>new Date(Z).getTime()>=new Date(h.brushRange[0]).getTime()),te=z.findLast(Z=>new Date(Z).getTime()<=new Date(h.brushRange[1]).getTime())}console.log(W,te),o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[W,te],xAxisIndex:0}]})}oe&&y.value.draw({startValue:he,endValue:pe,maxValueSpan:ne},{gridLeft:ce,gridRight:re}),M()},I=()=>{if(!o)return;const j=o==null?void 0:o.getOption();j&&(o==null||o.setOption({...j,graphic:[...klt(o,v.value,h,N.value,()=>{O()})]},!0),M())},M=()=>{const{time:j}=b.value;if(h.brushRange&&(j!=null&&j.length)){let z=bt(h.brushRange[0]).format("YYYY-MM-DD 00:00:00"),re=bt(h.brushRange[1]).format("YYYY-MM-DD 23:59:59"),ce=null,le=null;switch(h.cycle){case"6":{ce=j.find(ne=>bt(ne).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD")),le=ce;break}case"7":{ce=j.find(ne=>bt(ne).day(5).format("YYYY-MM-DD")===bt(z).day(5).format("YYYY-MM-DD")),le=j.findLast(ne=>bt(ne).day(5).format("YYYY-MM-DD")===bt(re).day(5).format("YYYY-MM-DD"));break}case"8":{ce=j.find(ne=>bt(ne).endOf("month").format("YYYY-MM-DD")===bt(z).endOf("month").format("YYYY-MM-DD")),le=j.findLast(ne=>bt(ne).endOf("month").format("YYYY-MM-DD")===bt(re).endOf("month").format("YYYY-MM-DD"));break}default:ce=j.find(ne=>{const oe=bt(ne).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD"),he=new Date(ne).getTime()>=new Date(z).getTime();return oe&&he}),le=j.findLast(ne=>{const oe=bt(ne).format("YYYY-MM-DD")===bt(re).format("YYYY-MM-DD"),he=new Date(ne).getTime()<=new Date(re).getTime();return oe&&he})}o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[ce,le],xAxisIndex:0}]})}},O=async()=>{const j=await Dlt({featureId:h.featureId});v.value=(j==null?void 0:j.body)||[],I(),d("change","warningLine",v.value)},P=async j=>{const{variety:z,varietyName:re,featureId:ce,featureType:le}=h;if(j.key==="drawWarningLine"){const ne=o==null?void 0:o.getOption(),oe=ne.tooltip[0];o==null||o.setOption({...ne,tooltip:{...oe,axisPointer:{...oe.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...oe.axisPointer.label,backgroundColor:"transparent",formatter:pe=>""}}}});const he=async pe=>{o==null||o.getZr().off("mousedown",he);const de=o==null?void 0:o.convertFromPixel({yAxisIndex:0},pe.offsetY),ve=Math.round(de*1e3)/1e3;o==null||o.setOption({...ne,tooltip:{...oe,axisPointer:{...oe.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...oe.axisPointer.label,backgroundColor:null}}}}),await Slt({featureCode:z,featureName:re,featureId:ce,featureType:le,warnPrice:ve}),Xt.success("画线预警成功!"),O()};o==null||o.getZr().on("mousedown",he)}else j.key==="deleteWarningLine"?(await Nlt({id:w.value.id}),Xt.success("画线预警删除成功"),O()):j.key==="changeWarningLine"&&(x.value=!0,S.value=w.value.warnPrice)},U=async()=>{const{variety:j,varietyName:z,featureId:re,featureType:ce}=h;await wne({id:w.value.id,featureCode:j,featureName:z,featureId:re,featureType:ce,warnPrice:S.value}),Xt.success("画线预警修改成功"),O()},Y=()=>{D.value=[...i]};return e({draw:(j,z)=>{j==="warningLine"&&(v.value=z,I())}}),(j,z)=>{var pe;const re=dz,ce=cz,le=x3,ne=xr,oe=P6,he=Sa;return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:"klineBasic",onMousemove:z[1]||(z[1]=de=>f.value=!0),onMouseout:z[2]||(z[2]=de=>f.value=!1)},[c.createElementVNode("div",Hlt,[c.createVNode(Tlt,{variety:n.variety,data:b.value,activeIndex:C.value},null,8,["variety","data","activeIndex"])]),c.createElementVNode("div",{class:"klineBasic-main",style:c.normalizeStyle({height:N.value.showSubChart?"70%":"100%"})},[c.createVNode(zlt,{onCloseContextMenuCallBack:Y},{popover:c.withCtx(()=>[c.createVNode(ce,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(D.value,de=>(c.openBlock(),c.createBlock(re,{style:{height:"36px"},key:de.key,index:de.key,onClick:ve=>P(de)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(de.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:m,style:{height:"100%"}},null,512)]),_:1})],4),N.value.showSubChart?(c.openBlock(),c.createElementBlock("div",jlt,[c.createVNode(Blt,{ref_key:"klineSubRef",ref:y,modelValue:_.value,"onUpdate:modelValue":z[0]||(z[0]=de=>_.value=de),data:b.value,cycle:n.cycle,activeIndex:C.value,subIndicatorList:(pe=n.indicatorStore)==null?void 0:pe.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):c.createCommentVNode("",!0),p.value?(c.openBlock(),c.createElementBlock("div",Wlt,[c.createVNode(le,{class:"klineBasic-empty-content",description:"暂无数据"})])):c.createCommentVNode("",!0),g.value?(c.openBlock(),c.createElementBlock("div",$lt,[Ult,c.createElementVNode("div",qlt,[c.createVNode(ne,{onClick:A},{default:c.withCtx(()=>[c.createTextVNode("刷新")]),_:1})])])):c.createCommentVNode("",!0)],32),c.createVNode(he,{modelValue:x.value,"onUpdate:modelValue":z[5]||(z[5]=de=>x.value=de),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:c.withCtx(()=>[c.createElementVNode("span",Glt,[c.createVNode(ne,{onClick:z[4]||(z[4]=de=>x.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("取消")]),_:1}),c.createVNode(ne,{type:"primary",onClick:U},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[Klt,c.createVNode(oe,{modelValue:S.value,"onUpdate:modelValue":z[3]||(z[3]=de=>S.value=de),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},[["__scopeId","data-v-e675b051"]]),Qlt={install(n){n.component("st-klineBasic",Ylt)}},TTt="",ATt="",Zlt=[{label:"买卖",value:0},{label:"开平",value:1}],C_=()=>({mainIndicator:"MA",sellBuy:1,sellBuyByPrice:1,singelCycle:"6",multiCycleNum:6,multiCycleList:["1","2","3","4","5","6"],pageType:1,enable_tradeLogBrush:!0,enable_showScreenTimeRange:!0,enable_showScreenMaxPrice:!0,enable_dbClickOpenSingel:!0,enable_subChart:!0,enable_sliderChart:!0}),Xlt=(n,e)=>{var t;return((t=e.find(i=>i.value===n))==null?void 0:t.label)??"-"},ITt="",wl=n=>(c.pushScopeId("data-v-6e5050a9"),n=n(),c.popScopeId(),n),Jlt={class:"kline-config element-dark"},eut={class:"setting-item"},tut=wl(()=>c.createElementVNode("span",{class:"label"},"主图指标: ",-1)),nut={class:"setting-item"},iut=wl(()=>c.createElementVNode("span",{class:"label"},"交易点位: ",-1)),rut={class:"setting-item"},out=wl(()=>c.createElementVNode("span",{class:"label"},"开平点按价格标: ",-1)),sut={class:"setting-item"},aut=wl(()=>c.createElementVNode("span",{class:"label"},"单周期: ",-1)),lut={class:"setting-item"},uut=wl(()=>c.createElementVNode("span",{class:"label"},"多周期: ",-1)),cut={class:"mode"},dut={class:"cycleName"},hut={class:"content"},fut={class:"setting-item"},put=wl(()=>c.createElementVNode("span",{class:"label"},"默认展示: ",-1)),gut={class:"setting-item"},mut=wl(()=>c.createElementVNode("span",{class:"label"},"高亮交易范围: ",-1)),but={class:"setting-item"},_ut=wl(()=>c.createElementVNode("span",{class:"label"},"展示当屏时间: ",-1)),yut={class:"setting-item"},vut=wl(()=>c.createElementVNode("span",{class:"label"},"展示当屏最高价: ",-1)),Cut={class:"setting-item"},wut=wl(()=>c.createElementVNode("span",{class:"label"},"多周期双击图表切换至单周期: ",-1)),xut={class:"setting-item"},Sut=wl(()=>c.createElementVNode("span",{class:"label"},"开启副图: ",-1)),Dut={class:"setting-item"},Nut=wl(()=>c.createElementVNode("span",{class:"label"},"开启拖拽轴: ",-1)),Eut={class:"setting-footer"},kut=Jt({__name:"index",props:{indicatorStore:{type:Object,default:()=>({})},origin:{type:String,default:"server"},cycleOptions:{type:Array,default:()=>[]}},emits:"callBack",setup(n,{expose:e,emit:t}){const{request:i}=c.inject("stConfig"),r=t,o=n,s=c.ref(!1),a=c.reactive({}),l=c.ref([]),u=c.ref([]),d=()=>{Object.assign(a,C_())},h=async()=>{const g=JSON.stringify(a);o.origin==="server"?await i.post("/common/qt/updateUserConfig",{appId:1,json:g}):localStorage.setItem("userKlineConfig",g),r("callBack",g),s.value=!1},f=async()=>{if(o.origin==="server"){const{body:g}=await i.post("/common/qt/getUserConfig",{appId:1});Object.assign(a,C_(),g?JSON.parse(g):{})}else{const g=localStorage.getItem("userKlineConfig");Object.assign(a,C_(),g?JSON.parse(g):{})}},p=async()=>{if(o.origin==="server"){const{body:g}=await i.post("/common/qt/getDict",{dictIds:[1002]});l.value=g[1002].map(m=>({label:m.dictName,value:m.dictCode}))}else l.value=o.cycleOptions};return c.onMounted(()=>{p(),u.value=o.indicatorStore.mainIndicatorList??[]}),c.watch(()=>o.indicatorStore.mainIndicatorList,()=>{u.value=o.indicatorStore.mainIndicatorList??[]}),e({open:async()=>{await f(),s.value=!0},getDefaultUserKlineConfig:C_}),(g,m)=>{const y=T6,_=ul,C=ll,b=nc,v=AH,w=sye,x=a1,S=xr,D=E6e;return c.openBlock(),c.createElementBlock("div",Jlt,[c.createVNode(D,{modelValue:s.value,"onUpdate:modelValue":m[12]||(m[12]=N=>s.value=N),title:"K线自定义配置",size:320},{default:c.withCtx(()=>[c.createVNode(x,{class:"setting-main"},{default:c.withCtx(()=>[c.createVNode(y,{style:{"margin-top":"8px"}},{default:c.withCtx(()=>[c.createTextVNode("偏好设置")]),_:1}),c.createElementVNode("div",eut,[tut,c.createVNode(C,{modelValue:a.mainIndicator,"onUpdate:modelValue":m[0]||(m[0]=N=>a.mainIndicator=N),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,(N,k)=>(c.openBlock(),c.createBlock(_,{key:k,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",nut,[iut,c.createVNode(C,{modelValue:a.sellBuy,"onUpdate:modelValue":m[1]||(m[1]=N=>a.sellBuy=N),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(Zlt),(N,k)=>(c.openBlock(),c.createBlock(_,{key:k,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",rut,[out,c.createVNode(b,{modelValue:a.sellBuyByPrice,"onUpdate:modelValue":m[2]||(m[2]=N=>a.sellBuyByPrice=N),"true-value":1,"false-value":0},null,8,["modelValue"])]),c.createElementVNode("div",sut,[aut,c.createVNode(C,{modelValue:a.singelCycle,"onUpdate:modelValue":m[3]||(m[3]=N=>a.singelCycle=N),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(N,k)=>(c.openBlock(),c.createBlock(_,{key:k,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",lut,[uut,c.createVNode(v,{size:"small",modelValue:a.multiCycleNum,"onUpdate:modelValue":m[4]||(m[4]=N=>a.multiCycleNum=N),options:[{label:"二图",value:2},{label:"四图",value:4},{label:"六图",value:6}],style:{height:"26px"}},null,8,["modelValue"])]),c.createElementVNode("div",{class:c.normalizeClass(`setting-multi-box grid-${a.multiCycleNum}`)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.multiCycleList.slice(0,a.multiCycleNum),(N,k)=>(c.openBlock(),c.createElementBlock("div",cut,[c.createElementVNode("div",dut,[c.createElementVNode("span",null,c.toDisplayString(c.unref(Xlt)(a.multiCycleList[k],l.value)),1),c.createVNode(C,{modelValue:a.multiCycleList[k],"onUpdate:modelValue":E=>a.multiCycleList[k]=E,"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(E,L)=>(c.openBlock(),c.createBlock(_,{key:L,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),c.createElementVNode("span",hut,c.toDisplayString(k+1)+"号位K线",1)]))),256))],2),c.createElementVNode("div",fut,[put,c.createVNode(v,{size:"small",modelValue:a.pageType,"onUpdate:modelValue":m[5]||(m[5]=N=>a.pageType=N),options:[{label:"单周期",value:1},{label:"多周期",value:2}],style:{height:"26px"}},null,8,["modelValue"])]),c.createVNode(y,{style:{"margin-top":"44px"}},{default:c.withCtx(()=>[c.createTextVNode("功能配置")]),_:1}),c.createElementVNode("div",gut,[mut,c.createVNode(w,{modelValue:a.enable_tradeLogBrush,"onUpdate:modelValue":m[6]||(m[6]=N=>a.enable_tradeLogBrush=N)},null,8,["modelValue"])]),c.createElementVNode("div",but,[_ut,c.createVNode(w,{modelValue:a.enable_showScreenTimeRange,"onUpdate:modelValue":m[7]||(m[7]=N=>a.enable_showScreenTimeRange=N)},null,8,["modelValue"])]),c.createElementVNode("div",yut,[vut,c.createVNode(w,{modelValue:a.enable_showScreenMaxPrice,"onUpdate:modelValue":m[8]||(m[8]=N=>a.enable_showScreenMaxPrice=N)},null,8,["modelValue"])]),c.createElementVNode("div",Cut,[wut,c.createVNode(w,{modelValue:a.enable_dbClickOpenSingel,"onUpdate:modelValue":m[9]||(m[9]=N=>a.enable_dbClickOpenSingel=N)},null,8,["modelValue"])]),c.createVNode(y,{style:{"margin-top":"44px"}},{default:c.withCtx(()=>[c.createTextVNode("组件开关")]),_:1}),c.createElementVNode("div",xut,[Sut,c.createVNode(w,{modelValue:a.enable_subChart,"onUpdate:modelValue":m[10]||(m[10]=N=>a.enable_subChart=N)},null,8,["modelValue"])]),c.createElementVNode("div",Dut,[Nut,c.createVNode(w,{modelValue:a.enable_sliderChart,"onUpdate:modelValue":m[11]||(m[11]=N=>a.enable_sliderChart=N)},null,8,["modelValue"])])]),_:1}),c.createElementVNode("div",Eut,[c.createVNode(S,{onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 恢复默认 ")]),_:1}),c.createVNode(S,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode(" 保存配置 ")]),_:1})])]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-6e5050a9"]]),Lut={install(n){n.component("st-klineConfig",kut)}},Mut=c.defineComponent({__name:"index",setup(n,{expose:e}){let t=!1,i=!0,r=[];const o=(s,a)=>s.length>a?s.slice(s.length-a):s;return e({initTalib:async()=>{if(!t)t=!0,await nk("./talib.wasm"),i=!1,r.forEach(s=>{s()});else if(i)return new Promise(s=>{r.push(s)})},handleKeyDown:(s,a)=>{let{startValue:l,endValue:u,maxIndex:d}=a;if(s.code==="ArrowLeft"){if(l===0)return;l=l-1,u=u-1}else if(s.code==="ArrowRight"){if(u===d)return;l=l+1,u=u+1}else if(s.code==="ArrowUp"){if(u-l<5)return;const h=Math.floor((u-l)/2)+1;l=l+h,u-l<5&&(l=u-4)}else if(s.code==="ArrowDown"){const h=Math.min(500,u-l);l=l-h-1}return{startValue:l,endValue:u}},getDataZoomInfoByTime:s=>{const{showStartTime:a,showEndTime:l,xAxisData:u,maxShowDays:d}=s;let h=-1,f=-1,p={};return u.forEach((g,m)=>{const y=g.split(" ")[0];p[y]=p[y]||0,p[y]+=1,new Date(g)>=new Date(a)&&h===-1&&(h=m),new Date(g)<=new Date(l)&&(f=m)}),{startValue:h,endValue:f,maxValueSpan:Math.max(...Object.values(p))*d}},formatDataBySlide:s=>{const{originDrawData:a,addData:l,startTime:u,endTime:d}=s,{mainIndicator:h,mainIndicatorList:f,subIndicator:p,subIndicatorList:g,config:m,timeRange:y}=s,{loadAddCount:_,preLoadCount:C}=m;let b=[],v=[],w=[],x=[];u&&d?(b=l.filter(L=>new Date(L[0])>=new Date(u)&&new Date(L[0])<=new Date(d)),x=[...l]):d?(b=[...l.filter((L,A)=>A>=l.length-_&&new Date(y[0])<=new Date(L[0])&&new Date(L[0])<=new Date(y[1])),...a.originData],x=[...l,...a.originData]):u&&(b=[...a.originData,...l.filter((L,A)=>A>=C&&new Date(y[0])<=new Date(L[0])&&new Date(L[0])<=new Date(y[1]))],x=b),b.forEach((L,A)=>{v.push([L[1],L[4],L[3],L[2],A===0?0:b[A-1][4],L[6]]),w.push(L[0])});let S=[],D=[];const N={time:[],open:[],close:[],high:[],low:[],originData:x};let k=null,E=null;return x.forEach((L,A)=>{N.time.push(L[0]),N.open.push(L[1]),N.close.push(L[4]),N.high.push(L[2]),N.low.push(L[3]),L[0]===b[0][0]&&(k=A),L[0]===b[b.length-1][0]&&(E=A+1)}),S=f.find(({value:L})=>L===h).config.map(L=>{const{calculationFn:A}=L;return{...L,data:A?A(s5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}).slice(k,E):[]}}),D=g.find(({value:L})=>L===p).config.reduce((L,A)=>{const{source:F,calculationFn:R}=A;return F==="calculation"?[...L,{...A,data:R?R(s5,N).slice(k,E):[]}]:L},[]),{originData:b,candlestickData:v,mainIndicatorData:S,subIndicatorData:D,xAxisData:w,startTime:b[0][0],endTime:b[b.length-1][0],length:b.length}},formatDataByCount:s=>{const{originDrawData:a,addData:l,mainIndicator:u,mainIndicatorList:d,subIndicator:h,subIndicatorList:f,config:p}=s;let g={};const{addCount:m,preLoadCount:y}=p,_=[],C=[],b=[],v=[],w=[];let x=[],S=[];const D=l.filter((A,F)=>(_.push(A[0]),C.push(A[1]),b.push(A[4]),v.push(A[2]),w.push(A[3]),x.push(A[0]),S.push([A[1],A[4],A[3],A[2],F===0?0:l[F-1][4],A[6]]),l.length>=m+y-1?F>=y:!0));x=o(x,D.length),S=o(S,D.length);const N={time:_,open:C,close:b,high:v,low:w,originData:l},E=d.find(A=>A.value===u).config.map(A=>({...A,data:o(A.calculationFn?A.calculationFn(s5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],x.length)}));let L=[];return h&&f&&(L=f.find(F=>F.value===h).config.reduce((F,R)=>R.source==="calculation"?[...F,{...R,data:o(R.calculationFn?R.calculationFn(s5,N):[],x.length)}]:F,[])),a.length?g={originData:[...D,...a.originData],xAxisData:[...x,...a.xAxisData],candlestickData:[...S,...a.candlestickData],mainIndicatorData:a.mainIndicatorData.map((A,F)=>({...A,data:[...E[F].data,...A.data]})),subIndicatorData:a.subIndicatorData.map((A,F)=>({...A,data:[...L[F].data,...A.data]}))}:g={originData:D,xAxisData:x,candlestickData:S,mainIndicatorData:E,subIndicatorData:L},g.length=g.xAxisData.length,g.startTime=g.xAxisData[0],g.endTime=g.xAxisData[g.length-1],g},fn:()=>{}}),(s,a)=>null}}),Tut={class:"kline-tips"},Aut=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Tut,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:"kline-tips-item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}}),OTt="",lk=Jt(Aut,[["__scopeId","data-v-2a02e841"]]),Iut={class:"kline-tips"},Rut=c.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},candlestickData:{type:Array,default:()=>null},mainIndicatorData:{type:Array,default:()=>null},activeIndex:{type:Number,require:!0}},setup(n){const{round:e,multiply:t,divide:i,subtract:r,formatValue:o}=Cl,s=n,a=c.computed(()=>{const{drawData:u,activeIndex:d,candlestickData:h}=s;if(h!=null&&h.length&&h[d]){let f;return h[d][6]>0?f="red":h[d][6]<0&&(f="green"),[{label:"开",value:h[d][0]},{label:"高",value:h[d][3]},{label:"低",value:h[d][2]},{label:"收",value:h[d][1]},{label:"额",value:o(h[d][4])},{label:"涨跌",value:`${e(h[d][6])}%`,color:f}]}else if(u.candlestickData&&u.candlestickData[d]){const f=u.candlestickData[d],p=[{label:"开",value:f[0]},{label:"高",value:f[3]},{label:"低",value:f[2]},{label:"收",value:f[1]}];f[5]!==void 0&&p.push({label:"额",value:o(f[5])});const g=e(t(i(r(f[1],f[4]),Math.abs(f[4])),100));let m;return g>0?m="red":g<0&&(m="green"),p.push({label:"涨跌",value:`${g}%`,color:m}),p}return[]}),l=c.computed(()=>{var h;const{drawData:u,activeIndex:d}=s;return((h=u==null?void 0:u.mainIndicatorData)==null?void 0:h.map(f=>({label:f.key,value:e(f.data[d]),color:f.color})))||[]});return(u,d)=>(c.openBlock(),c.createElementBlock("div",Iut,[c.createVNode(lk,{data:a.value},null,8,["data"]),c.createVNode(lk,{data:l.value},null,8,["data"])]))}}),FTt="",Out=Jt(Rut,[["__scopeId","data-v-e75a1234"]]),Fut={class:"klineSub"},Put={class:"klineSub-tips"},But={key:0,class:"klineSub-tips-select"},Vut=c.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},activeIndex:{type:Number,require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0},config:{type:Object,require:!0}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const{round:i}=Cl;let r,o;const s=t,a=n,l=c.ref(),u=c.computed({get(){return a.modelValue},set(f){s("update:modelValue",f)}}),d=c.computed(()=>{const{drawData:f,activeIndex:p}=a,g=a.subIndicatorList.find(m=>m.value===u.value);return f.originData&&f.originData[p]?g.config.map(m=>{var _,C;let y="-";return m.source==="origin"?y=f.originData[p][m.dataIndex]||"-":m.source==="calculation"&&(y=(((C=(_=f.subIndicatorData)==null?void 0:_.find(v=>v.key===m.key))==null?void 0:C.data)||[])[p]),{label:m.key,color:m.color,value:y==="-"?y:i(y)}}):[]});c.onMounted(()=>{r=Kr.init(l.value);let f=!0;o=new ResizeObserver(()=>{if(f){f=null;return}r.resize()}),o.observe(l.value)}),c.onUnmounted(()=>{r.dispose(),o.disconnect(),o=null});const h=(f,p)=>{const g=f[p],m=p===0?f[p]:f[p-1];return g[0]===g[1]?g[0]>=m[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:g[1]>g[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return e({connect:f=>{Kr.connect([f,r])},draw:f=>{c.nextTick(()=>{var x;const{startValue:p,endValue:g,maxValueSpan:m}=f,{xAxisData:y,subIndicatorData:_,candlestickData:C,originData:b}=a.drawData,v=a.subIndicatorList.find(S=>S.value===u.value),w=[];if(v.series==="bar"){let S=[];v.source==="origin"?S=b.map(D=>D[v.dataIndex]):S=((x=_==null?void 0:_.find(D=>D.key===v.dataIndex))==null?void 0:x.data)||[],w.push({name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:S.map((D,N)=>v.color==="kline"?{value:D,itemStyle:h(C,N)}:v.color==="value"?{value:D,itemStyle:{color:D>=0?"#FF0000":"#00FFFF"}}:{value:D,itemStyle:{color:v.color}})})}_.forEach(S=>{if(S.series==="line"){let D=[];S.source==="origin"?D=b.map(N=>N[S.dataIndex]):S.source==="calculation"&&(D=S.data),w.push({xAxisIndex:0,yAxisIndex:S.yAxis==="right"?2:1,name:S.key,type:"line",silent:!0,symbol:"none",data:D,lineStyle:{width:1},itemStyle:{color:S.color}})}}),r.setOption({animation:!1,grid:{left:`${a.config.gridLeft}px`,top:"10px",right:`${a.config.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:p,endValue:g,maxValueSpan:m}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:S=>{const{axisDimension:D,value:N}=S;if(D==="x")return N;if(S.axisIndex===1)return String(i(N))}}},formatter:()=>""},xAxis:{type:"category",data:y,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:S=>S}},yAxis:[{position:"right"},{position:"left",min:v.leftYAxisRange==="cover"?S=>S.min:null,max:v.leftYAxisRange==="cover"?S=>S.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:v.rightYAxisRange==="cover"?S=>S.min:null,max:v.rightYAxisRange==="cover"?S=>S.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:w},!0)})}}),(f,p)=>{const g=ul,m=ll;return c.openBlock(),c.createElementBlock("div",Fut,[c.createElementVNode("div",Put,[d.value.length?(c.openBlock(),c.createElementBlock("div",But,[c.createVNode(m,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=y=>u.value=y),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.subIndicatorList,y=>(c.openBlock(),c.createBlock(g,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),c.createVNode(lk,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}}),PTt="",zut=Jt(Vut,[["__scopeId","data-v-0a2f256e"]]),Hut=c.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(n,{expose:e,emit:t}){let i,r,o=null;const s=t,a=n,l=c.ref();c.watch(()=>a.data,()=>{h()},{deep:!0}),c.onMounted(()=>{i=Kr.init(l.value),u(),h();let f=!0;r=new ResizeObserver(()=>{if(f){f=null;return}i.resize()}),r.observe(l.value)}),c.onUnmounted(()=>{i.off("datazoom"),i.dispose(),r.disconnect(),r=null});const u=()=>{i.on("datazoom",f=>{f.dataZoomId&&(clearTimeout(o),o=setTimeout(()=>{const{data:p}=a,{start:g,end:m}=f,y=Math.floor(g*p.length/100),_=m===100?p.length-1:Math.floor(m*p.length/100);d(y,_),clearTimeout(o)},100))})},d=(f,p)=>{const g=a.data;if(g.length===0)return;const m=g[f][0].split(" ")[0],y=g[p][0].split(" ")[0];s("change",{startTime:`${m} 00:00:00`,endTime:`${y} 24:00:00`})},h=()=>{const{data:f}=a;if(f.length===0)return;const p=f.map(m=>m[0].split(" ")[0]),g=f.map(m=>m[1]);i.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:p,show:!1},yAxis:{type:"value"},series:[{data:g,type:"line"}]},!0)};return e({resetSlide:(f,p,g)=>{let m=-1,y=-1;a.data.forEach((_,C)=>{m===-1&&_[0]===f?m=C:m===-1&&new Date(_[0])>new Date(f)&&(m=C-1),(y===-1&&_[0]===p||y===-1&&new Date(_[0])>new Date(p))&&(y=C)}),y=y===-1?a.data.length-1:y,i.setOption({dataZoom:[{show:!0,startValue:m,endValue:y,maxValueSpan:g,textStyle:{color:"#ccc"}},{type:"inside",startValue:m,endValue:y,maxValueSpan:g}]})},resize:()=>{i==null||i.resize()}}),(f,p)=>(c.openBlock(),c.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:l},null,512))}}),BTt="",jut=Jt(Hut,[["__scopeId","data-v-5008746a"]]),Wut={install(n){n.component("st-klineUtils",Mut),n.component("st-klineSub",zut),n.component("st-klineTips",Out),n.component("st-klineSlide",jut)}},VTt="",$ut="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMz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MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",{round:Kut}=Cl,V2={minValueSpan:5,maxValueSpan:2e3,loadCheckCount:500,loadAddCount:2e3},Gut={1:240,2:48,3:16,4:8,5:4,6:1,7:.2,8:.033},Nne=({startTime:n,endTime:e,cycle:t,type:i="end"})=>{const{maxValueSpan:r}=V2,o=Math.ceil((r+1e3)/Gut[t]),s=bt(n);if(bt(e).diff(s,"day")<=o)return[n,e];if(i==="end")return[bt(e).subtract(o,"day").format("YYYY-MM-DD HH:mm:ss"),e];if(i==="middle"){const u=bt((bt(n).valueOf()+bt(e).valueOf())/2).format("YYYY-MM-DD HH:mm:ss");return console.log("超过一屏数量上限, 进行中间时间计算",u,o/2),[bt(u).subtract(o/2,"day").format("YYYY-MM-DD HH:mm:ss"),bt(u).add(o/2,"day").format("YYYY-MM-DD HH:mm:ss")]}},Yut=(n,e)=>{const t=n[e],i=e===0?n[e]:n[e-1];return t[0]===t[1]?t[0]>=i[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:t[1]>t[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}},Qut=(n,e,t)=>{var r,o,s,a;const i=n.subIndicator.map(l=>{if(l.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:l.data.map((u,d)=>l.seriesColor==="kline"?{value:u,itemStyle:Yut(n.data,d)}:l.seriesColor==="value"?{value:u,itemStyle:{color:u>=0?"#FF0000":"#00FFFF"}}:{value:u,itemStyle:{color:l.seriesColor}})};if(l.series==="line")return{xAxisIndex:0,yAxisIndex:l.yAxis==="right"?2:1,name:l.key,type:"line",silent:!0,symbol:"none",data:l.data,lineStyle:{width:1},itemStyle:{color:l.color}}});return{animation:!1,grid:{top:"10px",left:"60px",right:"20px",bottom:"10px"},dataZoom:[{type:"inside",startValue:e,endValue:t,maxValueSpan:V2.maxValueSpan}],tooltip:{show:!1},axisPointer:{show:!0,triggerTooltip:!1,label:{rich:{},formatter:l=>{const{axisDimension:u,value:d}=l;if(u==="x")return null;if(l.axisIndex===1)return String(Kut(d))}}},xAxis:{type:"category",data:n.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:[{position:"right"},{position:"left",min:((r=n.subIndicator[0])==null?void 0:r.leftYAxisRange)==="cover"?l=>l.min:null,max:((o=n.subIndicator[0])==null?void 0:o.leftYAxisRange)==="cover"?l=>l.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:((s=n.subIndicator[0])==null?void 0:s.rightYAxisRange)==="cover"?l=>l.min:null,max:((a=n.subIndicator[0])==null?void 0:a.rightYAxisRange)==="cover"?l=>l.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:i}},uk=(n,e,t="strict")=>{let i=0,r=n.length-1,o=-1;for(;i<=r;){let s=Math.floor((i+r)/2);if(t==="strict"){if(n[s]===e)return s;n[s]<e?i=s+1:r=s-1}else t==="gte"&&(n[s]>=e?(o=s,r=s-1):i=s+1)}return t==="strict"?-1:o},Zut=n=>{const e=[];return n.reduce((t,i)=>{const r=`${i.coord[0]}+${i.label.position}`,o=i.label.position==="top"?-16:16,s=t.get(r);return s?(t.set(r,s+1),i.symbolOffset[1]=o*(s+1)):(t.set(r,1),i.symbolOffset[1]=i.label.position==="top"?-7:7),e.push(i),t},new Map),e},Ene=(n,e)=>({data:[...n.data,...e.data.slice(1)],mainIndicator:n.mainIndicator.map((t,i)=>({...t,data:[...t.data,...e.mainIndicator[i].data.slice(1)]})),subIndicator:n.subIndicator.map((t,i)=>({...t,data:[...t.data,...e.subIndicator[i].data.slice(1)]})),time:[...n.time,...e.time.slice(1)]}),ck=(n,e,t)=>{switch(t){case"5":{let h=[...new Set(n.slice(-20).map(b=>{const v=new Date(b),w=String(v.getHours()).padStart(2,"0"),x=String(v.getMinutes()).padStart(2,"0"),S=String(v.getSeconds()).padStart(2,"0");return`${w}:${x}:${S}`}))];h.includes("00:00:00")&&(h.splice(h.indexOf("00:00:00"),1),h.push("24:00:00")),h=h.sort((b,v)=>new Date(`2000-01-30 ${b}`).getTime()-new Date(`2000-01-30 ${v}`).getTime());const f=new Date(e),p=f.getFullYear(),g=String(f.getMonth()+1).padStart(2,"0"),m=String(f.getDate()).padStart(2,"0"),y=String(f.getHours()).padStart(2,"0"),_=String(f.getMinutes()).padStart(2,"0"),C=String(f.getSeconds()).padStart(2,"0");if(`${y}:${_}:${C}`=="00:00:00")return`${p}-${g}-${m} 01:00:00`;{let b=null;for(let v=0;v<h.length;v++){const w=h[v].split(":");if(+`${w[0]}${w[1]}${w[2]}`>=+`${y}${_}${C}`){b=h[v];break}}if(b==="24:00:00"){const v=new Date(e);v.setDate(v.getDate()+1);const w=v.getFullYear(),x=String(v.getMonth()+1).padStart(2,"0"),S=String(v.getDate()).padStart(2,"0");return`${w}-${x}-${S} 00:00:00`}return`${p}-${g}-${m} ${b}`}}case"6":{const h=new Date(e),f=h.getHours();if(f>=4&&f<21){const p=h.getFullYear(),g=String(h.getMonth()+1).padStart(2,"0"),m=String(h.getDate()).padStart(2,"0");return`${p}-${g}-${m} 09:00:00`}else{const p=new Date(e);p.getHours()>=21&&p.setDate(p.getDate()+1);const g=p.getFullYear(),m=String(p.getMonth()+1).padStart(2,"0"),y=String(p.getDate()).padStart(2,"0"),_=`${g}-${m}-${y} 09:00:00`,C=uk(n,_,"gte");return C===-1?_:n[C]}}case"7":{const h=new Date(e),f=new Date(h);f.setDate(h.getDate()-h.getDay()),f.setHours(0,0,0,0);const p=new Date(f);p.setDate(f.getDate()+5),p.setHours(23,59,59,0);const g=new Date(f);g.setDate(f.getDate()+12),g.setHours(9,0,0,0);const m=h<=p?p:g,y=m.getFullYear(),_=String(m.getMonth()+1).padStart(2,"0"),C=String(m.getDate()).padStart(2,"0");return`${y}-${_}-${C} 09:00:00`}case"8":{const h=new Date(e),f=new Date(h.getFullYear(),h.getMonth()+1,1),p=new Date(f);p.setDate(f.getDate()-1),p.setHours(9,0,0,0);const g=p.getFullYear(),m=String(p.getMonth()+1).padStart(2,"0"),y=String(p.getDate()).padStart(2,"0");return`${g}-${m}-${y} 09:00:00`}}const i=new Date(e),r=i.getFullYear(),o=i.getMonth(),s=i.getDate(),a=i.getHours(),l=i.getMinutes(),u=i.getSeconds(),d=h=>{let f=null;const p=Math.floor(l/h);l%h===0&&u===0?f=l:f=(p+1)*h;const g=Math.floor(f/60),m=a+g,y=f%60,_=new Date(r,o,s,m,y,0),C=D=>String(D).padStart(2,"0"),b=_.getFullYear(),v=C(_.getMonth()+1),w=C(_.getDate()),x=C(_.getHours()),S=C(_.getMinutes());return`${b}-${v}-${w} ${x}:${S}:00`};switch(t){case"1":return d(1);case"2":return d(5);case"3":return d(15);case"4":return d(30);default:throw new Error(`Unsupported cycle: ${e} ${t}`)}},dk=(n,e,t)=>{let i=null,r=null;const[o,s]=e;switch(t){case"6":{i=n.find(a=>new Date(bt(a).format("YYYY-MM-DD 23:59:59")).getTime()>=new Date(o).getTime()),r=n.findLast(a=>new Date(bt(a).format("YYYY-MM-DD 00:00:00")).getTime()<=new Date(s).getTime());break}case"7":{const a=bt(s).endOf("week").add(1,"day").format("YYYY-MM-DD 23:59:59");i=n.find(l=>bt(l).endOf("week").add(1,"day").format("YYYY-MM-DD")===bt(o).endOf("week").add(1,"day").format("YYYY-MM-DD")),r=n.findLast(l=>new Date(l).getTime()<=new Date(a).getTime());break}case"8":{i=n.find(a=>bt(a).format("YYYY-MM")===bt(o).format("YYYY-MM")),r=n.findLast(a=>bt(a).format("YYYY-MM")===bt(s).format("YYYY-MM"));break}default:i=n.find(a=>new Date(a).getTime()>=new Date(o).getTime()),r=n.findLast(a=>new Date(a).getTime()<=new Date(s).getTime())}return[i,r]},Xut=(n,e,t,i,r,o)=>{const s=(p,g)=>{const{direction:m="",tradeAction:y="",tradeType:_=""}=p,C=_??m+y;switch(g){case 0:return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(C);case 1:return _??m+y}},a=(p,g,m,y)=>p.reduce((_,C)=>{var N;const b=s(C,0),v=p.filter(k=>k.klineTime===C.klineTime),w=[...new Set(v.map(k=>s(k,0)))];let x=null;w.length>1?x="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBo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EuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:x="image://"+new URL(Object.assign({"./images/buy.svg":$ut,"./images/sell.svg":Uut,"./images/t.svg":qut})[`./images/${b==="买"?"buy":"sell"}.svg`],self.location).href;const S=uk(m,C.klineTime),D=(N=y[S])==null?void 0:N[3];return g.forEach(k=>{var L;const E=b==="买"?0:1;k.range[E]===C.klineTime&&(k.rangeValue[E]=(L=y[S])==null?void 0:L[b==="买"?2:3])}),_.push({symbol:x,symbolSize:25,symbolRotate:0,symbolOffset:[0,0],label:{show:!1,position:"top"},coord:[C.klineTime,D],silent:!0,animation:!1,customData:{tradeType:b,amount:C.amount,part:C.part,profitAndLoss:C.profitAndLoss,openPriceAll:C.openPriceAll,closePriceAll:C.closePriceAll}}),_},[]),l=(p,g,m,y)=>{const{sellBuyByPrice:_}=o,C=p.reduce((b,v,w)=>{var N,k;const x=s(v,1),S=["开多","开空"].includes(x)?"top":"bottom";let D=null;if(_)D=S==="top"?(v.openPriceAll/v.amount).toFixed(2):(v.closePriceAll/v.amount).toFixed(2);else{const E=uk(m,v.klineTime);D=S==="top"?(N=y[E])==null?void 0:N[3]:(k=y[E])==null?void 0:k[2]}return g.forEach(E=>{(S==="top"?E.range[0]:E.range[1])===v.klineTime&&(E.rangeValue[S==="top"?0:1]=D)}),b.push({symbol:"triangle",symbolSize:[10,12],symbolRotate:S==="top"?180:0,symbolOffset:[0,0],label:{show:!0,position:S,color:"#fff",formatter:`${x} ${S==="top"?"+":"-"} ${v.amount}手 ${v.part?`(${v.part}份)`:""}`},itemStyle:{color:S==="top"?"#FF0000":"#389e0d"},coord:[v.klineTime,D],silent:!0,animation:!1,customData:{tradeType:x,amount:v.amount,part:v.part,profitAndLoss:v.profitAndLoss,openPriceAll:v.openPriceAll,closePriceAll:v.closePriceAll}}),b},[]);return _?C:Zut(C)},u=(p,g,m)=>{const{basePointData:y,baseLineData:_}=p.reduce((w,x)=>{const S={pointTime:x.openTime,tradeAction:"开",tradeDirection:x.tradeDirection?"空":"多",tradeType:`开${x.tradeDirection?"空":"多"}`,part:null,amount:x.tradeVolume,profitAndLoss:x.profitAndLoss,openPriceAll:x.openPrice*x.tradeVolume,closePriceAll:x.closePrice*x.tradeVolume,klineTime:ck(m,x.openTime,g)},D={pointTime:x.closeTime,tradeAction:"平",tradeDirection:x.tradeDirection?"空":"多",tradeType:`平${x.tradeDirection?"空":"多"}`,part:null,amount:x.tradeVolume,profitAndLoss:x.profitAndLoss,openPriceAll:x.openPrice*x.tradeVolume,closePriceAll:x.closePrice*x.tradeVolume,klineTime:ck(m,x.closeTime,g)},N={range:[S.klineTime,D.klineTime],rangeValue:[null,null],color:D.profitAndLoss>0?"#FF0000":"#389e0d"};return w.basePointData.push(S,D),w.baseLineData.push(N),w},{basePointData:[],baseLineData:[]}),b=[...y.reduce((w,x)=>{const S=JSON.parse(JSON.stringify(x)),D=S.klineTime+S.tradeType;if(w.has(D)){const N=w.get(D);S.amount+=N.amount,S.part+=N.part,S.profitAndLoss+=N.profitAndLoss,S.openPriceAll+=N.openPriceAll,S.closePriceAll+=N.closePriceAll}return w.set(D,S),w},new Map([])).values()].sort((w,x)=>new Date(w.klineTime)-new Date(x.klineTime)),v=_.filter(({range:w})=>w[0]!==w[1]);return{pointData:b,lineData:v}},{pointData:d,lineData:h}=u(n,e,i);return{tradePointData:(t===0?a:l)(d,h,i,r),tradeLineData:h.map(({range:p,rangeValue:g,color:m})=>[{symbol:"none",coord:[p[0],g[0]],lineStyle:{color:m,width:2,type:"solid"},silent:!0,animation:!1},{symbol:"none",coord:[p[1],g[1]],silent:!0,animation:!1}])}},Jut=(n,e)=>{let t=[];if(Number(e)<=5)t=n.map(({tradeDate:i,netPositionValue:r})=>[bt(i).format("YYYY-MM-DD HH:mm:ss"),r]);else if(Number(e)===6){const i=n.reduce((r,o)=>{const{tradeDate:s,netPositionValue:a}=o;return r.set(bt(s).format("YYYY-MM-DD 09:00:00"),a),r},new Map);t=Array.from(i,([r,o])=>[r,o])}else t=[];return{netPositionLineData:t}},ect=(n,e,t,i)=>{let r=[];if(["6","7","8"].includes(e)){const o=n.reduce((s,a)=>{const l=ck(i,a.date,e),u=a[t===0?"simple":"compound"];return s.set(l,u),s},new Map);r=Array.from(o,([s,a])=>[s,a])}else r=[];return{tradeIncomeRateLineData:r}},zTt="",tct={class:"tips"},hk=Jt({__name:"Tips",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",tct,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("span",{key:r,class:"item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}},[["__scopeId","data-v-df1caefe"]]),jTt="",nct=Jt({__name:"SliderChart",props:{screenTimeRange:{type:Array,required:!0},varietyCode:{type:String,required:!0},varietyStock:{type:Number,required:!0},rightType:{type:[Number,null],default:null},klineType:{type:[Number,null],default:null},deleteFirstNumber:{type:Number,default:1},withoutPermission:{type:Number,default:0}},emits:["change"],setup(n,{expose:e,emit:t}){const{request:i}=c.inject("stConfig");let r=null;const o=c.ref(null),s=t,a=n,l=c.ref({data:[],mainIndicator:[],subIndicator:[],time:[]}),u=async()=>{const p={varietyCode:a.varietyCode,cycle:"6",right:a.varietyStock===1?a.rightType:0,contractType:a.varietyStock?null:a.klineType,startTime:"1999-01-01 00:00:00",endTime:bt().format("YYYY-MM-DD 23:59:59"),deleteFirstNumber:a.deleteFirstNumber,withoutPermission:a.withoutPermission},{body:g}=await i.post("/middleLayer/kline/getKline",p);g?l.value=g:l.value={data:[],mainIndicator:[],subIndicator:[],time:[]},f("init")},d=p0(p=>{if(!p.dataZoomId)return;const g=r.getOption();if(g!=null&&g.dataZoom[0]){const{startValue:m,endValue:y}=r.getOption().dataZoom[0],{time:_}=l.value,C=`${_[m].split(" ")[0]} 00:00:00`,b=`${_[y].split(" ")[0]} 23:59:59`;console.log(`检测到拖拽轴被拖动, 时间区间: ${C} - ${b}`),s("change",{startTime:C,endTime:b})}},200),h=p0(({startTime:p,endTime:g})=>{f("reset",{startTime:p,endTime:g})},100),f=(p,g)=>{switch(p){case"init":{const{data:m,time:y}=l.value,{xAxisData:_,lineData:C}=m.reduce((v,w,x)=>(v.xAxisData.push(y[x].split(" ")[0]),v.lineData.push(w[1]),v),{xAxisData:[],lineData:[]}),b={grid:{height:0,left:"100px",right:"80px"},xAxis:{type:"category",data:_,show:!1},yAxis:{type:"value"},dataZoom:[{show:!0,startValue:0,endValue:0,textStyle:{color:"#ccc"}},{type:"inside",startValue:0,endValue:0}],series:[{data:C,type:"line"}]};if(r.setOption(b,!0),a.screenTimeRange.length){const[v,w]=a.screenTimeRange;h({startTime:v,endTime:w})}break}case"reset":{const{time:m}=l.value,y=bt(g.startTime).format("YYYY-MM-DD"),_=bt(g.endTime).format("YYYY-MM-DD");let C=-1,b=-1;for(let v=0;v<m.length;v++){const w=bt(m[v]).format("YYYY-MM-DD");if(C!==-1&&b!==-1)break;C===-1&&(new Date(w)===new Date(y)?C=v:new Date(w)>new Date(y)&&(C=v-1)),b===-1&&(new Date(w)===new Date(_)?b=v:new Date(w)>new Date(_)&&(b=v-1))}b===-1&&(b=m.length-1),r.dispatchAction({type:"dataZoom",startValue:C,endValue:b});break}}};return c.onMounted(()=>{c.nextTick(()=>{r=Kr.init(o.value),r.on("datazoom",d),u()})}),c.watch(()=>a.screenTimeRange,p=>{const[g,m]=p;h({startTime:g,endTime:m})},{deep:!0}),c.onUnmounted(()=>{r.off("datazoom"),r.dispose()}),e({resize:p0(()=>r.resize(),100)}),(p,g)=>(c.openBlock(),c.createElementBlock("div",{class:"chart",ref_key:"sliderChartRef",ref:o},null,512))}},[["__scopeId","data-v-0c715da1"]]),$Tt="",ict={class:"main-chart"},rct={class:"indicator"},oct={key:0,class:"screen-time-range"},sct={key:0,class:"sub-chart"},act={class:"indicator"},lct={class:"title"},uct={key:1,class:"slider-chart"},cct=Jt({__name:"index",props:{varietyCode:{type:String,required:!0},varietyStock:{type:Number,required:!0},indicatorStore:{type:Object,required:!0},userKlineConfig:{type:Object,required:!0},cycle:{type:String,required:!0},sellBuy:{type:Number,default:1},rightType:{type:[Number,null],default:null},klineType:{type:[Number,null],default:null},incomeType:{type:Number,default:0},initTimeRange:{type:Array,required:!0},mainIndicator:{type:String,required:!0},tradeLog:{type:Array,default:()=>[]},netPositionData:{type:Array,default:()=>[]},tradeIncomeRateData:{type:Array,default:()=>[]},positionTime:{type:[String,null],default:null},syncBrushRange:{type:Object,default:()=>({cycleList:[],startTime:null,endTime:null})},deleteFirstNumber:{type:Number,default:1},withoutPermission:{type:Number,default:0}},setup(n,{expose:e}){const{round:t,formatValue:i}=Cl,{request:r}=c.inject("stConfig"),o=c.ref(),s=c.ref(!1),a=c.ref(!1),l=n;let u=!1,d=!1,h=!1,f=!1,p=null,g=null,m=null;const y=c.ref(null),_=c.ref(null),C=c.ref({data:[],mainIndicator:[],subIndicator:[],time:[]}),b=c.ref(0),v=c.ref([]),w=c.ref(null),x=c.ref("VOL"),S=c.computed(()=>{const O=C.value.data[b.value];if(!O)return[{label:"开",value:"-"},{label:"高",value:"-"},{label:"低",value:"-"},{label:"收",value:"-"},{label:"额",value:"-"},{label:"涨跌",value:"-"}];const P=[{label:"开",value:O[0]},{label:"高",value:O[3]},{label:"低",value:O[2]},{label:"收",value:O[1]}];O[4]!==null&&P.push({label:"额",value:i(O[4])});let U;return O[6]>0?U="red":O[6]<0&&(U="green"),P.push({label:"涨跌",value:`${t(O[6])}%`,color:U}),P}),D=c.computed(()=>{var O,P;return((P=(O=C.value)==null?void 0:O.mainIndicator)==null?void 0:P.map(U=>({label:U.key,value:t(U.data[b.value]),color:U.color})))||[]}),N=c.computed(()=>{var O,P;return((P=(O=C.value)==null?void 0:O.subIndicator)==null?void 0:P.map(U=>({label:U.key,color:U.color,value:U.data[b.value]||"-"})))||[]}),k=()=>{m||(m=Kr.init(_.value),m.on("highlight",p0(O=>{var P;O.dataIndex?b.value=O.dataIndex:b.value=((P=O.batch)==null?void 0:P[0].dataIndex)??-1},10)),m.on("datazoom",p0(async()=>{var Y;const{loadCheckCount:O}=V2,{startValue:P,endValue:U}=((Y=m.getOption())==null?void 0:Y.dataZoom[0])??{};h===!1&&f===!1&&P<O&&await L("history"),u===!1&&d===!1&&U>C.value.time.length-O&&await L("new"),A(),R()})),m.on("globalout",()=>{const O=m.getOption();b.value=O.dataZoom[0].endValue}),m.getZr().on("contextmenu",()=>{var O;w.value=(O=C.value)==null?void 0:O.time[b.value]}),window.addEventListener("keydown",M),l.userKlineConfig.enable_subChart&&(g=Kr.init(y.value),Kr.connect([m,g])),p=gJ(_.value),p.listen(()=>{requestAnimationFrame(()=>{var O;m.resize(),g==null||g.resize(),(O=o.value)==null||O.resize()})}))},E=async({startTime:O,endTime:P})=>{h=!1,f=!1,u=!1,d=!1;try{s.value=!0;const U={varietyCode:l.varietyCode,cycle:l.cycle,right:l.varietyStock===1?l.rightType:0,contractType:l.varietyStock?null:l.klineType,mainIndicatorList:l.indicatorStore.getIndicatorParams(l.mainIndicator),subIndicator:x.value,deleteFirstNumber:l.deleteFirstNumber,withoutPermission:l.withoutPermission};["1","2","3","4","5"].includes(l.cycle)?Object.assign(U,{startTime:bt(O).subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),endTime:bt(P).add(1,"day").format("YYYY-MM-DD HH:mm:ss")}):["6","7"].includes(l.cycle)?Object.assign(U,{startTime:bt(O).subtract(50,"day").format("YYYY-MM-DD HH:mm:ss"),endTime:bt(P).add(50,"day").format("YYYY-MM-DD HH:mm:ss")}):Object.assign(U,{startTime:bt(O).subtract(10,"month").format("YYYY-MM-DD HH:mm:ss"),endTime:bt(P).add(10,"month").format("YYYY-MM-DD HH:mm:ss")});const{body:Y}=await r.post("/middleLayer/kline/getKline",U);C.value=Y??{data:[],mainIndicator:[],subIndicator:[],time:[]};let j=-1,z=-1;for(let re=0;re<C.value.time.length;re++){const ce=bt(C.value.time[re]).format("YYYY-MM-DD");if(j!==-1&&z!==-1)break;j===-1&&(new Date(ce)===new Date(O)?j=re:new Date(ce)>new Date(O)&&(j=re-1)),z===-1&&(new Date(ce)===new Date(P)?z=re:new Date(ce)>new Date(P)&&(z=re-1))}z===-1&&(z=C.value.time.length-1),F({startValue:j===-1?0:j,endValue:z===-1?C.value.time.length-1:z})}finally{s.value=!1}},L=async O=>{var ce,le;const{loadAddCount:P}=V2;switch(O){case"history":{h=!0;const ne={varietyCode:l.varietyCode,cycle:l.cycle,right:l.varietyStock===1?l.rightType:0,contractType:l.varietyStock?null:l.klineType,endTime:C.value.time[0],limit:P,mainIndicatorList:l.indicatorStore.getIndicatorParams(l.mainIndicator),subIndicator:x.value,deleteFirstNumber:l.deleteFirstNumber,withoutPermission:l.withoutPermission},{body:oe}=await r.post("/middleLayer/kline/getKline",ne);C.value=Ene(oe,C.value),oe.data.length<P&&(console.log("[K线] 获取更多数据: 左侧已全部获取完毕, 关闭"),f=!0),h=!1;break}case"new":{u=!0;const ne={varietyCode:l.varietyCode,cycle:l.cycle,right:l.varietyStock===1?l.rightType:0,contractType:l.varietyStock?null:l.klineType,startTime:C.value.time[C.value.time.length-1],limit:P,mainIndicatorList:l.indicatorStore.getIndicatorParams(l.mainIndicator),subIndicator:x.value,deleteFirstNumber:l.deleteFirstNumber,withoutPermission:l.withoutPermission},{body:oe}=await r.post("/middleLayer/kline/getKline",ne);C.value=Ene(C.value,oe),oe.data.length<P&&(console.log("[K线] 获取更多数据: 右侧已全部获取完毕, 关闭"),d=!0),u=!1;break}}const{startValue:U,endValue:Y}=((ce=m.getOption())==null?void 0:ce.dataZoom[0])??{},j=(le=m.getOption())==null?void 0:le.xAxis[0].data,z=C.value.time.findIndex(ne=>new Date(ne)>=new Date(j[U])),re=C.value.time.findIndex(ne=>new Date(ne)>=new Date(j[Y]));F({startValue:z===-1?0:z,endValue:re===-1?C.value.time.length-1:re})},A=()=>{var z;if(!C.value.time.length)return v.value=[];const{time:O}=C.value,{startValue:P,endValue:U}=((z=m.getOption())==null?void 0:z.dataZoom[0])??{},Y=O[P],j=O[U];["6","7","8"].includes(l.cycle)?v.value=[bt(Y).format("YYYY-MM-DD"),bt(j).format("YYYY-MM-DD")]:v.value=[Y,j]},F=(O={startValue:0,endValue:0})=>{k();const{maxValueSpan:P}=V2,{time:U,data:Y,mainIndicator:j}=C.value,z=O.endValue-O.startValue>P?O.endValue-P:O.startValue,re=O.endValue,ce=j.map(pe=>({name:pe.key,type:"line",silent:!0,symbol:"none",data:pe.data,lineStyle:{width:pe.width||1},itemStyle:{color:pe.color}})),{netPositionLineData:le}=Jut(l.netPositionData,l.cycle),{tradeIncomeRateLineData:ne}=ect(l.tradeIncomeRateData,l.cycle,l.incomeType,U),{tradePointData:oe,tradeLineData:he}=Xut(l.tradeLog,l.cycle,l.sellBuy,U,Y,l.userKlineConfig);m.setOption({animation:!1,grid:{top:"40px",left:"60px",right:"20px",bottom:"20px"},dataZoom:[{type:"inside",startValue:z,endValue:re,minValueSpan:V2.minValueSpan,maxValueSpan:V2.maxValueSpan}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:pe=>{const{axisDimension:de,value:ve}=pe;return de==="x"?["6","7","8"].includes(l.cycle)?bt(ve).format("YYYY-MM-DD"):ve:String(t(ve))}}},formatter:pe=>{if(!(pe!=null&&pe.length))return null;let de="";if(pe.forEach(Le=>{if(Le.seriesName==="netPosition"&&Le.data!==null&&(de+=`<div>资产持仓净值: ${Le.data[1]}</div>`),Le.componentSubType==="candlestick")if(l.sellBuy===0){const ie=oe.filter(Z=>(Z==null?void 0:Z.coord[0])===Le.axisValue);let W=0,te=0;ie.forEach(Z=>{const{tradeType:X,amount:ee}=Z.customData;X==="买"&&(W+=ee),X==="卖"&&(te+=ee)}),W&&(de+=`<div>买: ${W}</div>`),te&&(de+=`<div>卖: ${te}</div>`)}else oe.forEach(ie=>{if((ie==null?void 0:ie.coord[0])===Le.axisValue){const{tradeType:W,amount:te,profitAndLoss:Z,openPriceAll:X,closePriceAll:ee}=ie.customData;let K=`<div>${W}: ${te}手</div>`;if(W.includes("开")&&(K+=`<div>开仓价: ${(X/te).toFixed(2)}</div>`),W.includes("平")){const Q=(X/te).toFixed(2),J=(ee/te).toFixed(2);K+=`<div>平仓价: ${J}</div>`,K+=`<div>盈亏: ${Z==null?void 0:Z.toFixed(2)}</div>`,K+=`<div>盈亏比率: ${((J-Q)/Q*100).toFixed(2)} %</div>`}de+=K}})}),!de)return null;let ve=pe[0].axisValue;return["6","7","8"].includes(l.cycle)&&(ve=bt(ve).format("YYYY-MM-DD")),`
143
+ `+t.message:i+="Unknown reason. Perhaps you specify the wrong file path to wasm binary?",new Error(i)})}let Gtt=Re.ACCBANDS;function yJ(n){return Oe(Gtt,n)}const Ytt=yJ;let Qtt=Re.ACOS;function vJ(n){return Oe(Qtt,n)}const Ztt=vJ;let Xtt=Re.AD;function CJ(n){return Oe(Xtt,n)}const Jtt=CJ;let ent=Re.ADD;function wJ(n){return Oe(ent,n)}const tnt=wJ;let nnt=Re.ADOSC;function xJ(n){return Oe(nnt,n)}const int=xJ;let rnt=Re.ADX;function SJ(n){return Oe(rnt,n)}const ont=SJ;let snt=Re.ADXR;function DJ(n){return Oe(snt,n)}const ant=DJ;let lnt=Re.APO;function NJ(n){return Oe(lnt,n)}const unt=NJ;let cnt=Re.AROON;function EJ(n){return Oe(cnt,n)}const dnt=EJ;let hnt=Re.AROONOSC;function kJ(n){return Oe(hnt,n)}const fnt=kJ;let pnt=Re.ASIN;function LJ(n){return Oe(pnt,n)}const gnt=LJ;let mnt=Re.ATAN;function MJ(n){return Oe(mnt,n)}const bnt=MJ;let _nt=Re.ATR;function TJ(n){return Oe(_nt,n)}const ynt=TJ;let vnt=Re.AVGDEV;function AJ(n){return Oe(vnt,n)}const Cnt=AJ;let wnt=Re.AVGPRICE;function IJ(n){return Oe(wnt,n)}const xnt=IJ;let Snt=Re.BBANDS;function RJ(n){return Oe(Snt,n)}const Dnt=RJ;let Nnt=Re.BETA;function OJ(n){return Oe(Nnt,n)}const Ent=OJ;let knt=Re.BOP;function FJ(n){return Oe(knt,n)}const Lnt=FJ;let Mnt=Re.CCI;function PJ(n){return Oe(Mnt,n)}const Tnt=PJ;let Ant=Re.CDL2CROWS;function BJ(n){return Oe(Ant,n)}const Int=BJ;let Rnt=Re.CDL3BLACKCROWS;function VJ(n){return Oe(Rnt,n)}const Ont=VJ;let Fnt=Re.CDL3INSIDE;function zJ(n){return Oe(Fnt,n)}const Pnt=zJ;let Bnt=Re.CDL3LINESTRIKE;function HJ(n){return Oe(Bnt,n)}const Vnt=HJ;let znt=Re.CDL3OUTSIDE;function jJ(n){return Oe(znt,n)}const Hnt=jJ;let jnt=Re.CDL3STARSINSOUTH;function WJ(n){return Oe(jnt,n)}const Wnt=WJ;let $nt=Re.CDL3WHITESOLDIERS;function $J(n){return Oe($nt,n)}const Unt=$J;let qnt=Re.CDLABANDONEDBABY;function UJ(n){return Oe(qnt,n)}const Knt=UJ;let Gnt=Re.CDLADVANCEBLOCK;function qJ(n){return Oe(Gnt,n)}const Ynt=qJ;let Qnt=Re.CDLBELTHOLD;function KJ(n){return Oe(Qnt,n)}const Znt=KJ;let Xnt=Re.CDLBREAKAWAY;function GJ(n){return Oe(Xnt,n)}const Jnt=GJ;let eit=Re.CDLCLOSINGMARUBOZU;function YJ(n){return Oe(eit,n)}const tit=YJ;let nit=Re.CDLCONCEALBABYSWALL;function QJ(n){return Oe(nit,n)}const iit=QJ;let rit=Re.CDLCOUNTERATTACK;function ZJ(n){return Oe(rit,n)}const oit=ZJ;let sit=Re.CDLDARKCLOUDCOVER;function XJ(n){return Oe(sit,n)}const ait=XJ;let lit=Re.CDLDOJI;function JJ(n){return Oe(lit,n)}const uit=JJ;let cit=Re.CDLDOJISTAR;function eee(n){return Oe(cit,n)}const dit=eee;let hit=Re.CDLDRAGONFLYDOJI;function tee(n){return Oe(hit,n)}const fit=tee;let pit=Re.CDLENGULFING;function nee(n){return Oe(pit,n)}const git=nee;let mit=Re.CDLEVENINGDOJISTAR;function iee(n){return Oe(mit,n)}const bit=iee;let _it=Re.CDLEVENINGSTAR;function ree(n){return Oe(_it,n)}const yit=ree;let vit=Re.CDLGAPSIDESIDEWHITE;function oee(n){return Oe(vit,n)}const Cit=oee;let wit=Re.CDLGRAVESTONEDOJI;function see(n){return Oe(wit,n)}const xit=see;let Sit=Re.CDLHAMMER;function aee(n){return Oe(Sit,n)}const Dit=aee;let Nit=Re.CDLHANGINGMAN;function lee(n){return Oe(Nit,n)}const Eit=lee;let kit=Re.CDLHARAMI;function uee(n){return Oe(kit,n)}const Lit=uee;let Mit=Re.CDLHARAMICROSS;function cee(n){return Oe(Mit,n)}const Tit=cee;let Ait=Re.CDLHIGHWAVE;function dee(n){return Oe(Ait,n)}const Iit=dee;let Rit=Re.CDLHIKKAKE;function hee(n){return Oe(Rit,n)}const Oit=hee;let Fit=Re.CDLHIKKAKEMOD;function fee(n){return Oe(Fit,n)}const Pit=fee;let Bit=Re.CDLHOMINGPIGEON;function pee(n){return Oe(Bit,n)}const Vit=pee;let zit=Re.CDLIDENTICAL3CROWS;function gee(n){return Oe(zit,n)}const Hit=gee;let jit=Re.CDLINNECK;function mee(n){return Oe(jit,n)}const Wit=mee;let $it=Re.CDLINVERTEDHAMMER;function bee(n){return Oe($it,n)}const Uit=bee;let qit=Re.CDLKICKING;function _ee(n){return Oe(qit,n)}const Kit=_ee;let Git=Re.CDLKICKINGBYLENGTH;function yee(n){return Oe(Git,n)}const Yit=yee;let Qit=Re.CDLLADDERBOTTOM;function vee(n){return Oe(Qit,n)}const Zit=vee;let Xit=Re.CDLLONGLEGGEDDOJI;function Cee(n){return Oe(Xit,n)}const Jit=Cee;let ert=Re.CDLLONGLINE;function wee(n){return Oe(ert,n)}const trt=wee;let nrt=Re.CDLMARUBOZU;function xee(n){return Oe(nrt,n)}const irt=xee;let rrt=Re.CDLMATCHINGLOW;function See(n){return Oe(rrt,n)}const ort=See;let srt=Re.CDLMATHOLD;function Dee(n){return Oe(srt,n)}const art=Dee;let lrt=Re.CDLMORNINGDOJISTAR;function Nee(n){return Oe(lrt,n)}const urt=Nee;let crt=Re.CDLMORNINGSTAR;function Eee(n){return Oe(crt,n)}const drt=Eee;let hrt=Re.CDLONNECK;function kee(n){return Oe(hrt,n)}const frt=kee;let prt=Re.CDLPIERCING;function Lee(n){return Oe(prt,n)}const grt=Lee;let mrt=Re.CDLRICKSHAWMAN;function Mee(n){return Oe(mrt,n)}const brt=Mee;let _rt=Re.CDLRISEFALL3METHODS;function Tee(n){return Oe(_rt,n)}const yrt=Tee;let vrt=Re.CDLSEPARATINGLINES;function Aee(n){return Oe(vrt,n)}const Crt=Aee;let wrt=Re.CDLSHOOTINGSTAR;function Iee(n){return Oe(wrt,n)}const xrt=Iee;let Srt=Re.CDLSHORTLINE;function Ree(n){return Oe(Srt,n)}const Drt=Ree;let Nrt=Re.CDLSPINNINGTOP;function Oee(n){return Oe(Nrt,n)}const Ert=Oee;let krt=Re.CDLSTALLEDPATTERN;function Fee(n){return Oe(krt,n)}const Lrt=Fee;let Mrt=Re.CDLSTICKSANDWICH;function Pee(n){return Oe(Mrt,n)}const Trt=Pee;let Art=Re.CDLTAKURI;function Bee(n){return Oe(Art,n)}const Irt=Bee;let Rrt=Re.CDLTASUKIGAP;function Vee(n){return Oe(Rrt,n)}const Ort=Vee;let Frt=Re.CDLTHRUSTING;function zee(n){return Oe(Frt,n)}const Prt=zee;let Brt=Re.CDLTRISTAR;function Hee(n){return Oe(Brt,n)}const Vrt=Hee;let zrt=Re.CDLUNIQUE3RIVER;function jee(n){return Oe(zrt,n)}const Hrt=jee;let jrt=Re.CDLUPSIDEGAP2CROWS;function Wee(n){return Oe(jrt,n)}const Wrt=Wee;let $rt=Re.CDLXSIDEGAP3METHODS;function $ee(n){return Oe($rt,n)}const Urt=$ee;let qrt=Re.CEIL;function Uee(n){return Oe(qrt,n)}const Krt=Uee;let Grt=Re.CMO;function qee(n){return Oe(Grt,n)}const Yrt=qee;let Qrt=Re.CORREL;function Kee(n){return Oe(Qrt,n)}const Zrt=Kee;let Xrt=Re.COS;function Gee(n){return Oe(Xrt,n)}const Jrt=Gee;let eot=Re.COSH;function Yee(n){return Oe(eot,n)}const tot=Yee;let not=Re.DEMA;function Qee(n){return Oe(not,n)}const iot=Qee;let rot=Re.DIV;function Zee(n){return Oe(rot,n)}const oot=Zee;let sot=Re.DX;function Xee(n){return Oe(sot,n)}const aot=Xee;let lot=Re.EMA;function Jee(n){return Oe(lot,n)}const uot=Jee;let cot=Re.EXP;function ete(n){return Oe(cot,n)}const dot=ete;let hot=Re.FLOOR;function tte(n){return Oe(hot,n)}const fot=tte;let pot=Re.HT_DCPERIOD;function nte(n){return Oe(pot,n)}const got=nte;let mot=Re.HT_DCPHASE;function ite(n){return Oe(mot,n)}const bot=ite;let _ot=Re.HT_PHASOR;function rte(n){return Oe(_ot,n)}const yot=rte;let vot=Re.HT_SINE;function ote(n){return Oe(vot,n)}const Cot=ote;let wot=Re.HT_TRENDLINE;function ste(n){return Oe(wot,n)}const xot=ste;let Sot=Re.HT_TRENDMODE;function ate(n){return Oe(Sot,n)}const Dot=ate;let Not=Re.IMI;function lte(n){return Oe(Not,n)}const Eot=lte;let kot=Re.KAMA;function ute(n){return Oe(kot,n)}const Lot=ute;let Mot=Re.LINEARREG;function cte(n){return Oe(Mot,n)}const Tot=cte;let Aot=Re.LINEARREG_ANGLE;function dte(n){return Oe(Aot,n)}const Iot=dte;let Rot=Re.LINEARREG_INTERCEPT;function hte(n){return Oe(Rot,n)}const Oot=hte;let Fot=Re.LINEARREG_SLOPE;function fte(n){return Oe(Fot,n)}const Pot=fte;let Bot=Re.LN;function pte(n){return Oe(Bot,n)}const Vot=pte;let zot=Re.LOG10;function gte(n){return Oe(zot,n)}const Hot=gte;let jot=Re.MA;function mte(n){return Oe(jot,n)}const Wot=mte;let $ot=Re.MACD;function bte(n){return Oe($ot,n)}const Uot=bte;let qot=Re.MACDEXT;function _te(n){return Oe(qot,n)}const Kot=_te;let Got=Re.MACDFIX;function yte(n){return Oe(Got,n)}const Yot=yte;let Qot=Re.MAMA;function vte(n){return Oe(Qot,n)}const Zot=vte;let Xot=Re.MAVP;function Cte(n){return Oe(Xot,n)}const Jot=Cte;let est=Re.MAX;function wte(n){return Oe(est,n)}const tst=wte;let nst=Re.MAXINDEX;function xte(n){return Oe(nst,n)}const ist=xte;let rst=Re.MEDPRICE;function Ste(n){return Oe(rst,n)}const ost=Ste;let sst=Re.MFI;function Dte(n){return Oe(sst,n)}const ast=Dte;let lst=Re.MIDPOINT;function Nte(n){return Oe(lst,n)}const ust=Nte;let cst=Re.MIDPRICE;function Ete(n){return Oe(cst,n)}const dst=Ete;let hst=Re.MIN;function kte(n){return Oe(hst,n)}const fst=kte;let pst=Re.MININDEX;function Lte(n){return Oe(pst,n)}const gst=Lte;let mst=Re.MINMAX;function Mte(n){return Oe(mst,n)}const bst=Mte;let _st=Re.MINMAXINDEX;function Tte(n){return Oe(_st,n)}const yst=Tte;let vst=Re.MINUS_DI;function Ate(n){return Oe(vst,n)}const Cst=Ate;let wst=Re.MINUS_DM;function Ite(n){return Oe(wst,n)}const xst=Ite;let Sst=Re.MOM;function Rte(n){return Oe(Sst,n)}const Dst=Rte;let Nst=Re.MULT;function Ote(n){return Oe(Nst,n)}const Est=Ote;let kst=Re.NATR;function Fte(n){return Oe(kst,n)}const Lst=Fte;let Mst=Re.OBV;function Pte(n){return Oe(Mst,n)}const Tst=Pte;let Ast=Re.PLUS_DI;function Bte(n){return Oe(Ast,n)}const Ist=Bte;let Rst=Re.PLUS_DM;function Vte(n){return Oe(Rst,n)}const Ost=Vte;let Fst=Re.PPO;function zte(n){return Oe(Fst,n)}const Pst=zte;let Bst=Re.ROC;function Hte(n){return Oe(Bst,n)}const Vst=Hte;let zst=Re.ROCP;function jte(n){return Oe(zst,n)}const Hst=jte;let jst=Re.ROCR;function Wte(n){return Oe(jst,n)}const Wst=Wte;let $st=Re.ROCR100;function $te(n){return Oe($st,n)}const Ust=$te;let qst=Re.RSI;function Ute(n){return Oe(qst,n)}const Kst=Ute;let Gst=Re.SAR;function qte(n){return Oe(Gst,n)}const Yst=qte;let Qst=Re.SAREXT;function Kte(n){return Oe(Qst,n)}const Zst=Kte;let Xst=Re.SIN;function Gte(n){return Oe(Xst,n)}const Jst=Gte;let eat=Re.SINH;function Yte(n){return Oe(eat,n)}const tat=Yte;let nat=Re.SMA;function Qte(n){return Oe(nat,n)}const iat=Qte;let rat=Re.SQRT;function Zte(n){return Oe(rat,n)}const oat=Zte;let sat=Re.STDDEV;function Xte(n){return Oe(sat,n)}const aat=Xte;let lat=Re.STOCH;function Jte(n){return Oe(lat,n)}const uat=Jte;let cat=Re.STOCHF;function ene(n){return Oe(cat,n)}const dat=ene;let hat=Re.STOCHRSI;function tne(n){return Oe(hat,n)}const fat=tne;let pat=Re.SUB;function nne(n){return Oe(pat,n)}const gat=nne;let mat=Re.SUM;function ine(n){return Oe(mat,n)}const bat=ine;let _at=Re.T3;function rne(n){return Oe(_at,n)}const yat=rne;let vat=Re.TAN;function one(n){return Oe(vat,n)}const Cat=one;let wat=Re.TANH;function sne(n){return Oe(wat,n)}const xat=sne;let Sat=Re.TEMA;function ane(n){return Oe(Sat,n)}const Dat=ane;let Nat=Re.TRANGE;function lne(n){return Oe(Nat,n)}const Eat=lne;let kat=Re.TRIMA;function une(n){return Oe(kat,n)}const Lat=une;let Mat=Re.TRIX;function cne(n){return Oe(Mat,n)}const Tat=cne;let Aat=Re.TSF;function dne(n){return Oe(Aat,n)}const Iat=dne;let Rat=Re.TYPPRICE;function hne(n){return Oe(Rat,n)}const Oat=hne;let Fat=Re.ULTOSC;function fne(n){return Oe(Fat,n)}const Pat=fne;let Bat=Re.VAR;function pne(n){return Oe(Bat,n)}const Vat=pne;let zat=Re.WCLPRICE;function gne(n){return Oe(zat,n)}const Hat=gne;let jat=Re.WILLR;function mne(n){return Oe(jat,n)}const Wat=mne;let $at=Re.WMA;function bne(n){return Oe($at,n)}const s5=Object.freeze(Object.defineProperty({__proto__:null,ACCBANDS:yJ,ACOS:vJ,AD:CJ,ADD:wJ,ADOSC:xJ,ADX:SJ,ADXR:DJ,APO:NJ,AROON:EJ,AROONOSC:kJ,ASIN:LJ,ATAN:MJ,ATR:TJ,AVGDEV:AJ,AVGPRICE:IJ,BBANDS:RJ,BETA:OJ,BOP:FJ,CCI:PJ,CDL2CROWS:BJ,CDL3BLACKCROWS:VJ,CDL3INSIDE:zJ,CDL3LINESTRIKE:HJ,CDL3OUTSIDE:jJ,CDL3STARSINSOUTH:WJ,CDL3WHITESOLDIERS:$J,CDLABANDONEDBABY:UJ,CDLADVANCEBLOCK:qJ,CDLBELTHOLD:KJ,CDLBREAKAWAY:GJ,CDLCLOSINGMARUBOZU:YJ,CDLCONCEALBABYSWALL:QJ,CDLCOUNTERATTACK:ZJ,CDLDARKCLOUDCOVER:XJ,CDLDOJI:JJ,CDLDOJISTAR:eee,CDLDRAGONFLYDOJI:tee,CDLENGULFING:nee,CDLEVENINGDOJISTAR:iee,CDLEVENINGSTAR:ree,CDLGAPSIDESIDEWHITE:oee,CDLGRAVESTONEDOJI:see,CDLHAMMER:aee,CDLHANGINGMAN:lee,CDLHARAMI:uee,CDLHARAMICROSS:cee,CDLHIGHWAVE:dee,CDLHIKKAKE:hee,CDLHIKKAKEMOD:fee,CDLHOMINGPIGEON:pee,CDLIDENTICAL3CROWS:gee,CDLINNECK:mee,CDLINVERTEDHAMMER:bee,CDLKICKING:_ee,CDLKICKINGBYLENGTH:yee,CDLLADDERBOTTOM:vee,CDLLONGLEGGEDDOJI:Cee,CDLLONGLINE:wee,CDLMARUBOZU:xee,CDLMATCHINGLOW:See,CDLMATHOLD:Dee,CDLMORNINGDOJISTAR:Nee,CDLMORNINGSTAR:Eee,CDLONNECK:kee,CDLPIERCING:Lee,CDLRICKSHAWMAN:Mee,CDLRISEFALL3METHODS:Tee,CDLSEPARATINGLINES:Aee,CDLSHOOTINGSTAR:Iee,CDLSHORTLINE:Ree,CDLSPINNINGTOP:Oee,CDLSTALLEDPATTERN:Fee,CDLSTICKSANDWICH:Pee,CDLTAKURI:Bee,CDLTASUKIGAP:Vee,CDLTHRUSTING:zee,CDLTRISTAR:Hee,CDLUNIQUE3RIVER:jee,CDLUPSIDEGAP2CROWS:Wee,CDLXSIDEGAP3METHODS:$ee,CEIL:Uee,CMO:qee,CORREL:Kee,COS:Gee,COSH:Yee,DEMA:Qee,DIV:Zee,DX:Xee,EMA:Jee,EXP:ete,FLOOR:tte,HT_DCPERIOD:nte,HT_DCPHASE:ite,HT_PHASOR:rte,HT_SINE:ote,HT_TRENDLINE:ste,HT_TRENDMODE:ate,IMI:lte,KAMA:ute,LINEARREG:cte,LINEARREG_ANGLE:dte,LINEARREG_INTERCEPT:hte,LINEARREG_SLOPE:fte,LN:pte,LOG10:gte,MA:mte,MACD:bte,MACDEXT:_te,MACDFIX:yte,MAMA:vte,get MAType(){return tk},MAVP:Cte,MAX:wte,MAXINDEX:xte,MEDPRICE:Ste,MFI:Dte,MIDPOINT:Nte,MIDPRICE:Ete,MIN:kte,MININDEX:Lte,MINMAX:Mte,MINMAXINDEX:Tte,MINUS_DI:Ate,MINUS_DM:Ite,MOM:Rte,MULT:Ote,NATR:Fte,OBV:Pte,PLUS_DI:Bte,PLUS_DM:Vte,PPO:zte,ROC:Hte,ROCP:jte,ROCR:Wte,ROCR100:$te,RSI:Ute,SAR:qte,SAREXT:Kte,SIN:Gte,SINH:Yte,SMA:Qte,SQRT:Zte,STDDEV:Xte,STOCH:Jte,STOCHF:ene,STOCHRSI:tne,SUB:nne,SUM:ine,T3:rne,TAN:one,TANH:sne,TEMA:ane,TRANGE:lne,TRIMA:une,TRIX:cne,TSF:dne,TYPPRICE:hne,ULTOSC:fne,VAR:pne,WCLPRICE:gne,WILLR:mne,WMA:bne,accBands:Ytt,acos:Ztt,ad:Jtt,adOsc:int,add:tnt,adx:ont,adxr:ant,apo:unt,aroon:dnt,aroonOsc:fnt,asin:gnt,atan:bnt,atr:ynt,avgDev:Cnt,avgPrice:xnt,bbands:Dnt,beta:Ent,bop:Lnt,cci:Tnt,cdl2Crows:Int,cdl3BlackCrows:Ont,cdl3Inside:Pnt,cdl3LineStrike:Vnt,cdl3Outside:Hnt,cdl3StarsInSouth:Wnt,cdl3WhiteSoldiers:Unt,cdlAbandonedBaby:Knt,cdlAdvanceBlock:Ynt,cdlBeltHold:Znt,cdlBreakaway:Jnt,cdlClosingMarubozu:tit,cdlConcealBabysWall:iit,cdlCounterAttack:oit,cdlDarkCloudCover:ait,cdlDoji:uit,cdlDojiStar:dit,cdlDragonflyDoji:fit,cdlEngulfing:git,cdlEveningDojiStar:bit,cdlEveningStar:yit,cdlGapSideSideWhite:Cit,cdlGravestoneDoji:xit,cdlHammer:Dit,cdlHangingMan:Eit,cdlHarami:Lit,cdlHaramiCross:Tit,cdlHignWave:Iit,cdlHikkake:Oit,cdlHikkakeMod:Pit,cdlHomingPigeon:Vit,cdlIdentical3Crows:Hit,cdlInNeck:Wit,cdlInvertedHammer:Uit,cdlKicking:Kit,cdlKickingByLength:Yit,cdlLadderBottom:Zit,cdlLongLeggedDoji:Jit,cdlLongLine:trt,cdlMarubozu:irt,cdlMatHold:art,cdlMatchingLow:ort,cdlMorningDojiStar:urt,cdlMorningStar:drt,cdlOnNeck:frt,cdlPiercing:grt,cdlRickshawMan:brt,cdlRiseFall3Methods:yrt,cdlSeperatingLines:Crt,cdlShootingStar:xrt,cdlShortLine:Drt,cdlSpinningTop:Ert,cdlStalledPattern:Lrt,cdlStickSandwhich:Trt,cdlTakuri:Irt,cdlTasukiGap:Ort,cdlThrusting:Prt,cdlTristar:Vrt,cdlUnique3River:Hrt,cdlUpsideGap2Crows:Wrt,cdlXSideGap3Methods:Urt,ceil:Krt,cmo:Yrt,correl:Zrt,cos:Jrt,cosh:tot,dema:iot,div:oot,dx:aot,ema:uot,exp:dot,floor:fot,htDcPeriod:got,htDcPhase:bot,htPhasor:yot,htSine:Cot,htTrendMode:Dot,htTrendline:xot,imi:Eot,init:nk,kama:Lot,linearReg:Tot,linearRegAngle:Iot,linearRegIntercept:Oot,linearRegSlope:Pot,ln:Vot,log10:Hot,macd:Uot,macdExt:Kot,macdFix:Yot,mama:Zot,max:tst,maxIndex:ist,medPrice:ost,mfi:ast,midPoint:ust,midPrice:dst,min:fst,minIndex:gst,minMax:bst,minMaxIndex:yst,minusDI:Cst,minusDM:xst,mom:Dst,movingAverage:Wot,movingAverageVariablePeriod:Jot,mult:Est,natr:Lst,obv:Tst,plusDI:Ist,plusDM:Ost,ppo:Pst,roc:Vst,rocP:Hst,rocR:Wst,rocR100:Ust,rsi:Kst,sar:Yst,sarExt:Zst,sin:Jst,sinh:tat,sma:iat,sqrt:oat,stdDev:aat,stoch:uat,stochF:dat,stochRsi:fat,sub:gat,sum:bat,t3:yat,tan:Cat,tanh:xat,tema:Dat,trima:Lat,trix:Tat,trueRange:Eat,tsf:Iat,typPrice:Oat,ultOsc:Pat,variance:Vat,wclPrice:Hat,willR:Wat,wma:bne},Symbol.toStringTag,{value:"Module"}));let _ne=!1,yne=!0,vne=[];const Cne=n=>{const e=[],t=[],i=[],r=[],o=[],s=[];return n.forEach((a,l)=>{e.push(a[0]),t.push(a[1]),i.push(a[4]),r.push(a[2]),o.push(a[3]),s.push([a[1],a[4],a[3],a[2],Number(a[6]),l===0?a[4]:n[l-1][4]])}),{time:e,open:t,close:i,high:r,low:o,kLineData:s}},Uat=async()=>{if(!_ne)_ne=!0,await nk("./talib.wasm"),yne=!1,vne.forEach(n=>{n()});else if(yne)return new Promise(n=>{vne.push(n)})},y_=(n,e)=>n.length>e?n.slice(n.length-e):n,qat=(n,e,t)=>n.calculationFn?n.calculationFn(s5,e,t):new Array(e.time.length).fill(null),Kat=async(n,e,t)=>{const i=Cne(n);let r=[];return r=Cne(r),await Uat(),{originData:y_(n,t),kLine:y_(i.kLineData,t),time:y_(i.time,t),indicator:e.config.reduce((o,s)=>(o.push({key:s.key,color:s.color,data:y_(qat(s,i,r),t)}),o),[])}},ik="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ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uMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",a5=(n,e)=>{const{type:t="log",color:i="black"}=e??{};localStorage.getItem("st-kline-console-show")==="true"&&console[t](`%c${n}`,`color:${i}`)},Aa=n=>n||n===0?Math.round(n*1e3)/1e3:null,Gat=n=>n>=1e12?`${(n/1e12).toFixed(2)}万亿`:n>=1e8?`${(n/1e8).toFixed(2)}亿`:n>=1e4?`${(n/1e4).toFixed(2)}万`:n.toFixed(2),Yat=n=>{const{y:e,text:t,info:i,gridLeft:r,gridRight:o,echartsWidth:s,echartsInstance:a}=n,{config:l,event:u}=i;let d=0;return{type:"group",draggable:l.draggable?"vertical":!1,children:[{type:"line",info:i,shape:{x1:r,y1:e,x2:s-o,y2:e},style:{stroke:l.lineColor,lineWidth:1,lineDash:[8,4]},z:10},{type:"group",x:s,y:e-5,children:[{type:"text",left:-1*o,info:i,style:{fill:l.textColor,text:t,stroke:"#000",lineWidth:1,opacity:1},z:10}]}],onmouseover:h=>{u.onmouseover instanceof Function&&u.onmouseover(h,i)},onmouseout:h=>{u.onmouseout instanceof Function&&u.onmouseout(h,i)},ondragstart:h=>{u.ondragstart instanceof Function&&l.draggable&&(d=h.offsetY,u.ondragstart(h,i))},ondragend:h=>{if(u.ondragend instanceof Function&&l.draggable){const p=h.offsetY-d;if(p===0)return;const g=a.convertFromPixel({yAxisIndex:0},e+p);u.ondragend(h,i,g)}}}},Qat=n=>{const{y:e,text:t,info:i,gridLeft:r,gridRight:o,echartsWidth:s,echartsInstance:a}=n,{config:l,event:u}=i;let d=0;const h=p=>{let g=null;p.target.type==="line"?g=p.target.parent:p.target.type==="tspan"&&(g=p.target.parent.parent.parent),g.children()[1].children()[0].animate("style",!1).when(200,{opacity:1}).start()},f=p=>{let g=null;p.target.type==="line"?g=p.target.parent:p.target.type==="tspan"&&(g=p.target.parent.parent.parent),g.children()[1].children()[0].animate("style",!1).when(200,{opacity:0}).start()};return{type:"group",draggable:l.draggable?"vertical":!1,children:[{type:"line",info:i,shape:{x1:r,y1:e,x2:s-o,y2:e},style:{stroke:l.lineColor,lineWidth:1},z:10},{type:"group",x:s/2,y:e-5,children:[{type:"text",left:"center",info:i,style:{fill:l.textColor,text:t,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:p=>{u.onmouseover instanceof Function?u.onmouseover(p,i):h(p)},onmouseout:p=>{u.onmouseout instanceof Function?u.onmouseout(p,i):f(p)},ondragstart:p=>{u.ondragstart instanceof Function&&l.draggable&&(d=p.offsetY,u.ondragstart(p,i))},ondragend:p=>{if(u.ondragend instanceof Function&&l.draggable){const m=p.offsetY-d;if(m===0)return;const y=a.convertFromPixel({yAxisIndex:0},e+m);u.ondragend(p,i,y)}}}},Zat=n=>{const{y:e,text:t,profitY:i,profitText:r,lossY:o,lossText:s,info:a,gridLeft:l,gridRight:u,echartsWidth:d,echartsInstance:h}=n,{config:f,event:p}=a;let g=0,m=null,y=null;const _=(v,w)=>{var x,S,D,N;(x=v.children()[2])==null||x.animate("style",!1).when(200,{opacity:~~w}).start(),(S=v.children()[3].children()[0])==null||S.animate("style",!1).when(200,{opacity:~~w}).start(),(D=v.children()[4])==null||D.animate("style",!1).when(200,{opacity:~~w}).start(),(N=v.children()[5].children()[0])==null||N.animate("style",!1).when(200,{opacity:~~w}).start()},C=v=>{let w=null;v.target.type==="line"?w=v.target.parent:v.target.type==="tspan"&&(w=v.target.parent.parent.parent),m=x=>{x.preventDefault(),(x.code==="AltLeft"||x.code==="AltRight")&&_(w,!0)},y=x=>{(x.code==="AltLeft"||x.code==="AltRight")&&_(w,!1)},window.addEventListener("keydown",m),window.addEventListener("keyup",y)},b=v=>{let w=null;v.target.type==="line"?w=v.target.parent:v.target.type==="tspan"&&(w=v.target.parent.parent.parent),_(w,!1),window.removeEventListener("keydown",m),window.removeEventListener("keyup",y)};return{type:"group",draggable:f.draggable?"vertical":!1,children:[{type:"line",info:a,shape:{x1:l,y1:e,x2:d-u,y2:e},style:{stroke:f.lineColor,lineWidth:1},z:10},{type:"group",x:d/2,y:e-5,children:[{type:"text",left:"center",info:a,style:{fill:f.textColor,text:t,stroke:"#000",lineWidth:1,opacity:1},z:10}]},{type:"line",info:a,shape:{x1:l,y1:i,x2:d-u,y2:i},style:{stroke:f.profitLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:i-5,children:[{type:"text",left:"center",info:a,style:{fill:f.profitTextColor,text:r,stroke:"#000",lineWidth:1,opacity:0},z:10}]},{type:"line",info:a,shape:{x1:l,y1:o,x2:d-u,y2:o},style:{stroke:f.lossLineColor,lineWidth:1,lineDash:[8,4],opacity:0},z:10},{type:"group",x:d/2,y:o-5,children:[{type:"text",left:"center",info:a,style:{fill:f.lossTextColor,text:s,stroke:"#000",lineWidth:1,opacity:0},z:10}]}],onmouseover:v=>{p.onmouseover instanceof Function?p.onmouseover(v,a):C(v)},onmouseout:v=>{p.onmouseout instanceof Function?p.onmouseout(v,a):b(v)},ondragstart:v=>{p.ondragstart instanceof Function&&f.draggable&&(g=v.offsetY,p.ondragstart(v,a))},ondragend:v=>{if(p.ondragend instanceof Function&&f.draggable){const x=v.offsetY-g;if(x===0)return;const S=h.convertFromPixel({yAxisIndex:0},e+x);p.ondragend(v,a,S)}}}},v_=(n,e)=>{const{direction:t="",tradeAction:i="",tradeType:r=""}=n;if(e==="sellBuy"){const o=r??t+i;return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(o)}else if(e==="openClose")return r??t+i},Xat=(n,e)=>n.reduce((t,i)=>{var d;const r=v_(i,"sellBuy"),o=n.filter(h=>h.time===i.time);let s="image://"+new URL(Object.assign({"./images/buy.svg":ik,"./images/sell.svg":rk,"./images/t.svg":ok})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href;o.length>1?[...new Set(o.map(f=>v_(f,"sellBuy")))].length>1?s="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld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uNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":ik,"./images/sell.svg":rk,"./images/t.svg":ok})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":ik,"./images/sell.svg":rk,"./images/t.svg":ok})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href;const l=(e.find(h=>h[0]===i.time)??[])[2],u=((d=i==null?void 0:i.markLineTarget)==null?void 0:d.map(h=>{const f=i.time,p=l+"",g=h.time,m=e.find(_=>_[0]===h.time),y=m?m[3]:null;return[{coord:[f,p],lineStyle:h.lineStyle},{coord:[g,y]}]}))??null;return t.push({symbol:s,symbolSize:25,animation:!1,coord:[i.time+"",l],symbolRotate:0,symbolOffset:[0,"-7"],markLineTarget:u}),t},[]),Jat=(n,e)=>n.reduce((t,i,r)=>{var h;const o=v_(i,"openClose"),s=o==="开多"||o==="开空"?"top":"bottom",a=e.find(f=>f[0]===i.time)??[],l=s==="top"?a[2]:a[3];let u=7;u+=n.slice(0,r).filter(f=>{const p=v_(f,"openClose");return(p==="开多"||p==="开空"?"top":"bottom")===s&&f.time===i.time}).length*7;const d=((h=i==null?void 0:i.markLineTarget)==null?void 0:h.map(f=>{const p=i.time,g=l+"",m=f.time,y=e.find(_=>_[0]===f.time)[3];return[{coord:[p,g],lineStyle:f.lineStyle},{coord:[m,y]}]}))??null;return t.push({symbol:"triangle",symbolSize:[10,12],animation:!1,coord:[i.time+"",l],symbolRotate:s==="top"?180:0,symbolOffset:[0,`${s==="top"?u*-1:u}`],itemStyle:{color:s==="top"?"#FF0000":"#389e0d"},label:{show:!0,position:s,color:"#fff",formatter:`${o} ${s==="top"?"+":"-"} ${i.amount}手 ${i.part?`(${i.part}份)`:""}`},markLineTarget:d}),t},[]),elt=(n,e)=>n.reduce((t,i)=>{const{key:r,data:o}=i;if(o===null||o.length===0)return t;const a=new Map([["sellBuy",()=>Xat(o,e)],["openClose",()=>Jat(o,e)],["signal",()=>{}]]).get(r);return a instanceof Function&&t.push(...a()),t},[]),sk=async(n,e,t,i,r,o)=>{const{totalBarCount:s,defaultShowBarCount:a,maxValueSpan:l,gridLeft:u,gridTop:d,gridRight:h,gridBottom:f,zoomLock:p}=i,{time:g,kLine:m,originData:y,indicator:_}=await Kat(n,t,s),C=_.map(w=>{const{key:x,data:S,color:D}=w;return{name:x,type:"line",silent:!0,symbol:"none",data:S,lineStyle:{width:1},itemStyle:{color:D}}}),b=elt(e,y);let v=[];return b.forEach(w=>{w.markLineTarget&&(v=[...v,...w.markLineTarget])}),{animation:!1,dataset:{id:"data",source:{klineData:m,indicatorData:_}},grid:{left:`${u}px`,top:`${d}px`,right:`${h}px`,bottom:`${f}px`},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{formatter:w=>{const{axisDimension:x,value:S}=w;return x==="x"?S:String(Aa(S))}}},formatter:w=>{let x=null,S="";return w.forEach(D=>{D.seriesName==="资产持仓净值"&&D.data!==null&&(S+=`<div>资产持仓净值: ${D.data}</div>`),D.componentSubType==="candlestick"&&e.forEach(N=>{const{key:k,data:E}=N;if(k==="sellBuy"){const L=E.filter(R=>R.time===D.axisValue);let A=0,F=0;L.forEach(R=>{R.tradeType==="开多"||R.tradeType==="平空"?A+=R.amount:F+=R.amount}),A&&(S+=`<div>买: ${A}</div>`),F&&(S+=`<div>卖: ${F}</div>`)}k==="openClose"&&E.forEach(L=>{L.time===D.axisValue&&(S+=L.tooltip)})}),S&&(x=`<div><span style="font-weight: bold;">${D.axisValue}</span>${S}</div>`)}),x}},xAxis:{type:"category",data:g,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},axisLabel:{show:!0,formatter:w=>w}},yAxis:[{index:0,splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:w=>{const{min:x,max:S}=w,D=Math.abs((S-x)/10);return x-D},max:w=>{const{min:x,max:S}=w,D=Math.abs((S-x)/10);return S+D},axisLine:{show:!0},axisLabel:{formatter:w=>Aa(w),showMaxLabel:!1}},{show:!1,min:"dataMin"}],dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:p,maxValueSpan:l,start:m.length>=a?(m.length-a)/m.length*100:0,end:99.99}],series:[{name:"k线",type:"candlestick",data:m,markPoint:{data:b},markLine:{position:"middle",textStyle:{color:"blue",fontSize:15},animation:!1,data:v,lineStyle:{width:3,type:"solid"},symbol:["none","none"]},itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1},z:1},...C,{name:"资产持仓净值",type:"line",data:r??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#666"}},{name:"二腿相关度",type:"line",data:o??[],symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:"#FFF"},lineStyle:{width:2},label:{show:!0,position:"top",formatter:w=>`相关度: ${w.data[1]}`,textStyle:{color:"#FFF",fontSize:14}}}],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:1},brushStyle:{color:"rgba(120,140,180,0)",borderColor:"rgba(255,255,255,0.4)"}}}},tlt=(n,e,t)=>{var h;const{gridLeft:i,gridRight:r,gridBottom:o,warningConfig:s,positionConfig:a,conditionConfig:l,isOpenDS:u}=e;let d=[];if((h=t==null?void 0:t.getModel())!=null&&h.getComponent){const[f,p]=t.getModel().getComponent("yAxis").axis.scale._extent;let g=[],m={},y=[],_={},C=[],b={};if(n.forEach(({key:v,data:w,...x})=>{v==="warning"?(g=w,m=x):v==="position"?(y=w,_=x):v==="condition"&&(C=w,b=x)}),g.length>0&&(d=g.reduce((v,w)=>{const{value:x,text:S,info:D,config:N}=w;if(x>p||x<f)return v;const k={y:t.convertToPixel({yAxisIndex:0},x),text:S,info:{info:D,config:{...s,...N},event:{...m}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Yat(k)]},d)),y.length>0&&(d=y.reduce((v,w)=>{const{value:x,text:S,info:D,config:N}=w;if(x>p||x<f)return v;const k={y:t.convertToPixel({yAxisIndex:0},x),text:S,info:{info:D,config:{...a,...N},event:{..._}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Qat(k)]},d)),C.length>0&&(d=C.reduce((v,w)=>{const{value:x,text:S,profitValue:D,profitText:N,lossValue:k,lossText:E,info:L,config:A}=w;if(x>p||x<f)return v;const F={y:t.convertToPixel({yAxisIndex:0},x),text:S,profitY:t.convertToPixel({yAxisIndex:0},D),profitText:N,lossY:t.convertToPixel({yAxisIndex:0},k),lossText:E,info:{info:L,config:{...l,...A},event:{...b}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Zat(F)]},d)),u){const v=t.getOption(),w=v.dataset[0].source.klineData.slice(v.dataZoom[0].startValue,v.dataZoom[0].endValue+1),x={};w.forEach(F=>{x[F[1]]?x[F[1]]+=1:x[F[1]]=1});const S=w[w.length-1][1],D=w.reduce((F,R)=>F+R[1],0)/w.length,N=S-D,k=ilt(w,1,50),E=rlt(w),L=E?N/E:0,A=nlt(w,1,S);d=[...d,{type:"group",draggable:!1,children:Object.keys(x).map(F=>({type:"line",shape:{x1:t.getWidth()-r-100*x[F],y1:t.convertToPixel({yAxisIndex:0},F),x2:t.getWidth()-r,y2:t.convertToPixel({yAxisIndex:0},F)},style:{stroke:"rgb(124,124,124)",lineWidth:1},z:10}))},{type:"text",x:i+6,y:t.getHeight()-o-20,style:{fill:"#FFF",text:`均值: ${Aa(D)}    距均值: ${Aa(N)}    中值: ${Aa(k)}    标准差: ${Aa(E)}    距均值/标准差: ${Aa(L)}    百分位: ${Aa(A)}%`,lineWidth:1,opacity:1},z:10}]}}return{elements:d}},nlt=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=Cl,l=n.map(d=>d[e]).sort((d,h)=>d-h);let u=0;for(let d=0;d<l.length;d++)if(l[d]===t){u=d;break}else if(l[d]>=t){u=r(d,a(o(l[d+1],l[d]),l[d]));break}return i(a(s(u,100),n.length+1))},ilt=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=Cl,l=n.map(f=>f[e]).sort((f,p)=>f-p),u=s(n.length+1,a(t,100)),d=Math.floor(u),h=o(u,d);return i(h===0?l[u]:r(l[d],s(o(l[d>=n.length-1?d:d+1],l[d]),h)))};function rlt(n){const e=n.map(s=>s[1]),t=e.length;let i=0,r=0;for(const s of e)i+=s;const o=i/t;for(const s of e)r+=Math.pow(s-o,2);return Math.sqrt(r/t)}const olt={class:"st-kline"},slt={class:"st-kline-header"},alt=300,llt=c.defineComponent({__name:"index",props:{indicator:{type:Object,default:()=>({})},klineData:{type:Array,default:()=>[]},markData:{type:Array,default:()=>[]},lineData:{type:Array,default:()=>[]},netPositionData:{type:Array,default:()=>[]},relevanceData:{type:Array,default:()=>[]},priceTrendData:{type:Array,default:()=>[]},priceTrendPercentData:{type:Array,default:()=>[]},brushRange:{type:Array,default:()=>[]},defaultMenuData:{type:Array,default:()=>[]},isSelect:{type:Boolean,default:()=>!1},config:{type:Object,default:()=>({})}},setup(n){const e=n,t={totalBarCount:2e3,defaultShowBarCount:200,preBarCount:800,maxValueSpan:1e4,gridLeft:60,gridTop:0,gridRight:60,gridBottom:30,warningConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff"},positionConfig:{draggable:!1,lineColor:"#e45d07",textColor:"#fff"},conditionConfig:{draggable:!1,lineColor:"#fff",textColor:"#fff",profitLineColor:"#b71e44",profitTextColor:"#fff",lossLineColor:"#749b66",lossTextColor:"#fff"},tipsConfig:{open:!0,heigh:!0,low:!0,close:!0,business:!0,riseAndFall:!0},dynamicLoadConfig:{historyVisible:!1,historyLoadCallBack:()=>{},futureVisible:!1,futureLoadCallBack:()=>{}},zoomLock:!1,isOpenDS:!1},i=c.computed(()=>({...t,...e.config})),r=c.ref(null),o=c.ref(-1),s=c.computed(()=>{var F,R;if(r.value&&((R=(F=r.value.dataset[0])==null?void 0:F.source)!=null&&R.klineData[o.value])){const I=r.value.dataset[0].source.klineData[o.value],M=[],{open:O,heigh:P,low:U,close:Y,business:j,riseAndFall:z}=i.value.tipsConfig;if(O&&M.push({label:"开",value:I[0],color:"rgb(153, 153, 153)"}),P&&M.push({label:"高",value:I[3],color:"rgb(153, 153, 153)"}),U&&M.push({label:"低",value:I[2],color:"rgb(153, 153, 153)"}),Y&&M.push({label:"收",value:I[1],color:"rgb(153, 153, 153)"}),j&&M.push({label:"额",value:Gat(I[4]),color:"rgb(153, 153, 153)"}),z){let re=((I[1]-I[5])/I[1]*100).toFixed(2),ce=+re==0?"white":+re>0?"red":"#00ff00";M.push({label:"涨跌",value:`${re}%`,color:ce})}return M}return[]}),a=c.computed(()=>{var F,R;return r.value&&((R=(F=r.value.dataset[0])==null?void 0:F.source)!=null&&R.indicatorData)?r.value.dataset[0].source.indicatorData.reduce((I,M)=>(M.data[o.value]&&I.push({label:M.key,value:Aa(M.data[o.value]),color:M.color}),I),[]):[]}),l=c.computed(()=>{const F=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"];if(e.priceTrendData.length>0){const R=[];return e.priceTrendData.forEach((I,M)=>{var P;(I.data[o.value]?Aa(I.data[o.value][1]):null)!==null&&R.push({label:I.name,value:Aa((P=I.data[o.value])==null?void 0:P[1]),color:F[M]})}),R}if(e.priceTrendPercentData.length>0){const R=[];return m.getOption().series.filter(M=>M.name.includes("二腿价格走势百分比图")).forEach((M,O)=>{var U;(M.data[o.value]?Aa(M.data[o.value][1]):null)!==null&&R.push({label:M.name.split("-")[1],value:`${Aa((U=M.data[o.value])==null?void 0:U[1])}%`,color:F[O]})}),R}return[]});c.watch(()=>[e.klineData,e.indicator,e.markData,e.netPositionData,e.relevanceData],()=>{u()},{deep:!0}),c.watch(()=>e.lineData,async()=>{a5("st-kline组件消息:props.lineData监控,额外画线数据发生改变,重绘->line",{color:"red"}),u("line")},{deep:!0}),c.watch(()=>e.brushRange,async()=>{a5("st-kline组件消息:props.brushRange监控,区域刷选数据发生改变,重绘->brush",{color:"red"}),u("brush")},{deep:!0}),c.watch(()=>e.priceTrendData,async()=>{u("priceTrend")},{deep:!0}),c.watch(()=>e.priceTrendPercentData,async()=>{u("priceTrendPercent")},{deep:!0});const u=async F=>{const I=new Map([["kline",async()=>{const M=await sk(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData),{graphic:O}=m.getOption()??{graphic:[]};r.value={...M,graphic:O},m.setOption(r.value,!0),a5("st-kline组件消息:K线绘制完毕-draw",{color:"green"})}],["line",()=>{const M=m.getOption(),O=tlt(e.lineData,i.value,m);r.value={...M,graphic:O},m.setOption(r.value,{replaceMerge:["graphic"]}),a5("st-kline组件消息:额外画线绘制完毕-draw",{color:"green"})}],["brush",()=>{const{brushRange:M}=e;M instanceof Array&&M.length>0&&(m.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[M[0]+"",M[1]+""],xAxisIndex:0}]}),a5("st-kline组件消息:区域刷选绘制完毕-draw",{color:"green"}))}],[void 0,async()=>{await u("kline"),await u("line"),await u("priceTrend"),await u("priceTrendPercent"),await u("brush")}],["history",async()=>{const M=m.getOption(),O=await sk(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData),P=O.dataset.source.klineData.length-M.dataset[0].source.klineData.length;m.setOption({...O,dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:i.value.zoomLock,maxValueSpan:i.value.maxValueSpan,startValue:M.dataZoom[0].startValue+P,endValue:M.dataZoom[0].endValue+P}]},!0),await u("priceTrend")}],["future",async()=>{const M=m.getOption(),O=await sk(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData);O.dataZoom[0].start=(e.klineData.length-M.dataZoom[0].endValue+M.dataZoom[0].startValue)/e.klineData.length*100,m.setOption(O,!0),await u("priceTrend")}],["priceTrend",()=>{if(e.priceTrendData.length===0)return;const M=m.getOption(),O=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],P=e.priceTrendData.reduce((U,Y,j)=>{const{name:z,data:re}=Y,ce={name:`二腿价格走势图-${z}`,type:"line",data:re,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[j]},lineStyle:{type:"dashed",width:1}};return U.push(ce),U},[]);r.value={...M,series:[...M.series,...P]},m.setOption(r.value,{replaceMerge:["series"]})}],["priceTrendPercent",async()=>{if(e.priceTrendPercentData.length===0)return;const M=m.getOption(),O=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],P=M.dataZoom[0].startValue,U=e.priceTrendPercentData.reduce((Y,j,z)=>{const{name:re,data:ce}=j,le=ce.length>i.value.totalBarCount?ce.slice(ce.length-i.value.totalBarCount):ce,ne=le[P][1],oe=le.map(pe=>[pe[0],(pe[1]-ne)/ne*100]),he={name:`二腿价格走势百分比图-${re}`,type:"line",data:oe,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[z]},lineStyle:{type:"dashed",width:1}};return Y.push(he),Y},[]);M.series=[...M.series.filter(Y=>!Y.name.includes("二腿价格走势百分比图")),...U],m.setOption(M,!0)}]]).get(F);I instanceof Function&&await I()},d=c.ref(!1),h=c.ref([]),f=F=>{const{callBack:R}=F;R instanceof Function&&R(m,d)},p=()=>{h.value=e.defaultMenuData},g=c.ref();let m,y;const _=(F,R)=>{var I,M;if(F)o.value=typeof((I=F==null?void 0:F.batch[0])==null?void 0:I.dataIndex)=="number"?(M=F==null?void 0:F.batch[0])==null?void 0:M.dataIndex:-1;else{const O=R.getOption();O.dataZoom instanceof Array&&(o.value=O.dataZoom[0].endValue)}};let C=null,b=!1,v=c.ref(!1),w=!1,x=c.ref(!1);const S=async F=>{const R=F.batch?F.batch[0].start*i.value.totalBarCount:F.startValue;i.value.dynamicLoadConfig.historyVisible&&R<=100&&!b&&!v.value&&(b=!0,await i.value.dynamicLoadConfig.historyLoadCallBack(v),await u("history"),b=!1);const I=F.batch?F.batch[0].end===100:F.endValue>=e.klineData.length-i.value.preBarCount-1,M=F.actionIsWheel;i.value.dynamicLoadConfig.futureVisible&&I&&!w&&!x.value&&!M&&(w=!0,await i.value.dynamicLoadConfig.futureLoadCallBack(x),await u("future"),w=!1),clearTimeout(C),C=setTimeout(()=>{u("line"),u("priceTrendPercent"),clearTimeout(C),C=null},alt)};let D=null;const N=F=>{D=setTimeout(()=>{var R;if(F.componentType==="graphic"){const{oncontextmenu:I}=((R=F.info)==null?void 0:R.event)??{};I instanceof Function&&I(F,F.info,h)}clearTimeout(D),D=null})},k=()=>{m.on("highlight",F=>{_(F,m)}),m.on("globalout",()=>{_(null,m)}),m.on("contextmenu",F=>{N(F)}),m.on("datazoom",F=>{S(F)})},E=()=>{m.off("highlight"),m.off("globalout"),m.off("contextmenu"),m.off("datazoom")},L=F=>{if(!m||!(F.ctrlKey||e.isSelect))return;const R=m.getOption();let{startValue:I,endValue:M,start:O,end:P}=R.dataZoom[0];const U=()=>{I!==0&&(I=I-1,M=M-1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,maxValueSpan:i.value.maxValueSpan}))},Y=()=>{if(i.value.dynamicLoadConfig.futureVisible&&!w&&!x.value)I=I+1,M=M+1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,maxValueSpan:i.value.maxValueSpan});else{if(M===R.xAxis[0].data.length-1)return;I=I+1,M=M+1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,maxValueSpan:i.value.maxValueSpan})}},j=()=>{if(M-I<5)return;const le=Math.floor((o.value-I)/2)+1,ne=Math.floor((M-o.value)/2)+1;I=I+le,M=M-ne,m.dispatchAction({type:"dataZoom",startValue:I,endValue:M,actionIsWheel:!0,maxValueSpan:i.value.maxValueSpan})},z=()=>{O=O-(P-O)/4,m.dispatchAction({type:"dataZoom",start:O,end:P,actionIsWheel:!0,maxValueSpan:i.value.maxValueSpan})},ce=new Map([["ArrowLeft",U],["ArrowRight",Y],["ArrowUp",j],["ArrowDown",z]]).get(F.code);ce instanceof Function&&ce()},A=async()=>{let F=!0;m=Kr.init(g.value),await u(),h.value=e.defaultMenuData,o.value=m.getOption().dataZoom[0].endValue??-1,k(),y=new ResizeObserver(()=>{if(F){F=null;return}m.resize(),u("line")}),y.observe(g.value),window.addEventListener("keydown",L)};return c.onMounted(()=>{A()}),c.onUnmounted(()=>{E(),window.removeEventListener("keydown",L),m.dispose(),y.disconnect(),y=null}),(F,R)=>{const I=dz,M=cz;return c.openBlock(),c.createElementBlock("div",olt,[c.createElementVNode("div",slt,[c.createVNode(JE,{data:s.value},null,8,["data"]),c.createVNode(JE,{data:a.value},null,8,["data"]),c.createVNode(JE,{data:l.value},null,8,["data"])]),c.createVNode(qtt,{class:"st-kline-body",onCloseContextMenuCallBack:p},{popover:c.withCtx(()=>[c.createVNode(M,{class:"menu"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(h.value,O=>(c.openBlock(),c.createBlock(I,{key:O.label,index:O.label,class:"menuItem",onClick:P=>f(O)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(O.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",{ref_key:"echartsRef",ref:g,class:c.normalizeClass(d.value?"st-kline-chart cursorPen":"st-kline-chart")},null,2)]),_:1})])}}}),fTt="",pTt="",ult=Jt(llt,[["__scopeId","data-v-57c04894"]]),clt={class:"kline-tips"},dlt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",clt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:"kline-tips-item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}}),gTt="",ak=Jt(dlt,[["__scopeId","data-v-dc7d381b"]]),mTt="",hlt={class:"klineSub"},flt={class:"klineSub-tips"},plt={key:0,class:"klineSub-tips-select"},glt=Jt({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const{round:i}=Cl;let r,o;const s=t,a=n,l=c.ref(),u=c.computed({get(){return a.modelValue},set(f){s("update:modelValue",f)}}),d=c.computed(()=>{var g;const{data:f,activeIndex:p}=a;return((g=f==null?void 0:f.subIndicator)==null?void 0:g.map(m=>({label:m.key,color:m.color,value:m.data[p]||"-"})))||[]});c.onMounted(()=>{r=Kr.init(l.value);let f=!0;o=new ResizeObserver(()=>{if(f){f=null;return}r.resize()}),o.observe(l.value)}),c.onUnmounted(()=>{r.dispose(),o.disconnect(),o=null});const h=(f,p)=>{const g=f[p],m=p===0?f[p]:f[p-1];return g[0]===g[1]?g[0]>=m[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:g[1]>g[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return e({connect:f=>{Kr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:_,rightYAxisRange:C}=a.data.subIndicator[0],b=a.data.subIndicator.map(v=>{if(v.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:v.data.map((w,x)=>v.seriesColor==="kline"?{value:w,itemStyle:h(a.data.data,x)}:v.seriesColor==="value"?{value:w,itemStyle:{color:w>=0?"#FF0000":"#00FFFF"}}:{value:w,itemStyle:{color:v.seriesColor}})};if(v.series==="line")return{xAxisIndex:0,yAxisIndex:v.yAxis==="right"?2:1,name:v.key,type:"line",silent:!0,symbol:"none",data:v.data,lineStyle:{width:1},itemStyle:{color:v.color}}});r.setOption({animation:!1,grid:{left:`${p.gridLeft}px`,top:"10px",right:`${p.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:g,endValue:m,maxValueSpan:y}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:v=>{const{axisDimension:w,value:x}=v;if(w==="x")return x;if(v.axisIndex===1)return String(i(x))}}},formatter:()=>""},xAxis:{type:"category",data:a.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:v=>v}},yAxis:[{position:"right"},{position:"left",min:_==="cover"?v=>v.min:null,max:_==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:C==="cover"?v=>v.min:null,max:C==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:b},!0)})}}),(f,p)=>{const g=ul,m=ll;return c.openBlock(),c.createElementBlock("div",hlt,[c.createElementVNode("div",flt,[d.value.length?(c.openBlock(),c.createElementBlock("div",plt,[c.createVNode(m,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=y=>u.value=y),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.subIndicatorList,y=>(c.openBlock(),c.createBlock(g,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),c.createVNode(ak,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-aba58678"]]),_Tt="",mlt={class:"kline-tips"},blt=Jt({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=Cl,i=n,r=c.computed(()=>{const{data:s,activeIndex:a}=i;if(s.data&&s.data[a]){const l=s.data[a],u=[{label:"开",value:l[0]},{label:"高",value:l[3]},{label:"低",value:l[2]},{label:"收",value:l[1]}];l[4]!==null&&u.push({label:"额",value:t(l[4])});let d;return l[6]>0?d="red":l[6]<0&&(d="green"),u.push({label:"涨跌",value:`${e(l[6])}%`,color:d}),u}return[]}),o=c.computed(()=>{var l;const{data:s,activeIndex:a}=i;return((l=s==null?void 0:s.mainIndicator)==null?void 0:l.map(u=>({label:u.key,value:e(u.data[a]),color:u.color})))||[]});return(s,a)=>(c.openBlock(),c.createElementBlock("div",mlt,[c.createVNode(ak,{data:r.value},null,8,["data"]),c.createVNode(ak,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-09ec31e8"]]),_lt={__name:"index",setup(n,{expose:e}){return e({handleKeyDown:(t,i)=>{let{startValue:r,endValue:o,maxIndex:s}=i;if(t.code==="ArrowLeft"){if(r===0)return;r=r-1,o=o-1}else if(t.code==="ArrowRight"){if(o===s)return;r=r+1,o=o+1}else if(t.code==="ArrowUp"){if(o-r<5)return;const a=Math.floor((o-r)/2)+1;r=r+a,o-r<5&&(r=o-4)}else if(t.code==="ArrowDown"){const a=Math.min(500,o-r);r=r-a-1}return{startValue:r,endValue:o}},mergeData:(t,i)=>({time:[...t.time,...i.time.slice(1)],data:[...t.data,...i.data.slice(1)],mainIndicator:t.mainIndicator.map((r,o)=>({...r,data:[...r.data,...i.mainIndicator[o].data.slice(1)]})),subIndicator:t.subIndicator.map((r,o)=>({...r,data:[...r.data,...i.subIndicator[o].data.slice(1)]}))}),getDataZoomInfoByTime:t=>{const{showStartTime:i,showEndTime:r,maxShowDays:o}=t;let s=-1,a=-1,l={};return t.time.forEach((u,d)=>{const h=u.split(" ")[0];l[h]=l[h]||0,l[h]+=1,s===-1&&new Date(u)>=new Date(i)&&(s=d),a===-1&&new Date(u)>=new Date(r)&&(a=d)}),a=a===-1?t.time.length-1:a,{startValue:s,endValue:a,maxValueSpan:Math.max(...Object.values(l))*o}}}),(t,i)=>null}},vTt="",ylt=Jt({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(n,{expose:e,emit:t}){let i,r,o=null;const s=t,a=n,l=c.ref();c.watch(()=>a.data,()=>{h()},{deep:!0}),c.onMounted(()=>{i=Kr.init(l.value),u(),h();let f=!0;r=new ResizeObserver(()=>{if(f){f=null;return}i.resize()}),r.observe(l.value)}),c.onUnmounted(()=>{i.off("datazoom"),i.dispose(),r.disconnect(),r=null});const u=()=>{i.on("datazoom",f=>{f.dataZoomId&&(clearTimeout(o),o=setTimeout(()=>{const{data:p}=a,{start:g,end:m}=f,y=Math.floor(g*p.length/100),_=m===100?p.length-1:Math.floor(m*p.length/100);d(y,_),clearTimeout(o)},100))})},d=(f,p)=>{const g=a.data;if(g.length===0)return;const m=g[f][0].split(" ")[0],y=g[p][0].split(" ")[0];s("change",{startTime:`${m} 00:00:00`,endTime:`${y} 24:00:00`})},h=()=>{const{data:f}=a;if(f.length===0)return;const p=f.map(m=>m[0].split(" ")[0]),g=f.map(m=>m[1]);i.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:p,show:!1},yAxis:{type:"value"},series:[{data:g,type:"line"}]},!0)};return e({resetSlide:(f,p,g)=>{let m=-1,y=-1;a.data.forEach((_,C)=>{m===-1&&_[0]===f?m=C:m===-1&&new Date(_[0])>new Date(f)&&(m=C-1),(y===-1&&_[0]===p||y===-1&&new Date(_[0])>new Date(p))&&(y=C)}),y=y===-1?a.data.length-1:y,i.setOption({dataZoom:[{show:!0,startValue:m,endValue:y,maxValueSpan:g,textStyle:{color:"#ccc"}},{type:"inside",startValue:m,endValue:y,maxValueSpan:g}]})},resize:()=>{i==null||i.resize()}}),(f,p)=>(c.openBlock(),c.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:l},null,512))}},[["__scopeId","data-v-7a2f3dd0"]]),vlt={install(n){n.component("st-kline",ult),n.component("st-kline-sub-new",glt),n.component("st-kline-tips-new",blt),n.component("st-kline-slide-new",ylt),n.component("st-kline-utils-new",_lt)}};let P2=null;const Clt=n=>{const e=pJ(n,{handleReq:t=>{bJ()&&(t.headers.token=mJ())},handleRes:t=>{const{data:i}=t;if(i.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:QE(),!0}});e.get,P2=e.post},wlt=n=>P2("/middleLayer/kline/getKlineBasic",{...n,userId:R1("id")}),xlt=n=>P2("/middleLayer/kline/getKline",n),Slt=async n=>P2("/alarm/deliversign/addAlarmPrice",{...n,userId:R1("id")}),Dlt=async n=>P2("/alarm/deliversign/findAlarmPriceByUserId",{...n,userId:R1("id")}),wne=async n=>P2("/alarm/deliversign/updateAlarmPrice",{...n,userId:R1("id")}),Nlt=async n=>P2("/alarm/deliversign/deleteAlarmPrice",{...n,userId:R1("id")}),{round:B2}=Cl,Elt=(n,e,t,i,r)=>{const{data:o,time:s}=n,{gridTop:a,gridRight:l,gridLeft:u,maxShowCounts:d,showSubChart:h}=e;return{animation:!1,grid:{top:`${a}px`,right:`${l}px`,bottom:h?"6px":"24px",left:`${u}px`},dataZoom:[{type:"inside",startValue:t,endValue:i,maxValueSpan:d}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:f=>{const{axisDimension:p,value:g}=f;return p==="x"?h?"":["6","7","8"].includes(r)?bt(g).format("YYYY-MM-DD"):g:String(B2(g))}}},formatter:()=>""},xAxis:{show:!h,type:"category",data:s,splitLine:{show:!1},axisLabel:{formatter:f=>["6","7","8"].includes(r)?bt(f).format("YYYY-MM-DD"):f}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:f=>B2(f.min),max:f=>B2(f.max)},series:[{type:"candlestick",data:o,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...n.mainIndicator.map(f=>({name:f.key,type:"line",silent:!0,symbol:"none",data:f.data,lineStyle:{width:f.width||1},itemStyle:{color:f.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},klt=(n,e,t,i,r)=>{const{variety:o,featureId:s,featureType:a}=t,{gridTop:l,gridLeft:u,gridRight:d}=i;return e.reduce((h,f)=>{const{warnPrice:p}=f,g=n==null?void 0:n.convertToPixel({yAxisIndex:0},p);if(g<=l||g>=(n==null?void 0:n.getHeight()))return h;let m=0;return[...h,{type:"group",name:"warningLine",info:f,draggable:"vertical",children:[{type:"line",info:f,shape:{x1:u,y1:g,x2:(n==null?void 0:n.getWidth())-d,y2:g},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:f,x:(n==null?void 0:n.getWidth())-d,y:g-5,style:{fill:"#FFF",text:p,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:y=>{m=y.offsetY},ondrag:y=>{var _;if(y.target&&y.target.childAt(1)){const C=n.convertFromPixel({yAxisIndex:0},g+(y.offsetY-m));(_=y.target.childAt(1))==null||_.animate("style",!1).when(1,{text:B2(C,3)}).start()}},ondragend:async y=>{const C=y.offsetY-m;if(C!==0){const b=n==null?void 0:n.convertFromPixel({yAxisIndex:0},C+g),v={id:f.id,warnPrice:B2(b,3),featureId:s,featureCode:o,featureType:a};await wne(v),Xt.success("画线预警修改成功"),r&&r()}}}]},[])};function xne(n){function e(i){if(typeof i=="number")return Number.isFinite(i)?i:null;if(typeof i=="string"){const r=i.trim();if(r==="")return null;const o=Number(r);return Number.isFinite(o)?o:null}return null}const t=e(n);if(t===null)return"-";try{if(t>=1||t<=-1)return B2(t);{const i=t.toPrecision(3);return B2(i,i.split(".")[1].length-1)}}catch{return"-"}}const Llt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){const e=n,t=c.ref(null),i=c.ref([]);return c.watch(()=>e.data,()=>{i.value.length===0&&c.nextTick(()=>{Array.from(t.value.children).forEach((r,o)=>{var s,a,l,u,d,h,f,p;((a=(s=e.data)==null?void 0:s[o])==null?void 0:a.label)==="涨跌"?i.value[o]="85px":((u=(l=e.data)==null?void 0:l[o])==null?void 0:u.label)==="至今涨幅"?i.value[o]="115px":((h=(d=e.data)==null?void 0:d[o])==null?void 0:h.label)==="额"?i.value[o]="85px":["开","高","低","收"].includes((p=(f=e.data)==null?void 0:f[o])==null?void 0:p.label)?i.value[o]=`${r.offsetWidth+22}px`:i.value[o]=`${r.offsetWidth+36}px`})})}),(r,o)=>(c.openBlock(),c.createElementBlock("div",{class:"kline-tips",ref_key:"tipsRef",ref:t},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(s,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"kline-tips-item",style:c.normalizeStyle({color:s.color,width:i.value[a]?i.value[a]:null})},c.toDisplayString(s.label)+" "+c.toDisplayString(s.value),5))),128))],512))}}),wTt="",Sne=Jt(Llt,[["__scopeId","data-v-8d99ad6e"]]),xTt="",Mlt={class:"kline-tips"},Tlt=Jt({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},variety:{type:[String,Number],default:()=>null}},setup(n){const{round:e,formatValue:t}=Cl,i=n,r=c.ref(null);c.watch(()=>i.activeIndex,()=>{r.value===null&&(r.value=i.data.data[i.activeIndex][1])}),c.watch(()=>i.data,()=>{r.value===null&&(r.value=i.data.data[i.activeIndex][1])}),c.watch(()=>i.variety,()=>{r.value=null});const o=c.computed(()=>{const{data:a,activeIndex:l}=i;if(a.data&&a.data[l]){const u=a.data[l],d=[{label:"开",value:u[0]},{label:"高",value:u[3]},{label:"低",value:u[2]},{label:"收",value:u[1]}];u[4]!==null&&d.push({label:"额",value:t(u[4])});let h;u[6]>0?h="red":u[6]<0&&(h="green"),d.push({label:"涨跌",value:`${e(u[6])}%`,color:h});const f=(r.value/u[1]-1)*100;let p;return f>0?p="red":f<0&&(p="green"),d.push({label:"至今涨幅",value:`${e(f)}%`,color:p}),d}return[]}),s=c.computed(()=>{var u;const{data:a,activeIndex:l}=i;return((u=a==null?void 0:a.mainIndicator)==null?void 0:u.map(d=>({label:d.key,value:xne(d.data[l]),color:d.color})))||[]});return(a,l)=>(c.openBlock(),c.createElementBlock("div",Mlt,[c.createVNode(Sne,{data:o.value},null,8,["data"]),c.createVNode(Sne,{data:s.value},null,8,["data"])]))}},[["__scopeId","data-v-5be4d504"]]),Alt={class:"kline-averageTips"},Ilt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Alt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:"kline-averageTips-item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}}),DTt="",Rlt=Jt(Ilt,[["__scopeId","data-v-2ce54548"]]),NTt="",Olt={class:"klineSub"},Flt={class:"klineSub-tips"},Plt={key:0,class:"klineSub-tips-select"},Blt=Jt({__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const{round:i}=Cl;let r,o;const s=t,a=n,l=c.ref(),u=c.computed({get(){return a.modelValue},set(f){s("update:modelValue",f)}}),d=c.computed(()=>{var g;const{data:f,activeIndex:p}=a;return((g=f==null?void 0:f.subIndicator)==null?void 0:g.map(m=>({label:m.key,color:m.color,value:xne(m.data[p])})))||[]});c.onMounted(()=>{r=Kr.init(l.value);let f=!0;o=new ResizeObserver(()=>{if(f){f=null;return}r.resize()}),o.observe(l.value)}),c.onUnmounted(()=>{r.dispose(),o.disconnect(),o=null});const h=(f,p)=>{const g=f[p],m=p===0?f[p]:f[p-1];return g[0]===g[1]?g[0]>=m[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:g[1]>g[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return e({connect:f=>{Kr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:_,rightYAxisRange:C}=a.data.subIndicator[0],b=a.data.subIndicator.map(v=>{if(v.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:v.data.map((w,x)=>v.seriesColor==="kline"?{value:w,itemStyle:h(a.data.data,x)}:v.seriesColor==="value"?{value:w,itemStyle:{color:w>=0?"#FF0000":"#00FFFF"}}:{value:w,itemStyle:{color:v.seriesColor}})};if(v.series==="line")return{xAxisIndex:0,yAxisIndex:v.yAxis==="right"?2:1,name:v.key,type:"line",silent:!0,symbol:"none",data:v.data,lineStyle:{width:1},itemStyle:{color:v.color}}});r.setOption({animation:!1,grid:{left:`${p.gridLeft}px`,top:"10px",right:`${p.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:g,endValue:m,maxValueSpan:y}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:v=>{const{axisDimension:w,value:x}=v;if(w==="x")return["6","7","8"].includes(a.cycle)?bt(x).format("YYYY-MM-DD"):x;if(v.axisIndex===1)return String(i(x))}}},formatter:()=>""},xAxis:{type:"category",data:a.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:v=>["6","7","8"].includes(a.cycle)?bt(v).format("YYYY-MM-DD"):v}},yAxis:[{position:"right"},{position:"left",min:_==="cover"?v=>v.min:null,max:_==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:C==="cover"?v=>v.min:null,max:C==="cover"?v=>v.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:b},!0)})}}),(f,p)=>{const g=ul,m=ll;return c.openBlock(),c.createElementBlock("div",Olt,[c.createElementVNode("div",Flt,[d.value.length?(c.openBlock(),c.createElementBlock("div",Plt,[c.createVNode(m,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=y=>u.value=y),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.subIndicatorList,y=>(c.openBlock(),c.createBlock(g,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),c.createVNode(Rlt,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-a6bfe8fe"]]),Vlt=c.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(n,{emit:e}){const t=e,i=c.ref(),r=c.ref(),o=c.ref({display:"none",top:"0px",left:"0px"}),s=()=>{o.value.display="none",t("closeContextMenuCallBack"),document.removeEventListener("click",s)},a=l=>{if(l.preventDefault(),o.value.display==="block"){const{offsetX:u,offsetY:d}=l,{offsetWidth:h,offsetHeight:f}=r.value;if(u<=h&&d<=f)return}i.value.click(),o.value={display:"block",top:`${l.offsetY}px`,left:`${l.offsetX}px`},c.nextTick(()=>{const u=i.value.getBoundingClientRect(),d=r.value.getBoundingClientRect();d.left+d.width>=u.right&&(o.value.left=`${l.offsetX-d.width}px`),d.top+d.height>=u.bottom&&(console.log("高度超出"),o.value.top=`${l.offsetY-d.height}px`)}),document.addEventListener("click",s)};return(l,u)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"contextmenuRef",ref:i,class:"contextmenu",onContextmenu:a,onMouseleave:s},[c.renderSlot(l.$slots,"default",{},void 0,!0),o.value.display!=="none"?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:r,class:"contextmenu-popover",style:c.normalizeStyle(o.value)},[c.renderSlot(l.$slots,"popover",{},void 0,!0)],4)):c.createCommentVNode("",!0)],544))}}),kTt="",zlt=Jt(Vlt,[["__scopeId","data-v-811db6b4"]]),LTt="",Dne=n=>(c.pushScopeId("data-v-e675b051"),n=n(),c.popScopeId(),n),Hlt={class:"klineBasic-tips"},jlt={key:0,class:"klineBasic-sub"},Wlt={key:1,class:"klineBasic-empty"},$lt={key:2,class:"klineBasic-error"},Ult=Dne(()=>c.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),qlt={style:{"text-align":"center"}},Klt=Dne(()=>c.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Glt={class:"dialog-footer"},Ylt=Jt({__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(n,{expose:e,emit:t}){const i=[{label:"画线预警",key:"drawWarningLine"}];let r=null,o=null,s,a,l=!1,u=!1;const d=t,h=n,f=c.ref(!1),p=c.ref(!1),g=c.ref(!1),m=c.ref(null),y=c.ref(null),_=c.ref("VOL"),C=c.ref(0),b=c.ref({}),v=c.ref([]),w=c.ref({}),x=c.ref(!1),S=c.ref(""),D=c.ref([...i]),N=c.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...h.config}));c.watch(()=>{var j,z;return[h.variety,h.cycle,h.mainIndicator,_.value,(j=h.indicatorStore)==null?void 0:j.filterIndicator,(z=h.indicatorStore)==null?void 0:z.customIndicator]},()=>{A()},{deep:!0}),c.onMounted(()=>{Clt(h.env),A(),window.addEventListener("keydown",E)}),c.onUnmounted(()=>{o==null||o.off("datazoom"),o==null||o.off("highlight"),o==null||o.off("globalout"),o==null||o.dispose(),r==null||r.dispose(),window.removeEventListener("keydown",E)});const k=()=>{o||(o=Kr.init(m.value),L(),N.value.showSubChart&&y.value.connect(o),r=gJ(m.value),r.listen(()=>{requestAnimationFrame(()=>{o.resize()})}))},E=({code:j,ctrlKey:z})=>{if(!(z||f.value))return;const{xAxis:re,dataZoom:ce}=o.getOption(),{data:le}=(re==null?void 0:re[0])??{data:[]};let{startValue:ne,endValue:oe}=(ce==null?void 0:ce[0])??{};if(le!=null&&le.length){switch(j){case"ArrowUp":{if(oe-ne<5)return;const he=Math.floor((oe-ne)/2)+1;ne=ne+he,oe-ne<5&&(ne=oe-4);break}case"ArrowDown":{const he=Math.min(500,oe-ne);ne=ne-he-1;break}case"ArrowLeft":{ne>0&&(ne-=1,oe-=1),C.value>0&&(C.value-=1);break}case"ArrowRight":{oe<le.length-1&&(ne+=1,oe+=1),f.value&&C.value<le.length-1&&(C.value+=1);break}}o.dispatchAction({type:"dataZoom",startValue:ne,endValue:oe}),o.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:f.value?C.value:null}),o.dispatchAction({type:"highlight",dataIndex:f.value?C.value:oe})}},L=()=>{o==null||o.on("datazoom",z=>{clearTimeout(a),a=setTimeout(()=>{var ce,le,ne,oe;const{loadCheckCounts:re}=N.value;if((le=(ce=o==null?void 0:o.getOption())==null?void 0:ce.dataZoom)!=null&&le[0]){const{startValue:he}=(oe=(ne=o==null?void 0:o.getOption())==null?void 0:ne.dataZoom)==null?void 0:oe[0];he<re&&l===!1&&u===!1&&(l=!0,F("history")),I()}clearTimeout(a)},100)}),o==null||o.on("highlight",z=>{var ce,le;let re=z.dataIndex||-1;z.batch&&(re=typeof((ce=z==null?void 0:z.batch[0])==null?void 0:ce.dataIndex)=="number"?(le=z==null?void 0:z.batch[0])==null?void 0:le.dataIndex:-1),clearTimeout(s),s=setTimeout(()=>{C.value=re,clearTimeout(s)},20)}),o==null||o.on("globalout",()=>{const z=setTimeout(()=>{var ce,le,ne;clearTimeout(z);const re=(ne=(le=(ce=o==null?void 0:o.getOption())==null?void 0:ce.dataZoom)==null?void 0:le[0])==null?void 0:ne.endValue;C.value=re},30)});let j=null;o==null||o.on("contextmenu",z=>{j=setTimeout(()=>{z.componentType==="graphic"&&(w.value=z.info,D.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(j),j=null})})},A=async()=>{var j,z,re,ce,le,ne;try{if(!h.variety||!h.cycle)return;const{variety:oe,featureId:he,cycle:pe,indicatorStore:de,mainIndicator:ve,right:Le,startTime:ie,endTime:W}=h,{defaultShowCounts:te,addCounts:Z,showWarningLine:X,getFactorData:ee}=N.value,K={variety:oe,featureId:he,cycle:pe,mainIndicatorList:de.getIndicatorParams(ve),subIndicator:_.value,right:Le,showWarningLine:X,getFactorData:ee};ie&&W?(K.startTime=ie,K.endTime=W):ie?(K.startTime=ie,K.limit=te+Z):W?(K.endTime=W,K.limit=te+Z):(K.endTime=bt().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),K.limit=te+Z);const Q=await wlt(K);if((re=(z=(j=Q==null?void 0:Q.body)==null?void 0:j.kline)==null?void 0:z.time)!=null&&re.length)p.value=!1,g.value=!1;else{p.value=!0,g.value=!1;return}b.value=(ce=Q==null?void 0:Q.body)==null?void 0:ce.kline,v.value=((le=Q==null?void 0:Q.body)==null?void 0:le.warningLine)||[],R(),I(),ee&&d("getFactorData",(ne=Q==null?void 0:Q.body)==null?void 0:ne.factor)}catch(oe){throw g.value=!0,p.value=!1,new Error(oe)}},F=async j=>{const{variety:z,cycle:re,indicatorStore:ce,mainIndicator:le,right:ne}=h,{addCounts:oe}=N.value,{time:he}=b.value;if(j==="history"){const pe=await xlt({variety:z,cycle:re,endTime:he[0],limit:oe,mainIndicatorList:ce.getIndicatorParams(le),subIndicator:_.value,right:ne});b.value={time:[...pe.body.time,...b.value.time.slice(1)],data:[...pe.body.data,...b.value.data.slice(1)],mainIndicator:b.value.mainIndicator.map((de,ve)=>{var Le;return{...de,data:[...((Le=pe.body.mainIndicator[ve])==null?void 0:Le.data)??[],...de.data.slice(1)]}}),subIndicator:b.value.subIndicator.map((de,ve)=>{var Le;return{...de,data:[...((Le=pe.body.subIndicator[ve])==null?void 0:Le.data)??[],...de.data.slice(1)]}})},R(!0),pe.body.data.length<oe&&(u=!0),l=!1}},R=(j=!1)=>{var ve,Le,ie;k();const{time:z}=b.value,{gridRight:re,gridLeft:ce,defaultShowCounts:le,maxShowCounts:ne,showSubChart:oe}=N.value;let he=z.length-1-le,pe=z.length-1;if(j){const W=o.getOption(),te=(Le=(ve=W==null?void 0:W.xAxis)==null?void 0:ve[0])==null?void 0:Le.data,Z=(ie=W==null?void 0:W.dataZoom)==null?void 0:ie[0],X=te[Z==null?void 0:Z.startValue],ee=te[Z==null?void 0:Z.endValue];he=z.findIndex(K=>K===X),pe=z.findIndex(K=>K===ee)}const de=Elt(b.value,N.value,he,pe,h.cycle);if(o.setOption(de,!0),C.value=pe,h.brushRange){let W=null,te=null;switch(h.cycle){case"6":{W=z.find(Z=>new Date(Z).getTime()>=new Date(h.brushRange[0]).getTime()||bt(Z).format("YYYY-MM-DD")===bt(h.brushRange[0]).format("YYYY-MM-DD")),te=z.findLast(Z=>new Date(Z).getTime()<=new Date(h.brushRange[1]).getTime()||bt(Z).format("YYYY-MM-DD")===bt(h.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{W=z.find(Z=>bt(Z).day(5).format("YYYY-MM-DD")===bt(h.brushRange[0]).day(5).format("YYYY-MM-DD")),te=z.findLast(Z=>bt(Z).day(5).format("YYYY-MM-DD")===bt(h.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{W=z.find(Z=>bt(Z).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[0]).endOf("month").format("YYYY-MM-DD")),te=z.findLast(Z=>bt(Z).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:W=z.find(Z=>new Date(Z).getTime()>=new Date(h.brushRange[0]).getTime()),te=z.findLast(Z=>new Date(Z).getTime()<=new Date(h.brushRange[1]).getTime())}console.log(W,te),o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[W,te],xAxisIndex:0}]})}oe&&y.value.draw({startValue:he,endValue:pe,maxValueSpan:ne},{gridLeft:ce,gridRight:re}),M()},I=()=>{if(!o)return;const j=o==null?void 0:o.getOption();j&&(o==null||o.setOption({...j,graphic:[...klt(o,v.value,h,N.value,()=>{O()})]},!0),M())},M=()=>{const{time:j}=b.value;if(h.brushRange&&(j!=null&&j.length)){let z=bt(h.brushRange[0]).format("YYYY-MM-DD 00:00:00"),re=bt(h.brushRange[1]).format("YYYY-MM-DD 23:59:59"),ce=null,le=null;switch(h.cycle){case"6":{ce=j.find(ne=>bt(ne).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD")),le=ce;break}case"7":{ce=j.find(ne=>bt(ne).day(5).format("YYYY-MM-DD")===bt(z).day(5).format("YYYY-MM-DD")),le=j.findLast(ne=>bt(ne).day(5).format("YYYY-MM-DD")===bt(re).day(5).format("YYYY-MM-DD"));break}case"8":{ce=j.find(ne=>bt(ne).endOf("month").format("YYYY-MM-DD")===bt(z).endOf("month").format("YYYY-MM-DD")),le=j.findLast(ne=>bt(ne).endOf("month").format("YYYY-MM-DD")===bt(re).endOf("month").format("YYYY-MM-DD"));break}default:ce=j.find(ne=>{const oe=bt(ne).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD"),he=new Date(ne).getTime()>=new Date(z).getTime();return oe&&he}),le=j.findLast(ne=>{const oe=bt(ne).format("YYYY-MM-DD")===bt(re).format("YYYY-MM-DD"),he=new Date(ne).getTime()<=new Date(re).getTime();return oe&&he})}o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[ce,le],xAxisIndex:0}]})}},O=async()=>{const j=await Dlt({featureId:h.featureId});v.value=(j==null?void 0:j.body)||[],I(),d("change","warningLine",v.value)},P=async j=>{const{variety:z,varietyName:re,featureId:ce,featureType:le}=h;if(j.key==="drawWarningLine"){const ne=o==null?void 0:o.getOption(),oe=ne.tooltip[0];o==null||o.setOption({...ne,tooltip:{...oe,axisPointer:{...oe.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...oe.axisPointer.label,backgroundColor:"transparent",formatter:pe=>""}}}});const he=async pe=>{o==null||o.getZr().off("mousedown",he);const de=o==null?void 0:o.convertFromPixel({yAxisIndex:0},pe.offsetY),ve=Math.round(de*1e3)/1e3;o==null||o.setOption({...ne,tooltip:{...oe,axisPointer:{...oe.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...oe.axisPointer.label,backgroundColor:null}}}}),await Slt({featureCode:z,featureName:re,featureId:ce,featureType:le,warnPrice:ve}),Xt.success("画线预警成功!"),O()};o==null||o.getZr().on("mousedown",he)}else j.key==="deleteWarningLine"?(await Nlt({id:w.value.id}),Xt.success("画线预警删除成功"),O()):j.key==="changeWarningLine"&&(x.value=!0,S.value=w.value.warnPrice)},U=async()=>{const{variety:j,varietyName:z,featureId:re,featureType:ce}=h;await wne({id:w.value.id,featureCode:j,featureName:z,featureId:re,featureType:ce,warnPrice:S.value}),Xt.success("画线预警修改成功"),O()},Y=()=>{D.value=[...i]};return e({draw:(j,z)=>{j==="warningLine"&&(v.value=z,I())}}),(j,z)=>{var pe;const re=dz,ce=cz,le=x3,ne=xr,oe=P6,he=Sa;return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:"klineBasic",onMousemove:z[1]||(z[1]=de=>f.value=!0),onMouseout:z[2]||(z[2]=de=>f.value=!1)},[c.createElementVNode("div",Hlt,[c.createVNode(Tlt,{variety:n.variety,data:b.value,activeIndex:C.value},null,8,["variety","data","activeIndex"])]),c.createElementVNode("div",{class:"klineBasic-main",style:c.normalizeStyle({height:N.value.showSubChart?"70%":"100%"})},[c.createVNode(zlt,{onCloseContextMenuCallBack:Y},{popover:c.withCtx(()=>[c.createVNode(ce,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(D.value,de=>(c.openBlock(),c.createBlock(re,{style:{height:"36px"},key:de.key,index:de.key,onClick:ve=>P(de)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(de.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:m,style:{height:"100%"}},null,512)]),_:1})],4),N.value.showSubChart?(c.openBlock(),c.createElementBlock("div",jlt,[c.createVNode(Blt,{ref_key:"klineSubRef",ref:y,modelValue:_.value,"onUpdate:modelValue":z[0]||(z[0]=de=>_.value=de),data:b.value,cycle:n.cycle,activeIndex:C.value,subIndicatorList:(pe=n.indicatorStore)==null?void 0:pe.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):c.createCommentVNode("",!0),p.value?(c.openBlock(),c.createElementBlock("div",Wlt,[c.createVNode(le,{class:"klineBasic-empty-content",description:"暂无数据"})])):c.createCommentVNode("",!0),g.value?(c.openBlock(),c.createElementBlock("div",$lt,[Ult,c.createElementVNode("div",qlt,[c.createVNode(ne,{onClick:A},{default:c.withCtx(()=>[c.createTextVNode("刷新")]),_:1})])])):c.createCommentVNode("",!0)],32),c.createVNode(he,{modelValue:x.value,"onUpdate:modelValue":z[5]||(z[5]=de=>x.value=de),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:c.withCtx(()=>[c.createElementVNode("span",Glt,[c.createVNode(ne,{onClick:z[4]||(z[4]=de=>x.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("取消")]),_:1}),c.createVNode(ne,{type:"primary",onClick:U},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[Klt,c.createVNode(oe,{modelValue:S.value,"onUpdate:modelValue":z[3]||(z[3]=de=>S.value=de),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},[["__scopeId","data-v-e675b051"]]),Qlt={install(n){n.component("st-klineBasic",Ylt)}},TTt="",ATt="",Zlt=[{label:"买卖",value:0},{label:"开平",value:1}],C_=()=>({mainIndicator:"MA",sellBuy:1,sellBuyByPrice:1,singelCycle:"6",multiCycleNum:6,multiCycleList:["1","2","3","4","5","6"],pageType:1,enable_tradeLogBrush:!0,enable_showScreenTimeRange:!0,enable_showScreenMaxPrice:!0,enable_dbClickOpenSingel:!0,enable_subChart:!0,enable_sliderChart:!0}),Xlt=(n,e)=>{var t;return((t=e.find(i=>i.value===n))==null?void 0:t.label)??"-"},ITt="",wl=n=>(c.pushScopeId("data-v-6e5050a9"),n=n(),c.popScopeId(),n),Jlt={class:"kline-config element-dark"},eut={class:"setting-item"},tut=wl(()=>c.createElementVNode("span",{class:"label"},"主图指标: ",-1)),nut={class:"setting-item"},iut=wl(()=>c.createElementVNode("span",{class:"label"},"交易点位: ",-1)),rut={class:"setting-item"},out=wl(()=>c.createElementVNode("span",{class:"label"},"开平点按价格标: ",-1)),sut={class:"setting-item"},aut=wl(()=>c.createElementVNode("span",{class:"label"},"单周期: ",-1)),lut={class:"setting-item"},uut=wl(()=>c.createElementVNode("span",{class:"label"},"多周期: ",-1)),cut={class:"mode"},dut={class:"cycleName"},hut={class:"content"},fut={class:"setting-item"},put=wl(()=>c.createElementVNode("span",{class:"label"},"默认展示: ",-1)),gut={class:"setting-item"},mut=wl(()=>c.createElementVNode("span",{class:"label"},"高亮交易范围: ",-1)),but={class:"setting-item"},_ut=wl(()=>c.createElementVNode("span",{class:"label"},"展示当屏时间: ",-1)),yut={class:"setting-item"},vut=wl(()=>c.createElementVNode("span",{class:"label"},"展示当屏最高价: ",-1)),Cut={class:"setting-item"},wut=wl(()=>c.createElementVNode("span",{class:"label"},"多周期双击图表切换至单周期: ",-1)),xut={class:"setting-item"},Sut=wl(()=>c.createElementVNode("span",{class:"label"},"开启副图: ",-1)),Dut={class:"setting-item"},Nut=wl(()=>c.createElementVNode("span",{class:"label"},"开启拖拽轴: ",-1)),Eut={class:"setting-footer"},kut=Jt({__name:"index",props:{indicatorStore:{type:Object,default:()=>({})},origin:{type:String,default:"server"},cycleOptions:{type:Array,default:()=>[]}},emits:"callBack",setup(n,{expose:e,emit:t}){const{request:i}=c.inject("stConfig"),r=t,o=n,s=c.ref(!1),a=c.reactive({}),l=c.ref([]),u=c.ref([]),d=()=>{Object.assign(a,C_())},h=async()=>{const g=JSON.stringify(a);o.origin==="server"?await i.post("/common/qt/updateUserConfig",{appId:1,json:g}):localStorage.setItem("userKlineConfig",g),r("callBack",g),s.value=!1},f=async()=>{if(o.origin==="server"){const{body:g}=await i.post("/common/qt/getUserConfig",{appId:1});Object.assign(a,C_(),g?JSON.parse(g):{})}else{const g=localStorage.getItem("userKlineConfig");Object.assign(a,C_(),g?JSON.parse(g):{})}},p=async()=>{if(o.origin==="server"){const{body:g}=await i.post("/common/qt/getDict",{dictIds:[1002]});l.value=g[1002].map(m=>({label:m.dictName,value:m.dictCode}))}else l.value=o.cycleOptions};return c.onMounted(()=>{p(),u.value=o.indicatorStore.mainIndicatorList??[]}),c.watch(()=>o.indicatorStore.mainIndicatorList,()=>{u.value=o.indicatorStore.mainIndicatorList??[]}),e({open:async()=>{await f(),s.value=!0},getDefaultUserKlineConfig:C_}),(g,m)=>{const y=T6,_=ul,C=ll,b=nc,v=AH,w=sye,x=a1,S=xr,D=E6e;return c.openBlock(),c.createElementBlock("div",Jlt,[c.createVNode(D,{modelValue:s.value,"onUpdate:modelValue":m[12]||(m[12]=N=>s.value=N),title:"K线自定义配置",size:320},{default:c.withCtx(()=>[c.createVNode(x,{class:"setting-main"},{default:c.withCtx(()=>[c.createVNode(y,{style:{"margin-top":"8px"}},{default:c.withCtx(()=>[c.createTextVNode("偏好设置")]),_:1}),c.createElementVNode("div",eut,[tut,c.createVNode(C,{modelValue:a.mainIndicator,"onUpdate:modelValue":m[0]||(m[0]=N=>a.mainIndicator=N),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,(N,k)=>(c.openBlock(),c.createBlock(_,{key:k,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",nut,[iut,c.createVNode(C,{modelValue:a.sellBuy,"onUpdate:modelValue":m[1]||(m[1]=N=>a.sellBuy=N),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(Zlt),(N,k)=>(c.openBlock(),c.createBlock(_,{key:k,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",rut,[out,c.createVNode(b,{modelValue:a.sellBuyByPrice,"onUpdate:modelValue":m[2]||(m[2]=N=>a.sellBuyByPrice=N),"true-value":1,"false-value":0},null,8,["modelValue"])]),c.createElementVNode("div",sut,[aut,c.createVNode(C,{modelValue:a.singelCycle,"onUpdate:modelValue":m[3]||(m[3]=N=>a.singelCycle=N),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(N,k)=>(c.openBlock(),c.createBlock(_,{key:k,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",lut,[uut,c.createVNode(v,{size:"small",modelValue:a.multiCycleNum,"onUpdate:modelValue":m[4]||(m[4]=N=>a.multiCycleNum=N),options:[{label:"二图",value:2},{label:"四图",value:4},{label:"六图",value:6}],style:{height:"26px"}},null,8,["modelValue"])]),c.createElementVNode("div",{class:c.normalizeClass(`setting-multi-box grid-${a.multiCycleNum}`)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.multiCycleList.slice(0,a.multiCycleNum),(N,k)=>(c.openBlock(),c.createElementBlock("div",cut,[c.createElementVNode("div",dut,[c.createElementVNode("span",null,c.toDisplayString(c.unref(Xlt)(a.multiCycleList[k],l.value)),1),c.createVNode(C,{modelValue:a.multiCycleList[k],"onUpdate:modelValue":E=>a.multiCycleList[k]=E,"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(E,L)=>(c.openBlock(),c.createBlock(_,{key:L,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),c.createElementVNode("span",hut,c.toDisplayString(k+1)+"号位K线",1)]))),256))],2),c.createElementVNode("div",fut,[put,c.createVNode(v,{size:"small",modelValue:a.pageType,"onUpdate:modelValue":m[5]||(m[5]=N=>a.pageType=N),options:[{label:"单周期",value:1},{label:"多周期",value:2}],style:{height:"26px"}},null,8,["modelValue"])]),c.createVNode(y,{style:{"margin-top":"44px"}},{default:c.withCtx(()=>[c.createTextVNode("功能配置")]),_:1}),c.createElementVNode("div",gut,[mut,c.createVNode(w,{modelValue:a.enable_tradeLogBrush,"onUpdate:modelValue":m[6]||(m[6]=N=>a.enable_tradeLogBrush=N)},null,8,["modelValue"])]),c.createElementVNode("div",but,[_ut,c.createVNode(w,{modelValue:a.enable_showScreenTimeRange,"onUpdate:modelValue":m[7]||(m[7]=N=>a.enable_showScreenTimeRange=N)},null,8,["modelValue"])]),c.createElementVNode("div",yut,[vut,c.createVNode(w,{modelValue:a.enable_showScreenMaxPrice,"onUpdate:modelValue":m[8]||(m[8]=N=>a.enable_showScreenMaxPrice=N)},null,8,["modelValue"])]),c.createElementVNode("div",Cut,[wut,c.createVNode(w,{modelValue:a.enable_dbClickOpenSingel,"onUpdate:modelValue":m[9]||(m[9]=N=>a.enable_dbClickOpenSingel=N)},null,8,["modelValue"])]),c.createVNode(y,{style:{"margin-top":"44px"}},{default:c.withCtx(()=>[c.createTextVNode("组件开关")]),_:1}),c.createElementVNode("div",xut,[Sut,c.createVNode(w,{modelValue:a.enable_subChart,"onUpdate:modelValue":m[10]||(m[10]=N=>a.enable_subChart=N)},null,8,["modelValue"])]),c.createElementVNode("div",Dut,[Nut,c.createVNode(w,{modelValue:a.enable_sliderChart,"onUpdate:modelValue":m[11]||(m[11]=N=>a.enable_sliderChart=N)},null,8,["modelValue"])])]),_:1}),c.createElementVNode("div",Eut,[c.createVNode(S,{onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 恢复默认 ")]),_:1}),c.createVNode(S,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode(" 保存配置 ")]),_:1})])]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-6e5050a9"]]),Lut={install(n){n.component("st-klineConfig",kut)}},Mut=c.defineComponent({__name:"index",setup(n,{expose:e}){let t=!1,i=!0,r=[];const o=(s,a)=>s.length>a?s.slice(s.length-a):s;return e({initTalib:async()=>{if(!t)t=!0,await nk("./talib.wasm"),i=!1,r.forEach(s=>{s()});else if(i)return new Promise(s=>{r.push(s)})},handleKeyDown:(s,a)=>{let{startValue:l,endValue:u,maxIndex:d}=a;if(s.code==="ArrowLeft"){if(l===0)return;l=l-1,u=u-1}else if(s.code==="ArrowRight"){if(u===d)return;l=l+1,u=u+1}else if(s.code==="ArrowUp"){if(u-l<5)return;const h=Math.floor((u-l)/2)+1;l=l+h,u-l<5&&(l=u-4)}else if(s.code==="ArrowDown"){const h=Math.min(500,u-l);l=l-h-1}return{startValue:l,endValue:u}},getDataZoomInfoByTime:s=>{const{showStartTime:a,showEndTime:l,xAxisData:u,maxShowDays:d}=s;let h=-1,f=-1,p={};return u.forEach((g,m)=>{const y=g.split(" ")[0];p[y]=p[y]||0,p[y]+=1,new Date(g)>=new Date(a)&&h===-1&&(h=m),new Date(g)<=new Date(l)&&(f=m)}),{startValue:h,endValue:f,maxValueSpan:Math.max(...Object.values(p))*d}},formatDataBySlide:s=>{const{originDrawData:a,addData:l,startTime:u,endTime:d}=s,{mainIndicator:h,mainIndicatorList:f,subIndicator:p,subIndicatorList:g,config:m,timeRange:y}=s,{loadAddCount:_,preLoadCount:C}=m;let b=[],v=[],w=[],x=[];u&&d?(b=l.filter(L=>new Date(L[0])>=new Date(u)&&new Date(L[0])<=new Date(d)),x=[...l]):d?(b=[...l.filter((L,A)=>A>=l.length-_&&new Date(y[0])<=new Date(L[0])&&new Date(L[0])<=new Date(y[1])),...a.originData],x=[...l,...a.originData]):u&&(b=[...a.originData,...l.filter((L,A)=>A>=C&&new Date(y[0])<=new Date(L[0])&&new Date(L[0])<=new Date(y[1]))],x=b),b.forEach((L,A)=>{v.push([L[1],L[4],L[3],L[2],A===0?0:b[A-1][4],L[6]]),w.push(L[0])});let S=[],D=[];const N={time:[],open:[],close:[],high:[],low:[],originData:x};let k=null,E=null;return x.forEach((L,A)=>{N.time.push(L[0]),N.open.push(L[1]),N.close.push(L[4]),N.high.push(L[2]),N.low.push(L[3]),L[0]===b[0][0]&&(k=A),L[0]===b[b.length-1][0]&&(E=A+1)}),S=f.find(({value:L})=>L===h).config.map(L=>{const{calculationFn:A}=L;return{...L,data:A?A(s5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}).slice(k,E):[]}}),D=g.find(({value:L})=>L===p).config.reduce((L,A)=>{const{source:F,calculationFn:R}=A;return F==="calculation"?[...L,{...A,data:R?R(s5,N).slice(k,E):[]}]:L},[]),{originData:b,candlestickData:v,mainIndicatorData:S,subIndicatorData:D,xAxisData:w,startTime:b[0][0],endTime:b[b.length-1][0],length:b.length}},formatDataByCount:s=>{const{originDrawData:a,addData:l,mainIndicator:u,mainIndicatorList:d,subIndicator:h,subIndicatorList:f,config:p}=s;let g={};const{addCount:m,preLoadCount:y}=p,_=[],C=[],b=[],v=[],w=[];let x=[],S=[];const D=l.filter((A,F)=>(_.push(A[0]),C.push(A[1]),b.push(A[4]),v.push(A[2]),w.push(A[3]),x.push(A[0]),S.push([A[1],A[4],A[3],A[2],F===0?0:l[F-1][4],A[6]]),l.length>=m+y-1?F>=y:!0));x=o(x,D.length),S=o(S,D.length);const N={time:_,open:C,close:b,high:v,low:w,originData:l},E=d.find(A=>A.value===u).config.map(A=>({...A,data:o(A.calculationFn?A.calculationFn(s5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],x.length)}));let L=[];return h&&f&&(L=f.find(F=>F.value===h).config.reduce((F,R)=>R.source==="calculation"?[...F,{...R,data:o(R.calculationFn?R.calculationFn(s5,N):[],x.length)}]:F,[])),a.length?g={originData:[...D,...a.originData],xAxisData:[...x,...a.xAxisData],candlestickData:[...S,...a.candlestickData],mainIndicatorData:a.mainIndicatorData.map((A,F)=>({...A,data:[...E[F].data,...A.data]})),subIndicatorData:a.subIndicatorData.map((A,F)=>({...A,data:[...L[F].data,...A.data]}))}:g={originData:D,xAxisData:x,candlestickData:S,mainIndicatorData:E,subIndicatorData:L},g.length=g.xAxisData.length,g.startTime=g.xAxisData[0],g.endTime=g.xAxisData[g.length-1],g},fn:()=>{}}),(s,a)=>null}}),Tut={class:"kline-tips"},Aut=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Tut,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:"kline-tips-item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}}),OTt="",lk=Jt(Aut,[["__scopeId","data-v-2a02e841"]]),Iut={class:"kline-tips"},Rut=c.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},candlestickData:{type:Array,default:()=>null},mainIndicatorData:{type:Array,default:()=>null},activeIndex:{type:Number,require:!0}},setup(n){const{round:e,multiply:t,divide:i,subtract:r,formatValue:o}=Cl,s=n,a=c.computed(()=>{const{drawData:u,activeIndex:d,candlestickData:h}=s;if(h!=null&&h.length&&h[d]){let f;return h[d][6]>0?f="red":h[d][6]<0&&(f="green"),[{label:"开",value:h[d][0]},{label:"高",value:h[d][3]},{label:"低",value:h[d][2]},{label:"收",value:h[d][1]},{label:"额",value:o(h[d][4])},{label:"涨跌",value:`${e(h[d][6])}%`,color:f}]}else if(u.candlestickData&&u.candlestickData[d]){const f=u.candlestickData[d],p=[{label:"开",value:f[0]},{label:"高",value:f[3]},{label:"低",value:f[2]},{label:"收",value:f[1]}];f[5]!==void 0&&p.push({label:"额",value:o(f[5])});const g=e(t(i(r(f[1],f[4]),Math.abs(f[4])),100));let m;return g>0?m="red":g<0&&(m="green"),p.push({label:"涨跌",value:`${g}%`,color:m}),p}return[]}),l=c.computed(()=>{var h;const{drawData:u,activeIndex:d}=s;return((h=u==null?void 0:u.mainIndicatorData)==null?void 0:h.map(f=>({label:f.key,value:e(f.data[d]),color:f.color})))||[]});return(u,d)=>(c.openBlock(),c.createElementBlock("div",Iut,[c.createVNode(lk,{data:a.value},null,8,["data"]),c.createVNode(lk,{data:l.value},null,8,["data"])]))}}),FTt="",Out=Jt(Rut,[["__scopeId","data-v-e75a1234"]]),Fut={class:"klineSub"},Put={class:"klineSub-tips"},But={key:0,class:"klineSub-tips-select"},Vut=c.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},activeIndex:{type:Number,require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0},config:{type:Object,require:!0}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const{round:i}=Cl;let r,o;const s=t,a=n,l=c.ref(),u=c.computed({get(){return a.modelValue},set(f){s("update:modelValue",f)}}),d=c.computed(()=>{const{drawData:f,activeIndex:p}=a,g=a.subIndicatorList.find(m=>m.value===u.value);return f.originData&&f.originData[p]?g.config.map(m=>{var _,C;let y="-";return m.source==="origin"?y=f.originData[p][m.dataIndex]||"-":m.source==="calculation"&&(y=(((C=(_=f.subIndicatorData)==null?void 0:_.find(v=>v.key===m.key))==null?void 0:C.data)||[])[p]),{label:m.key,color:m.color,value:y==="-"?y:i(y)}}):[]});c.onMounted(()=>{r=Kr.init(l.value);let f=!0;o=new ResizeObserver(()=>{if(f){f=null;return}r.resize()}),o.observe(l.value)}),c.onUnmounted(()=>{r.dispose(),o.disconnect(),o=null});const h=(f,p)=>{const g=f[p],m=p===0?f[p]:f[p-1];return g[0]===g[1]?g[0]>=m[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:g[1]>g[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return e({connect:f=>{Kr.connect([f,r])},draw:f=>{c.nextTick(()=>{var x;const{startValue:p,endValue:g,maxValueSpan:m}=f,{xAxisData:y,subIndicatorData:_,candlestickData:C,originData:b}=a.drawData,v=a.subIndicatorList.find(S=>S.value===u.value),w=[];if(v.series==="bar"){let S=[];v.source==="origin"?S=b.map(D=>D[v.dataIndex]):S=((x=_==null?void 0:_.find(D=>D.key===v.dataIndex))==null?void 0:x.data)||[],w.push({name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:S.map((D,N)=>v.color==="kline"?{value:D,itemStyle:h(C,N)}:v.color==="value"?{value:D,itemStyle:{color:D>=0?"#FF0000":"#00FFFF"}}:{value:D,itemStyle:{color:v.color}})})}_.forEach(S=>{if(S.series==="line"){let D=[];S.source==="origin"?D=b.map(N=>N[S.dataIndex]):S.source==="calculation"&&(D=S.data),w.push({xAxisIndex:0,yAxisIndex:S.yAxis==="right"?2:1,name:S.key,type:"line",silent:!0,symbol:"none",data:D,lineStyle:{width:1},itemStyle:{color:S.color}})}}),r.setOption({animation:!1,grid:{left:`${a.config.gridLeft}px`,top:"10px",right:`${a.config.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:p,endValue:g,maxValueSpan:m}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:S=>{const{axisDimension:D,value:N}=S;if(D==="x")return N;if(S.axisIndex===1)return String(i(N))}}},formatter:()=>""},xAxis:{type:"category",data:y,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:S=>S}},yAxis:[{position:"right"},{position:"left",min:v.leftYAxisRange==="cover"?S=>S.min:null,max:v.leftYAxisRange==="cover"?S=>S.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:v.rightYAxisRange==="cover"?S=>S.min:null,max:v.rightYAxisRange==="cover"?S=>S.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:w},!0)})}}),(f,p)=>{const g=ul,m=ll;return c.openBlock(),c.createElementBlock("div",Fut,[c.createElementVNode("div",Put,[d.value.length?(c.openBlock(),c.createElementBlock("div",But,[c.createVNode(m,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=y=>u.value=y),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.subIndicatorList,y=>(c.openBlock(),c.createBlock(g,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),c.createVNode(lk,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}}),PTt="",zut=Jt(Vut,[["__scopeId","data-v-0a2f256e"]]),Hut=c.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(n,{expose:e,emit:t}){let i,r,o=null;const s=t,a=n,l=c.ref();c.watch(()=>a.data,()=>{h()},{deep:!0}),c.onMounted(()=>{i=Kr.init(l.value),u(),h();let f=!0;r=new ResizeObserver(()=>{if(f){f=null;return}i.resize()}),r.observe(l.value)}),c.onUnmounted(()=>{i.off("datazoom"),i.dispose(),r.disconnect(),r=null});const u=()=>{i.on("datazoom",f=>{f.dataZoomId&&(clearTimeout(o),o=setTimeout(()=>{const{data:p}=a,{start:g,end:m}=f,y=Math.floor(g*p.length/100),_=m===100?p.length-1:Math.floor(m*p.length/100);d(y,_),clearTimeout(o)},100))})},d=(f,p)=>{const g=a.data;if(g.length===0)return;const m=g[f][0].split(" ")[0],y=g[p][0].split(" ")[0];s("change",{startTime:`${m} 00:00:00`,endTime:`${y} 24:00:00`})},h=()=>{const{data:f}=a;if(f.length===0)return;const p=f.map(m=>m[0].split(" ")[0]),g=f.map(m=>m[1]);i.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:p,show:!1},yAxis:{type:"value"},series:[{data:g,type:"line"}]},!0)};return e({resetSlide:(f,p,g)=>{let m=-1,y=-1;a.data.forEach((_,C)=>{m===-1&&_[0]===f?m=C:m===-1&&new Date(_[0])>new Date(f)&&(m=C-1),(y===-1&&_[0]===p||y===-1&&new Date(_[0])>new Date(p))&&(y=C)}),y=y===-1?a.data.length-1:y,i.setOption({dataZoom:[{show:!0,startValue:m,endValue:y,maxValueSpan:g,textStyle:{color:"#ccc"}},{type:"inside",startValue:m,endValue:y,maxValueSpan:g}]})},resize:()=>{i==null||i.resize()}}),(f,p)=>(c.openBlock(),c.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:l},null,512))}}),BTt="",jut=Jt(Hut,[["__scopeId","data-v-5008746a"]]),Wut={install(n){n.component("st-klineUtils",Mut),n.component("st-klineSub",zut),n.component("st-klineTips",Out),n.component("st-klineSlide",jut)}},VTt="",$ut="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxO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AxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",{round:Kut}=Cl,V2={minValueSpan:5,maxValueSpan:2e3,loadCheckCount:500,loadAddCount:2e3},Gut={1:240,2:48,3:16,4:8,5:4,6:1,7:.2,8:.033},Nne=({startTime:n,endTime:e,cycle:t,type:i="end"})=>{const{maxValueSpan:r}=V2,o=Math.ceil((r+1e3)/Gut[t]),s=bt(n);if(bt(e).diff(s,"day")<=o)return[n,e];if(i==="end")return[bt(e).subtract(o,"day").format("YYYY-MM-DD HH:mm:ss"),e];if(i==="middle"){const u=bt((bt(n).valueOf()+bt(e).valueOf())/2).format("YYYY-MM-DD HH:mm:ss");return console.log("超过一屏数量上限, 进行中间时间计算",u,o/2),[bt(u).subtract(o/2,"day").format("YYYY-MM-DD HH:mm:ss"),bt(u).add(o/2,"day").format("YYYY-MM-DD HH:mm:ss")]}},Yut=(n,e)=>{const t=n[e],i=e===0?n[e]:n[e-1];return t[0]===t[1]?t[0]>=i[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:t[1]>t[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}},Qut=(n,e,t)=>{var r,o,s,a;const i=n.subIndicator.map(l=>{if(l.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:l.data.map((u,d)=>l.seriesColor==="kline"?{value:u,itemStyle:Yut(n.data,d)}:l.seriesColor==="value"?{value:u,itemStyle:{color:u>=0?"#FF0000":"#00FFFF"}}:{value:u,itemStyle:{color:l.seriesColor}})};if(l.series==="line")return{xAxisIndex:0,yAxisIndex:l.yAxis==="right"?2:1,name:l.key,type:"line",silent:!0,symbol:"none",data:l.data,lineStyle:{width:1},itemStyle:{color:l.color}}});return{animation:!1,grid:{top:"10px",left:"60px",right:"20px",bottom:"10px"},dataZoom:[{type:"inside",startValue:e,endValue:t,maxValueSpan:V2.maxValueSpan}],tooltip:{show:!1},axisPointer:{show:!0,triggerTooltip:!1,label:{rich:{},formatter:l=>{const{axisDimension:u,value:d}=l;if(u==="x")return null;if(l.axisIndex===1)return String(Kut(d))}}},xAxis:{type:"category",data:n.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:[{position:"right"},{position:"left",min:((r=n.subIndicator[0])==null?void 0:r.leftYAxisRange)==="cover"?l=>l.min:null,max:((o=n.subIndicator[0])==null?void 0:o.leftYAxisRange)==="cover"?l=>l.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:((s=n.subIndicator[0])==null?void 0:s.rightYAxisRange)==="cover"?l=>l.min:null,max:((a=n.subIndicator[0])==null?void 0:a.rightYAxisRange)==="cover"?l=>l.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:i}},uk=(n,e,t="strict")=>{let i=0,r=n.length-1,o=-1;for(;i<=r;){let s=Math.floor((i+r)/2);if(t==="strict"){if(n[s]===e)return s;n[s]<e?i=s+1:r=s-1}else t==="gte"&&(n[s]>=e?(o=s,r=s-1):i=s+1)}return t==="strict"?-1:o},Zut=n=>{const e=[];return n.reduce((t,i)=>{const r=`${i.coord[0]}+${i.label.position}`,o=i.label.position==="top"?-16:16,s=t.get(r);return s?(t.set(r,s+1),i.symbolOffset[1]=o*(s+1)):(t.set(r,1),i.symbolOffset[1]=i.label.position==="top"?-7:7),e.push(i),t},new Map),e},Ene=(n,e)=>({data:[...n.data,...e.data.slice(1)],mainIndicator:n.mainIndicator.map((t,i)=>({...t,data:[...t.data,...e.mainIndicator[i].data.slice(1)]})),subIndicator:n.subIndicator.map((t,i)=>({...t,data:[...t.data,...e.subIndicator[i].data.slice(1)]})),time:[...n.time,...e.time.slice(1)]}),ck=(n,e,t)=>{switch(t){case"5":{let h=[...new Set(n.slice(-20).map(b=>{const v=new Date(b),w=String(v.getHours()).padStart(2,"0"),x=String(v.getMinutes()).padStart(2,"0"),S=String(v.getSeconds()).padStart(2,"0");return`${w}:${x}:${S}`}))];h.includes("00:00:00")&&(h.splice(h.indexOf("00:00:00"),1),h.push("24:00:00")),h=h.sort((b,v)=>new Date(`2000-01-30 ${b}`).getTime()-new Date(`2000-01-30 ${v}`).getTime());const f=new Date(e),p=f.getFullYear(),g=String(f.getMonth()+1).padStart(2,"0"),m=String(f.getDate()).padStart(2,"0"),y=String(f.getHours()).padStart(2,"0"),_=String(f.getMinutes()).padStart(2,"0"),C=String(f.getSeconds()).padStart(2,"0");if(`${y}:${_}:${C}`=="00:00:00")return`${p}-${g}-${m} 01:00:00`;{let b=null;for(let v=0;v<h.length;v++){const w=h[v].split(":");if(+`${w[0]}${w[1]}${w[2]}`>=+`${y}${_}${C}`){b=h[v];break}}if(b==="24:00:00"){const v=new Date(e);v.setDate(v.getDate()+1);const w=v.getFullYear(),x=String(v.getMonth()+1).padStart(2,"0"),S=String(v.getDate()).padStart(2,"0");return`${w}-${x}-${S} 00:00:00`}return`${p}-${g}-${m} ${b}`}}case"6":{const h=new Date(e),f=h.getHours();if(f>=4&&f<21){const p=h.getFullYear(),g=String(h.getMonth()+1).padStart(2,"0"),m=String(h.getDate()).padStart(2,"0");return`${p}-${g}-${m} 09:00:00`}else{const p=new Date(e);p.getHours()>=21&&p.setDate(p.getDate()+1);const g=p.getFullYear(),m=String(p.getMonth()+1).padStart(2,"0"),y=String(p.getDate()).padStart(2,"0"),_=`${g}-${m}-${y} 09:00:00`,C=uk(n,_,"gte");return C===-1?_:n[C]}}case"7":{const h=new Date(e),f=new Date(h);f.setDate(h.getDate()-h.getDay()),f.setHours(0,0,0,0);const p=new Date(f);p.setDate(f.getDate()+5),p.setHours(23,59,59,0);const g=new Date(f);g.setDate(f.getDate()+12),g.setHours(9,0,0,0);const m=h<=p?p:g,y=m.getFullYear(),_=String(m.getMonth()+1).padStart(2,"0"),C=String(m.getDate()).padStart(2,"0");return`${y}-${_}-${C} 09:00:00`}case"8":{const h=new Date(e),f=new Date(h.getFullYear(),h.getMonth()+1,1),p=new Date(f);p.setDate(f.getDate()-1),p.setHours(9,0,0,0);const g=p.getFullYear(),m=String(p.getMonth()+1).padStart(2,"0"),y=String(p.getDate()).padStart(2,"0");return`${g}-${m}-${y} 09:00:00`}}const i=new Date(e),r=i.getFullYear(),o=i.getMonth(),s=i.getDate(),a=i.getHours(),l=i.getMinutes(),u=i.getSeconds(),d=h=>{let f=null;const p=Math.floor(l/h);l%h===0&&u===0?f=l:f=(p+1)*h;const g=Math.floor(f/60),m=a+g,y=f%60,_=new Date(r,o,s,m,y,0),C=D=>String(D).padStart(2,"0"),b=_.getFullYear(),v=C(_.getMonth()+1),w=C(_.getDate()),x=C(_.getHours()),S=C(_.getMinutes());return`${b}-${v}-${w} ${x}:${S}:00`};switch(t){case"1":return d(1);case"2":return d(5);case"3":return d(15);case"4":return d(30);default:throw new Error(`Unsupported cycle: ${e} ${t}`)}},dk=(n,e,t)=>{let i=null,r=null;const[o,s]=e;switch(t){case"6":{i=n.find(a=>new Date(bt(a).format("YYYY-MM-DD 23:59:59")).getTime()>=new Date(o).getTime()),r=n.findLast(a=>new Date(bt(a).format("YYYY-MM-DD 00:00:00")).getTime()<=new Date(s).getTime());break}case"7":{const a=bt(s).endOf("week").add(1,"day").format("YYYY-MM-DD 23:59:59");i=n.find(l=>bt(l).endOf("week").add(1,"day").format("YYYY-MM-DD")===bt(o).endOf("week").add(1,"day").format("YYYY-MM-DD")),r=n.findLast(l=>new Date(l).getTime()<=new Date(a).getTime());break}case"8":{i=n.find(a=>bt(a).format("YYYY-MM")===bt(o).format("YYYY-MM")),r=n.findLast(a=>bt(a).format("YYYY-MM")===bt(s).format("YYYY-MM"));break}default:i=n.find(a=>new Date(a).getTime()>=new Date(o).getTime()),r=n.findLast(a=>new Date(a).getTime()<=new Date(s).getTime())}return[i,r]},Xut=(n,e,t,i,r,o)=>{const s=(p,g)=>{const{direction:m="",tradeAction:y="",tradeType:_=""}=p,C=_??m+y;switch(g){case 0:return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(C);case 1:return _??m+y}},a=(p,g,m,y)=>p.reduce((_,C)=>{var N;const b=s(C,0),v=p.filter(k=>k.klineTime===C.klineTime),w=[...new Set(v.map(k=>s(k,0)))];let x=null;w.length>1?x="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzM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2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:x="image://"+new URL(Object.assign({"./images/buy.svg":$ut,"./images/sell.svg":Uut,"./images/t.svg":qut})[`./images/${b==="买"?"buy":"sell"}.svg`],self.location).href;const S=uk(m,C.klineTime),D=(N=y[S])==null?void 0:N[3];return g.forEach(k=>{var L;const E=b==="买"?0:1;k.range[E]===C.klineTime&&(k.rangeValue[E]=(L=y[S])==null?void 0:L[b==="买"?2:3])}),_.push({symbol:x,symbolSize:25,symbolRotate:0,symbolOffset:[0,0],label:{show:!1,position:"top"},coord:[C.klineTime,D],silent:!0,animation:!1,customData:{tradeType:b,amount:C.amount,part:C.part,profitAndLoss:C.profitAndLoss,openPriceAll:C.openPriceAll,closePriceAll:C.closePriceAll}}),_},[]),l=(p,g,m,y)=>{const{sellBuyByPrice:_}=o,C=p.reduce((b,v,w)=>{var N,k;const x=s(v,1),S=["开多","开空"].includes(x)?"top":"bottom";let D=null;if(_)D=S==="top"?(v.openPriceAll/v.amount).toFixed(2):(v.closePriceAll/v.amount).toFixed(2);else{const E=uk(m,v.klineTime);D=S==="top"?(N=y[E])==null?void 0:N[3]:(k=y[E])==null?void 0:k[2]}return g.forEach(E=>{(S==="top"?E.range[0]:E.range[1])===v.klineTime&&(E.rangeValue[S==="top"?0:1]=D)}),b.push({symbol:"triangle",symbolSize:[10,12],symbolRotate:S==="top"?180:0,symbolOffset:[0,0],label:{show:!0,position:S,color:"#fff",formatter:`${x} ${S==="top"?"+":"-"} ${v.amount}手 ${v.part?`(${v.part}份)`:""}`},itemStyle:{color:S==="top"?"#FF0000":"#389e0d"},coord:[v.klineTime,D],silent:!0,animation:!1,customData:{tradeType:x,amount:v.amount,part:v.part,profitAndLoss:v.profitAndLoss,openPriceAll:v.openPriceAll,closePriceAll:v.closePriceAll}}),b},[]);return _?C:Zut(C)},u=(p,g,m)=>{const{basePointData:y,baseLineData:_}=p.reduce((w,x)=>{const S={pointTime:x.openTime,tradeAction:"开",tradeDirection:x.tradeDirection?"空":"多",tradeType:`开${x.tradeDirection?"空":"多"}`,part:null,amount:x.tradeVolume,profitAndLoss:x.profitAndLoss,openPriceAll:x.openPrice*x.tradeVolume,closePriceAll:x.closePrice*x.tradeVolume,klineTime:ck(m,x.openTime,g)},D={pointTime:x.closeTime,tradeAction:"平",tradeDirection:x.tradeDirection?"空":"多",tradeType:`平${x.tradeDirection?"空":"多"}`,part:null,amount:x.tradeVolume,profitAndLoss:x.profitAndLoss,openPriceAll:x.openPrice*x.tradeVolume,closePriceAll:x.closePrice*x.tradeVolume,klineTime:ck(m,x.closeTime,g)},N={range:[S.klineTime,D.klineTime],rangeValue:[null,null],color:D.profitAndLoss>0?"#FF0000":"#389e0d"};return w.basePointData.push(S,D),w.baseLineData.push(N),w},{basePointData:[],baseLineData:[]}),b=[...y.reduce((w,x)=>{const S=JSON.parse(JSON.stringify(x)),D=S.klineTime+S.tradeType;if(w.has(D)){const N=w.get(D);S.amount+=N.amount,S.part+=N.part,S.profitAndLoss+=N.profitAndLoss,S.openPriceAll+=N.openPriceAll,S.closePriceAll+=N.closePriceAll}return w.set(D,S),w},new Map([])).values()].sort((w,x)=>new Date(w.klineTime)-new Date(x.klineTime)),v=_.filter(({range:w})=>w[0]!==w[1]);return{pointData:b,lineData:v}},{pointData:d,lineData:h}=u(n,e,i);return{tradePointData:(t===0?a:l)(d,h,i,r),tradeLineData:h.map(({range:p,rangeValue:g,color:m})=>[{symbol:"none",coord:[p[0],g[0]],lineStyle:{color:m,width:2,type:"solid"},silent:!0,animation:!1},{symbol:"none",coord:[p[1],g[1]],silent:!0,animation:!1}])}},Jut=(n,e)=>{let t=[];if(Number(e)<=5)t=n.map(({tradeDate:i,netPositionValue:r})=>[bt(i).format("YYYY-MM-DD HH:mm:ss"),r]);else if(Number(e)===6){const i=n.reduce((r,o)=>{const{tradeDate:s,netPositionValue:a}=o;return r.set(bt(s).format("YYYY-MM-DD 09:00:00"),a),r},new Map);t=Array.from(i,([r,o])=>[r,o])}else t=[];return{netPositionLineData:t}},ect=(n,e,t,i)=>{let r=[];if(["6","7","8"].includes(e)){const o=n.reduce((s,a)=>{const l=ck(i,a.date,e),u=a[t===0?"simple":"compound"];return s.set(l,u),s},new Map);r=Array.from(o,([s,a])=>[s,a])}else r=[];return{tradeIncomeRateLineData:r}},zTt="",tct={class:"tips"},hk=Jt({__name:"Tips",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",tct,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.data,(i,r)=>(c.openBlock(),c.createElementBlock("span",{key:r,class:"item",style:c.normalizeStyle({color:i.color})},c.toDisplayString(i.label)+" "+c.toDisplayString(i.value),5))),128))]))}},[["__scopeId","data-v-df1caefe"]]),jTt="",nct=Jt({__name:"SliderChart",props:{screenTimeRange:{type:Array,required:!0},varietyCode:{type:String,required:!0},varietyStock:{type:Number,required:!0},rightType:{type:[Number,null],default:null},klineType:{type:[Number,null],default:null},deleteFirstNumber:{type:Number,default:1},withoutPermission:{type:Number,default:0}},emits:["change"],setup(n,{expose:e,emit:t}){const{request:i}=c.inject("stConfig");let r=null;const o=c.ref(null),s=t,a=n,l=c.ref({data:[],mainIndicator:[],subIndicator:[],time:[]}),u=async()=>{const p={varietyCode:a.varietyCode,cycle:"6",right:a.varietyStock===1?a.rightType:0,contractType:a.varietyStock?null:a.klineType,startTime:"1999-01-01 00:00:00",endTime:bt().format("YYYY-MM-DD 23:59:59"),deleteFirstNumber:a.deleteFirstNumber,withoutPermission:a.withoutPermission},{body:g}=await i.post("/middleLayer/kline/getKline",p);g?l.value=g:l.value={data:[],mainIndicator:[],subIndicator:[],time:[]},f("init")},d=p0(p=>{if(!p.dataZoomId)return;const g=r.getOption();if(g!=null&&g.dataZoom[0]){const{startValue:m,endValue:y}=r.getOption().dataZoom[0],{time:_}=l.value,C=`${_[m].split(" ")[0]} 00:00:00`,b=`${_[y].split(" ")[0]} 23:59:59`;console.log(`检测到拖拽轴被拖动, 时间区间: ${C} - ${b}`),s("change",{startTime:C,endTime:b})}},200),h=p0(({startTime:p,endTime:g})=>{f("reset",{startTime:p,endTime:g})},100),f=(p,g)=>{switch(p){case"init":{const{data:m,time:y}=l.value,{xAxisData:_,lineData:C}=m.reduce((v,w,x)=>(v.xAxisData.push(y[x].split(" ")[0]),v.lineData.push(w[1]),v),{xAxisData:[],lineData:[]}),b={grid:{height:0,left:"100px",right:"80px"},xAxis:{type:"category",data:_,show:!1},yAxis:{type:"value"},dataZoom:[{show:!0,startValue:0,endValue:0,textStyle:{color:"#ccc"}},{type:"inside",startValue:0,endValue:0}],series:[{data:C,type:"line"}]};if(r.setOption(b,!0),a.screenTimeRange.length){const[v,w]=a.screenTimeRange;h({startTime:v,endTime:w})}break}case"reset":{const{time:m}=l.value,y=bt(g.startTime).format("YYYY-MM-DD"),_=bt(g.endTime).format("YYYY-MM-DD");let C=-1,b=-1;for(let v=0;v<m.length;v++){const w=bt(m[v]).format("YYYY-MM-DD");if(C!==-1&&b!==-1)break;C===-1&&(new Date(w)===new Date(y)?C=v:new Date(w)>new Date(y)&&(C=v-1)),b===-1&&(new Date(w)===new Date(_)?b=v:new Date(w)>new Date(_)&&(b=v-1))}b===-1&&(b=m.length-1),r.dispatchAction({type:"dataZoom",startValue:C,endValue:b});break}}};return c.onMounted(()=>{c.nextTick(()=>{r=Kr.init(o.value),r.on("datazoom",d),u()})}),c.watch(()=>a.screenTimeRange,p=>{const[g,m]=p;h({startTime:g,endTime:m})},{deep:!0}),c.onUnmounted(()=>{r.off("datazoom"),r.dispose()}),e({resize:p0(()=>r.resize(),100)}),(p,g)=>(c.openBlock(),c.createElementBlock("div",{class:"chart",ref_key:"sliderChartRef",ref:o},null,512))}},[["__scopeId","data-v-0c715da1"]]),$Tt="",ict={class:"main-chart"},rct={class:"indicator"},oct={key:0,class:"screen-time-range"},sct={key:0,class:"sub-chart"},act={class:"indicator"},lct={class:"title"},uct={key:1,class:"slider-chart"},cct=Jt({__name:"index",props:{varietyCode:{type:String,required:!0},varietyStock:{type:Number,required:!0},indicatorStore:{type:Object,required:!0},userKlineConfig:{type:Object,required:!0},cycle:{type:String,required:!0},sellBuy:{type:Number,default:1},rightType:{type:[Number,null],default:null},klineType:{type:[Number,null],default:null},incomeType:{type:Number,default:0},initTimeRange:{type:Array,required:!0},mainIndicator:{type:String,required:!0},tradeLog:{type:Array,default:()=>[]},netPositionData:{type:Array,default:()=>[]},tradeIncomeRateData:{type:Array,default:()=>[]},positionTime:{type:[String,null],default:null},syncBrushRange:{type:Object,default:()=>({cycleList:[],startTime:null,endTime:null})},deleteFirstNumber:{type:Number,default:1},withoutPermission:{type:Number,default:0}},setup(n,{expose:e}){const{round:t,formatValue:i}=Cl,{request:r}=c.inject("stConfig"),o=c.ref(),s=c.ref(!1),a=c.ref(!1),l=n;let u=!1,d=!1,h=!1,f=!1,p=null,g=null,m=null;const y=c.ref(null),_=c.ref(null),C=c.ref({data:[],mainIndicator:[],subIndicator:[],time:[]}),b=c.ref(0),v=c.ref([]),w=c.ref(null),x=c.ref("VOL"),S=c.computed(()=>{const O=C.value.data[b.value];if(!O)return[{label:"开",value:"-"},{label:"高",value:"-"},{label:"低",value:"-"},{label:"收",value:"-"},{label:"额",value:"-"},{label:"涨跌",value:"-"}];const P=[{label:"开",value:O[0]},{label:"高",value:O[3]},{label:"低",value:O[2]},{label:"收",value:O[1]}];O[4]!==null&&P.push({label:"额",value:i(O[4])});let U;return O[6]>0?U="red":O[6]<0&&(U="green"),P.push({label:"涨跌",value:`${t(O[6])}%`,color:U}),P}),D=c.computed(()=>{var O,P;return((P=(O=C.value)==null?void 0:O.mainIndicator)==null?void 0:P.map(U=>({label:U.key,value:t(U.data[b.value]),color:U.color})))||[]}),N=c.computed(()=>{var O,P;return((P=(O=C.value)==null?void 0:O.subIndicator)==null?void 0:P.map(U=>({label:U.key,color:U.color,value:U.data[b.value]||"-"})))||[]}),k=()=>{m||(m=Kr.init(_.value),m.on("highlight",p0(O=>{var P;O.dataIndex?b.value=O.dataIndex:b.value=((P=O.batch)==null?void 0:P[0].dataIndex)??-1},10)),m.on("datazoom",p0(async()=>{var Y;const{loadCheckCount:O}=V2,{startValue:P,endValue:U}=((Y=m.getOption())==null?void 0:Y.dataZoom[0])??{};h===!1&&f===!1&&P<O&&await L("history"),u===!1&&d===!1&&U>C.value.time.length-O&&await L("new"),A(),R()})),m.on("globalout",()=>{const O=m.getOption();b.value=O.dataZoom[0].endValue}),m.getZr().on("contextmenu",()=>{var O;w.value=(O=C.value)==null?void 0:O.time[b.value]}),window.addEventListener("keydown",M),l.userKlineConfig.enable_subChart&&(g=Kr.init(y.value),Kr.connect([m,g])),p=gJ(_.value),p.listen(()=>{requestAnimationFrame(()=>{var O;m.resize(),g==null||g.resize(),(O=o.value)==null||O.resize()})}))},E=async({startTime:O,endTime:P})=>{h=!1,f=!1,u=!1,d=!1;try{s.value=!0;const U={varietyCode:l.varietyCode,cycle:l.cycle,right:l.varietyStock===1?l.rightType:0,contractType:l.varietyStock?null:l.klineType,mainIndicatorList:l.indicatorStore.getIndicatorParams(l.mainIndicator),subIndicator:x.value,deleteFirstNumber:l.deleteFirstNumber,withoutPermission:l.withoutPermission};["1","2","3","4","5"].includes(l.cycle)?Object.assign(U,{startTime:bt(O).subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),endTime:bt(P).add(1,"day").format("YYYY-MM-DD HH:mm:ss")}):["6","7"].includes(l.cycle)?Object.assign(U,{startTime:bt(O).subtract(50,"day").format("YYYY-MM-DD HH:mm:ss"),endTime:bt(P).add(50,"day").format("YYYY-MM-DD HH:mm:ss")}):Object.assign(U,{startTime:bt(O).subtract(10,"month").format("YYYY-MM-DD HH:mm:ss"),endTime:bt(P).add(10,"month").format("YYYY-MM-DD HH:mm:ss")});const{body:Y}=await r.post("/middleLayer/kline/getKline",U);C.value=Y??{data:[],mainIndicator:[],subIndicator:[],time:[]};let j=-1,z=-1;for(let re=0;re<C.value.time.length;re++){const ce=bt(C.value.time[re]).format("YYYY-MM-DD");if(j!==-1&&z!==-1)break;j===-1&&(new Date(ce)===new Date(O)?j=re:new Date(ce)>new Date(O)&&(j=re-1)),z===-1&&(new Date(ce)===new Date(P)?z=re:new Date(ce)>new Date(P)&&(z=re-1))}z===-1&&(z=C.value.time.length-1),F({startValue:j===-1?0:j,endValue:z===-1?C.value.time.length-1:z})}finally{s.value=!1}},L=async O=>{var ce,le;const{loadAddCount:P}=V2;switch(O){case"history":{h=!0;const ne={varietyCode:l.varietyCode,cycle:l.cycle,right:l.varietyStock===1?l.rightType:0,contractType:l.varietyStock?null:l.klineType,endTime:C.value.time[0],limit:P,mainIndicatorList:l.indicatorStore.getIndicatorParams(l.mainIndicator),subIndicator:x.value,deleteFirstNumber:l.deleteFirstNumber,withoutPermission:l.withoutPermission},{body:oe}=await r.post("/middleLayer/kline/getKline",ne);C.value=Ene(oe,C.value),oe.data.length<P&&(console.log("[K线] 获取更多数据: 左侧已全部获取完毕, 关闭"),f=!0),h=!1;break}case"new":{u=!0;const ne={varietyCode:l.varietyCode,cycle:l.cycle,right:l.varietyStock===1?l.rightType:0,contractType:l.varietyStock?null:l.klineType,startTime:C.value.time[C.value.time.length-1],limit:P,mainIndicatorList:l.indicatorStore.getIndicatorParams(l.mainIndicator),subIndicator:x.value,deleteFirstNumber:l.deleteFirstNumber,withoutPermission:l.withoutPermission},{body:oe}=await r.post("/middleLayer/kline/getKline",ne);C.value=Ene(C.value,oe),oe.data.length<P&&(console.log("[K线] 获取更多数据: 右侧已全部获取完毕, 关闭"),d=!0),u=!1;break}}const{startValue:U,endValue:Y}=((ce=m.getOption())==null?void 0:ce.dataZoom[0])??{},j=(le=m.getOption())==null?void 0:le.xAxis[0].data,z=C.value.time.findIndex(ne=>new Date(ne)>=new Date(j[U])),re=C.value.time.findIndex(ne=>new Date(ne)>=new Date(j[Y]));F({startValue:z===-1?0:z,endValue:re===-1?C.value.time.length-1:re})},A=()=>{var z;if(!C.value.time.length)return v.value=[];const{time:O}=C.value,{startValue:P,endValue:U}=((z=m.getOption())==null?void 0:z.dataZoom[0])??{},Y=O[P],j=O[U];["6","7","8"].includes(l.cycle)?v.value=[bt(Y).format("YYYY-MM-DD"),bt(j).format("YYYY-MM-DD")]:v.value=[Y,j]},F=(O={startValue:0,endValue:0})=>{k();const{maxValueSpan:P}=V2,{time:U,data:Y,mainIndicator:j}=C.value,z=O.endValue-O.startValue>P?O.endValue-P:O.startValue,re=O.endValue,ce=j.map(pe=>({name:pe.key,type:"line",silent:!0,symbol:"none",data:pe.data,lineStyle:{width:pe.width||1},itemStyle:{color:pe.color}})),{netPositionLineData:le}=Jut(l.netPositionData,l.cycle),{tradeIncomeRateLineData:ne}=ect(l.tradeIncomeRateData,l.cycle,l.incomeType,U),{tradePointData:oe,tradeLineData:he}=Xut(l.tradeLog,l.cycle,l.sellBuy,U,Y,l.userKlineConfig);m.setOption({animation:!1,grid:{top:"40px",left:"60px",right:"20px",bottom:"20px"},dataZoom:[{type:"inside",startValue:z,endValue:re,minValueSpan:V2.minValueSpan,maxValueSpan:V2.maxValueSpan}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:pe=>{const{axisDimension:de,value:ve}=pe;return de==="x"?["6","7","8"].includes(l.cycle)?bt(ve).format("YYYY-MM-DD"):ve:String(t(ve))}}},formatter:pe=>{if(!(pe!=null&&pe.length))return null;let de="";if(pe.forEach(Le=>{if(Le.seriesName==="netPosition"&&Le.data!==null&&(de+=`<div>资产持仓净值: ${Le.data[1]}</div>`),Le.componentSubType==="candlestick")if(l.sellBuy===0){const ie=oe.filter(Z=>(Z==null?void 0:Z.coord[0])===Le.axisValue);let W=0,te=0;ie.forEach(Z=>{const{tradeType:X,amount:ee}=Z.customData;X==="买"&&(W+=ee),X==="卖"&&(te+=ee)}),W&&(de+=`<div>买: ${W}</div>`),te&&(de+=`<div>卖: ${te}</div>`)}else oe.forEach(ie=>{if((ie==null?void 0:ie.coord[0])===Le.axisValue){const{tradeType:W,amount:te,profitAndLoss:Z,openPriceAll:X,closePriceAll:ee}=ie.customData;let K=`<div>${W}: ${te}手</div>`;if(W.includes("开")&&(K+=`<div>开仓价: ${(X/te).toFixed(2)}</div>`),W.includes("平")){const Q=(X/te).toFixed(2),J=(ee/te).toFixed(2);K+=`<div>平仓价: ${J}</div>`,K+=`<div>盈亏: ${Z==null?void 0:Z.toFixed(2)}</div>`,K+=`<div>盈亏比率: ${((J-Q)/Q*100).toFixed(2)} %</div>`}de+=K}})}),!de)return null;let ve=pe[0].axisValue;return["6","7","8"].includes(l.cycle)&&(ve=bt(ve).format("YYYY-MM-DD")),`
144
144
  <div>
145
145
  <span style="font-weight: bold;">${ve}</span>
146
146
  ${de}