st-comp 0.0.183 → 0.0.184

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.
@@ -137,7 +137,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,curr
137
137
  入参: ${JSON.stringify(u.method==="post"?u.data:u.params)}
138
138
  返参: ${JSON.stringify(l)}`)))},a=>{const{response:l={},config:u={}}=a;o instanceof Function&&o(a);let d=a.message;return d==="Network Error"?d="服务器网络故障":d.includes("timeout")?d="服务器接口超时":d.includes("Request failed with status code")&&(d="服务器接口"+d.substr(d.length-3)+"异常"),WE.error(d),Promise.reject(new Error(`服务器异常-${a.message} status: ${l==null?void 0:l.status}
139
139
  接口: ${u.url}
140
- 入参: ${JSON.stringify(u.method==="post"?u.data:u.params)}`))}),{get:(a,l={},u={})=>s({method:"GET",url:`${nJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/get"}${a}`,params:l,...u}),post:(a,l={},u={})=>s({method:"POST",url:`${nJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/post"}${a}`,data:l,...u})}},fet=Object.freeze(Object.defineProperty({__proto__:null,initRequest:het},Symbol.toStringTag,{value:"Module"}));var pet=Object.defineProperty,get=(n,e,t)=>e in n?pet(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,g4=(n,e,t)=>get(n,typeof e!="symbol"?e+"":e,t);class iJ{constructor(e,t={}){g4(this,"dom"),g4(this,"resizeRo"),g4(this,"callback"),g4(this,"visibilitychangeFn"),g4(this,"timer"),g4(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 met=n=>new iJ(n),bet=Object.freeze(Object.defineProperty({__proto__:null,ResizeListener:iJ,addResizeListener:met},Symbol.toStringTag,{value:"Module"}));`${new Date().getTime()}${Math.floor(Math.random()*1e9)}`;const _et=n=>{n?IH("token",n):console.error("token不能为空")},yet=n=>{n?IH("userData",n):console.error("用户数据不能为空")},rJ=()=>RH("token"),oJ=n=>{const e=RH("userData");return n?e==null?void 0:e[n]:e},vet=()=>!!rJ(),Cet=()=>{const n=oJ();return(n==null?void 0:n.username)==="admin"},sJ=(n="")=>location.href=`${location.origin}/login/index.html?url=${encodeURIComponent(n||location.href)}`,wet=(n=!0,e)=>{if(OH("token"),OH("userData"),n){sJ();return}e&&(location.href=e)},xet=Object.freeze(Object.defineProperty({__proto__:null,getToken:rJ,getUserData:oJ,isAdmin:Cet,isLogin:vet,login:sJ,loginout:wet,setToken:_et,setUserData:yet},Symbol.toStringTag,{value:"Module"})),ml=cet,{initRequest:aJ}=fet,{addResizeListener:lJ}=bet,{setToken:$kt,setUserData:Det,getToken:uJ,getUserData:I2,isLogin:cJ,isAdmin:Ukt,login:Net,loginout:UE}=xet,m4=(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)}},Eet={__name:"index",props:{env:{type:Object,default:()=>({})}},setup(n){const e=r=>{const o=aJ(r,{handleReq:s=>{cJ()&&(s.headers.token=uJ())},handleRes:s=>{const{data:a}=s;if(a.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:UE(),!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")}},ket={install(n){n.component("st-configProvider",Eet)}},qkt="",Let=In({__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"]]),Met={install(n){n.component("st-contextmenu",Let)}},Gkt="",Ykt="",Qkt="",Zkt="",Xkt="",Jkt="",eLt="",tLt="",nLt="",iLt="",rLt="",oLt="",sLt="",aLt="",lLt="",uLt="",Tet=n=>(c.pushScopeId("data-v-44f08e3e"),n=n(),c.popScopeId(),n),Aet={class:"custom-function"},Iet={class:"func-option"},Ret={class:"icons"},Oet={class:"custom-header"},Fet={class:"left"},Pet=["id"],Bet={class:"right"},Vet={style:{display:"flex","align-items":"center","margin-bottom":"10px"}},zet=Tet(()=>c.createElementVNode("span",null,"函数名称:",-1)),Het={class:"dialog-footer"},jet=In({__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=async()=>{const{body:_}=await t.post("/common/qt/querySearchFunctions");if(l.value=_??[],s.value===null)a.value="";else{const v=l.value.find(({id:w})=>w===s.value);a.value=v?v.funcName:""}},p=_=>{var v;_?s.value=(v=l.value.find(w=>w.funcName===_))==null?void 0:v.id:s.value=null},g=async _=>{await t.post("/common/qt/deleteSearchFunctionById",{id:_.id}),f()},m=_=>{switch(!!_){case!1:{Object.assign(d,{id:null,funcName:"",funcExpression:""});break}case!0:{Object.assign(d,{id:_.id,funcName:_.funcName,funcExpression:_.funcExpression});break}}u.value=!0},y=async()=>{try{if(h.value=!0,d.funcExpression=i.value.getValue(),!d.funcName)return mi.error("函数名称不可为空");if(!d.funcExpression)return mi.error("函数内容不可为空");await t.post("/common/qt/saveOrUpdateSearchFunction",d),mi.success("操作成功"),u.value=!1,await f()}finally{h.value=!1}},b=()=>{if(!a.value)return mi.error("请先选择自定义函数后, 再执行插入");o("insert",a.value)},C=()=>{r.value.open(i.value)};return c.onMounted(()=>{f()}),c.watch(()=>u.value,_=>{switch(_){case!0:{c.nextTick(()=>{var v,w;(v=i.value)==null||v.setValue(d.funcExpression),(w=i.value)==null||w.resize()});break}case!1:{r.value.close();break}}}),(_,v)=>{const w=yn,x=yS,S=ql,D=Ul,N=Ko,L=jl,E=c.resolveComponent("st-monacoEditor"),k=s1,A=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock("div",Aet,[c.createVNode(D,{modelValue:a.value,"onUpdate:modelValue":v[0]||(v[0]=R=>a.value=R),size:n.size,placeholder:"自定义函数",clearable:"",onChange:p,style:c.normalizeStyle({width:n.selectWidth})},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,R=>(c.openBlock(),c.createBlock(S,{key:R.id,label:R.funcName,value:R.funcName},{default:c.withCtx(()=>[c.createElementVNode("div",Iet,[c.createElementVNode("span",null,c.toDisplayString(R.funcName),1),c.createElementVNode("div",Ret,[c.createVNode(w,{onClick:c.withModifiers(B=>m(R),["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Sge))]),_:2},1032,["onClick"]),c.createVNode(x,{title:"确认是否删除?",onConfirm:B=>g(R)},{reference:c.withCtx(()=>[c.createVNode(w,{onClick:c.withModifiers(()=>{},["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(wge))]),_:1})]),_:2},1032,["onConfirm"])])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","size","style"]),c.createVNode(N,{type:"primary",size:n.size,onClick:b},{default:c.withCtx(()=>[c.createTextVNode(" 插入 ")]),_:1},8,["size"]),c.createVNode(N,{type:"primary",size:n.size,onClick:v[1]||(v[1]=R=>m())},{default:c.withCtx(()=>[c.createTextVNode(" 新建 ")]),_:1},8,["size"]),c.createVNode(k,{"modal-class":"add-or-edit-dialog",modelValue:u.value,"onUpdate:modelValue":v[4]||(v[4]=R=>u.value=R),width:"1000","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:R,titleClass:B})=>[c.createElementVNode("div",Oet,[c.createElementVNode("div",Fet,[c.createElementVNode("span",{id:R,class:c.normalizeClass(B)},c.toDisplayString(d.id?"编辑自定义函数":"新建自定义函数"),11,Pet)]),c.createElementVNode("div",Bet,[c.createVNode(N,{size:"small",type:"primary",onClick:C},{default:c.withCtx(()=>[c.createTextVNode(" 变量选择器 ")]),_:1}),c.createVNode(w,{onClick:v[2]||(v[2]=I=>u.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(xd))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",Het,[c.createVNode(N,{type:"primary",loading:h.value,onClick:y},{default:c.withCtx(()=>[c.createTextVNode(" 确定 ")]),_:1},8,["loading"])])]),default:c.withCtx(()=>[c.createElementVNode("div",Vet,[zet,c.createVNode(L,{modelValue:d.funcName,"onUpdate:modelValue":v[3]||(v[3]=R=>d.funcName=R),style:{width:"300px","margin-left":"10px"}},null,8,["modelValue"])]),c.createVNode(E,{ref_key:"stMonacoEditorRef",ref:i,language:"lua",style:{width:"968px",height:"400px"}},null,512)]),_:1},8,["modelValue"]),c.createVNode(A,{ref_key:"stVarSelectDialogRef",ref:r},null,512)])}}},[["__scopeId","data-v-44f08e3e"]]),Wet={install(n){n.component("st-customFunction",jet)}},dLt="",hLt="",fLt="",pLt="",gLt="",mLt="",bLt="",_Lt="",yLt="",vLt="",CLt="";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 $et={ruleFormPrice:!0,ruleFormMark:!0,tableStatus:!0,tableCreateTime:!0,tableMark:!0,tableEnable:!0},wLt="",xLt="",h_=n=>(c.pushScopeId("data-v-b57c57a6"),n=n(),c.popScopeId(),n),Uet={class:"st-factorWarning"},qet={class:"custom-header"},Ket=h_(()=>c.createElementVNode("span",{style:{"margin-right":"4px"}},"因子预警",-1)),Get={class:"factor-name"},Yet=["onClick"],Qet={class:"factor-name"},Zet=["onClick"],Xet={style:{display:"flex","align-items":"start"}},Jet={key:0,style:{flex:"1"}},ett=h_(()=>c.createElementVNode("span",{style:{margin:"0 5px"}},"~",-1)),ttt={key:0,style:{color:"#f56c6c"}},ntt={key:1,style:{color:"#67c23a"}},itt={key:0},rtt={key:1},ott={key:2},stt={class:"shortcut-title"},att=h_(()=>c.createElementVNode("span",null,"我的配置",-1)),ltt={class:"shortcut-config"},utt={key:1,class:"empty"},ctt={class:"shortcut-title"},dtt=h_(()=>c.createElementVNode("span",null,"新增配置",-1)),htt={class:"custom-footer"},ftt=In({__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($et,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=>({factorName:S,...l.value}))},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=m4(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=>{TH.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=SH,S=Ko,D=I6,N=Td,L=uV,E=R6,k=wH,A=jl,R=A6,B=GS,I=yS,T=KS,O=yn,P=rl,U=N6,Y=s1,$=Zx;return c.openBlock(),c.createElementBlock("div",Uet,[c.createVNode($,{locale:c.unref(qE)},{default:c.withCtx(()=>[c.createVNode(Y,{modelValue:i.value,"onUpdate:modelValue":w[17]||(w[17]=z=>i.value=z),width:"1020","align-center":"","destroy-on-close":"",onClosed:w[18]||(w[18]=z=>r("closed"))},{header:c.withCtx(({close:z,titleId:oe,titleClass:ue})=>[c.createElementVNode("div",qet,[c.createElementVNode("div",{class:c.normalizeClass(ue)},[Ket,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",htt,[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(R,{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,oe)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:oe},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",Get,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ue=>g(z.factorTypeName)},"+3",8,Yet)]))),128)):c.createCommentVNode("",!0),l.value.factorType===-1?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(n.emptyFactorOptions,(z,oe)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:oe},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",Qet,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ue=>g(z.factorTypeName)},"+3",8,Zet)]))),128)):c.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),c.createVNode(D,{label:"预警次数:",prop:"totalCount"},{default:c.withCtx(()=>[c.createElementVNode("div",Xet,[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",Jet,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.shortcutData,z=>(c.openBlock(),c.createBlock(S,{key:z.id,onClick:oe=>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"]),ett,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(T,{key:1,data:n.tableData,size:"small"},{default:c.withCtx(()=>[c.createVNode(B,{label:"预警周期",width:"70"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.freqName||"-"),1)]),_:1}),c.createVNode(B,{label:"交易类型",width:"70"},{default:c.withCtx(z=>[z.row.factorExtendValue==1?(c.openBlock(),c.createElementBlock("span",ttt,"多")):(c.openBlock(),c.createElementBlock("span",ntt,"空"))]),_:1}),c.createVNode(B,{label:"预警因子"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.factorExtendName||"-"),1)]),_:1}),c.createVNode(B,{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(B,{key:0,label:"状态",width:"70"},{default:c.withCtx(z=>[c.createElementVNode("div",null,[z.row.enable===1?(c.openBlock(),c.createElementBlock("span",itt,"未触发")):z.row.enable===2?(c.openBlock(),c.createElementBlock("span",rtt,"已触发")):(c.openBlock(),c.createElementBlock("span",ott,"-"))])]),_:1})):c.createCommentVNode("",!0),c.unref(s).tableCreateTime?(c.openBlock(),c.createBlock(B,{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(B,{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(B,{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:oe=>r("enabled",z.row)},{default:c.withCtx(()=>[c.createTextVNode(" 启用 ")]),_:2},1032,["disabled","onClick"])):c.createCommentVNode("",!0),c.createVNode(I,{title:"确定删除?",onConfirm:oe=>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",stt,[att,c.createVNode(P,{effect:"dark",content:"如有配置数据, 可点击查看该配置的具体信息",placement:"right-start"},{default:c.withCtx(()=>[c.createVNode(O,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:1})]),c.createElementVNode("div",ltt,[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:oe=>C(z),onClose:oe=>_(z)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(z.shortcutName),1)]),_:2},1032,["onClick","onClose"]))),128)):(c.openBlock(),c.createElementBlock("span",utt,"暂无数据"))]),c.createElementVNode("div",ctt,[dtt,c.createVNode(P,{effect:"dark",content:"同名配置将会进行覆盖",placement:"right-start"},{default:c.withCtx(()=>[c.createVNode(O,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:1})]),c.createVNode(R,{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,oe)=>(c.openBlock(),c.createBlock(N,{key:oe,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,oe)=>(c.openBlock(),c.createBlock(N,{key:oe,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-b57c57a6"]]),ptt={install(n){n.component("st-factorWarning",ftt)}},gtt=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))}}),DLt="",mtt=In(gtt,[["__scopeId","data-v-4c74604d"]]),btt={install(n){n.component("st-heatMap",mtt)}},NLt="",ELt="",_tt={class:"st-kline-tips"},ytt={class:"st-kline-tips-row"},vtt=c.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",_tt,[c.createElementVNode("div",ytt,[(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))])]))}}),kLt="",KE=In(vtt,[["__scopeId","data-v-78aed210"]]),Ctt=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))}}),LLt="",wtt=In(Ctt,[["__scopeId","data-v-249fd104"]]);var GE=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)),R(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"),R(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 gi=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(gi),Jc=new WebAssembly.Instance(lr,{e:{f:Ee}}),Xf=Jc.exports.f;return Xf}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 R(Ee,Te){Ee||fe("Assertion failed: "+Te)}function B(Ee){var Te=t["_"+Ee];return R(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 vd=0;if(_a!=null&&_a!==0){var ya=(_a.length<<2)+1;vd=Fe(ya),z(_a,vd,ya)}return vd},array:function(_a){var vd=Fe(_a.length);return oe(_a,vd),vd}};function Lt(_a){return Te==="string"?Y(_a):Te==="boolean"?!!_a:_a}var zt=B(Ee),nr=[],gi=0;if(tt)for(var lr=0;lr<tt.length;lr++){var Jc=Zt[Ue[lr]];Jc?(gi===0&&(gi=Xc()),nr[lr]=Jc(tt[lr])):nr[lr]=tt[lr]}var Xf=zt.apply(null,nr);return Xf=Lt(Xf),gi!==0&&Ga(gi),Xf}var T=1;function O(Ee,Te){var Ue;return Te==T?Ue=Fe(Ee.length):Ue=Uo(Ee.length),Ee.subarray||Ee.slice?re.set(Ee,Ue):re.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 gi=Lt-65536;Zt+=String.fromCharCode(55296|gi>>10,56320|gi&1023)}}return Zt}function Y(Ee,Te){return Ee?U(re,Ee,Te):""}function $(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 $(Ee,re,Te,Ue)}function oe(Ee,Te){X.set(Ee,Te)}var ue=65536,le,X,re;function he(Ee){le=Ee,t.HEAP8=X=new Int8Array(Ee),t.HEAP16=new Int16Array(Ee),t.HEAP32=new Int32Array(Ee),t.HEAPU8=re=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/ue,maximum:de/ue}),k&&(le=k.buffer),de=le.byteLength,he(le);var ve=new WebAssembly.Table({initial:1,element:"anyfunc"}),Me=[],ie=[],W=[],ee=[],te=!1;function J(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Z(t.preRun.shift());be(Me)}function ne(){te=!0,be(ie)}function G(){be(W)}function Q(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)F(t.postRun.shift());be(ee)}function Z(Ee){Me.unshift(Ee)}function F(Ee){ee.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={},Z(Rl);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:yd,wasi_snapshot_preview1:yd};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=Xc();try{return je(Ee,arguments[0],Array.prototype.slice.call(arguments,1))}catch(Ue){if(Ga(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 qa(Ee,Te){var Ue=new Uint32Array(new Uint8Array(Ee.subarray(0,24)).buffer);R(Ue[0]==1836278016,"need to see wasm magic number"),R(Ee[8]===0,"need the dylink section to be first");var tt=9;function Ut(){for(var ya=0,bg=1;;){var wh=Ee[tt++];if(ya+=(wh&127)*bg,bg*=128,!(wh&128))break}return ya}Ut(),R(Ee[tt]===6),tt++,R(Ee[tt]==="d".charCodeAt(0)),tt++,R(Ee[tt]==="y".charCodeAt(0)),tt++,R(Ee[tt]==="l".charCodeAt(0)),tt++,R(Ee[tt]==="i".charCodeAt(0)),tt++,R(Ee[tt]==="n".charCodeAt(0)),tt++,R(Ee[tt]==="k".charCodeAt(0)),tt++;var Zt=Ut(),Lt=Ut(),zt=Ut();Ut();for(var nr=Ut(),gi=[],lr=0;lr<nr;++lr){var Jc=Ut(),Xf=Ee.subarray(tt,tt+Jc);tt+=Jc;var _a=U(Xf,0);gi.push(_a)}function vd(){Lt=Math.pow(2,Lt),Lt=Math.max(Lt,_);var ya=v(Ni(Zt+Lt),Lt),bg=yd,wh=ve,HO=wh.length,dkt=wh;wh.grow(zt),R(wh===dkt);for(var Jf=ya;Jf<ya+Zt;Jf++)X[Jf]=0;for(var Jf=HO;Jf<HO+zt;Jf++)wh.set(Jf,null);var jO={},WO=function(_s,va,xh){xh&&(_s="orig$"+_s);var Ks=t.asm[_s];if(!Ks){var U8=ba(_s);Ks=t[U8],Ks||(Ks=jO[U8]),!Ks&&_s.startsWith("invoke_")&&(Ks=Dt(_s.split("_")[1]))}return Ks};for(var $O in t)$O in bg||(bg[$O]=t[$O]);var hkt={get:function(_s,va){switch(va){case"__memory_base":return ya;case"__table_base":return HO}if(va in _s)return _s[va];if(va.startsWith("g$")){var xh=va.substr(2);return _s[va]=function(){return WO(xh)}}if(va.startsWith("fp$")){var Ks=va.split("$");R(Ks.length==3);var xh=Ks[1],U8=Ks[2],pkt=U8.indexOf("j")>=0,UO=0;return _s[va]=function(){if(!UO){var gkt=WO(xh,"function",pkt);UO=N(gkt,U8)}return UO}}return _s[va]=function(){return WO(va).apply(null,arguments)}}},s0e=new Proxy(bg,hkt),a0e={global:{NaN:NaN,Infinity:1/0},"global.Math":Math,env:s0e,wasi_snapshot_preview1:s0e};function l0e(_s,va){var xh=$o(_s.exports,ya,va),Ks=xh.__post_instantiate;return Ks&&(te?Ks():ie.push(Ks)),xh}if(Te.loadAsync)return WebAssembly.instantiate(Ee,a0e).then(function(_s){return l0e(_s.instance,jO)});var fkt=new WebAssembly.Instance(new WebAssembly.Module(Ee),a0e);return l0e(fkt,jO)}return Te.loadAsync?Promise.all(gi.map(function(ya){return ms(ya,Te)})).then(function(){return vd()}):(gi.forEach(function(ya){ms(ya,Te)}),vd())}function Ka(Ee){return fetch(Ee,{credentials:"same-origin"}).then(function(Te){if(!Te.ok)throw"failed to load binary file at '"+Ee+"'";return Te.arrayBuffer()}).then(function(Te){return new Uint8Array(Te)})}function ms(Ee,Te){Ee=="__self__"&&!lt.loadedLibNames[Ee]&&(lt.loadedLibs[-1]={refcount:1/0,name:"__self__",module:t.asm,global:!0},lt.loadedLibNames.__self__=-1),Te=Te||{global:!0,nodelete:!0};var Ue=lt.loadedLibNames[Ee],tt;if(Ue)return tt=lt.loadedLibs[Ue],Te.global&&!tt.global&&(tt.global=!0,tt.module!=="loading"&&zt(tt.module)),Te.nodelete&&tt.refcount!==1/0&&(tt.refcount=1/0),tt.refcount++,Te.loadAsync?Promise.resolve(Ue):Ue;Ue=lt.nextHandle++,tt={refcount:Te.nodelete?1/0:1,name:Ee,module:"loading",global:Te.global},lt.loadedLibNames[Ee]=Ue,lt.loadedLibs[Ue]=tt;function Ut(gi){if(Te.fs){var lr=Te.fs.readFile(gi,{encoding:"binary"});return lr instanceof Uint8Array||(lr=new Uint8Array(lib_data)),Te.loadAsync?Promise.resolve(lr):lr}return Te.loadAsync?Ka(gi):m(gi)}function Zt(gi){return qa(gi,Te)}function Lt(){if(t.preloadedWasm!==void 0&&t.preloadedWasm[Ee]!==void 0){var gi=t.preloadedWasm[Ee];return Te.loadAsync?Promise.resolve(gi):gi}return Te.loadAsync?Ut(Ee).then(function(lr){return Zt(lr)}):Zt(Ut(Ee))}function zt(gi){for(var lr in gi)if(gi.hasOwnProperty(lr)){var Jc=ba(lr);t.hasOwnProperty(Jc)||(t[Jc]=gi[lr])}}function nr(gi){tt.global&&zt(gi),tt.module=gi}return Te.loadAsync?Lt().then(function(gi){return nr(gi),Ue}):(nr(Lt()),Ue)}function Rl(){var Ee=[];if(t.dynamicLibraries&&(Ee=Ee.concat(t.dynamicLibraries)),!!Ee.length){if(!m){K(),Promise.all(Ee.map(function(Te){return ms(Te,{loadAsync:!0,global:!0,nodelete:!0})})).then(function(){ae()});return}Ee.forEach(function(Te){ms(Te,{global:!0,nodelete:!0})})}}function bs(Ee,Te,Ue){re.copyWithin(Ee,Te,Te+Ue)}function Wu(Ee){fe("OOM")}function $u(Ee){Wu()}function Uu(){return t.___heap_base}ie.push({func:function(){ot()}},{func:function(){qu()}});var yd={__indirect_function_table:ve,__memory_base:1024,__stack_pointer:pe,__table_base:1,emscripten_memcpy_big:bs,emscripten_resize_heap:$u,g$__heap_base:Uu,memory:k};H();var qu=t.___wasm_call_ctors=function(){return(qu=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 Xc=t.stackSave=function(){return(Xc=t.stackSave=t.asm.stackSave).apply(null,arguments)},Ga=t.stackRestore=function(){return(Ga=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 ln in["TA_Globals","__data_end"])(function(Ee){t["g$"+Ee]=function(){return t[Ee]}})(ln);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);Pn(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&&(ne(),G(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),pi&&Qe(),Q()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),Te()},1)):Te()}t.run=at;function Pn(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 pi=!0;return t.noInitialRun&&(pi=!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 GE=GE;let c0;function dJ(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 xtt={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(!c0)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=dJ(c0,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=dJ(c0,s-o);return u.push(g),l.push(g.offset),{name:p,array:g}}),h=c0.ccall(t,"number",r,l);u.forEach(p=>c0._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] "+xtt[h])}var YE;(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"})(YE||(YE={}));function QE(n){return c0?Promise.resolve(c0):n&&typeof n!="string"?Promise.reject(new Error('Invalid argument, "init(wasmBinaryFilePath)" expects a string that specifies the location of wasm binary file')):GE({locateFile:n?()=>n:void 0}).then(t=>c0=t).catch(t=>{let i="TA-Lib WASM runtime init fail.";throw t&&t.message?i+=`
140
+ 入参: ${JSON.stringify(u.method==="post"?u.data:u.params)}`))}),{get:(a,l={},u={})=>s({method:"GET",url:`${nJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/get"}${a}`,params:l,...u}),post:(a,l={},u={})=>s({method:"POST",url:`${nJ(n)}${a.startsWith("/middleLayer/")?"":"/middleLayer/post"}${a}`,data:l,...u})}},fet=Object.freeze(Object.defineProperty({__proto__:null,initRequest:het},Symbol.toStringTag,{value:"Module"}));var pet=Object.defineProperty,get=(n,e,t)=>e in n?pet(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,g4=(n,e,t)=>get(n,typeof e!="symbol"?e+"":e,t);class iJ{constructor(e,t={}){g4(this,"dom"),g4(this,"resizeRo"),g4(this,"callback"),g4(this,"visibilitychangeFn"),g4(this,"timer"),g4(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 met=n=>new iJ(n),bet=Object.freeze(Object.defineProperty({__proto__:null,ResizeListener:iJ,addResizeListener:met},Symbol.toStringTag,{value:"Module"}));`${new Date().getTime()}${Math.floor(Math.random()*1e9)}`;const _et=n=>{n?IH("token",n):console.error("token不能为空")},yet=n=>{n?IH("userData",n):console.error("用户数据不能为空")},rJ=()=>RH("token"),oJ=n=>{const e=RH("userData");return n?e==null?void 0:e[n]:e},vet=()=>!!rJ(),Cet=()=>{const n=oJ();return(n==null?void 0:n.username)==="admin"},sJ=(n="")=>location.href=`${location.origin}/login/index.html?url=${encodeURIComponent(n||location.href)}`,wet=(n=!0,e)=>{if(OH("token"),OH("userData"),n){sJ();return}e&&(location.href=e)},xet=Object.freeze(Object.defineProperty({__proto__:null,getToken:rJ,getUserData:oJ,isAdmin:Cet,isLogin:vet,login:sJ,loginout:wet,setToken:_et,setUserData:yet},Symbol.toStringTag,{value:"Module"})),ml=cet,{initRequest:aJ}=fet,{addResizeListener:lJ}=bet,{setToken:$kt,setUserData:Det,getToken:uJ,getUserData:I2,isLogin:cJ,isAdmin:Ukt,login:Net,loginout:UE}=xet,m4=(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)}},Eet={__name:"index",props:{env:{type:Object,default:()=>({})}},setup(n){const e=r=>{const o=aJ(r,{handleReq:s=>{cJ()&&(s.headers.token=uJ())},handleRes:s=>{const{data:a}=s;if(a.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:UE(),!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")}},ket={install(n){n.component("st-configProvider",Eet)}},qkt="",Let=In({__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"]]),Met={install(n){n.component("st-contextmenu",Let)}},Gkt="",Ykt="",Qkt="",Zkt="",Xkt="",Jkt="",eLt="",tLt="",nLt="",iLt="",rLt="",oLt="",sLt="",aLt="",lLt="",uLt="",Tet=n=>(c.pushScopeId("data-v-3bed8389"),n=n(),c.popScopeId(),n),Aet={class:"custom-function"},Iet={class:"func-option"},Ret={class:"icons"},Oet={class:"custom-header"},Fet={class:"left"},Pet=["id"],Bet={class:"right"},Vet={style:{display:"flex","align-items":"center","margin-bottom":"10px"}},zet=Tet(()=>c.createElementVNode("span",null,"函数名称:",-1)),Het={class:"dialog-footer"},jet=In({__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=async()=>{const{body:_}=await t.post("/common/qt/querySearchFunctions");if(l.value=_??[],s.value===null)a.value="";else{const v=l.value.find(({id:w})=>w===s.value);a.value=v?v.funcName:""}},p=_=>{var v;_?s.value=(v=l.value.find(w=>w.funcName===_))==null?void 0:v.id:s.value=null},g=async _=>{await t.post("/common/qt/deleteSearchFunctionById",{id:_.id}),f()},m=_=>{switch(!!_){case!1:{Object.assign(d,{id:null,funcName:"",funcExpression:""});break}case!0:{Object.assign(d,{id:_.id,funcName:_.funcName,funcExpression:_.funcExpression});break}}u.value=!0},y=async()=>{try{if(h.value=!0,d.funcExpression=i.value.getValue(),!d.funcName)return mi.error("函数名称不可为空");if(!d.funcExpression)return mi.error("函数内容不可为空");await t.post("/common/qt/saveOrUpdateSearchFunction",d),mi.success("操作成功"),u.value=!1,await f()}finally{h.value=!1}},b=()=>{if(!a.value)return mi.error("请先选择自定义函数后, 再执行插入");o("insert",a.value)},C=()=>{r.value.open(i.value)};return c.onMounted(()=>{f()}),c.watch(()=>u.value,_=>{switch(_){case!0:{c.nextTick(()=>{var v,w;(v=i.value)==null||v.setValue(d.funcExpression),(w=i.value)==null||w.resize()});break}case!1:{r.value.close();break}}}),(_,v)=>{const w=yn,x=yS,S=ql,D=Ul,N=Ko,L=jl,E=c.resolveComponent("st-monacoEditor"),k=s1,A=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock("div",Aet,[c.createVNode(D,{modelValue:a.value,"onUpdate:modelValue":v[0]||(v[0]=R=>a.value=R),size:n.size,placeholder:"自定义函数",clearable:"",onChange:p,style:c.normalizeStyle({width:n.selectWidth})},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,R=>(c.openBlock(),c.createBlock(S,{key:R.id,label:R.funcName,value:R.funcName},{default:c.withCtx(()=>[c.createElementVNode("div",Iet,[c.createElementVNode("span",null,c.toDisplayString(R.funcName),1),c.createElementVNode("div",Ret,[c.createVNode(w,{onClick:c.withModifiers(B=>m(R),["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Sge))]),_:2},1032,["onClick"]),c.createVNode(x,{title:"确认是否删除?","confirm-button-text":"确认","cancel-button-text":"取消",onConfirm:B=>g(R)},{reference:c.withCtx(()=>[c.createVNode(w,{onClick:c.withModifiers(()=>{},["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(wge))]),_:1})]),_:2},1032,["onConfirm"])])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","size","style"]),c.createVNode(N,{type:"primary",size:n.size,onClick:b},{default:c.withCtx(()=>[c.createTextVNode(" 插入 ")]),_:1},8,["size"]),c.createVNode(N,{type:"primary",size:n.size,onClick:v[1]||(v[1]=R=>m())},{default:c.withCtx(()=>[c.createTextVNode(" 新建 ")]),_:1},8,["size"]),c.createVNode(k,{"modal-class":"add-or-edit-dialog",modelValue:u.value,"onUpdate:modelValue":v[4]||(v[4]=R=>u.value=R),width:"1000","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:R,titleClass:B})=>[c.createElementVNode("div",Oet,[c.createElementVNode("div",Fet,[c.createElementVNode("span",{id:R,class:c.normalizeClass(B)},c.toDisplayString(d.id?"编辑自定义函数":"新建自定义函数"),11,Pet)]),c.createElementVNode("div",Bet,[c.createVNode(N,{size:"small",type:"primary",onClick:C},{default:c.withCtx(()=>[c.createTextVNode(" 变量选择器 ")]),_:1}),c.createVNode(w,{onClick:v[2]||(v[2]=I=>u.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(xd))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",Het,[c.createVNode(N,{type:"primary",loading:h.value,onClick:y},{default:c.withCtx(()=>[c.createTextVNode(" 确定 ")]),_:1},8,["loading"])])]),default:c.withCtx(()=>[c.createElementVNode("div",Vet,[zet,c.createVNode(L,{modelValue:d.funcName,"onUpdate:modelValue":v[3]||(v[3]=R=>d.funcName=R),style:{width:"300px","margin-left":"10px"}},null,8,["modelValue"])]),c.createVNode(E,{ref_key:"stMonacoEditorRef",ref:i,language:"lua",style:{width:"968px",height:"400px"}},null,512)]),_:1},8,["modelValue"]),c.createVNode(A,{ref_key:"stVarSelectDialogRef",ref:r},null,512)])}}},[["__scopeId","data-v-3bed8389"]]),Wet={install(n){n.component("st-customFunction",jet)}},dLt="",hLt="",fLt="",pLt="",gLt="",mLt="",bLt="",_Lt="",yLt="",vLt="",CLt="";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 $et={ruleFormPrice:!0,ruleFormMark:!0,tableStatus:!0,tableCreateTime:!0,tableMark:!0,tableEnable:!0},wLt="",xLt="",h_=n=>(c.pushScopeId("data-v-b57c57a6"),n=n(),c.popScopeId(),n),Uet={class:"st-factorWarning"},qet={class:"custom-header"},Ket=h_(()=>c.createElementVNode("span",{style:{"margin-right":"4px"}},"因子预警",-1)),Get={class:"factor-name"},Yet=["onClick"],Qet={class:"factor-name"},Zet=["onClick"],Xet={style:{display:"flex","align-items":"start"}},Jet={key:0,style:{flex:"1"}},ett=h_(()=>c.createElementVNode("span",{style:{margin:"0 5px"}},"~",-1)),ttt={key:0,style:{color:"#f56c6c"}},ntt={key:1,style:{color:"#67c23a"}},itt={key:0},rtt={key:1},ott={key:2},stt={class:"shortcut-title"},att=h_(()=>c.createElementVNode("span",null,"我的配置",-1)),ltt={class:"shortcut-config"},utt={key:1,class:"empty"},ctt={class:"shortcut-title"},dtt=h_(()=>c.createElementVNode("span",null,"新增配置",-1)),htt={class:"custom-footer"},ftt=In({__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($et,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=>({factorName:S,...l.value}))},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=m4(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=>{TH.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=SH,S=Ko,D=I6,N=Td,L=uV,E=R6,k=wH,A=jl,R=A6,B=GS,I=yS,T=KS,O=yn,P=rl,U=N6,Y=s1,$=Zx;return c.openBlock(),c.createElementBlock("div",Uet,[c.createVNode($,{locale:c.unref(qE)},{default:c.withCtx(()=>[c.createVNode(Y,{modelValue:i.value,"onUpdate:modelValue":w[17]||(w[17]=z=>i.value=z),width:"1020","align-center":"","destroy-on-close":"",onClosed:w[18]||(w[18]=z=>r("closed"))},{header:c.withCtx(({close:z,titleId:oe,titleClass:ue})=>[c.createElementVNode("div",qet,[c.createElementVNode("div",{class:c.normalizeClass(ue)},[Ket,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",htt,[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(R,{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,oe)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:oe},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",Get,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ue=>g(z.factorTypeName)},"+3",8,Yet)]))),128)):c.createCommentVNode("",!0),l.value.factorType===-1?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(n.emptyFactorOptions,(z,oe)=>(c.openBlock(),c.createElementBlock("div",{class:"factor-checkbox",key:oe},[c.createVNode(N,{label:z.factorTypeName,value:z.factorTypeName},{default:c.withCtx(()=>[c.createElementVNode("span",Qet,c.toDisplayString(z.factorTypeName),1)]),_:2},1032,["label","value"]),c.createElementVNode("span",{class:"tag-button",onClick:ue=>g(z.factorTypeName)},"+3",8,Zet)]))),128)):c.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),c.createVNode(D,{label:"预警次数:",prop:"totalCount"},{default:c.withCtx(()=>[c.createElementVNode("div",Xet,[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",Jet,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.shortcutData,z=>(c.openBlock(),c.createBlock(S,{key:z.id,onClick:oe=>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"]),ett,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(T,{key:1,data:n.tableData,size:"small"},{default:c.withCtx(()=>[c.createVNode(B,{label:"预警周期",width:"70"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.freqName||"-"),1)]),_:1}),c.createVNode(B,{label:"交易类型",width:"70"},{default:c.withCtx(z=>[z.row.factorExtendValue==1?(c.openBlock(),c.createElementBlock("span",ttt,"多")):(c.openBlock(),c.createElementBlock("span",ntt,"空"))]),_:1}),c.createVNode(B,{label:"预警因子"},{default:c.withCtx(z=>[c.createTextVNode(c.toDisplayString(z.row.factorExtendName||"-"),1)]),_:1}),c.createVNode(B,{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(B,{key:0,label:"状态",width:"70"},{default:c.withCtx(z=>[c.createElementVNode("div",null,[z.row.enable===1?(c.openBlock(),c.createElementBlock("span",itt,"未触发")):z.row.enable===2?(c.openBlock(),c.createElementBlock("span",rtt,"已触发")):(c.openBlock(),c.createElementBlock("span",ott,"-"))])]),_:1})):c.createCommentVNode("",!0),c.unref(s).tableCreateTime?(c.openBlock(),c.createBlock(B,{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(B,{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(B,{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:oe=>r("enabled",z.row)},{default:c.withCtx(()=>[c.createTextVNode(" 启用 ")]),_:2},1032,["disabled","onClick"])):c.createCommentVNode("",!0),c.createVNode(I,{title:"确定删除?",onConfirm:oe=>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",stt,[att,c.createVNode(P,{effect:"dark",content:"如有配置数据, 可点击查看该配置的具体信息",placement:"right-start"},{default:c.withCtx(()=>[c.createVNode(O,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:1})]),c.createElementVNode("div",ltt,[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:oe=>C(z),onClose:oe=>_(z)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(z.shortcutName),1)]),_:2},1032,["onClick","onClose"]))),128)):(c.openBlock(),c.createElementBlock("span",utt,"暂无数据"))]),c.createElementVNode("div",ctt,[dtt,c.createVNode(P,{effect:"dark",content:"同名配置将会进行覆盖",placement:"right-start"},{default:c.withCtx(()=>[c.createVNode(O,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:1})]),c.createVNode(R,{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,oe)=>(c.openBlock(),c.createBlock(N,{key:oe,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,oe)=>(c.openBlock(),c.createBlock(N,{key:oe,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-b57c57a6"]]),ptt={install(n){n.component("st-factorWarning",ftt)}},gtt=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))}}),DLt="",mtt=In(gtt,[["__scopeId","data-v-4c74604d"]]),btt={install(n){n.component("st-heatMap",mtt)}},NLt="",ELt="",_tt={class:"st-kline-tips"},ytt={class:"st-kline-tips-row"},vtt=c.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",_tt,[c.createElementVNode("div",ytt,[(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))])]))}}),kLt="",KE=In(vtt,[["__scopeId","data-v-78aed210"]]),Ctt=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))}}),LLt="",wtt=In(Ctt,[["__scopeId","data-v-249fd104"]]);var GE=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)),R(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"),R(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 gi=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(gi),Jc=new WebAssembly.Instance(lr,{e:{f:Ee}}),Xf=Jc.exports.f;return Xf}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 R(Ee,Te){Ee||fe("Assertion failed: "+Te)}function B(Ee){var Te=t["_"+Ee];return R(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 vd=0;if(_a!=null&&_a!==0){var ya=(_a.length<<2)+1;vd=Fe(ya),z(_a,vd,ya)}return vd},array:function(_a){var vd=Fe(_a.length);return oe(_a,vd),vd}};function Lt(_a){return Te==="string"?Y(_a):Te==="boolean"?!!_a:_a}var zt=B(Ee),nr=[],gi=0;if(tt)for(var lr=0;lr<tt.length;lr++){var Jc=Zt[Ue[lr]];Jc?(gi===0&&(gi=Xc()),nr[lr]=Jc(tt[lr])):nr[lr]=tt[lr]}var Xf=zt.apply(null,nr);return Xf=Lt(Xf),gi!==0&&Ga(gi),Xf}var T=1;function O(Ee,Te){var Ue;return Te==T?Ue=Fe(Ee.length):Ue=Uo(Ee.length),Ee.subarray||Ee.slice?re.set(Ee,Ue):re.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 gi=Lt-65536;Zt+=String.fromCharCode(55296|gi>>10,56320|gi&1023)}}return Zt}function Y(Ee,Te){return Ee?U(re,Ee,Te):""}function $(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 $(Ee,re,Te,Ue)}function oe(Ee,Te){X.set(Ee,Te)}var ue=65536,le,X,re;function he(Ee){le=Ee,t.HEAP8=X=new Int8Array(Ee),t.HEAP16=new Int16Array(Ee),t.HEAP32=new Int32Array(Ee),t.HEAPU8=re=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/ue,maximum:de/ue}),k&&(le=k.buffer),de=le.byteLength,he(le);var ve=new WebAssembly.Table({initial:1,element:"anyfunc"}),Me=[],ie=[],W=[],ee=[],te=!1;function J(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Z(t.preRun.shift());be(Me)}function ne(){te=!0,be(ie)}function G(){be(W)}function Q(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)F(t.postRun.shift());be(ee)}function Z(Ee){Me.unshift(Ee)}function F(Ee){ee.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={},Z(Rl);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:yd,wasi_snapshot_preview1:yd};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=Xc();try{return je(Ee,arguments[0],Array.prototype.slice.call(arguments,1))}catch(Ue){if(Ga(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 qa(Ee,Te){var Ue=new Uint32Array(new Uint8Array(Ee.subarray(0,24)).buffer);R(Ue[0]==1836278016,"need to see wasm magic number"),R(Ee[8]===0,"need the dylink section to be first");var tt=9;function Ut(){for(var ya=0,bg=1;;){var wh=Ee[tt++];if(ya+=(wh&127)*bg,bg*=128,!(wh&128))break}return ya}Ut(),R(Ee[tt]===6),tt++,R(Ee[tt]==="d".charCodeAt(0)),tt++,R(Ee[tt]==="y".charCodeAt(0)),tt++,R(Ee[tt]==="l".charCodeAt(0)),tt++,R(Ee[tt]==="i".charCodeAt(0)),tt++,R(Ee[tt]==="n".charCodeAt(0)),tt++,R(Ee[tt]==="k".charCodeAt(0)),tt++;var Zt=Ut(),Lt=Ut(),zt=Ut();Ut();for(var nr=Ut(),gi=[],lr=0;lr<nr;++lr){var Jc=Ut(),Xf=Ee.subarray(tt,tt+Jc);tt+=Jc;var _a=U(Xf,0);gi.push(_a)}function vd(){Lt=Math.pow(2,Lt),Lt=Math.max(Lt,_);var ya=v(Ni(Zt+Lt),Lt),bg=yd,wh=ve,HO=wh.length,dkt=wh;wh.grow(zt),R(wh===dkt);for(var Jf=ya;Jf<ya+Zt;Jf++)X[Jf]=0;for(var Jf=HO;Jf<HO+zt;Jf++)wh.set(Jf,null);var jO={},WO=function(_s,va,xh){xh&&(_s="orig$"+_s);var Ks=t.asm[_s];if(!Ks){var U8=ba(_s);Ks=t[U8],Ks||(Ks=jO[U8]),!Ks&&_s.startsWith("invoke_")&&(Ks=Dt(_s.split("_")[1]))}return Ks};for(var $O in t)$O in bg||(bg[$O]=t[$O]);var hkt={get:function(_s,va){switch(va){case"__memory_base":return ya;case"__table_base":return HO}if(va in _s)return _s[va];if(va.startsWith("g$")){var xh=va.substr(2);return _s[va]=function(){return WO(xh)}}if(va.startsWith("fp$")){var Ks=va.split("$");R(Ks.length==3);var xh=Ks[1],U8=Ks[2],pkt=U8.indexOf("j")>=0,UO=0;return _s[va]=function(){if(!UO){var gkt=WO(xh,"function",pkt);UO=N(gkt,U8)}return UO}}return _s[va]=function(){return WO(va).apply(null,arguments)}}},s0e=new Proxy(bg,hkt),a0e={global:{NaN:NaN,Infinity:1/0},"global.Math":Math,env:s0e,wasi_snapshot_preview1:s0e};function l0e(_s,va){var xh=$o(_s.exports,ya,va),Ks=xh.__post_instantiate;return Ks&&(te?Ks():ie.push(Ks)),xh}if(Te.loadAsync)return WebAssembly.instantiate(Ee,a0e).then(function(_s){return l0e(_s.instance,jO)});var fkt=new WebAssembly.Instance(new WebAssembly.Module(Ee),a0e);return l0e(fkt,jO)}return Te.loadAsync?Promise.all(gi.map(function(ya){return ms(ya,Te)})).then(function(){return vd()}):(gi.forEach(function(ya){ms(ya,Te)}),vd())}function Ka(Ee){return fetch(Ee,{credentials:"same-origin"}).then(function(Te){if(!Te.ok)throw"failed to load binary file at '"+Ee+"'";return Te.arrayBuffer()}).then(function(Te){return new Uint8Array(Te)})}function ms(Ee,Te){Ee=="__self__"&&!lt.loadedLibNames[Ee]&&(lt.loadedLibs[-1]={refcount:1/0,name:"__self__",module:t.asm,global:!0},lt.loadedLibNames.__self__=-1),Te=Te||{global:!0,nodelete:!0};var Ue=lt.loadedLibNames[Ee],tt;if(Ue)return tt=lt.loadedLibs[Ue],Te.global&&!tt.global&&(tt.global=!0,tt.module!=="loading"&&zt(tt.module)),Te.nodelete&&tt.refcount!==1/0&&(tt.refcount=1/0),tt.refcount++,Te.loadAsync?Promise.resolve(Ue):Ue;Ue=lt.nextHandle++,tt={refcount:Te.nodelete?1/0:1,name:Ee,module:"loading",global:Te.global},lt.loadedLibNames[Ee]=Ue,lt.loadedLibs[Ue]=tt;function Ut(gi){if(Te.fs){var lr=Te.fs.readFile(gi,{encoding:"binary"});return lr instanceof Uint8Array||(lr=new Uint8Array(lib_data)),Te.loadAsync?Promise.resolve(lr):lr}return Te.loadAsync?Ka(gi):m(gi)}function Zt(gi){return qa(gi,Te)}function Lt(){if(t.preloadedWasm!==void 0&&t.preloadedWasm[Ee]!==void 0){var gi=t.preloadedWasm[Ee];return Te.loadAsync?Promise.resolve(gi):gi}return Te.loadAsync?Ut(Ee).then(function(lr){return Zt(lr)}):Zt(Ut(Ee))}function zt(gi){for(var lr in gi)if(gi.hasOwnProperty(lr)){var Jc=ba(lr);t.hasOwnProperty(Jc)||(t[Jc]=gi[lr])}}function nr(gi){tt.global&&zt(gi),tt.module=gi}return Te.loadAsync?Lt().then(function(gi){return nr(gi),Ue}):(nr(Lt()),Ue)}function Rl(){var Ee=[];if(t.dynamicLibraries&&(Ee=Ee.concat(t.dynamicLibraries)),!!Ee.length){if(!m){K(),Promise.all(Ee.map(function(Te){return ms(Te,{loadAsync:!0,global:!0,nodelete:!0})})).then(function(){ae()});return}Ee.forEach(function(Te){ms(Te,{global:!0,nodelete:!0})})}}function bs(Ee,Te,Ue){re.copyWithin(Ee,Te,Te+Ue)}function Wu(Ee){fe("OOM")}function $u(Ee){Wu()}function Uu(){return t.___heap_base}ie.push({func:function(){ot()}},{func:function(){qu()}});var yd={__indirect_function_table:ve,__memory_base:1024,__stack_pointer:pe,__table_base:1,emscripten_memcpy_big:bs,emscripten_resize_heap:$u,g$__heap_base:Uu,memory:k};H();var qu=t.___wasm_call_ctors=function(){return(qu=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 Xc=t.stackSave=function(){return(Xc=t.stackSave=t.asm.stackSave).apply(null,arguments)},Ga=t.stackRestore=function(){return(Ga=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 ln in["TA_Globals","__data_end"])(function(Ee){t["g$"+Ee]=function(){return t[Ee]}})(ln);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);Pn(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&&(ne(),G(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),pi&&Qe(),Q()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),Te()},1)):Te()}t.run=at;function Pn(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 pi=!0;return t.noInitialRun&&(pi=!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 GE=GE;let c0;function dJ(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 xtt={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(!c0)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=dJ(c0,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=dJ(c0,s-o);return u.push(g),l.push(g.offset),{name:p,array:g}}),h=c0.ccall(t,"number",r,l);u.forEach(p=>c0._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] "+xtt[h])}var YE;(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"})(YE||(YE={}));function QE(n){return c0?Promise.resolve(c0):n&&typeof n!="string"?Promise.reject(new Error('Invalid argument, "init(wasmBinaryFilePath)" expects a string that specifies the location of wasm binary file')):GE({locateFile:n?()=>n:void 0}).then(t=>c0=t).catch(t=>{let i="TA-Lib WASM runtime init fail.";throw t&&t.message?i+=`
141
141
  Error:
142
142
  `+t.message:i+="Unknown reason. Perhaps you specify the wrong file path to wasm binary?",new Error(i)})}let Stt=Re.ACCBANDS;function hJ(n){return Oe(Stt,n)}const Dtt=hJ;let Ntt=Re.ACOS;function fJ(n){return Oe(Ntt,n)}const Ett=fJ;let ktt=Re.AD;function pJ(n){return Oe(ktt,n)}const Ltt=pJ;let Mtt=Re.ADD;function gJ(n){return Oe(Mtt,n)}const Ttt=gJ;let Att=Re.ADOSC;function mJ(n){return Oe(Att,n)}const Itt=mJ;let Rtt=Re.ADX;function bJ(n){return Oe(Rtt,n)}const Ott=bJ;let Ftt=Re.ADXR;function _J(n){return Oe(Ftt,n)}const Ptt=_J;let Btt=Re.APO;function yJ(n){return Oe(Btt,n)}const Vtt=yJ;let ztt=Re.AROON;function vJ(n){return Oe(ztt,n)}const Htt=vJ;let jtt=Re.AROONOSC;function CJ(n){return Oe(jtt,n)}const Wtt=CJ;let $tt=Re.ASIN;function wJ(n){return Oe($tt,n)}const Utt=wJ;let qtt=Re.ATAN;function xJ(n){return Oe(qtt,n)}const Ktt=xJ;let Gtt=Re.ATR;function SJ(n){return Oe(Gtt,n)}const Ytt=SJ;let Qtt=Re.AVGDEV;function DJ(n){return Oe(Qtt,n)}const Ztt=DJ;let Xtt=Re.AVGPRICE;function NJ(n){return Oe(Xtt,n)}const Jtt=NJ;let ent=Re.BBANDS;function EJ(n){return Oe(ent,n)}const tnt=EJ;let nnt=Re.BETA;function kJ(n){return Oe(nnt,n)}const int=kJ;let rnt=Re.BOP;function LJ(n){return Oe(rnt,n)}const ont=LJ;let snt=Re.CCI;function MJ(n){return Oe(snt,n)}const ant=MJ;let lnt=Re.CDL2CROWS;function TJ(n){return Oe(lnt,n)}const unt=TJ;let cnt=Re.CDL3BLACKCROWS;function AJ(n){return Oe(cnt,n)}const dnt=AJ;let hnt=Re.CDL3INSIDE;function IJ(n){return Oe(hnt,n)}const fnt=IJ;let pnt=Re.CDL3LINESTRIKE;function RJ(n){return Oe(pnt,n)}const gnt=RJ;let mnt=Re.CDL3OUTSIDE;function OJ(n){return Oe(mnt,n)}const bnt=OJ;let _nt=Re.CDL3STARSINSOUTH;function FJ(n){return Oe(_nt,n)}const ynt=FJ;let vnt=Re.CDL3WHITESOLDIERS;function PJ(n){return Oe(vnt,n)}const Cnt=PJ;let wnt=Re.CDLABANDONEDBABY;function BJ(n){return Oe(wnt,n)}const xnt=BJ;let Snt=Re.CDLADVANCEBLOCK;function VJ(n){return Oe(Snt,n)}const Dnt=VJ;let Nnt=Re.CDLBELTHOLD;function zJ(n){return Oe(Nnt,n)}const Ent=zJ;let knt=Re.CDLBREAKAWAY;function HJ(n){return Oe(knt,n)}const Lnt=HJ;let Mnt=Re.CDLCLOSINGMARUBOZU;function jJ(n){return Oe(Mnt,n)}const Tnt=jJ;let Ant=Re.CDLCONCEALBABYSWALL;function WJ(n){return Oe(Ant,n)}const Int=WJ;let Rnt=Re.CDLCOUNTERATTACK;function $J(n){return Oe(Rnt,n)}const Ont=$J;let Fnt=Re.CDLDARKCLOUDCOVER;function UJ(n){return Oe(Fnt,n)}const Pnt=UJ;let Bnt=Re.CDLDOJI;function qJ(n){return Oe(Bnt,n)}const Vnt=qJ;let znt=Re.CDLDOJISTAR;function KJ(n){return Oe(znt,n)}const Hnt=KJ;let jnt=Re.CDLDRAGONFLYDOJI;function GJ(n){return Oe(jnt,n)}const Wnt=GJ;let $nt=Re.CDLENGULFING;function YJ(n){return Oe($nt,n)}const Unt=YJ;let qnt=Re.CDLEVENINGDOJISTAR;function QJ(n){return Oe(qnt,n)}const Knt=QJ;let Gnt=Re.CDLEVENINGSTAR;function ZJ(n){return Oe(Gnt,n)}const Ynt=ZJ;let Qnt=Re.CDLGAPSIDESIDEWHITE;function XJ(n){return Oe(Qnt,n)}const Znt=XJ;let Xnt=Re.CDLGRAVESTONEDOJI;function JJ(n){return Oe(Xnt,n)}const Jnt=JJ;let eit=Re.CDLHAMMER;function eee(n){return Oe(eit,n)}const tit=eee;let nit=Re.CDLHANGINGMAN;function tee(n){return Oe(nit,n)}const iit=tee;let rit=Re.CDLHARAMI;function nee(n){return Oe(rit,n)}const oit=nee;let sit=Re.CDLHARAMICROSS;function iee(n){return Oe(sit,n)}const ait=iee;let lit=Re.CDLHIGHWAVE;function ree(n){return Oe(lit,n)}const uit=ree;let cit=Re.CDLHIKKAKE;function oee(n){return Oe(cit,n)}const dit=oee;let hit=Re.CDLHIKKAKEMOD;function see(n){return Oe(hit,n)}const fit=see;let pit=Re.CDLHOMINGPIGEON;function aee(n){return Oe(pit,n)}const git=aee;let mit=Re.CDLIDENTICAL3CROWS;function lee(n){return Oe(mit,n)}const bit=lee;let _it=Re.CDLINNECK;function uee(n){return Oe(_it,n)}const yit=uee;let vit=Re.CDLINVERTEDHAMMER;function cee(n){return Oe(vit,n)}const Cit=cee;let wit=Re.CDLKICKING;function dee(n){return Oe(wit,n)}const xit=dee;let Sit=Re.CDLKICKINGBYLENGTH;function hee(n){return Oe(Sit,n)}const Dit=hee;let Nit=Re.CDLLADDERBOTTOM;function fee(n){return Oe(Nit,n)}const Eit=fee;let kit=Re.CDLLONGLEGGEDDOJI;function pee(n){return Oe(kit,n)}const Lit=pee;let Mit=Re.CDLLONGLINE;function gee(n){return Oe(Mit,n)}const Tit=gee;let Ait=Re.CDLMARUBOZU;function mee(n){return Oe(Ait,n)}const Iit=mee;let Rit=Re.CDLMATCHINGLOW;function bee(n){return Oe(Rit,n)}const Oit=bee;let Fit=Re.CDLMATHOLD;function _ee(n){return Oe(Fit,n)}const Pit=_ee;let Bit=Re.CDLMORNINGDOJISTAR;function yee(n){return Oe(Bit,n)}const Vit=yee;let zit=Re.CDLMORNINGSTAR;function vee(n){return Oe(zit,n)}const Hit=vee;let jit=Re.CDLONNECK;function Cee(n){return Oe(jit,n)}const Wit=Cee;let $it=Re.CDLPIERCING;function wee(n){return Oe($it,n)}const Uit=wee;let qit=Re.CDLRICKSHAWMAN;function xee(n){return Oe(qit,n)}const Kit=xee;let Git=Re.CDLRISEFALL3METHODS;function See(n){return Oe(Git,n)}const Yit=See;let Qit=Re.CDLSEPARATINGLINES;function Dee(n){return Oe(Qit,n)}const Zit=Dee;let Xit=Re.CDLSHOOTINGSTAR;function Nee(n){return Oe(Xit,n)}const Jit=Nee;let ert=Re.CDLSHORTLINE;function Eee(n){return Oe(ert,n)}const trt=Eee;let nrt=Re.CDLSPINNINGTOP;function kee(n){return Oe(nrt,n)}const irt=kee;let rrt=Re.CDLSTALLEDPATTERN;function Lee(n){return Oe(rrt,n)}const ort=Lee;let srt=Re.CDLSTICKSANDWICH;function Mee(n){return Oe(srt,n)}const art=Mee;let lrt=Re.CDLTAKURI;function Tee(n){return Oe(lrt,n)}const urt=Tee;let crt=Re.CDLTASUKIGAP;function Aee(n){return Oe(crt,n)}const drt=Aee;let hrt=Re.CDLTHRUSTING;function Iee(n){return Oe(hrt,n)}const frt=Iee;let prt=Re.CDLTRISTAR;function Ree(n){return Oe(prt,n)}const grt=Ree;let mrt=Re.CDLUNIQUE3RIVER;function Oee(n){return Oe(mrt,n)}const brt=Oee;let _rt=Re.CDLUPSIDEGAP2CROWS;function Fee(n){return Oe(_rt,n)}const yrt=Fee;let vrt=Re.CDLXSIDEGAP3METHODS;function Pee(n){return Oe(vrt,n)}const Crt=Pee;let wrt=Re.CEIL;function Bee(n){return Oe(wrt,n)}const xrt=Bee;let Srt=Re.CMO;function Vee(n){return Oe(Srt,n)}const Drt=Vee;let Nrt=Re.CORREL;function zee(n){return Oe(Nrt,n)}const Ert=zee;let krt=Re.COS;function Hee(n){return Oe(krt,n)}const Lrt=Hee;let Mrt=Re.COSH;function jee(n){return Oe(Mrt,n)}const Trt=jee;let Art=Re.DEMA;function Wee(n){return Oe(Art,n)}const Irt=Wee;let Rrt=Re.DIV;function $ee(n){return Oe(Rrt,n)}const Ort=$ee;let Frt=Re.DX;function Uee(n){return Oe(Frt,n)}const Prt=Uee;let Brt=Re.EMA;function qee(n){return Oe(Brt,n)}const Vrt=qee;let zrt=Re.EXP;function Kee(n){return Oe(zrt,n)}const Hrt=Kee;let jrt=Re.FLOOR;function Gee(n){return Oe(jrt,n)}const Wrt=Gee;let $rt=Re.HT_DCPERIOD;function Yee(n){return Oe($rt,n)}const Urt=Yee;let qrt=Re.HT_DCPHASE;function Qee(n){return Oe(qrt,n)}const Krt=Qee;let Grt=Re.HT_PHASOR;function Zee(n){return Oe(Grt,n)}const Yrt=Zee;let Qrt=Re.HT_SINE;function Xee(n){return Oe(Qrt,n)}const Zrt=Xee;let Xrt=Re.HT_TRENDLINE;function Jee(n){return Oe(Xrt,n)}const Jrt=Jee;let eot=Re.HT_TRENDMODE;function ete(n){return Oe(eot,n)}const tot=ete;let not=Re.IMI;function tte(n){return Oe(not,n)}const iot=tte;let rot=Re.KAMA;function nte(n){return Oe(rot,n)}const oot=nte;let sot=Re.LINEARREG;function ite(n){return Oe(sot,n)}const aot=ite;let lot=Re.LINEARREG_ANGLE;function rte(n){return Oe(lot,n)}const uot=rte;let cot=Re.LINEARREG_INTERCEPT;function ote(n){return Oe(cot,n)}const dot=ote;let hot=Re.LINEARREG_SLOPE;function ste(n){return Oe(hot,n)}const fot=ste;let pot=Re.LN;function ate(n){return Oe(pot,n)}const got=ate;let mot=Re.LOG10;function lte(n){return Oe(mot,n)}const bot=lte;let _ot=Re.MA;function ute(n){return Oe(_ot,n)}const yot=ute;let vot=Re.MACD;function cte(n){return Oe(vot,n)}const Cot=cte;let wot=Re.MACDEXT;function dte(n){return Oe(wot,n)}const xot=dte;let Sot=Re.MACDFIX;function hte(n){return Oe(Sot,n)}const Dot=hte;let Not=Re.MAMA;function fte(n){return Oe(Not,n)}const Eot=fte;let kot=Re.MAVP;function pte(n){return Oe(kot,n)}const Lot=pte;let Mot=Re.MAX;function gte(n){return Oe(Mot,n)}const Tot=gte;let Aot=Re.MAXINDEX;function mte(n){return Oe(Aot,n)}const Iot=mte;let Rot=Re.MEDPRICE;function bte(n){return Oe(Rot,n)}const Oot=bte;let Fot=Re.MFI;function _te(n){return Oe(Fot,n)}const Pot=_te;let Bot=Re.MIDPOINT;function yte(n){return Oe(Bot,n)}const Vot=yte;let zot=Re.MIDPRICE;function vte(n){return Oe(zot,n)}const Hot=vte;let jot=Re.MIN;function Cte(n){return Oe(jot,n)}const Wot=Cte;let $ot=Re.MININDEX;function wte(n){return Oe($ot,n)}const Uot=wte;let qot=Re.MINMAX;function xte(n){return Oe(qot,n)}const Kot=xte;let Got=Re.MINMAXINDEX;function Ste(n){return Oe(Got,n)}const Yot=Ste;let Qot=Re.MINUS_DI;function Dte(n){return Oe(Qot,n)}const Zot=Dte;let Xot=Re.MINUS_DM;function Nte(n){return Oe(Xot,n)}const Jot=Nte;let est=Re.MOM;function Ete(n){return Oe(est,n)}const tst=Ete;let nst=Re.MULT;function kte(n){return Oe(nst,n)}const ist=kte;let rst=Re.NATR;function Lte(n){return Oe(rst,n)}const ost=Lte;let sst=Re.OBV;function Mte(n){return Oe(sst,n)}const ast=Mte;let lst=Re.PLUS_DI;function Tte(n){return Oe(lst,n)}const ust=Tte;let cst=Re.PLUS_DM;function Ate(n){return Oe(cst,n)}const dst=Ate;let hst=Re.PPO;function Ite(n){return Oe(hst,n)}const fst=Ite;let pst=Re.ROC;function Rte(n){return Oe(pst,n)}const gst=Rte;let mst=Re.ROCP;function Ote(n){return Oe(mst,n)}const bst=Ote;let _st=Re.ROCR;function Fte(n){return Oe(_st,n)}const yst=Fte;let vst=Re.ROCR100;function Pte(n){return Oe(vst,n)}const Cst=Pte;let wst=Re.RSI;function Bte(n){return Oe(wst,n)}const xst=Bte;let Sst=Re.SAR;function Vte(n){return Oe(Sst,n)}const Dst=Vte;let Nst=Re.SAREXT;function zte(n){return Oe(Nst,n)}const Est=zte;let kst=Re.SIN;function Hte(n){return Oe(kst,n)}const Lst=Hte;let Mst=Re.SINH;function jte(n){return Oe(Mst,n)}const Tst=jte;let Ast=Re.SMA;function Wte(n){return Oe(Ast,n)}const Ist=Wte;let Rst=Re.SQRT;function $te(n){return Oe(Rst,n)}const Ost=$te;let Fst=Re.STDDEV;function Ute(n){return Oe(Fst,n)}const Pst=Ute;let Bst=Re.STOCH;function qte(n){return Oe(Bst,n)}const Vst=qte;let zst=Re.STOCHF;function Kte(n){return Oe(zst,n)}const Hst=Kte;let jst=Re.STOCHRSI;function Gte(n){return Oe(jst,n)}const Wst=Gte;let $st=Re.SUB;function Yte(n){return Oe($st,n)}const Ust=Yte;let qst=Re.SUM;function Qte(n){return Oe(qst,n)}const Kst=Qte;let Gst=Re.T3;function Zte(n){return Oe(Gst,n)}const Yst=Zte;let Qst=Re.TAN;function Xte(n){return Oe(Qst,n)}const Zst=Xte;let Xst=Re.TANH;function Jte(n){return Oe(Xst,n)}const Jst=Jte;let eat=Re.TEMA;function ene(n){return Oe(eat,n)}const tat=ene;let nat=Re.TRANGE;function tne(n){return Oe(nat,n)}const iat=tne;let rat=Re.TRIMA;function nne(n){return Oe(rat,n)}const oat=nne;let sat=Re.TRIX;function ine(n){return Oe(sat,n)}const aat=ine;let lat=Re.TSF;function rne(n){return Oe(lat,n)}const uat=rne;let cat=Re.TYPPRICE;function one(n){return Oe(cat,n)}const dat=one;let hat=Re.ULTOSC;function sne(n){return Oe(hat,n)}const fat=sne;let pat=Re.VAR;function ane(n){return Oe(pat,n)}const gat=ane;let mat=Re.WCLPRICE;function lne(n){return Oe(mat,n)}const bat=lne;let _at=Re.WILLR;function une(n){return Oe(_at,n)}const yat=une;let vat=Re.WMA;function cne(n){return Oe(vat,n)}const t5=Object.freeze(Object.defineProperty({__proto__:null,ACCBANDS:hJ,ACOS:fJ,AD:pJ,ADD:gJ,ADOSC:mJ,ADX:bJ,ADXR:_J,APO:yJ,AROON:vJ,AROONOSC:CJ,ASIN:wJ,ATAN:xJ,ATR:SJ,AVGDEV:DJ,AVGPRICE:NJ,BBANDS:EJ,BETA:kJ,BOP:LJ,CCI:MJ,CDL2CROWS:TJ,CDL3BLACKCROWS:AJ,CDL3INSIDE:IJ,CDL3LINESTRIKE:RJ,CDL3OUTSIDE:OJ,CDL3STARSINSOUTH:FJ,CDL3WHITESOLDIERS:PJ,CDLABANDONEDBABY:BJ,CDLADVANCEBLOCK:VJ,CDLBELTHOLD:zJ,CDLBREAKAWAY:HJ,CDLCLOSINGMARUBOZU:jJ,CDLCONCEALBABYSWALL:WJ,CDLCOUNTERATTACK:$J,CDLDARKCLOUDCOVER:UJ,CDLDOJI:qJ,CDLDOJISTAR:KJ,CDLDRAGONFLYDOJI:GJ,CDLENGULFING:YJ,CDLEVENINGDOJISTAR:QJ,CDLEVENINGSTAR:ZJ,CDLGAPSIDESIDEWHITE:XJ,CDLGRAVESTONEDOJI:JJ,CDLHAMMER:eee,CDLHANGINGMAN:tee,CDLHARAMI:nee,CDLHARAMICROSS:iee,CDLHIGHWAVE:ree,CDLHIKKAKE:oee,CDLHIKKAKEMOD:see,CDLHOMINGPIGEON:aee,CDLIDENTICAL3CROWS:lee,CDLINNECK:uee,CDLINVERTEDHAMMER:cee,CDLKICKING:dee,CDLKICKINGBYLENGTH:hee,CDLLADDERBOTTOM:fee,CDLLONGLEGGEDDOJI:pee,CDLLONGLINE:gee,CDLMARUBOZU:mee,CDLMATCHINGLOW:bee,CDLMATHOLD:_ee,CDLMORNINGDOJISTAR:yee,CDLMORNINGSTAR:vee,CDLONNECK:Cee,CDLPIERCING:wee,CDLRICKSHAWMAN:xee,CDLRISEFALL3METHODS:See,CDLSEPARATINGLINES:Dee,CDLSHOOTINGSTAR:Nee,CDLSHORTLINE:Eee,CDLSPINNINGTOP:kee,CDLSTALLEDPATTERN:Lee,CDLSTICKSANDWICH:Mee,CDLTAKURI:Tee,CDLTASUKIGAP:Aee,CDLTHRUSTING:Iee,CDLTRISTAR:Ree,CDLUNIQUE3RIVER:Oee,CDLUPSIDEGAP2CROWS:Fee,CDLXSIDEGAP3METHODS:Pee,CEIL:Bee,CMO:Vee,CORREL:zee,COS:Hee,COSH:jee,DEMA:Wee,DIV:$ee,DX:Uee,EMA:qee,EXP:Kee,FLOOR:Gee,HT_DCPERIOD:Yee,HT_DCPHASE:Qee,HT_PHASOR:Zee,HT_SINE:Xee,HT_TRENDLINE:Jee,HT_TRENDMODE:ete,IMI:tte,KAMA:nte,LINEARREG:ite,LINEARREG_ANGLE:rte,LINEARREG_INTERCEPT:ote,LINEARREG_SLOPE:ste,LN:ate,LOG10:lte,MA:ute,MACD:cte,MACDEXT:dte,MACDFIX:hte,MAMA:fte,get MAType(){return YE},MAVP:pte,MAX:gte,MAXINDEX:mte,MEDPRICE:bte,MFI:_te,MIDPOINT:yte,MIDPRICE:vte,MIN:Cte,MININDEX:wte,MINMAX:xte,MINMAXINDEX:Ste,MINUS_DI:Dte,MINUS_DM:Nte,MOM:Ete,MULT:kte,NATR:Lte,OBV:Mte,PLUS_DI:Tte,PLUS_DM:Ate,PPO:Ite,ROC:Rte,ROCP:Ote,ROCR:Fte,ROCR100:Pte,RSI:Bte,SAR:Vte,SAREXT:zte,SIN:Hte,SINH:jte,SMA:Wte,SQRT:$te,STDDEV:Ute,STOCH:qte,STOCHF:Kte,STOCHRSI:Gte,SUB:Yte,SUM:Qte,T3:Zte,TAN:Xte,TANH:Jte,TEMA:ene,TRANGE:tne,TRIMA:nne,TRIX:ine,TSF:rne,TYPPRICE:one,ULTOSC:sne,VAR:ane,WCLPRICE:lne,WILLR:une,WMA:cne,accBands:Dtt,acos:Ett,ad:Ltt,adOsc:Itt,add:Ttt,adx:Ott,adxr:Ptt,apo:Vtt,aroon:Htt,aroonOsc:Wtt,asin:Utt,atan:Ktt,atr:Ytt,avgDev:Ztt,avgPrice:Jtt,bbands:tnt,beta:int,bop:ont,cci:ant,cdl2Crows:unt,cdl3BlackCrows:dnt,cdl3Inside:fnt,cdl3LineStrike:gnt,cdl3Outside:bnt,cdl3StarsInSouth:ynt,cdl3WhiteSoldiers:Cnt,cdlAbandonedBaby:xnt,cdlAdvanceBlock:Dnt,cdlBeltHold:Ent,cdlBreakaway:Lnt,cdlClosingMarubozu:Tnt,cdlConcealBabysWall:Int,cdlCounterAttack:Ont,cdlDarkCloudCover:Pnt,cdlDoji:Vnt,cdlDojiStar:Hnt,cdlDragonflyDoji:Wnt,cdlEngulfing:Unt,cdlEveningDojiStar:Knt,cdlEveningStar:Ynt,cdlGapSideSideWhite:Znt,cdlGravestoneDoji:Jnt,cdlHammer:tit,cdlHangingMan:iit,cdlHarami:oit,cdlHaramiCross:ait,cdlHignWave:uit,cdlHikkake:dit,cdlHikkakeMod:fit,cdlHomingPigeon:git,cdlIdentical3Crows:bit,cdlInNeck:yit,cdlInvertedHammer:Cit,cdlKicking:xit,cdlKickingByLength:Dit,cdlLadderBottom:Eit,cdlLongLeggedDoji:Lit,cdlLongLine:Tit,cdlMarubozu:Iit,cdlMatHold:Pit,cdlMatchingLow:Oit,cdlMorningDojiStar:Vit,cdlMorningStar:Hit,cdlOnNeck:Wit,cdlPiercing:Uit,cdlRickshawMan:Kit,cdlRiseFall3Methods:Yit,cdlSeperatingLines:Zit,cdlShootingStar:Jit,cdlShortLine:trt,cdlSpinningTop:irt,cdlStalledPattern:ort,cdlStickSandwhich:art,cdlTakuri:urt,cdlTasukiGap:drt,cdlThrusting:frt,cdlTristar:grt,cdlUnique3River:brt,cdlUpsideGap2Crows:yrt,cdlXSideGap3Methods:Crt,ceil:xrt,cmo:Drt,correl:Ert,cos:Lrt,cosh:Trt,dema:Irt,div:Ort,dx:Prt,ema:Vrt,exp:Hrt,floor:Wrt,htDcPeriod:Urt,htDcPhase:Krt,htPhasor:Yrt,htSine:Zrt,htTrendMode:tot,htTrendline:Jrt,imi:iot,init:QE,kama:oot,linearReg:aot,linearRegAngle:uot,linearRegIntercept:dot,linearRegSlope:fot,ln:got,log10:bot,macd:Cot,macdExt:xot,macdFix:Dot,mama:Eot,max:Tot,maxIndex:Iot,medPrice:Oot,mfi:Pot,midPoint:Vot,midPrice:Hot,min:Wot,minIndex:Uot,minMax:Kot,minMaxIndex:Yot,minusDI:Zot,minusDM:Jot,mom:tst,movingAverage:yot,movingAverageVariablePeriod:Lot,mult:ist,natr:ost,obv:ast,plusDI:ust,plusDM:dst,ppo:fst,roc:gst,rocP:bst,rocR:yst,rocR100:Cst,rsi:xst,sar:Dst,sarExt:Est,sin:Lst,sinh:Tst,sma:Ist,sqrt:Ost,stdDev:Pst,stoch:Vst,stochF:Hst,stochRsi:Wst,sub:Ust,sum:Kst,t3:Yst,tan:Zst,tanh:Jst,tema:tat,trima:oat,trix:aat,trueRange:iat,tsf:uat,typPrice:dat,ultOsc:fat,variance:gat,wclPrice:bat,willR:yat,wma:cne},Symbol.toStringTag,{value:"Module"}));let dne=!1,hne=!0,fne=[];const pne=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}},Cat=async()=>{if(!dne)dne=!0,await QE("./talib.wasm"),hne=!1,fne.forEach(n=>{n()});else if(hne)return new Promise(n=>{fne.push(n)})},f_=(n,e)=>n.length>e?n.slice(n.length-e):n,wat=(n,e,t)=>n.calculationFn?n.calculationFn(t5,e,t):new Array(e.time.length).fill(null),xat=async(n,e,t)=>{const i=pne(n);let r=[];return r=pne(r),await Cat(),{originData:f_(n,t),kLine:f_(i.kLineData,t),time:f_(i.time,t),indicator:e.config.reduce((o,s)=>(o.push({key:s.key,color:s.color,data:f_(wat(s,i,r),t)}),o),[])}},ZE="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2M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==="true"&&console[t](`%c${n}`,`color:${i}`)},To=n=>n||n===0?Math.round(n*1e3)/1e3:null,Sat=n=>n>=1e12?`${(n/1e12).toFixed(2)}万亿`:n>=1e8?`${(n/1e8).toFixed(2)}亿`:n>=1e4?`${(n/1e4).toFixed(2)}万`:n.toFixed(2),Dat=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)}}}},Nat=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)}}}},Eat=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)}}}},p_=(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},kat=(n,e)=>n.reduce((t,i)=>{var d;const r=p_(i,"sellBuy"),o=n.filter(h=>h.time===i.time);let s="image://"+new URL(Object.assign({"./images/buy.svg":ZE,"./images/sell.svg":XE,"./images/t.svg":JE})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href;o.length>1?[...new Set(o.map(f=>p_(f,"sellBuy")))].length>1?s="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1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DIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":ZE,"./images/sell.svg":XE,"./images/t.svg":JE})[`./images/${r==="买"?"buy":"sell"}.svg`],self.location).href:s="image://"+new URL(Object.assign({"./images/buy.svg":ZE,"./images/sell.svg":XE,"./images/t.svg":JE})[`./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},[]),Lat=(n,e)=>n.reduce((t,i,r)=>{var h;const o=p_(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=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},[]),Mat=(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",()=>kat(o,e)],["openClose",()=>Lat(o,e)],["signal",()=>{}]]).get(r);return a instanceof Function&&t.push(...a()),t},[]),ek=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 xat(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}}}),_=Mat(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(To(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(B=>B.time===D.axisValue);let A=0,R=0;k.forEach(B=>{B.tradeType==="开多"||B.tradeType==="平空"?A+=B.amount:R+=B.amount}),A&&(S+=`<div>买: ${A}</div>`),R&&(S+=`<div>卖: ${R}</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=>To(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)"}}}},Tat=(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,Dat(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,Nat(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 R={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,Eat(R)]},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(R=>{x[R[1]]?x[R[1]]+=1:x[R[1]]=1});const S=w[w.length-1][1],D=w.reduce((R,B)=>R+B[1],0)/w.length,N=S-D,L=Iat(w,1,50),E=Rat(w),k=E?N/E:0,A=Aat(w,1,S);d=[...d,{type:"group",draggable:!1,children:Object.keys(x).map(R=>({type:"line",shape:{x1:t.getWidth()-r-100*x[R],y1:t.convertToPixel({yAxisIndex:0},R),x2:t.getWidth()-r,y2:t.convertToPixel({yAxisIndex:0},R)},style:{stroke:"rgb(124,124,124)",lineWidth:1},z:10}))},{type:"text",x:i+6,y:t.getHeight()-o-20,style:{fill:"#FFF",text:`均值: ${To(D)}    距均值: ${To(N)}    中值: ${To(L)}    标准差: ${To(E)}    距均值/标准差: ${To(k)}    百分位: ${To(A)}%`,lineWidth:1,opacity:1},z:10}]}}return{elements:d}},Aat=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=ml,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))},Iat=(n,e,t)=>{const{round:i,add:r,subtract:o,multiply:s,divide:a}=ml,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 Rat(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 Oat={class:"st-kline"},Fat={class:"st-kline-header"},Pat=300,Bat=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 R,B;if(r.value&&((B=(R=r.value.dataset[0])==null?void 0:R.source)!=null&&B.klineData[o.value])){const I=r.value.dataset[0].source.klineData[o.value],T=[],{open:O,heigh:P,low:U,close:Y,business:$,riseAndFall:z}=i.value.tipsConfig;if(O&&T.push({label:"开",value:To(I[0]),color:"rgb(153, 153, 153)"}),P&&T.push({label:"高",value:To(I[3]),color:"rgb(153, 153, 153)"}),U&&T.push({label:"低",value:To(I[2]),color:"rgb(153, 153, 153)"}),Y&&T.push({label:"收",value:To(I[1]),color:"rgb(153, 153, 153)"}),$&&T.push({label:"额",value:Sat(I[4]),color:"rgb(153, 153, 153)"}),z){let oe=((I[1]-I[5])/I[1]*100).toFixed(2),ue=+oe==0?"white":+oe>0?"red":"#00ff00";T.push({label:"涨跌",value:`${oe}%`,color:ue})}return T}return[]}),a=c.computed(()=>{var R,B;return r.value&&((B=(R=r.value.dataset[0])==null?void 0:R.source)!=null&&B.indicatorData)?r.value.dataset[0].source.indicatorData.reduce((I,T)=>(T.data[o.value]&&I.push({label:T.key,value:To(T.data[o.value]),color:T.color}),I),[]):[]}),l=c.computed(()=>{const R=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"];if(e.priceTrendData.length>0){const B=[];return e.priceTrendData.forEach((I,T)=>{var P;(I.data[o.value]?To(I.data[o.value][1]):null)!==null&&B.push({label:I.name,value:To((P=I.data[o.value])==null?void 0:P[1]),color:R[T]})}),B}if(e.priceTrendPercentData.length>0){const B=[];return m.getOption().series.filter(T=>T.name.includes("二腿价格走势百分比图")).forEach((T,O)=>{var U;(T.data[o.value]?To(T.data[o.value][1]):null)!==null&&B.push({label:T.name.split("-")[1],value:`${To((U=T.data[o.value])==null?void 0:U[1])}%`,color:R[O]})}),B}return[]});c.watch(()=>[e.klineData,e.indicator,e.markData,e.netPositionData,e.relevanceData],()=>{u()},{deep:!0}),c.watch(()=>e.lineData,async()=>{n5("st-kline组件消息:props.lineData监控,额外画线数据发生改变,重绘->line",{color:"red"}),u("line")},{deep:!0}),c.watch(()=>e.brushRange,async()=>{n5("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 R=>{const I=new Map([["kline",async()=>{const T=await ek(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData),{graphic:O}=m.getOption()??{graphic:[]};r.value={...T,graphic:O},m.setOption(r.value,!0),n5("st-kline组件消息:K线绘制完毕-draw",{color:"green"})}],["line",()=>{const T=m.getOption(),O=Tat(e.lineData,i.value,m);r.value={...T,graphic:O},m.setOption(r.value,{replaceMerge:["graphic"]}),n5("st-kline组件消息:额外画线绘制完毕-draw",{color:"green"})}],["brush",()=>{const{brushRange:T}=e;T instanceof Array&&T.length>0&&(m.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[T[0]+"",T[1]+""],xAxisIndex:0}]}),n5("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 T=m.getOption(),O=await ek(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData),P=O.dataset.source.klineData.length-T.dataset[0].source.klineData.length;m.setOption({...O,dataZoom:[{type:"inside",xAxisIndex:[0,0],zoomLock:i.value.zoomLock,maxValueSpan:i.value.maxValueSpan,startValue:T.dataZoom[0].startValue+P,endValue:T.dataZoom[0].endValue+P}]},!0),await u("priceTrend")}],["future",async()=>{const T=m.getOption(),O=await ek(e.klineData,e.markData,e.indicator,i.value,e.netPositionData,e.relevanceData);O.dataZoom[0].start=(e.klineData.length-T.dataZoom[0].endValue+T.dataZoom[0].startValue)/e.klineData.length*100,m.setOption(O,!0),await u("priceTrend")}],["priceTrend",()=>{if(e.priceTrendData.length===0)return;const T=m.getOption(),O=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],P=e.priceTrendData.reduce((U,Y,$)=>{const{name:z,data:oe}=Y,ue={name:`二腿价格走势图-${z}`,type:"line",data:oe,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[$]},lineStyle:{type:"dashed",width:1}};return U.push(ue),U},[]);r.value={...T,series:[...T.series,...P]},m.setOption(r.value,{replaceMerge:["series"]})}],["priceTrendPercent",async()=>{if(e.priceTrendPercentData.length===0)return;const T=m.getOption(),O=["#FFFFFF","#FFDD00","#FF00FF","#00FF00","#FF6000","#1677FF","#7C3CC9","#FF0000","#FB9A0E","#00B7FF"],P=T.dataZoom[0].startValue,U=e.priceTrendPercentData.reduce((Y,$,z)=>{const{name:oe,data:ue}=$,le=ue.length>i.value.totalBarCount?ue.slice(ue.length-i.value.totalBarCount):ue,X=le[P][1],re=le.map(pe=>[pe[0],(pe[1]-X)/X*100]),he={name:`二腿价格走势百分比图-${oe}`,type:"line",data:re,symbol:"none",yAxisIndex:1,connectNulls:!0,itemStyle:{color:O[z]},lineStyle:{type:"dashed",width:1}};return Y.push(he),Y},[]);T.series=[...T.series.filter(Y=>!Y.name.includes("二腿价格走势百分比图")),...U],m.setOption(T,!0)}]]).get(R);I instanceof Function&&await I()},d=c.ref(!1),h=c.ref([]),f=R=>{const{callBack:B}=R;B instanceof Function&&B(m,d)},p=()=>{h.value=e.defaultMenuData},g=c.ref();let m,y;const b=(R,B)=>{var I,T;if(R)o.value=typeof((I=R==null?void 0:R.batch[0])==null?void 0:I.dataIndex)=="number"?(T=R==null?void 0:R.batch[0])==null?void 0:T.dataIndex:-1;else{const O=B.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 R=>{const B=R.batch?R.batch[0].start*i.value.totalBarCount:R.startValue;i.value.dynamicLoadConfig.historyVisible&&B<=100&&!_&&!v.value&&(_=!0,await i.value.dynamicLoadConfig.historyLoadCallBack(v),await u("history"),_=!1);const I=R.batch?R.batch[0].end===100:R.endValue>=e.klineData.length-i.value.preBarCount-1,T=R.actionIsWheel;i.value.dynamicLoadConfig.futureVisible&&I&&!w&&!x.value&&!T&&(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},Pat)};let D=null;const N=R=>{D=setTimeout(()=>{var B;if(R.componentType==="graphic"){const{oncontextmenu:I}=((B=R.info)==null?void 0:B.event)??{};I instanceof Function&&I(R,R.info,h)}clearTimeout(D),D=null})},L=()=>{m.on("highlight",R=>{b(R,m)}),m.on("globalout",()=>{b(null,m)}),m.on("contextmenu",R=>{N(R)}),m.on("datazoom",R=>{S(R)})},E=()=>{m.off("highlight"),m.off("globalout"),m.off("contextmenu"),m.off("datazoom")},k=R=>{if(!m||!(R.ctrlKey||e.isSelect))return;const B=m.getOption();let{startValue:I,endValue:T,start:O,end:P}=B.dataZoom[0];const U=()=>{I!==0&&(I=I-1,T=T-1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:T,maxValueSpan:i.value.maxValueSpan}))},Y=()=>{if(i.value.dynamicLoadConfig.futureVisible&&!w&&!x.value)I=I+1,T=T+1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:T,maxValueSpan:i.value.maxValueSpan});else{if(T===B.xAxis[0].data.length-1)return;I=I+1,T=T+1,m.dispatchAction({type:"dataZoom",startValue:I,endValue:T,maxValueSpan:i.value.maxValueSpan})}},$=()=>{if(T-I<5)return;const le=Math.floor((o.value-I)/2)+1,X=Math.floor((T-o.value)/2)+1;I=I+le,T=T-X,m.dispatchAction({type:"dataZoom",startValue:I,endValue:T,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})},ue=new Map([["ArrowLeft",U],["ArrowRight",Y],["ArrowUp",$],["ArrowDown",z]]).get(R.code);ue instanceof Function&&ue()},A=async()=>{let R=!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(R){R=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}),(R,B)=>{const I=nz,T=tz;return c.openBlock(),c.createElementBlock("div",Oat,[c.createElementVNode("div",Fat,[c.createVNode(KE,{data:s.value},null,8,["data"]),c.createVNode(KE,{data:a.value},null,8,["data"]),c.createVNode(KE,{data:l.value},null,8,["data"])]),c.createVNode(wtt,{class:"st-kline-body",onCloseContextMenuCallBack:p},{popover:c.withCtx(()=>[c.createVNode(T,{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})])}}}),TLt="",ALt="",Vat=In(Bat,[["__scopeId","data-v-7f014d0e"]]),zat={class:"kline-tips"},Hat=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",zat,[(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))]))}}),ILt="",tk=In(Hat,[["__scopeId","data-v-dc7d381b"]]),RLt="",jat={class:"klineSub"},Wat={class:"klineSub-tips"},$at={key:0,class:"klineSub-tips-select"},Uat=In({__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}=ml;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=ql,m=Ul;return c.openBlock(),c.createElementBlock("div",jat,[c.createElementVNode("div",Wat,[d.value.length?(c.openBlock(),c.createElementBlock("div",$at,[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(tk,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-aba58678"]]),FLt="",qat={class:"kline-tips"},Kat=In({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=ml,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:e(l[0])},{label:"高",value:e(l[3])},{label:"低",value:e(l[2])},{label:"收",value:e(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",qat,[c.createVNode(tk,{data:r.value},null,8,["data"]),c.createVNode(tk,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-a12855fe"]]),Gat={__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}},BLt="",Yat=In({__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"]]),Qat={install(n){n.component("st-kline",Vat),n.component("st-kline-sub-new",Uat),n.component("st-kline-tips-new",Kat),n.component("st-kline-slide-new",Yat),n.component("st-kline-utils-new",Gat)}};let R2=null;const Zat=n=>{const e=aJ(n,{handleReq:t=>{cJ()&&(t.headers.token=uJ())},handleRes:t=>{const{data:i}=t;if(i.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:UE(),!0}});e.get,R2=e.post},Xat=n=>R2("/middleLayer/kline/getKlineBasic",{...n,userId:I2("id")}),Jat=n=>R2("/middleLayer/kline/getKline",n),elt=async n=>R2("/alarm/deliversign/addAlarmPrice",{...n,userId:I2("id")}),tlt=async n=>R2("/alarm/deliversign/findAlarmPriceByUserId",{...n,userId:I2("id")}),gne=async n=>R2("/alarm/deliversign/updateAlarmPrice",{...n,userId:I2("id")}),nlt=async n=>R2("/alarm/deliversign/deleteAlarmPrice",{...n,userId:I2("id")}),{round:i5}=ml,ilt=(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(i5(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=>i5(f.min),max:f=>i5(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)"}}}},rlt=(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:i5(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:i5(_,3),featureId:s,featureCode:o,featureType:a};await gne(v),mi.success("画线预警修改成功"),r&&r()}}}]},[])},olt={class:"kline-tips"},slt=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",olt,[(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))]))}}),zLt="",nk=In(slt,[["__scopeId","data-v-f83b6b36"]]),HLt="",alt={class:"kline-tips"},llt=In({__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(n){const{round:e,formatValue:t}=ml,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:e(l[0])},{label:"高",value:e(l[3])},{label:"低",value:e(l[2])},{label:"收",value:e(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",alt,[c.createVNode(nk,{data:r.value},null,8,["data"]),c.createVNode(nk,{data:o.value},null,8,["data"])]))}},[["__scopeId","data-v-64b5c2a3"]]),WLt="",ult={class:"klineSub"},clt={class:"klineSub-tips"},dlt={key:0,class:"klineSub-tips-select"},hlt=In({__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}=ml;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=ql,m=Ul;return c.openBlock(),c.createElementBlock("div",ult,[c.createElementVNode("div",clt,[d.value.length?(c.openBlock(),c.createElementBlock("div",dlt,[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(nk,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}},[["__scopeId","data-v-ab519de5"]]),flt=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))}}),ULt="",plt=In(flt,[["__scopeId","data-v-811db6b4"]]),qLt="",mne=n=>(c.pushScopeId("data-v-79254471"),n=n(),c.popScopeId(),n),glt={class:"klineBasic-tips"},mlt={key:0,class:"klineBasic-sub"},blt={key:1,class:"klineBasic-empty"},_lt={key:2,class:"klineBasic-error"},ylt=mne(()=>c.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),vlt={style:{"text-align":"center"}},Clt=mne(()=>c.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),wlt={class:"dialog-footer"},xlt=In({__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 $,z;return[h.variety,h.cycle,h.mainIndicator,b.value,($=h.indicatorStore)==null?void 0:$.filterIndicator,(z=h.indicatorStore)==null?void 0:z.customIndicator]},()=>{A()},{deep:!0}),c.onMounted(()=>{Zat(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=lJ(m.value),r.listen(()=>{requestAnimationFrame(()=>{o.resize()})}))},E=({code:$,ctrlKey:z})=>{if(!(z||f.value))return;const{xAxis:oe,dataZoom:ue}=o.getOption(),{data:le}=(oe==null?void 0:oe[0])??{data:[]};let{startValue:X,endValue:re}=(ue==null?void 0:ue[0])??{};if(le!=null&&le.length){switch($){case"ArrowUp":{if(re-X<5)return;const he=Math.floor((re-X)/2)+1;X=X+he,re-X<5&&(X=re-4);break}case"ArrowDown":{const he=Math.min(500,re-X);X=X-he-1;break}case"ArrowLeft":{X>0&&(X-=1,re-=1),C.value>0&&(C.value-=1);break}case"ArrowRight":{re<le.length-1&&(X+=1,re+=1),f.value&&C.value<le.length-1&&(C.value+=1);break}}o.dispatchAction({type:"dataZoom",startValue:X,endValue:re}),o.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:f.value?C.value:null}),o.dispatchAction({type:"highlight",dataIndex:f.value?C.value:re})}},k=()=>{o==null||o.on("datazoom",z=>{clearTimeout(a),a=setTimeout(()=>{var ue,le,X,re;const{loadCheckCounts:oe}=N.value;if((le=(ue=o==null?void 0:o.getOption())==null?void 0:ue.dataZoom)!=null&&le[0]){const{startValue:he}=(re=(X=o==null?void 0:o.getOption())==null?void 0:X.dataZoom)==null?void 0:re[0];he<oe&&l===!1&&u===!1&&(l=!0,R("history")),I()}clearTimeout(a)},100)}),o==null||o.on("highlight",z=>{var ue,le;let oe=z.dataIndex||-1;z.batch&&(oe=typeof((ue=z==null?void 0:z.batch[0])==null?void 0:ue.dataIndex)=="number"?(le=z==null?void 0:z.batch[0])==null?void 0:le.dataIndex:-1),clearTimeout(s),s=setTimeout(()=>{C.value=oe,clearTimeout(s)},20)}),o==null||o.on("globalout",()=>{var oe,ue,le;const z=(le=(ue=(oe=o==null?void 0:o.getOption())==null?void 0:oe.dataZoom)==null?void 0:ue[0])==null?void 0:le.endValue;C.value=z});let $=null;o==null||o.on("contextmenu",z=>{$=setTimeout(()=>{z.componentType==="graphic"&&(w.value=z.info,D.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout($),$=null})})},A=async()=>{var $,z,oe,ue,le,X;try{if(!h.variety||!h.cycle)return;const{variety:re,featureId:he,cycle:pe,indicatorStore:de,mainIndicator:ve,right:Me,startTime:ie,endTime:W}=h,{defaultShowCounts:ee,addCounts:te,showWarningLine:J,getFactorData:ne}=N.value,G={variety:re,featureId:he,cycle:pe,mainIndicatorList:de.getIndicatorParams(ve),subIndicator:b.value,right:Me,showWarningLine:J,getFactorData:ne};ie&&W?(G.startTime=ie,G.endTime=W):ie?(G.startTime=ie,G.limit=ee+te):W?(G.endTime=W,G.limit=ee+te):(G.endTime=bt().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),G.limit=ee+te);const Q=await Xat(G);if((oe=(z=($=Q==null?void 0:Q.body)==null?void 0:$.kline)==null?void 0:z.time)!=null&&oe.length)p.value=!1,g.value=!1;else{p.value=!0,g.value=!1;return}_.value=(ue=Q==null?void 0:Q.body)==null?void 0:ue.kline,v.value=((le=Q==null?void 0:Q.body)==null?void 0:le.warningLine)||[],B(),I(),ne&&d("getFactorData",(X=Q==null?void 0:Q.body)==null?void 0:X.factor)}catch(re){throw g.value=!0,p.value=!1,new Error(re)}},R=async $=>{const{variety:z,cycle:oe,indicatorStore:ue,mainIndicator:le,right:X}=h,{addCounts:re}=N.value,{time:he}=_.value;if($==="history"){const pe=await Jat({variety:z,cycle:oe,endTime:he[0],limit:re,mainIndicatorList:ue.getIndicatorParams(le),subIndicator:b.value,right:X});_.value={time:[...pe.body.time,..._.value.time.slice(1)],data:[...pe.body.data,..._.value.data.slice(1)],mainIndicator:_.value.mainIndicator.map((de,ve)=>({...de,data:[...pe.body.mainIndicator[ve].data,...de.data.slice(1)]})),subIndicator:_.value.subIndicator.map((de,ve)=>({...de,data:[...pe.body.subIndicator[ve].data,...de.data.slice(1)]}))},B(!0),pe.body.data.length<re&&(u=!0),l=!1}},B=($=!1)=>{var ve,Me,ie;L();const{time:z}=_.value,{gridRight:oe,gridLeft:ue,defaultShowCounts:le,maxShowCounts:X,showSubChart:re}=N.value;let he=z.length-1-le,pe=z.length-1;if($){const W=o.getOption(),ee=(Me=(ve=W==null?void 0:W.xAxis)==null?void 0:ve[0])==null?void 0:Me.data,te=(ie=W==null?void 0:W.dataZoom)==null?void 0:ie[0],J=ee[te==null?void 0:te.startValue],ne=ee[te==null?void 0:te.endValue];he=z.findIndex(G=>G===J),pe=z.findIndex(G=>G===ne)}const de=ilt(_.value,N.value,he,pe,h.cycle);if(o.setOption(de,!0),C.value=pe,h.brushRange){let W=null,ee=null;switch(h.cycle){case"6":{W=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")),ee=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":{W=z.find(te=>bt(te).day(5).format("YYYY-MM-DD")===bt(h.brushRange[0]).day(5).format("YYYY-MM-DD")),ee=z.findLast(te=>bt(te).day(5).format("YYYY-MM-DD")===bt(h.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{W=z.find(te=>bt(te).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[0]).endOf("month").format("YYYY-MM-DD")),ee=z.findLast(te=>bt(te).endOf("month").format("YYYY-MM-DD")===bt(h.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:W=z.find(te=>new Date(te).getTime()>=new Date(h.brushRange[0]).getTime()),ee=z.findLast(te=>new Date(te).getTime()<=new Date(h.brushRange[1]).getTime())}console.log(W,ee),o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[W,ee],xAxisIndex:0}]})}re&&y.value.draw({startValue:he,endValue:pe,maxValueSpan:X},{gridLeft:ue,gridRight:oe}),T()},I=()=>{if(!o)return;const $=o==null?void 0:o.getOption();$&&(o==null||o.setOption({...$,graphic:[...rlt(o,v.value,h,N.value,()=>{O()})]},!0),T())},T=()=>{const{time:$}=_.value;if(h.brushRange&&($!=null&&$.length)){let z=bt(h.brushRange[0]).format("YYYY-MM-DD 00:00:00"),oe=bt(h.brushRange[1]).format("YYYY-MM-DD 23:59:59"),ue=null,le=null;switch(h.cycle){case"6":{ue=$.find(X=>bt(X).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD")),le=ue;break}case"7":{ue=$.find(X=>bt(X).day(5).format("YYYY-MM-DD")===bt(z).day(5).format("YYYY-MM-DD")),le=$.findLast(X=>bt(X).day(5).format("YYYY-MM-DD")===bt(oe).day(5).format("YYYY-MM-DD"));break}case"8":{ue=$.find(X=>bt(X).endOf("month").format("YYYY-MM-DD")===bt(z).endOf("month").format("YYYY-MM-DD")),le=$.findLast(X=>bt(X).endOf("month").format("YYYY-MM-DD")===bt(oe).endOf("month").format("YYYY-MM-DD"));break}default:ue=$.find(X=>{const re=bt(X).format("YYYY-MM-DD")===bt(z).format("YYYY-MM-DD"),he=new Date(X).getTime()>=new Date(z).getTime();return re&&he}),le=$.findLast(X=>{const re=bt(X).format("YYYY-MM-DD")===bt(oe).format("YYYY-MM-DD"),he=new Date(X).getTime()<=new Date(oe).getTime();return re&&he})}o.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[ue,le],xAxisIndex:0}]})}},O=async()=>{const $=await tlt({featureId:h.featureId});v.value=($==null?void 0:$.body)||[],I(),d("change","warningLine",v.value)},P=async $=>{const{variety:z,varietyName:oe,featureId:ue,featureType:le}=h;if($.key==="drawWarningLine"){const X=o==null?void 0:o.getOption(),re=X.tooltip[0];o==null||o.setOption({...X,tooltip:{...re,axisPointer:{...re.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...re.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({...X,tooltip:{...re,axisPointer:{...re.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...re.axisPointer.label,backgroundColor:null}}}}),await elt({featureCode:z,featureName:oe,featureId:ue,featureType:le,warnPrice:ve}),mi.success("画线预警成功!"),O()};o==null||o.getZr().on("mousedown",he)}else $.key==="deleteWarningLine"?(await nlt({id:w.value.id}),mi.success("画线预警删除成功"),O()):$.key==="changeWarningLine"&&(x.value=!0,S.value=w.value.warnPrice)},U=async()=>{const{variety:$,varietyName:z,featureId:oe,featureType:ue}=h;await gne({id:w.value.id,featureCode:$,featureName:z,featureId:oe,featureType:ue,warnPrice:S.value}),mi.success("画线预警修改成功"),O()},Y=()=>{D.value=[...i]};return e({draw:($,z)=>{$==="warningLine"&&(v.value=z,I())}}),($,z)=>{var pe;const oe=nz,ue=tz,le=Kg,X=Ko,re=R6,he=s1;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",glt,[c.createVNode(llt,{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(plt,{onCloseContextMenuCallBack:Y},{popover:c.withCtx(()=>[c.createVNode(ue,{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(oe,{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",mlt,[c.createVNode(hlt,{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",blt,[c.createVNode(le,{class:"klineBasic-empty-content",description:"暂无数据"})])):c.createCommentVNode("",!0),g.value?(c.openBlock(),c.createElementBlock("div",_lt,[ylt,c.createElementVNode("div",vlt,[c.createVNode(X,{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",wlt,[c.createVNode(X,{onClick:z[4]||(z[4]=de=>x.value=!1)},{default:c.withCtx(()=>[c.createTextVNode("取消")]),_:1}),c.createVNode(X,{type:"primary",onClick:U},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[Clt,c.createVNode(re,{modelValue:S.value,"onUpdate:modelValue":z[3]||(z[3]=de=>S.value=de),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},[["__scopeId","data-v-79254471"]]),Slt={install(n){n.component("st-klineBasic",xlt)}},GLt="",YLt="",QLt="",Dlt=[{label:"买卖",value:0},{label:"开平",value:1}],g_=()=>({mainIndicator:"MA",sellBuy: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}),Nlt=(n,e)=>{var t;return((t=e.find(i=>i.value===n))==null?void 0:t.label)??"-"},ZLt="",hu=n=>(c.pushScopeId("data-v-da9cf1c8"),n=n(),c.popScopeId(),n),Elt={class:"kline-config element-dark"},klt={class:"setting-item"},Llt=hu(()=>c.createElementVNode("span",{class:"label"},"主图指标: ",-1)),Mlt={class:"setting-item"},Tlt=hu(()=>c.createElementVNode("span",{class:"label"},"交易点位: ",-1)),Alt={class:"setting-item"},Ilt=hu(()=>c.createElementVNode("span",{class:"label"},"单周期: ",-1)),Rlt={class:"setting-item"},Olt=hu(()=>c.createElementVNode("span",{class:"label"},"多周期: ",-1)),Flt={class:"mode"},Plt={class:"cycleName"},Blt={class:"content"},Vlt={class:"setting-item"},zlt=hu(()=>c.createElementVNode("span",{class:"label"},"默认展示: ",-1)),Hlt={class:"setting-item"},jlt=hu(()=>c.createElementVNode("span",{class:"label"},"高亮交易范围: ",-1)),Wlt={class:"setting-item"},$lt=hu(()=>c.createElementVNode("span",{class:"label"},"展示当屏时间: ",-1)),Ult={class:"setting-item"},qlt=hu(()=>c.createElementVNode("span",{class:"label"},"展示当屏最高价: ",-1)),Klt={class:"setting-item"},Glt=hu(()=>c.createElementVNode("span",{class:"label"},"多周期双击图表切换至单周期: ",-1)),Ylt={class:"setting-item"},Qlt=hu(()=>c.createElementVNode("span",{class:"label"},"开启副图: ",-1)),Zlt={class:"setting-item"},Xlt=hu(()=>c.createElementVNode("span",{class:"label"},"开启拖拽轴: ",-1)),Jlt={class:"setting-footer"},eut=In({__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,g_())},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,g_(),g?JSON.parse(g):{})}else{const g=localStorage.getItem("userKlineConfig");Object.assign(a,g_(),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??[]}),e({open:async()=>{await f(),s.value=!0},getDefaultUserKlineConfig:g_}),(g,m)=>{const y=LV,b=ql,C=Ul,_=SH,v=Y_e,w=Sd,x=Ko,S=m6e;return c.openBlock(),c.createElementBlock("div",Elt,[c.createVNode(S,{modelValue:s.value,"onUpdate:modelValue":m[11]||(m[11]=D=>s.value=D),title:"K线自定义配置",size:320},{default:c.withCtx(()=>[c.createVNode(w,{class:"setting-main"},{default:c.withCtx(()=>[c.createVNode(y,{style:{"margin-top":"8px"}},{default:c.withCtx(()=>[c.createTextVNode("偏好设置")]),_:1}),c.createElementVNode("div",klt,[Llt,c.createVNode(C,{modelValue:a.mainIndicator,"onUpdate:modelValue":m[0]||(m[0]=D=>a.mainIndicator=D),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,(D,N)=>(c.openBlock(),c.createBlock(b,{key:N,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Mlt,[Tlt,c.createVNode(C,{modelValue:a.sellBuy,"onUpdate:modelValue":m[1]||(m[1]=D=>a.sellBuy=D),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(Dlt),(D,N)=>(c.openBlock(),c.createBlock(b,{key:N,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Alt,[Ilt,c.createVNode(C,{modelValue:a.singelCycle,"onUpdate:modelValue":m[2]||(m[2]=D=>a.singelCycle=D),"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(D,N)=>(c.openBlock(),c.createBlock(b,{key:N,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",Rlt,[Olt,c.createVNode(_,{size:"small",modelValue:a.multiCycleNum,"onUpdate:modelValue":m[3]||(m[3]=D=>a.multiCycleNum=D),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),(D,N)=>(c.openBlock(),c.createElementBlock("div",Flt,[c.createElementVNode("div",Plt,[c.createElementVNode("span",null,c.toDisplayString(c.unref(Nlt)(a.multiCycleList[N],l.value)),1),c.createVNode(C,{modelValue:a.multiCycleList[N],"onUpdate:modelValue":L=>a.multiCycleList[N]=L,"popper-class":"element-dark"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,(L,E)=>(c.openBlock(),c.createBlock(b,{key:E,label:L.label,value:L.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),c.createElementVNode("span",Blt,c.toDisplayString(N+1)+"号位K线",1)]))),256))],2),c.createElementVNode("div",Vlt,[zlt,c.createVNode(_,{size:"small",modelValue:a.pageType,"onUpdate:modelValue":m[4]||(m[4]=D=>a.pageType=D),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",Hlt,[jlt,c.createVNode(v,{modelValue:a.enable_tradeLogBrush,"onUpdate:modelValue":m[5]||(m[5]=D=>a.enable_tradeLogBrush=D)},null,8,["modelValue"])]),c.createElementVNode("div",Wlt,[$lt,c.createVNode(v,{modelValue:a.enable_showScreenTimeRange,"onUpdate:modelValue":m[6]||(m[6]=D=>a.enable_showScreenTimeRange=D)},null,8,["modelValue"])]),c.createElementVNode("div",Ult,[qlt,c.createVNode(v,{modelValue:a.enable_showScreenMaxPrice,"onUpdate:modelValue":m[7]||(m[7]=D=>a.enable_showScreenMaxPrice=D)},null,8,["modelValue"])]),c.createElementVNode("div",Klt,[Glt,c.createVNode(v,{modelValue:a.enable_dbClickOpenSingel,"onUpdate:modelValue":m[8]||(m[8]=D=>a.enable_dbClickOpenSingel=D)},null,8,["modelValue"])]),c.createVNode(y,{style:{"margin-top":"44px"}},{default:c.withCtx(()=>[c.createTextVNode("组件开关")]),_:1}),c.createElementVNode("div",Ylt,[Qlt,c.createVNode(v,{modelValue:a.enable_subChart,"onUpdate:modelValue":m[9]||(m[9]=D=>a.enable_subChart=D)},null,8,["modelValue"])]),c.createElementVNode("div",Zlt,[Xlt,c.createVNode(v,{modelValue:a.enable_sliderChart,"onUpdate:modelValue":m[10]||(m[10]=D=>a.enable_sliderChart=D)},null,8,["modelValue"])])]),_:1}),c.createElementVNode("div",Jlt,[c.createVNode(x,{onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 恢复默认 ")]),_:1}),c.createVNode(x,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode(" 保存配置 ")]),_:1})])]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-da9cf1c8"]]),tut={install(n){n.component("st-klineConfig",eut)}},nut=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 QE("./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(t5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}).slice(L,E):[]}}),D=g.find(({value:k})=>k===p).config.reduce((k,A)=>{const{source:R,calculationFn:B}=A;return R==="calculation"?[...k,{...A,data:B?B(t5,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,R)=>(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],R===0?0:l[R-1][4],A[6]]),l.length>=m+y-1?R>=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(t5,N,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],x.length)}));let k=[];return h&&f&&(k=f.find(R=>R.value===h).config.reduce((R,B)=>B.source==="calculation"?[...R,{...B,data:o(B.calculationFn?B.calculationFn(t5,N):[],x.length)}]:R,[])),a.length?g={originData:[...D,...a.originData],xAxisData:[...x,...a.xAxisData],candlestickData:[...S,...a.candlestickData],mainIndicatorData:a.mainIndicatorData.map((A,R)=>({...A,data:[...E[R].data,...A.data]})),subIndicatorData:a.subIndicatorData.map((A,R)=>({...A,data:[...k[R].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}}),iut={class:"kline-tips"},rut=c.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",iut,[(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))]))}}),JLt="",ik=In(rut,[["__scopeId","data-v-2a02e841"]]),out={class:"kline-tips"},sut=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}=ml,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:e(h[d][0])},{label:"高",value:e(h[d][3])},{label:"低",value:e(h[d][2])},{label:"收",value:e(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:e(f[0])},{label:"高",value:e(f[3])},{label:"低",value:e(f[2])},{label:"收",value:e(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",out,[c.createVNode(ik,{data:a.value},null,8,["data"]),c.createVNode(ik,{data:l.value},null,8,["data"])]))}}),eMt="",aut=In(sut,[["__scopeId","data-v-234f3f41"]]),lut={class:"klineSub"},uut={class:"klineSub-tips"},cut={key:0,class:"klineSub-tips-select"},dut=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}=ml;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=ql,m=Ul;return c.openBlock(),c.createElementBlock("div",lut,[c.createElementVNode("div",uut,[d.value.length?(c.openBlock(),c.createElementBlock("div",cut,[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(ik,{data:d.value},null,8,["data"])]),c.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:l},null,512)])}}}),tMt="",hut=In(dut,[["__scopeId","data-v-0a2f256e"]]),fut=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))}}),nMt="",put=In(fut,[["__scopeId","data-v-5008746a"]]),gut={install(n){n.component("st-klineUtils",nut),n.component("st-klineSub",hut),n.component("st-klineTips",aut),n.component("st-klineSlide",put)}},iMt="",mut="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LT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jcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",{round:yut}=ml,O2={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},bne=({startTime:n,endTime:e,cycle:t,type:i="end"})=>{const{maxValueSpan:r}=O2,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")]}},Cut=(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"}},wut=(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:Cut(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:O2.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(yut(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}},_ne=(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},yne=(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)]}),rk=(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=_ne(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}`)}},ok=(n,e,t)=>{let i=null,r=null;const[o,s]=e;switch(t){case"6":{i=n.find(a=>new Date(bt(a).format("YYYY-MM-DD 23:59:59")).getTime()>=new Date(o).getTime()),r=n.findLast(a=>new Date(bt(a).format("YYYY-MM-DD 00:00:00")).getTime()<=new Date(s).getTime());break}case"7":{const a=bt(s).endOf("week").add(1,"day").format("YYYY-MM-DD 23:59:59");i=n.find(l=>bt(l).endOf("week").add(1,"day").format("YYYY-MM-DD")===bt(o).endOf("week").add(1,"day").format("YYYY-MM-DD")),r=n.findLast(l=>new Date(l).getTime()<=new Date(a).getTime());break}case"8":{i=n.find(a=>bt(a).format("YYYY-MM")===bt(o).format("YYYY-MM")),r=n.findLast(a=>bt(a).format("YYYY-MM")===bt(s).format("YYYY-MM"));break}default:i=n.find(a=>new Date(a).getTime()>=new Date(o).getTime()),r=n.findLast(a=>new Date(a).getTime()<=new Date(s).getTime())}return[i,r]},xut=(n,e,t,i,r)=>{const o=(f,p)=>{const{direction:g="",tradeAction:m="",tradeType:y=""}=f,b=y??g+m;switch(p){case 0:return new Map([["开多","买"],["平多","卖"],["开空","卖"],["平空","买"]]).get(b);case 1:return y??g+m}},s=(f,p,g,m)=>f.reduce((y,b)=>{var D;const C=o(b,0),_=f.filter(N=>N.klineTime===b.klineTime),v=[...new Set(_.map(N=>o(N,0)))];let w=null;v.length>1?w="image://"+new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Lj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DAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",self.location).href:w="image://"+new URL(Object.assign({"./images/buy.svg":mut,"./images/sell.svg":but,"./images/t.svg":_ut})[`./images/${C==="买"?"buy":"sell"}.svg`],self.location).href;const x=_ne(g,b.klineTime),S=(D=m[x])==null?void 0:D[3];return p.forEach(N=>{var E;const L=C==="买"?0:1;N.range[L]===b.klineTime&&(N.rangeValue[L]=(E=m[x])==null?void 0:E[C==="买"?2:3])}),y.push({symbol:w,symbolSize:25,symbolRotate:0,symbolOffset:[0,0],label:{show:!1,position:"top"},coord:[b.klineTime,S],silent:!0,animation:!1,customData:{tradeType:C,amount:b.amount,part:b.part,profitAndLoss:b.profitAndLoss,openPriceAll:b.openPriceAll,closePriceAll:b.closePriceAll}}),y},[]),a=(f,p,g,m)=>f.reduce((y,b,C)=>{const _=o(b,1),v=["开多","开空"].includes(_)?"top":"bottom",w=v==="top"?(b.openPriceAll/b.amount).toFixed(2):(b.closePriceAll/b.amount).toFixed(2);return p.forEach(x=>{(v==="top"?x.range[0]:x.range[1])===b.klineTime&&(x.rangeValue[v==="top"?0:1]=w)}),y.push({symbol:"triangle",symbolSize:[10,12],symbolRotate:v==="top"?180:0,symbolOffset:[0,0],label:{show:!0,position:v,color:"#fff",formatter:`${_} ${v==="top"?"+":"-"} ${b.amount}手 ${b.part?`(${b.part}份)`:""}`},itemStyle:{color:v==="top"?"#FF0000":"#389e0d"},coord:[b.klineTime,w],silent:!0,animation:!1,customData:{tradeType:_,amount:b.amount,part:b.part,profitAndLoss:b.profitAndLoss,openPriceAll:b.openPriceAll,closePriceAll:b.closePriceAll}}),y},[]),l=(f,p,g)=>{const{basePointData:m,baseLineData:y}=f.reduce((v,w)=>{const x={pointTime:w.openTime,tradeAction:"开",tradeDirection:w.tradeDirection?"空":"多",tradeType:`开${w.tradeDirection?"空":"多"}`,part:null,amount:w.tradeVolume,profitAndLoss:w.profitAndLoss,openPriceAll:w.openPrice*w.tradeVolume,closePriceAll:w.closePrice*w.tradeVolume,klineTime:rk(g,w.openTime,p)},S={pointTime:w.closeTime,tradeAction:"平",tradeDirection:w.tradeDirection?"空":"多",tradeType:`平${w.tradeDirection?"空":"多"}`,part:null,amount:w.tradeVolume,profitAndLoss:w.profitAndLoss,openPriceAll:w.openPrice*w.tradeVolume,closePriceAll:w.closePrice*w.tradeVolume,klineTime:rk(g,w.closeTime,p)},D={range:[x.klineTime,S.klineTime],rangeValue:[null,null],color:S.profitAndLoss>0?"#FF0000":"#389e0d"};return v.basePointData.push(x,S),v.baseLineData.push(D),v},{basePointData:[],baseLineData:[]}),C=[...m.reduce((v,w)=>{const x=JSON.parse(JSON.stringify(w)),S=x.klineTime+x.tradeType;if(v.has(S)){const D=v.get(S);x.amount+=D.amount,x.part+=D.part,x.profitAndLoss+=D.profitAndLoss,x.openPriceAll+=D.openPriceAll,x.closePriceAll+=D.closePriceAll}return v.set(S,x),v},new Map([])).values()].sort((v,w)=>new Date(v.klineTime)-new Date(w.klineTime)),_=y.filter(({range:v})=>v[0]!==v[1]);return{pointData:C,lineData:_}},{pointData:u,lineData:d}=l(n,e,i);return{tradePointData:(t===0?s:a)(u,d,i,r),tradeLineData:d.map(({range:f,rangeValue:p,color:g})=>[{symbol:"none",coord:[f[0],p[0]],lineStyle:{color:g,width:2,type:"solid"},silent:!0,animation:!1},{symbol:"none",coord:[f[1],p[1]],silent:!0,animation:!1}])}},Sut=(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}},Dut=(n,e,t,i)=>{let r=[];if(["6","7","8"].includes(e)){const o=n.reduce((s,a)=>{const l=rk(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}},rMt="",Nut={class:"tips"},sk=In({__name:"Tips",props:{data:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Nut,[(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"]]),sMt="",Eut=In({__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=m4(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=m4(({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:m4(()=>r.resize(),100)}),(p,g)=>(c.openBlock(),c.createElementBlock("div",{class:"chart",ref_key:"sliderChartRef",ref:o},null,512))}},[["__scopeId","data-v-0c715da1"]]),lMt="",kut={class:"main-chart"},Lut={class:"indicator"},Mut={key:0,class:"screen-time-range"},Tut={key:0,class:"sub-chart"},Aut={class:"indicator"},Iut={class:"title"},Rut={key:1,class:"slider-chart"},Out=In({__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}=ml,{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:t(O[0])},{label:"高",value:t(O[3])},{label:"低",value:t(O[2])},{label:"收",value:t(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",m4(O=>{var P;O.dataIndex?_.value=O.dataIndex:_.value=((P=O.batch)==null?void 0:P[0].dataIndex)??-1},10)),m.on("datazoom",m4(async()=>{var Y;const{loadCheckCount:O}=O2,{startValue:P,endValue:U}=((Y=m.getOption())==null?void 0:Y.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(),B()})),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",T),l.userKlineConfig.enable_subChart&&(g=qr.init(y.value),qr.connect([m,g])),p=lJ(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:Y}=await r.post("/middleLayer/kline/getKline",U);C.value=Y??{data:[],mainIndicator:[],subIndicator:[],time:[]};let $=-1,z=-1;for(let oe=0;oe<C.value.time.length;oe++){const ue=bt(C.value.time[oe]).format("YYYY-MM-DD");if($!==-1&&z!==-1)break;$===-1&&(new Date(ue)===new Date(O)?$=oe:new Date(ue)>new Date(O)&&($=oe-1)),z===-1&&(new Date(ue)===new Date(P)?z=oe:new Date(ue)>new Date(P)&&(z=oe-1))}z===-1&&(z=C.value.time.length-1),R({startValue:$===-1?0:$,endValue:z===-1?C.value.time.length-1:z})}finally{s.value=!1}},k=async O=>{var ue,le;const{loadAddCount:P}=O2;switch(O){case"history":{h=!0;const X={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:re}=await r.post("/middleLayer/kline/getKline",X);C.value=yne(re,C.value),re.data.length<P&&(console.log("[K线] 获取更多数据: 左侧已全部获取完毕, 关闭"),f=!0),h=!1;break}case"new":{u=!0;const X={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:re}=await r.post("/middleLayer/kline/getKline",X);C.value=yne(C.value,re),re.data.length<P&&(console.log("[K线] 获取更多数据: 右侧已全部获取完毕, 关闭"),d=!0),u=!1;break}}const{startValue:U,endValue:Y}=((ue=m.getOption())==null?void 0:ue.dataZoom[0])??{},$=(le=m.getOption())==null?void 0:le.xAxis[0].data,z=C.value.time.findIndex(X=>new Date(X)>=new Date($[U])),oe=C.value.time.findIndex(X=>new Date(X)>=new Date($[Y]));R({startValue:z===-1?0:z,endValue:oe===-1?C.value.time.length-1:oe})},A=()=>{var z;if(!C.value.time.length)return v.value=[];const{time:O}=C.value,{startValue:P,endValue:U}=((z=m.getOption())==null?void 0:z.dataZoom[0])??{},Y=O[P],$=O[U];["6","7","8"].includes(l.cycle)?v.value=[bt(Y).format("YYYY-MM-DD"),bt($).format("YYYY-MM-DD")]:v.value=[Y,$]},R=(O={startValue:0,endValue:0})=>{L();const{maxValueSpan:P}=O2,{time:U,data:Y,mainIndicator:$}=C.value,z=O.endValue-O.startValue>P?O.endValue-P:O.startValue,oe=O.endValue,ue=$.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}=Sut(l.netPositionData,l.cycle),{tradeIncomeRateLineData:X}=Dut(l.tradeIncomeRateData,l.cycle,l.incomeType,U),{tradePointData:re,tradeLineData:he}=xut(l.tradeLog,l.cycle,l.sellBuy,U,Y);m.setOption({animation:!1,grid:{top:"40px",left:"60px",right:"20px",bottom:"20px"},dataZoom:[{type:"inside",startValue:z,endValue:oe,minValueSpan:O2.minValueSpan,maxValueSpan:O2.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(Me=>{if(Me.seriesName==="netPosition"&&Me.data!==null&&(de+=`<div>资产持仓净值: ${Me.data[1]}</div>`),Me.componentSubType==="candlestick")if(l.sellBuy===0){const ie=re.filter(te=>(te==null?void 0:te.coord[0])===Me.axisValue);let W=0,ee=0;ie.forEach(te=>{const{tradeType:J,amount:ne}=te.customData;J==="买"&&(W+=ne),J==="卖"&&(ee+=ne)}),W&&(de+=`<div>买: ${W}</div>`),ee&&(de+=`<div>卖: ${ee}</div>`)}else re.forEach(ie=>{if((ie==null?void 0:ie.coord[0])===Me.axisValue){const{tradeType:W,amount:ee,profitAndLoss:te,openPriceAll:J,closePriceAll:ne}=ie.customData;let G=`<div>${W}: ${ee}手</div>`;if(W.includes("开")&&(G+=`<div>开仓价: ${(J/ee).toFixed(2)}</div>`),W.includes("平")){const Q=(J/ee).toFixed(2),Z=(ne/ee).toFixed(2);G+=`<div>平仓价: ${Z}</div>`,G+=`<div>盈亏: ${te==null?void 0:te.toFixed(2)}</div>`,G+=`<div>盈亏比率: ${((Z-Q)/Q*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>