st-comp 0.0.213 → 0.0.215
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.
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +55 -55
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +3 -6
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +2 -2
- package/lib/{index-ead7586a.js → index-5f11e3e4.js} +231 -234
- package/lib/{python-2a542cf4.js → python-e8c63eb9.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineConfig/index.vue +1 -1
- package/packages/VarietySearch/components/CompositeOrder/index.vue +0 -4
package/lib/bundle.umd.cjs
CHANGED
|
@@ -139,7 +139,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,curr
|
|
|
139
139
|
接口: ${u.url}
|
|
140
140
|
入参: ${JSON.stringify(u.method==="post"?u.data:u.params)}`))}),{get:(a,l={},u={})=>s({method:"GET",url:`${aJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/get"}${a}`,params:l,...u}),post:(a,l={},u={})=>s({method:"POST",url:`${aJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/post"}${a}`,data:l,...u})}},xet=Object.freeze(Object.defineProperty({__proto__:null,initRequest:wet},Symbol.toStringTag,{value:"Module"}));var Det=Object.defineProperty,Net=(n,e,t)=>e in n?Det(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_p=(n,e,t)=>Net(n,typeof e!="symbol"?e+"":e,t);class lJ{constructor(e,t={}){_p(this,"dom"),_p(this,"resizeRo"),_p(this,"callback"),_p(this,"visibilitychangeFn"),_p(this,"timer"),_p(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 Eet=n=>new lJ(n),ket=Object.freeze(Object.defineProperty({__proto__:null,ResizeListener:lJ,addResizeListener:Eet},Symbol.toStringTag,{value:"Module"}));`${new Date().getTime()}${Math.floor(Math.random()*1e9)}`;const Let=n=>{n?BH("token",n):console.error("token不能为空")},Met=n=>{n?BH("userData",n):console.error("用户数据不能为空")},uJ=()=>VH("token"),cJ=n=>{const e=VH("userData");return n?e==null?void 0:e[n]:e},Tet=()=>!!uJ(),Aet=()=>{const n=cJ();return(n==null?void 0:n.username)==="admin"},dJ=(n="")=>location.href=`${location.origin}/login/index.html?url=${encodeURIComponent(n||location.href)}`,Iet=(n=!0,e)=>{if(zH("token"),zH("userData"),n){dJ();return}e&&(location.href=e)},Ret=Object.freeze(Object.defineProperty({__proto__:null,getToken:uJ,getUserData:cJ,isAdmin:Aet,isLogin:Tet,login:dJ,loginout:Iet,setToken:Let,setUserData:Met},Symbol.toStringTag,{value:"Module"})),vl=vet,{initRequest:hJ}=xet,{addResizeListener:fJ}=ket,{setToken:iMt,setUserData:GE,getToken:pJ,getUserData:R1,isLogin:gJ,isAdmin:rMt,login:Oet,loginout:YE}=Ret,F2=(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)}},Fet={__name:"index",props:{env:{type:Object,default:()=>({})}},setup(n){const e=r=>{const o=hJ(r,{handleReq:s=>{gJ()&&(s.headers.token=pJ(),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`:YE(),!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")}},Pet={install(n){n.component("st-configProvider",Fet)}},oMt="",Bet=gn({__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"]]),Vet={install(n){n.component("st-contextmenu",Bet)}},aMt="",lMt="",uMt="",cMt="",dMt="",hMt="",fMt="",pMt="",gMt="",mMt="",bMt="",_Mt="",yMt="",vMt="",CMt="",wMt="",xMt="",SMt="",DMt="",NMt="",mJ=n=>(c.pushScopeId("data-v-ff7c4544"),n=n(),c.popScopeId(),n),zet={class:"custom-function"},Het={class:"func-option"},jet={class:"icons"},Wet={class:"custom-header"},$et={class:"left"},Uet=["id"],qet={class:"right"},Ket={class:"func-name"},Get={class:"left"},Yet=mJ(()=>c.createElementVNode("span",null,"函数名称:",-1)),Qet={class:"right"},Zet=mJ(()=>c.createElementVNode("div",{class:"tip-box"},"Tip: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算",-1)),Xet={class:"dialog-footer"},Jet={class:"custom-header"},ett={class:"left"},ttt=["id"],ntt={class:"right"},itt={class:"content"},rtt={class:"dialog-footer"},ott=gn({__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=c.ref(null),o=e,s=c.ref(null),a=c.ref(""),l=c.ref([]),u=c.ref(!1),d=c.reactive({id:null,funcName:"",funcExpression:""}),h=c.ref(!1),f=c.ref(!1),p=c.ref(!1),g=c.reactive({result:null,detail:"",code:""}),m=async()=>{const{body:E}=await t.post("/common/qt/querySearchFunctions");if(l.value=E??[],s.value===null)a.value="";else{const k=l.value.find(({id:A})=>A===s.value);a.value=k?k.funcName:""}},y=E=>{var k;E?s.value=(k=l.value.find(A=>A.funcName===E))==null?void 0:k.id:s.value=null},b=async E=>{await t.post("/common/qt/deleteSearchFunctionById",{id:E.id}),m()},C=(E,k)=>{switch(!!E){case!1:{Object.assign(d,{id:null,funcName:"",funcExpression:""});break}case!0:{Object.assign(d,{id:E.id,funcName:E.funcName,funcExpression:E.funcExpression});break}}k&&(d.id=null,d.funcName=`${d.funcName}-复制`),u.value=!0},_=async()=>{try{if(h.value=!0,d.funcExpression=i.value.getValue(),!d.funcName)return Xt.error("函数名称不可为空");if(!d.funcExpression)return Xt.error("函数内容不可为空");await t.post("/common/qt/saveOrUpdateSearchFunction",d),Xt.success("操作成功"),u.value=!1,await m()}finally{h.value=!1}},v=()=>{if(!a.value)return Xt.error("请先选择自定义函数后, 再执行插入");const{funcName:E,funcExpression:k}=l.value.find(A=>A.funcName===a.value);o("insert",E,k)},w=E=>{const k=/\$\{([^}]*)\}/g,A=[];let F;for(;(F=k.exec(E))!==null;)A.push(F[1]);return[...new Set(A)]},x=(E,k)=>E.replace(/\$\{([^}]*)\}/g,(A,F)=>k[F]!==void 0?k[F]:A),S=E=>new Promise(k=>{const A=c.ref(E.reduce((M,O)=>(M[O]="",M),{})),F=c.ref({}),R=()=>{let M=!0;const O={};return E.forEach(P=>{var U;(U=A.value[P])!=null&&U.trim()||(O[P]=`请输入${P}的值`,M=!1)}),F.value=O,M},I={setup(){return()=>c.h("div",[c.h(Od,{model:A.value},()=>E.map(M=>c.h(Fd,{label:`${M}: `,prop:M,error:F.value[M],"label-width":"90px"},()=>c.h(ws,{modelValue:A.value[M],"onUpdate:modelValue":O=>{A.value[M]=O,F.value[M]&&delete F.value[M]},placeholder:`请输入 ${M} 的值`,status:F.value[M]?"error":""}))))])}};lD({title:"填写变量值用于接口测试",message:c.h(I),showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",customClass:"variable-input-dialog",beforeClose:async(M,O,P)=>{M!=="confirm"&&(k(!1),P()),await c.nextTick(),R()&&(k({...A.value}),P())}}).catch(()=>k(!1))}),D=async()=>{try{p.value=!0;let E=i.value.getValue();if(!E)return Xt.error("函数内容不可为空");if(/\$\{[^}]*\}/.test(E)){const R=w(E),I=await S(R);if(!I)return;E=x(E,I)}const{body:k}=await t.post("/common/qt/testFactorSelect",{factorSelectExpr:E}),{result:A,detail:F}=k;Object.assign(g,{result:A,detail:F,code:E}),A===1?Xt.success("测试通过"):(Xt.error("测试未能通过"),f.value=!0)}finally{p.value=!1}},N=()=>{if(g.result===null)return Xt.warning("请先进行测试, 等待测试完成后可查看日志");f.value=!0},L=()=>{r.value.open(i.value)};return c.onMounted(()=>{m()}),c.watch(()=>u.value,E=>{switch(E){case!0:{c.nextTick(()=>{var k,A;(k=i.value)==null||k.setValue(d.funcExpression),(A=i.value)==null||A.resize()}),Object.assign(g,{result:null,detail:""});break}case!1:{r.value.close();break}}}),(E,k)=>{const A=dn,F=CS,R=ll,I=al,M=Kr,O=ws,P=c.resolveComponent("st-monacoEditor"),U=sl,Q=s1,W=T6,z=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock("div",zet,[c.createVNode(I,{modelValue:a.value,"onUpdate:modelValue":k[0]||(k[0]=ne=>a.value=ne),size:n.size,placeholder:"自定义函数","no-match-text":"无匹配选项","no-data-text":"无选项数据",clearable:"",filterable:"",onChange:y,style:c.normalizeStyle({width:n.selectWidth})},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,ne=>(c.openBlock(),c.createBlock(R,{key:ne.id,label:ne.funcName,value:ne.funcName,onClick:v},{default:c.withCtx(()=>[c.createElementVNode("div",Het,[c.createElementVNode("span",null,c.toDisplayString(ne.funcName),1),c.createElementVNode("div",jet,[c.createVNode(A,{onClick:c.withModifiers(ce=>C(ne,!0),["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Age))]),_:2},1032,["onClick"]),c.createVNode(A,{onClick:c.withModifiers(ce=>C(ne),["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Oge))]),_:2},1032,["onClick"]),c.createVNode(F,{title:"确认是否删除?","confirm-button-text":"确认","cancel-button-text":"取消",onConfirm:ce=>b(ne)},{reference:c.withCtx(()=>[c.createVNode(A,{onClick:c.withModifiers(()=>{},["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Mge))]),_:1})]),_:2},1032,["onConfirm"])])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","size","style"]),c.createVNode(M,{type:"primary",size:n.size,onClick:v},{default:c.withCtx(()=>[c.createTextVNode(" 插入 ")]),_:1},8,["size"]),c.createVNode(M,{type:"primary",size:n.size,onClick:k[1]||(k[1]=ne=>C())},{default:c.withCtx(()=>[c.createTextVNode(" 新建 ")]),_:1},8,["size"]),c.createVNode(U,{"modal-class":"add-or-edit-dialog",modelValue:u.value,"onUpdate:modelValue":k[4]||(k[4]=ne=>u.value=ne),width:"1000","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ne,titleClass:ce})=>[c.createElementVNode("div",Wet,[c.createElementVNode("div",$et,[c.createElementVNode("span",{id:ne,class:c.normalizeClass(ce)},c.toDisplayString(d.id?"编辑自定义函数":"新建自定义函数"),11,Uet)]),c.createElementVNode("div",qet,[c.createVNode(M,{size:"small",type:"primary",onClick:L},{default:c.withCtx(()=>[c.createTextVNode(" 变量选择器 ")]),_:1}),c.createVNode(A,{onClick:k[2]||(k[2]=le=>u.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",Xet,[c.createVNode(M,{type:"primary",loading:h.value,onClick:_},{default:c.withCtx(()=>[c.createTextVNode(" 确定 ")]),_:1},8,["loading"])])]),default:c.withCtx(()=>[c.createElementVNode("div",Ket,[c.createElementVNode("div",Get,[Yet,c.createVNode(O,{modelValue:d.funcName,"onUpdate:modelValue":k[3]||(k[3]=ne=>d.funcName=ne)},null,8,["modelValue"])]),c.createElementVNode("div",Qet,[c.createVNode(M,{type:"primary",loading:p.value,onClick:D},{default:c.withCtx(()=>[c.createTextVNode(" 测试 ")]),_:1},8,["loading"]),c.createVNode(M,{icon:c.unref(YP),onClick:N},{default:c.withCtx(()=>[c.createTextVNode(" 日志明细 ")]),_:1},8,["icon"])])]),Zet,c.createVNode(P,{ref_key:"stMonacoEditorRef",ref:i,language:"lua",style:{width:"968px",height:"400px"}},null,512)]),_:1},8,["modelValue"]),c.createVNode(U,{"modal-class":"log-dialog",modelValue:f.value,"onUpdate:modelValue":k[7]||(k[7]=ne=>f.value=ne),width:"830","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ne,titleClass:ce})=>[c.createElementVNode("div",Jet,[c.createElementVNode("div",ett,[c.createElementVNode("span",{id:ne,class:c.normalizeClass(ce)}," 日志明细 ",10,ttt)]),c.createElementVNode("div",ntt,[c.createVNode(A,{onClick:k[5]||(k[5]=le=>f.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",rtt,[c.createVNode(M,{onClick:k[6]||(k[6]=ne=>f.value=!1)},{default:c.withCtx(()=>[c.createTextVNode(" 关闭 ")]),_:1})])]),default:c.withCtx(()=>[c.createElementVNode("div",itt,[c.createVNode(Q,{class:"code",height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",null,c.toDisplayString(g.code),1)]),_:1}),c.createVNode(W,{direction:"vertical"}),c.createVNode(Q,{height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",{class:c.normalizeClass(g.result===1?"success-log":"error-log")},c.toDisplayString(g.result===1?"测试通过 √":g.detail),3)]),_:1})])]),_:1},8,["modelValue"]),c.createVNode(z,{ref_key:"stVarSelectDialogRef",ref:r},null,512)])}}},[["__scopeId","data-v-ff7c4544"]]),stt={install(n){n.component("st-customFunction",ott)}},kMt="",LMt="",MMt="",TMt="",AMt="",IMt="",RMt="",OMt="",FMt="";var QE={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 att={ruleFormPrice:!0,ruleFormMark:!0,tableStatus:!0,tableCreateTime:!0,tableMark:!0,tableEnable:!0},PMt="",m_=n=>(c.pushScopeId("data-v-b2d15520"),n=n(),c.popScopeId(),n),ltt={class:"st-factorWarning"},utt={class:"custom-header"},ctt=m_(()=>c.createElementVNode("span",{style:{"margin-right":"4px"}},"因子预警",-1)),dtt={class:"factor-name"},htt=["onClick"],ftt={class:"factor-name"},ptt=["onClick"],gtt={style:{display:"flex","align-items":"start"}},mtt={key:0,style:{flex:"1"}},btt=m_(()=>c.createElementVNode("span",{style:{margin:"0 5px"}},"~",-1)),_tt={key:0,style:{color:"#f56c6c"}},ytt={key:1,style:{color:"#67c23a"}},vtt={key:0},Ctt={key:1},wtt={key:2},xtt={class:"shortcut-title"},Stt=m_(()=>c.createElementVNode("span",null,"我的配置",-1)),Dtt={class:"shortcut-config"},Ntt={key:1,class:"empty"},Ett={class:"shortcut-title"},ktt=m_(()=>c.createElementVNode("span",null,"新增配置",-1)),Ltt={class:"custom-footer"},Mtt=gn({__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(att,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:L})=>L===S);if(N){const L=N.totalCount-N.currentCount;L===0?D=3:D=Math.min(3,12-L>=0?12-L: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 L=o.tableData.find(({factorExtendName:E})=>E===D);if(L){const E=L.totalCount-L.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=F2(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),b=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)},_=v=>{lD.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=MH,S=Kr,D=Fd,N=u1,L=bV,E=P6,k=Z6,A=ws,F=Od,R=QS,I=CS,M=YS,O=dn,P=wa,U=Qg,Q=sl,W=Jx;return c.openBlock(),c.createElementBlock("div",ltt,[c.createVNode(W,{locale:c.unref(QE)},{default:c.withCtx(()=>[c.createVNode(Q,{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:ne,titleClass:ce})=>[c.createElementVNode("div",utt,[c.createElementVNode("div",{class:c.normalizeClass(ce)},[ctt,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",Ltt,[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=>b(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(L,{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,ne)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:ne},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",dtt,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ce=>g(z.factorTypeName)},"+3",8,htt)]))),128)):c.createCommentVNode("",!0),l.value.factorType===-1?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(n.emptyFactorOptions,(z,ne)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:ne},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",ftt,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ce=>g(z.factorTypeName)},"+3",8,ptt)]))),128)):c.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),c.createVNode(D,{label:"预警次数:",prop:"totalCount"},{default:c.withCtx(()=>[c.createElementVNode("div",gtt,[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",mtt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.shortcutData,z=>(c.openBlock(),c.createBlock(S,{key:z.id,onClick:ne=>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(k,{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"]),btt,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",_tt,"多")):(c.openBlock(),c.createElementBlock("span",ytt,"空"))]),_: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",vtt,"未触发")):z.row.enable===2?(c.openBlock(),c.createElementBlock("span",Ctt,"已触发")):(c.openBlock(),c.createElementBlock("span",wtt,"-"))])]),_: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:ne=>r("enabled",z.row)},{default:c.withCtx(()=>[c.createTextVNode(" 启用 ")]),_:2},1032,["disabled","onClick"])):c.createCommentVNode("",!0),c.createVNode(I,{title:"确定删除?",onConfirm:ne=>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",xtt,[Stt,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",Dtt,[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:ne=>C(z),onClose:ne=>_(z)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(z.shortcutName),1)]),_:2},1032,["onClick","onClose"]))),128)):(c.openBlock(),c.createElementBlock("span",Ntt,"暂无数据"))]),c.createElementVNode("div",Ett,[ktt,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(L,{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,ne)=>(c.openBlock(),c.createBlock(N,{key:ne,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,ne)=>(c.openBlock(),c.createBlock(N,{key:ne,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"]]),Ttt={install(n){n.component("st-factorWarning",Mtt)}},Att=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=qr.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))}}),VMt="",Itt=gn(Att,[["__scopeId","data-v-4c74604d"]]),Rtt={install(n){n.component("st-heatMap",Itt)}},zMt="",HMt="",Ott={class:"st-kline-tips"},Ftt={class:"st-kline-tips-row"},Ptt=c.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Ott,[c.createElementVNode("div",Ftt,[(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))])]))}}),jMt="",ZE=gn(Ptt,[["__scopeId","data-v-78aed210"]]),Btt=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))}}),WMt="",Vtt=gn(Btt,[["__scopeId","data-v-249fd104"]]);var XE=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,b;d?(u?f=require("path").dirname(f)+"/":f=__dirname+"/",g=function(Te,Ue){return y||(y=require("fs")),b||(b=require("path")),Te=b.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 _=16;function v(Ee,Te){return Te||(Te=_),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),t1=new WebAssembly.Instance(lr,{e:{f:Ee}}),t3=t1.exports.f;return t3}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 L;t.wasmBinary&&(L=t.wasmBinary);var E;t.noExitRuntime&&(E=t.noExitRuntime),typeof WebAssembly!="object"&&fe("no native wasm support detected");var k,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 ne(_a,Sd),Sd}};function Lt(_a){return Te==="string"?Q(_a):Te==="boolean"?!!_a:_a}var zt=R(Ee),nr=[],mi=0;if(tt)for(var lr=0;lr<tt.length;lr++){var t1=Zt[Ue[lr]];t1?(mi===0&&(mi=e1()),nr[lr]=t1(tt[lr])):nr[lr]=tt[lr]}var t3=zt.apply(null,nr);return t3=Lt(t3),mi!==0&&Qa(mi),t3}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 Q(Ee,Te){return Ee?U(oe,Ee,Te):""}function W(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 W(Ee,oe,Te,Ue)}function ne(Ee,Te){ie.set(Ee,Te)}var ce=65536,le,ie,oe;function he(Ee){le=Ee,t.HEAP8=ie=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?k=t.wasmMemory:k=new WebAssembly.Memory({initial:de/ce,maximum:de/ce}),k&&(le=k.buffer),de=le.byteLength,he(le);var ve=new WebAssembly.Table({initial:1,element:"anyfunc"}),Le=[],ee=[],j=[],Y=[],te=!1;function J(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)X(t.preRun.shift());be(Le)}function re(){te=!0,be(ee)}function G(){be(j)}function Z(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)B(t.postRun.shift());be(Y)}function X(Ee){Le.unshift(Ee)}function B(Ee){Y.unshift(Ee)}var V=0,q=null;function K(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={},X(Vl);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(L)return new Uint8Array(L);if(m)return m(Ve);throw"both async and sync fetching of the wasm failed"}catch(Ee){fe(Ee)}}function rt(){return!L&&(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()}K();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(!L&&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=e1();try{return je(Ee,arguments[0],Array.prototype.slice.call(arguments,1))}catch(Ue){if(Qa(Te),Ue!==Ue+0&&Ue!=="longjmp")throw Ue;_setThrew(1,0)}}}function Ni(Ee){if(te)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 Ga(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,yg=1;;){var Nh=Ee[tt++];if(ya+=(Nh&127)*yg,yg*=128,!(Nh&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 t1=Ut(),t3=Ee.subarray(tt,tt+t1);tt+=t1;var _a=U(t3,0);mi.push(_a)}function Sd(){Lt=Math.pow(2,Lt),Lt=Math.max(Lt,_);var ya=v(Ni(Zt+Lt),Lt),yg=xd,Nh=ve,KO=Nh.length,SLt=Nh;Nh.grow(zt),F(Nh===SLt);for(var n3=ya;n3<ya+Zt;n3++)ie[n3]=0;for(var n3=KO;n3<KO+zt;n3++)Nh.set(n3,null);var GO={},YO=function(bs,va,Eh){Eh&&(bs="orig$"+bs);var Ks=t.asm[bs];if(!Ks){var Y8=ba(bs);Ks=t[Y8],Ks||(Ks=GO[Y8]),!Ks&&bs.startsWith("invoke_")&&(Ks=Dt(bs.split("_")[1]))}return Ks};for(var QO in t)QO in yg||(yg[QO]=t[QO]);var DLt={get:function(bs,va){switch(va){case"__memory_base":return ya;case"__table_base":return KO}if(va in bs)return bs[va];if(va.startsWith("g$")){var Eh=va.substr(2);return bs[va]=function(){return YO(Eh)}}if(va.startsWith("fp$")){var Ks=va.split("$");F(Ks.length==3);var Eh=Ks[1],Y8=Ks[2],ELt=Y8.indexOf("j")>=0,ZO=0;return bs[va]=function(){if(!ZO){var kLt=YO(Eh,"function",ELt);ZO=N(kLt,Y8)}return ZO}}return bs[va]=function(){return YO(va).apply(null,arguments)}}},p0e=new Proxy(yg,DLt),g0e={global:{NaN:NaN,Infinity:1/0},"global.Math":Math,env:p0e,wasi_snapshot_preview1:p0e};function m0e(bs,va){var Eh=$o(bs.exports,ya,va),Ks=Eh.__post_instantiate;return Ks&&(te?Ks():ee.push(Ks)),Eh}if(Te.loadAsync)return WebAssembly.instantiate(Ee,g0e).then(function(bs){return m0e(bs.instance,GO)});var NLt=new WebAssembly.Instance(new WebAssembly.Module(Ee),g0e);return m0e(NLt,GO)}return Te.loadAsync?Promise.all(mi.map(function(ya){return gs(ya,Te)})).then(function(){return Sd()}):(mi.forEach(function(ya){gs(ya,Te)}),Sd())}function Ya(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 gs(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?Ya(mi):m(mi)}function Zt(mi){return Ga(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 t1=ba(lr);t.hasOwnProperty(t1)||(t[t1]=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 Vl(){var Ee=[];if(t.dynamicLibraries&&(Ee=Ee.concat(t.dynamicLibraries)),!!Ee.length){if(!m){K(),Promise.all(Ee.map(function(Te){return gs(Te,{loadAsync:!0,global:!0,nodelete:!0})})).then(function(){ae()});return}Ee.forEach(function(Te){gs(Te,{global:!0,nodelete:!0})})}}function ms(Ee,Te,Ue){oe.copyWithin(Ee,Te,Te+Ue)}function Uu(Ee){fe("OOM")}function qu(Ee){Uu()}function Ku(){return t.___heap_base}ee.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:ms,emscripten_resize_heap:qu,g$__heap_base:Ku,memory:k};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 e1=t.stackSave=function(){return(e1=t.stackSave=t.asm.stackSave).apply(null,arguments)},Qa=t.stackRestore=function(){return(Qa=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 un in["TA_Globals","__data_end"])(function(Ee){t["g$"+Ee]=function(){return t[Ee]}})(un);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||(J(),V>0))return;function Te(){ut||(ut=!0,t.calledRun=!0,!A&&(re(),G(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),gi&&Qe(),Z()))}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 XE=XE;let p0;function bJ(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 ztt={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(!p0)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=bJ(p0,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=bJ(p0,s-o);return u.push(g),l.push(g.offset),{name:p,array:g}}),h=p0.ccall(t,"number",r,l);u.forEach(p=>p0._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] "+ztt[h])}var JE;(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"})(JE||(JE={}));function ek(n){return p0?Promise.resolve(p0):n&&typeof n!="string"?Promise.reject(new Error('Invalid argument, "init(wasmBinaryFilePath)" expects a string that specifies the location of wasm binary file')):XE({locateFile:n?()=>n:void 0}).then(t=>p0=t).catch(t=>{let i="TA-Lib WASM runtime init fail.";throw t&&t.message?i+=`
|
|
141
141
|
Error:
|
|
142
|
-
`+t.message:i+="Unknown reason. Perhaps you specify the wrong file path to wasm binary?",new Error(i)})}let Htt=Re.ACCBANDS;function _J(n){return Oe(Htt,n)}const jtt=_J;let Wtt=Re.ACOS;function yJ(n){return Oe(Wtt,n)}const $tt=yJ;let Utt=Re.AD;function vJ(n){return Oe(Utt,n)}const qtt=vJ;let Ktt=Re.ADD;function CJ(n){return Oe(Ktt,n)}const Gtt=CJ;let Ytt=Re.ADOSC;function wJ(n){return Oe(Ytt,n)}const Qtt=wJ;let Ztt=Re.ADX;function xJ(n){return Oe(Ztt,n)}const Xtt=xJ;let Jtt=Re.ADXR;function SJ(n){return Oe(Jtt,n)}const ent=SJ;let tnt=Re.APO;function DJ(n){return Oe(tnt,n)}const nnt=DJ;let int=Re.AROON;function NJ(n){return Oe(int,n)}const rnt=NJ;let ont=Re.AROONOSC;function EJ(n){return Oe(ont,n)}const snt=EJ;let ant=Re.ASIN;function kJ(n){return Oe(ant,n)}const lnt=kJ;let unt=Re.ATAN;function LJ(n){return Oe(unt,n)}const cnt=LJ;let dnt=Re.ATR;function MJ(n){return Oe(dnt,n)}const hnt=MJ;let fnt=Re.AVGDEV;function TJ(n){return Oe(fnt,n)}const pnt=TJ;let gnt=Re.AVGPRICE;function AJ(n){return Oe(gnt,n)}const mnt=AJ;let bnt=Re.BBANDS;function IJ(n){return Oe(bnt,n)}const _nt=IJ;let ynt=Re.BETA;function RJ(n){return Oe(ynt,n)}const vnt=RJ;let Cnt=Re.BOP;function OJ(n){return Oe(Cnt,n)}const wnt=OJ;let xnt=Re.CCI;function FJ(n){return Oe(xnt,n)}const Snt=FJ;let Dnt=Re.CDL2CROWS;function PJ(n){return Oe(Dnt,n)}const Nnt=PJ;let Ent=Re.CDL3BLACKCROWS;function BJ(n){return Oe(Ent,n)}const knt=BJ;let Lnt=Re.CDL3INSIDE;function VJ(n){return Oe(Lnt,n)}const Mnt=VJ;let Tnt=Re.CDL3LINESTRIKE;function zJ(n){return Oe(Tnt,n)}const Ant=zJ;let Int=Re.CDL3OUTSIDE;function HJ(n){return Oe(Int,n)}const Rnt=HJ;let Ont=Re.CDL3STARSINSOUTH;function jJ(n){return Oe(Ont,n)}const Fnt=jJ;let Pnt=Re.CDL3WHITESOLDIERS;function WJ(n){return Oe(Pnt,n)}const Bnt=WJ;let Vnt=Re.CDLABANDONEDBABY;function $J(n){return Oe(Vnt,n)}const znt=$J;let Hnt=Re.CDLADVANCEBLOCK;function UJ(n){return Oe(Hnt,n)}const jnt=UJ;let Wnt=Re.CDLBELTHOLD;function qJ(n){return Oe(Wnt,n)}const $nt=qJ;let Unt=Re.CDLBREAKAWAY;function KJ(n){return Oe(Unt,n)}const qnt=KJ;let Knt=Re.CDLCLOSINGMARUBOZU;function GJ(n){return Oe(Knt,n)}const Gnt=GJ;let Ynt=Re.CDLCONCEALBABYSWALL;function YJ(n){return Oe(Ynt,n)}const Qnt=YJ;let Znt=Re.CDLCOUNTERATTACK;function QJ(n){return Oe(Znt,n)}const Xnt=QJ;let Jnt=Re.CDLDARKCLOUDCOVER;function ZJ(n){return Oe(Jnt,n)}const eit=ZJ;let tit=Re.CDLDOJI;function XJ(n){return Oe(tit,n)}const nit=XJ;let iit=Re.CDLDOJISTAR;function JJ(n){return Oe(iit,n)}const rit=JJ;let oit=Re.CDLDRAGONFLYDOJI;function eee(n){return Oe(oit,n)}const sit=eee;let ait=Re.CDLENGULFING;function tee(n){return Oe(ait,n)}const lit=tee;let uit=Re.CDLEVENINGDOJISTAR;function nee(n){return Oe(uit,n)}const cit=nee;let dit=Re.CDLEVENINGSTAR;function iee(n){return Oe(dit,n)}const hit=iee;let fit=Re.CDLGAPSIDESIDEWHITE;function ree(n){return Oe(fit,n)}const pit=ree;let git=Re.CDLGRAVESTONEDOJI;function oee(n){return Oe(git,n)}const mit=oee;let bit=Re.CDLHAMMER;function see(n){return Oe(bit,n)}const _it=see;let yit=Re.CDLHANGINGMAN;function aee(n){return Oe(yit,n)}const vit=aee;let Cit=Re.CDLHARAMI;function lee(n){return Oe(Cit,n)}const wit=lee;let xit=Re.CDLHARAMICROSS;function uee(n){return Oe(xit,n)}const Sit=uee;let Dit=Re.CDLHIGHWAVE;function cee(n){return Oe(Dit,n)}const Nit=cee;let Eit=Re.CDLHIKKAKE;function dee(n){return Oe(Eit,n)}const kit=dee;let Lit=Re.CDLHIKKAKEMOD;function hee(n){return Oe(Lit,n)}const Mit=hee;let Tit=Re.CDLHOMINGPIGEON;function fee(n){return Oe(Tit,n)}const Ait=fee;let Iit=Re.CDLIDENTICAL3CROWS;function pee(n){return Oe(Iit,n)}const Rit=pee;let Oit=Re.CDLINNECK;function gee(n){return Oe(Oit,n)}const Fit=gee;let Pit=Re.CDLINVERTEDHAMMER;function mee(n){return Oe(Pit,n)}const Bit=mee;let Vit=Re.CDLKICKING;function bee(n){return Oe(Vit,n)}const zit=bee;let Hit=Re.CDLKICKINGBYLENGTH;function _ee(n){return Oe(Hit,n)}const jit=_ee;let Wit=Re.CDLLADDERBOTTOM;function yee(n){return Oe(Wit,n)}const $it=yee;let Uit=Re.CDLLONGLEGGEDDOJI;function vee(n){return Oe(Uit,n)}const qit=vee;let Kit=Re.CDLLONGLINE;function Cee(n){return Oe(Kit,n)}const Git=Cee;let Yit=Re.CDLMARUBOZU;function wee(n){return Oe(Yit,n)}const Qit=wee;let Zit=Re.CDLMATCHINGLOW;function xee(n){return Oe(Zit,n)}const Xit=xee;let Jit=Re.CDLMATHOLD;function See(n){return Oe(Jit,n)}const ert=See;let trt=Re.CDLMORNINGDOJISTAR;function Dee(n){return Oe(trt,n)}const nrt=Dee;let irt=Re.CDLMORNINGSTAR;function Nee(n){return Oe(irt,n)}const rrt=Nee;let ort=Re.CDLONNECK;function Eee(n){return Oe(ort,n)}const srt=Eee;let art=Re.CDLPIERCING;function kee(n){return Oe(art,n)}const lrt=kee;let urt=Re.CDLRICKSHAWMAN;function Lee(n){return Oe(urt,n)}const crt=Lee;let drt=Re.CDLRISEFALL3METHODS;function Mee(n){return Oe(drt,n)}const hrt=Mee;let frt=Re.CDLSEPARATINGLINES;function Tee(n){return Oe(frt,n)}const prt=Tee;let grt=Re.CDLSHOOTINGSTAR;function Aee(n){return Oe(grt,n)}const mrt=Aee;let brt=Re.CDLSHORTLINE;function Iee(n){return Oe(brt,n)}const _rt=Iee;let yrt=Re.CDLSPINNINGTOP;function Ree(n){return Oe(yrt,n)}const vrt=Ree;let Crt=Re.CDLSTALLEDPATTERN;function Oee(n){return Oe(Crt,n)}const wrt=Oee;let xrt=Re.CDLSTICKSANDWICH;function Fee(n){return Oe(xrt,n)}const Srt=Fee;let Drt=Re.CDLTAKURI;function Pee(n){return Oe(Drt,n)}const Nrt=Pee;let Ert=Re.CDLTASUKIGAP;function Bee(n){return Oe(Ert,n)}const krt=Bee;let Lrt=Re.CDLTHRUSTING;function Vee(n){return Oe(Lrt,n)}const Mrt=Vee;let Trt=Re.CDLTRISTAR;function zee(n){return Oe(Trt,n)}const Art=zee;let Irt=Re.CDLUNIQUE3RIVER;function Hee(n){return Oe(Irt,n)}const Rrt=Hee;let Ort=Re.CDLUPSIDEGAP2CROWS;function jee(n){return Oe(Ort,n)}const Frt=jee;let Prt=Re.CDLXSIDEGAP3METHODS;function Wee(n){return Oe(Prt,n)}const Brt=Wee;let Vrt=Re.CEIL;function $ee(n){return Oe(Vrt,n)}const zrt=$ee;let Hrt=Re.CMO;function Uee(n){return Oe(Hrt,n)}const jrt=Uee;let Wrt=Re.CORREL;function qee(n){return Oe(Wrt,n)}const $rt=qee;let Urt=Re.COS;function Kee(n){return Oe(Urt,n)}const qrt=Kee;let Krt=Re.COSH;function Gee(n){return Oe(Krt,n)}const Grt=Gee;let Yrt=Re.DEMA;function Yee(n){return Oe(Yrt,n)}const Qrt=Yee;let Zrt=Re.DIV;function Qee(n){return Oe(Zrt,n)}const Xrt=Qee;let Jrt=Re.DX;function Zee(n){return Oe(Jrt,n)}const eot=Zee;let tot=Re.EMA;function Xee(n){return Oe(tot,n)}const not=Xee;let iot=Re.EXP;function Jee(n){return Oe(iot,n)}const rot=Jee;let oot=Re.FLOOR;function ete(n){return Oe(oot,n)}const sot=ete;let aot=Re.HT_DCPERIOD;function tte(n){return Oe(aot,n)}const lot=tte;let uot=Re.HT_DCPHASE;function nte(n){return Oe(uot,n)}const cot=nte;let dot=Re.HT_PHASOR;function ite(n){return Oe(dot,n)}const hot=ite;let fot=Re.HT_SINE;function rte(n){return Oe(fot,n)}const pot=rte;let got=Re.HT_TRENDLINE;function ote(n){return Oe(got,n)}const mot=ote;let bot=Re.HT_TRENDMODE;function ste(n){return Oe(bot,n)}const _ot=ste;let yot=Re.IMI;function ate(n){return Oe(yot,n)}const vot=ate;let Cot=Re.KAMA;function lte(n){return Oe(Cot,n)}const wot=lte;let xot=Re.LINEARREG;function ute(n){return Oe(xot,n)}const Sot=ute;let Dot=Re.LINEARREG_ANGLE;function cte(n){return Oe(Dot,n)}const Not=cte;let Eot=Re.LINEARREG_INTERCEPT;function dte(n){return Oe(Eot,n)}const kot=dte;let Lot=Re.LINEARREG_SLOPE;function hte(n){return Oe(Lot,n)}const Mot=hte;let Tot=Re.LN;function fte(n){return Oe(Tot,n)}const Aot=fte;let Iot=Re.LOG10;function pte(n){return Oe(Iot,n)}const Rot=pte;let Oot=Re.MA;function gte(n){return Oe(Oot,n)}const Fot=gte;let Pot=Re.MACD;function mte(n){return Oe(Pot,n)}const Bot=mte;let Vot=Re.MACDEXT;function bte(n){return Oe(Vot,n)}const zot=bte;let Hot=Re.MACDFIX;function _te(n){return Oe(Hot,n)}const jot=_te;let Wot=Re.MAMA;function yte(n){return Oe(Wot,n)}const $ot=yte;let Uot=Re.MAVP;function vte(n){return Oe(Uot,n)}const qot=vte;let Kot=Re.MAX;function Cte(n){return Oe(Kot,n)}const Got=Cte;let Yot=Re.MAXINDEX;function wte(n){return Oe(Yot,n)}const Qot=wte;let Zot=Re.MEDPRICE;function xte(n){return Oe(Zot,n)}const Xot=xte;let Jot=Re.MFI;function Ste(n){return Oe(Jot,n)}const est=Ste;let tst=Re.MIDPOINT;function Dte(n){return Oe(tst,n)}const nst=Dte;let ist=Re.MIDPRICE;function Nte(n){return Oe(ist,n)}const rst=Nte;let ost=Re.MIN;function Ete(n){return Oe(ost,n)}const sst=Ete;let ast=Re.MININDEX;function kte(n){return Oe(ast,n)}const lst=kte;let ust=Re.MINMAX;function Lte(n){return Oe(ust,n)}const cst=Lte;let dst=Re.MINMAXINDEX;function Mte(n){return Oe(dst,n)}const hst=Mte;let fst=Re.MINUS_DI;function Tte(n){return Oe(fst,n)}const pst=Tte;let gst=Re.MINUS_DM;function Ate(n){return Oe(gst,n)}const mst=Ate;let bst=Re.MOM;function Ite(n){return Oe(bst,n)}const _st=Ite;let yst=Re.MULT;function Rte(n){return Oe(yst,n)}const vst=Rte;let Cst=Re.NATR;function Ote(n){return Oe(Cst,n)}const wst=Ote;let xst=Re.OBV;function Fte(n){return Oe(xst,n)}const Sst=Fte;let Dst=Re.PLUS_DI;function Pte(n){return Oe(Dst,n)}const Nst=Pte;let Est=Re.PLUS_DM;function Bte(n){return Oe(Est,n)}const kst=Bte;let Lst=Re.PPO;function Vte(n){return Oe(Lst,n)}const Mst=Vte;let Tst=Re.ROC;function zte(n){return Oe(Tst,n)}const Ast=zte;let Ist=Re.ROCP;function Hte(n){return Oe(Ist,n)}const Rst=Hte;let Ost=Re.ROCR;function jte(n){return Oe(Ost,n)}const Fst=jte;let Pst=Re.ROCR100;function Wte(n){return Oe(Pst,n)}const Bst=Wte;let Vst=Re.RSI;function $te(n){return Oe(Vst,n)}const zst=$te;let Hst=Re.SAR;function Ute(n){return Oe(Hst,n)}const jst=Ute;let Wst=Re.SAREXT;function qte(n){return Oe(Wst,n)}const $st=qte;let Ust=Re.SIN;function Kte(n){return Oe(Ust,n)}const qst=Kte;let Kst=Re.SINH;function Gte(n){return Oe(Kst,n)}const Gst=Gte;let Yst=Re.SMA;function Yte(n){return Oe(Yst,n)}const Qst=Yte;let Zst=Re.SQRT;function Qte(n){return Oe(Zst,n)}const Xst=Qte;let Jst=Re.STDDEV;function Zte(n){return Oe(Jst,n)}const eat=Zte;let tat=Re.STOCH;function Xte(n){return Oe(tat,n)}const nat=Xte;let iat=Re.STOCHF;function Jte(n){return Oe(iat,n)}const rat=Jte;let oat=Re.STOCHRSI;function ene(n){return Oe(oat,n)}const sat=ene;let aat=Re.SUB;function tne(n){return Oe(aat,n)}const lat=tne;let uat=Re.SUM;function nne(n){return Oe(uat,n)}const cat=nne;let dat=Re.T3;function ine(n){return Oe(dat,n)}const hat=ine;let fat=Re.TAN;function rne(n){return Oe(fat,n)}const pat=rne;let gat=Re.TANH;function one(n){return Oe(gat,n)}const mat=one;let bat=Re.TEMA;function sne(n){return Oe(bat,n)}const _at=sne;let yat=Re.TRANGE;function ane(n){return Oe(yat,n)}const vat=ane;let Cat=Re.TRIMA;function lne(n){return Oe(Cat,n)}const wat=lne;let xat=Re.TRIX;function une(n){return Oe(xat,n)}const Sat=une;let Dat=Re.TSF;function cne(n){return Oe(Dat,n)}const Nat=cne;let Eat=Re.TYPPRICE;function dne(n){return Oe(Eat,n)}const kat=dne;let Lat=Re.ULTOSC;function hne(n){return Oe(Lat,n)}const Mat=hne;let Tat=Re.VAR;function fne(n){return Oe(Tat,n)}const Aat=fne;let Iat=Re.WCLPRICE;function pne(n){return Oe(Iat,n)}const Rat=pne;let Oat=Re.WILLR;function gne(n){return Oe(Oat,n)}const Fat=gne;let Pat=Re.WMA;function mne(n){return Oe(Pat,n)}const o5=Object.freeze(Object.defineProperty({__proto__:null,ACCBANDS:_J,ACOS:yJ,AD:vJ,ADD:CJ,ADOSC:wJ,ADX:xJ,ADXR:SJ,APO:DJ,AROON:NJ,AROONOSC:EJ,ASIN:kJ,ATAN:LJ,ATR:MJ,AVGDEV:TJ,AVGPRICE:AJ,BBANDS:IJ,BETA:RJ,BOP:OJ,CCI:FJ,CDL2CROWS:PJ,CDL3BLACKCROWS:BJ,CDL3INSIDE:VJ,CDL3LINESTRIKE:zJ,CDL3OUTSIDE:HJ,CDL3STARSINSOUTH:jJ,CDL3WHITESOLDIERS:WJ,CDLABANDONEDBABY:$J,CDLADVANCEBLOCK:UJ,CDLBELTHOLD:qJ,CDLBREAKAWAY:KJ,CDLCLOSINGMARUBOZU:GJ,CDLCONCEALBABYSWALL:YJ,CDLCOUNTERATTACK:QJ,CDLDARKCLOUDCOVER:ZJ,CDLDOJI:XJ,CDLDOJISTAR:JJ,CDLDRAGONFLYDOJI:eee,CDLENGULFING:tee,CDLEVENINGDOJISTAR:nee,CDLEVENINGSTAR:iee,CDLGAPSIDESIDEWHITE:ree,CDLGRAVESTONEDOJI:oee,CDLHAMMER:see,CDLHANGINGMAN:aee,CDLHARAMI:lee,CDLHARAMICROSS:uee,CDLHIGHWAVE:cee,CDLHIKKAKE:dee,CDLHIKKAKEMOD:hee,CDLHOMINGPIGEON:fee,CDLIDENTICAL3CROWS:pee,CDLINNECK:gee,CDLINVERTEDHAMMER:mee,CDLKICKING:bee,CDLKICKINGBYLENGTH:_ee,CDLLADDERBOTTOM:yee,CDLLONGLEGGEDDOJI:vee,CDLLONGLINE:Cee,CDLMARUBOZU:wee,CDLMATCHINGLOW:xee,CDLMATHOLD:See,CDLMORNINGDOJISTAR:Dee,CDLMORNINGSTAR:Nee,CDLONNECK:Eee,CDLPIERCING:kee,CDLRICKSHAWMAN:Lee,CDLRISEFALL3METHODS:Mee,CDLSEPARATINGLINES:Tee,CDLSHOOTINGSTAR:Aee,CDLSHORTLINE:Iee,CDLSPINNINGTOP:Ree,CDLSTALLEDPATTERN:Oee,CDLSTICKSANDWICH:Fee,CDLTAKURI:Pee,CDLTASUKIGAP:Bee,CDLTHRUSTING:Vee,CDLTRISTAR:zee,CDLUNIQUE3RIVER:Hee,CDLUPSIDEGAP2CROWS:jee,CDLXSIDEGAP3METHODS:Wee,CEIL:$ee,CMO:Uee,CORREL:qee,COS:Kee,COSH:Gee,DEMA:Yee,DIV:Qee,DX:Zee,EMA:Xee,EXP:Jee,FLOOR:ete,HT_DCPERIOD:tte,HT_DCPHASE:nte,HT_PHASOR:ite,HT_SINE:rte,HT_TRENDLINE:ote,HT_TRENDMODE:ste,IMI:ate,KAMA:lte,LINEARREG:ute,LINEARREG_ANGLE:cte,LINEARREG_INTERCEPT:dte,LINEARREG_SLOPE:hte,LN:fte,LOG10:pte,MA:gte,MACD:mte,MACDEXT:bte,MACDFIX:_te,MAMA:yte,get MAType(){return JE},MAVP:vte,MAX:Cte,MAXINDEX:wte,MEDPRICE:xte,MFI:Ste,MIDPOINT:Dte,MIDPRICE:Nte,MIN:Ete,MININDEX:kte,MINMAX:Lte,MINMAXINDEX:Mte,MINUS_DI:Tte,MINUS_DM:Ate,MOM:Ite,MULT:Rte,NATR:Ote,OBV:Fte,PLUS_DI:Pte,PLUS_DM:Bte,PPO:Vte,ROC:zte,ROCP:Hte,ROCR:jte,ROCR100:Wte,RSI:$te,SAR:Ute,SAREXT:qte,SIN:Kte,SINH:Gte,SMA:Yte,SQRT:Qte,STDDEV:Zte,STOCH:Xte,STOCHF:Jte,STOCHRSI:ene,SUB:tne,SUM:nne,T3:ine,TAN:rne,TANH:one,TEMA:sne,TRANGE:ane,TRIMA:lne,TRIX:une,TSF:cne,TYPPRICE:dne,ULTOSC:hne,VAR:fne,WCLPRICE:pne,WILLR:gne,WMA:mne,accBands:jtt,acos:$tt,ad:qtt,adOsc:Qtt,add:Gtt,adx:Xtt,adxr:ent,apo:nnt,aroon:rnt,aroonOsc:snt,asin:lnt,atan:cnt,atr:hnt,avgDev:pnt,avgPrice:mnt,bbands:_nt,beta:vnt,bop:wnt,cci:Snt,cdl2Crows:Nnt,cdl3BlackCrows:knt,cdl3Inside:Mnt,cdl3LineStrike:Ant,cdl3Outside:Rnt,cdl3StarsInSouth:Fnt,cdl3WhiteSoldiers:Bnt,cdlAbandonedBaby:znt,cdlAdvanceBlock:jnt,cdlBeltHold:$nt,cdlBreakaway:qnt,cdlClosingMarubozu:Gnt,cdlConcealBabysWall:Qnt,cdlCounterAttack:Xnt,cdlDarkCloudCover:eit,cdlDoji:nit,cdlDojiStar:rit,cdlDragonflyDoji:sit,cdlEngulfing:lit,cdlEveningDojiStar:cit,cdlEveningStar:hit,cdlGapSideSideWhite:pit,cdlGravestoneDoji:mit,cdlHammer:_it,cdlHangingMan:vit,cdlHarami:wit,cdlHaramiCross:Sit,cdlHignWave:Nit,cdlHikkake:kit,cdlHikkakeMod:Mit,cdlHomingPigeon:Ait,cdlIdentical3Crows:Rit,cdlInNeck:Fit,cdlInvertedHammer:Bit,cdlKicking:zit,cdlKickingByLength:jit,cdlLadderBottom:$it,cdlLongLeggedDoji:qit,cdlLongLine:Git,cdlMarubozu:Qit,cdlMatHold:ert,cdlMatchingLow:Xit,cdlMorningDojiStar:nrt,cdlMorningStar:rrt,cdlOnNeck:srt,cdlPiercing:lrt,cdlRickshawMan:crt,cdlRiseFall3Methods:hrt,cdlSeperatingLines:prt,cdlShootingStar:mrt,cdlShortLine:_rt,cdlSpinningTop:vrt,cdlStalledPattern:wrt,cdlStickSandwhich:Srt,cdlTakuri:Nrt,cdlTasukiGap:krt,cdlThrusting:Mrt,cdlTristar:Art,cdlUnique3River:Rrt,cdlUpsideGap2Crows:Frt,cdlXSideGap3Methods:Brt,ceil:zrt,cmo:jrt,correl:$rt,cos:qrt,cosh:Grt,dema:Qrt,div:Xrt,dx:eot,ema:not,exp:rot,floor:sot,htDcPeriod:lot,htDcPhase:cot,htPhasor:hot,htSine:pot,htTrendMode:_ot,htTrendline:mot,imi:vot,init:ek,kama:wot,linearReg:Sot,linearRegAngle:Not,linearRegIntercept:kot,linearRegSlope:Mot,ln:Aot,log10:Rot,macd:Bot,macdExt:zot,macdFix:jot,mama:$ot,max:Got,maxIndex:Qot,medPrice:Xot,mfi:est,midPoint:nst,midPrice:rst,min:sst,minIndex:lst,minMax:cst,minMaxIndex:hst,minusDI:pst,minusDM:mst,mom:_st,movingAverage:Fot,movingAverageVariablePeriod:qot,mult:vst,natr:wst,obv:Sst,plusDI:Nst,plusDM:kst,ppo:Mst,roc:Ast,rocP:Rst,rocR:Fst,rocR100:Bst,rsi:zst,sar:jst,sarExt:$st,sin:qst,sinh:Gst,sma:Qst,sqrt:Xst,stdDev:eat,stoch:nat,stochF:rat,stochRsi:sat,sub:lat,sum:cat,t3:hat,tan:pat,tanh:mat,tema:_at,trima:wat,trix:Sat,trueRange:vat,tsf:Nat,typPrice:kat,ultOsc:Mat,variance:Aat,wclPrice:Rat,willR:Fat,wma:mne},Symbol.toStringTag,{value:"Module"}));let bne=!1,_ne=!0,yne=[];const vne=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}},Bat=async()=>{if(!bne)bne=!0,await ek("./talib.wasm"),_ne=!1,yne.forEach(n=>{n()});else if(_ne)return new Promise(n=>{yne.push(n)})},b_=(n,e)=>n.length>e?n.slice(n.length-e):n,Vat=(n,e,t)=>n.calculationFn?n.calculationFn(o5,e,t):new Array(e.time.length).fill(null),zat=async(n,e,t)=>{const i=vne(n);let r=[];return r=vne(r),await Bat(),{originData:b_(n,t),kLine:b_(i.kLineData,t),time:b_(i.time,t),indicator:e.config.reduce((o,s)=>(o.push({key:s.key,color:s.color,data:b_(Vat(s,i,r),t)}),o),[])}},tk="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMj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jUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",s5=(n,e)=>{const{type:t="log",color:i="black"}=e??{};localStorage.getItem("st-kline-console-show")==="true"&&console[t](`%c${n}`,`color:${i}`)},Ta=n=>n||n===0?Math.round(n*1e3)/1e3:null,Hat=n=>n>=1e12?`${(n/1e12).toFixed(2)}万亿`:n>=1e8?`${(n/1e8).toFixed(2)}亿`:n>=1e4?`${(n/1e4).toFixed(2)}万`:n.toFixed(2),jat=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)}}}},Wat=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)}}}},$at=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 b=(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")&&b(w,!0)},y=x=>{(x.code==="AltLeft"||x.code==="AltRight")&&b(w,!1)},window.addEventListener("keydown",m),window.addEventListener("keyup",y)},_=v=>{let w=null;v.target.type==="line"?w=v.target.parent:v.target.type==="tspan"&&(w=v.target.parent.parent.parent),b(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):_(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)}}}},__=(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},Uat=(n,e)=>n.reduce((t,i)=>{var d;const r=__(i,"sellBuy"),o=n.filter(h=>h.time===i.time);let s="image://"+new URL(Object.assign({"./images/buy.svg":tk,"./images/sell.svg":nk,"./images/t.svg":ik})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href;o.length>1?[...new Set(o.map(f=>__(f,"sellBuy")))].length>1?s="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5Lj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Njk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":tk,"./images/sell.svg":nk,"./images/t.svg":ik})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":tk,"./images/sell.svg":nk,"./images/t.svg":ik})[`./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(b=>b[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},[]),qat=(n,e)=>n.reduce((t,i,r)=>{var h;const o=__(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=__(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(b=>b[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},[]),Kat=(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",()=>Uat(o,e)],["openClose",()=>qat(o,e)],["signal",()=>{}]]).get(r);return a instanceof Function&&t.push(...a()),t},[]),rk=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:b}=await zat(n,t,s),C=b.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}}}),_=Kat(e,y);let v=[];return _.forEach(w=>{w.markLineTarget&&(v=[...v,...w.markLineTarget])}),{animation:!1,dataset:{id:"data",source:{klineData:m,indicatorData:b}},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(Ta(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:L,data:E}=N;if(L==="sellBuy"){const k=E.filter(R=>R.time===D.axisValue);let A=0,F=0;k.forEach(R=>{R.tradeType==="开多"||R.tradeType==="平空"?A+=R.amount:F+=R.amount}),A&&(S+=`<div>买: ${A}</div>`),F&&(S+=`<div>卖: ${F}</div>`)}L==="openClose"&&E.forEach(k=>{k.time===D.axisValue&&(S+=k.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=>Ta(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:_},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)"}}}},Gat=(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=[],b={},C=[],_={};if(n.forEach(({key:v,data:w,...x})=>{v==="warning"?(g=w,m=x):v==="position"?(y=w,b=x):v==="condition"&&(C=w,_=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 L={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,jat(L)]},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 L={y:t.convertToPixel({yAxisIndex:0},x),text:S,info:{info:D,config:{...a,...N},event:{...b}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Wat(L)]},d)),C.length>0&&(d=C.reduce((v,w)=>{const{value:x,text:S,profitValue:D,profitText:N,lossValue:L,lossText:E,info:k,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},L),lossText:E,info:{info:k,config:{...l,...A},event:{..._}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,$at(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,L=Qat(w,1,50),E=Zat(w),k=E?N/E:0,A=Yat(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:`均值: ${Ta(D)} 距均值: ${Ta(N)} 中值: ${Ta(L)} 标准差: ${Ta(E)} 距均值/标准差: ${Ta(k)} 百分位: ${Ta(A)}%`,lineWidth:1,opacity:1},z:10}]}}return{elements:d}},Yat=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=vl,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))},Qat=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=vl,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 Zat(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 Xat={class:"st-kline"},Jat={class:"st-kline-header"},elt=300,tlt=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:Q,business:W,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)"}),Q&&M.push({label:"收",value:I[1],color:"rgb(153, 153, 153)"}),W&&M.push({label:"额",value:Hat(I[4]),color:"rgb(153, 153, 153)"}),z){let ne=((I[1]-I[5])/I[1]*100).toFixed(2),ce=+ne==0?"white":+ne>0?"red":"#00ff00";M.push({label:"涨跌",value:`${ne}%`,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:Ta(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]?Ta(I.data[o.value][1]):null)!==null&&R.push({label:I.name,value:Ta((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]?Ta(M.data[o.value][1]):null)!==null&&R.push({label:M.name.split("-")[1],value:`${Ta((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()=>{s5("st-kline组件消息:props.lineData监控,额外画线数据发生改变,重绘->line",{color:"red"}),u("line")},{deep:!0}),c.watch(()=>e.brushRange,async()=>{s5("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 rk(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),s5("st-kline组件消息:K线绘制完毕-draw",{color:"green"})}],["line",()=>{const M=m.getOption(),O=Gat(e.lineData,i.value,m);r.value={...M,graphic:O},m.setOption(r.value,{replaceMerge:["graphic"]}),s5("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}]}),s5("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 rk(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 rk(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,Q,W)=>{const{name:z,data:ne}=Q,ce={name:`二腿价格走势图-${z}`,type:"line",data:ne,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[W]},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((Q,W,z)=>{const{name:ne,data:ce}=W,le=ce.length>i.value.totalBarCount?ce.slice(ce.length-i.value.totalBarCount):ce,ie=le[P][1],oe=le.map(pe=>[pe[0],(pe[1]-ie)/ie*100]),he={name:`二腿价格走势百分比图-${ne}`,type:"line",data:oe,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[z]},lineStyle:{type:"dashed",width:1}};return Q.push(he),Q},[]);M.series=[...M.series.filter(Q=>!Q.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 b=(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,_=!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&&!_&&!v.value&&(_=!0,await i.value.dynamicLoadConfig.historyLoadCallBack(v),await u("history"),_=!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},elt)};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})},L=()=>{m.on("highlight",F=>{b(F,m)}),m.on("globalout",()=>{b(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")},k=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}))},Q=()=>{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})}},W=()=>{if(M-I<5)return;const le=Math.floor((o.value-I)/2)+1,ie=Math.floor((M-o.value)/2)+1;I=I+le,M=M-ie,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",Q],["ArrowUp",W],["ArrowDown",z]]).get(F.code);ce instanceof Function&&ce()},A=async()=>{let F=!0;m=qr.init(g.value),await u(),h.value=e.defaultMenuData,o.value=m.getOption().dataZoom[0].endValue??-1,L(),y=new ResizeObserver(()=>{if(F){F=null;return}m.resize(),u("line")}),y.observe(g.value),window.addEventListener("keydown",k)};return c.onMounted(()=>{A()}),c.onUnmounted(()=>{E(),window.removeEventListener("keydown",k),m.dispose(),y.disconnect(),y=null}),(F,R)=>{const I=uz,M=lz;return c.openBlock(),c.createElementBlock("div",Xat,[c.createElementVNode("div",Jat,[c.createVNode(ZE,{data:s.value},null,8,["data"]),c.createVNode(ZE,{data:a.value},null,8,["data"]),c.createVNode(ZE,{data:l.value},null,8,["data"])]),c.createVNode(Vtt,{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})])}}}),UMt="",qMt="",nlt=gn(tlt,[["__scopeId","data-v-57c04894"]]),ilt={class:"kline-tips"},rlt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",ilt,[(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))]))}}),KMt="",ok=gn(rlt,[["__scopeId","data-v-dc7d381b"]]),GMt="",olt={class:"klineSub"},slt={class:"klineSub-tips"},alt={key:0,class:"klineSub-tips-select"},llt=gn({__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}=vl;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=qr.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=>{qr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:b,rightYAxisRange:C}=a.data.subIndicator[0],_=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:b==="cover"?v=>v.min:null,max:b==="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:_},!0)})}}),(f,p)=>{const g=ll,m=al;return c.openBlock(),c.createElementBlock("div",olt,[c.createElementVNode("div",slt,[d.value.length?(c.openBlock(),c.createElementBlock("div",alt,[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(ok,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-aba58678"]]),QMt="",ult={class:"kline-tips"},clt=gn({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=vl,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",ult,[c.createVNode(ok,{data:r.value},null,8,["data"]),c.createVNode(ok,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-09ec31e8"]]),dlt={__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}},XMt="",hlt=gn({__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=qr.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),b=m===100?p.length-1:Math.floor(m*p.length/100);d(y,b),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((b,C)=>{m===-1&&b[0]===f?m=C:m===-1&&new Date(b[0])>new Date(f)&&(m=C-1),(y===-1&&b[0]===p||y===-1&&new Date(b[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"]]),flt={install(n){n.component("st-kline",nlt),n.component("st-kline-sub-new",llt),n.component("st-kline-tips-new",clt),n.component("st-kline-slide-new",hlt),n.component("st-kline-utils-new",dlt)}};let P2=null;const plt=n=>{const e=hJ(n,{handleReq:t=>{gJ()&&(t.headers.token=pJ())},handleRes:t=>{const{data:i}=t;if(i.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:YE(),!0}});e.get,P2=e.post},glt=n=>P2("/middleLayer/kline/getKlineBasic",{...n,userId:R1("id")}),mlt=n=>P2("/middleLayer/kline/getKline",n),blt=async n=>P2("/alarm/deliversign/addAlarmPrice",{...n,userId:R1("id")}),_lt=async n=>P2("/alarm/deliversign/findAlarmPriceByUserId",{...n,userId:R1("id")}),Cne=async n=>P2("/alarm/deliversign/updateAlarmPrice",{...n,userId:R1("id")}),ylt=async n=>P2("/alarm/deliversign/deleteAlarmPrice",{...n,userId:R1("id")}),{round:a5}=vl,vlt=(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(a5(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=>a5(f.min),max:f=>a5(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)"}}}},Clt=(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 b;if(y.target&&y.target.childAt(1)){const C=n.convertFromPixel({yAxisIndex:0},g+(y.offsetY-m));(b=y.target.childAt(1))==null||b.animate("style",!1).when(1,{text:a5(C,3)}).start()}},ondragend:async y=>{const C=y.offsetY-m;if(C!==0){const _=n==null?void 0:n.convertFromPixel({yAxisIndex:0},C+g),v={id:f.id,warnPrice:a5(_,3),featureId:s,featureCode:o,featureType:a};await Cne(v),Xt.success("画线预警修改成功"),r&&r()}}}]},[])},wlt={class:"kline-tips"},xlt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",wlt,[(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))]))}}),eTt="",sk=gn(xlt,[["__scopeId","data-v-f83b6b36"]]),tTt="",Slt={class:"kline-tips"},Dlt=gn({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=vl,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",Slt,[c.createVNode(sk,{data:r.value},null,8,["data"]),c.createVNode(sk,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-ffa125ec"]]),iTt="",Nlt={class:"klineSub"},Elt={class:"klineSub-tips"},klt={key:0,class:"klineSub-tips-select"},Llt=gn({__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}=vl;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=qr.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=>{qr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:b,rightYAxisRange:C}=a.data.subIndicator[0],_=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:b==="cover"?v=>v.min:null,max:b==="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:_},!0)})}}),(f,p)=>{const g=ll,m=al;return c.openBlock(),c.createElementBlock("div",Nlt,[c.createElementVNode("div",Elt,[d.value.length?(c.openBlock(),c.createElementBlock("div",klt,[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(sk,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-ab519de5"]]),Mlt=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))}}),oTt="",Tlt=gn(Mlt,[["__scopeId","data-v-811db6b4"]]),sTt="",wne=n=>(c.pushScopeId("data-v-9e6456be"),n=n(),c.popScopeId(),n),Alt={class:"klineBasic-tips"},Ilt={key:0,class:"klineBasic-sub"},Rlt={key:1,class:"klineBasic-empty"},Olt={key:2,class:"klineBasic-error"},Flt=wne(()=>c.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),Plt={style:{"text-align":"center"}},Blt=wne(()=>c.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Vlt={class:"dialog-footer"},zlt=gn({__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),b=c.ref("VOL"),C=c.ref(0),_=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 W,z;return[h.variety,h.cycle,h.mainIndicator,b.value,(W=h.indicatorStore)==null?void 0:W.filterIndicator,(z=h.indicatorStore)==null?void 0:z.customIndicator]},()=>{A()},{deep:!0}),c.onMounted(()=>{plt(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 L=()=>{o||(o=qr.init(m.value),k(),N.value.showSubChart&&y.value.connect(o),r=fJ(m.value),r.listen(()=>{requestAnimationFrame(()=>{o.resize()})}))},E=({code:W,ctrlKey:z})=>{if(!(z||f.value))return;const{xAxis:ne,dataZoom:ce}=o.getOption(),{data:le}=(ne==null?void 0:ne[0])??{data:[]};let{startValue:ie,endValue:oe}=(ce==null?void 0:ce[0])??{};if(le!=null&&le.length){switch(W){case"ArrowUp":{if(oe-ie<5)return;const he=Math.floor((oe-ie)/2)+1;ie=ie+he,oe-ie<5&&(ie=oe-4);break}case"ArrowDown":{const he=Math.min(500,oe-ie);ie=ie-he-1;break}case"ArrowLeft":{ie>0&&(ie-=1,oe-=1),C.value>0&&(C.value-=1);break}case"ArrowRight":{oe<le.length-1&&(ie+=1,oe+=1),f.value&&C.value<le.length-1&&(C.value+=1);break}}o.dispatchAction({type:"dataZoom",startValue:ie,endValue:oe}),o.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:f.value?C.value:null}),o.dispatchAction({type:"highlight",dataIndex:f.value?C.value:oe})}},k=()=>{o==null||o.on("datazoom",z=>{clearTimeout(a),a=setTimeout(()=>{var ce,le,ie,oe;const{loadCheckCounts:ne}=N.value;if((le=(ce=o==null?void 0:o.getOption())==null?void 0:ce.dataZoom)!=null&&le[0]){const{startValue:he}=(oe=(ie=o==null?void 0:o.getOption())==null?void 0:ie.dataZoom)==null?void 0:oe[0];he<ne&&l===!1&&u===!1&&(l=!0,F("history")),I()}clearTimeout(a)},100)}),o==null||o.on("highlight",z=>{var ce,le;let ne=z.dataIndex||-1;z.batch&&(ne=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=ne,clearTimeout(s)},20)}),o==null||o.on("globalout",()=>{var ne,ce,le;const z=(le=(ce=(ne=o==null?void 0:o.getOption())==null?void 0:ne.dataZoom)==null?void 0:ce[0])==null?void 0:le.endValue;C.value=z});let W=null;o==null||o.on("contextmenu",z=>{W=setTimeout(()=>{z.componentType==="graphic"&&(w.value=z.info,D.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(W),W=null})})},A=async()=>{var W,z,ne,ce,le,ie;try{if(!h.variety||!h.cycle)return;const{variety:oe,featureId:he,cycle:pe,indicatorStore:de,mainIndicator:ve,right:Le,startTime:ee,endTime:j}=h,{defaultShowCounts:Y,addCounts:te,showWarningLine:J,getFactorData:re}=N.value,G={variety:oe,featureId:he,cycle:pe,mainIndicatorList:de.getIndicatorParams(ve),subIndicator:b.value,right:Le,showWarningLine:J,getFactorData:re};ee&&j?(G.startTime=ee,G.endTime=j):ee?(G.startTime=ee,G.limit=Y+te):j?(G.endTime=j,G.limit=Y+te):(G.endTime=bt().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),G.limit=Y+te);const Z=await glt(G);if((ne=(z=(W=Z==null?void 0:Z.body)==null?void 0:W.kline)==null?void 0:z.time)!=null&&ne.length)p.value=!1,g.value=!1;else{p.value=!0,g.value=!1;return}_.value=(ce=Z==null?void 0:Z.body)==null?void 0:ce.kline,v.value=((le=Z==null?void 0:Z.body)==null?void 0:le.warningLine)||[],R(),I(),re&&d("getFactorData",(ie=Z==null?void 0:Z.body)==null?void 0:ie.factor)}catch(oe){throw g.value=!0,p.value=!1,new Error(oe)}},F=async W=>{const{variety:z,cycle:ne,indicatorStore:ce,mainIndicator:le,right:ie}=h,{addCounts:oe}=N.value,{time:he}=_.value;if(W==="history"){const pe=await mlt({variety:z,cycle:ne,endTime:he[0],limit:oe,mainIndicatorList:ce.getIndicatorParams(le),subIndicator:b.value,right:ie});_.value={time:[...pe.body.time,..._.value.time.slice(1)],data:[...pe.body.data,..._.value.data.slice(1)],mainIndicator:_.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:_.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=(W=!1)=>{var ve,Le,ee;L();const{time:z}=_.value,{gridRight:ne,gridLeft:ce,defaultShowCounts:le,maxShowCounts:ie,showSubChart:oe}=N.value;let he=z.length-1-le,pe=z.length-1;if(W){const j=o.getOption(),Y=(Le=(ve=j==null?void 0:j.xAxis)==null?void 0:ve[0])==null?void 0:Le.data,te=(ee=j==null?void 0:j.dataZoom)==null?void 0:ee[0],J=Y[te==null?void 0:te.startValue],re=Y[te==null?void 0:te.endValue];he=z.findIndex(G=>G===J),pe=z.findIndex(G=>G===re)}const de=vlt(_.value,N.value,he,pe,h.cycle);if(o.setOption(de,!0),C.value=pe,h.brushRange){let j=null,Y=null;switch(h.cycle){case"6":{j=z.find(te=>new Date(te).getTime()>=new Date(h.brushRange[0]).getTime()||bt(te).format("YYYY-MM-DD")===bt(h.brushRange[0]).format("YYYY-MM-DD")),Y=z.findLast(te=>new Date(te).getTime()<=new Date(h.brushRange[1]).getTime()||bt(te).format("YYYY-MM-DD")===bt(h.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{j=z.find(te=>bt(te).day(5).format("YYYY-MM-DD")===bt(h.brushRange[0]).day(5).format("YYYY-MM-DD")),Y=z.findLast(te=>bt(te).day(5).format("YYYY-MM-DD")===bt(h.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{j=z.find(te=>bt(te).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[0]).endOf("month").format("YYYY-MM-DD")),Y=z.findLast(te=>bt(te).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:j=z.find(te=>new Date(te).getTime()>=new Date(h.brushRange[0]).getTime()),Y=z.findLast(te=>new Date(te).getTime()<=new Date(h.brushRange[1]).getTime())}console.log(j,Y),o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[j,Y],xAxisIndex:0}]})}oe&&y.value.draw({startValue:he,endValue:pe,maxValueSpan:ie},{gridLeft:ce,gridRight:ne}),M()},I=()=>{if(!o)return;const W=o==null?void 0:o.getOption();W&&(o==null||o.setOption({...W,graphic:[...Clt(o,v.value,h,N.value,()=>{O()})]},!0),M())},M=()=>{const{time:W}=_.value;if(h.brushRange&&(W!=null&&W.length)){let z=bt(h.brushRange[0]).format("YYYY-MM-DD 00:00:00"),ne=bt(h.brushRange[1]).format("YYYY-MM-DD 23:59:59"),ce=null,le=null;switch(h.cycle){case"6":{ce=W.find(ie=>bt(ie).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD")),le=ce;break}case"7":{ce=W.find(ie=>bt(ie).day(5).format("YYYY-MM-DD")===bt(z).day(5).format("YYYY-MM-DD")),le=W.findLast(ie=>bt(ie).day(5).format("YYYY-MM-DD")===bt(ne).day(5).format("YYYY-MM-DD"));break}case"8":{ce=W.find(ie=>bt(ie).endOf("month").format("YYYY-MM-DD")===bt(z).endOf("month").format("YYYY-MM-DD")),le=W.findLast(ie=>bt(ie).endOf("month").format("YYYY-MM-DD")===bt(ne).endOf("month").format("YYYY-MM-DD"));break}default:ce=W.find(ie=>{const oe=bt(ie).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD"),he=new Date(ie).getTime()>=new Date(z).getTime();return oe&&he}),le=W.findLast(ie=>{const oe=bt(ie).format("YYYY-MM-DD")===bt(ne).format("YYYY-MM-DD"),he=new Date(ie).getTime()<=new Date(ne).getTime();return oe&&he})}o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[ce,le],xAxisIndex:0}]})}},O=async()=>{const W=await _lt({featureId:h.featureId});v.value=(W==null?void 0:W.body)||[],I(),d("change","warningLine",v.value)},P=async W=>{const{variety:z,varietyName:ne,featureId:ce,featureType:le}=h;if(W.key==="drawWarningLine"){const ie=o==null?void 0:o.getOption(),oe=ie.tooltip[0];o==null||o.setOption({...ie,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({...ie,tooltip:{...oe,axisPointer:{...oe.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...oe.axisPointer.label,backgroundColor:null}}}}),await blt({featureCode:z,featureName:ne,featureId:ce,featureType:le,warnPrice:ve}),Xt.success("画线预警成功!"),O()};o==null||o.getZr().on("mousedown",he)}else W.key==="deleteWarningLine"?(await ylt({id:w.value.id}),Xt.success("画线预警删除成功"),O()):W.key==="changeWarningLine"&&(x.value=!0,S.value=w.value.warnPrice)},U=async()=>{const{variety:W,varietyName:z,featureId:ne,featureType:ce}=h;await Cne({id:w.value.id,featureCode:W,featureName:z,featureId:ne,featureType:ce,warnPrice:S.value}),Xt.success("画线预警修改成功"),O()},Q=()=>{D.value=[...i]};return e({draw:(W,z)=>{W==="warningLine"&&(v.value=z,I())}}),(W,z)=>{var pe;const ne=uz,ce=lz,le=Zg,ie=Kr,oe=P6,he=sl;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",Alt,[c.createVNode(Dlt,{data:_.value,activeIndex:C.value},null,8,["data","activeIndex"])]),c.createElementVNode("div",{class:"klineBasic-main",style:c.normalizeStyle({height:N.value.showSubChart?"70%":"100%"})},[c.createVNode(Tlt,{onCloseContextMenuCallBack:Q},{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(ne,{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",Ilt,[c.createVNode(Llt,{ref_key:"klineSubRef",ref:y,modelValue:b.value,"onUpdate:modelValue":z[0]||(z[0]=de=>b.value=de),data:_.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",Rlt,[c.createVNode(le,{class:"klineBasic-empty-content",description:"暂无数据"})])):c.createCommentVNode("",!0),g.value?(c.openBlock(),c.createElementBlock("div",Olt,[Flt,c.createElementVNode("div",Plt,[c.createVNode(ie,{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",Vlt,[c.createVNode(ie,{onClick:z[4]||(z[4]=de=>x.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("取消")]),_:1}),c.createVNode(ie,{type:"primary",onClick:U},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[Blt,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-9e6456be"]]),Hlt={install(n){n.component("st-klineBasic",zlt)}},lTt="",uTt="",jlt=[{label:"买卖",value:0},{label:"开平",value:1}],y_=()=>({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}),Wlt=(n,e)=>{var t;return((t=e.find(i=>i.value===n))==null?void 0:t.label)??"-"},cTt="",Cl=n=>(c.pushScopeId("data-v-f364d4b3"),n=n(),c.popScopeId(),n),$lt={class:"kline-config element-dark"},Ult={class:"setting-item"},qlt=Cl(()=>c.createElementVNode("span",{class:"label"},"主图指标: ",-1)),Klt={class:"setting-item"},Glt=Cl(()=>c.createElementVNode("span",{class:"label"},"交易点位: ",-1)),Ylt={class:"setting-item"},Qlt=Cl(()=>c.createElementVNode("span",{class:"label"},"开平点按价格标: ",-1)),Zlt={class:"setting-item"},Xlt=Cl(()=>c.createElementVNode("span",{class:"label"},"单周期: ",-1)),Jlt={class:"setting-item"},eut=Cl(()=>c.createElementVNode("span",{class:"label"},"多周期: ",-1)),tut={class:"mode"},nut={class:"cycleName"},iut={class:"content"},rut={class:"setting-item"},out=Cl(()=>c.createElementVNode("span",{class:"label"},"默认展示: ",-1)),sut={class:"setting-item"},aut=Cl(()=>c.createElementVNode("span",{class:"label"},"高亮交易范围: ",-1)),lut={class:"setting-item"},uut=Cl(()=>c.createElementVNode("span",{class:"label"},"展示当屏时间: ",-1)),cut={class:"setting-item"},dut=Cl(()=>c.createElementVNode("span",{class:"label"},"展示当屏最高价: ",-1)),hut={class:"setting-item"},fut=Cl(()=>c.createElementVNode("span",{class:"label"},"多周期双击图表切换至单周期: ",-1)),put={class:"setting-item"},gut=Cl(()=>c.createElementVNode("span",{class:"label"},"开启副图: ",-1)),mut={class:"setting-item"},but=Cl(()=>c.createElementVNode("span",{class:"label"},"开启拖拽轴: ",-1)),_ut={class:"setting-footer"},yut=gn({__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,y_())},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,y_(),g?JSON.parse(g):{})}else{const g=localStorage.getItem("userKlineConfig");Object.assign(a,y_(),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??[]}),watch(()=>o.indicatorStore.mainIndicatorList,()=>{u.value=o.indicatorStore.mainIndicatorList??[]}),e({open:async()=>{await f(),s.value=!0},getDefaultUserKlineConfig:y_}),(g,m)=>{const y=T6,b=ll,C=al,_=u1,v=MH,w=oye,x=s1,S=Kr,D=N6e;return c.openBlock(),c.createElementBlock("div",$lt,[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",Ult,[qlt,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,L)=>(c.openBlock(),c.createBlock(b,{key:L,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Klt,[Glt,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(jlt),(N,L)=>(c.openBlock(),c.createBlock(b,{key:L,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Ylt,[Qlt,c.createVNode(_,{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",Zlt,[Xlt,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,L)=>(c.openBlock(),c.createBlock(b,{key:L,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Jlt,[eut,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,L)=>(c.openBlock(),c.createElementBlock("div",tut,[c.createElementVNode("div",nut,[c.createElementVNode("span",null,c.toDisplayString(c.unref(Wlt)(a.multiCycleList[L],l.value)),1),c.createVNode(C,{modelValue:a.multiCycleList[L],"onUpdate:modelValue":E=>a.multiCycleList[L]=E,"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(E,k)=>(c.openBlock(),c.createBlock(b,{key:k,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),c.createElementVNode("span",iut,c.toDisplayString(L+1)+"号位K线",1)]))),256))],2),c.createElementVNode("div",rut,[out,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",sut,[aut,c.createVNode(w,{modelValue:a.enable_tradeLogBrush,"onUpdate:modelValue":m[6]||(m[6]=N=>a.enable_tradeLogBrush=N)},null,8,["modelValue"])]),c.createElementVNode("div",lut,[uut,c.createVNode(w,{modelValue:a.enable_showScreenTimeRange,"onUpdate:modelValue":m[7]||(m[7]=N=>a.enable_showScreenTimeRange=N)},null,8,["modelValue"])]),c.createElementVNode("div",cut,[dut,c.createVNode(w,{modelValue:a.enable_showScreenMaxPrice,"onUpdate:modelValue":m[8]||(m[8]=N=>a.enable_showScreenMaxPrice=N)},null,8,["modelValue"])]),c.createElementVNode("div",hut,[fut,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",put,[gut,c.createVNode(w,{modelValue:a.enable_subChart,"onUpdate:modelValue":m[10]||(m[10]=N=>a.enable_subChart=N)},null,8,["modelValue"])]),c.createElementVNode("div",mut,[but,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",_ut,[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-f364d4b3"]]),vut={install(n){n.component("st-klineConfig",yut)}},Cut=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 ek("./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:b,preLoadCount:C}=m;let _=[],v=[],w=[],x=[];u&&d?(_=l.filter(k=>new Date(k[0])>=new Date(u)&&new Date(k[0])<=new Date(d)),x=[...l]):d?(_=[...l.filter((k,A)=>A>=l.length-b&&new Date(y[0])<=new Date(k[0])&&new Date(k[0])<=new Date(y[1])),...a.originData],x=[...l,...a.originData]):u&&(_=[...a.originData,...l.filter((k,A)=>A>=C&&new Date(y[0])<=new Date(k[0])&&new Date(k[0])<=new Date(y[1]))],x=_),_.forEach((k,A)=>{v.push([k[1],k[4],k[3],k[2],A===0?0:_[A-1][4],k[6]]),w.push(k[0])});let S=[],D=[];const N={time:[],open:[],close:[],high:[],low:[],originData:x};let L=null,E=null;return x.forEach((k,A)=>{N.time.push(k[0]),N.open.push(k[1]),N.close.push(k[4]),N.high.push(k[2]),N.low.push(k[3]),k[0]===_[0][0]&&(L=A),k[0]===_[_.length-1][0]&&(E=A+1)}),S=f.find(({value:k})=>k===h).config.map(k=>{const{calculationFn:A}=k;return{...k,data:A?A(o5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}).slice(L,E):[]}}),D=g.find(({value:k})=>k===p).config.reduce((k,A)=>{const{source:F,calculationFn:R}=A;return F==="calculation"?[...k,{...A,data:R?R(o5,N).slice(L,E):[]}]:k},[]),{originData:_,candlestickData:v,mainIndicatorData:S,subIndicatorData:D,xAxisData:w,startTime:_[0][0],endTime:_[_.length-1][0],length:_.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,b=[],C=[],_=[],v=[],w=[];let x=[],S=[];const D=l.filter((A,F)=>(b.push(A[0]),C.push(A[1]),_.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:b,open:C,close:_,high:v,low:w,originData:l},E=d.find(A=>A.value===u).config.map(A=>({...A,data:o(A.calculationFn?A.calculationFn(o5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],x.length)}));let k=[];return h&&f&&(k=f.find(F=>F.value===h).config.reduce((F,R)=>R.source==="calculation"?[...F,{...R,data:o(R.calculationFn?R.calculationFn(o5,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:[...k[F].data,...A.data]}))}:g={originData:D,xAxisData:x,candlestickData:S,mainIndicatorData:E,subIndicatorData:k},g.length=g.xAxisData.length,g.startTime=g.xAxisData[0],g.endTime=g.xAxisData[g.length-1],g},fn:()=>{}}),(s,a)=>null}}),wut={class:"kline-tips"},xut=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",wut,[(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))]))}}),hTt="",ak=gn(xut,[["__scopeId","data-v-2a02e841"]]),Sut={class:"kline-tips"},Dut=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}=vl,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",Sut,[c.createVNode(ak,{data:a.value},null,8,["data"]),c.createVNode(ak,{data:l.value},null,8,["data"])]))}}),fTt="",Nut=gn(Dut,[["__scopeId","data-v-e75a1234"]]),Eut={class:"klineSub"},kut={class:"klineSub-tips"},Lut={key:0,class:"klineSub-tips-select"},Mut=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}=vl;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 b,C;let y="-";return m.source==="origin"?y=f.originData[p][m.dataIndex]||"-":m.source==="calculation"&&(y=(((C=(b=f.subIndicatorData)==null?void 0:b.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=qr.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=>{qr.connect([f,r])},draw:f=>{c.nextTick(()=>{var x;const{startValue:p,endValue:g,maxValueSpan:m}=f,{xAxisData:y,subIndicatorData:b,candlestickData:C,originData:_}=a.drawData,v=a.subIndicatorList.find(S=>S.value===u.value),w=[];if(v.series==="bar"){let S=[];v.source==="origin"?S=_.map(D=>D[v.dataIndex]):S=((x=b==null?void 0:b.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}})})}b.forEach(S=>{if(S.series==="line"){let D=[];S.source==="origin"?D=_.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=ll,m=al;return c.openBlock(),c.createElementBlock("div",Eut,[c.createElementVNode("div",kut,[d.value.length?(c.openBlock(),c.createElementBlock("div",Lut,[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)])}}}),pTt="",Tut=gn(Mut,[["__scopeId","data-v-0a2f256e"]]),Aut=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=qr.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),b=m===100?p.length-1:Math.floor(m*p.length/100);d(y,b),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((b,C)=>{m===-1&&b[0]===f?m=C:m===-1&&new Date(b[0])>new Date(f)&&(m=C-1),(y===-1&&b[0]===p||y===-1&&new Date(b[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))}}),gTt="",Iut=gn(Aut,[["__scopeId","data-v-5008746a"]]),Rut={install(n){n.component("st-klineUtils",Cut),n.component("st-klineSub",Tut),n.component("st-klineTips",Nut),n.component("st-klineSlide",Iut)}},mTt="",Out="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3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k5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",{round:But}=vl,B2={minValueSpan:5,maxValueSpan:2e3,loadCheckCount:500,loadAddCount:2e3},Vut={1:240,2:48,3:16,4:8,5:4,6:1,7:.2,8:.033},xne=({startTime:n,endTime:e,cycle:t,type:i="end"})=>{const{maxValueSpan:r}=B2,o=Math.ceil((r+1e3)/Vut[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")]}},zut=(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"}},Hut=(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:zut(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:B2.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(But(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}},lk=(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},jut=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},Sne=(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)]}),uk=(n,e,t)=>{switch(t){case"5":{let h=[...new Set(n.slice(-20).map(_=>{const v=new Date(_),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((_,v)=>new Date(`2000-01-30 ${_}`).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"),b=String(f.getMinutes()).padStart(2,"0"),C=String(f.getSeconds()).padStart(2,"0");if(`${y}:${b}:${C}`=="00:00:00")return`${p}-${g}-${m} 01:00:00`;{let _=null;for(let v=0;v<h.length;v++){const w=h[v].split(":");if(+`${w[0]}${w[1]}${w[2]}`>=+`${y}${b}${C}`){_=h[v];break}}if(_==="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} ${_}`}}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"),b=`${g}-${m}-${y} 09:00:00`,C=lk(n,b,"gte");return C===-1?b: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(),b=String(m.getMonth()+1).padStart(2,"0"),C=String(m.getDate()).padStart(2,"0");return`${y}-${b}-${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,b=new Date(r,o,s,m,y,0),C=D=>String(D).padStart(2,"0"),_=b.getFullYear(),v=C(b.getMonth()+1),w=C(b.getDate()),x=C(b.getHours()),S=C(b.getMinutes());return`${_}-${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}`)}},ck=(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]},Wut=(n,e,t,i,r,o)=>{const s=(p,g)=>{const{direction:m="",tradeAction:y="",tradeType:b=""}=p,C=b??m+y;switch(g){case 0:return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(C);case 1:return b??m+y}},a=(p,g,m,y)=>p.reduce((b,C)=>{var N;const _=s(C,0),v=p.filter(L=>L.klineTime===C.klineTime),w=[...new Set(v.map(L=>s(L,0)))];let x=null;w.length>1?x="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuN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yMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:x="image://"+new URL(Object.assign({"./images/buy.svg":Out,"./images/sell.svg":Fut,"./images/t.svg":Put})[`./images/${_==="买"?"buy":"sell"}.svg`],self.location).href;const S=lk(m,C.klineTime),D=(N=y[S])==null?void 0:N[3];return g.forEach(L=>{var k;const E=_==="买"?0:1;L.range[E]===C.klineTime&&(L.rangeValue[E]=(k=y[S])==null?void 0:k[_==="买"?2:3])}),b.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:_,amount:C.amount,part:C.part,profitAndLoss:C.profitAndLoss,openPriceAll:C.openPriceAll,closePriceAll:C.closePriceAll}}),b},[]),l=(p,g,m,y)=>{const{sellBuyByPrice:b}=o,C=p.reduce((_,v,w)=>{var N,L;const x=s(v,1),S=["开多","开空"].includes(x)?"top":"bottom";let D=null;if(b)D=S==="top"?(v.openPriceAll/v.amount).toFixed(2):(v.closePriceAll/v.amount).toFixed(2);else{const E=lk(m,v.klineTime);D=S==="top"?(N=y[E])==null?void 0:N[3]:(L=y[E])==null?void 0:L[2]}return g.forEach(E=>{(S==="top"?E.range[0]:E.range[1])===v.klineTime&&(E.rangeValue[S==="top"?0:1]=D)}),_.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}}),_},[]);return b?C:jut(C)},u=(p,g,m)=>{const{basePointData:y,baseLineData:b}=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:uk(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:uk(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:[]}),_=[...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=b.filter(({range:w})=>w[0]!==w[1]);return{pointData:_,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}])}},$ut=(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}},Uut=(n,e,t,i)=>{let r=[];if(["6","7","8"].includes(e)){const o=n.reduce((s,a)=>{const l=uk(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}},bTt="",qut={class:"tips"},dk=gn({__name:"Tips",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",qut,[(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"]]),yTt="",Kut=gn({__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=F2(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:b}=l.value,C=`${b[m].split(" ")[0]} 00:00:00`,_=`${b[y].split(" ")[0]} 23:59:59`;console.log(`检测到拖拽轴被拖动, 时间区间: ${C} - ${_}`),s("change",{startTime:C,endTime:_})}},200),h=F2(({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:b,lineData:C}=m.reduce((v,w,x)=>(v.xAxisData.push(y[x].split(" ")[0]),v.lineData.push(w[1]),v),{xAxisData:[],lineData:[]}),_={grid:{height:0,left:"100px",right:"80px"},xAxis:{type:"category",data:b,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(_,!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"),b=bt(g.endTime).format("YYYY-MM-DD");let C=-1,_=-1;for(let v=0;v<m.length;v++){const w=bt(m[v]).format("YYYY-MM-DD");if(C!==-1&&_!==-1)break;C===-1&&(new Date(w)===new Date(y)?C=v:new Date(w)>new Date(y)&&(C=v-1)),_===-1&&(new Date(w)===new Date(b)?_=v:new Date(w)>new Date(b)&&(_=v-1))}_===-1&&(_=m.length-1),r.dispatchAction({type:"dataZoom",startValue:C,endValue:_});break}}};return c.onMounted(()=>{c.nextTick(()=>{r=qr.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:F2(()=>r.resize(),100)}),(p,g)=>(c.openBlock(),c.createElementBlock("div",{class:"chart",ref_key:"sliderChartRef",ref:o},null,512))}},[["__scopeId","data-v-0c715da1"]]),CTt="",Gut={class:"main-chart"},Yut={class:"indicator"},Qut={key:0,class:"screen-time-range"},Zut={key:0,class:"sub-chart"},Xut={class:"indicator"},Jut={class:"title"},ect={key:1,class:"slider-chart"},tct=gn({__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}=vl,{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),b=c.ref(null),C=c.ref({data:[],mainIndicator:[],subIndicator:[],time:[]}),_=c.ref(0),v=c.ref([]),w=c.ref(null),x=c.ref("VOL"),S=c.computed(()=>{const O=C.value.data[_.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[_.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[_.value]||"-"})))||[]}),L=()=>{m||(m=qr.init(b.value),m.on("highlight",F2(O=>{var P;O.dataIndex?_.value=O.dataIndex:_.value=((P=O.batch)==null?void 0:P[0].dataIndex)??-1},10)),m.on("datazoom",F2(async()=>{var Q;const{loadCheckCount:O}=B2,{startValue:P,endValue:U}=((Q=m.getOption())==null?void 0:Q.dataZoom[0])??{};h===!1&&f===!1&&P<O&&await k("history"),u===!1&&d===!1&&U>C.value.time.length-O&&await k("new"),A(),R()})),m.on("globalout",()=>{const O=m.getOption();_.value=O.dataZoom[0].endValue}),m.getZr().on("contextmenu",()=>{var O;w.value=(O=C.value)==null?void 0:O.time[_.value]}),window.addEventListener("keydown",M),l.userKlineConfig.enable_subChart&&(g=qr.init(y.value),qr.connect([m,g])),p=fJ(b.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:Q}=await r.post("/middleLayer/kline/getKline",U);C.value=Q??{data:[],mainIndicator:[],subIndicator:[],time:[]};let W=-1,z=-1;for(let ne=0;ne<C.value.time.length;ne++){const ce=bt(C.value.time[ne]).format("YYYY-MM-DD");if(W!==-1&&z!==-1)break;W===-1&&(new Date(ce)===new Date(O)?W=ne:new Date(ce)>new Date(O)&&(W=ne-1)),z===-1&&(new Date(ce)===new Date(P)?z=ne:new Date(ce)>new Date(P)&&(z=ne-1))}z===-1&&(z=C.value.time.length-1),F({startValue:W===-1?0:W,endValue:z===-1?C.value.time.length-1:z})}finally{s.value=!1}},k=async O=>{var ce,le;const{loadAddCount:P}=B2;switch(O){case"history":{h=!0;const ie={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",ie);C.value=Sne(oe,C.value),oe.data.length<P&&(console.log("[K线] 获取更多数据: 左侧已全部获取完毕, 关闭"),f=!0),h=!1;break}case"new":{u=!0;const ie={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",ie);C.value=Sne(C.value,oe),oe.data.length<P&&(console.log("[K线] 获取更多数据: 右侧已全部获取完毕, 关闭"),d=!0),u=!1;break}}const{startValue:U,endValue:Q}=((ce=m.getOption())==null?void 0:ce.dataZoom[0])??{},W=(le=m.getOption())==null?void 0:le.xAxis[0].data,z=C.value.time.findIndex(ie=>new Date(ie)>=new Date(W[U])),ne=C.value.time.findIndex(ie=>new Date(ie)>=new Date(W[Q]));F({startValue:z===-1?0:z,endValue:ne===-1?C.value.time.length-1:ne})},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])??{},Q=O[P],W=O[U];["6","7","8"].includes(l.cycle)?v.value=[bt(Q).format("YYYY-MM-DD"),bt(W).format("YYYY-MM-DD")]:v.value=[Q,W]},F=(O={startValue:0,endValue:0})=>{L();const{maxValueSpan:P}=B2,{time:U,data:Q,mainIndicator:W}=C.value,z=O.endValue-O.startValue>P?O.endValue-P:O.startValue,ne=O.endValue,ce=W.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}=$ut(l.netPositionData,l.cycle),{tradeIncomeRateLineData:ie}=Uut(l.tradeIncomeRateData,l.cycle,l.incomeType,U),{tradePointData:oe,tradeLineData:he}=Wut(l.tradeLog,l.cycle,l.sellBuy,U,Q,l.userKlineConfig);m.setOption({animation:!1,grid:{top:"40px",left:"60px",right:"20px",bottom:"20px"},dataZoom:[{type:"inside",startValue:z,endValue:ne,minValueSpan:B2.minValueSpan,maxValueSpan:B2.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 ee=oe.filter(te=>(te==null?void 0:te.coord[0])===Le.axisValue);let j=0,Y=0;ee.forEach(te=>{const{tradeType:J,amount:re}=te.customData;J==="买"&&(j+=re),J==="卖"&&(Y+=re)}),j&&(de+=`<div>买: ${j}</div>`),Y&&(de+=`<div>卖: ${Y}</div>`)}else oe.forEach(ee=>{if((ee==null?void 0:ee.coord[0])===Le.axisValue){const{tradeType:j,amount:Y,profitAndLoss:te,openPriceAll:J,closePriceAll:re}=ee.customData;let G=`<div>${j}: ${Y}手</div>`;if(j.includes("开")&&(G+=`<div>开仓价: ${(J/Y).toFixed(2)}</div>`),j.includes("平")){const Z=(J/Y).toFixed(2),X=(re/Y).toFixed(2);G+=`<div>平仓价: ${X}</div>`,G+=`<div>盈亏: ${te==null?void 0:te.toFixed(2)}</div>`,G+=`<div>盈亏比率: ${((X-Z)/Z*100).toFixed(2)} %</div>`}de+=G}})}),!de)return null;let ve=pe[0].axisValue;return["6","7","8"].includes(l.cycle)&&(ve=bt(ve).format("YYYY-MM-DD")),`
|
|
142
|
+
`+t.message:i+="Unknown reason. Perhaps you specify the wrong file path to wasm binary?",new Error(i)})}let Htt=Re.ACCBANDS;function _J(n){return Oe(Htt,n)}const jtt=_J;let Wtt=Re.ACOS;function yJ(n){return Oe(Wtt,n)}const $tt=yJ;let Utt=Re.AD;function vJ(n){return Oe(Utt,n)}const qtt=vJ;let Ktt=Re.ADD;function CJ(n){return Oe(Ktt,n)}const Gtt=CJ;let Ytt=Re.ADOSC;function wJ(n){return Oe(Ytt,n)}const Qtt=wJ;let Ztt=Re.ADX;function xJ(n){return Oe(Ztt,n)}const Xtt=xJ;let Jtt=Re.ADXR;function SJ(n){return Oe(Jtt,n)}const ent=SJ;let tnt=Re.APO;function DJ(n){return Oe(tnt,n)}const nnt=DJ;let int=Re.AROON;function NJ(n){return Oe(int,n)}const rnt=NJ;let ont=Re.AROONOSC;function EJ(n){return Oe(ont,n)}const snt=EJ;let ant=Re.ASIN;function kJ(n){return Oe(ant,n)}const lnt=kJ;let unt=Re.ATAN;function LJ(n){return Oe(unt,n)}const cnt=LJ;let dnt=Re.ATR;function MJ(n){return Oe(dnt,n)}const hnt=MJ;let fnt=Re.AVGDEV;function TJ(n){return Oe(fnt,n)}const pnt=TJ;let gnt=Re.AVGPRICE;function AJ(n){return Oe(gnt,n)}const mnt=AJ;let bnt=Re.BBANDS;function IJ(n){return Oe(bnt,n)}const _nt=IJ;let ynt=Re.BETA;function RJ(n){return Oe(ynt,n)}const vnt=RJ;let Cnt=Re.BOP;function OJ(n){return Oe(Cnt,n)}const wnt=OJ;let xnt=Re.CCI;function FJ(n){return Oe(xnt,n)}const Snt=FJ;let Dnt=Re.CDL2CROWS;function PJ(n){return Oe(Dnt,n)}const Nnt=PJ;let Ent=Re.CDL3BLACKCROWS;function BJ(n){return Oe(Ent,n)}const knt=BJ;let Lnt=Re.CDL3INSIDE;function VJ(n){return Oe(Lnt,n)}const Mnt=VJ;let Tnt=Re.CDL3LINESTRIKE;function zJ(n){return Oe(Tnt,n)}const Ant=zJ;let Int=Re.CDL3OUTSIDE;function HJ(n){return Oe(Int,n)}const Rnt=HJ;let Ont=Re.CDL3STARSINSOUTH;function jJ(n){return Oe(Ont,n)}const Fnt=jJ;let Pnt=Re.CDL3WHITESOLDIERS;function WJ(n){return Oe(Pnt,n)}const Bnt=WJ;let Vnt=Re.CDLABANDONEDBABY;function $J(n){return Oe(Vnt,n)}const znt=$J;let Hnt=Re.CDLADVANCEBLOCK;function UJ(n){return Oe(Hnt,n)}const jnt=UJ;let Wnt=Re.CDLBELTHOLD;function qJ(n){return Oe(Wnt,n)}const $nt=qJ;let Unt=Re.CDLBREAKAWAY;function KJ(n){return Oe(Unt,n)}const qnt=KJ;let Knt=Re.CDLCLOSINGMARUBOZU;function GJ(n){return Oe(Knt,n)}const Gnt=GJ;let Ynt=Re.CDLCONCEALBABYSWALL;function YJ(n){return Oe(Ynt,n)}const Qnt=YJ;let Znt=Re.CDLCOUNTERATTACK;function QJ(n){return Oe(Znt,n)}const Xnt=QJ;let Jnt=Re.CDLDARKCLOUDCOVER;function ZJ(n){return Oe(Jnt,n)}const eit=ZJ;let tit=Re.CDLDOJI;function XJ(n){return Oe(tit,n)}const nit=XJ;let iit=Re.CDLDOJISTAR;function JJ(n){return Oe(iit,n)}const rit=JJ;let oit=Re.CDLDRAGONFLYDOJI;function eee(n){return Oe(oit,n)}const sit=eee;let ait=Re.CDLENGULFING;function tee(n){return Oe(ait,n)}const lit=tee;let uit=Re.CDLEVENINGDOJISTAR;function nee(n){return Oe(uit,n)}const cit=nee;let dit=Re.CDLEVENINGSTAR;function iee(n){return Oe(dit,n)}const hit=iee;let fit=Re.CDLGAPSIDESIDEWHITE;function ree(n){return Oe(fit,n)}const pit=ree;let git=Re.CDLGRAVESTONEDOJI;function oee(n){return Oe(git,n)}const mit=oee;let bit=Re.CDLHAMMER;function see(n){return Oe(bit,n)}const _it=see;let yit=Re.CDLHANGINGMAN;function aee(n){return Oe(yit,n)}const vit=aee;let Cit=Re.CDLHARAMI;function lee(n){return Oe(Cit,n)}const wit=lee;let xit=Re.CDLHARAMICROSS;function uee(n){return Oe(xit,n)}const Sit=uee;let Dit=Re.CDLHIGHWAVE;function cee(n){return Oe(Dit,n)}const Nit=cee;let Eit=Re.CDLHIKKAKE;function dee(n){return Oe(Eit,n)}const kit=dee;let Lit=Re.CDLHIKKAKEMOD;function hee(n){return Oe(Lit,n)}const Mit=hee;let Tit=Re.CDLHOMINGPIGEON;function fee(n){return Oe(Tit,n)}const Ait=fee;let Iit=Re.CDLIDENTICAL3CROWS;function pee(n){return Oe(Iit,n)}const Rit=pee;let Oit=Re.CDLINNECK;function gee(n){return Oe(Oit,n)}const Fit=gee;let Pit=Re.CDLINVERTEDHAMMER;function mee(n){return Oe(Pit,n)}const Bit=mee;let Vit=Re.CDLKICKING;function bee(n){return Oe(Vit,n)}const zit=bee;let Hit=Re.CDLKICKINGBYLENGTH;function _ee(n){return Oe(Hit,n)}const jit=_ee;let Wit=Re.CDLLADDERBOTTOM;function yee(n){return Oe(Wit,n)}const $it=yee;let Uit=Re.CDLLONGLEGGEDDOJI;function vee(n){return Oe(Uit,n)}const qit=vee;let Kit=Re.CDLLONGLINE;function Cee(n){return Oe(Kit,n)}const Git=Cee;let Yit=Re.CDLMARUBOZU;function wee(n){return Oe(Yit,n)}const Qit=wee;let Zit=Re.CDLMATCHINGLOW;function xee(n){return Oe(Zit,n)}const Xit=xee;let Jit=Re.CDLMATHOLD;function See(n){return Oe(Jit,n)}const ert=See;let trt=Re.CDLMORNINGDOJISTAR;function Dee(n){return Oe(trt,n)}const nrt=Dee;let irt=Re.CDLMORNINGSTAR;function Nee(n){return Oe(irt,n)}const rrt=Nee;let ort=Re.CDLONNECK;function Eee(n){return Oe(ort,n)}const srt=Eee;let art=Re.CDLPIERCING;function kee(n){return Oe(art,n)}const lrt=kee;let urt=Re.CDLRICKSHAWMAN;function Lee(n){return Oe(urt,n)}const crt=Lee;let drt=Re.CDLRISEFALL3METHODS;function Mee(n){return Oe(drt,n)}const hrt=Mee;let frt=Re.CDLSEPARATINGLINES;function Tee(n){return Oe(frt,n)}const prt=Tee;let grt=Re.CDLSHOOTINGSTAR;function Aee(n){return Oe(grt,n)}const mrt=Aee;let brt=Re.CDLSHORTLINE;function Iee(n){return Oe(brt,n)}const _rt=Iee;let yrt=Re.CDLSPINNINGTOP;function Ree(n){return Oe(yrt,n)}const vrt=Ree;let Crt=Re.CDLSTALLEDPATTERN;function Oee(n){return Oe(Crt,n)}const wrt=Oee;let xrt=Re.CDLSTICKSANDWICH;function Fee(n){return Oe(xrt,n)}const Srt=Fee;let Drt=Re.CDLTAKURI;function Pee(n){return Oe(Drt,n)}const Nrt=Pee;let Ert=Re.CDLTASUKIGAP;function Bee(n){return Oe(Ert,n)}const krt=Bee;let Lrt=Re.CDLTHRUSTING;function Vee(n){return Oe(Lrt,n)}const Mrt=Vee;let Trt=Re.CDLTRISTAR;function zee(n){return Oe(Trt,n)}const Art=zee;let Irt=Re.CDLUNIQUE3RIVER;function Hee(n){return Oe(Irt,n)}const Rrt=Hee;let Ort=Re.CDLUPSIDEGAP2CROWS;function jee(n){return Oe(Ort,n)}const Frt=jee;let Prt=Re.CDLXSIDEGAP3METHODS;function Wee(n){return Oe(Prt,n)}const Brt=Wee;let Vrt=Re.CEIL;function $ee(n){return Oe(Vrt,n)}const zrt=$ee;let Hrt=Re.CMO;function Uee(n){return Oe(Hrt,n)}const jrt=Uee;let Wrt=Re.CORREL;function qee(n){return Oe(Wrt,n)}const $rt=qee;let Urt=Re.COS;function Kee(n){return Oe(Urt,n)}const qrt=Kee;let Krt=Re.COSH;function Gee(n){return Oe(Krt,n)}const Grt=Gee;let Yrt=Re.DEMA;function Yee(n){return Oe(Yrt,n)}const Qrt=Yee;let Zrt=Re.DIV;function Qee(n){return Oe(Zrt,n)}const Xrt=Qee;let Jrt=Re.DX;function Zee(n){return Oe(Jrt,n)}const eot=Zee;let tot=Re.EMA;function Xee(n){return Oe(tot,n)}const not=Xee;let iot=Re.EXP;function Jee(n){return Oe(iot,n)}const rot=Jee;let oot=Re.FLOOR;function ete(n){return Oe(oot,n)}const sot=ete;let aot=Re.HT_DCPERIOD;function tte(n){return Oe(aot,n)}const lot=tte;let uot=Re.HT_DCPHASE;function nte(n){return Oe(uot,n)}const cot=nte;let dot=Re.HT_PHASOR;function ite(n){return Oe(dot,n)}const hot=ite;let fot=Re.HT_SINE;function rte(n){return Oe(fot,n)}const pot=rte;let got=Re.HT_TRENDLINE;function ote(n){return Oe(got,n)}const mot=ote;let bot=Re.HT_TRENDMODE;function ste(n){return Oe(bot,n)}const _ot=ste;let yot=Re.IMI;function ate(n){return Oe(yot,n)}const vot=ate;let Cot=Re.KAMA;function lte(n){return Oe(Cot,n)}const wot=lte;let xot=Re.LINEARREG;function ute(n){return Oe(xot,n)}const Sot=ute;let Dot=Re.LINEARREG_ANGLE;function cte(n){return Oe(Dot,n)}const Not=cte;let Eot=Re.LINEARREG_INTERCEPT;function dte(n){return Oe(Eot,n)}const kot=dte;let Lot=Re.LINEARREG_SLOPE;function hte(n){return Oe(Lot,n)}const Mot=hte;let Tot=Re.LN;function fte(n){return Oe(Tot,n)}const Aot=fte;let Iot=Re.LOG10;function pte(n){return Oe(Iot,n)}const Rot=pte;let Oot=Re.MA;function gte(n){return Oe(Oot,n)}const Fot=gte;let Pot=Re.MACD;function mte(n){return Oe(Pot,n)}const Bot=mte;let Vot=Re.MACDEXT;function bte(n){return Oe(Vot,n)}const zot=bte;let Hot=Re.MACDFIX;function _te(n){return Oe(Hot,n)}const jot=_te;let Wot=Re.MAMA;function yte(n){return Oe(Wot,n)}const $ot=yte;let Uot=Re.MAVP;function vte(n){return Oe(Uot,n)}const qot=vte;let Kot=Re.MAX;function Cte(n){return Oe(Kot,n)}const Got=Cte;let Yot=Re.MAXINDEX;function wte(n){return Oe(Yot,n)}const Qot=wte;let Zot=Re.MEDPRICE;function xte(n){return Oe(Zot,n)}const Xot=xte;let Jot=Re.MFI;function Ste(n){return Oe(Jot,n)}const est=Ste;let tst=Re.MIDPOINT;function Dte(n){return Oe(tst,n)}const nst=Dte;let ist=Re.MIDPRICE;function Nte(n){return Oe(ist,n)}const rst=Nte;let ost=Re.MIN;function Ete(n){return Oe(ost,n)}const sst=Ete;let ast=Re.MININDEX;function kte(n){return Oe(ast,n)}const lst=kte;let ust=Re.MINMAX;function Lte(n){return Oe(ust,n)}const cst=Lte;let dst=Re.MINMAXINDEX;function Mte(n){return Oe(dst,n)}const hst=Mte;let fst=Re.MINUS_DI;function Tte(n){return Oe(fst,n)}const pst=Tte;let gst=Re.MINUS_DM;function Ate(n){return Oe(gst,n)}const mst=Ate;let bst=Re.MOM;function Ite(n){return Oe(bst,n)}const _st=Ite;let yst=Re.MULT;function Rte(n){return Oe(yst,n)}const vst=Rte;let Cst=Re.NATR;function Ote(n){return Oe(Cst,n)}const wst=Ote;let xst=Re.OBV;function Fte(n){return Oe(xst,n)}const Sst=Fte;let Dst=Re.PLUS_DI;function Pte(n){return Oe(Dst,n)}const Nst=Pte;let Est=Re.PLUS_DM;function Bte(n){return Oe(Est,n)}const kst=Bte;let Lst=Re.PPO;function Vte(n){return Oe(Lst,n)}const Mst=Vte;let Tst=Re.ROC;function zte(n){return Oe(Tst,n)}const Ast=zte;let Ist=Re.ROCP;function Hte(n){return Oe(Ist,n)}const Rst=Hte;let Ost=Re.ROCR;function jte(n){return Oe(Ost,n)}const Fst=jte;let Pst=Re.ROCR100;function Wte(n){return Oe(Pst,n)}const Bst=Wte;let Vst=Re.RSI;function $te(n){return Oe(Vst,n)}const zst=$te;let Hst=Re.SAR;function Ute(n){return Oe(Hst,n)}const jst=Ute;let Wst=Re.SAREXT;function qte(n){return Oe(Wst,n)}const $st=qte;let Ust=Re.SIN;function Kte(n){return Oe(Ust,n)}const qst=Kte;let Kst=Re.SINH;function Gte(n){return Oe(Kst,n)}const Gst=Gte;let Yst=Re.SMA;function Yte(n){return Oe(Yst,n)}const Qst=Yte;let Zst=Re.SQRT;function Qte(n){return Oe(Zst,n)}const Xst=Qte;let Jst=Re.STDDEV;function Zte(n){return Oe(Jst,n)}const eat=Zte;let tat=Re.STOCH;function Xte(n){return Oe(tat,n)}const nat=Xte;let iat=Re.STOCHF;function Jte(n){return Oe(iat,n)}const rat=Jte;let oat=Re.STOCHRSI;function ene(n){return Oe(oat,n)}const sat=ene;let aat=Re.SUB;function tne(n){return Oe(aat,n)}const lat=tne;let uat=Re.SUM;function nne(n){return Oe(uat,n)}const cat=nne;let dat=Re.T3;function ine(n){return Oe(dat,n)}const hat=ine;let fat=Re.TAN;function rne(n){return Oe(fat,n)}const pat=rne;let gat=Re.TANH;function one(n){return Oe(gat,n)}const mat=one;let bat=Re.TEMA;function sne(n){return Oe(bat,n)}const _at=sne;let yat=Re.TRANGE;function ane(n){return Oe(yat,n)}const vat=ane;let Cat=Re.TRIMA;function lne(n){return Oe(Cat,n)}const wat=lne;let xat=Re.TRIX;function une(n){return Oe(xat,n)}const Sat=une;let Dat=Re.TSF;function cne(n){return Oe(Dat,n)}const Nat=cne;let Eat=Re.TYPPRICE;function dne(n){return Oe(Eat,n)}const kat=dne;let Lat=Re.ULTOSC;function hne(n){return Oe(Lat,n)}const Mat=hne;let Tat=Re.VAR;function fne(n){return Oe(Tat,n)}const Aat=fne;let Iat=Re.WCLPRICE;function pne(n){return Oe(Iat,n)}const Rat=pne;let Oat=Re.WILLR;function gne(n){return Oe(Oat,n)}const Fat=gne;let Pat=Re.WMA;function mne(n){return Oe(Pat,n)}const o5=Object.freeze(Object.defineProperty({__proto__:null,ACCBANDS:_J,ACOS:yJ,AD:vJ,ADD:CJ,ADOSC:wJ,ADX:xJ,ADXR:SJ,APO:DJ,AROON:NJ,AROONOSC:EJ,ASIN:kJ,ATAN:LJ,ATR:MJ,AVGDEV:TJ,AVGPRICE:AJ,BBANDS:IJ,BETA:RJ,BOP:OJ,CCI:FJ,CDL2CROWS:PJ,CDL3BLACKCROWS:BJ,CDL3INSIDE:VJ,CDL3LINESTRIKE:zJ,CDL3OUTSIDE:HJ,CDL3STARSINSOUTH:jJ,CDL3WHITESOLDIERS:WJ,CDLABANDONEDBABY:$J,CDLADVANCEBLOCK:UJ,CDLBELTHOLD:qJ,CDLBREAKAWAY:KJ,CDLCLOSINGMARUBOZU:GJ,CDLCONCEALBABYSWALL:YJ,CDLCOUNTERATTACK:QJ,CDLDARKCLOUDCOVER:ZJ,CDLDOJI:XJ,CDLDOJISTAR:JJ,CDLDRAGONFLYDOJI:eee,CDLENGULFING:tee,CDLEVENINGDOJISTAR:nee,CDLEVENINGSTAR:iee,CDLGAPSIDESIDEWHITE:ree,CDLGRAVESTONEDOJI:oee,CDLHAMMER:see,CDLHANGINGMAN:aee,CDLHARAMI:lee,CDLHARAMICROSS:uee,CDLHIGHWAVE:cee,CDLHIKKAKE:dee,CDLHIKKAKEMOD:hee,CDLHOMINGPIGEON:fee,CDLIDENTICAL3CROWS:pee,CDLINNECK:gee,CDLINVERTEDHAMMER:mee,CDLKICKING:bee,CDLKICKINGBYLENGTH:_ee,CDLLADDERBOTTOM:yee,CDLLONGLEGGEDDOJI:vee,CDLLONGLINE:Cee,CDLMARUBOZU:wee,CDLMATCHINGLOW:xee,CDLMATHOLD:See,CDLMORNINGDOJISTAR:Dee,CDLMORNINGSTAR:Nee,CDLONNECK:Eee,CDLPIERCING:kee,CDLRICKSHAWMAN:Lee,CDLRISEFALL3METHODS:Mee,CDLSEPARATINGLINES:Tee,CDLSHOOTINGSTAR:Aee,CDLSHORTLINE:Iee,CDLSPINNINGTOP:Ree,CDLSTALLEDPATTERN:Oee,CDLSTICKSANDWICH:Fee,CDLTAKURI:Pee,CDLTASUKIGAP:Bee,CDLTHRUSTING:Vee,CDLTRISTAR:zee,CDLUNIQUE3RIVER:Hee,CDLUPSIDEGAP2CROWS:jee,CDLXSIDEGAP3METHODS:Wee,CEIL:$ee,CMO:Uee,CORREL:qee,COS:Kee,COSH:Gee,DEMA:Yee,DIV:Qee,DX:Zee,EMA:Xee,EXP:Jee,FLOOR:ete,HT_DCPERIOD:tte,HT_DCPHASE:nte,HT_PHASOR:ite,HT_SINE:rte,HT_TRENDLINE:ote,HT_TRENDMODE:ste,IMI:ate,KAMA:lte,LINEARREG:ute,LINEARREG_ANGLE:cte,LINEARREG_INTERCEPT:dte,LINEARREG_SLOPE:hte,LN:fte,LOG10:pte,MA:gte,MACD:mte,MACDEXT:bte,MACDFIX:_te,MAMA:yte,get MAType(){return JE},MAVP:vte,MAX:Cte,MAXINDEX:wte,MEDPRICE:xte,MFI:Ste,MIDPOINT:Dte,MIDPRICE:Nte,MIN:Ete,MININDEX:kte,MINMAX:Lte,MINMAXINDEX:Mte,MINUS_DI:Tte,MINUS_DM:Ate,MOM:Ite,MULT:Rte,NATR:Ote,OBV:Fte,PLUS_DI:Pte,PLUS_DM:Bte,PPO:Vte,ROC:zte,ROCP:Hte,ROCR:jte,ROCR100:Wte,RSI:$te,SAR:Ute,SAREXT:qte,SIN:Kte,SINH:Gte,SMA:Yte,SQRT:Qte,STDDEV:Zte,STOCH:Xte,STOCHF:Jte,STOCHRSI:ene,SUB:tne,SUM:nne,T3:ine,TAN:rne,TANH:one,TEMA:sne,TRANGE:ane,TRIMA:lne,TRIX:une,TSF:cne,TYPPRICE:dne,ULTOSC:hne,VAR:fne,WCLPRICE:pne,WILLR:gne,WMA:mne,accBands:jtt,acos:$tt,ad:qtt,adOsc:Qtt,add:Gtt,adx:Xtt,adxr:ent,apo:nnt,aroon:rnt,aroonOsc:snt,asin:lnt,atan:cnt,atr:hnt,avgDev:pnt,avgPrice:mnt,bbands:_nt,beta:vnt,bop:wnt,cci:Snt,cdl2Crows:Nnt,cdl3BlackCrows:knt,cdl3Inside:Mnt,cdl3LineStrike:Ant,cdl3Outside:Rnt,cdl3StarsInSouth:Fnt,cdl3WhiteSoldiers:Bnt,cdlAbandonedBaby:znt,cdlAdvanceBlock:jnt,cdlBeltHold:$nt,cdlBreakaway:qnt,cdlClosingMarubozu:Gnt,cdlConcealBabysWall:Qnt,cdlCounterAttack:Xnt,cdlDarkCloudCover:eit,cdlDoji:nit,cdlDojiStar:rit,cdlDragonflyDoji:sit,cdlEngulfing:lit,cdlEveningDojiStar:cit,cdlEveningStar:hit,cdlGapSideSideWhite:pit,cdlGravestoneDoji:mit,cdlHammer:_it,cdlHangingMan:vit,cdlHarami:wit,cdlHaramiCross:Sit,cdlHignWave:Nit,cdlHikkake:kit,cdlHikkakeMod:Mit,cdlHomingPigeon:Ait,cdlIdentical3Crows:Rit,cdlInNeck:Fit,cdlInvertedHammer:Bit,cdlKicking:zit,cdlKickingByLength:jit,cdlLadderBottom:$it,cdlLongLeggedDoji:qit,cdlLongLine:Git,cdlMarubozu:Qit,cdlMatHold:ert,cdlMatchingLow:Xit,cdlMorningDojiStar:nrt,cdlMorningStar:rrt,cdlOnNeck:srt,cdlPiercing:lrt,cdlRickshawMan:crt,cdlRiseFall3Methods:hrt,cdlSeperatingLines:prt,cdlShootingStar:mrt,cdlShortLine:_rt,cdlSpinningTop:vrt,cdlStalledPattern:wrt,cdlStickSandwhich:Srt,cdlTakuri:Nrt,cdlTasukiGap:krt,cdlThrusting:Mrt,cdlTristar:Art,cdlUnique3River:Rrt,cdlUpsideGap2Crows:Frt,cdlXSideGap3Methods:Brt,ceil:zrt,cmo:jrt,correl:$rt,cos:qrt,cosh:Grt,dema:Qrt,div:Xrt,dx:eot,ema:not,exp:rot,floor:sot,htDcPeriod:lot,htDcPhase:cot,htPhasor:hot,htSine:pot,htTrendMode:_ot,htTrendline:mot,imi:vot,init:ek,kama:wot,linearReg:Sot,linearRegAngle:Not,linearRegIntercept:kot,linearRegSlope:Mot,ln:Aot,log10:Rot,macd:Bot,macdExt:zot,macdFix:jot,mama:$ot,max:Got,maxIndex:Qot,medPrice:Xot,mfi:est,midPoint:nst,midPrice:rst,min:sst,minIndex:lst,minMax:cst,minMaxIndex:hst,minusDI:pst,minusDM:mst,mom:_st,movingAverage:Fot,movingAverageVariablePeriod:qot,mult:vst,natr:wst,obv:Sst,plusDI:Nst,plusDM:kst,ppo:Mst,roc:Ast,rocP:Rst,rocR:Fst,rocR100:Bst,rsi:zst,sar:jst,sarExt:$st,sin:qst,sinh:Gst,sma:Qst,sqrt:Xst,stdDev:eat,stoch:nat,stochF:rat,stochRsi:sat,sub:lat,sum:cat,t3:hat,tan:pat,tanh:mat,tema:_at,trima:wat,trix:Sat,trueRange:vat,tsf:Nat,typPrice:kat,ultOsc:Mat,variance:Aat,wclPrice:Rat,willR:Fat,wma:mne},Symbol.toStringTag,{value:"Module"}));let bne=!1,_ne=!0,yne=[];const vne=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}},Bat=async()=>{if(!bne)bne=!0,await ek("./talib.wasm"),_ne=!1,yne.forEach(n=>{n()});else if(_ne)return new Promise(n=>{yne.push(n)})},b_=(n,e)=>n.length>e?n.slice(n.length-e):n,Vat=(n,e,t)=>n.calculationFn?n.calculationFn(o5,e,t):new Array(e.time.length).fill(null),zat=async(n,e,t)=>{const i=vne(n);let r=[];return r=vne(r),await Bat(),{originData:b_(n,t),kLine:b_(i.kLineData,t),time:b_(i.time,t),indicator:e.config.reduce((o,s)=>(o.push({key:s.key,color:s.color,data:b_(Vat(s,i,r),t)}),o),[])}},tk="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42N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Y3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",s5=(n,e)=>{const{type:t="log",color:i="black"}=e??{};localStorage.getItem("st-kline-console-show")==="true"&&console[t](`%c${n}`,`color:${i}`)},Ta=n=>n||n===0?Math.round(n*1e3)/1e3:null,Hat=n=>n>=1e12?`${(n/1e12).toFixed(2)}万亿`:n>=1e8?`${(n/1e8).toFixed(2)}亿`:n>=1e4?`${(n/1e4).toFixed(2)}万`:n.toFixed(2),jat=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)}}}},Wat=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)}}}},$at=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 b=(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")&&b(w,!0)},y=x=>{(x.code==="AltLeft"||x.code==="AltRight")&&b(w,!1)},window.addEventListener("keydown",m),window.addEventListener("keyup",y)},_=v=>{let w=null;v.target.type==="line"?w=v.target.parent:v.target.type==="tspan"&&(w=v.target.parent.parent.parent),b(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):_(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)}}}},__=(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},Uat=(n,e)=>n.reduce((t,i)=>{var d;const r=__(i,"sellBuy"),o=n.filter(h=>h.time===i.time);let s="image://"+new URL(Object.assign({"./images/buy.svg":tk,"./images/sell.svg":nk,"./images/t.svg":ik})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href;o.length>1?[...new Set(o.map(f=>__(f,"sellBuy")))].length>1?s="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAta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xMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":tk,"./images/sell.svg":nk,"./images/t.svg":ik})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":tk,"./images/sell.svg":nk,"./images/t.svg":ik})[`./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(b=>b[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},[]),qat=(n,e)=>n.reduce((t,i,r)=>{var h;const o=__(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=__(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(b=>b[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},[]),Kat=(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",()=>Uat(o,e)],["openClose",()=>qat(o,e)],["signal",()=>{}]]).get(r);return a instanceof Function&&t.push(...a()),t},[]),rk=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:b}=await zat(n,t,s),C=b.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}}}),_=Kat(e,y);let v=[];return _.forEach(w=>{w.markLineTarget&&(v=[...v,...w.markLineTarget])}),{animation:!1,dataset:{id:"data",source:{klineData:m,indicatorData:b}},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(Ta(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:L,data:E}=N;if(L==="sellBuy"){const k=E.filter(R=>R.time===D.axisValue);let A=0,F=0;k.forEach(R=>{R.tradeType==="开多"||R.tradeType==="平空"?A+=R.amount:F+=R.amount}),A&&(S+=`<div>买: ${A}</div>`),F&&(S+=`<div>卖: ${F}</div>`)}L==="openClose"&&E.forEach(k=>{k.time===D.axisValue&&(S+=k.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=>Ta(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:_},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)"}}}},Gat=(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=[],b={},C=[],_={};if(n.forEach(({key:v,data:w,...x})=>{v==="warning"?(g=w,m=x):v==="position"?(y=w,b=x):v==="condition"&&(C=w,_=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 L={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,jat(L)]},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 L={y:t.convertToPixel({yAxisIndex:0},x),text:S,info:{info:D,config:{...a,...N},event:{...b}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,Wat(L)]},d)),C.length>0&&(d=C.reduce((v,w)=>{const{value:x,text:S,profitValue:D,profitText:N,lossValue:L,lossText:E,info:k,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},L),lossText:E,info:{info:k,config:{...l,...A},event:{..._}},gridLeft:i,gridRight:r,echartsWidth:t.getWidth(),echartsInstance:t};return[...v,$at(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,L=Qat(w,1,50),E=Zat(w),k=E?N/E:0,A=Yat(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:`均值: ${Ta(D)} 距均值: ${Ta(N)} 中值: ${Ta(L)} 标准差: ${Ta(E)} 距均值/标准差: ${Ta(k)} 百分位: ${Ta(A)}%`,lineWidth:1,opacity:1},z:10}]}}return{elements:d}},Yat=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=vl,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))},Qat=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=vl,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 Zat(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 Xat={class:"st-kline"},Jat={class:"st-kline-header"},elt=300,tlt=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:Q,business:W,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)"}),Q&&M.push({label:"收",value:I[1],color:"rgb(153, 153, 153)"}),W&&M.push({label:"额",value:Hat(I[4]),color:"rgb(153, 153, 153)"}),z){let ne=((I[1]-I[5])/I[1]*100).toFixed(2),ce=+ne==0?"white":+ne>0?"red":"#00ff00";M.push({label:"涨跌",value:`${ne}%`,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:Ta(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]?Ta(I.data[o.value][1]):null)!==null&&R.push({label:I.name,value:Ta((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]?Ta(M.data[o.value][1]):null)!==null&&R.push({label:M.name.split("-")[1],value:`${Ta((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()=>{s5("st-kline组件消息:props.lineData监控,额外画线数据发生改变,重绘->line",{color:"red"}),u("line")},{deep:!0}),c.watch(()=>e.brushRange,async()=>{s5("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 rk(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),s5("st-kline组件消息:K线绘制完毕-draw",{color:"green"})}],["line",()=>{const M=m.getOption(),O=Gat(e.lineData,i.value,m);r.value={...M,graphic:O},m.setOption(r.value,{replaceMerge:["graphic"]}),s5("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}]}),s5("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 rk(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 rk(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,Q,W)=>{const{name:z,data:ne}=Q,ce={name:`二腿价格走势图-${z}`,type:"line",data:ne,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[W]},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((Q,W,z)=>{const{name:ne,data:ce}=W,le=ce.length>i.value.totalBarCount?ce.slice(ce.length-i.value.totalBarCount):ce,ie=le[P][1],oe=le.map(pe=>[pe[0],(pe[1]-ie)/ie*100]),he={name:`二腿价格走势百分比图-${ne}`,type:"line",data:oe,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[z]},lineStyle:{type:"dashed",width:1}};return Q.push(he),Q},[]);M.series=[...M.series.filter(Q=>!Q.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 b=(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,_=!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&&!_&&!v.value&&(_=!0,await i.value.dynamicLoadConfig.historyLoadCallBack(v),await u("history"),_=!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},elt)};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})},L=()=>{m.on("highlight",F=>{b(F,m)}),m.on("globalout",()=>{b(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")},k=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}))},Q=()=>{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})}},W=()=>{if(M-I<5)return;const le=Math.floor((o.value-I)/2)+1,ie=Math.floor((M-o.value)/2)+1;I=I+le,M=M-ie,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",Q],["ArrowUp",W],["ArrowDown",z]]).get(F.code);ce instanceof Function&&ce()},A=async()=>{let F=!0;m=qr.init(g.value),await u(),h.value=e.defaultMenuData,o.value=m.getOption().dataZoom[0].endValue??-1,L(),y=new ResizeObserver(()=>{if(F){F=null;return}m.resize(),u("line")}),y.observe(g.value),window.addEventListener("keydown",k)};return c.onMounted(()=>{A()}),c.onUnmounted(()=>{E(),window.removeEventListener("keydown",k),m.dispose(),y.disconnect(),y=null}),(F,R)=>{const I=uz,M=lz;return c.openBlock(),c.createElementBlock("div",Xat,[c.createElementVNode("div",Jat,[c.createVNode(ZE,{data:s.value},null,8,["data"]),c.createVNode(ZE,{data:a.value},null,8,["data"]),c.createVNode(ZE,{data:l.value},null,8,["data"])]),c.createVNode(Vtt,{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})])}}}),UMt="",qMt="",nlt=gn(tlt,[["__scopeId","data-v-57c04894"]]),ilt={class:"kline-tips"},rlt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",ilt,[(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))]))}}),KMt="",ok=gn(rlt,[["__scopeId","data-v-dc7d381b"]]),GMt="",olt={class:"klineSub"},slt={class:"klineSub-tips"},alt={key:0,class:"klineSub-tips-select"},llt=gn({__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}=vl;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=qr.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=>{qr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:b,rightYAxisRange:C}=a.data.subIndicator[0],_=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:b==="cover"?v=>v.min:null,max:b==="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:_},!0)})}}),(f,p)=>{const g=ll,m=al;return c.openBlock(),c.createElementBlock("div",olt,[c.createElementVNode("div",slt,[d.value.length?(c.openBlock(),c.createElementBlock("div",alt,[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(ok,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-aba58678"]]),QMt="",ult={class:"kline-tips"},clt=gn({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=vl,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",ult,[c.createVNode(ok,{data:r.value},null,8,["data"]),c.createVNode(ok,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-09ec31e8"]]),dlt={__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}},XMt="",hlt=gn({__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=qr.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),b=m===100?p.length-1:Math.floor(m*p.length/100);d(y,b),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((b,C)=>{m===-1&&b[0]===f?m=C:m===-1&&new Date(b[0])>new Date(f)&&(m=C-1),(y===-1&&b[0]===p||y===-1&&new Date(b[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"]]),flt={install(n){n.component("st-kline",nlt),n.component("st-kline-sub-new",llt),n.component("st-kline-tips-new",clt),n.component("st-kline-slide-new",hlt),n.component("st-kline-utils-new",dlt)}};let P2=null;const plt=n=>{const e=hJ(n,{handleReq:t=>{gJ()&&(t.headers.token=pJ())},handleRes:t=>{const{data:i}=t;if(i.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:YE(),!0}});e.get,P2=e.post},glt=n=>P2("/middleLayer/kline/getKlineBasic",{...n,userId:R1("id")}),mlt=n=>P2("/middleLayer/kline/getKline",n),blt=async n=>P2("/alarm/deliversign/addAlarmPrice",{...n,userId:R1("id")}),_lt=async n=>P2("/alarm/deliversign/findAlarmPriceByUserId",{...n,userId:R1("id")}),Cne=async n=>P2("/alarm/deliversign/updateAlarmPrice",{...n,userId:R1("id")}),ylt=async n=>P2("/alarm/deliversign/deleteAlarmPrice",{...n,userId:R1("id")}),{round:a5}=vl,vlt=(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(a5(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=>a5(f.min),max:f=>a5(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)"}}}},Clt=(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 b;if(y.target&&y.target.childAt(1)){const C=n.convertFromPixel({yAxisIndex:0},g+(y.offsetY-m));(b=y.target.childAt(1))==null||b.animate("style",!1).when(1,{text:a5(C,3)}).start()}},ondragend:async y=>{const C=y.offsetY-m;if(C!==0){const _=n==null?void 0:n.convertFromPixel({yAxisIndex:0},C+g),v={id:f.id,warnPrice:a5(_,3),featureId:s,featureCode:o,featureType:a};await Cne(v),Xt.success("画线预警修改成功"),r&&r()}}}]},[])},wlt={class:"kline-tips"},xlt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",wlt,[(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))]))}}),eTt="",sk=gn(xlt,[["__scopeId","data-v-f83b6b36"]]),tTt="",Slt={class:"kline-tips"},Dlt=gn({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=vl,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",Slt,[c.createVNode(sk,{data:r.value},null,8,["data"]),c.createVNode(sk,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-ffa125ec"]]),iTt="",Nlt={class:"klineSub"},Elt={class:"klineSub-tips"},klt={key:0,class:"klineSub-tips-select"},Llt=gn({__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}=vl;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=qr.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=>{qr.connect([f,r])},draw:(f,p)=>{c.nextTick(()=>{const{startValue:g,endValue:m,maxValueSpan:y}=f,{leftYAxisRange:b,rightYAxisRange:C}=a.data.subIndicator[0],_=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:b==="cover"?v=>v.min:null,max:b==="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:_},!0)})}}),(f,p)=>{const g=ll,m=al;return c.openBlock(),c.createElementBlock("div",Nlt,[c.createElementVNode("div",Elt,[d.value.length?(c.openBlock(),c.createElementBlock("div",klt,[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(sk,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-ab519de5"]]),Mlt=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))}}),oTt="",Tlt=gn(Mlt,[["__scopeId","data-v-811db6b4"]]),sTt="",wne=n=>(c.pushScopeId("data-v-9e6456be"),n=n(),c.popScopeId(),n),Alt={class:"klineBasic-tips"},Ilt={key:0,class:"klineBasic-sub"},Rlt={key:1,class:"klineBasic-empty"},Olt={key:2,class:"klineBasic-error"},Flt=wne(()=>c.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),Plt={style:{"text-align":"center"}},Blt=wne(()=>c.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Vlt={class:"dialog-footer"},zlt=gn({__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),b=c.ref("VOL"),C=c.ref(0),_=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 W,z;return[h.variety,h.cycle,h.mainIndicator,b.value,(W=h.indicatorStore)==null?void 0:W.filterIndicator,(z=h.indicatorStore)==null?void 0:z.customIndicator]},()=>{A()},{deep:!0}),c.onMounted(()=>{plt(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 L=()=>{o||(o=qr.init(m.value),k(),N.value.showSubChart&&y.value.connect(o),r=fJ(m.value),r.listen(()=>{requestAnimationFrame(()=>{o.resize()})}))},E=({code:W,ctrlKey:z})=>{if(!(z||f.value))return;const{xAxis:ne,dataZoom:ce}=o.getOption(),{data:le}=(ne==null?void 0:ne[0])??{data:[]};let{startValue:ie,endValue:oe}=(ce==null?void 0:ce[0])??{};if(le!=null&&le.length){switch(W){case"ArrowUp":{if(oe-ie<5)return;const he=Math.floor((oe-ie)/2)+1;ie=ie+he,oe-ie<5&&(ie=oe-4);break}case"ArrowDown":{const he=Math.min(500,oe-ie);ie=ie-he-1;break}case"ArrowLeft":{ie>0&&(ie-=1,oe-=1),C.value>0&&(C.value-=1);break}case"ArrowRight":{oe<le.length-1&&(ie+=1,oe+=1),f.value&&C.value<le.length-1&&(C.value+=1);break}}o.dispatchAction({type:"dataZoom",startValue:ie,endValue:oe}),o.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:f.value?C.value:null}),o.dispatchAction({type:"highlight",dataIndex:f.value?C.value:oe})}},k=()=>{o==null||o.on("datazoom",z=>{clearTimeout(a),a=setTimeout(()=>{var ce,le,ie,oe;const{loadCheckCounts:ne}=N.value;if((le=(ce=o==null?void 0:o.getOption())==null?void 0:ce.dataZoom)!=null&&le[0]){const{startValue:he}=(oe=(ie=o==null?void 0:o.getOption())==null?void 0:ie.dataZoom)==null?void 0:oe[0];he<ne&&l===!1&&u===!1&&(l=!0,F("history")),I()}clearTimeout(a)},100)}),o==null||o.on("highlight",z=>{var ce,le;let ne=z.dataIndex||-1;z.batch&&(ne=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=ne,clearTimeout(s)},20)}),o==null||o.on("globalout",()=>{var ne,ce,le;const z=(le=(ce=(ne=o==null?void 0:o.getOption())==null?void 0:ne.dataZoom)==null?void 0:ce[0])==null?void 0:le.endValue;C.value=z});let W=null;o==null||o.on("contextmenu",z=>{W=setTimeout(()=>{z.componentType==="graphic"&&(w.value=z.info,D.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(W),W=null})})},A=async()=>{var W,z,ne,ce,le,ie;try{if(!h.variety||!h.cycle)return;const{variety:oe,featureId:he,cycle:pe,indicatorStore:de,mainIndicator:ve,right:Le,startTime:ee,endTime:j}=h,{defaultShowCounts:Y,addCounts:te,showWarningLine:J,getFactorData:re}=N.value,G={variety:oe,featureId:he,cycle:pe,mainIndicatorList:de.getIndicatorParams(ve),subIndicator:b.value,right:Le,showWarningLine:J,getFactorData:re};ee&&j?(G.startTime=ee,G.endTime=j):ee?(G.startTime=ee,G.limit=Y+te):j?(G.endTime=j,G.limit=Y+te):(G.endTime=bt().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),G.limit=Y+te);const Z=await glt(G);if((ne=(z=(W=Z==null?void 0:Z.body)==null?void 0:W.kline)==null?void 0:z.time)!=null&&ne.length)p.value=!1,g.value=!1;else{p.value=!0,g.value=!1;return}_.value=(ce=Z==null?void 0:Z.body)==null?void 0:ce.kline,v.value=((le=Z==null?void 0:Z.body)==null?void 0:le.warningLine)||[],R(),I(),re&&d("getFactorData",(ie=Z==null?void 0:Z.body)==null?void 0:ie.factor)}catch(oe){throw g.value=!0,p.value=!1,new Error(oe)}},F=async W=>{const{variety:z,cycle:ne,indicatorStore:ce,mainIndicator:le,right:ie}=h,{addCounts:oe}=N.value,{time:he}=_.value;if(W==="history"){const pe=await mlt({variety:z,cycle:ne,endTime:he[0],limit:oe,mainIndicatorList:ce.getIndicatorParams(le),subIndicator:b.value,right:ie});_.value={time:[...pe.body.time,..._.value.time.slice(1)],data:[...pe.body.data,..._.value.data.slice(1)],mainIndicator:_.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:_.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=(W=!1)=>{var ve,Le,ee;L();const{time:z}=_.value,{gridRight:ne,gridLeft:ce,defaultShowCounts:le,maxShowCounts:ie,showSubChart:oe}=N.value;let he=z.length-1-le,pe=z.length-1;if(W){const j=o.getOption(),Y=(Le=(ve=j==null?void 0:j.xAxis)==null?void 0:ve[0])==null?void 0:Le.data,te=(ee=j==null?void 0:j.dataZoom)==null?void 0:ee[0],J=Y[te==null?void 0:te.startValue],re=Y[te==null?void 0:te.endValue];he=z.findIndex(G=>G===J),pe=z.findIndex(G=>G===re)}const de=vlt(_.value,N.value,he,pe,h.cycle);if(o.setOption(de,!0),C.value=pe,h.brushRange){let j=null,Y=null;switch(h.cycle){case"6":{j=z.find(te=>new Date(te).getTime()>=new Date(h.brushRange[0]).getTime()||bt(te).format("YYYY-MM-DD")===bt(h.brushRange[0]).format("YYYY-MM-DD")),Y=z.findLast(te=>new Date(te).getTime()<=new Date(h.brushRange[1]).getTime()||bt(te).format("YYYY-MM-DD")===bt(h.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{j=z.find(te=>bt(te).day(5).format("YYYY-MM-DD")===bt(h.brushRange[0]).day(5).format("YYYY-MM-DD")),Y=z.findLast(te=>bt(te).day(5).format("YYYY-MM-DD")===bt(h.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{j=z.find(te=>bt(te).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[0]).endOf("month").format("YYYY-MM-DD")),Y=z.findLast(te=>bt(te).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:j=z.find(te=>new Date(te).getTime()>=new Date(h.brushRange[0]).getTime()),Y=z.findLast(te=>new Date(te).getTime()<=new Date(h.brushRange[1]).getTime())}console.log(j,Y),o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[j,Y],xAxisIndex:0}]})}oe&&y.value.draw({startValue:he,endValue:pe,maxValueSpan:ie},{gridLeft:ce,gridRight:ne}),M()},I=()=>{if(!o)return;const W=o==null?void 0:o.getOption();W&&(o==null||o.setOption({...W,graphic:[...Clt(o,v.value,h,N.value,()=>{O()})]},!0),M())},M=()=>{const{time:W}=_.value;if(h.brushRange&&(W!=null&&W.length)){let z=bt(h.brushRange[0]).format("YYYY-MM-DD 00:00:00"),ne=bt(h.brushRange[1]).format("YYYY-MM-DD 23:59:59"),ce=null,le=null;switch(h.cycle){case"6":{ce=W.find(ie=>bt(ie).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD")),le=ce;break}case"7":{ce=W.find(ie=>bt(ie).day(5).format("YYYY-MM-DD")===bt(z).day(5).format("YYYY-MM-DD")),le=W.findLast(ie=>bt(ie).day(5).format("YYYY-MM-DD")===bt(ne).day(5).format("YYYY-MM-DD"));break}case"8":{ce=W.find(ie=>bt(ie).endOf("month").format("YYYY-MM-DD")===bt(z).endOf("month").format("YYYY-MM-DD")),le=W.findLast(ie=>bt(ie).endOf("month").format("YYYY-MM-DD")===bt(ne).endOf("month").format("YYYY-MM-DD"));break}default:ce=W.find(ie=>{const oe=bt(ie).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD"),he=new Date(ie).getTime()>=new Date(z).getTime();return oe&&he}),le=W.findLast(ie=>{const oe=bt(ie).format("YYYY-MM-DD")===bt(ne).format("YYYY-MM-DD"),he=new Date(ie).getTime()<=new Date(ne).getTime();return oe&&he})}o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[ce,le],xAxisIndex:0}]})}},O=async()=>{const W=await _lt({featureId:h.featureId});v.value=(W==null?void 0:W.body)||[],I(),d("change","warningLine",v.value)},P=async W=>{const{variety:z,varietyName:ne,featureId:ce,featureType:le}=h;if(W.key==="drawWarningLine"){const ie=o==null?void 0:o.getOption(),oe=ie.tooltip[0];o==null||o.setOption({...ie,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({...ie,tooltip:{...oe,axisPointer:{...oe.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...oe.axisPointer.label,backgroundColor:null}}}}),await blt({featureCode:z,featureName:ne,featureId:ce,featureType:le,warnPrice:ve}),Xt.success("画线预警成功!"),O()};o==null||o.getZr().on("mousedown",he)}else W.key==="deleteWarningLine"?(await ylt({id:w.value.id}),Xt.success("画线预警删除成功"),O()):W.key==="changeWarningLine"&&(x.value=!0,S.value=w.value.warnPrice)},U=async()=>{const{variety:W,varietyName:z,featureId:ne,featureType:ce}=h;await Cne({id:w.value.id,featureCode:W,featureName:z,featureId:ne,featureType:ce,warnPrice:S.value}),Xt.success("画线预警修改成功"),O()},Q=()=>{D.value=[...i]};return e({draw:(W,z)=>{W==="warningLine"&&(v.value=z,I())}}),(W,z)=>{var pe;const ne=uz,ce=lz,le=Zg,ie=Kr,oe=P6,he=sl;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",Alt,[c.createVNode(Dlt,{data:_.value,activeIndex:C.value},null,8,["data","activeIndex"])]),c.createElementVNode("div",{class:"klineBasic-main",style:c.normalizeStyle({height:N.value.showSubChart?"70%":"100%"})},[c.createVNode(Tlt,{onCloseContextMenuCallBack:Q},{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(ne,{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",Ilt,[c.createVNode(Llt,{ref_key:"klineSubRef",ref:y,modelValue:b.value,"onUpdate:modelValue":z[0]||(z[0]=de=>b.value=de),data:_.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",Rlt,[c.createVNode(le,{class:"klineBasic-empty-content",description:"暂无数据"})])):c.createCommentVNode("",!0),g.value?(c.openBlock(),c.createElementBlock("div",Olt,[Flt,c.createElementVNode("div",Plt,[c.createVNode(ie,{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",Vlt,[c.createVNode(ie,{onClick:z[4]||(z[4]=de=>x.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("取消")]),_:1}),c.createVNode(ie,{type:"primary",onClick:U},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[Blt,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-9e6456be"]]),Hlt={install(n){n.component("st-klineBasic",zlt)}},lTt="",uTt="",jlt=[{label:"买卖",value:0},{label:"开平",value:1}],y_=()=>({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}),Wlt=(n,e)=>{var t;return((t=e.find(i=>i.value===n))==null?void 0:t.label)??"-"},cTt="",Cl=n=>(c.pushScopeId("data-v-6e5050a9"),n=n(),c.popScopeId(),n),$lt={class:"kline-config element-dark"},Ult={class:"setting-item"},qlt=Cl(()=>c.createElementVNode("span",{class:"label"},"主图指标: ",-1)),Klt={class:"setting-item"},Glt=Cl(()=>c.createElementVNode("span",{class:"label"},"交易点位: ",-1)),Ylt={class:"setting-item"},Qlt=Cl(()=>c.createElementVNode("span",{class:"label"},"开平点按价格标: ",-1)),Zlt={class:"setting-item"},Xlt=Cl(()=>c.createElementVNode("span",{class:"label"},"单周期: ",-1)),Jlt={class:"setting-item"},eut=Cl(()=>c.createElementVNode("span",{class:"label"},"多周期: ",-1)),tut={class:"mode"},nut={class:"cycleName"},iut={class:"content"},rut={class:"setting-item"},out=Cl(()=>c.createElementVNode("span",{class:"label"},"默认展示: ",-1)),sut={class:"setting-item"},aut=Cl(()=>c.createElementVNode("span",{class:"label"},"高亮交易范围: ",-1)),lut={class:"setting-item"},uut=Cl(()=>c.createElementVNode("span",{class:"label"},"展示当屏时间: ",-1)),cut={class:"setting-item"},dut=Cl(()=>c.createElementVNode("span",{class:"label"},"展示当屏最高价: ",-1)),hut={class:"setting-item"},fut=Cl(()=>c.createElementVNode("span",{class:"label"},"多周期双击图表切换至单周期: ",-1)),put={class:"setting-item"},gut=Cl(()=>c.createElementVNode("span",{class:"label"},"开启副图: ",-1)),mut={class:"setting-item"},but=Cl(()=>c.createElementVNode("span",{class:"label"},"开启拖拽轴: ",-1)),_ut={class:"setting-footer"},yut=gn({__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,y_())},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,y_(),g?JSON.parse(g):{})}else{const g=localStorage.getItem("userKlineConfig");Object.assign(a,y_(),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:y_}),(g,m)=>{const y=T6,b=ll,C=al,_=u1,v=MH,w=oye,x=s1,S=Kr,D=N6e;return c.openBlock(),c.createElementBlock("div",$lt,[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",Ult,[qlt,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,L)=>(c.openBlock(),c.createBlock(b,{key:L,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Klt,[Glt,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(jlt),(N,L)=>(c.openBlock(),c.createBlock(b,{key:L,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Ylt,[Qlt,c.createVNode(_,{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",Zlt,[Xlt,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,L)=>(c.openBlock(),c.createBlock(b,{key:L,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Jlt,[eut,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,L)=>(c.openBlock(),c.createElementBlock("div",tut,[c.createElementVNode("div",nut,[c.createElementVNode("span",null,c.toDisplayString(c.unref(Wlt)(a.multiCycleList[L],l.value)),1),c.createVNode(C,{modelValue:a.multiCycleList[L],"onUpdate:modelValue":E=>a.multiCycleList[L]=E,"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(E,k)=>(c.openBlock(),c.createBlock(b,{key:k,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),c.createElementVNode("span",iut,c.toDisplayString(L+1)+"号位K线",1)]))),256))],2),c.createElementVNode("div",rut,[out,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",sut,[aut,c.createVNode(w,{modelValue:a.enable_tradeLogBrush,"onUpdate:modelValue":m[6]||(m[6]=N=>a.enable_tradeLogBrush=N)},null,8,["modelValue"])]),c.createElementVNode("div",lut,[uut,c.createVNode(w,{modelValue:a.enable_showScreenTimeRange,"onUpdate:modelValue":m[7]||(m[7]=N=>a.enable_showScreenTimeRange=N)},null,8,["modelValue"])]),c.createElementVNode("div",cut,[dut,c.createVNode(w,{modelValue:a.enable_showScreenMaxPrice,"onUpdate:modelValue":m[8]||(m[8]=N=>a.enable_showScreenMaxPrice=N)},null,8,["modelValue"])]),c.createElementVNode("div",hut,[fut,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",put,[gut,c.createVNode(w,{modelValue:a.enable_subChart,"onUpdate:modelValue":m[10]||(m[10]=N=>a.enable_subChart=N)},null,8,["modelValue"])]),c.createElementVNode("div",mut,[but,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",_ut,[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"]]),vut={install(n){n.component("st-klineConfig",yut)}},Cut=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 ek("./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:b,preLoadCount:C}=m;let _=[],v=[],w=[],x=[];u&&d?(_=l.filter(k=>new Date(k[0])>=new Date(u)&&new Date(k[0])<=new Date(d)),x=[...l]):d?(_=[...l.filter((k,A)=>A>=l.length-b&&new Date(y[0])<=new Date(k[0])&&new Date(k[0])<=new Date(y[1])),...a.originData],x=[...l,...a.originData]):u&&(_=[...a.originData,...l.filter((k,A)=>A>=C&&new Date(y[0])<=new Date(k[0])&&new Date(k[0])<=new Date(y[1]))],x=_),_.forEach((k,A)=>{v.push([k[1],k[4],k[3],k[2],A===0?0:_[A-1][4],k[6]]),w.push(k[0])});let S=[],D=[];const N={time:[],open:[],close:[],high:[],low:[],originData:x};let L=null,E=null;return x.forEach((k,A)=>{N.time.push(k[0]),N.open.push(k[1]),N.close.push(k[4]),N.high.push(k[2]),N.low.push(k[3]),k[0]===_[0][0]&&(L=A),k[0]===_[_.length-1][0]&&(E=A+1)}),S=f.find(({value:k})=>k===h).config.map(k=>{const{calculationFn:A}=k;return{...k,data:A?A(o5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}).slice(L,E):[]}}),D=g.find(({value:k})=>k===p).config.reduce((k,A)=>{const{source:F,calculationFn:R}=A;return F==="calculation"?[...k,{...A,data:R?R(o5,N).slice(L,E):[]}]:k},[]),{originData:_,candlestickData:v,mainIndicatorData:S,subIndicatorData:D,xAxisData:w,startTime:_[0][0],endTime:_[_.length-1][0],length:_.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,b=[],C=[],_=[],v=[],w=[];let x=[],S=[];const D=l.filter((A,F)=>(b.push(A[0]),C.push(A[1]),_.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:b,open:C,close:_,high:v,low:w,originData:l},E=d.find(A=>A.value===u).config.map(A=>({...A,data:o(A.calculationFn?A.calculationFn(o5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],x.length)}));let k=[];return h&&f&&(k=f.find(F=>F.value===h).config.reduce((F,R)=>R.source==="calculation"?[...F,{...R,data:o(R.calculationFn?R.calculationFn(o5,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:[...k[F].data,...A.data]}))}:g={originData:D,xAxisData:x,candlestickData:S,mainIndicatorData:E,subIndicatorData:k},g.length=g.xAxisData.length,g.startTime=g.xAxisData[0],g.endTime=g.xAxisData[g.length-1],g},fn:()=>{}}),(s,a)=>null}}),wut={class:"kline-tips"},xut=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",wut,[(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))]))}}),hTt="",ak=gn(xut,[["__scopeId","data-v-2a02e841"]]),Sut={class:"kline-tips"},Dut=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}=vl,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",Sut,[c.createVNode(ak,{data:a.value},null,8,["data"]),c.createVNode(ak,{data:l.value},null,8,["data"])]))}}),fTt="",Nut=gn(Dut,[["__scopeId","data-v-e75a1234"]]),Eut={class:"klineSub"},kut={class:"klineSub-tips"},Lut={key:0,class:"klineSub-tips-select"},Mut=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}=vl;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 b,C;let y="-";return m.source==="origin"?y=f.originData[p][m.dataIndex]||"-":m.source==="calculation"&&(y=(((C=(b=f.subIndicatorData)==null?void 0:b.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=qr.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=>{qr.connect([f,r])},draw:f=>{c.nextTick(()=>{var x;const{startValue:p,endValue:g,maxValueSpan:m}=f,{xAxisData:y,subIndicatorData:b,candlestickData:C,originData:_}=a.drawData,v=a.subIndicatorList.find(S=>S.value===u.value),w=[];if(v.series==="bar"){let S=[];v.source==="origin"?S=_.map(D=>D[v.dataIndex]):S=((x=b==null?void 0:b.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}})})}b.forEach(S=>{if(S.series==="line"){let D=[];S.source==="origin"?D=_.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=ll,m=al;return c.openBlock(),c.createElementBlock("div",Eut,[c.createElementVNode("div",kut,[d.value.length?(c.openBlock(),c.createElementBlock("div",Lut,[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)])}}}),pTt="",Tut=gn(Mut,[["__scopeId","data-v-0a2f256e"]]),Aut=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=qr.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),b=m===100?p.length-1:Math.floor(m*p.length/100);d(y,b),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((b,C)=>{m===-1&&b[0]===f?m=C:m===-1&&new Date(b[0])>new Date(f)&&(m=C-1),(y===-1&&b[0]===p||y===-1&&new Date(b[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))}}),gTt="",Iut=gn(Aut,[["__scopeId","data-v-5008746a"]]),Rut={install(n){n.component("st-klineUtils",Cut),n.component("st-klineSub",Tut),n.component("st-klineTips",Nut),n.component("st-klineSlide",Iut)}},mTt="",Out="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1N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jMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",{round:But}=vl,B2={minValueSpan:5,maxValueSpan:2e3,loadCheckCount:500,loadAddCount:2e3},Vut={1:240,2:48,3:16,4:8,5:4,6:1,7:.2,8:.033},xne=({startTime:n,endTime:e,cycle:t,type:i="end"})=>{const{maxValueSpan:r}=B2,o=Math.ceil((r+1e3)/Vut[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")]}},zut=(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"}},Hut=(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:zut(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:B2.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(But(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}},lk=(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},jut=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},Sne=(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)]}),uk=(n,e,t)=>{switch(t){case"5":{let h=[...new Set(n.slice(-20).map(_=>{const v=new Date(_),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((_,v)=>new Date(`2000-01-30 ${_}`).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"),b=String(f.getMinutes()).padStart(2,"0"),C=String(f.getSeconds()).padStart(2,"0");if(`${y}:${b}:${C}`=="00:00:00")return`${p}-${g}-${m} 01:00:00`;{let _=null;for(let v=0;v<h.length;v++){const w=h[v].split(":");if(+`${w[0]}${w[1]}${w[2]}`>=+`${y}${b}${C}`){_=h[v];break}}if(_==="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} ${_}`}}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"),b=`${g}-${m}-${y} 09:00:00`,C=lk(n,b,"gte");return C===-1?b: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(),b=String(m.getMonth()+1).padStart(2,"0"),C=String(m.getDate()).padStart(2,"0");return`${y}-${b}-${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,b=new Date(r,o,s,m,y,0),C=D=>String(D).padStart(2,"0"),_=b.getFullYear(),v=C(b.getMonth()+1),w=C(b.getDate()),x=C(b.getHours()),S=C(b.getMinutes());return`${_}-${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}`)}},ck=(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]},Wut=(n,e,t,i,r,o)=>{const s=(p,g)=>{const{direction:m="",tradeAction:y="",tradeType:b=""}=p,C=b??m+y;switch(g){case 0:return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(C);case 1:return b??m+y}},a=(p,g,m,y)=>p.reduce((b,C)=>{var N;const _=s(C,0),v=p.filter(L=>L.klineTime===C.klineTime),w=[...new Set(v.map(L=>s(L,0)))];let x=null;w.length>1?x="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB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yAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:x="image://"+new URL(Object.assign({"./images/buy.svg":Out,"./images/sell.svg":Fut,"./images/t.svg":Put})[`./images/${_==="买"?"buy":"sell"}.svg`],self.location).href;const S=lk(m,C.klineTime),D=(N=y[S])==null?void 0:N[3];return g.forEach(L=>{var k;const E=_==="买"?0:1;L.range[E]===C.klineTime&&(L.rangeValue[E]=(k=y[S])==null?void 0:k[_==="买"?2:3])}),b.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:_,amount:C.amount,part:C.part,profitAndLoss:C.profitAndLoss,openPriceAll:C.openPriceAll,closePriceAll:C.closePriceAll}}),b},[]),l=(p,g,m,y)=>{const{sellBuyByPrice:b}=o,C=p.reduce((_,v,w)=>{var N,L;const x=s(v,1),S=["开多","开空"].includes(x)?"top":"bottom";let D=null;if(b)D=S==="top"?(v.openPriceAll/v.amount).toFixed(2):(v.closePriceAll/v.amount).toFixed(2);else{const E=lk(m,v.klineTime);D=S==="top"?(N=y[E])==null?void 0:N[3]:(L=y[E])==null?void 0:L[2]}return g.forEach(E=>{(S==="top"?E.range[0]:E.range[1])===v.klineTime&&(E.rangeValue[S==="top"?0:1]=D)}),_.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}}),_},[]);return b?C:jut(C)},u=(p,g,m)=>{const{basePointData:y,baseLineData:b}=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:uk(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:uk(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:[]}),_=[...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=b.filter(({range:w})=>w[0]!==w[1]);return{pointData:_,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}])}},$ut=(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}},Uut=(n,e,t,i)=>{let r=[];if(["6","7","8"].includes(e)){const o=n.reduce((s,a)=>{const l=uk(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}},bTt="",qut={class:"tips"},dk=gn({__name:"Tips",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",qut,[(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"]]),yTt="",Kut=gn({__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=F2(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:b}=l.value,C=`${b[m].split(" ")[0]} 00:00:00`,_=`${b[y].split(" ")[0]} 23:59:59`;console.log(`检测到拖拽轴被拖动, 时间区间: ${C} - ${_}`),s("change",{startTime:C,endTime:_})}},200),h=F2(({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:b,lineData:C}=m.reduce((v,w,x)=>(v.xAxisData.push(y[x].split(" ")[0]),v.lineData.push(w[1]),v),{xAxisData:[],lineData:[]}),_={grid:{height:0,left:"100px",right:"80px"},xAxis:{type:"category",data:b,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(_,!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"),b=bt(g.endTime).format("YYYY-MM-DD");let C=-1,_=-1;for(let v=0;v<m.length;v++){const w=bt(m[v]).format("YYYY-MM-DD");if(C!==-1&&_!==-1)break;C===-1&&(new Date(w)===new Date(y)?C=v:new Date(w)>new Date(y)&&(C=v-1)),_===-1&&(new Date(w)===new Date(b)?_=v:new Date(w)>new Date(b)&&(_=v-1))}_===-1&&(_=m.length-1),r.dispatchAction({type:"dataZoom",startValue:C,endValue:_});break}}};return c.onMounted(()=>{c.nextTick(()=>{r=qr.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:F2(()=>r.resize(),100)}),(p,g)=>(c.openBlock(),c.createElementBlock("div",{class:"chart",ref_key:"sliderChartRef",ref:o},null,512))}},[["__scopeId","data-v-0c715da1"]]),CTt="",Gut={class:"main-chart"},Yut={class:"indicator"},Qut={key:0,class:"screen-time-range"},Zut={key:0,class:"sub-chart"},Xut={class:"indicator"},Jut={class:"title"},ect={key:1,class:"slider-chart"},tct=gn({__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}=vl,{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),b=c.ref(null),C=c.ref({data:[],mainIndicator:[],subIndicator:[],time:[]}),_=c.ref(0),v=c.ref([]),w=c.ref(null),x=c.ref("VOL"),S=c.computed(()=>{const O=C.value.data[_.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[_.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[_.value]||"-"})))||[]}),L=()=>{m||(m=qr.init(b.value),m.on("highlight",F2(O=>{var P;O.dataIndex?_.value=O.dataIndex:_.value=((P=O.batch)==null?void 0:P[0].dataIndex)??-1},10)),m.on("datazoom",F2(async()=>{var Q;const{loadCheckCount:O}=B2,{startValue:P,endValue:U}=((Q=m.getOption())==null?void 0:Q.dataZoom[0])??{};h===!1&&f===!1&&P<O&&await k("history"),u===!1&&d===!1&&U>C.value.time.length-O&&await k("new"),A(),R()})),m.on("globalout",()=>{const O=m.getOption();_.value=O.dataZoom[0].endValue}),m.getZr().on("contextmenu",()=>{var O;w.value=(O=C.value)==null?void 0:O.time[_.value]}),window.addEventListener("keydown",M),l.userKlineConfig.enable_subChart&&(g=qr.init(y.value),qr.connect([m,g])),p=fJ(b.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:Q}=await r.post("/middleLayer/kline/getKline",U);C.value=Q??{data:[],mainIndicator:[],subIndicator:[],time:[]};let W=-1,z=-1;for(let ne=0;ne<C.value.time.length;ne++){const ce=bt(C.value.time[ne]).format("YYYY-MM-DD");if(W!==-1&&z!==-1)break;W===-1&&(new Date(ce)===new Date(O)?W=ne:new Date(ce)>new Date(O)&&(W=ne-1)),z===-1&&(new Date(ce)===new Date(P)?z=ne:new Date(ce)>new Date(P)&&(z=ne-1))}z===-1&&(z=C.value.time.length-1),F({startValue:W===-1?0:W,endValue:z===-1?C.value.time.length-1:z})}finally{s.value=!1}},k=async O=>{var ce,le;const{loadAddCount:P}=B2;switch(O){case"history":{h=!0;const ie={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",ie);C.value=Sne(oe,C.value),oe.data.length<P&&(console.log("[K线] 获取更多数据: 左侧已全部获取完毕, 关闭"),f=!0),h=!1;break}case"new":{u=!0;const ie={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",ie);C.value=Sne(C.value,oe),oe.data.length<P&&(console.log("[K线] 获取更多数据: 右侧已全部获取完毕, 关闭"),d=!0),u=!1;break}}const{startValue:U,endValue:Q}=((ce=m.getOption())==null?void 0:ce.dataZoom[0])??{},W=(le=m.getOption())==null?void 0:le.xAxis[0].data,z=C.value.time.findIndex(ie=>new Date(ie)>=new Date(W[U])),ne=C.value.time.findIndex(ie=>new Date(ie)>=new Date(W[Q]));F({startValue:z===-1?0:z,endValue:ne===-1?C.value.time.length-1:ne})},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])??{},Q=O[P],W=O[U];["6","7","8"].includes(l.cycle)?v.value=[bt(Q).format("YYYY-MM-DD"),bt(W).format("YYYY-MM-DD")]:v.value=[Q,W]},F=(O={startValue:0,endValue:0})=>{L();const{maxValueSpan:P}=B2,{time:U,data:Q,mainIndicator:W}=C.value,z=O.endValue-O.startValue>P?O.endValue-P:O.startValue,ne=O.endValue,ce=W.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}=$ut(l.netPositionData,l.cycle),{tradeIncomeRateLineData:ie}=Uut(l.tradeIncomeRateData,l.cycle,l.incomeType,U),{tradePointData:oe,tradeLineData:he}=Wut(l.tradeLog,l.cycle,l.sellBuy,U,Q,l.userKlineConfig);m.setOption({animation:!1,grid:{top:"40px",left:"60px",right:"20px",bottom:"20px"},dataZoom:[{type:"inside",startValue:z,endValue:ne,minValueSpan:B2.minValueSpan,maxValueSpan:B2.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 ee=oe.filter(te=>(te==null?void 0:te.coord[0])===Le.axisValue);let j=0,Y=0;ee.forEach(te=>{const{tradeType:J,amount:re}=te.customData;J==="买"&&(j+=re),J==="卖"&&(Y+=re)}),j&&(de+=`<div>买: ${j}</div>`),Y&&(de+=`<div>卖: ${Y}</div>`)}else oe.forEach(ee=>{if((ee==null?void 0:ee.coord[0])===Le.axisValue){const{tradeType:j,amount:Y,profitAndLoss:te,openPriceAll:J,closePriceAll:re}=ee.customData;let G=`<div>${j}: ${Y}手</div>`;if(j.includes("开")&&(G+=`<div>开仓价: ${(J/Y).toFixed(2)}</div>`),j.includes("平")){const Z=(J/Y).toFixed(2),X=(re/Y).toFixed(2);G+=`<div>平仓价: ${X}</div>`,G+=`<div>盈亏: ${te==null?void 0:te.toFixed(2)}</div>`,G+=`<div>盈亏比率: ${((X-Z)/Z*100).toFixed(2)} %</div>`}de+=G}})}),!de)return null;let ve=pe[0].axisValue;return["6","7","8"].includes(l.cycle)&&(ve=bt(ve).format("YYYY-MM-DD")),`
|
|
143
143
|
<div>
|
|
144
144
|
<span style="font-weight: bold;">${ve}</span>
|
|
145
145
|
${de}
|
|
@@ -822,7 +822,7 @@ ${u.data.colorValue}`}}],data:o.data.map(u=>({...u,itemStyle:{color:u.color},chi
|
|
|
822
822
|
`),e=e.replace(pDt,"�"),n.src=e}function mDt(n){let e;n.inlineMode?(e=new n.Token("inline","",0),e.content=n.src,e.map=[0,1],e.children=[],n.tokens.push(e)):n.md.block.parse(n.src,n.md,n.env,n.tokens)}function bDt(n){const e=n.tokens;for(let t=0,i=e.length;t<i;t++){const r=e[t];r.type==="inline"&&n.md.inline.parse(r.content,n.md,n.env,r.children)}}function _Dt(n){return/^<a[>\s]/i.test(n)}function yDt(n){return/^<\/a\s*>/i.test(n)}function vDt(n){const e=n.tokens;if(n.md.options.linkify)for(let t=0,i=e.length;t<i;t++){if(e[t].type!=="inline"||!n.md.linkify.pretest(e[t].content))continue;let r=e[t].children,o=0;for(let s=r.length-1;s>=0;s--){const a=r[s];if(a.type==="link_close"){for(s--;r[s].level!==a.level&&r[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(_Dt(a.content)&&o>0&&o--,yDt(a.content)&&o++),!(o>0)&&a.type==="text"&&n.md.linkify.test(a.content)){const l=a.content;let u=n.md.linkify.match(l);const d=[];let h=a.level,f=0;u.length>0&&u[0].index===0&&s>0&&r[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const g=u[p].url,m=n.md.normalizeLink(g);if(!n.md.validateLink(m))continue;let y=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(y)?y=n.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=n.md.normalizeLinkText(y):y=n.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const b=u[p].index;if(b>f){const w=new n.Token("text","",0);w.content=l.slice(f,b),w.level=h,d.push(w)}const C=new n.Token("link_open","a",1);C.attrs=[["href",m]],C.level=h++,C.markup="linkify",C.info="auto",d.push(C);const _=new n.Token("text","",0);_.content=y,_.level=h,d.push(_);const v=new n.Token("link_close","a",-1);v.level=--h,v.markup="linkify",v.info="auto",d.push(v),f=u[p].lastIndex}if(f<l.length){const p=new n.Token("text","",0);p.content=l.slice(f),p.level=h,d.push(p)}e[t].children=r=Ode(r,s,d)}}}}const Bde=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,CDt=/\((c|tm|r)\)/i,wDt=/\((c|tm|r)\)/ig,xDt={c:"©",r:"®",tm:"™"};function SDt(n,e){return xDt[e.toLowerCase()]}function DDt(n){let e=0;for(let t=n.length-1;t>=0;t--){const i=n[t];i.type==="text"&&!e&&(i.content=i.content.replace(wDt,SDt)),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function NDt(n){let e=0;for(let t=n.length-1;t>=0;t--){const i=n[t];i.type==="text"&&!e&&Bde.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function EDt(n){let e;if(n.md.options.typographer)for(e=n.tokens.length-1;e>=0;e--)n.tokens[e].type==="inline"&&(CDt.test(n.tokens[e].content)&&DDt(n.tokens[e].children),Bde.test(n.tokens[e].content)&&NDt(n.tokens[e].children))}const kDt=/['"]/,Vde=/['"]/g,zde="’";function Pw(n,e,t){return n.slice(0,e)+t+n.slice(e+1)}function LDt(n,e){let t;const i=[];for(let r=0;r<n.length;r++){const o=n[r],s=n[r].level;for(t=i.length-1;t>=0&&!(i[t].level<=s);t--);if(i.length=t+1,o.type!=="text")continue;let a=o.content,l=0,u=a.length;e:for(;l<u;){Vde.lastIndex=l;const d=Vde.exec(a);if(!d)break;let h=!0,f=!0;l=d.index+1;const p=d[0]==="'";let g=32;if(d.index-1>=0)g=a.charCodeAt(d.index-1);else for(t=r-1;t>=0&&!(n[t].type==="softbreak"||n[t].type==="hardbreak");t--)if(n[t].content){g=n[t].content.charCodeAt(n[t].content.length-1);break}let m=32;if(l<u)m=a.charCodeAt(l);else for(t=r+1;t<n.length&&!(n[t].type==="softbreak"||n[t].type==="hardbreak");t++)if(n[t].content){m=n[t].content.charCodeAt(0);break}const y=U8(g)||$8(String.fromCharCode(g)),b=U8(m)||$8(String.fromCharCode(m)),C=W8(g),_=W8(m);if(_?h=!1:b&&(C||y||(h=!1)),C?f=!1:y&&(_||b||(f=!1)),m===34&&d[0]==='"'&&g>=48&&g<=57&&(f=h=!1),h&&f&&(h=y,f=b),!h&&!f){p&&(o.content=Pw(o.content,d.index,zde));continue}if(f)for(t=i.length-1;t>=0;t--){let v=i[t];if(i[t].level<s)break;if(v.single===p&&i[t].level===s){v=i[t];let w,x;p?(w=e.md.options.quotes[2],x=e.md.options.quotes[3]):(w=e.md.options.quotes[0],x=e.md.options.quotes[1]),o.content=Pw(o.content,d.index,x),n[v.token].content=Pw(n[v.token].content,v.pos,w),l+=x.length-1,v.token===r&&(l+=w.length-1),a=o.content,u=a.length,i.length=t;continue e}}h?i.push({token:r,pos:d.index,single:p,level:s}):f&&p&&(o.content=Pw(o.content,d.index,zde))}}}function MDt(n){if(n.md.options.typographer)for(let e=n.tokens.length-1;e>=0;e--)n.tokens[e].type!=="inline"||!kDt.test(n.tokens[e].content)||LDt(n.tokens[e].children,n)}function TDt(n){let e,t;const i=n.tokens,r=i.length;for(let o=0;o<r;o++){if(i[o].type!=="inline")continue;const s=i[o].children,a=s.length;for(e=0;e<a;e++)s[e].type==="text_special"&&(s[e].type="text");for(e=t=0;e<a;e++)s[e].type==="text"&&e+1<a&&s[e+1].type==="text"?s[e+1].content=s[e].content+s[e+1].content:(e!==t&&(s[t]=s[e]),t++);e!==t&&(s.length=t)}}const OO=[["normalize",gDt],["block",mDt],["inline",bDt],["linkify",vDt],["replacements",EDt],["smartquotes",MDt],["text_join",TDt]];function FO(){this.ruler=new ma;for(let n=0;n<OO.length;n++)this.ruler.push(OO[n][0],OO[n][1])}FO.prototype.process=function(n){const e=this.ruler.getRules("");for(let t=0,i=e.length;t<i;t++)e[t](n)},FO.prototype.State=Pde;function Zc(n,e,t,i){this.src=n,this.md=e,this.env=t,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let o=0,s=0,a=0,l=0,u=r.length,d=!1;s<u;s++){const h=r.charCodeAt(s);if(!d)if(Ui(h)){a++,h===9?l+=4-l%4:l++;continue}else d=!0;(h===10||s===u-1)&&(h!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,o=s+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Zc.prototype.push=function(n,e,t){const i=new $u(n,e,t);return i.block=!0,t<0&&this.level--,i.level=this.level,t>0&&this.level++,this.tokens.push(i),i},Zc.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},Zc.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},Zc.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const i=this.src.charCodeAt(e);if(!Ui(i))break}return e},Zc.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!Ui(this.src.charCodeAt(--e)))return e+1;return e},Zc.prototype.skipChars=function(e,t){for(let i=this.src.length;e<i&&this.src.charCodeAt(e)===t;e++);return e},Zc.prototype.skipCharsBack=function(e,t,i){if(e<=i)return e;for(;e>i;)if(t!==this.src.charCodeAt(--e))return e+1;return e},Zc.prototype.getLines=function(e,t,i,r){if(e>=t)return"";const o=new Array(t-e);for(let s=0,a=e;a<t;a++,s++){let l=0;const u=this.bMarks[a];let d=u,h;for(a+1<t||r?h=this.eMarks[a]+1:h=this.eMarks[a];d<h&&l<i;){const f=this.src.charCodeAt(d);if(Ui(f))f===9?l+=4-(l+this.bsCount[a])%4:l++;else if(d-u<this.tShift[a])l++;else break;d++}l>i?o[s]=new Array(l-i+1).join(" ")+this.src.slice(d,h):o[s]=this.src.slice(d,h)}return o.join("")},Zc.prototype.Token=$u;const ADt=65536;function PO(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];return n.src.slice(t,i)}function Hde(n){const e=[],t=n.length;let i=0,r=n.charCodeAt(i),o=!1,s=0,a="";for(;i<t;)r===124&&(o?(a+=n.substring(s,i-1),s=i):(e.push(a+n.substring(s,i)),a="",s=i+1)),o=r===92,i++,r=n.charCodeAt(i);return e.push(a+n.substring(s)),e}function IDt(n,e,t,i){if(e+2>t)return!1;let r=e+1;if(n.sCount[r]<n.blkIndent||n.sCount[r]-n.blkIndent>=4)return!1;let o=n.bMarks[r]+n.tShift[r];if(o>=n.eMarks[r])return!1;const s=n.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=n.eMarks[r])return!1;const a=n.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!Ui(a)||s===45&&Ui(a))return!1;for(;o<n.eMarks[r];){const v=n.src.charCodeAt(o);if(v!==124&&v!==45&&v!==58&&!Ui(v))return!1;o++}let l=PO(n,e+1),u=l.split("|");const d=[];for(let v=0;v<u.length;v++){const w=u[v].trim();if(!w){if(v===0||v===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(w))return!1;w.charCodeAt(w.length-1)===58?d.push(w.charCodeAt(0)===58?"center":"right"):w.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=PO(n,e).trim(),l.indexOf("|")===-1||n.sCount[e]-n.blkIndent>=4)return!1;u=Hde(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const h=u.length;if(h===0||h!==d.length)return!1;if(i)return!0;const f=n.parentType;n.parentType="table";const p=n.md.block.ruler.getRules("blockquote"),g=n.push("table_open","table",1),m=[e,0];g.map=m;const y=n.push("thead_open","thead",1);y.map=[e,e+1];const b=n.push("tr_open","tr",1);b.map=[e,e+1];for(let v=0;v<u.length;v++){const w=n.push("th_open","th",1);d[v]&&(w.attrs=[["style","text-align:"+d[v]]]);const x=n.push("inline","",0);x.content=u[v].trim(),x.children=[],n.push("th_close","th",-1)}n.push("tr_close","tr",-1),n.push("thead_close","thead",-1);let C,_=0;for(r=e+2;r<t&&!(n.sCount[r]<n.blkIndent);r++){let v=!1;for(let x=0,S=p.length;x<S;x++)if(p[x](n,r,t,!0)){v=!0;break}if(v||(l=PO(n,r).trim(),!l)||n.sCount[r]-n.blkIndent>=4||(u=Hde(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),_+=h-u.length,_>ADt))break;if(r===e+2){const x=n.push("tbody_open","tbody",1);x.map=C=[e+2,0]}const w=n.push("tr_open","tr",1);w.map=[r,r+1];for(let x=0;x<h;x++){const S=n.push("td_open","td",1);d[x]&&(S.attrs=[["style","text-align:"+d[x]]]);const D=n.push("inline","",0);D.content=u[x]?u[x].trim():"",D.children=[],n.push("td_close","td",-1)}n.push("tr_close","tr",-1)}return C&&(n.push("tbody_close","tbody",-1),C[1]=r),n.push("table_close","table",-1),m[1]=r,n.parentType=f,n.line=r,!0}function RDt(n,e,t){if(n.sCount[e]-n.blkIndent<4)return!1;let i=e+1,r=i;for(;i<t;){if(n.isEmpty(i)){i++;continue}if(n.sCount[i]-n.blkIndent>=4){i++,r=i;continue}break}n.line=r;const o=n.push("code_block","code",0);return o.content=n.getLines(e,r,4+n.blkIndent,!1)+`
|
|
823
823
|
`,o.map=[e,n.line],!0}function ODt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||r+3>o)return!1;const s=n.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=n.skipChars(r,s);let l=r-a;if(l<3)return!1;const u=n.src.slice(a,r),d=n.src.slice(r,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let h=e,f=!1;for(;h++,!(h>=t||(r=a=n.bMarks[h]+n.tShift[h],o=n.eMarks[h],r<o&&n.sCount[h]<n.blkIndent));)if(n.src.charCodeAt(r)===s&&!(n.sCount[h]-n.blkIndent>=4)&&(r=n.skipChars(r,s),!(r-a<l)&&(r=n.skipSpaces(r),!(r<o)))){f=!0;break}l=n.sCount[e],n.line=h+(f?1:0);const p=n.push("fence","code",0);return p.info=d,p.content=n.getLines(e+1,h,l,!0),p.markup=u,p.map=[e,n.line],!0}function FDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];const s=n.lineMax;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==62)return!1;if(i)return!0;const a=[],l=[],u=[],d=[],h=n.md.block.ruler.getRules("blockquote"),f=n.parentType;n.parentType="blockquote";let p=!1,g;for(g=e;g<t;g++){const _=n.sCount[g]<n.blkIndent;if(r=n.bMarks[g]+n.tShift[g],o=n.eMarks[g],r>=o)break;if(n.src.charCodeAt(r++)===62&&!_){let w=n.sCount[g]+1,x,S;n.src.charCodeAt(r)===32?(r++,w++,S=!1,x=!0):n.src.charCodeAt(r)===9?(x=!0,(n.bsCount[g]+w)%4===3?(r++,w++,S=!1):S=!0):x=!1;let D=w;for(a.push(n.bMarks[g]),n.bMarks[g]=r;r<o;){const N=n.src.charCodeAt(r);if(Ui(N))N===9?D+=4-(D+n.bsCount[g]+(S?1:0))%4:D++;else break;r++}p=r>=o,l.push(n.bsCount[g]),n.bsCount[g]=n.sCount[g]+1+(x?1:0),u.push(n.sCount[g]),n.sCount[g]=D-w,d.push(n.tShift[g]),n.tShift[g]=r-n.bMarks[g];continue}if(p)break;let v=!1;for(let w=0,x=h.length;w<x;w++)if(h[w](n,g,t,!0)){v=!0;break}if(v){n.lineMax=g,n.blkIndent!==0&&(a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]-=n.blkIndent);break}a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]=-1}const m=n.blkIndent;n.blkIndent=0;const y=n.push("blockquote_open","blockquote",1);y.markup=">";const b=[e,0];y.map=b,n.md.block.tokenize(n,e,g);const C=n.push("blockquote_close","blockquote",-1);C.markup=">",n.lineMax=s,n.parentType=f,b[1]=n.line;for(let _=0;_<d.length;_++)n.bMarks[_+e]=a[_],n.tShift[_+e]=d[_],n.sCount[_+e]=u[_],n.bsCount[_+e]=l[_];return n.blkIndent=m,!0}function PDt(n,e,t,i){const r=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let o=n.bMarks[e]+n.tShift[e];const s=n.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<r;){const u=n.src.charCodeAt(o++);if(u!==s&&!Ui(u))return!1;u===s&&a++}if(a<3)return!1;if(i)return!0;n.line=e+1;const l=n.push("hr","hr",0);return l.map=[e,n.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function jde(n,e){const t=n.eMarks[e];let i=n.bMarks[e]+n.tShift[e];const r=n.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<t){const o=n.src.charCodeAt(i);if(!Ui(o))return-1}return i}function Wde(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];let r=t;if(r+1>=i)return-1;let o=n.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=n.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=n.src.charCodeAt(r),!Ui(o))?-1:r}function BDt(n,e){const t=n.level+2;for(let i=e+2,r=n.tokens.length-2;i<r;i++)n.tokens[i].level===t&&n.tokens[i].type==="paragraph_open"&&(n.tokens[i+2].hidden=!0,n.tokens[i].hidden=!0,i+=2)}function VDt(n,e,t,i){let r,o,s,a,l=e,u=!0;if(n.sCount[l]-n.blkIndent>=4||n.listIndent>=0&&n.sCount[l]-n.listIndent>=4&&n.sCount[l]<n.blkIndent)return!1;let d=!1;i&&n.parentType==="paragraph"&&n.sCount[l]>=n.blkIndent&&(d=!0);let h,f,p;if((p=Wde(n,l))>=0){if(h=!0,s=n.bMarks[l]+n.tShift[l],f=Number(n.src.slice(s,p-1)),d&&f!==1)return!1}else if((p=jde(n,l))>=0)h=!1;else return!1;if(d&&n.skipSpaces(p)>=n.eMarks[l])return!1;if(i)return!0;const g=n.src.charCodeAt(p-1),m=n.tokens.length;h?(a=n.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=n.push("bullet_list_open","ul",1);const y=[l,0];a.map=y,a.markup=String.fromCharCode(g);let b=!1;const C=n.md.block.ruler.getRules("list"),_=n.parentType;for(n.parentType="list";l<t;){o=p,r=n.eMarks[l];const v=n.sCount[l]+p-(n.bMarks[l]+n.tShift[l]);let w=v;for(;o<r;){const R=n.src.charCodeAt(o);if(R===9)w+=4-(w+n.bsCount[l])%4;else if(R===32)w++;else break;o++}const x=o;let S;x>=r?S=1:S=w-v,S>4&&(S=1);const D=v+S;a=n.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const N=[l,0];a.map=N,h&&(a.info=n.src.slice(s,p-1));const L=n.tight,E=n.tShift[l],k=n.sCount[l],A=n.listIndent;if(n.listIndent=n.blkIndent,n.blkIndent=D,n.tight=!0,n.tShift[l]=x-n.bMarks[l],n.sCount[l]=w,x>=r&&n.isEmpty(l+1)?n.line=Math.min(n.line+2,t):n.md.block.tokenize(n,l,t,!0),(!n.tight||b)&&(u=!1),b=n.line-l>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=A,n.tShift[l]=E,n.sCount[l]=k,n.tight=L,a=n.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),l=n.line,N[1]=l,l>=t||n.sCount[l]<n.blkIndent||n.sCount[l]-n.blkIndent>=4)break;let F=!1;for(let R=0,I=C.length;R<I;R++)if(C[R](n,l,t,!0)){F=!0;break}if(F)break;if(h){if(p=Wde(n,l),p<0)break;s=n.bMarks[l]+n.tShift[l]}else if(p=jde(n,l),p<0)break;if(g!==n.src.charCodeAt(p-1))break}return h?a=n.push("ordered_list_close","ol",-1):a=n.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),y[1]=l,n.line=l,n.parentType=_,u&&BDt(n,m),!0}function zDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e],s=e+1;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==91)return!1;function a(C){const _=n.lineMax;if(C>=_||n.isEmpty(C))return null;let v=!1;if(n.sCount[C]-n.blkIndent>3&&(v=!0),n.sCount[C]<0&&(v=!0),!v){const S=n.md.block.ruler.getRules("reference"),D=n.parentType;n.parentType="reference";let N=!1;for(let L=0,E=S.length;L<E;L++)if(S[L](n,C,_,!0)){N=!0;break}if(n.parentType=D,N)return null}const w=n.bMarks[C]+n.tShift[C],x=n.eMarks[C];return n.src.slice(w,x+1)}let l=n.src.slice(r,o+1);o=l.length;let u=-1;for(r=1;r<o;r++){const C=l.charCodeAt(r);if(C===91)return!1;if(C===93){u=r;break}else if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(C===92&&(r++,r<o&&l.charCodeAt(r)===10)){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(r=u+2;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}const d=n.md.helpers.parseLinkDestination(l,r,o);if(!d.ok)return!1;const h=n.md.normalizeLink(d.str);if(!n.md.validateLink(h))return!1;r=d.pos;const f=r,p=s,g=r;for(;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}let m=n.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){const C=a(s);if(C===null)break;l+=C,r=o,o=l.length,s++,m=n.md.helpers.parseLinkTitle(l,r,o,m)}let y;for(r<o&&g!==r&&m.ok?(y=m.str,r=m.pos):(y="",r=f,s=p);r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10&&y)for(y="",r=f,s=p;r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const b=Fw(l.slice(1,u));return b?(i||(typeof n.env.references>"u"&&(n.env.references={}),typeof n.env.references[b]>"u"&&(n.env.references[b]={title:y,href:h}),n.line=s),!0):!1}const HDt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],jDt="[a-zA-Z_:][a-zA-Z0-9:._-]*",WDt="[^\"'=<>`\\x00-\\x20]+",$Dt="'[^']*'",UDt='"[^"]*"',qDt="(?:"+WDt+"|"+$Dt+"|"+UDt+")",$de="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+jDt+"(?:\\s*=\\s*"+qDt+")?)")+"*\\s*\\/?>",Ude="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",KDt="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",GDt="<[?][\\s\\S]*?[?]>",YDt="<![A-Za-z][^>]*>",QDt="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",ZDt=new RegExp("^(?:"+$de+"|"+Ude+"|"+KDt+"|"+GDt+"|"+YDt+"|"+QDt+")"),XDt=new RegExp("^(?:"+$de+"|"+Ude+")"),mg=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+HDt.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(XDt.source+"\\s*$"),/^$/,!1]];function JDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||!n.md.options.html||n.src.charCodeAt(r)!==60)return!1;let s=n.src.slice(r,o),a=0;for(;a<mg.length&&!mg[a][0].test(s);a++);if(a===mg.length)return!1;if(i)return mg[a][2];let l=e+1;if(!mg[a][1].test(s)){for(;l<t&&!(n.sCount[l]<n.blkIndent);l++)if(r=n.bMarks[l]+n.tShift[l],o=n.eMarks[l],s=n.src.slice(r,o),mg[a][1].test(s)){s.length!==0&&l++;break}}n.line=l;const u=n.push("html_block","",0);return u.map=[e,l],u.content=n.getLines(e,l,n.blkIndent,!0),!0}function eNt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let s=n.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=n.src.charCodeAt(++r);s===35&&r<o&&a<=6;)a++,s=n.src.charCodeAt(++r);if(a>6||r<o&&!Ui(s))return!1;if(i)return!0;o=n.skipSpacesBack(o,r);const l=n.skipCharsBack(o,35,r);l>r&&Ui(n.src.charCodeAt(l-1))&&(o=l),n.line=e+1;const u=n.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,n.line];const d=n.push("inline","",0);d.content=n.src.slice(r,o).trim(),d.map=[e,n.line],d.children=[];const h=n.push("heading_close","h"+String(a),-1);return h.markup="########".slice(0,a),!0}function tNt(n,e,t){const i=n.md.block.ruler.getRules("paragraph");if(n.sCount[e]-n.blkIndent>=4)return!1;const r=n.parentType;n.parentType="paragraph";let o=0,s,a=e+1;for(;a<t&&!n.isEmpty(a);a++){if(n.sCount[a]-n.blkIndent>3)continue;if(n.sCount[a]>=n.blkIndent){let p=n.bMarks[a]+n.tShift[a];const g=n.eMarks[a];if(p<g&&(s=n.src.charCodeAt(p),(s===45||s===61)&&(p=n.skipChars(p,s),p=n.skipSpaces(p),p>=g))){o=s===61?1:2;break}}if(n.sCount[a]<0)continue;let f=!1;for(let p=0,g=i.length;p<g;p++)if(i[p](n,a,t,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=n.getLines(e,a,n.blkIndent,!1).trim();n.line=a+1;const u=n.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),u.map=[e,n.line];const d=n.push("inline","",0);d.content=l,d.map=[e,n.line-1],d.children=[];const h=n.push("heading_close","h"+String(o),-1);return h.markup=String.fromCharCode(s),n.parentType=r,!0}function nNt(n,e,t){const i=n.md.block.ruler.getRules("paragraph"),r=n.parentType;let o=e+1;for(n.parentType="paragraph";o<t&&!n.isEmpty(o);o++){if(n.sCount[o]-n.blkIndent>3||n.sCount[o]<0)continue;let u=!1;for(let d=0,h=i.length;d<h;d++)if(i[d](n,o,t,!0)){u=!0;break}if(u)break}const s=n.getLines(e,o,n.blkIndent,!1).trim();n.line=o;const a=n.push("paragraph_open","p",1);a.map=[e,n.line];const l=n.push("inline","",0);return l.content=s,l.map=[e,n.line],l.children=[],n.push("paragraph_close","p",-1),n.parentType=r,!0}const Bw=[["table",IDt,["paragraph","reference"]],["code",RDt],["fence",ODt,["paragraph","reference","blockquote","list"]],["blockquote",FDt,["paragraph","reference","blockquote","list"]],["hr",PDt,["paragraph","reference","blockquote","list"]],["list",VDt,["paragraph","reference","blockquote"]],["reference",zDt],["html_block",JDt,["paragraph","reference","blockquote"]],["heading",eNt,["paragraph","reference","blockquote"]],["lheading",tNt],["paragraph",nNt]];function Vw(){this.ruler=new ma;for(let n=0;n<Bw.length;n++)this.ruler.push(Bw[n][0],Bw[n][1],{alt:(Bw[n][2]||[]).slice()})}Vw.prototype.tokenize=function(n,e,t){const i=this.ruler.getRules(""),r=i.length,o=n.md.options.maxNesting;let s=e,a=!1;for(;s<t&&(n.line=s=n.skipEmptyLines(s),!(s>=t||n.sCount[s]<n.blkIndent));){if(n.level>=o){n.line=t;break}const l=n.line;let u=!1;for(let d=0;d<r;d++)if(u=i[d](n,s,t,!1),u){if(l>=n.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");n.tight=!a,n.isEmpty(n.line-1)&&(a=!0),s=n.line,s<t&&n.isEmpty(s)&&(a=!0,s++,n.line=s)}},Vw.prototype.parse=function(n,e,t,i){if(!n)return;const r=new this.State(n,e,t,i);this.tokenize(r,r.line,r.lineMax)},Vw.prototype.State=Zc;function q8(n,e,t,i){this.src=n,this.env=t,this.md=e,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}q8.prototype.pushPending=function(){const n=new $u("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n},q8.prototype.push=function(n,e,t){this.pending&&this.pushPending();const i=new $u(n,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},q8.prototype.scanDelims=function(n,e){const t=this.posMax,i=this.src.charCodeAt(n),r=n>0?this.src.charCodeAt(n-1):32;let o=n;for(;o<t&&this.src.charCodeAt(o)===i;)o++;const s=o-n,a=o<t?this.src.charCodeAt(o):32,l=U8(r)||$8(String.fromCharCode(r)),u=U8(a)||$8(String.fromCharCode(a)),d=W8(r),h=W8(a),f=!h&&(!u||d||l),p=!d&&(!l||h||u);return{can_open:f&&(e||!p||l),can_close:p&&(e||!f||u),length:s}},q8.prototype.Token=$u;function iNt(n){switch(n){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function rNt(n,e){let t=n.pos;for(;t<n.posMax&&!iNt(n.src.charCodeAt(t));)t++;return t===n.pos?!1:(e||(n.pending+=n.src.slice(n.pos,t)),n.pos=t,!0)}const oNt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function sNt(n,e){if(!n.md.options.linkify||n.linkLevel>0)return!1;const t=n.pos,i=n.posMax;if(t+3>i||n.src.charCodeAt(t)!==58||n.src.charCodeAt(t+1)!==47||n.src.charCodeAt(t+2)!==47)return!1;const r=n.pending.match(oNt);if(!r)return!1;const o=r[1],s=n.md.linkify.matchAtStart(n.src.slice(t-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;a=a.replace(/\*+$/,"");const l=n.md.normalizeLink(a);if(!n.md.validateLink(l))return!1;if(!e){n.pending=n.pending.slice(0,-o.length);const u=n.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const d=n.push("text","",0);d.content=n.md.normalizeLinkText(a);const h=n.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return n.pos+=a.length-o.length,!0}function aNt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==10)return!1;const i=n.pending.length-1,r=n.posMax;if(!e)if(i>=0&&n.pending.charCodeAt(i)===32)if(i>=1&&n.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&n.pending.charCodeAt(o-1)===32;)o--;n.pending=n.pending.slice(0,o),n.push("hardbreak","br",0)}else n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0);else n.push("softbreak","br",0);for(t++;t<r&&Ui(n.src.charCodeAt(t));)t++;return n.pos=t,!0}const BO=[];for(let n=0;n<256;n++)BO.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){BO[n.charCodeAt(0)]=1});function lNt(n,e){let t=n.pos;const i=n.posMax;if(n.src.charCodeAt(t)!==92||(t++,t>=i))return!1;let r=n.src.charCodeAt(t);if(r===10){for(e||n.push("hardbreak","br",0),t++;t<i&&(r=n.src.charCodeAt(t),!!Ui(r));)t++;return n.pos=t,!0}let o=n.src[t];if(r>=55296&&r<=56319&&t+1<i){const a=n.src.charCodeAt(t+1);a>=56320&&a<=57343&&(o+=n.src[t+1],t++)}const s="\\"+o;if(!e){const a=n.push("text_special","",0);r<256&&BO[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return n.pos=t+1,!0}function uNt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=n.posMax;for(;t<o&&n.src.charCodeAt(t)===96;)t++;const s=n.src.slice(r,t),a=s.length;if(n.backticksScanned&&(n.backticks[a]||0)<=r)return e||(n.pending+=s),n.pos+=a,!0;let l=t,u;for(;(u=n.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&n.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===a){if(!e){const h=n.push("code_inline","code",0);h.markup=s,h.content=n.src.slice(t,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return n.pos=l,!0}n.backticks[d]=u}return n.backticksScanned=!0,e||(n.pending+=s),n.pos+=a,!0}function cNt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==126)return!1;const r=n.scanDelims(n.pos,!0);let o=r.length;const s=String.fromCharCode(i);if(o<2)return!1;let a;o%2&&(a=n.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=n.push("text","",0),a.content=s+s,n.delimiters.push({marker:i,length:0,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return n.pos+=r.length,!0}function qde(n,e){let t;const i=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];if(s.marker!==126||s.end===-1)continue;const a=e[s.end];t=n.tokens[s.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=n.tokens[a.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",n.tokens[a.token-1].type==="text"&&n.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){const o=i.pop();let s=o+1;for(;s<n.tokens.length&&n.tokens[s].type==="s_close";)s++;s--,o!==s&&(t=n.tokens[s],n.tokens[s]=n.tokens[o],n.tokens[o]=t)}}function dNt(n){const e=n.tokens_meta,t=n.tokens_meta.length;qde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&qde(n,e[i].delimiters)}const Kde={tokenize:cNt,postProcess:dNt};function hNt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==95&&i!==42)return!1;const r=n.scanDelims(n.pos,i===42);for(let o=0;o<r.length;o++){const s=n.push("text","",0);s.content=String.fromCharCode(i),n.delimiters.push({marker:i,length:r.length,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return n.pos+=r.length,!0}function Gde(n,e){const t=e.length;for(let i=t-1;i>=0;i--){const r=e[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],s=i>0&&e[i-1].end===r.end+1&&e[i-1].marker===r.marker&&e[i-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=n.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const u=n.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(n.tokens[e[i-1].token].content="",n.tokens[e[r.end+1].token].content="",i--)}}function fNt(n){const e=n.tokens_meta,t=n.tokens_meta.length;Gde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&Gde(n,e[i].delimiters)}const Yde={tokenize:hNt,postProcess:fNt};function pNt(n,e){let t,i,r,o,s="",a="",l=n.pos,u=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;const d=n.pos,h=n.posMax,f=n.pos+1,p=n.md.helpers.parseLinkLabel(n,n.pos,!0);if(p<0)return!1;let g=p+1;if(g<h&&n.src.charCodeAt(g)===40){for(u=!1,g++;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(g>=h)return!1;if(l=g,r=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),r.ok){for(s=n.md.normalizeLink(r.str),n.md.validateLink(s)?g=r.pos:s="",l=g;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(r=n.md.helpers.parseLinkTitle(n.src,g,n.posMax),g<h&&l!==g&&r.ok)for(a=r.str,g=r.pos;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);}(g>=h||n.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof n.env.references>"u")return!1;if(g<h&&n.src.charCodeAt(g)===91?(l=g+1,g=n.md.helpers.parseLinkLabel(n,g),g>=0?i=n.src.slice(l,g++):g=p+1):g=p+1,i||(i=n.src.slice(f,p)),o=n.env.references[Fw(i)],!o)return n.pos=d,!1;s=o.href,a=o.title}if(!e){n.pos=f,n.posMax=p;const m=n.push("link_open","a",1),y=[["href",s]];m.attrs=y,a&&y.push(["title",a]),n.linkLevel++,n.md.inline.tokenize(n),n.linkLevel--,n.push("link_close","a",-1)}return n.pos=g,n.posMax=h,!0}function gNt(n,e){let t,i,r,o,s,a,l,u,d="";const h=n.pos,f=n.posMax;if(n.src.charCodeAt(n.pos)!==33||n.src.charCodeAt(n.pos+1)!==91)return!1;const p=n.pos+2,g=n.md.helpers.parseLinkLabel(n,n.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&n.src.charCodeAt(o)===40){for(o++;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(o>=f)return!1;for(u=o,a=n.md.helpers.parseLinkDestination(n.src,o,n.posMax),a.ok&&(d=n.md.normalizeLink(a.str),n.md.validateLink(d)?o=a.pos:d=""),u=o;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(a=n.md.helpers.parseLinkTitle(n.src,o,n.posMax),o<f&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);else l="";if(o>=f||n.src.charCodeAt(o)!==41)return n.pos=h,!1;o++}else{if(typeof n.env.references>"u")return!1;if(o<f&&n.src.charCodeAt(o)===91?(u=o+1,o=n.md.helpers.parseLinkLabel(n,o),o>=0?r=n.src.slice(u,o++):o=g+1):o=g+1,r||(r=n.src.slice(p,g)),s=n.env.references[Fw(r)],!s)return n.pos=h,!1;d=s.href,l=s.title}if(!e){i=n.src.slice(p,g);const m=[];n.md.inline.parse(i,n.md,n.env,m);const y=n.push("image","img",0),b=[["src",d],["alt",""]];y.attrs=b,y.children=m,y.content=i,l&&b.push(["title",l])}return n.pos=o,n.posMax=f,!0}const mNt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,bNt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function _Nt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==60)return!1;const i=n.pos,r=n.posMax;for(;;){if(++t>=r)return!1;const s=n.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}const o=n.src.slice(i+1,t);if(bNt.test(o)){const s=n.md.normalizeLink(o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}if(mNt.test(o)){const s=n.md.normalizeLink("mailto:"+o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}return!1}function yNt(n){return/^<a[>\s]/i.test(n)}function vNt(n){return/^<\/a\s*>/i.test(n)}function CNt(n){const e=n|32;return e>=97&&e<=122}function wNt(n,e){if(!n.md.options.html)return!1;const t=n.posMax,i=n.pos;if(n.src.charCodeAt(i)!==60||i+2>=t)return!1;const r=n.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!CNt(r))return!1;const o=n.src.slice(i).match(ZDt);if(!o)return!1;if(!e){const s=n.push("html_inline","",0);s.content=o[0],yNt(s.content)&&n.linkLevel++,vNt(s.content)&&n.linkLevel--}return n.pos+=o[0].length,!0}const xNt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,SNt=/^&([a-z][a-z0-9]{1,31});/i;function DNt(n,e){const t=n.pos,i=n.posMax;if(n.src.charCodeAt(t)!==38||t+1>=i)return!1;if(n.src.charCodeAt(t+1)===35){const o=n.src.slice(t).match(xNt);if(o){if(!e){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=n.push("text_special","",0);a.content=RO(s)?Ow(s):Ow(65533),a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}else{const o=n.src.slice(t).match(SNt);if(o){const s=Rde(o[0]);if(s!==o[0]){if(!e){const a=n.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}}return!1}function Qde(n){const e={},t=n.length;if(!t)return;let i=0,r=-2;const o=[];for(let s=0;s<t;s++){const a=n[s];if(o.push(0),(n[i].marker!==a.marker||r!==a.token-1)&&(i=s),r=a.token,a.length=a.length||0,!a.close)continue;e.hasOwnProperty(a.marker)||(e[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[a.marker][(a.open?3:0)+a.length%3];let u=i-o[i]-1,d=u;for(;u>l;u-=o[u]+1){const h=n[u];if(h.marker===a.marker&&h.open&&h.end<0){let f=!1;if((h.close||a.open)&&(h.length+a.length)%3===0&&(h.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=u>0&&!n[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,h.end=s,h.close=!1,d=-1,r=-2;break}}}d!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function NNt(n){const e=n.tokens_meta,t=n.tokens_meta.length;Qde(n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&Qde(e[i].delimiters)}function ENt(n){let e,t,i=0;const r=n.tokens,o=n.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&i--,r[e].level=i,r[e].nesting>0&&i++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const VO=[["text",rNt],["linkify",sNt],["newline",aNt],["escape",lNt],["backticks",uNt],["strikethrough",Kde.tokenize],["emphasis",Yde.tokenize],["link",pNt],["image",gNt],["autolink",_Nt],["html_inline",wNt],["entity",DNt]],zO=[["balance_pairs",NNt],["strikethrough",Kde.postProcess],["emphasis",Yde.postProcess],["fragments_join",ENt]];function K8(){this.ruler=new ma;for(let n=0;n<VO.length;n++)this.ruler.push(VO[n][0],VO[n][1]);this.ruler2=new ma;for(let n=0;n<zO.length;n++)this.ruler2.push(zO[n][0],zO[n][1])}K8.prototype.skipToken=function(n){const e=n.pos,t=this.ruler.getRules(""),i=t.length,r=n.md.options.maxNesting,o=n.cache;if(typeof o[e]<"u"){n.pos=o[e];return}let s=!1;if(n.level<r){for(let a=0;a<i;a++)if(n.level++,s=t[a](n,!0),n.level--,s){if(e>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}else n.pos=n.posMax;s||n.pos++,o[e]=n.pos},K8.prototype.tokenize=function(n){const e=this.ruler.getRules(""),t=e.length,i=n.posMax,r=n.md.options.maxNesting;for(;n.pos<i;){const o=n.pos;let s=!1;if(n.level<r){for(let a=0;a<t;a++)if(s=e[a](n,!1),s){if(o>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(n.pos>=i)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()},K8.prototype.parse=function(n,e,t,i){const r=new this.State(n,e,t,i);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](r)},K8.prototype.State=q8;function kNt(n){const e={};n=n||{},e.src_Any=Lde.source,e.src_Cc=Mde.source,e.src_Z=Ade.source,e.src_P=MO.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(n["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function HO(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(i){n[i]=t[i]})}),n}function zw(n){return Object.prototype.toString.call(n)}function LNt(n){return zw(n)==="[object String]"}function MNt(n){return zw(n)==="[object Object]"}function TNt(n){return zw(n)==="[object RegExp]"}function Zde(n){return zw(n)==="[object Function]"}function ANt(n){return n.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Xde={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function INt(n){return Object.keys(n||{}).reduce(function(e,t){return e||Xde.hasOwnProperty(t)},!1)}const RNt={"http:":{validate:function(n,e,t){const i=n.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(i)?i.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(n,e,t){const i=n.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(i)?e>=3&&n[e-3]===":"||e>=3&&n[e-3]==="/"?0:i.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(n,e,t){const i=n.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(i)?i.match(t.re.mailto)[0].length:0}}},ONt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",FNt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function PNt(n){n.__index__=-1,n.__text_cache__=""}function BNt(n){return function(e,t){const i=e.slice(t);return n.test(i)?i.match(n)[0].length:0}}function Jde(){return function(n,e){e.normalize(n)}}function Hw(n){const e=n.re=kNt(n.__opts__),t=n.__tlds__.slice();n.onCompile(),n.__tlds_replaced__||t.push(ONt),t.push(e.src_xn),e.src_tlds=t.join("|");function i(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(i(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(i(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(i(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(i(e.tpl_host_fuzzy_test),"i");const r=[];n.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(n.__schemas__).forEach(function(a){const l=n.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(n.__compiled__[a]=u,MNt(l)){TNt(l.validate)?u.validate=BNt(l.validate):Zde(l.validate)?u.validate=l.validate:o(a,l),Zde(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=Jde();return}if(LNt(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){n.__compiled__[n.__schemas__[a]]&&(n.__compiled__[a].validate=n.__compiled__[n.__schemas__[a]].validate,n.__compiled__[a].normalize=n.__compiled__[n.__schemas__[a]].normalize)}),n.__compiled__[""]={validate:null,normalize:Jde()};const s=Object.keys(n.__compiled__).filter(function(a){return a.length>0&&n.__compiled__[a]}).map(ANt).join("|");n.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","i"),n.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","ig"),n.re.schema_at_start=RegExp("^"+n.re.schema_search.source,"i"),n.re.pretest=RegExp("("+n.re.schema_test.source+")|("+n.re.host_fuzzy_test.source+")|@","i"),PNt(n)}function VNt(n,e){const t=n.__index__,i=n.__last_index__,r=n.__text_cache__.slice(t,i);this.schema=n.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=i+e,this.raw=r,this.text=r,this.url=r}function jO(n,e){const t=new VNt(n,e);return n.__compiled__[t.schema].normalize(t,n),t}function Ka(n,e){if(!(this instanceof Ka))return new Ka(n,e);e||INt(n)&&(e=n,n={}),this.__opts__=HO({},Xde,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=HO({},RNt,n),this.__compiled__={},this.__tlds__=FNt,this.__tlds_replaced__=!1,this.re={},Hw(this)}Ka.prototype.add=function(e,t){return this.__schemas__[e]=t,Hw(this),this},Ka.prototype.set=function(e){return this.__opts__=HO(this.__opts__,e),this},Ka.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,i,r,o,s,a,l,u,d;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(t=l.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],l.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(i=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=i.index+i[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=e.indexOf("@"),d>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},Ka.prototype.pretest=function(e){return this.re.pretest.test(e)},Ka.prototype.testSchemaAt=function(e,t,i){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,i,this):0},Ka.prototype.match=function(e){const t=[];let i=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(jO(this,i)),i=this.__last_index__);let r=i?e.slice(i):e;for(;this.test(r);)t.push(jO(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return t.length?t:null},Ka.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const i=this.testSchemaAt(e,t[2],t[0].length);return i?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i,jO(this,0)):null},Ka.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Hw(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Hw(this),this)},Ka.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Ka.prototype.onCompile=function(){};const bg=2147483647,Xc=36,WO=1,G8=26,zNt=38,HNt=700,e0e=72,t0e=128,n0e="-",jNt=/^xn--/,WNt=/[^\0-\x7F]/,$Nt=/[\x2E\u3002\uFF0E\uFF61]/g,UNt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$O=Xc-WO,Jc=Math.floor,UO=String.fromCharCode;function Dh(n){throw new RangeError(UNt[n])}function qNt(n,e){const t=[];let i=n.length;for(;i--;)t[i]=e(n[i]);return t}function i0e(n,e){const t=n.split("@");let i="";t.length>1&&(i=t[0]+"@",n=t[1]),n=n.replace($Nt,".");const r=n.split("."),o=qNt(r,e).join(".");return i+o}function r0e(n){const e=[];let t=0;const i=n.length;for(;t<i;){const r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){const o=n.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const KNt=n=>String.fromCodePoint(...n),GNt=function(n){return n>=48&&n<58?26+(n-48):n>=65&&n<91?n-65:n>=97&&n<123?n-97:Xc},o0e=function(n,e){return n+22+75*(n<26)-((e!=0)<<5)},s0e=function(n,e,t){let i=0;for(n=t?Jc(n/HNt):n>>1,n+=Jc(n/e);n>$O*G8>>1;i+=Xc)n=Jc(n/$O);return Jc(i+($O+1)*n/(n+zNt))},a0e=function(n){const e=[],t=n.length;let i=0,r=t0e,o=e0e,s=n.lastIndexOf(n0e);s<0&&(s=0);for(let a=0;a<s;++a)n.charCodeAt(a)>=128&&Dh("not-basic"),e.push(n.charCodeAt(a));for(let a=s>0?s+1:0;a<t;){const l=i;for(let d=1,h=Xc;;h+=Xc){a>=t&&Dh("invalid-input");const f=GNt(n.charCodeAt(a++));f>=Xc&&Dh("invalid-input"),f>Jc((bg-i)/d)&&Dh("overflow"),i+=f*d;const p=h<=o?WO:h>=o+G8?G8:h-o;if(f<p)break;const g=Xc-p;d>Jc(bg/g)&&Dh("overflow"),d*=g}const u=e.length+1;o=s0e(i-l,u,l==0),Jc(i/u)>bg-r&&Dh("overflow"),r+=Jc(i/u),i%=u,e.splice(i++,0,r)}return String.fromCodePoint(...e)},l0e=function(n){const e=[];n=r0e(n);const t=n.length;let i=t0e,r=0,o=e0e;for(const l of n)l<128&&e.push(UO(l));const s=e.length;let a=s;for(s&&e.push(n0e);a<t;){let l=bg;for(const d of n)d>=i&&d<l&&(l=d);const u=a+1;l-i>Jc((bg-r)/u)&&Dh("overflow"),r+=(l-i)*u,i=l;for(const d of n)if(d<i&&++r>bg&&Dh("overflow"),d===i){let h=r;for(let f=Xc;;f+=Xc){const p=f<=o?WO:f>=o+G8?G8:f-o;if(h<p)break;const g=h-p,m=Xc-p;e.push(UO(o0e(p+g%m,0))),h=Jc(g/m)}e.push(UO(o0e(h,0))),o=s0e(r,u,a===s),r=0,++a}++r,++i}return e.join("")},u0e={version:"2.3.1",ucs2:{decode:r0e,encode:KNt},decode:a0e,encode:l0e,toASCII:function(n){return i0e(n,function(e){return WNt.test(e)?"xn--"+l0e(e):e})},toUnicode:function(n){return i0e(n,function(e){return jNt.test(e)?a0e(e.slice(4).toLowerCase()):e})}},YNt={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},QNt=/^(vbscript|javascript|file|data):/,ZNt=/^data:image\/(gif|png|jpeg|webp);/;function XNt(n){const e=n.trim().toLowerCase();return QNt.test(e)?ZNt.test(e):!0}const c0e=["http:","https:","mailto:"];function JNt(n){const e=LO(n,!0);if(e.hostname&&(!e.protocol||c0e.indexOf(e.protocol)>=0))try{e.hostname=u0e.toASCII(e.hostname)}catch{}return j8(kO(e))}function eEt(n){const e=LO(n,!0);if(e.hostname&&(!e.protocol||c0e.indexOf(e.protocol)>=0))try{e.hostname=u0e.toUnicode(e.hostname)}catch{}return fg(kO(e),fg.defaultChars+"%")}function Bl(n,e){if(!(this instanceof Bl))return new Bl(n,e);e||IO(n)||(e=n||{},n="default"),this.inline=new K8,this.block=new Vw,this.core=new FO,this.renderer=new gg,this.linkify=new Ka,this.validateLink=XNt,this.normalizeLink=JNt,this.normalizeLinkText=eEt,this.utils=lDt,this.helpers=Rw({},hDt),this.options={},this.configure(n),e&&this.set(e)}Bl.prototype.set=function(n){return Rw(this.options,n),this},Bl.prototype.configure=function(n){const e=this;if(IO(n)){const t=n;if(n=YNt[t],!n)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&e.set(n.options),n.components&&Object.keys(n.components).forEach(function(t){n.components[t].rules&&e[t].ruler.enableOnly(n.components[t].rules),n.components[t].rules2&&e[t].ruler2.enableOnly(n.components[t].rules2)}),this},Bl.prototype.enable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(n,!0))},this),t=t.concat(this.inline.ruler2.enable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Bl.prototype.disable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(n,!0))},this),t=t.concat(this.inline.ruler2.disable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Bl.prototype.use=function(n){const e=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,e),this},Bl.prototype.parse=function(n,e){if(typeof n!="string")throw new Error("Input data should be a String");const t=new this.core.State(n,this,e);return this.core.process(t),t.tokens},Bl.prototype.render=function(n,e){return e=e||{},this.renderer.render(this.parse(n,e),this.options,e)},Bl.prototype.parseInline=function(n,e){const t=new this.core.State(n,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},Bl.prototype.renderInline=function(n,e){return e=e||{},this.renderer.render(this.parseInline(n,e),this.options,e)};const tEt=["innerHTML"],nEt={__name:"FactorDescription",props:c.mergeModels({factorType:{type:String,default:"模版"},data:{type:Array,default:[]}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(n){const{request:e}=c.inject("stConfig"),t=new Bl,i=c.ref(""),r=c.useModel(n,"visible");return c.onMounted(async()=>{const{data:o}=await e.post("/middleLayer/special/getOss",{url:"resource/factor_select.md"}),s=new Uint8Array(o.data),l=new TextDecoder("utf-8").decode(s);i.value=t.render(l)}),(o,s)=>{const a=QS,l=YS,u=s1,d=sl;return c.openBlock(),c.createBlock(d,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=h=>r.value=h),title:n.factorType==="模版"?"因子说明":"脚本编写说明",width:"1000","align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:c.withCtx(()=>[c.createVNode(u,{height:"500px"},{default:c.withCtx(()=>[n.factorType==="模版"?(c.openBlock(),c.createBlock(l,{key:0,data:n.data,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(a,{prop:"factorName",label:"因子名称",width:"200"}),c.createVNode(a,{prop:"factorDesc",label:"因子说明"}),c.createVNode(a,{prop:"factorScoreDefine",label:"分值定义"})]),_:1},8,["data"])):c.createCommentVNode("",!0),n.factorType==="脚本"?(c.openBlock(),c.createElementBlock("div",{key:1,class:"markdown-body",innerHTML:i.value},null,8,tEt)):c.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}},SIt="",d0e=n=>(c.pushScopeId("data-v-8554bb2c"),n=n(),c.popScopeId(),n),iEt={class:"factor-screen"},rEt={style:{"white-space":"pre-line"}},oEt={class:"custom-header"},sEt={class:"left"},aEt=["id"],lEt={class:"editor-tools"},uEt={class:"right"},cEt={class:"form-row"},dEt={class:"index"},hEt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},fEt=d0e(()=>c.createElementVNode("span",null,"~",-1)),pEt=d0e(()=>c.createElementVNode("span",null,"&&代表and,||代表or",-1)),gEt={class:"dialog-footer"},mEt={class:"custom-header"},bEt={class:"left"},_Et=["id"],yEt={class:"right"},vEt={class:"content"},CEt={class:"dialog-footer"},wEt=gn({__name:"index",props:c.mergeModels({config:{type:Object,default:{sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]}}},{data:{default:{list:[],sqlEnable:0,sqlValue:null}},dataModifiers:{}}),emits:["update:data"],setup(n){const{request:e}=c.inject("stConfig"),t=n,i=c.useModel(n,"data"),r=c.ref(),o=c.ref(),s=c.ref(!1),a=c.ref(!1),l=c.ref("脚本"),u=c.ref(!1),d=c.ref(!1),h=c.ref(!1),f=c.reactive({result:null,detail:"",code:""}),p=c.ref(null),g=c.ref({list:[{cycle:t.config.cycleDefault??null,factor:null,score:[null,null]}],sqlEnable:0,sqlValue:null,factorSelectExpr:""}),m=()=>{const{list:E,sqlEnable:k,sqlValue:A,factorSelectExpr:F}=i.value;g.value={list:JSON.parse(JSON.stringify(E)),sqlEnable:k,sqlValue:A,factorSelectExpr:F},g.value.list.length||C(),s.value=!0},y=()=>{if(l.value==="模版")p.value.validate(E=>{const{list:k,sqlEnable:A,sqlValue:F}=g.value;if(E){if(A){if(!F)return Xt.error("SQL语句不能为空");const R=Cde(F),I=k.map((O,P)=>`条件${P+1}`),M=R.filter(O=>!I.includes(O));if(M.length)return Xt.error(`请检查SQL语句, 不存在[${M}]`)}i.value={list:JSON.parse(JSON.stringify(k)),sqlEnable:A,sqlValue:F,factorSelectExpr:""},s.value=!1}});else{const E=r.value.getValue();if(!E)return Xt.error("请输入脚本语句");i.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:E},s.value=!1}},b=E=>{g.value.list.splice(E,1)},C=E=>{switch(E){case"compare":{g.value.list.push({key:"compare",cycle:t.config.cycleDefault??null,factor:null,compareType:">",cycle2:t.config.cycleDefault??null,factor2:null});break}default:{g.value.list.push({cycle:t.config.cycleDefault??null,factor:null,score:[null,null]});break}}},_=()=>{p.value.validate(E=>{if(E)if(g.value.sqlValue){const k=Cde(g.value.sqlValue);g.value.sqlValue=g.value.list.reduce((A,F,R)=>(k.includes(`条件${R+1}`)||(A+=`&& 条件${R+1} `),A),g.value.sqlValue)}else g.value.sqlValue=g.value.list.reduce((k,A,F)=>(F===0?k+=`条件${F+1} `:k+=`&& 条件${F+1} `,k),"")})},v=E=>{switch(E.key){case"compare":{const{cycle:k,factor:A,compareType:F,cycle2:R,factor2:I}=E;let M="";return M+=` ${t.config.cycleOptions.find(({value:O})=>O===k).label}`,M+=` ${t.config.factorOptions.find(({value:O})=>O===A).label}`,M+=` ${F}`,M+=` ${t.config.cycleOptions.find(({value:O})=>O===R).label}`,M+=` ${t.config.factorOptions.find(({value:O})=>O===I).label}`,M}default:{const{cycle:k,factor:A,score:F}=E;let R="";return R+=` ${t.config.cycleOptions.find(({value:I})=>I===k).label}`,R+=` ${t.config.factorOptions.find(({value:I})=>I===A).label}`,R+=` ${F[0]||F[0]===0?`${F[0]}分`:"∞"}`,R+=" ~",R+=` ${F[1]||F[1]===0?`${F[1]}分`:"∞"}`,R}}},w=(E,k)=>{switch(E){case"sqlTag":{i.value={list:[],sqlEnable:0,sqlValue:null};break}case"factorTag":{i.value.list.splice(k,1);break}case"scriptTag":{lD.confirm("是否确认删除因子筛选: 脚本模式","删除操作",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{i.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""}});break}}},x=()=>{o.value.open(r.value)},S=(E,k)=>{if(!r.value)return Xt.error("未检测到编辑器实例");let A=E;const F=wSt(k);if(F.length){const P=F.reduce((U,Q,W,z)=>(U+=`${Q}=`,W<z.length-1&&(U+=","),U),"");A=`${A}(${P})`}const R=r.value.getInstance(),I=R.getPosition(),O=r.value.getValue().split(`
|
|
824
824
|
`);if(I.lineNumber<=O.length){const P=I.lineNumber-1,U=O[P],Q=I.column-1,W=Q>0?U[Q-1]:"",z=Q<U.length?U[Q]:"";let ne=A;W&&W!==" "&&!/[\s({[ ]/.test(W)&&(ne=" "+ne),z&&z!==" "&&!/[\s)}\]]/.test(z)&&(ne=ne+" ");const ce=U.substring(0,Q)+ne+U.substring(Q);O[P]=ce;const le=O.join(`
|
|
825
|
-
`);r.value.setValue(le);const ie=I.column+ne.length;R.setPosition({lineNumber:I.lineNumber,column:ie}),R.focus()}},D=async()=>{try{d.value=!0;const E=r.value.getValue();if(!E)return Xt.error("请输入脚本语句");const{body:k}=await e.post("/common/qt/getFuncExpr",{factorSelectExpr:E});if(!k)return Xt.error("脚本解析失败, 请检查脚本内容是否填写完整或者联系管理员");let A=document.createElement("textarea");A.value=k,document.body.appendChild(A),A.select(),document.execCommand("copy"),document.body.removeChild(A),Xt.success("脚本内容已经成功复制到粘贴板")}finally{d.value=!1}},N=async()=>{try{u.value=!0;const E=r.value.getValue();if(!E)return Xt.error("请输入脚本语句");const{body:k}=await e.post("/common/qt/getFuncExpr",{factorSelectExpr:E});if(!k)return Xt.error("脚本解析失败, 请检查脚本内容是否填写完整或者联系管理员");const A=await e.post("/common/qt/testFactorSelect",{factorSelectExpr:k}),{result:F,detail:R}=A.body;Object.assign(f,{result:F,detail:R,code:k}),F===1?Xt.success("测试通过"):(Xt.error("测试未能通过"),h.value=!0)}finally{u.value=!1}},L=()=>{if(f.result===null)return Xt.warning("请先进行测试, 等待测试完成后可查看日志");h.value=!0};return c.watch(()=>s.value,E=>{switch(E){case!0:{c.nextTick(()=>{r.value.resize(),i.value.factorSelectExpr&&(l.value="脚本",r.value.setValue(i.value.factorSelectExpr),r.value.focusToEnd()),(i.value.sqlEnable&&i.value.sqlValue||!i.value.sqlEnable&&i.value.list.length)&&(l.value="模版")}),Object.assign(f,{result:null,detail:""});break}case!1:{o.value.close(),h.value=!1;break}}}),c.watch(()=>l.value,E=>{E==="模版"&&o.value.close(),E==="脚本"&&c.nextTick(()=>{r.value.focusToEnd()})},{deep:!0}),(E,k)=>{var Le;const A=Z6,F=Qg,R=mz,I=Kr,M=dn,O=wa,P=NV,U=M6,Q=c.resolveComponent("st-customFunction"),W=ll,z=al,ne=Fd,ce=P6,le=L6,ie=ws,oe=Od,he=s1,pe=sl,de=T6,ve=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",iEt,[c.createElementVNode("div",null,[i.value.sqlEnable&&i.value.sqlValue?(c.openBlock(),c.createBlock(F,{key:0,closable:"",type:"info",title:i.value.sqlValue,onClose:k[0]||(k[0]=ee=>w("sqlTag"))},{default:c.withCtx(()=>[c.createVNode(A,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):c.createCommentVNode("",!0),!i.value.sqlEnable&&i.value.list.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.value.list,(ee,j)=>(c.openBlock(),c.createBlock(F,{closable:"",type:"info",onClose:Y=>w("factorTag",j)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(v(ee)),1)]),_:2},1032,["onClose"]))),256)):c.createCommentVNode("",!0),i.value.factorSelectExpr?(c.openBlock(),c.createBlock(R,{key:2,width:"500",placement:"bottom-start"},{reference:c.withCtx(()=>[c.createVNode(F,{closable:"",type:"info",onClose:k[1]||(k[1]=ee=>w("scriptTag"))},{default:c.withCtx(()=>[c.createTextVNode(" 脚本模式 ")]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",rEt,c.toDisplayString(i.value.factorSelectExpr),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(I,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:m},{default:c.withCtx(()=>[c.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),c.createVNode(pe,{"modal-class":"factor-dialog",modelValue:s.value,"onUpdate:modelValue":k[8]||(k[8]=ee=>s.value=ee),width:"1000","align-center":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ee,titleClass:j})=>[c.createElementVNode("div",oEt,[c.createElementVNode("div",sEt,[c.createElementVNode("span",{id:ee,class:c.normalizeClass(j)}," 因子筛选 ",10,aEt),c.createVNode(O,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:c.withCtx(()=>[c.createVNode(M,{onClick:k[2]||(k[2]=Y=>a.value=!0)},{default:c.withCtx(()=>[c.createVNode(c.unref(Ed))]),_:1})]),_:1}),c.createVNode(U,{modelValue:l.value,"onUpdate:modelValue":k[3]||(k[3]=Y=>l.value=Y),size:"small"},{default:c.withCtx(()=>[c.createVNode(P,{label:"模版",value:"模版"}),c.createVNode(P,{label:"脚本",value:"脚本"})]),_:1},8,["modelValue"]),c.withDirectives(c.createElementVNode("div",lEt,[c.withDirectives(c.createVNode(Q,{size:"small",onInsert:S},null,512),[[c.vShow,l.value==="脚本"]]),c.createVNode(I,{type:"primary",size:"small",loading:d.value,onClick:D},{default:c.withCtx(()=>[c.createTextVNode("复制")]),_:1},8,["loading"]),c.createVNode(I,{type:"primary",size:"small",loading:u.value,onClick:N},{default:c.withCtx(()=>[c.createTextVNode("测试")]),_:1},8,["loading"]),c.createVNode(I,{size:"small",icon:c.unref(YP),onClick:L},{default:c.withCtx(()=>[c.createTextVNode("日志明细")]),_:1},8,["icon"])],512),[[c.vShow,l.value==="脚本"]])]),c.createElementVNode("div",uEt,[l.value==="脚本"?(c.openBlock(),c.createBlock(I,{key:0,size:"small",type:"primary",onClick:x},{default:c.withCtx(()=>[c.createTextVNode("变量选择器")]),_:1})):c.createCommentVNode("",!0),c.createVNode(M,{onClick:k[4]||(k[4]=Y=>s.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",gEt,[c.createVNode(I,{type:"primary",onClick:y},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[l.value==="模版"?(c.openBlock(),c.createBlock(he,{key:0,height:"400px"},{default:c.withCtx(()=>[c.createVNode(oe,{ref_key:"dialogFormRef",ref:p,model:g.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(g.value.list,(ee,j)=>(c.openBlock(),c.createElementBlock("div",cEt,[c.createElementVNode("span",dEt,c.toDisplayString(`条件${j+1}`),1),ee.key==="compare"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[n.config.cycleShow?(c.openBlock(),c.createBlock(ne,{key:0,prop:"list."+j+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.cycle,"onUpdate:modelValue":Y=>ee.cycle=Y,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:Y,value:te})=>(c.openBlock(),c.createBlock(W,{label:Y,value:te,key:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(ne,{prop:"list."+j+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.factor,"onUpdate:modelValue":Y=>ee.factor=Y,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var Y;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((Y=n.config.factorOptions)==null?void 0:Y.filter(te=>[4].includes(te.type)),({label:te,value:J})=>(c.openBlock(),c.createBlock(W,{label:te,value:J,key:J},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(ne,{style:{width:"52px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.compareType,"onUpdate:modelValue":Y=>ee.compareType=Y,size:"small"},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([">",">=","<","<="],Y=>c.createVNode(W,{label:Y,value:Y,key:Y},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(c.openBlock(),c.createBlock(ne,{key:1,prop:"list."+j+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.cycle2,"onUpdate:modelValue":Y=>ee.cycle2=Y,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:Y,value:te})=>(c.openBlock(),c.createBlock(W,{label:Y,value:te,key:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(ne,{prop:"list."+j+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.factor2,"onUpdate:modelValue":Y=>ee.factor2=Y,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var Y;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((Y=n.config.factorOptions)==null?void 0:Y.filter(te=>[4].includes(te.type)),({label:te,value:J})=>(c.openBlock(),c.createBlock(W,{label:te,value:J,key:J},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[n.config.cycleShow?(c.openBlock(),c.createBlock(ne,{key:0,prop:"list."+j+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.cycle,"onUpdate:modelValue":Y=>ee.cycle=Y,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:Y,value:te})=>(c.openBlock(),c.createBlock(W,{label:Y,value:te,key:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(ne,{prop:"list."+j+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.factor,"onUpdate:modelValue":Y=>ee.factor=Y,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var Y;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((Y=n.config.factorOptions)==null?void 0:Y.filter(te=>[1,3].includes(te.type)),({label:te,value:J})=>(c.openBlock(),c.createBlock(W,{label:te,value:J,key:J},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(ne,{prop:"list."+j+".score",rules:{validator:c.unref(CSt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createElementVNode("div",hEt,[c.createVNode(ce,{modelValue:ee.score[0],"onUpdate:modelValue":Y=>ee.score[0]=Y,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),fEt,c.createVNode(ce,{modelValue:ee.score[1],"onUpdate:modelValue":Y=>ee.score[1]=Y,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),c.createVNode(M,{onClick:Y=>b(j)},{default:c.withCtx(()=>[c.createVNode(c.unref(wx))]),_:2},1032,["onClick"])]))),256)),c.createVNode(I,{type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:C,style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子")]),_:1},8,["icon"]),c.createVNode(I,{type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:k[5]||(k[5]=ee=>C("compare")),style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(ne,{label:"SQL功能: "},{default:c.withCtx(()=>[c.createVNode(U,{modelValue:g.value.sqlEnable,"onUpdate:modelValue":k[6]||(k[6]=ee=>g.value.sqlEnable=ee)},{default:c.withCtx(()=>[c.createVNode(le,{label:"关闭",value:0}),c.createVNode(le,{label:"启用",value:1})]),_:1},8,["modelValue"]),g.value.sqlEnable?(c.openBlock(),c.createBlock(I,{key:0,type:"primary",size:"small",onClick:_,style:{"margin-left":"auto"}},{default:c.withCtx(()=>[c.createTextVNode("生成SQL")]),_:1})):c.createCommentVNode("",!0)]),_:1}),g.value.sqlEnable?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(ie,{modelValue:g.value.sqlValue,"onUpdate:modelValue":k[7]||(k[7]=ee=>g.value.sqlValue=ee),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),pEt],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",{style:c.normalizeStyle([{width:"968px",height:"400px"},l.value==="脚本"?null:{position:"fixed",top:"-400px",zIndex:-1,visibility:"hidden",pointerEvents:"none"}])},[c.createVNode(bde,{ref_key:"monacoEditorRef",ref:r,language:"lua",suggestionEnable:!0},null,512)],4)]),_:1},8,["modelValue"])]),c.createVNode(nEt,{visible:a.value,"onUpdate:visible":k[9]||(k[9]=ee=>a.value=ee),factorType:l.value,data:(Le=n.config.factorDescriptions)==null?void 0:Le.filter(ee=>[1,3].includes(ee.type))},null,8,["visible","factorType","data"]),c.createVNode(pe,{"modal-class":"log-dialog",modelValue:h.value,"onUpdate:modelValue":k[12]||(k[12]=ee=>h.value=ee),width:"830","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ee,titleClass:j})=>[c.createElementVNode("div",mEt,[c.createElementVNode("div",bEt,[c.createElementVNode("span",{id:ee,class:c.normalizeClass(j)}," 日志明细 ",10,_Et)]),c.createElementVNode("div",yEt,[c.createVNode(M,{onClick:k[10]||(k[10]=Y=>h.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",CEt,[c.createVNode(I,{onClick:k[11]||(k[11]=ee=>h.value=!1)},{default:c.withCtx(()=>[c.createTextVNode(" 关闭 ")]),_:1})])]),default:c.withCtx(()=>[c.createElementVNode("div",vEt,[c.createVNode(he,{class:"code",height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",null,c.toDisplayString(f.code),1)]),_:1}),c.createVNode(de,{direction:"vertical"}),c.createVNode(he,{height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",{class:c.normalizeClass(f.result===1?"success-log":"error-log")},c.toDisplayString(f.result===1?"测试通过 √":f.detail),3)]),_:1})])]),_:1},8,["modelValue"]),c.createVNode(ve,{ref_key:"stVarSelectDialogRef",ref:o},null,512)],64)}}},[["__scopeId","data-v-8554bb2c"]]),NIt="",jw=n=>(c.pushScopeId("data-v-6a791396"),n=n(),c.popScopeId(),n),xEt={key:0,class:"common-indicator"},SEt={class:"indicator"},DEt={class:"title"},NEt=jw(()=>c.createElementVNode("span",null,"常用指标: ",-1)),EEt={class:"options"},kEt=["onClick"],LEt={class:"tags"},MEt=["onClick"],TEt={style:{"font-size":"18px"}},AEt={key:0,class:"out-box"},IEt=jw(()=>c.createElementVNode("span",null,"自定义: ",-1)),REt={key:0,class:"convenient-option-box"},OEt={class:"out-box"},FEt=jw(()=>c.createElementVNode("span",null,"自定义: ",-1)),PEt={key:0},BEt={key:0},VEt={key:0},zEt={key:1},HEt={class:"tFeaturelncomes-option-box"},jEt={class:"tFeaturelncomes-out-box"},WEt=jw(()=>c.createElementVNode("span",null,"自定义: ",-1)),$Et={key:2},UEt={key:3},qEt={key:4},KEt={key:5},GEt={key:6},YEt={key:7},QEt={style:{display:"flex","align-items":"center"}},ZEt={key:8},XEt={class:"dialog-footer"},JEt=gn({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],i=c.inject("clearRow"),r=c.useModel(n,"data"),o=n,s=c.ref(!1),a=c.computed(()=>{var C;return(C=o.data.find(_=>_.radioType==="1"))==null?void 0:C.key}),l=c.computed(()=>{let C=[];return o.varietyMarket===null&&!o.commonOption.length?C=o.config.options:(C=o.config.options,o.varietyMarket&&(C=C.filter(({parent:_})=>_.varietyMarketIds.includes(o.varietyMarket))),o.commonOption.length&&(C=C.filter(({parent:_})=>{const{commonOptionIds:v}=_;return[...new Set([...v,...o.commonOption])].length!==[...v,...o.commonOption].length}))),C}),u=c.ref({}),d=c.ref({}),h=C=>{u.value=C;const _={key:C.key,type:C.type,label:C.label};switch(C.key){case"st":{d.value={..._,st:null};break}case"tFeaturelncomes":{d.value={..._,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{d.value={..._,priceLevels:null};break}case"peTtmLevels":{d.value={..._,peTtmLevels:null};break}case"peTrendTtmLevels":{d.value={..._,peTrendTtmLevels:null};break}case"optionsCpType":{d.value={..._,optionsCpType:null};break}case"perVolumn":{d.value={..._,radio:null,levels:[]};break}case"mainFlow":{d.value={..._,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{d.value={..._,enumType:null};break}default:d.value={..._,range:[null,null],unit:C.defaultUnit.length?[...C.defaultUnit]:[null,null],radioType:a.value&&a.value!==C.key?"0":C.defaultRadioType,rankRange:C.defaultRankRange||[null,null]}}s.value=!0},f=()=>{var _,v;switch(d.value.key){case"st":{const{label:w,st:x}=d.value;if(x===null)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: ${x?"是":"否"}`;break}case"tFeaturelncomes":{const{label:w,rule:x,withFewYears:S,yearsCount:D,netProfit:N}=d.value;if(["",null].includes(S)||["",null].includes(D)||["",null].includes(N))return Xt.warning("格式错误: 请填写完整");d.value.tagText=`${w}: ${S}年内${D}年以上盈利${x===1?"超":"跌"}过${N}亿`;break}case"priceLevels":{const{label:w,priceLevels:x}=d.value;if(!x||x.length===0)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: 已选${x}分位`;break}case"peTtmLevels":{const{label:w,peTtmLevels:x}=d.value;if(!x||x.length===0)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: 已选${x}分位`;break}case"peTrendTtmLevels":{const{label:w,peTrendTtmLevels:x}=d.value;if(!x||x.length===0)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: 已选${x}分位`;break}case"optionsCpType":{const{label:w,optionsCpType:x}=d.value;if(x===null)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: ${x===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:w,radio:x,levels:S}=d.value;if(!x)return Xt.warning("格式错误: 请选择时间");if(!(S!=null&&S.length))return Xt.warning("格式错误: 请选择分位");d.value.tagText=`${w}: ${(_=e.find(D=>D.value===x))==null?void 0:_.label}${S.map(D=>`${D}分位`).join("、")}`;break}case"mainFlow":{const{label:w,radioType:x,radio:S,rankRange:D}=d.value,N=L=>{if(L===""||L===null||L===void 0)return!1;const E=Number(L);return!isNaN(E)};if(!S)return Xt.warning("格式错误: 请选择时间");if(!N(D[0])&&!N(D[1]))return Xt.warning(`格式错误: 请填写${x==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(D[0])&&!["",null].includes(D[1])?d.value.tagText=`${w}: ${S}日${x==="0"?"涨幅范围":"排名范围"}: ${D[0]}${x==="0"?"%":""} ~ ${D[1]}${x==="0"?"%":""}`:["",null].includes(D[0])?d.value.tagText=`${w}: ${S}日${x==="0"?"涨幅范围":"排名范围"}: ≤${D[1]}${x==="0"?"%":""}`:d.value.tagText=`${w}: ${S}日${x==="0"?"涨幅范围":"排名范围"}: ≥${D[0]}${x==="0"?"%":""}`;break}case"auditOpinionType":{const{label:w,enumType:x}=d.value;if(x===null)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: ${(v=t.find(S=>S.value===x))==null?void 0:v.label}`;break}default:{const{label:w,unit:x,radioType:S}=d.value,D=S==="1"?d.value.rankRange:d.value.range;if(["",null].includes(D[0])&&["",null].includes(D[1]))return Xt.warning("格式错误: 请至少填写一个值");if(S==="1"){const E=Number(D[0]),k=Number(D[1]);if(isNaN(E)||isNaN(k))return Xt.warning("格式错误: 请填写数字");if(E<0||k<0)return Xt.warning("格式错误: 请填写大于0的数字");if(E>k)return Xt.warning("格式错误: 请填写正确的排名范围")}const N=S==="1"?"":x[0]??"",L=S==="1"?"":x[1]??"";!["",null].includes(D[0])&&!["",null].includes(D[1])?d.value.tagText=`${w}${S==="1"?"排名":""}: ${D[0]}${N} ~ ${D[1]}${L}`:["",null].includes(D[0])?d.value.tagText=`${w}${S==="1"?"排名":""}: ≤${D[1]}${L}`:d.value.tagText=`${w}${S==="1"?"排名":""}: ≥${D[0]}${N}`}}const C=r.value.findIndex(({key:w})=>w===d.value.key);C===-1?r.value.push(d.value):r.value.splice(C,1,d.value),s.value=!1},p=C=>{u.value=l.value.find(({key:_})=>_===C.key),d.value=JSON.parse(JSON.stringify(C)),s.value=!0},g=C=>{r.value.splice(C,1)},m=C=>{d.value.range=[...C.range],d.value.unit=[...C.unit]},y=C=>{switch(C){case"≤0":Object.assign(d.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(d.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(d.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(d.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(d.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};c.watch(()=>l.value,()=>{r.value.length&&(r.value=r.value.filter(({key:C})=>l.value.find(_=>_.key===C)))});const b=()=>{d.value.radio=null,d.value.rankRange=[null,null]};return(C,_)=>{const v=Qg,w=NV,x=M6,S=ws,D=Kr,N=ll,L=al,E=L6,k=P6,A=sl;return n.config.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",xEt,[c.createElementVNode("div",SEt,[c.createElementVNode("div",DEt,[NEt,c.createElementVNode("span",{onClick:_[0]||(_[0]=F=>c.unref(i)("commonIndicator"))},"不限")]),c.createElementVNode("div",EEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,F=>(c.openBlock(),c.createElementBlock("span",{key:F.key,onClick:R=>h(F)},c.toDisplayString(F.label),9,kEt))),128))])]),c.createElementVNode("div",LEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,(F,R)=>(c.openBlock(),c.createBlock(v,{closable:"",type:"info",onClose:I=>g(R)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(F.tagText),1),c.createElementVNode("span",{class:"edit",onClick:I=>p(F)},"编辑",8,MEt)]),_:2},1032,["onClose"]))),256))]),c.createVNode(A,{modelValue:s.value,"onUpdate:modelValue":_[28]||(_[28]=F=>s.value=F),title:u.value.label,width:"600","align-center":"","destroy-on-close":""},c.createSlots({footer:c.withCtx(()=>[c.createElementVNode("div",XEt,[c.createVNode(D,{type:"primary",onClick:f},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>{var F;return[u.value.type===void 0&&d.value.radioType==="1"?(c.openBlock(),c.createElementBlock("div",AEt,[IEt,c.createVNode(S,{modelValue:d.value.rankRange[0],"onUpdate:modelValue":_[3]||(_[3]=R=>d.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(S,{modelValue:d.value.rankRange[1],"onUpdate:modelValue":_[4]||(_[4]=R=>d.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):u.value.type===void 0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[(F=u.value.convenientOptions)!=null&&F.length?(c.openBlock(),c.createElementBlock("div",REt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.convenientOptions,R=>(c.openBlock(),c.createBlock(D,{key:R.text,onClick:I=>m(R)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",OEt,[FEt,c.createVNode(S,{modelValue:d.value.range[0],"onUpdate:modelValue":_[6]||(_[6]=R=>d.value.range[0]=R),style:{flex:"1"}},c.createSlots({_:2},[u.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[u.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",PEt,c.toDisplayString(d.value.unit[0]),1)):(c.openBlock(),c.createBlock(L,{key:1,modelValue:d.value.unit[0],"onUpdate:modelValue":_[5]||(_[5]=R=>d.value.unit[0]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.unitOptions,R=>(c.openBlock(),c.createBlock(N,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(S,{modelValue:d.value.range[1],"onUpdate:modelValue":_[8]||(_[8]=R=>d.value.range[1]=R),style:{flex:"1"}},c.createSlots({_:2},[u.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[u.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",BEt,c.toDisplayString(d.value.unit[1]),1)):(c.openBlock(),c.createBlock(L,{key:1,modelValue:d.value.unit[1],"onUpdate:modelValue":_[7]||(_[7]=R=>d.value.unit[1]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.unitOptions,R=>(c.openBlock(),c.createBlock(N,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[u.value.key==="st"?(c.openBlock(),c.createElementBlock("div",VEt,[c.createVNode(x,{modelValue:d.value.st,"onUpdate:modelValue":_[9]||(_[9]=R=>d.value.st=R)},{default:c.withCtx(()=>[c.createVNode(E,{label:"是",value:1}),c.createVNode(E,{label:"否",value:0})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="tFeaturelncomes"?(c.openBlock(),c.createElementBlock("div",zEt,[c.createElementVNode("div",HEt,[c.createVNode(D,{onClick:_[10]||(_[10]=R=>y("≤0"))},{default:c.withCtx(()=>[c.createTextVNode("≤0")]),_:1}),c.createVNode(D,{onClick:_[11]||(_[11]=R=>y("≥0"))},{default:c.withCtx(()=>[c.createTextVNode("≥0")]),_:1}),c.createVNode(D,{onClick:_[12]||(_[12]=R=>y("五年内有四年以上盈利超过5千万"))},{default:c.withCtx(()=>[c.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),c.createVNode(D,{onClick:_[13]||(_[13]=R=>y("≥10亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥10亿")]),_:1}),c.createVNode(D,{onClick:_[14]||(_[14]=R=>y("≥20亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥20亿")]),_:1})]),c.createElementVNode("div",jEt,[WEt,c.createElementVNode("div",null,[c.createVNode(k,{modelValue:d.value.withFewYears,"onUpdate:modelValue":_[15]||(_[15]=R=>d.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年内 "),c.createVNode(k,{modelValue:d.value.yearsCount,"onUpdate:modelValue":_[16]||(_[16]=R=>d.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年以上盈利"+c.toDisplayString(d.value.rule===1?"超":"跌")+"过 ",1),c.createVNode(k,{modelValue:d.value.netProfit,"onUpdate:modelValue":_[17]||(_[17]=R=>d.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 亿 ")])])])):c.createCommentVNode("",!0),u.value.key==="priceLevels"?(c.openBlock(),c.createElementBlock("div",$Et,[c.createVNode(L,{modelValue:d.value.priceLevels,"onUpdate:modelValue":_[18]||(_[18]=R=>d.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="peTtmLevels"?(c.openBlock(),c.createElementBlock("div",UEt,[c.createVNode(L,{modelValue:d.value.peTtmLevels,"onUpdate:modelValue":_[19]||(_[19]=R=>d.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="peTrendTtmLevels"?(c.openBlock(),c.createElementBlock("div",qEt,[c.createVNode(L,{modelValue:d.value.peTrendTtmLevels,"onUpdate:modelValue":_[20]||(_[20]=R=>d.value.peTrendTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="optionsCpType"?(c.openBlock(),c.createElementBlock("div",KEt,[c.createVNode(x,{modelValue:d.value.optionsCpType,"onUpdate:modelValue":_[21]||(_[21]=R=>d.value.optionsCpType=R)},{default:c.withCtx(()=>[c.createVNode(E,{label:"看涨",value:1}),c.createVNode(E,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="perVolumn"?(c.openBlock(),c.createElementBlock("div",GEt,[c.createVNode(x,{modelValue:d.value.radio,"onUpdate:modelValue":_[22]||(_[22]=R=>d.value.radio=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(e,R=>c.createVNode(E,{key:R.value,value:R.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),c.createVNode(L,{modelValue:d.value.levels,"onUpdate:modelValue":_[23]||(_[23]=R=>d.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="mainFlow"?(c.openBlock(),c.createElementBlock("div",YEt,[c.createVNode(x,{modelValue:d.value.radio,"onUpdate:modelValue":_[24]||(_[24]=R=>d.value.radio=R)},{default:c.withCtx(()=>[c.createVNode(E,{value:"3"},{default:c.withCtx(()=>[c.createTextVNode("3日")]),_:1}),c.createVNode(E,{value:"5"},{default:c.withCtx(()=>[c.createTextVNode("5日")]),_:1}),c.createVNode(E,{value:"10"},{default:c.withCtx(()=>[c.createTextVNode("10日")]),_:1}),c.createVNode(E,{value:"20"},{default:c.withCtx(()=>[c.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",QEt,[c.createElementVNode("span",null,c.toDisplayString(d.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),c.createVNode(S,{modelValue:d.value.rankRange[0],"onUpdate:modelValue":_[25]||(_[25]=R=>d.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(S,{modelValue:d.value.rankRange[1],"onUpdate:modelValue":_[26]||(_[26]=R=>d.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):c.createCommentVNode("",!0),u.value.key==="auditOpinionType"?(c.openBlock(),c.createElementBlock("div",ZEt,[c.createVNode(x,{modelValue:d.value.enumType,"onUpdate:modelValue":_[27]||(_[27]=R=>d.value.enumType=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(t,(R,I)=>c.createVNode(E,{key:I,label:R.label,value:R.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)],64))]}),_:2},[u.value.showRankType?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",TEt,c.toDisplayString(u.value.label),1),c.createVNode(x,{modelValue:d.value.radioType,"onUpdate:modelValue":_[1]||(_[1]=F=>d.value.radioType=F),style:{"vertical-align":"4px","margin-left":"12px"}},{default:c.withCtx(()=>[c.createVNode(w,{label:"数值",value:"0"}),c.createVNode(w,{disabled:a.value&&a.value!==u.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:u.value.key==="mainFlow"?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",{style:{"font-size":"18px"}},c.toDisplayString(u.value.label),1),c.createVNode(x,{modelValue:d.value.radioType,"onUpdate:modelValue":_[2]||(_[2]=F=>d.value.radioType=F),style:{"vertical-align":"4px","margin-left":"12px"},onChange:b},{default:c.withCtx(()=>[c.createVNode(w,{label:"涨幅范围",value:"0"}),c.createVNode(w,{disabled:a.value&&a.value!==u.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-6a791396"]]),kIt="",ekt=n=>(c.pushScopeId("data-v-3a2c59c7"),n=n(),c.popScopeId(),n),tkt={key:0,class:"composite-order"},nkt={class:"title"},ikt=ekt(()=>c.createElementVNode("span",null,"组合排序: ",-1)),rkt={class:"tag-box"},okt=["onClick"],skt={class:"custom-header"},akt={class:"left"},lkt=["id"],ukt={class:"right"},ckt={class:"dialog-footer"},dkt=gn({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=c.inject("clearRow"),t=c.useModel(n,"data"),i=n,r=c.ref(!1),o=c.ref({id:null,name:null,value:"desc"}),s=c.computed(()=>{let l=[];return i.varietyMarket===null&&!i.commonOption.length?l=i.config.options:(l=i.config.options,i.varietyMarket&&(l=l.filter(({parent:u})=>u.varietyMarketIds.includes(i.varietyMarket))),i.commonOption.length&&(l=l.filter(({parent:u})=>{const{commonOptionIds:d}=u;return[...new Set([...d,...i.commonOption])].length!==[...d,...i.commonOption].length}))),l}),a=(l,u)=>{switch(l){case"add":{o.value={id:null,name:null,value:"desc"},r.value=!0;break}case"edit":{const d=t.value[u];o.value={...d},r.value=!0;break}case"submit":{const{id:d,name:h,value:f}=o.value;if(!h)return Xt.warning("请选择需要排序的条件");const{label:p}=s.value.find(m=>m.key===h),g=`${p}-${f==="asc"?"正序↑":"降序↓"}`;if(d===null){const m=t.value.findIndex(y=>y.name===h);m===-1?t.value.push({...o.value,id:h,tagText:g}):t.value.splice(m,1,{...o.value,id:h,tagText:g})}else if(o.value.id){const m=t.value.findIndex(b=>b.name===d),y=t.value.findIndex(b=>b.name===h);t.value[m]={...o.value,id:h,tagText:g},y!==-1&&m!==y&&t.value.splice(y,1)}r.value=!1;break}case"delete":{t.value.splice(u,1),r.value=!1;break}}};return c.watch(()=>s.value,()=>{t.value.length&&(t.value=t.value.filter(({name:l})=>s.value.find(u=>u.key===l)))}),(l,u)=>{const d=Qg,h=Kr,f=dn,p=ll,g=al,m=Fd,y=L6,b=M6,C=Od,_=sl;return n.config.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",tkt,[c.createElementVNode("div",nkt,[ikt,c.createElementVNode("span",{onClick:u[0]||(u[0]=v=>c.unref(e)("compositeOrder"))},"不限")]),c.createElementVNode("div",rkt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,(v,w)=>(c.openBlock(),c.createBlock(d,{closable:"",type:"info",onClose:x=>a("delete",w)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(v.tagText),1),c.createElementVNode("span",{class:"edit",onClick:x=>a("edit",w)},"编辑",8,okt)]),_:2},1032,["onClose"]))),256)),c.createVNode(h,{type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:u[1]||(u[1]=v=>a("add"))},{default:c.withCtx(()=>[c.createTextVNode(" 添加排序 ")]),_:1},8,["icon"])]),c.createVNode(_,{"modal-class":"order-dialog",modelValue:r.value,"onUpdate:modelValue":u[7]||(u[7]=v=>r.value=v),width:"400","align-center":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:v,titleClass:w})=>[c.createElementVNode("div",skt,[c.createElementVNode("div",akt,[c.createElementVNode("span",{id:v,class:c.normalizeClass(w)}," 添加条件 ",10,lkt)]),c.createElementVNode("div",ukt,[c.createVNode(f,{onClick:u[2]||(u[2]=x=>r.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",ckt,[c.createVNode(h,{onClick:u[5]||(u[5]=v=>r.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("取消")]),_:1}),c.createVNode(h,{type:"primary",onClick:u[6]||(u[6]=v=>a("submit"))},{default:c.withCtx(()=>[c.createTextVNode(" 确定 ")]),_:1})])]),default:c.withCtx(()=>[c.createVNode(C,{ref:"compositeOrderFormRef",model:o.value},{default:c.withCtx(()=>[c.createVNode(m,{label:"添加条件: "},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:o.value.name,"onUpdate:modelValue":u[3]||(u[3]=v=>o.value.name=v),filterable:"",placeholder:"请选择","no-match-text":"未匹配到相关条件"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:v,key:w})=>(c.openBlock(),c.createBlock(p,{label:v,value:w,key:w},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),c.createVNode(m,{label:"排序方式: "},{default:c.withCtx(()=>[c.createVNode(b,{modelValue:o.value.value,"onUpdate:modelValue":u[4]||(u[4]=v=>o.value.value=v)},{default:c.withCtx(()=>[c.createVNode(y,{label:"正序",value:"asc"}),c.createVNode(y,{label:"倒序",value:"desc"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-3a2c59c7"]]),MIt="",_g=n=>(c.pushScopeId("data-v-c14d66fc"),n=n(),c.popScopeId(),n),hkt={class:"variety-search"},fkt={key:0,class:"variety-search-row"},pkt={class:"title"},gkt=_g(()=>c.createElementVNode("span",null,"品种市场: ",-1)),mkt={key:1,class:"variety-search-row"},bkt={class:"title"},_kt=_g(()=>c.createElementVNode("span",null,"常用选项: ",-1)),ykt={key:2,class:"variety-search-row"},vkt={class:"title"},Ckt=_g(()=>c.createElementVNode("span",null,"上市板块: ",-1)),wkt={key:3,class:"variety-search-row"},xkt={class:"title"},Skt=_g(()=>c.createElementVNode("span",null,"自定标签: ",-1)),Dkt={key:4,class:"variety-search-row"},Nkt={class:"title"},Ekt=_g(()=>c.createElementVNode("span",null,"价差转换: ",-1)),kkt={key:5,class:"variety-search-row"},Lkt={class:"title"},Mkt=_g(()=>c.createElementVNode("span",null,"因子筛选: ",-1)),Tkt=gn({__name:"index",props:c.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=c.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]});const r=c.computed(()=>{const h={};return Object.keys(vde).forEach(f=>{const p=vde[f],g=t.config[f]??{},m={...p,...g};h[f]=m}),h}),o=c.computed(()=>r.value.varietyMarket.options),s=c.computed(()=>{const{varietyMarket:h}=i.value;return h?o.value.find(({value:p})=>p===h).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(y=>y.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=c.computed(()=>{const{varietyMarket:h}=i.value;return h?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(h)):r.value.marketIds.options}),l=c.computed(()=>r.value.customTag.options),u=c.computed(()=>r.value.jcTranslate.jcOptions),d=h=>{switch(h){case"commonOption":{i.value[h]=[];break}case"marketIds":{i.value[h]=[];break}case"customTag":{i.value[h]=[];break}case"jcTranslate":{i.value[h]={type:null,jcList:[]};break}case"factorScreen":{i.value[h]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{i.value[h]=[];break}case"compositeOrder":{i.value[h]=[];break}default:{i.value[h]=null;break}}};return c.watch(()=>s.value,h=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>h.find(({value:g})=>g===p)))}),c.watch(()=>a.value,h=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>h.find(({value:g})=>g===p)))}),c.provide("clearRow",d),e({formatData:h=>{var p,g,m,y,b,C,_;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(h.varietyMarket&&(f.exchangeId=String(h.varietyMarket)),(p=h.commonOption)!=null&&p.length&&(f.optionId=h.commonOption.join(",")),(g=h.marketIds)!=null&&g.length&&(f.marketIds=h.marketIds),(m=h.customTag)!=null&&m.length&&(f.tagIds=h.customTag),(y=r.value.jcTranslate)!=null&&y.show){const{jcTranslate:v}=h,{type:w,jcList:x}=v;switch(w){case 1:{f.translateType=1,f.jcType=x.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:v}=h;if((C=v==null?void 0:v.list)!=null&&C.length&&(f.tbFeatureFactorScores=v.list.map(w=>{switch(w.key){case"compare":return{freqId:w.cycle,factorId:w.factor,compareType:w.compareType,freqId2:w.cycle2,factorId2:w.factor2};default:return{freqId:w.cycle,factorId:w.factor,startScore:w.score[0],endScore:w.score[1]}}})),v.sqlEnable){const w=v.list.reduce((S,D,N)=>{var E,k;const L=`条件${N+1}`;switch(D.key){case"compare":{let A="";(E=r.value.factorScreen)!=null&&E.cycleShow?A=`freq_id = ${D.cycle} and factor_id = ${D.factor} ${D.compareType} freq_id = ${D.cycle2} and factor_id = ${D.factor2}`:A=`factor_id = ${D.factor} ${D.compareType} factor_id = ${D.factor2}`,S.set(L,`(${A})`);break}default:{let A=`factor_id = ${D.factor} and `;(k=r.value.factorScreen)!=null&&k.cycleShow&&(A=`freq_id = ${D.cycle} and factor_id = ${D.factor} and `),(D.score[0]||D.score[0]===0)&&(D.score[1]||D.score[1]===0)?A+=`score >= ${D.score[0]} and score <= ${D.score[1]}`:D.score[0]||D.score[0]===0?A+=`score >= ${D.score[0]}`:(D.score[1]||D.score[1]===0)&&(A+=`score <= ${D.score[1]}`),S.set(L,`(${A})`)}}return S},new Map([]));let x=v.sqlValue;for(const[S,D]of w){const N=new RegExp(S,"g");x=x.replace(N,D)}f.sql=x,f.sqlExpression=v.sqlValue}f.enableSql=v.sqlEnable===1?2:1,v.factorSelectExpr&&(f.factorSelectExpr=v.factorSelectExpr)}{const v=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],w=h.commonIndicator.reduce((A,F)=>{const{key:R,type:I,range:M,unit:O,radioType:P,radio:U,rankRange:Q}=F;if(R==="mainFlow"){let[W,z]=Q,ne=P==="0"?`netInfow${U}d`:`last${U}DayMainFlowRank`;A.push({column:ne,start:W,end:z})}if(R==="auditOpinionType")A.push({column:F.key,enumType:F.enumType});else if(P==="1")f.sortBy={column:F.key,start:Q[0]||null,end:Q[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(R)){let[W,z]=M;["",null].includes(W)||(W=W/100),["",null].includes(z)||(z=z/100),A.push({column:F.key,start:W,end:z})}else if(I===void 0&&!v.includes(R)){let[W,z]=M;if(!["",null].includes(W))switch(O[0]){case"亿":W=W*1e8;break;case"千万":W=W*1e7;break;default:W=W;break}if(!["",null].includes(z))switch(O[1]){case"亿":z=z*1e8;break;case"千万":z=z*1e7;break;default:z=z;break}A.push({column:F.key,start:W,end:z})}return A},[]);w.length&&(f.query=w);const x=h.commonIndicator.find(({key:A})=>A==="st");x&&(f.st=x.st);const S=h.commonIndicator.find(({key:A})=>A==="tFeaturelncomes");S&&(f.netProfitQueryDto={...S,netProfit:S.netProfit*1e8});const D=h.commonIndicator.find(({key:A})=>A==="priceLevels");D&&(f.priceLevels=D.priceLevels);const N=h.commonIndicator.find(({key:A})=>A==="peTtmLevels");N&&(f.peTtmLevels=N.peTtmLevels);const L=h.commonIndicator.find(({key:A})=>A==="peTrendTtmLevels");L&&(f.peTrendTtmLevels=L.peTrendTtmLevels);const E={};h.commonIndicator.forEach(A=>{const{key:F}=A;switch(F){case"expireDays":["",null].includes(A.range[0])||(E.minExpireDays=A.range[0]),["",null].includes(A.range[1])||(E.maxExpireDays=A.range[1]);break;case"virtualRealDegree":["",null].includes(A.range[0])||(E.minVirtualRealDegree=A.range[0]/100),["",null].includes(A.range[1])||(E.maxVirtualRealDegree=A.range[1]/100);break;case"yearProfitRate":["",null].includes(A.range[0])||(E.minYearProfitRate=A.range[0]/100),["",null].includes(A.range[1])||(E.maxYearProfitRate=A.range[1]/100);break;case"impliedVolatility":["",null].includes(A.range[0])||(E.minImpliedVolatility=A.range[0]/100),["",null].includes(A.range[1])||(E.maxImpliedVolatility=A.range[1]/100);break;case"levelMultiplier":["",null].includes(A.range[0])||(E.minLevelMultiplier=A.range[0]),["",null].includes(A.range[1])||(E.maxLevelMultiplier=A.range[1]);break;case"turnover":["",null].includes(A.range[0])||(E.minTurnover=A.range[0]*1e4),["",null].includes(A.range[1])||(E.maxTurnover=A.range[1]*1e4);break;case"volume":["",null].includes(A.range[0])||(E.minVolume=A.range[0]),["",null].includes(A.range[1])||(E.maxVolume=A.range[1]);break;case"openInterest":["",null].includes(A.range[0])||(E.minOpenInterest=A.range[0]),["",null].includes(A.range[1])||(E.maxOpenInterest=A.range[1]);break;case"optionsCpType":E.optionsCpType=A.optionsCpType;break;case"optionGear":["",null].includes(A.range[0])||(E.minOptionGear=A.range[0]),["",null].includes(A.range[1])||(E.maxOptionGear=A.range[1]);break}});const k=h.commonIndicator.find(({key:A})=>A==="perVolumn");k&&(f.perVolumn={type:k.radio,value:k.levels}),Object.keys(E).length&&(f.searchOptionDto={...f.searchOptionDto,...E})}return(_=h.compositeOrder)!=null&&_.length&&(f.compositeOrder=h.compositeOrder.map(({name:v,value:w})=>({name:v,value:w}))),console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]}}}),(h,f)=>{var _,v,w,x,S,D;const p=L6,g=M6,m=u1,y=bV,b=ll,C=al;return c.openBlock(),c.createElementBlock("div",hkt,[(_=r.value.varietyMarket)!=null&&_.show?(c.openBlock(),c.createElementBlock("div",fkt,[c.createElementVNode("div",pkt,[gkt,c.createElementVNode("span",{onClick:f[0]||(f[0]=N=>d("varietyMarket"))},"不限")]),c.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=N=>i.value.varietyMarket=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(p,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(v=r.value.commonOption)!=null&&v.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",mkt,[c.createElementVNode("div",bkt,[_kt,c.createElementVNode("span",{onClick:f[2]||(f[2]=N=>d("commonOption"))},"不限")]),c.createVNode(y,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=N=>i.value.commonOption=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(w=r.value.marketIds)!=null&&w.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",ykt,[c.createElementVNode("div",vkt,[Ckt,c.createElementVNode("span",{onClick:f[4]||(f[4]=N=>d("marketIds"))},"不限")]),c.createVNode(y,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=N=>i.value.marketIds=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(x=r.value.customTag)!=null&&x.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",wkt,[c.createElementVNode("div",xkt,[Skt,c.createElementVNode("span",{onClick:f[6]||(f[6]=N=>d("customTag"))},"不限")]),c.createVNode(y,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=N=>i.value.customTag=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(S=r.value.jcTranslate)!=null&&S.show?(c.openBlock(),c.createElementBlock("div",Dkt,[c.createElementVNode("div",Nkt,[Ekt,c.createElementVNode("span",{onClick:f[8]||(f[8]=N=>d("jcTranslate"))},"不限")]),c.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=N=>i.value.jcTranslate.type=N),size:"small"},{default:c.withCtx(()=>[c.createVNode(p,{value:2},{default:c.withCtx(()=>[c.createTextVNode("价差转品种")]),_:1}),c.createVNode(p,{value:1},{default:c.withCtx(()=>[c.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(C,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=N=>i.value.jcTranslate.jcList=N),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,N=>(c.openBlock(),c.createBlock(b,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[c.vShow,i.value.jcTranslate.type===1]])])):c.createCommentVNode("",!0),(D=r.value.factorScreen)!=null&&D.show?(c.openBlock(),c.createElementBlock("div",kkt,[c.createElementVNode("div",Lkt,[Mkt,c.createElementVNode("span",{onClick:f[11]||(f[11]=N=>d("factorScreen"))},"不限")]),c.createVNode(wEt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=N=>i.value.factorScreen=N),config:r.value.factorScreen},null,8,["data","config"])])):c.createCommentVNode("",!0),c.createVNode(JEt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=N=>i.value.commonIndicator=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"]),c.createVNode(dkt,{data:i.value.compositeOrder,"onUpdate:data":f[14]||(f[14]=N=>i.value.compositeOrder=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.compositeOrder},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-c14d66fc"]]),Akt={install(n){n.component("st-varietySearch",Tkt)}},AIt="",qO=n=>(c.pushScopeId("data-v-445e2903"),n=n(),c.popScopeId(),n),Ikt={class:"variety-text-copy"},Rkt={class:"stats-container"},Okt={class:"stat-item"},Fkt=qO(()=>c.createElementVNode("span",{class:"label"},"品种数量统计:",-1)),Pkt={class:"value"},Bkt=qO(()=>c.createElementVNode("br",null,null,-1)),Vkt=qO(()=>c.createElementVNode("br",null,null,-1)),zkt=gn({__name:"index",props:{required:{type:Boolean,default:!0}},setup(n,{expose:e}){const t=c.inject("stConfig"),i=n,r=c.ref(""),o=c.computed(()=>s(r.value).length),s=l=>l?l.split(`
|
|
825
|
+
`);r.value.setValue(le);const ie=I.column+ne.length;R.setPosition({lineNumber:I.lineNumber,column:ie}),R.focus()}},D=async()=>{try{d.value=!0;const E=r.value.getValue();if(!E)return Xt.error("请输入脚本语句");const{body:k}=await e.post("/common/qt/getFuncExpr",{factorSelectExpr:E});if(!k)return Xt.error("脚本解析失败, 请检查脚本内容是否填写完整或者联系管理员");let A=document.createElement("textarea");A.value=k,document.body.appendChild(A),A.select(),document.execCommand("copy"),document.body.removeChild(A),Xt.success("脚本内容已经成功复制到粘贴板")}finally{d.value=!1}},N=async()=>{try{u.value=!0;const E=r.value.getValue();if(!E)return Xt.error("请输入脚本语句");const{body:k}=await e.post("/common/qt/getFuncExpr",{factorSelectExpr:E});if(!k)return Xt.error("脚本解析失败, 请检查脚本内容是否填写完整或者联系管理员");const A=await e.post("/common/qt/testFactorSelect",{factorSelectExpr:k}),{result:F,detail:R}=A.body;Object.assign(f,{result:F,detail:R,code:k}),F===1?Xt.success("测试通过"):(Xt.error("测试未能通过"),h.value=!0)}finally{u.value=!1}},L=()=>{if(f.result===null)return Xt.warning("请先进行测试, 等待测试完成后可查看日志");h.value=!0};return c.watch(()=>s.value,E=>{switch(E){case!0:{c.nextTick(()=>{r.value.resize(),i.value.factorSelectExpr&&(l.value="脚本",r.value.setValue(i.value.factorSelectExpr),r.value.focusToEnd()),(i.value.sqlEnable&&i.value.sqlValue||!i.value.sqlEnable&&i.value.list.length)&&(l.value="模版")}),Object.assign(f,{result:null,detail:""});break}case!1:{o.value.close(),h.value=!1;break}}}),c.watch(()=>l.value,E=>{E==="模版"&&o.value.close(),E==="脚本"&&c.nextTick(()=>{r.value.focusToEnd()})},{deep:!0}),(E,k)=>{var Le;const A=Z6,F=Qg,R=mz,I=Kr,M=dn,O=wa,P=NV,U=M6,Q=c.resolveComponent("st-customFunction"),W=ll,z=al,ne=Fd,ce=P6,le=L6,ie=ws,oe=Od,he=s1,pe=sl,de=T6,ve=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",iEt,[c.createElementVNode("div",null,[i.value.sqlEnable&&i.value.sqlValue?(c.openBlock(),c.createBlock(F,{key:0,closable:"",type:"info",title:i.value.sqlValue,onClose:k[0]||(k[0]=ee=>w("sqlTag"))},{default:c.withCtx(()=>[c.createVNode(A,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):c.createCommentVNode("",!0),!i.value.sqlEnable&&i.value.list.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.value.list,(ee,j)=>(c.openBlock(),c.createBlock(F,{closable:"",type:"info",onClose:Y=>w("factorTag",j)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(v(ee)),1)]),_:2},1032,["onClose"]))),256)):c.createCommentVNode("",!0),i.value.factorSelectExpr?(c.openBlock(),c.createBlock(R,{key:2,width:"500",placement:"bottom-start"},{reference:c.withCtx(()=>[c.createVNode(F,{closable:"",type:"info",onClose:k[1]||(k[1]=ee=>w("scriptTag"))},{default:c.withCtx(()=>[c.createTextVNode(" 脚本模式 ")]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",rEt,c.toDisplayString(i.value.factorSelectExpr),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(I,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:m},{default:c.withCtx(()=>[c.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),c.createVNode(pe,{"modal-class":"factor-dialog",modelValue:s.value,"onUpdate:modelValue":k[8]||(k[8]=ee=>s.value=ee),width:"1000","align-center":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ee,titleClass:j})=>[c.createElementVNode("div",oEt,[c.createElementVNode("div",sEt,[c.createElementVNode("span",{id:ee,class:c.normalizeClass(j)}," 因子筛选 ",10,aEt),c.createVNode(O,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:c.withCtx(()=>[c.createVNode(M,{onClick:k[2]||(k[2]=Y=>a.value=!0)},{default:c.withCtx(()=>[c.createVNode(c.unref(Ed))]),_:1})]),_:1}),c.createVNode(U,{modelValue:l.value,"onUpdate:modelValue":k[3]||(k[3]=Y=>l.value=Y),size:"small"},{default:c.withCtx(()=>[c.createVNode(P,{label:"模版",value:"模版"}),c.createVNode(P,{label:"脚本",value:"脚本"})]),_:1},8,["modelValue"]),c.withDirectives(c.createElementVNode("div",lEt,[c.withDirectives(c.createVNode(Q,{size:"small",onInsert:S},null,512),[[c.vShow,l.value==="脚本"]]),c.createVNode(I,{type:"primary",size:"small",loading:d.value,onClick:D},{default:c.withCtx(()=>[c.createTextVNode("复制")]),_:1},8,["loading"]),c.createVNode(I,{type:"primary",size:"small",loading:u.value,onClick:N},{default:c.withCtx(()=>[c.createTextVNode("测试")]),_:1},8,["loading"]),c.createVNode(I,{size:"small",icon:c.unref(YP),onClick:L},{default:c.withCtx(()=>[c.createTextVNode("日志明细")]),_:1},8,["icon"])],512),[[c.vShow,l.value==="脚本"]])]),c.createElementVNode("div",uEt,[l.value==="脚本"?(c.openBlock(),c.createBlock(I,{key:0,size:"small",type:"primary",onClick:x},{default:c.withCtx(()=>[c.createTextVNode("变量选择器")]),_:1})):c.createCommentVNode("",!0),c.createVNode(M,{onClick:k[4]||(k[4]=Y=>s.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",gEt,[c.createVNode(I,{type:"primary",onClick:y},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[l.value==="模版"?(c.openBlock(),c.createBlock(he,{key:0,height:"400px"},{default:c.withCtx(()=>[c.createVNode(oe,{ref_key:"dialogFormRef",ref:p,model:g.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(g.value.list,(ee,j)=>(c.openBlock(),c.createElementBlock("div",cEt,[c.createElementVNode("span",dEt,c.toDisplayString(`条件${j+1}`),1),ee.key==="compare"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[n.config.cycleShow?(c.openBlock(),c.createBlock(ne,{key:0,prop:"list."+j+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.cycle,"onUpdate:modelValue":Y=>ee.cycle=Y,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:Y,value:te})=>(c.openBlock(),c.createBlock(W,{label:Y,value:te,key:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(ne,{prop:"list."+j+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.factor,"onUpdate:modelValue":Y=>ee.factor=Y,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var Y;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((Y=n.config.factorOptions)==null?void 0:Y.filter(te=>[4].includes(te.type)),({label:te,value:J})=>(c.openBlock(),c.createBlock(W,{label:te,value:J,key:J},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(ne,{style:{width:"52px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.compareType,"onUpdate:modelValue":Y=>ee.compareType=Y,size:"small"},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([">",">=","<","<="],Y=>c.createVNode(W,{label:Y,value:Y,key:Y},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(c.openBlock(),c.createBlock(ne,{key:1,prop:"list."+j+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.cycle2,"onUpdate:modelValue":Y=>ee.cycle2=Y,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:Y,value:te})=>(c.openBlock(),c.createBlock(W,{label:Y,value:te,key:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(ne,{prop:"list."+j+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.factor2,"onUpdate:modelValue":Y=>ee.factor2=Y,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var Y;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((Y=n.config.factorOptions)==null?void 0:Y.filter(te=>[4].includes(te.type)),({label:te,value:J})=>(c.openBlock(),c.createBlock(W,{label:te,value:J,key:J},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[n.config.cycleShow?(c.openBlock(),c.createBlock(ne,{key:0,prop:"list."+j+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.cycle,"onUpdate:modelValue":Y=>ee.cycle=Y,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:Y,value:te})=>(c.openBlock(),c.createBlock(W,{label:Y,value:te,key:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(ne,{prop:"list."+j+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(z,{modelValue:ee.factor,"onUpdate:modelValue":Y=>ee.factor=Y,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var Y;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((Y=n.config.factorOptions)==null?void 0:Y.filter(te=>[1,3].includes(te.type)),({label:te,value:J})=>(c.openBlock(),c.createBlock(W,{label:te,value:J,key:J},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(ne,{prop:"list."+j+".score",rules:{validator:c.unref(CSt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createElementVNode("div",hEt,[c.createVNode(ce,{modelValue:ee.score[0],"onUpdate:modelValue":Y=>ee.score[0]=Y,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),fEt,c.createVNode(ce,{modelValue:ee.score[1],"onUpdate:modelValue":Y=>ee.score[1]=Y,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),c.createVNode(M,{onClick:Y=>b(j)},{default:c.withCtx(()=>[c.createVNode(c.unref(wx))]),_:2},1032,["onClick"])]))),256)),c.createVNode(I,{type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:C,style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子")]),_:1},8,["icon"]),c.createVNode(I,{type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:k[5]||(k[5]=ee=>C("compare")),style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(ne,{label:"SQL功能: "},{default:c.withCtx(()=>[c.createVNode(U,{modelValue:g.value.sqlEnable,"onUpdate:modelValue":k[6]||(k[6]=ee=>g.value.sqlEnable=ee)},{default:c.withCtx(()=>[c.createVNode(le,{label:"关闭",value:0}),c.createVNode(le,{label:"启用",value:1})]),_:1},8,["modelValue"]),g.value.sqlEnable?(c.openBlock(),c.createBlock(I,{key:0,type:"primary",size:"small",onClick:_,style:{"margin-left":"auto"}},{default:c.withCtx(()=>[c.createTextVNode("生成SQL")]),_:1})):c.createCommentVNode("",!0)]),_:1}),g.value.sqlEnable?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(ie,{modelValue:g.value.sqlValue,"onUpdate:modelValue":k[7]||(k[7]=ee=>g.value.sqlValue=ee),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),pEt],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",{style:c.normalizeStyle([{width:"968px",height:"400px"},l.value==="脚本"?null:{position:"fixed",top:"-400px",zIndex:-1,visibility:"hidden",pointerEvents:"none"}])},[c.createVNode(bde,{ref_key:"monacoEditorRef",ref:r,language:"lua",suggestionEnable:!0},null,512)],4)]),_:1},8,["modelValue"])]),c.createVNode(nEt,{visible:a.value,"onUpdate:visible":k[9]||(k[9]=ee=>a.value=ee),factorType:l.value,data:(Le=n.config.factorDescriptions)==null?void 0:Le.filter(ee=>[1,3].includes(ee.type))},null,8,["visible","factorType","data"]),c.createVNode(pe,{"modal-class":"log-dialog",modelValue:h.value,"onUpdate:modelValue":k[12]||(k[12]=ee=>h.value=ee),width:"830","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ee,titleClass:j})=>[c.createElementVNode("div",mEt,[c.createElementVNode("div",bEt,[c.createElementVNode("span",{id:ee,class:c.normalizeClass(j)}," 日志明细 ",10,_Et)]),c.createElementVNode("div",yEt,[c.createVNode(M,{onClick:k[10]||(k[10]=Y=>h.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",CEt,[c.createVNode(I,{onClick:k[11]||(k[11]=ee=>h.value=!1)},{default:c.withCtx(()=>[c.createTextVNode(" 关闭 ")]),_:1})])]),default:c.withCtx(()=>[c.createElementVNode("div",vEt,[c.createVNode(he,{class:"code",height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",null,c.toDisplayString(f.code),1)]),_:1}),c.createVNode(de,{direction:"vertical"}),c.createVNode(he,{height:"600px"},{default:c.withCtx(()=>[c.createElementVNode("pre",{class:c.normalizeClass(f.result===1?"success-log":"error-log")},c.toDisplayString(f.result===1?"测试通过 √":f.detail),3)]),_:1})])]),_:1},8,["modelValue"]),c.createVNode(ve,{ref_key:"stVarSelectDialogRef",ref:o},null,512)],64)}}},[["__scopeId","data-v-8554bb2c"]]),NIt="",jw=n=>(c.pushScopeId("data-v-6a791396"),n=n(),c.popScopeId(),n),xEt={key:0,class:"common-indicator"},SEt={class:"indicator"},DEt={class:"title"},NEt=jw(()=>c.createElementVNode("span",null,"常用指标: ",-1)),EEt={class:"options"},kEt=["onClick"],LEt={class:"tags"},MEt=["onClick"],TEt={style:{"font-size":"18px"}},AEt={key:0,class:"out-box"},IEt=jw(()=>c.createElementVNode("span",null,"自定义: ",-1)),REt={key:0,class:"convenient-option-box"},OEt={class:"out-box"},FEt=jw(()=>c.createElementVNode("span",null,"自定义: ",-1)),PEt={key:0},BEt={key:0},VEt={key:0},zEt={key:1},HEt={class:"tFeaturelncomes-option-box"},jEt={class:"tFeaturelncomes-out-box"},WEt=jw(()=>c.createElementVNode("span",null,"自定义: ",-1)),$Et={key:2},UEt={key:3},qEt={key:4},KEt={key:5},GEt={key:6},YEt={key:7},QEt={style:{display:"flex","align-items":"center"}},ZEt={key:8},XEt={class:"dialog-footer"},JEt=gn({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],i=c.inject("clearRow"),r=c.useModel(n,"data"),o=n,s=c.ref(!1),a=c.computed(()=>{var C;return(C=o.data.find(_=>_.radioType==="1"))==null?void 0:C.key}),l=c.computed(()=>{let C=[];return o.varietyMarket===null&&!o.commonOption.length?C=o.config.options:(C=o.config.options,o.varietyMarket&&(C=C.filter(({parent:_})=>_.varietyMarketIds.includes(o.varietyMarket))),o.commonOption.length&&(C=C.filter(({parent:_})=>{const{commonOptionIds:v}=_;return[...new Set([...v,...o.commonOption])].length!==[...v,...o.commonOption].length}))),C}),u=c.ref({}),d=c.ref({}),h=C=>{u.value=C;const _={key:C.key,type:C.type,label:C.label};switch(C.key){case"st":{d.value={..._,st:null};break}case"tFeaturelncomes":{d.value={..._,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{d.value={..._,priceLevels:null};break}case"peTtmLevels":{d.value={..._,peTtmLevels:null};break}case"peTrendTtmLevels":{d.value={..._,peTrendTtmLevels:null};break}case"optionsCpType":{d.value={..._,optionsCpType:null};break}case"perVolumn":{d.value={..._,radio:null,levels:[]};break}case"mainFlow":{d.value={..._,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{d.value={..._,enumType:null};break}default:d.value={..._,range:[null,null],unit:C.defaultUnit.length?[...C.defaultUnit]:[null,null],radioType:a.value&&a.value!==C.key?"0":C.defaultRadioType,rankRange:C.defaultRankRange||[null,null]}}s.value=!0},f=()=>{var _,v;switch(d.value.key){case"st":{const{label:w,st:x}=d.value;if(x===null)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: ${x?"是":"否"}`;break}case"tFeaturelncomes":{const{label:w,rule:x,withFewYears:S,yearsCount:D,netProfit:N}=d.value;if(["",null].includes(S)||["",null].includes(D)||["",null].includes(N))return Xt.warning("格式错误: 请填写完整");d.value.tagText=`${w}: ${S}年内${D}年以上盈利${x===1?"超":"跌"}过${N}亿`;break}case"priceLevels":{const{label:w,priceLevels:x}=d.value;if(!x||x.length===0)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: 已选${x}分位`;break}case"peTtmLevels":{const{label:w,peTtmLevels:x}=d.value;if(!x||x.length===0)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: 已选${x}分位`;break}case"peTrendTtmLevels":{const{label:w,peTrendTtmLevels:x}=d.value;if(!x||x.length===0)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: 已选${x}分位`;break}case"optionsCpType":{const{label:w,optionsCpType:x}=d.value;if(x===null)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: ${x===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:w,radio:x,levels:S}=d.value;if(!x)return Xt.warning("格式错误: 请选择时间");if(!(S!=null&&S.length))return Xt.warning("格式错误: 请选择分位");d.value.tagText=`${w}: ${(_=e.find(D=>D.value===x))==null?void 0:_.label}${S.map(D=>`${D}分位`).join("、")}`;break}case"mainFlow":{const{label:w,radioType:x,radio:S,rankRange:D}=d.value,N=L=>{if(L===""||L===null||L===void 0)return!1;const E=Number(L);return!isNaN(E)};if(!S)return Xt.warning("格式错误: 请选择时间");if(!N(D[0])&&!N(D[1]))return Xt.warning(`格式错误: 请填写${x==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(D[0])&&!["",null].includes(D[1])?d.value.tagText=`${w}: ${S}日${x==="0"?"涨幅范围":"排名范围"}: ${D[0]}${x==="0"?"%":""} ~ ${D[1]}${x==="0"?"%":""}`:["",null].includes(D[0])?d.value.tagText=`${w}: ${S}日${x==="0"?"涨幅范围":"排名范围"}: ≤${D[1]}${x==="0"?"%":""}`:d.value.tagText=`${w}: ${S}日${x==="0"?"涨幅范围":"排名范围"}: ≥${D[0]}${x==="0"?"%":""}`;break}case"auditOpinionType":{const{label:w,enumType:x}=d.value;if(x===null)return Xt.warning("格式错误: 请至少选择一个值");d.value.tagText=`${w}: ${(v=t.find(S=>S.value===x))==null?void 0:v.label}`;break}default:{const{label:w,unit:x,radioType:S}=d.value,D=S==="1"?d.value.rankRange:d.value.range;if(["",null].includes(D[0])&&["",null].includes(D[1]))return Xt.warning("格式错误: 请至少填写一个值");if(S==="1"){const E=Number(D[0]),k=Number(D[1]);if(isNaN(E)||isNaN(k))return Xt.warning("格式错误: 请填写数字");if(E<0||k<0)return Xt.warning("格式错误: 请填写大于0的数字");if(E>k)return Xt.warning("格式错误: 请填写正确的排名范围")}const N=S==="1"?"":x[0]??"",L=S==="1"?"":x[1]??"";!["",null].includes(D[0])&&!["",null].includes(D[1])?d.value.tagText=`${w}${S==="1"?"排名":""}: ${D[0]}${N} ~ ${D[1]}${L}`:["",null].includes(D[0])?d.value.tagText=`${w}${S==="1"?"排名":""}: ≤${D[1]}${L}`:d.value.tagText=`${w}${S==="1"?"排名":""}: ≥${D[0]}${N}`}}const C=r.value.findIndex(({key:w})=>w===d.value.key);C===-1?r.value.push(d.value):r.value.splice(C,1,d.value),s.value=!1},p=C=>{u.value=l.value.find(({key:_})=>_===C.key),d.value=JSON.parse(JSON.stringify(C)),s.value=!0},g=C=>{r.value.splice(C,1)},m=C=>{d.value.range=[...C.range],d.value.unit=[...C.unit]},y=C=>{switch(C){case"≤0":Object.assign(d.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(d.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(d.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(d.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(d.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};c.watch(()=>l.value,()=>{r.value.length&&(r.value=r.value.filter(({key:C})=>l.value.find(_=>_.key===C)))});const b=()=>{d.value.radio=null,d.value.rankRange=[null,null]};return(C,_)=>{const v=Qg,w=NV,x=M6,S=ws,D=Kr,N=ll,L=al,E=L6,k=P6,A=sl;return n.config.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",xEt,[c.createElementVNode("div",SEt,[c.createElementVNode("div",DEt,[NEt,c.createElementVNode("span",{onClick:_[0]||(_[0]=F=>c.unref(i)("commonIndicator"))},"不限")]),c.createElementVNode("div",EEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,F=>(c.openBlock(),c.createElementBlock("span",{key:F.key,onClick:R=>h(F)},c.toDisplayString(F.label),9,kEt))),128))])]),c.createElementVNode("div",LEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,(F,R)=>(c.openBlock(),c.createBlock(v,{closable:"",type:"info",onClose:I=>g(R)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(F.tagText),1),c.createElementVNode("span",{class:"edit",onClick:I=>p(F)},"编辑",8,MEt)]),_:2},1032,["onClose"]))),256))]),c.createVNode(A,{modelValue:s.value,"onUpdate:modelValue":_[28]||(_[28]=F=>s.value=F),title:u.value.label,width:"600","align-center":"","destroy-on-close":""},c.createSlots({footer:c.withCtx(()=>[c.createElementVNode("div",XEt,[c.createVNode(D,{type:"primary",onClick:f},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>{var F;return[u.value.type===void 0&&d.value.radioType==="1"?(c.openBlock(),c.createElementBlock("div",AEt,[IEt,c.createVNode(S,{modelValue:d.value.rankRange[0],"onUpdate:modelValue":_[3]||(_[3]=R=>d.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(S,{modelValue:d.value.rankRange[1],"onUpdate:modelValue":_[4]||(_[4]=R=>d.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):u.value.type===void 0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[(F=u.value.convenientOptions)!=null&&F.length?(c.openBlock(),c.createElementBlock("div",REt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.convenientOptions,R=>(c.openBlock(),c.createBlock(D,{key:R.text,onClick:I=>m(R)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",OEt,[FEt,c.createVNode(S,{modelValue:d.value.range[0],"onUpdate:modelValue":_[6]||(_[6]=R=>d.value.range[0]=R),style:{flex:"1"}},c.createSlots({_:2},[u.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[u.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",PEt,c.toDisplayString(d.value.unit[0]),1)):(c.openBlock(),c.createBlock(L,{key:1,modelValue:d.value.unit[0],"onUpdate:modelValue":_[5]||(_[5]=R=>d.value.unit[0]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.unitOptions,R=>(c.openBlock(),c.createBlock(N,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(S,{modelValue:d.value.range[1],"onUpdate:modelValue":_[8]||(_[8]=R=>d.value.range[1]=R),style:{flex:"1"}},c.createSlots({_:2},[u.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[u.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",BEt,c.toDisplayString(d.value.unit[1]),1)):(c.openBlock(),c.createBlock(L,{key:1,modelValue:d.value.unit[1],"onUpdate:modelValue":_[7]||(_[7]=R=>d.value.unit[1]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.unitOptions,R=>(c.openBlock(),c.createBlock(N,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[u.value.key==="st"?(c.openBlock(),c.createElementBlock("div",VEt,[c.createVNode(x,{modelValue:d.value.st,"onUpdate:modelValue":_[9]||(_[9]=R=>d.value.st=R)},{default:c.withCtx(()=>[c.createVNode(E,{label:"是",value:1}),c.createVNode(E,{label:"否",value:0})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="tFeaturelncomes"?(c.openBlock(),c.createElementBlock("div",zEt,[c.createElementVNode("div",HEt,[c.createVNode(D,{onClick:_[10]||(_[10]=R=>y("≤0"))},{default:c.withCtx(()=>[c.createTextVNode("≤0")]),_:1}),c.createVNode(D,{onClick:_[11]||(_[11]=R=>y("≥0"))},{default:c.withCtx(()=>[c.createTextVNode("≥0")]),_:1}),c.createVNode(D,{onClick:_[12]||(_[12]=R=>y("五年内有四年以上盈利超过5千万"))},{default:c.withCtx(()=>[c.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),c.createVNode(D,{onClick:_[13]||(_[13]=R=>y("≥10亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥10亿")]),_:1}),c.createVNode(D,{onClick:_[14]||(_[14]=R=>y("≥20亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥20亿")]),_:1})]),c.createElementVNode("div",jEt,[WEt,c.createElementVNode("div",null,[c.createVNode(k,{modelValue:d.value.withFewYears,"onUpdate:modelValue":_[15]||(_[15]=R=>d.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年内 "),c.createVNode(k,{modelValue:d.value.yearsCount,"onUpdate:modelValue":_[16]||(_[16]=R=>d.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年以上盈利"+c.toDisplayString(d.value.rule===1?"超":"跌")+"过 ",1),c.createVNode(k,{modelValue:d.value.netProfit,"onUpdate:modelValue":_[17]||(_[17]=R=>d.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 亿 ")])])])):c.createCommentVNode("",!0),u.value.key==="priceLevels"?(c.openBlock(),c.createElementBlock("div",$Et,[c.createVNode(L,{modelValue:d.value.priceLevels,"onUpdate:modelValue":_[18]||(_[18]=R=>d.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="peTtmLevels"?(c.openBlock(),c.createElementBlock("div",UEt,[c.createVNode(L,{modelValue:d.value.peTtmLevels,"onUpdate:modelValue":_[19]||(_[19]=R=>d.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="peTrendTtmLevels"?(c.openBlock(),c.createElementBlock("div",qEt,[c.createVNode(L,{modelValue:d.value.peTrendTtmLevels,"onUpdate:modelValue":_[20]||(_[20]=R=>d.value.peTrendTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="optionsCpType"?(c.openBlock(),c.createElementBlock("div",KEt,[c.createVNode(x,{modelValue:d.value.optionsCpType,"onUpdate:modelValue":_[21]||(_[21]=R=>d.value.optionsCpType=R)},{default:c.withCtx(()=>[c.createVNode(E,{label:"看涨",value:1}),c.createVNode(E,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="perVolumn"?(c.openBlock(),c.createElementBlock("div",GEt,[c.createVNode(x,{modelValue:d.value.radio,"onUpdate:modelValue":_[22]||(_[22]=R=>d.value.radio=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(e,R=>c.createVNode(E,{key:R.value,value:R.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),c.createVNode(L,{modelValue:d.value.levels,"onUpdate:modelValue":_[23]||(_[23]=R=>d.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(N,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),u.value.key==="mainFlow"?(c.openBlock(),c.createElementBlock("div",YEt,[c.createVNode(x,{modelValue:d.value.radio,"onUpdate:modelValue":_[24]||(_[24]=R=>d.value.radio=R)},{default:c.withCtx(()=>[c.createVNode(E,{value:"3"},{default:c.withCtx(()=>[c.createTextVNode("3日")]),_:1}),c.createVNode(E,{value:"5"},{default:c.withCtx(()=>[c.createTextVNode("5日")]),_:1}),c.createVNode(E,{value:"10"},{default:c.withCtx(()=>[c.createTextVNode("10日")]),_:1}),c.createVNode(E,{value:"20"},{default:c.withCtx(()=>[c.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",QEt,[c.createElementVNode("span",null,c.toDisplayString(d.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),c.createVNode(S,{modelValue:d.value.rankRange[0],"onUpdate:modelValue":_[25]||(_[25]=R=>d.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(S,{modelValue:d.value.rankRange[1],"onUpdate:modelValue":_[26]||(_[26]=R=>d.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):c.createCommentVNode("",!0),u.value.key==="auditOpinionType"?(c.openBlock(),c.createElementBlock("div",ZEt,[c.createVNode(x,{modelValue:d.value.enumType,"onUpdate:modelValue":_[27]||(_[27]=R=>d.value.enumType=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(t,(R,I)=>c.createVNode(E,{key:I,label:R.label,value:R.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)],64))]}),_:2},[u.value.showRankType?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",TEt,c.toDisplayString(u.value.label),1),c.createVNode(x,{modelValue:d.value.radioType,"onUpdate:modelValue":_[1]||(_[1]=F=>d.value.radioType=F),style:{"vertical-align":"4px","margin-left":"12px"}},{default:c.withCtx(()=>[c.createVNode(w,{label:"数值",value:"0"}),c.createVNode(w,{disabled:a.value&&a.value!==u.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:u.value.key==="mainFlow"?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",{style:{"font-size":"18px"}},c.toDisplayString(u.value.label),1),c.createVNode(x,{modelValue:d.value.radioType,"onUpdate:modelValue":_[2]||(_[2]=F=>d.value.radioType=F),style:{"vertical-align":"4px","margin-left":"12px"},onChange:b},{default:c.withCtx(()=>[c.createVNode(w,{label:"涨幅范围",value:"0"}),c.createVNode(w,{disabled:a.value&&a.value!==u.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-6a791396"]]),kIt="",ekt=n=>(c.pushScopeId("data-v-0c889ca6"),n=n(),c.popScopeId(),n),tkt={key:0,class:"composite-order"},nkt={class:"title"},ikt=ekt(()=>c.createElementVNode("span",null,"组合排序: ",-1)),rkt={class:"tag-box"},okt=["onClick"],skt={class:"custom-header"},akt={class:"left"},lkt=["id"],ukt={class:"right"},ckt={class:"dialog-footer"},dkt=gn({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=c.inject("clearRow"),t=c.useModel(n,"data"),i=n,r=c.ref(!1),o=c.ref({id:null,name:null,value:"desc"}),s=c.computed(()=>{let l=[];return i.varietyMarket===null&&!i.commonOption.length?l=i.config.options:(l=i.config.options,i.varietyMarket&&(l=l.filter(({parent:u})=>u.varietyMarketIds.includes(i.varietyMarket))),i.commonOption.length&&(l=l.filter(({parent:u})=>{const{commonOptionIds:d}=u;return[...new Set([...d,...i.commonOption])].length!==[...d,...i.commonOption].length}))),l}),a=(l,u)=>{switch(l){case"add":{o.value={id:null,name:null,value:"desc"},r.value=!0;break}case"edit":{const d=t.value[u];o.value={...d},r.value=!0;break}case"submit":{const{id:d,name:h,value:f}=o.value;if(!h)return Xt.warning("请选择需要排序的条件");const{label:p}=s.value.find(m=>m.key===h),g=`${p}-${f==="asc"?"正序↑":"降序↓"}`;if(d===null){const m=t.value.findIndex(y=>y.name===h);m===-1?t.value.push({...o.value,id:h,tagText:g}):t.value.splice(m,1,{...o.value,id:h,tagText:g})}else if(o.value.id){const m=t.value.findIndex(b=>b.name===d),y=t.value.findIndex(b=>b.name===h);t.value[m]={...o.value,id:h,tagText:g},y!==-1&&m!==y&&t.value.splice(y,1)}r.value=!1;break}case"delete":{t.value.splice(u,1);break}}};return c.watch(()=>s.value,()=>{t.value.length&&(t.value=t.value.filter(({name:l})=>s.value.find(u=>u.key===l)))}),(l,u)=>{const d=Qg,h=Kr,f=dn,p=ll,g=al,m=Fd,y=L6,b=M6,C=Od,_=sl;return n.config.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",tkt,[c.createElementVNode("div",nkt,[ikt,c.createElementVNode("span",{onClick:u[0]||(u[0]=v=>c.unref(e)("compositeOrder"))},"不限")]),c.createElementVNode("div",rkt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,(v,w)=>(c.openBlock(),c.createBlock(d,{closable:"",type:"info",onClose:x=>a("delete",w)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(v.tagText),1),c.createElementVNode("span",{class:"edit",onClick:x=>a("edit",w)},"编辑",8,okt)]),_:2},1032,["onClose"]))),256)),c.createVNode(h,{type:"primary",plain:"",size:"small",icon:c.unref(zg),onClick:u[1]||(u[1]=v=>a("add"))},{default:c.withCtx(()=>[c.createTextVNode(" 添加排序 ")]),_:1},8,["icon"])]),c.createVNode(_,{"modal-class":"order-dialog",modelValue:r.value,"onUpdate:modelValue":u[7]||(u[7]=v=>r.value=v),width:"400","align-center":"","destroy-on-close":"",overflow:"","show-close":!1},{header:c.withCtx(({titleId:v,titleClass:w})=>[c.createElementVNode("div",skt,[c.createElementVNode("div",akt,[c.createElementVNode("span",{id:v,class:c.normalizeClass(w)}," 添加条件 ",10,lkt)]),c.createElementVNode("div",ukt,[c.createVNode(f,{onClick:u[2]||(u[2]=x=>r.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(ql))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",ckt,[c.createVNode(h,{onClick:u[5]||(u[5]=v=>r.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("取消")]),_:1}),c.createVNode(h,{type:"primary",onClick:u[6]||(u[6]=v=>a("submit"))},{default:c.withCtx(()=>[c.createTextVNode(" 确定 ")]),_:1})])]),default:c.withCtx(()=>[c.createVNode(C,{ref:"compositeOrderFormRef",model:o.value},{default:c.withCtx(()=>[c.createVNode(m,{label:"添加条件: "},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:o.value.name,"onUpdate:modelValue":u[3]||(u[3]=v=>o.value.name=v),filterable:"",placeholder:"请选择","no-match-text":"未匹配到相关条件"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:v,key:w})=>(c.openBlock(),c.createBlock(p,{label:v,value:w,key:w},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),c.createVNode(m,{label:"排序方式: "},{default:c.withCtx(()=>[c.createVNode(b,{modelValue:o.value.value,"onUpdate:modelValue":u[4]||(u[4]=v=>o.value.value=v)},{default:c.withCtx(()=>[c.createVNode(y,{label:"正序",value:"asc"}),c.createVNode(y,{label:"倒序",value:"desc"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-0c889ca6"]]),MIt="",_g=n=>(c.pushScopeId("data-v-c14d66fc"),n=n(),c.popScopeId(),n),hkt={class:"variety-search"},fkt={key:0,class:"variety-search-row"},pkt={class:"title"},gkt=_g(()=>c.createElementVNode("span",null,"品种市场: ",-1)),mkt={key:1,class:"variety-search-row"},bkt={class:"title"},_kt=_g(()=>c.createElementVNode("span",null,"常用选项: ",-1)),ykt={key:2,class:"variety-search-row"},vkt={class:"title"},Ckt=_g(()=>c.createElementVNode("span",null,"上市板块: ",-1)),wkt={key:3,class:"variety-search-row"},xkt={class:"title"},Skt=_g(()=>c.createElementVNode("span",null,"自定标签: ",-1)),Dkt={key:4,class:"variety-search-row"},Nkt={class:"title"},Ekt=_g(()=>c.createElementVNode("span",null,"价差转换: ",-1)),kkt={key:5,class:"variety-search-row"},Lkt={class:"title"},Mkt=_g(()=>c.createElementVNode("span",null,"因子筛选: ",-1)),Tkt=gn({__name:"index",props:c.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=c.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]});const r=c.computed(()=>{const h={};return Object.keys(vde).forEach(f=>{const p=vde[f],g=t.config[f]??{},m={...p,...g};h[f]=m}),h}),o=c.computed(()=>r.value.varietyMarket.options),s=c.computed(()=>{const{varietyMarket:h}=i.value;return h?o.value.find(({value:p})=>p===h).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(y=>y.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=c.computed(()=>{const{varietyMarket:h}=i.value;return h?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(h)):r.value.marketIds.options}),l=c.computed(()=>r.value.customTag.options),u=c.computed(()=>r.value.jcTranslate.jcOptions),d=h=>{switch(h){case"commonOption":{i.value[h]=[];break}case"marketIds":{i.value[h]=[];break}case"customTag":{i.value[h]=[];break}case"jcTranslate":{i.value[h]={type:null,jcList:[]};break}case"factorScreen":{i.value[h]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{i.value[h]=[];break}case"compositeOrder":{i.value[h]=[];break}default:{i.value[h]=null;break}}};return c.watch(()=>s.value,h=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>h.find(({value:g})=>g===p)))}),c.watch(()=>a.value,h=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>h.find(({value:g})=>g===p)))}),c.provide("clearRow",d),e({formatData:h=>{var p,g,m,y,b,C,_;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(h.varietyMarket&&(f.exchangeId=String(h.varietyMarket)),(p=h.commonOption)!=null&&p.length&&(f.optionId=h.commonOption.join(",")),(g=h.marketIds)!=null&&g.length&&(f.marketIds=h.marketIds),(m=h.customTag)!=null&&m.length&&(f.tagIds=h.customTag),(y=r.value.jcTranslate)!=null&&y.show){const{jcTranslate:v}=h,{type:w,jcList:x}=v;switch(w){case 1:{f.translateType=1,f.jcType=x.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:v}=h;if((C=v==null?void 0:v.list)!=null&&C.length&&(f.tbFeatureFactorScores=v.list.map(w=>{switch(w.key){case"compare":return{freqId:w.cycle,factorId:w.factor,compareType:w.compareType,freqId2:w.cycle2,factorId2:w.factor2};default:return{freqId:w.cycle,factorId:w.factor,startScore:w.score[0],endScore:w.score[1]}}})),v.sqlEnable){const w=v.list.reduce((S,D,N)=>{var E,k;const L=`条件${N+1}`;switch(D.key){case"compare":{let A="";(E=r.value.factorScreen)!=null&&E.cycleShow?A=`freq_id = ${D.cycle} and factor_id = ${D.factor} ${D.compareType} freq_id = ${D.cycle2} and factor_id = ${D.factor2}`:A=`factor_id = ${D.factor} ${D.compareType} factor_id = ${D.factor2}`,S.set(L,`(${A})`);break}default:{let A=`factor_id = ${D.factor} and `;(k=r.value.factorScreen)!=null&&k.cycleShow&&(A=`freq_id = ${D.cycle} and factor_id = ${D.factor} and `),(D.score[0]||D.score[0]===0)&&(D.score[1]||D.score[1]===0)?A+=`score >= ${D.score[0]} and score <= ${D.score[1]}`:D.score[0]||D.score[0]===0?A+=`score >= ${D.score[0]}`:(D.score[1]||D.score[1]===0)&&(A+=`score <= ${D.score[1]}`),S.set(L,`(${A})`)}}return S},new Map([]));let x=v.sqlValue;for(const[S,D]of w){const N=new RegExp(S,"g");x=x.replace(N,D)}f.sql=x,f.sqlExpression=v.sqlValue}f.enableSql=v.sqlEnable===1?2:1,v.factorSelectExpr&&(f.factorSelectExpr=v.factorSelectExpr)}{const v=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],w=h.commonIndicator.reduce((A,F)=>{const{key:R,type:I,range:M,unit:O,radioType:P,radio:U,rankRange:Q}=F;if(R==="mainFlow"){let[W,z]=Q,ne=P==="0"?`netInfow${U}d`:`last${U}DayMainFlowRank`;A.push({column:ne,start:W,end:z})}if(R==="auditOpinionType")A.push({column:F.key,enumType:F.enumType});else if(P==="1")f.sortBy={column:F.key,start:Q[0]||null,end:Q[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(R)){let[W,z]=M;["",null].includes(W)||(W=W/100),["",null].includes(z)||(z=z/100),A.push({column:F.key,start:W,end:z})}else if(I===void 0&&!v.includes(R)){let[W,z]=M;if(!["",null].includes(W))switch(O[0]){case"亿":W=W*1e8;break;case"千万":W=W*1e7;break;default:W=W;break}if(!["",null].includes(z))switch(O[1]){case"亿":z=z*1e8;break;case"千万":z=z*1e7;break;default:z=z;break}A.push({column:F.key,start:W,end:z})}return A},[]);w.length&&(f.query=w);const x=h.commonIndicator.find(({key:A})=>A==="st");x&&(f.st=x.st);const S=h.commonIndicator.find(({key:A})=>A==="tFeaturelncomes");S&&(f.netProfitQueryDto={...S,netProfit:S.netProfit*1e8});const D=h.commonIndicator.find(({key:A})=>A==="priceLevels");D&&(f.priceLevels=D.priceLevels);const N=h.commonIndicator.find(({key:A})=>A==="peTtmLevels");N&&(f.peTtmLevels=N.peTtmLevels);const L=h.commonIndicator.find(({key:A})=>A==="peTrendTtmLevels");L&&(f.peTrendTtmLevels=L.peTrendTtmLevels);const E={};h.commonIndicator.forEach(A=>{const{key:F}=A;switch(F){case"expireDays":["",null].includes(A.range[0])||(E.minExpireDays=A.range[0]),["",null].includes(A.range[1])||(E.maxExpireDays=A.range[1]);break;case"virtualRealDegree":["",null].includes(A.range[0])||(E.minVirtualRealDegree=A.range[0]/100),["",null].includes(A.range[1])||(E.maxVirtualRealDegree=A.range[1]/100);break;case"yearProfitRate":["",null].includes(A.range[0])||(E.minYearProfitRate=A.range[0]/100),["",null].includes(A.range[1])||(E.maxYearProfitRate=A.range[1]/100);break;case"impliedVolatility":["",null].includes(A.range[0])||(E.minImpliedVolatility=A.range[0]/100),["",null].includes(A.range[1])||(E.maxImpliedVolatility=A.range[1]/100);break;case"levelMultiplier":["",null].includes(A.range[0])||(E.minLevelMultiplier=A.range[0]),["",null].includes(A.range[1])||(E.maxLevelMultiplier=A.range[1]);break;case"turnover":["",null].includes(A.range[0])||(E.minTurnover=A.range[0]*1e4),["",null].includes(A.range[1])||(E.maxTurnover=A.range[1]*1e4);break;case"volume":["",null].includes(A.range[0])||(E.minVolume=A.range[0]),["",null].includes(A.range[1])||(E.maxVolume=A.range[1]);break;case"openInterest":["",null].includes(A.range[0])||(E.minOpenInterest=A.range[0]),["",null].includes(A.range[1])||(E.maxOpenInterest=A.range[1]);break;case"optionsCpType":E.optionsCpType=A.optionsCpType;break;case"optionGear":["",null].includes(A.range[0])||(E.minOptionGear=A.range[0]),["",null].includes(A.range[1])||(E.maxOptionGear=A.range[1]);break}});const k=h.commonIndicator.find(({key:A})=>A==="perVolumn");k&&(f.perVolumn={type:k.radio,value:k.levels}),Object.keys(E).length&&(f.searchOptionDto={...f.searchOptionDto,...E})}return(_=h.compositeOrder)!=null&&_.length&&(f.compositeOrder=h.compositeOrder.map(({name:v,value:w})=>({name:v,value:w}))),console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]}}}),(h,f)=>{var _,v,w,x,S,D;const p=L6,g=M6,m=u1,y=bV,b=ll,C=al;return c.openBlock(),c.createElementBlock("div",hkt,[(_=r.value.varietyMarket)!=null&&_.show?(c.openBlock(),c.createElementBlock("div",fkt,[c.createElementVNode("div",pkt,[gkt,c.createElementVNode("span",{onClick:f[0]||(f[0]=N=>d("varietyMarket"))},"不限")]),c.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=N=>i.value.varietyMarket=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(p,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(v=r.value.commonOption)!=null&&v.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",mkt,[c.createElementVNode("div",bkt,[_kt,c.createElementVNode("span",{onClick:f[2]||(f[2]=N=>d("commonOption"))},"不限")]),c.createVNode(y,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=N=>i.value.commonOption=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(w=r.value.marketIds)!=null&&w.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",ykt,[c.createElementVNode("div",vkt,[Ckt,c.createElementVNode("span",{onClick:f[4]||(f[4]=N=>d("marketIds"))},"不限")]),c.createVNode(y,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=N=>i.value.marketIds=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(x=r.value.customTag)!=null&&x.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",wkt,[c.createElementVNode("div",xkt,[Skt,c.createElementVNode("span",{onClick:f[6]||(f[6]=N=>d("customTag"))},"不限")]),c.createVNode(y,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=N=>i.value.customTag=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(S=r.value.jcTranslate)!=null&&S.show?(c.openBlock(),c.createElementBlock("div",Dkt,[c.createElementVNode("div",Nkt,[Ekt,c.createElementVNode("span",{onClick:f[8]||(f[8]=N=>d("jcTranslate"))},"不限")]),c.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=N=>i.value.jcTranslate.type=N),size:"small"},{default:c.withCtx(()=>[c.createVNode(p,{value:2},{default:c.withCtx(()=>[c.createTextVNode("价差转品种")]),_:1}),c.createVNode(p,{value:1},{default:c.withCtx(()=>[c.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(C,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=N=>i.value.jcTranslate.jcList=N),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,N=>(c.openBlock(),c.createBlock(b,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[c.vShow,i.value.jcTranslate.type===1]])])):c.createCommentVNode("",!0),(D=r.value.factorScreen)!=null&&D.show?(c.openBlock(),c.createElementBlock("div",kkt,[c.createElementVNode("div",Lkt,[Mkt,c.createElementVNode("span",{onClick:f[11]||(f[11]=N=>d("factorScreen"))},"不限")]),c.createVNode(wEt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=N=>i.value.factorScreen=N),config:r.value.factorScreen},null,8,["data","config"])])):c.createCommentVNode("",!0),c.createVNode(JEt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=N=>i.value.commonIndicator=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"]),c.createVNode(dkt,{data:i.value.compositeOrder,"onUpdate:data":f[14]||(f[14]=N=>i.value.compositeOrder=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.compositeOrder},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-c14d66fc"]]),Akt={install(n){n.component("st-varietySearch",Tkt)}},AIt="",qO=n=>(c.pushScopeId("data-v-445e2903"),n=n(),c.popScopeId(),n),Ikt={class:"variety-text-copy"},Rkt={class:"stats-container"},Okt={class:"stat-item"},Fkt=qO(()=>c.createElementVNode("span",{class:"label"},"品种数量统计:",-1)),Pkt={class:"value"},Bkt=qO(()=>c.createElementVNode("br",null,null,-1)),Vkt=qO(()=>c.createElementVNode("br",null,null,-1)),zkt=gn({__name:"index",props:{required:{type:Boolean,default:!0}},setup(n,{expose:e}){const t=c.inject("stConfig"),i=n,r=c.ref(""),o=c.computed(()=>s(r.value).length),s=l=>l?l.split(`
|
|
826
826
|
`).reduce((u,d)=>{const h=d.trim().replace(/\s+/gi," ").split(" ")[0];return h&&u.push(h),u},[]):[];return e({validate:l=>new Promise(async(u,d)=>{try{if(i.required&&(!r.value||r.value.trim()===""))return Xt.error("品种内容不可为空"),l(!1);const{body:h}=await t.request.post("/invest/analysis/strategy/verifyCodes",{codes:s(r.value)});return l(!0,h)}catch(h){return d(h)}})}),(l,u)=>{const d=dn,h=wa,f=ws;return c.openBlock(),c.createElementBlock("div",Ikt,[c.createElementVNode("div",Rkt,[c.createElementVNode("div",Okt,[Fkt,c.createElementVNode("span",Pkt,c.toDisplayString(o.value),1),c.createVNode(h,{class:"box-item",effect:"dark",placement:"right"},{content:c.withCtx(()=>[c.createTextVNode(" 仅统计符合输入格式的数量, 输入格式示例(代码和名称需空格隔开, 名称可不写):"),Bkt,c.createTextVNode("hc8888 热轧卷板期货指数 "),Vkt,c.createTextVNode("sp8888 纸浆期货指数")]),default:c.withCtx(()=>[c.createVNode(d,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ed))]),_:1})]),_:1})])]),c.createVNode(f,{class:"textarea",modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=p=>r.value=p),resize:"none",type:"textarea",placeholder:`文本格式要求示例:
|
|
827
827
|
hc8888 热轧卷板期货指数
|
|
828
828
|
sp8888 纸浆期货指数
|