st-comp 0.0.185 → 0.0.186

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-8a151cf0"),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:"",filterable:"",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-8a151cf0"]]),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-716cca00"),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:"",filterable:"",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-716cca00"]]),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+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiNGRjAwMDAiIHAtaWQ9IjI2MjYiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjcwOTMzMyAxNjcuNzIyNjY3YzAuMTI4LTIxLjc2IDkuOTg0LTQyLjY2NjY2NyAyNy4zOTItNTcuOTQxMzM0YTkzLjMxMiA5My4zMTIgMCAwIDEgNjQuNDY5MzM0LTIzLjg5MzMzM0w3NjEuNiA4NS4zMzMzMzNjMjUuNiAwLjU1NDY2NyA0Ny4zNiA4Ljc4OTMzMyA2NC45Mzg2NjcgMjQuNDA1MzM0IDE3LjkyIDE2IDI2Ljg4IDM1LjIgMjYuODggNTcuNDcybC0wLjU1NDY2NyA0MTkuODRjMC4yOTg2NjcgMjIuNjk4NjY3LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuOTIyNjY2LTEyLjYyOTMzMyAyNy4zMDY2NjctMjcuOTQ2NjY3IDQ4Ljg5Ni00NS44MjQgNjQuODk2bC0yMTEuMjQyNjY3IDE4OC4yMDI2NjdjLTE3LjU3ODY2NyAxNS43MDEzMzMtMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45Mzg2NjcgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0Ljk4MTMzMy0yMy41OTQ2NjdsLTIxMS4xNTczMzMtMTg4LjE2Yy0xNy45Mi0xNi4wNDI2NjctMzMuMjgtMzcuNzE3MzMzLTQ1LjkwOTMzNC02NC45ODEzMzMtMTIuNjcyLTI3LjMwNjY2Ny0xOS4wMjkzMzMtNTIuMzk0NjY3LTE5LjAyOTMzMy03NS4zMDY2NjdMMTcwLjY2NjY2NyAxNjcuNzIyNjY3eiBtNDIuNjY2NjY3IDAuMjU2bDAuNTU0NjY3IDQxOC42ODhjMCAxNi4yMTMzMzMgNC44MjEzMzMgMzUuMzI4IDE1LjAxODY2NiA1Ny4zNDQgMTAuMzY4IDIyLjI3MiAyMi4zNTczMzMgMzkuMjEwNjY3IDM1LjYyNjY2NyA1MS4wNzJsMjExLjQxMzMzMyAxODguNDE2YzguOTYgOC4xMDY2NjcgMjEuODg4IDEyLjggMzYuMjI0IDEyLjU0NCAxNS41MzA2NjctMC4wNDI2NjcgMjcuMDkzMzMzLTQuMjY2NjY3IDM2LjY5MzMzNC0xMi44bDIxMS4xNTczMzMtMTg4LjExNzMzNGMxMy4zMTItMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNTg0LTUxLjA3MiAxMC4xMTItMjEuODQ1MzMzIDE0Ljc2MjY2Ny00MC41NzYgMTQuNTA2NjY3LTU3LjA0NTMzM2wwLjU1NDY2Ni00MTkuNzU0NjY3YzAtOS44OTg2NjctMy41ODQtMTcuNjIxMzMzLTEyLjQ1ODY2Ni0yNS42YTU0LjY5ODY2NyA1NC42OTg2NjcgMCAwIDAtMzYuNjA4LTEzLjYxMDY2NmwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NyAxMy4zMTIgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzMgMjEuNDYxMzMzbC0wLjQyNjY2NyA0LjY5MzMzNHoiIGZpbGw9IiNBRTAwMDAiIHAtaWQ9IjI2MjciPjwvcGF0aD48cGF0aCBkPSJNMzg0IDY1NC4xMjI2NjdoMTUzLjUxNDY2N2M5Ni43NjggMCAxNDIuNzYyNjY3LTQ4Ljk4MTMzMyAxNDIuNzYyNjY2LTExNy4wNzczMzQgMC01OS43MzMzMzMtMzMuNDUwNjY3LTg4LjQwNTMzMy04NC44MjEzMzMtOTcuOTYyNjY2di0xLjc5MmM0OC45ODEzMzMtMTUuNTMwNjY3IDY2LjkwMTMzMy00Ni41OTIgNjYuOTAxMzMzLTg5LjYgMC02NS4xMDkzMzMtNDAuNjE4NjY3LTEwMy4zMzg2NjctMTM0Ljk5NzMzMy0xMDMuMzM4NjY3SDM4NHY0MDkuNzcwNjY3eiBtNzIuODc0NjY3LTU0Ljk1NDY2N3YtMTMxLjQxMzMzM2g2Ni4zMDRjNTEuOTY4IDAgODAuMDQyNjY3IDE3LjkyIDgwLjA0MjY2NiA2NS4xMDkzMzMgMCA0NC44LTI2LjI4MjY2NyA2Ni4zMDQtNzUuODYxMzMzIDY2LjMwNGgtNzAuNDg1MzMzeiBtMC0xODAuMzk0NjY3VjI5OC43MDkzMzNoNjAuMzMwNjY2YzQ3LjE4OTMzMyAwIDcyLjI3NzMzMyAxNC45MzMzMzMgNzIuMjc3MzM0IDU5LjEzNiAwIDQ2LjU5Mi0zMi4yNTYgNjAuOTI4LTc1LjI2NCA2MC45MjhoLTU3LjM0NHoiIGZpbGw9IiNGRkZGRkYiIHAtaWQ9IjI2MjgiPjwvcGF0aD48L3N2Zz4=",XE="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjQxNjY0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI3NzciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiM1NEFCMzAiIHAtaWQ9IjI3NzgiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjY2NjY2NyAxNjcuNjhjMC4xMjgtMjEuNzYgOS45NDEzMzMtNDIuNjY2NjY3IDI3LjM0OTMzMy01Ny45NDEzMzNhOTMuMzEyIDkzLjMxMiAwIDAgMSA2NC41MTItMjMuODkzMzM0TDc2MS41NTczMzMgODUuMzMzMzMzYzI1LjYgMC41NTQ2NjcgNDcuMzYgOC43ODkzMzMgNjQuOTM4NjY3IDI0LjQwNTMzNCAxNy45MiAxNiAyNi44MzczMzMgMzUuMiAyNi44MzczMzMgNTcuNDcybC0wLjUxMiA0MTkuODRjMC4yOTg2NjcgMjIuNjU2LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuODgtMTIuNjcyIDI3LjMwNjY2Ny0yNy45NDY2NjcgNDguOTM4NjY3LTQ1Ljg2NjY2NyA2NC45Mzg2NjZsLTIxMS4yIDE4OC4yMDI2NjdjLTE3LjYyMTMzMyAxNS42NTg2NjctMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45ODEzMzMgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0LjkzODY2Ny0yMy41OTQ2NjdsLTIxMS4yLTE4OC4yMDI2NjdjLTE3LjkyLTE2LTMzLjIzNzMzMy0zNy43MTczMzMtNDUuOTA5MzMzLTY0LjkzODY2Ni0xMi42MjkzMzMtMjcuMzA2NjY3LTE5LjAyOTMzMy01Mi40MzczMzMtMTkuMDI5MzMzLTc1LjMwNjY2N0wxNzAuNjY2NjY3IDE2Ny42OHogbTQyLjYyNCAwLjI1NmwwLjU1NDY2NiA0MTguNjg4YzAgMTYuMTcwNjY3IDQuODY0IDM1LjMyOCAxNS4wNjEzMzQgNTcuMzQ0IDEwLjM2OCAyMi4yNzIgMjIuMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiMzODhEMTQiIHAtaWQ9IjI3NzkiPjwvcGF0aD48cGF0aCBkPSJNNTA2LjQ1MzMzMyA2NzQuNzMwNjY3Yzk5LjE1NzMzMyAwIDE0Ni4zNDY2NjctNDguMzg0IDE0Ni4zNDY2NjctMTI2LjAzNzMzNCAwLTcyLjg3NDY2Ny0zOC44MjY2NjctOTkuNzU0NjY3LTEwMy4zMzg2NjctMTE4LjI3MmwtMzguMjI5MzMzLTExLjk0NjY2NmMtNDAuNjE4NjY3LTExLjM0OTMzMy01Mi41NjUzMzMtMjUuMDg4LTUyLjU2NTMzMy01Ny4zNDQgMC0zMi44NTMzMzMgMjMuODkzMzMzLTUwLjc3MzMzMyA2Ni45MDEzMzMtNTAuNzczMzM0IDQ1LjM5NzMzMyAwIDc4Ljg0OCA5LjU1NzMzMyAxMDQuNTMzMzMzIDIwLjMwOTMzNFYyNzMuMzIyNjY3Yy0yMi42OTg2NjctMTEuOTQ2NjY3LTUxLjk2OC0yMi4xMDEzMzMtMTA1LjcyOC0yMi4xMDEzMzQtOTIuNTg2NjY3IDAtMTM3LjM4NjY2NyA0Ny4xODkzMzMtMTM3LjM4NjY2NiAxMTYuNDggMCA2OS4yOTA2NjcgMzUuMjQyNjY3IDEwMC4zNTIgOTMuMTg0IDExNi40OGwzOC44MjY2NjYgMTAuNzUyYzQ0LjggMTMuNzM4NjY3IDU5LjczMzMzMyAyNi44OCA1OS43MzMzMzQgNjAuOTI4IDAgMzcuMDM0NjY3LTIzLjI5NiA1OS43MzMzMzMtNzguMjUwNjY3IDU5LjczMzMzNC00NC44IDAtODMuNjI2NjY3LTEwLjc1Mi0xMTYuNDgtMjUuMDg4djU3Ljk0MTMzM2MyOC4wNzQ2NjcgMTQuOTMzMzMzIDY4LjY5MzMzMyAyNi4yODI2NjcgMTIyLjQ1MzMzMyAyNi4yODI2Njd6IiBmaWxsPSIjRkZGRkZGIiBwLWlkPSIyNzgwIj48L3BhdGg+PC9zdmc+",JE="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiNDODgwRkYiIHAtaWQ9IjMwNzkiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjY2NjY2NyAxNjcuNjhjMC4xMjgtMjEuNzYgOS45NDEzMzMtNDIuNjY2NjY3IDI3LjM0OTMzMy01Ny45NDEzMzNhOTMuMzEyIDkzLjMxMiAwIDAgMSA2NC41MTItMjMuODkzMzM0TDc2MS41NTczMzMgODUuMzMzMzMzYzI1LjYgMC41NTQ2NjcgNDcuMzYgOC43ODkzMzMgNjQuOTM4NjY3IDI0LjQwNTMzNCAxNy45MiAxNiAyNi44MzczMzMgMzUuMiAyNi44MzczMzMgNTcuNDcybC0wLjUxMiA0MTkuODRjMC4yOTg2NjcgMjIuNjU2LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuODgtMTIuNjcyIDI3LjMwNjY2Ny0yNy45NDY2NjcgNDguOTM4NjY3LTQ1Ljg2NjY2NyA2NC45Mzg2NjZsLTIxMS4yIDE4OC4yMDI2NjdjLTE3LjYyMTMzMyAxNS42NTg2NjctMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45ODEzMzMgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0LjkzODY2Ny0yMy41OTQ2NjdsLTIxMS4yLTE4OC4yMDI2NjdjLTE3LjkyLTE2LTMzLjIzNzMzMy0zNy43MTczMzMtNDUuOTA5MzMzLTY0LjkzODY2Ni0xMi42MjkzMzMtMjcuMzA2NjY3LTE5LjAyOTMzMy01Mi40MzczMzMtMTkuMDI5MzMzLTc1LjMwNjY2N0wxNzAuNjY2NjY3IDE2Ny42OHogbTQyLjYyNCAwLjI1NmwwLjU1NDY2NiA0MTguNjg4YzAgMTYuMTcwNjY3IDQuODY0IDM1LjMyOCAxNS4wNjEzMzQgNTcuMzQ0IDEwLjM2OCAyMi4yNzIgMjIuMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==",n5=(n,e)=>{const{type:t="log",color:i="black"}=e??{};localStorage.getItem("st-kline-console-show")==="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/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiNDODgwRkYiIHAtaWQ9IjMwNzkiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjY2NjY2NyAxNjcuNjhjMC4xMjgtMjEuNzYgOS45NDEzMzMtNDIuNjY2NjY3IDI3LjM0OTMzMy01Ny45NDEzMzNhOTMuMzEyIDkzLjMxMiAwIDAgMSA2NC41MTItMjMuODkzMzM0TDc2MS41NTczMzMgODUuMzMzMzMzYzI1LjYgMC41NTQ2NjcgNDcuMzYgOC43ODkzMzMgNjQuOTM4NjY3IDI0LjQwNTMzNCAxNy45MiAxNiAyNi44MzczMzMgMzUuMiAyNi44MzczMzMgNTcuNDcybC0wLjUxMiA0MTkuODRjMC4yOTg2NjcgMjIuNjU2LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuODgtMTIuNjcyIDI3LjMwNjY2Ny0yNy45NDY2NjcgNDguOTM4NjY3LTQ1Ljg2NjY2NyA2NC45Mzg2NjZsLTIxMS4yIDE4OC4yMDI2NjdjLTE3LjYyMTMzMyAxNS42NTg2NjctMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45ODEzMzMgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0LjkzODY2Ny0yMy41OTQ2NjdsLTIxMS4yLTE4OC4yMDI2NjdjLTE3LjkyLTE2LTMzLjIzNzMzMy0zNy43MTczMzMtNDUuOTA5MzMzLTY0LjkzODY2Ni0xMi42MjkzMzMtMjcuMzA2NjY3LTE5LjAyOTMzMy01Mi40MzczMzMtMTkuMDI5MzMzLTc1LjMwNjY2N0wxNzAuNjY2NjY3IDE2Ny42OHogbTQyLjYyNCAwLjI1NmwwLjU1NDY2NiA0MTguNjg4YzAgMTYuMTcwNjY3IDQuODY0IDM1LjMyOCAxNS4wNjEzMzQgNTcuMzQ0IDEwLjM2OCAyMi4yNzIgMjIuMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+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+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiNGRjAwMDAiIHAtaWQ9IjI2MjYiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjcwOTMzMyAxNjcuNzIyNjY3YzAuMTI4LTIxLjc2IDkuOTg0LTQyLjY2NjY2NyAyNy4zOTItNTcuOTQxMzM0YTkzLjMxMiA5My4zMTIgMCAwIDEgNjQuNDY5MzM0LTIzLjg5MzMzM0w3NjEuNiA4NS4zMzMzMzNjMjUuNiAwLjU1NDY2NyA0Ny4zNiA4Ljc4OTMzMyA2NC45Mzg2NjcgMjQuNDA1MzM0IDE3LjkyIDE2IDI2Ljg4IDM1LjIgMjYuODggNTcuNDcybC0wLjU1NDY2NyA0MTkuODRjMC4yOTg2NjcgMjIuNjk4NjY3LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuOTIyNjY2LTEyLjYyOTMzMyAyNy4zMDY2NjctMjcuOTQ2NjY3IDQ4Ljg5Ni00NS44MjQgNjQuODk2bC0yMTEuMjQyNjY3IDE4OC4yMDI2NjdjLTE3LjU3ODY2NyAxNS43MDEzMzMtMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45Mzg2NjcgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0Ljk4MTMzMy0yMy41OTQ2NjdsLTIxMS4xNTczMzMtMTg4LjE2Yy0xNy45Mi0xNi4wNDI2NjctMzMuMjgtMzcuNzE3MzMzLTQ1LjkwOTMzNC02NC45ODEzMzMtMTIuNjcyLTI3LjMwNjY2Ny0xOS4wMjkzMzMtNTIuMzk0NjY3LTE5LjAyOTMzMy03NS4zMDY2NjdMMTcwLjY2NjY2NyAxNjcuNzIyNjY3eiBtNDIuNjY2NjY3IDAuMjU2bDAuNTU0NjY3IDQxOC42ODhjMCAxNi4yMTMzMzMgNC44MjEzMzMgMzUuMzI4IDE1LjAxODY2NiA1Ny4zNDQgMTAuMzY4IDIyLjI3MiAyMi4zNTczMzMgMzkuMjEwNjY3IDM1LjYyNjY2NyA1MS4wNzJsMjExLjQxMzMzMyAxODguNDE2YzguOTYgOC4xMDY2NjcgMjEuODg4IDEyLjggMzYuMjI0IDEyLjU0NCAxNS41MzA2NjctMC4wNDI2NjcgMjcuMDkzMzMzLTQuMjY2NjY3IDM2LjY5MzMzNC0xMi44bDIxMS4xNTczMzMtMTg4LjExNzMzNGMxMy4zMTItMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNTg0LTUxLjA3MiAxMC4xMTItMjEuODQ1MzMzIDE0Ljc2MjY2Ny00MC41NzYgMTQuNTA2NjY3LTU3LjA0NTMzM2wwLjU1NDY2Ni00MTkuNzU0NjY3YzAtOS44OTg2NjctMy41ODQtMTcuNjIxMzMzLTEyLjQ1ODY2Ni0yNS42YTU0LjY5ODY2NyA1NC42OTg2NjcgMCAwIDAtMzYuNjA4LTEzLjYxMDY2NmwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NyAxMy4zMTIgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzMgMjEuNDYxMzMzbC0wLjQyNjY2NyA0LjY5MzMzNHoiIGZpbGw9IiNBRTAwMDAiIHAtaWQ9IjI2MjciPjwvcGF0aD48cGF0aCBkPSJNMzg0IDY1NC4xMjI2NjdoMTUzLjUxNDY2N2M5Ni43NjggMCAxNDIuNzYyNjY3LTQ4Ljk4MTMzMyAxNDIuNzYyNjY2LTExNy4wNzczMzQgMC01OS43MzMzMzMtMzMuNDUwNjY3LTg4LjQwNTMzMy04NC44MjEzMzMtOTcuOTYyNjY2di0xLjc5MmM0OC45ODEzMzMtMTUuNTMwNjY3IDY2LjkwMTMzMy00Ni41OTIgNjYuOTAxMzMzLTg5LjYgMC02NS4xMDkzMzMtNDAuNjE4NjY3LTEwMy4zMzg2NjctMTM0Ljk5NzMzMy0xMDMuMzM4NjY3SDM4NHY0MDkuNzcwNjY3eiBtNzIuODc0NjY3LTU0Ljk1NDY2N3YtMTMxLjQxMzMzM2g2Ni4zMDRjNTEuOTY4IDAgODAuMDQyNjY3IDE3LjkyIDgwLjA0MjY2NiA2NS4xMDkzMzMgMCA0NC44LTI2LjI4MjY2NyA2Ni4zMDQtNzUuODYxMzMzIDY2LjMwNGgtNzAuNDg1MzMzeiBtMC0xODAuMzk0NjY3VjI5OC43MDkzMzNoNjAuMzMwNjY2YzQ3LjE4OTMzMyAwIDcyLjI3NzMzMyAxNC45MzMzMzMgNzIuMjc3MzM0IDU5LjEzNiAwIDQ2LjU5Mi0zMi4yNTYgNjAuOTI4LTc1LjI2NCA2MC45MjhoLTU3LjM0NHoiIGZpbGw9IiNGRkZGRkYiIHAtaWQ9IjI2MjgiPjwvcGF0aD48L3N2Zz4=",but="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjQxNjY0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI3NzciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiM1NEFCMzAiIHAtaWQ9IjI3NzgiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjY2NjY2NyAxNjcuNjhjMC4xMjgtMjEuNzYgOS45NDEzMzMtNDIuNjY2NjY3IDI3LjM0OTMzMy01Ny45NDEzMzNhOTMuMzEyIDkzLjMxMiAwIDAgMSA2NC41MTItMjMuODkzMzM0TDc2MS41NTczMzMgODUuMzMzMzMzYzI1LjYgMC41NTQ2NjcgNDcuMzYgOC43ODkzMzMgNjQuOTM4NjY3IDI0LjQwNTMzNCAxNy45MiAxNiAyNi44MzczMzMgMzUuMiAyNi44MzczMzMgNTcuNDcybC0wLjUxMiA0MTkuODRjMC4yOTg2NjcgMjIuNjU2LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuODgtMTIuNjcyIDI3LjMwNjY2Ny0yNy45NDY2NjcgNDguOTM4NjY3LTQ1Ljg2NjY2NyA2NC45Mzg2NjZsLTIxMS4yIDE4OC4yMDI2NjdjLTE3LjYyMTMzMyAxNS42NTg2NjctMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45ODEzMzMgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0LjkzODY2Ny0yMy41OTQ2NjdsLTIxMS4yLTE4OC4yMDI2NjdjLTE3LjkyLTE2LTMzLjIzNzMzMy0zNy43MTczMzMtNDUuOTA5MzMzLTY0LjkzODY2Ni0xMi42MjkzMzMtMjcuMzA2NjY3LTE5LjAyOTMzMy01Mi40MzczMzMtMTkuMDI5MzMzLTc1LjMwNjY2N0wxNzAuNjY2NjY3IDE2Ny42OHogbTQyLjYyNCAwLjI1NmwwLjU1NDY2NiA0MTguNjg4YzAgMTYuMTcwNjY3IDQuODY0IDM1LjMyOCAxNS4wNjEzMzQgNTcuMzQ0IDEwLjM2OCAyMi4yNzIgMjIuMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiMzODhEMTQiIHAtaWQ9IjI3NzkiPjwvcGF0aD48cGF0aCBkPSJNNTA2LjQ1MzMzMyA2NzQuNzMwNjY3Yzk5LjE1NzMzMyAwIDE0Ni4zNDY2NjctNDguMzg0IDE0Ni4zNDY2NjctMTI2LjAzNzMzNCAwLTcyLjg3NDY2Ny0zOC44MjY2NjctOTkuNzU0NjY3LTEwMy4zMzg2NjctMTE4LjI3MmwtMzguMjI5MzMzLTExLjk0NjY2NmMtNDAuNjE4NjY3LTExLjM0OTMzMy01Mi41NjUzMzMtMjUuMDg4LTUyLjU2NTMzMy01Ny4zNDQgMC0zMi44NTMzMzMgMjMuODkzMzMzLTUwLjc3MzMzMyA2Ni45MDEzMzMtNTAuNzczMzM0IDQ1LjM5NzMzMyAwIDc4Ljg0OCA5LjU1NzMzMyAxMDQuNTMzMzMzIDIwLjMwOTMzNFYyNzMuMzIyNjY3Yy0yMi42OTg2NjctMTEuOTQ2NjY3LTUxLjk2OC0yMi4xMDEzMzMtMTA1LjcyOC0yMi4xMDEzMzQtOTIuNTg2NjY3IDAtMTM3LjM4NjY2NyA0Ny4xODkzMzMtMTM3LjM4NjY2NiAxMTYuNDggMCA2OS4yOTA2NjcgMzUuMjQyNjY3IDEwMC4zNTIgOTMuMTg0IDExNi40OGwzOC44MjY2NjYgMTAuNzUyYzQ0LjggMTMuNzM4NjY3IDU5LjczMzMzMyAyNi44OCA1OS43MzMzMzQgNjAuOTI4IDAgMzcuMDM0NjY3LTIzLjI5NiA1OS43MzMzMzMtNzguMjUwNjY3IDU5LjczMzMzNC00NC44IDAtODMuNjI2NjY3LTEwLjc1Mi0xMTYuNDgtMjUuMDg4djU3Ljk0MTMzM2MyOC4wNzQ2NjcgMTQuOTMzMzMzIDY4LjY5MzMzMyAyNi4yODI2NjcgMTIyLjQ1MzMzMyAyNi4yODI2Njd6IiBmaWxsPSIjRkZGRkZGIiBwLWlkPSIyNzgwIj48L3BhdGg+PC9zdmc+",_ut="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiNDODgwRkYiIHAtaWQ9IjMwNzkiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjY2NjY2NyAxNjcuNjhjMC4xMjgtMjEuNzYgOS45NDEzMzMtNDIuNjY2NjY3IDI3LjM0OTMzMy01Ny45NDEzMzNhOTMuMzEyIDkzLjMxMiAwIDAgMSA2NC41MTItMjMuODkzMzM0TDc2MS41NTczMzMgODUuMzMzMzMzYzI1LjYgMC41NTQ2NjcgNDcuMzYgOC43ODkzMzMgNjQuOTM4NjY3IDI0LjQwNTMzNCAxNy45MiAxNiAyNi44MzczMzMgMzUuMiAyNi44MzczMzMgNTcuNDcybC0wLjUxMiA0MTkuODRjMC4yOTg2NjcgMjIuNjU2LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuODgtMTIuNjcyIDI3LjMwNjY2Ny0yNy45NDY2NjcgNDguOTM4NjY3LTQ1Ljg2NjY2NyA2NC45Mzg2NjZsLTIxMS4yIDE4OC4yMDI2NjdjLTE3LjYyMTMzMyAxNS42NTg2NjctMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45ODEzMzMgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0LjkzODY2Ny0yMy41OTQ2NjdsLTIxMS4yLTE4OC4yMDI2NjdjLTE3LjkyLTE2LTMzLjIzNzMzMy0zNy43MTczMzMtNDUuOTA5MzMzLTY0LjkzODY2Ni0xMi42MjkzMzMtMjcuMzA2NjY3LTE5LjAyOTMzMy01Mi40MzczMzMtMTkuMDI5MzMzLTc1LjMwNjY2N0wxNzAuNjY2NjY3IDE2Ny42OHogbTQyLjYyNCAwLjI1NmwwLjU1NDY2NiA0MTguNjg4YzAgMTYuMTcwNjY3IDQuODY0IDM1LjMyOCAxNS4wNjEzMzQgNTcuMzQ0IDEwLjM2OCAyMi4yNzIgMjIuMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+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+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiNDODgwRkYiIHAtaWQ9IjMwNzkiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjY2NjY2NyAxNjcuNjhjMC4xMjgtMjEuNzYgOS45NDEzMzMtNDIuNjY2NjY3IDI3LjM0OTMzMy01Ny45NDEzMzNhOTMuMzEyIDkzLjMxMiAwIDAgMSA2NC41MTItMjMuODkzMzM0TDc2MS41NTczMzMgODUuMzMzMzMzYzI1LjYgMC41NTQ2NjcgNDcuMzYgOC43ODkzMzMgNjQuOTM4NjY3IDI0LjQwNTMzNCAxNy45MiAxNiAyNi44MzczMzMgMzUuMiAyNi44MzczMzMgNTcuNDcybC0wLjUxMiA0MTkuODRjMC4yOTg2NjcgMjIuNjU2LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuODgtMTIuNjcyIDI3LjMwNjY2Ny0yNy45NDY2NjcgNDguOTM4NjY3LTQ1Ljg2NjY2NyA2NC45Mzg2NjZsLTIxMS4yIDE4OC4yMDI2NjdjLTE3LjYyMTMzMyAxNS42NTg2NjctMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45ODEzMzMgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0LjkzODY2Ny0yMy41OTQ2NjdsLTIxMS4yLTE4OC4yMDI2NjdjLTE3LjkyLTE2LTMzLjIzNzMzMy0zNy43MTczMzMtNDUuOTA5MzMzLTY0LjkzODY2Ni0xMi42MjkzMzMtMjcuMzA2NjY3LTE5LjAyOTMzMy01Mi40MzczMzMtMTkuMDI5MzMzLTc1LjMwNjY2N0wxNzAuNjY2NjY3IDE2Ny42OHogbTQyLjYyNCAwLjI1NmwwLjU1NDY2NiA0MTguNjg4YzAgMTYuMTcwNjY3IDQuODY0IDM1LjMyOCAxNS4wNjEzMzQgNTcuMzQ0IDEwLjM2OCAyMi4yNzIgMjIuMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+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>
@@ -820,11 +820,11 @@ ${u.data.colorValue}`}}],data:o.data.map(u=>({...u,itemStyle:{color:u.color},chi
820
820
  `:">",o},fg.prototype.renderInline=function(n,e,t){let i="";const r=this.rules;for(let o=0,s=n.length;o<s;o++){const a=n[o].type;typeof r[a]<"u"?i+=r[a](n,o,e,t,this):i+=this.renderToken(n,o,e)}return i},fg.prototype.renderInlineAsText=function(n,e,t){let i="";for(let r=0,o=n.length;r<o;r++)switch(n[r].type){case"text":i+=n[r].content;break;case"image":i+=this.renderInlineAsText(n[r].children,e,t);break;case"html_inline":case"html_block":i+=n[r].content;break;case"softbreak":case"hardbreak":i+=`
821
821
  `;break}return i},fg.prototype.render=function(n,e,t){let i="";const r=this.rules;for(let o=0,s=n.length;o<s;o++){const a=n[o].type;a==="inline"?i+=this.renderInline(n[o].children,e,t):typeof r[a]<"u"?i+=r[a](n,o,e,t,this):i+=this.renderToken(n,o,e,t)}return i};function ma(){this.__rules__=[],this.__cache__=null}ma.prototype.__find__=function(n){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===n)return e;return-1},ma.prototype.__compile__=function(){const n=this,e=[""];n.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(i){e.indexOf(i)<0&&e.push(i)})}),n.__cache__={},e.forEach(function(t){n.__cache__[t]=[],n.__rules__.forEach(function(i){i.enabled&&(t&&i.alt.indexOf(t)<0||n.__cache__[t].push(i.fn))})})},ma.prototype.at=function(n,e,t){const i=this.__find__(n),r=t||{};if(i===-1)throw new Error("Parser rule not found: "+n);this.__rules__[i].fn=e,this.__rules__[i].alt=r.alt||[],this.__cache__=null},ma.prototype.before=function(n,e,t,i){const r=this.__find__(n),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(r,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},ma.prototype.after=function(n,e,t,i){const r=this.__find__(n),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(r+1,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},ma.prototype.push=function(n,e,t){const i=t||{};this.__rules__.push({name:n,enabled:!0,fn:e,alt:i.alt||[]}),this.__cache__=null},ma.prototype.enable=function(n,e){Array.isArray(n)||(n=[n]);const t=[];return n.forEach(function(i){const r=this.__find__(i);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!0,t.push(i)},this),this.__cache__=null,t},ma.prototype.enableOnly=function(n,e){Array.isArray(n)||(n=[n]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(n,e)},ma.prototype.disable=function(n,e){Array.isArray(n)||(n=[n]);const t=[];return n.forEach(function(i){const r=this.__find__(i);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!1,t.push(i)},this),this.__cache__=null,t},ma.prototype.getRules=function(n){return this.__cache__===null&&this.__compile__(),this.__cache__[n]||[]};function ju(n,e,t){this.type=n,this.tag=e,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ju.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let i=0,r=t.length;i<r;i++)if(t[i][0]===e)return i;return-1},ju.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},ju.prototype.attrSet=function(e,t){const i=this.attrIndex(e),r=[e,t];i<0?this.attrPush(r):this.attrs[i]=r},ju.prototype.attrGet=function(e){const t=this.attrIndex(e);let i=null;return t>=0&&(i=this.attrs[t][1]),i},ju.prototype.attrJoin=function(e,t){const i=this.attrIndex(e);i<0?this.attrPush([e,t]):this.attrs[i][1]=this.attrs[i][1]+" "+t};function Lde(n,e,t){this.src=n,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}Lde.prototype.Token=ju;const MSt=/\r\n?|\n/g,TSt=/\0/g;function ASt(n){let e;e=n.src.replace(MSt,`
822
822
  `),e=e.replace(TSt,"�"),n.src=e}function ISt(n){let e;n.inlineMode?(e=new n.Token("inline","",0),e.content=n.src,e.map=[0,1],e.children=[],n.tokens.push(e)):n.md.block.parse(n.src,n.md,n.env,n.tokens)}function RSt(n){const e=n.tokens;for(let t=0,i=e.length;t<i;t++){const r=e[t];r.type==="inline"&&n.md.inline.parse(r.content,n.md,n.env,r.children)}}function OSt(n){return/^<a[>\s]/i.test(n)}function FSt(n){return/^<\/a\s*>/i.test(n)}function PSt(n){const e=n.tokens;if(n.md.options.linkify)for(let t=0,i=e.length;t<i;t++){if(e[t].type!=="inline"||!n.md.linkify.pretest(e[t].content))continue;let r=e[t].children,o=0;for(let s=r.length-1;s>=0;s--){const a=r[s];if(a.type==="link_close"){for(s--;r[s].level!==a.level&&r[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(OSt(a.content)&&o>0&&o--,FSt(a.content)&&o++),!(o>0)&&a.type==="text"&&n.md.linkify.test(a.content)){const l=a.content;let u=n.md.linkify.match(l);const d=[];let h=a.level,f=0;u.length>0&&u[0].index===0&&s>0&&r[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const g=u[p].url,m=n.md.normalizeLink(g);if(!n.md.validateLink(m))continue;let y=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(y)?y=n.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=n.md.normalizeLinkText(y):y=n.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const b=u[p].index;if(b>f){const w=new n.Token("text","",0);w.content=l.slice(f,b),w.level=h,d.push(w)}const C=new n.Token("link_open","a",1);C.attrs=[["href",m]],C.level=h++,C.markup="linkify",C.info="auto",d.push(C);const _=new n.Token("text","",0);_.content=y,_.level=h,d.push(_);const v=new n.Token("link_close","a",-1);v.level=--h,v.markup="linkify",v.info="auto",d.push(v),f=u[p].lastIndex}if(f<l.length){const p=new n.Token("text","",0);p.content=l.slice(f),p.level=h,d.push(p)}e[t].children=r=Ede(r,s,d)}}}}const Mde=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,BSt=/\((c|tm|r)\)/i,VSt=/\((c|tm|r)\)/ig,zSt={c:"©",r:"®",tm:"™"};function HSt(n,e){return zSt[e.toLowerCase()]}function jSt(n){let e=0;for(let t=n.length-1;t>=0;t--){const i=n[t];i.type==="text"&&!e&&(i.content=i.content.replace(VSt,HSt)),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function WSt(n){let e=0;for(let t=n.length-1;t>=0;t--){const i=n[t];i.type==="text"&&!e&&Mde.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function $St(n){let e;if(n.md.options.typographer)for(e=n.tokens.length-1;e>=0;e--)n.tokens[e].type==="inline"&&(BSt.test(n.tokens[e].content)&&jSt(n.tokens[e].children),Mde.test(n.tokens[e].content)&&WSt(n.tokens[e].children))}const USt=/['"]/,Tde=/['"]/g,Ade="’";function Iw(n,e,t){return n.slice(0,e)+t+n.slice(e+1)}function qSt(n,e){let t;const i=[];for(let r=0;r<n.length;r++){const o=n[r],s=n[r].level;for(t=i.length-1;t>=0&&!(i[t].level<=s);t--);if(i.length=t+1,o.type!=="text")continue;let a=o.content,l=0,u=a.length;e:for(;l<u;){Tde.lastIndex=l;const d=Tde.exec(a);if(!d)break;let h=!0,f=!0;l=d.index+1;const p=d[0]==="'";let g=32;if(d.index-1>=0)g=a.charCodeAt(d.index-1);else for(t=r-1;t>=0&&!(n[t].type==="softbreak"||n[t].type==="hardbreak");t--)if(n[t].content){g=n[t].content.charCodeAt(n[t].content.length-1);break}let m=32;if(l<u)m=a.charCodeAt(l);else for(t=r+1;t<n.length&&!(n[t].type==="softbreak"||n[t].type==="hardbreak");t++)if(n[t].content){m=n[t].content.charCodeAt(0);break}const y=H8(g)||z8(String.fromCharCode(g)),b=H8(m)||z8(String.fromCharCode(m)),C=V8(g),_=V8(m);if(_?h=!1:b&&(C||y||(h=!1)),C?f=!1:y&&(_||b||(f=!1)),m===34&&d[0]==='"'&&g>=48&&g<=57&&(f=h=!1),h&&f&&(h=y,f=b),!h&&!f){p&&(o.content=Iw(o.content,d.index,Ade));continue}if(f)for(t=i.length-1;t>=0;t--){let v=i[t];if(i[t].level<s)break;if(v.single===p&&i[t].level===s){v=i[t];let w,x;p?(w=e.md.options.quotes[2],x=e.md.options.quotes[3]):(w=e.md.options.quotes[0],x=e.md.options.quotes[1]),o.content=Iw(o.content,d.index,x),n[v.token].content=Iw(n[v.token].content,v.pos,w),l+=x.length-1,v.token===r&&(l+=w.length-1),a=o.content,u=a.length,i.length=t;continue e}}h?i.push({token:r,pos:d.index,single:p,level:s}):f&&p&&(o.content=Iw(o.content,d.index,Ade))}}}function KSt(n){if(n.md.options.typographer)for(let e=n.tokens.length-1;e>=0;e--)n.tokens[e].type!=="inline"||!USt.test(n.tokens[e].content)||qSt(n.tokens[e].children,n)}function GSt(n){let e,t;const i=n.tokens,r=i.length;for(let o=0;o<r;o++){if(i[o].type!=="inline")continue;const s=i[o].children,a=s.length;for(e=0;e<a;e++)s[e].type==="text_special"&&(s[e].type="text");for(e=t=0;e<a;e++)s[e].type==="text"&&e+1<a&&s[e+1].type==="text"?s[e+1].content=s[e].content+s[e+1].content:(e!==t&&(s[t]=s[e]),t++);e!==t&&(s.length=t)}}const MO=[["normalize",ASt],["block",ISt],["inline",RSt],["linkify",PSt],["replacements",$St],["smartquotes",KSt],["text_join",GSt]];function TO(){this.ruler=new ma;for(let n=0;n<MO.length;n++)this.ruler.push(MO[n][0],MO[n][1])}TO.prototype.process=function(n){const e=this.ruler.getRules("");for(let t=0,i=e.length;t<i;t++)e[t](n)},TO.prototype.State=Lde;function Yc(n,e,t,i){this.src=n,this.md=e,this.env=t,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let o=0,s=0,a=0,l=0,u=r.length,d=!1;s<u;s++){const h=r.charCodeAt(s);if(!d)if(Ui(h)){a++,h===9?l+=4-l%4:l++;continue}else d=!0;(h===10||s===u-1)&&(h!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,o=s+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Yc.prototype.push=function(n,e,t){const i=new ju(n,e,t);return i.block=!0,t<0&&this.level--,i.level=this.level,t>0&&this.level++,this.tokens.push(i),i},Yc.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},Yc.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},Yc.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const i=this.src.charCodeAt(e);if(!Ui(i))break}return e},Yc.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!Ui(this.src.charCodeAt(--e)))return e+1;return e},Yc.prototype.skipChars=function(e,t){for(let i=this.src.length;e<i&&this.src.charCodeAt(e)===t;e++);return e},Yc.prototype.skipCharsBack=function(e,t,i){if(e<=i)return e;for(;e>i;)if(t!==this.src.charCodeAt(--e))return e+1;return e},Yc.prototype.getLines=function(e,t,i,r){if(e>=t)return"";const o=new Array(t-e);for(let s=0,a=e;a<t;a++,s++){let l=0;const u=this.bMarks[a];let d=u,h;for(a+1<t||r?h=this.eMarks[a]+1:h=this.eMarks[a];d<h&&l<i;){const f=this.src.charCodeAt(d);if(Ui(f))f===9?l+=4-(l+this.bsCount[a])%4:l++;else if(d-u<this.tShift[a])l++;else break;d++}l>i?o[s]=new Array(l-i+1).join(" ")+this.src.slice(d,h):o[s]=this.src.slice(d,h)}return o.join("")},Yc.prototype.Token=ju;const YSt=65536;function AO(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];return n.src.slice(t,i)}function Ide(n){const e=[],t=n.length;let i=0,r=n.charCodeAt(i),o=!1,s=0,a="";for(;i<t;)r===124&&(o?(a+=n.substring(s,i-1),s=i):(e.push(a+n.substring(s,i)),a="",s=i+1)),o=r===92,i++,r=n.charCodeAt(i);return e.push(a+n.substring(s)),e}function QSt(n,e,t,i){if(e+2>t)return!1;let r=e+1;if(n.sCount[r]<n.blkIndent||n.sCount[r]-n.blkIndent>=4)return!1;let o=n.bMarks[r]+n.tShift[r];if(o>=n.eMarks[r])return!1;const s=n.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=n.eMarks[r])return!1;const a=n.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!Ui(a)||s===45&&Ui(a))return!1;for(;o<n.eMarks[r];){const v=n.src.charCodeAt(o);if(v!==124&&v!==45&&v!==58&&!Ui(v))return!1;o++}let l=AO(n,e+1),u=l.split("|");const d=[];for(let v=0;v<u.length;v++){const w=u[v].trim();if(!w){if(v===0||v===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(w))return!1;w.charCodeAt(w.length-1)===58?d.push(w.charCodeAt(0)===58?"center":"right"):w.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=AO(n,e).trim(),l.indexOf("|")===-1||n.sCount[e]-n.blkIndent>=4)return!1;u=Ide(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const h=u.length;if(h===0||h!==d.length)return!1;if(i)return!0;const f=n.parentType;n.parentType="table";const p=n.md.block.ruler.getRules("blockquote"),g=n.push("table_open","table",1),m=[e,0];g.map=m;const y=n.push("thead_open","thead",1);y.map=[e,e+1];const b=n.push("tr_open","tr",1);b.map=[e,e+1];for(let v=0;v<u.length;v++){const w=n.push("th_open","th",1);d[v]&&(w.attrs=[["style","text-align:"+d[v]]]);const x=n.push("inline","",0);x.content=u[v].trim(),x.children=[],n.push("th_close","th",-1)}n.push("tr_close","tr",-1),n.push("thead_close","thead",-1);let C,_=0;for(r=e+2;r<t&&!(n.sCount[r]<n.blkIndent);r++){let v=!1;for(let x=0,S=p.length;x<S;x++)if(p[x](n,r,t,!0)){v=!0;break}if(v||(l=AO(n,r).trim(),!l)||n.sCount[r]-n.blkIndent>=4||(u=Ide(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),_+=h-u.length,_>YSt))break;if(r===e+2){const x=n.push("tbody_open","tbody",1);x.map=C=[e+2,0]}const w=n.push("tr_open","tr",1);w.map=[r,r+1];for(let x=0;x<h;x++){const S=n.push("td_open","td",1);d[x]&&(S.attrs=[["style","text-align:"+d[x]]]);const D=n.push("inline","",0);D.content=u[x]?u[x].trim():"",D.children=[],n.push("td_close","td",-1)}n.push("tr_close","tr",-1)}return C&&(n.push("tbody_close","tbody",-1),C[1]=r),n.push("table_close","table",-1),m[1]=r,n.parentType=f,n.line=r,!0}function ZSt(n,e,t){if(n.sCount[e]-n.blkIndent<4)return!1;let i=e+1,r=i;for(;i<t;){if(n.isEmpty(i)){i++;continue}if(n.sCount[i]-n.blkIndent>=4){i++,r=i;continue}break}n.line=r;const o=n.push("code_block","code",0);return o.content=n.getLines(e,r,4+n.blkIndent,!1)+`
823
- `,o.map=[e,n.line],!0}function XSt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||r+3>o)return!1;const s=n.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=n.skipChars(r,s);let l=r-a;if(l<3)return!1;const u=n.src.slice(a,r),d=n.src.slice(r,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let h=e,f=!1;for(;h++,!(h>=t||(r=a=n.bMarks[h]+n.tShift[h],o=n.eMarks[h],r<o&&n.sCount[h]<n.blkIndent));)if(n.src.charCodeAt(r)===s&&!(n.sCount[h]-n.blkIndent>=4)&&(r=n.skipChars(r,s),!(r-a<l)&&(r=n.skipSpaces(r),!(r<o)))){f=!0;break}l=n.sCount[e],n.line=h+(f?1:0);const p=n.push("fence","code",0);return p.info=d,p.content=n.getLines(e+1,h,l,!0),p.markup=u,p.map=[e,n.line],!0}function JSt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];const s=n.lineMax;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==62)return!1;if(i)return!0;const a=[],l=[],u=[],d=[],h=n.md.block.ruler.getRules("blockquote"),f=n.parentType;n.parentType="blockquote";let p=!1,g;for(g=e;g<t;g++){const _=n.sCount[g]<n.blkIndent;if(r=n.bMarks[g]+n.tShift[g],o=n.eMarks[g],r>=o)break;if(n.src.charCodeAt(r++)===62&&!_){let w=n.sCount[g]+1,x,S;n.src.charCodeAt(r)===32?(r++,w++,S=!1,x=!0):n.src.charCodeAt(r)===9?(x=!0,(n.bsCount[g]+w)%4===3?(r++,w++,S=!1):S=!0):x=!1;let D=w;for(a.push(n.bMarks[g]),n.bMarks[g]=r;r<o;){const N=n.src.charCodeAt(r);if(Ui(N))N===9?D+=4-(D+n.bsCount[g]+(S?1:0))%4:D++;else break;r++}p=r>=o,l.push(n.bsCount[g]),n.bsCount[g]=n.sCount[g]+1+(x?1:0),u.push(n.sCount[g]),n.sCount[g]=D-w,d.push(n.tShift[g]),n.tShift[g]=r-n.bMarks[g];continue}if(p)break;let v=!1;for(let w=0,x=h.length;w<x;w++)if(h[w](n,g,t,!0)){v=!0;break}if(v){n.lineMax=g,n.blkIndent!==0&&(a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]-=n.blkIndent);break}a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]=-1}const m=n.blkIndent;n.blkIndent=0;const y=n.push("blockquote_open","blockquote",1);y.markup=">";const b=[e,0];y.map=b,n.md.block.tokenize(n,e,g);const C=n.push("blockquote_close","blockquote",-1);C.markup=">",n.lineMax=s,n.parentType=f,b[1]=n.line;for(let _=0;_<d.length;_++)n.bMarks[_+e]=a[_],n.tShift[_+e]=d[_],n.sCount[_+e]=u[_],n.bsCount[_+e]=l[_];return n.blkIndent=m,!0}function eDt(n,e,t,i){const r=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let o=n.bMarks[e]+n.tShift[e];const s=n.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<r;){const u=n.src.charCodeAt(o++);if(u!==s&&!Ui(u))return!1;u===s&&a++}if(a<3)return!1;if(i)return!0;n.line=e+1;const l=n.push("hr","hr",0);return l.map=[e,n.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Rde(n,e){const t=n.eMarks[e];let i=n.bMarks[e]+n.tShift[e];const r=n.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<t){const o=n.src.charCodeAt(i);if(!Ui(o))return-1}return i}function Ode(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];let r=t;if(r+1>=i)return-1;let o=n.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=n.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=n.src.charCodeAt(r),!Ui(o))?-1:r}function tDt(n,e){const t=n.level+2;for(let i=e+2,r=n.tokens.length-2;i<r;i++)n.tokens[i].level===t&&n.tokens[i].type==="paragraph_open"&&(n.tokens[i+2].hidden=!0,n.tokens[i].hidden=!0,i+=2)}function nDt(n,e,t,i){let r,o,s,a,l=e,u=!0;if(n.sCount[l]-n.blkIndent>=4||n.listIndent>=0&&n.sCount[l]-n.listIndent>=4&&n.sCount[l]<n.blkIndent)return!1;let d=!1;i&&n.parentType==="paragraph"&&n.sCount[l]>=n.blkIndent&&(d=!0);let h,f,p;if((p=Ode(n,l))>=0){if(h=!0,s=n.bMarks[l]+n.tShift[l],f=Number(n.src.slice(s,p-1)),d&&f!==1)return!1}else if((p=Rde(n,l))>=0)h=!1;else return!1;if(d&&n.skipSpaces(p)>=n.eMarks[l])return!1;if(i)return!0;const g=n.src.charCodeAt(p-1),m=n.tokens.length;h?(a=n.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=n.push("bullet_list_open","ul",1);const y=[l,0];a.map=y,a.markup=String.fromCharCode(g);let b=!1;const C=n.md.block.ruler.getRules("list"),_=n.parentType;for(n.parentType="list";l<t;){o=p,r=n.eMarks[l];const v=n.sCount[l]+p-(n.bMarks[l]+n.tShift[l]);let w=v;for(;o<r;){const B=n.src.charCodeAt(o);if(B===9)w+=4-(w+n.bsCount[l])%4;else if(B===32)w++;else break;o++}const x=o;let S;x>=r?S=1:S=w-v,S>4&&(S=1);const D=v+S;a=n.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const N=[l,0];a.map=N,h&&(a.info=n.src.slice(s,p-1));const L=n.tight,E=n.tShift[l],k=n.sCount[l],A=n.listIndent;if(n.listIndent=n.blkIndent,n.blkIndent=D,n.tight=!0,n.tShift[l]=x-n.bMarks[l],n.sCount[l]=w,x>=r&&n.isEmpty(l+1)?n.line=Math.min(n.line+2,t):n.md.block.tokenize(n,l,t,!0),(!n.tight||b)&&(u=!1),b=n.line-l>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=A,n.tShift[l]=E,n.sCount[l]=k,n.tight=L,a=n.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),l=n.line,N[1]=l,l>=t||n.sCount[l]<n.blkIndent||n.sCount[l]-n.blkIndent>=4)break;let R=!1;for(let B=0,I=C.length;B<I;B++)if(C[B](n,l,t,!0)){R=!0;break}if(R)break;if(h){if(p=Ode(n,l),p<0)break;s=n.bMarks[l]+n.tShift[l]}else if(p=Rde(n,l),p<0)break;if(g!==n.src.charCodeAt(p-1))break}return h?a=n.push("ordered_list_close","ol",-1):a=n.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),y[1]=l,n.line=l,n.parentType=_,u&&tDt(n,m),!0}function iDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e],s=e+1;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==91)return!1;function a(C){const _=n.lineMax;if(C>=_||n.isEmpty(C))return null;let v=!1;if(n.sCount[C]-n.blkIndent>3&&(v=!0),n.sCount[C]<0&&(v=!0),!v){const S=n.md.block.ruler.getRules("reference"),D=n.parentType;n.parentType="reference";let N=!1;for(let L=0,E=S.length;L<E;L++)if(S[L](n,C,_,!0)){N=!0;break}if(n.parentType=D,N)return null}const w=n.bMarks[C]+n.tShift[C],x=n.eMarks[C];return n.src.slice(w,x+1)}let l=n.src.slice(r,o+1);o=l.length;let u=-1;for(r=1;r<o;r++){const C=l.charCodeAt(r);if(C===91)return!1;if(C===93){u=r;break}else if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(C===92&&(r++,r<o&&l.charCodeAt(r)===10)){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(r=u+2;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}const d=n.md.helpers.parseLinkDestination(l,r,o);if(!d.ok)return!1;const h=n.md.normalizeLink(d.str);if(!n.md.validateLink(h))return!1;r=d.pos;const f=r,p=s,g=r;for(;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}let m=n.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){const C=a(s);if(C===null)break;l+=C,r=o,o=l.length,s++,m=n.md.helpers.parseLinkTitle(l,r,o,m)}let y;for(r<o&&g!==r&&m.ok?(y=m.str,r=m.pos):(y="",r=f,s=p);r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10&&y)for(y="",r=f,s=p;r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const b=Aw(l.slice(1,u));return b?(i||(typeof n.env.references>"u"&&(n.env.references={}),typeof n.env.references[b]>"u"&&(n.env.references[b]={title:y,href:h}),n.line=s),!0):!1}const rDt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],oDt="[a-zA-Z_:][a-zA-Z0-9:._-]*",sDt="[^\"'=<>`\\x00-\\x20]+",aDt="'[^']*'",lDt='"[^"]*"',uDt="(?:"+sDt+"|"+aDt+"|"+lDt+")",Fde="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+oDt+"(?:\\s*=\\s*"+uDt+")?)")+"*\\s*\\/?>",Pde="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",cDt="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",dDt="<[?][\\s\\S]*?[?]>",hDt="<![A-Za-z][^>]*>",fDt="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",pDt=new RegExp("^(?:"+Fde+"|"+Pde+"|"+cDt+"|"+dDt+"|"+hDt+"|"+fDt+")"),gDt=new RegExp("^(?:"+Fde+"|"+Pde+")"),pg=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+rDt.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(gDt.source+"\\s*$"),/^$/,!1]];function mDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||!n.md.options.html||n.src.charCodeAt(r)!==60)return!1;let s=n.src.slice(r,o),a=0;for(;a<pg.length&&!pg[a][0].test(s);a++);if(a===pg.length)return!1;if(i)return pg[a][2];let l=e+1;if(!pg[a][1].test(s)){for(;l<t&&!(n.sCount[l]<n.blkIndent);l++)if(r=n.bMarks[l]+n.tShift[l],o=n.eMarks[l],s=n.src.slice(r,o),pg[a][1].test(s)){s.length!==0&&l++;break}}n.line=l;const u=n.push("html_block","",0);return u.map=[e,l],u.content=n.getLines(e,l,n.blkIndent,!0),!0}function bDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let s=n.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=n.src.charCodeAt(++r);s===35&&r<o&&a<=6;)a++,s=n.src.charCodeAt(++r);if(a>6||r<o&&!Ui(s))return!1;if(i)return!0;o=n.skipSpacesBack(o,r);const l=n.skipCharsBack(o,35,r);l>r&&Ui(n.src.charCodeAt(l-1))&&(o=l),n.line=e+1;const u=n.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,n.line];const d=n.push("inline","",0);d.content=n.src.slice(r,o).trim(),d.map=[e,n.line],d.children=[];const h=n.push("heading_close","h"+String(a),-1);return h.markup="########".slice(0,a),!0}function _Dt(n,e,t){const i=n.md.block.ruler.getRules("paragraph");if(n.sCount[e]-n.blkIndent>=4)return!1;const r=n.parentType;n.parentType="paragraph";let o=0,s,a=e+1;for(;a<t&&!n.isEmpty(a);a++){if(n.sCount[a]-n.blkIndent>3)continue;if(n.sCount[a]>=n.blkIndent){let p=n.bMarks[a]+n.tShift[a];const g=n.eMarks[a];if(p<g&&(s=n.src.charCodeAt(p),(s===45||s===61)&&(p=n.skipChars(p,s),p=n.skipSpaces(p),p>=g))){o=s===61?1:2;break}}if(n.sCount[a]<0)continue;let f=!1;for(let p=0,g=i.length;p<g;p++)if(i[p](n,a,t,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=n.getLines(e,a,n.blkIndent,!1).trim();n.line=a+1;const u=n.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),u.map=[e,n.line];const d=n.push("inline","",0);d.content=l,d.map=[e,n.line-1],d.children=[];const h=n.push("heading_close","h"+String(o),-1);return h.markup=String.fromCharCode(s),n.parentType=r,!0}function yDt(n,e,t){const i=n.md.block.ruler.getRules("paragraph"),r=n.parentType;let o=e+1;for(n.parentType="paragraph";o<t&&!n.isEmpty(o);o++){if(n.sCount[o]-n.blkIndent>3||n.sCount[o]<0)continue;let u=!1;for(let d=0,h=i.length;d<h;d++)if(i[d](n,o,t,!0)){u=!0;break}if(u)break}const s=n.getLines(e,o,n.blkIndent,!1).trim();n.line=o;const a=n.push("paragraph_open","p",1);a.map=[e,n.line];const l=n.push("inline","",0);return l.content=s,l.map=[e,n.line],l.children=[],n.push("paragraph_close","p",-1),n.parentType=r,!0}const Rw=[["table",QSt,["paragraph","reference"]],["code",ZSt],["fence",XSt,["paragraph","reference","blockquote","list"]],["blockquote",JSt,["paragraph","reference","blockquote","list"]],["hr",eDt,["paragraph","reference","blockquote","list"]],["list",nDt,["paragraph","reference","blockquote"]],["reference",iDt],["html_block",mDt,["paragraph","reference","blockquote"]],["heading",bDt,["paragraph","reference","blockquote"]],["lheading",_Dt],["paragraph",yDt]];function Ow(){this.ruler=new ma;for(let n=0;n<Rw.length;n++)this.ruler.push(Rw[n][0],Rw[n][1],{alt:(Rw[n][2]||[]).slice()})}Ow.prototype.tokenize=function(n,e,t){const i=this.ruler.getRules(""),r=i.length,o=n.md.options.maxNesting;let s=e,a=!1;for(;s<t&&(n.line=s=n.skipEmptyLines(s),!(s>=t||n.sCount[s]<n.blkIndent));){if(n.level>=o){n.line=t;break}const l=n.line;let u=!1;for(let d=0;d<r;d++)if(u=i[d](n,s,t,!1),u){if(l>=n.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");n.tight=!a,n.isEmpty(n.line-1)&&(a=!0),s=n.line,s<t&&n.isEmpty(s)&&(a=!0,s++,n.line=s)}},Ow.prototype.parse=function(n,e,t,i){if(!n)return;const r=new this.State(n,e,t,i);this.tokenize(r,r.line,r.lineMax)},Ow.prototype.State=Yc;function j8(n,e,t,i){this.src=n,this.env=t,this.md=e,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}j8.prototype.pushPending=function(){const n=new ju("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n},j8.prototype.push=function(n,e,t){this.pending&&this.pushPending();const i=new ju(n,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},j8.prototype.scanDelims=function(n,e){const t=this.posMax,i=this.src.charCodeAt(n),r=n>0?this.src.charCodeAt(n-1):32;let o=n;for(;o<t&&this.src.charCodeAt(o)===i;)o++;const s=o-n,a=o<t?this.src.charCodeAt(o):32,l=H8(r)||z8(String.fromCharCode(r)),u=H8(a)||z8(String.fromCharCode(a)),d=V8(r),h=V8(a),f=!h&&(!u||d||l),p=!d&&(!l||h||u);return{can_open:f&&(e||!p||l),can_close:p&&(e||!f||u),length:s}},j8.prototype.Token=ju;function vDt(n){switch(n){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function CDt(n,e){let t=n.pos;for(;t<n.posMax&&!vDt(n.src.charCodeAt(t));)t++;return t===n.pos?!1:(e||(n.pending+=n.src.slice(n.pos,t)),n.pos=t,!0)}const wDt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function xDt(n,e){if(!n.md.options.linkify||n.linkLevel>0)return!1;const t=n.pos,i=n.posMax;if(t+3>i||n.src.charCodeAt(t)!==58||n.src.charCodeAt(t+1)!==47||n.src.charCodeAt(t+2)!==47)return!1;const r=n.pending.match(wDt);if(!r)return!1;const o=r[1],s=n.md.linkify.matchAtStart(n.src.slice(t-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;a=a.replace(/\*+$/,"");const l=n.md.normalizeLink(a);if(!n.md.validateLink(l))return!1;if(!e){n.pending=n.pending.slice(0,-o.length);const u=n.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const d=n.push("text","",0);d.content=n.md.normalizeLinkText(a);const h=n.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return n.pos+=a.length-o.length,!0}function SDt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==10)return!1;const i=n.pending.length-1,r=n.posMax;if(!e)if(i>=0&&n.pending.charCodeAt(i)===32)if(i>=1&&n.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&n.pending.charCodeAt(o-1)===32;)o--;n.pending=n.pending.slice(0,o),n.push("hardbreak","br",0)}else n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0);else n.push("softbreak","br",0);for(t++;t<r&&Ui(n.src.charCodeAt(t));)t++;return n.pos=t,!0}const IO=[];for(let n=0;n<256;n++)IO.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){IO[n.charCodeAt(0)]=1});function DDt(n,e){let t=n.pos;const i=n.posMax;if(n.src.charCodeAt(t)!==92||(t++,t>=i))return!1;let r=n.src.charCodeAt(t);if(r===10){for(e||n.push("hardbreak","br",0),t++;t<i&&(r=n.src.charCodeAt(t),!!Ui(r));)t++;return n.pos=t,!0}let o=n.src[t];if(r>=55296&&r<=56319&&t+1<i){const a=n.src.charCodeAt(t+1);a>=56320&&a<=57343&&(o+=n.src[t+1],t++)}const s="\\"+o;if(!e){const a=n.push("text_special","",0);r<256&&IO[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return n.pos=t+1,!0}function NDt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=n.posMax;for(;t<o&&n.src.charCodeAt(t)===96;)t++;const s=n.src.slice(r,t),a=s.length;if(n.backticksScanned&&(n.backticks[a]||0)<=r)return e||(n.pending+=s),n.pos+=a,!0;let l=t,u;for(;(u=n.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&n.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===a){if(!e){const h=n.push("code_inline","code",0);h.markup=s,h.content=n.src.slice(t,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return n.pos=l,!0}n.backticks[d]=u}return n.backticksScanned=!0,e||(n.pending+=s),n.pos+=a,!0}function EDt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==126)return!1;const r=n.scanDelims(n.pos,!0);let o=r.length;const s=String.fromCharCode(i);if(o<2)return!1;let a;o%2&&(a=n.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=n.push("text","",0),a.content=s+s,n.delimiters.push({marker:i,length:0,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return n.pos+=r.length,!0}function Bde(n,e){let t;const i=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];if(s.marker!==126||s.end===-1)continue;const a=e[s.end];t=n.tokens[s.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=n.tokens[a.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",n.tokens[a.token-1].type==="text"&&n.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){const o=i.pop();let s=o+1;for(;s<n.tokens.length&&n.tokens[s].type==="s_close";)s++;s--,o!==s&&(t=n.tokens[s],n.tokens[s]=n.tokens[o],n.tokens[o]=t)}}function kDt(n){const e=n.tokens_meta,t=n.tokens_meta.length;Bde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&Bde(n,e[i].delimiters)}const Vde={tokenize:EDt,postProcess:kDt};function LDt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==95&&i!==42)return!1;const r=n.scanDelims(n.pos,i===42);for(let o=0;o<r.length;o++){const s=n.push("text","",0);s.content=String.fromCharCode(i),n.delimiters.push({marker:i,length:r.length,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return n.pos+=r.length,!0}function zde(n,e){const t=e.length;for(let i=t-1;i>=0;i--){const r=e[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],s=i>0&&e[i-1].end===r.end+1&&e[i-1].marker===r.marker&&e[i-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=n.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const u=n.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(n.tokens[e[i-1].token].content="",n.tokens[e[r.end+1].token].content="",i--)}}function MDt(n){const e=n.tokens_meta,t=n.tokens_meta.length;zde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&zde(n,e[i].delimiters)}const Hde={tokenize:LDt,postProcess:MDt};function TDt(n,e){let t,i,r,o,s="",a="",l=n.pos,u=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;const d=n.pos,h=n.posMax,f=n.pos+1,p=n.md.helpers.parseLinkLabel(n,n.pos,!0);if(p<0)return!1;let g=p+1;if(g<h&&n.src.charCodeAt(g)===40){for(u=!1,g++;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(g>=h)return!1;if(l=g,r=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),r.ok){for(s=n.md.normalizeLink(r.str),n.md.validateLink(s)?g=r.pos:s="",l=g;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(r=n.md.helpers.parseLinkTitle(n.src,g,n.posMax),g<h&&l!==g&&r.ok)for(a=r.str,g=r.pos;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);}(g>=h||n.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof n.env.references>"u")return!1;if(g<h&&n.src.charCodeAt(g)===91?(l=g+1,g=n.md.helpers.parseLinkLabel(n,g),g>=0?i=n.src.slice(l,g++):g=p+1):g=p+1,i||(i=n.src.slice(f,p)),o=n.env.references[Aw(i)],!o)return n.pos=d,!1;s=o.href,a=o.title}if(!e){n.pos=f,n.posMax=p;const m=n.push("link_open","a",1),y=[["href",s]];m.attrs=y,a&&y.push(["title",a]),n.linkLevel++,n.md.inline.tokenize(n),n.linkLevel--,n.push("link_close","a",-1)}return n.pos=g,n.posMax=h,!0}function ADt(n,e){let t,i,r,o,s,a,l,u,d="";const h=n.pos,f=n.posMax;if(n.src.charCodeAt(n.pos)!==33||n.src.charCodeAt(n.pos+1)!==91)return!1;const p=n.pos+2,g=n.md.helpers.parseLinkLabel(n,n.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&n.src.charCodeAt(o)===40){for(o++;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(o>=f)return!1;for(u=o,a=n.md.helpers.parseLinkDestination(n.src,o,n.posMax),a.ok&&(d=n.md.normalizeLink(a.str),n.md.validateLink(d)?o=a.pos:d=""),u=o;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(a=n.md.helpers.parseLinkTitle(n.src,o,n.posMax),o<f&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);else l="";if(o>=f||n.src.charCodeAt(o)!==41)return n.pos=h,!1;o++}else{if(typeof n.env.references>"u")return!1;if(o<f&&n.src.charCodeAt(o)===91?(u=o+1,o=n.md.helpers.parseLinkLabel(n,o),o>=0?r=n.src.slice(u,o++):o=g+1):o=g+1,r||(r=n.src.slice(p,g)),s=n.env.references[Aw(r)],!s)return n.pos=h,!1;d=s.href,l=s.title}if(!e){i=n.src.slice(p,g);const m=[];n.md.inline.parse(i,n.md,n.env,m);const y=n.push("image","img",0),b=[["src",d],["alt",""]];y.attrs=b,y.children=m,y.content=i,l&&b.push(["title",l])}return n.pos=o,n.posMax=f,!0}const IDt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,RDt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ODt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==60)return!1;const i=n.pos,r=n.posMax;for(;;){if(++t>=r)return!1;const s=n.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}const o=n.src.slice(i+1,t);if(RDt.test(o)){const s=n.md.normalizeLink(o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}if(IDt.test(o)){const s=n.md.normalizeLink("mailto:"+o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}return!1}function FDt(n){return/^<a[>\s]/i.test(n)}function PDt(n){return/^<\/a\s*>/i.test(n)}function BDt(n){const e=n|32;return e>=97&&e<=122}function VDt(n,e){if(!n.md.options.html)return!1;const t=n.posMax,i=n.pos;if(n.src.charCodeAt(i)!==60||i+2>=t)return!1;const r=n.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!BDt(r))return!1;const o=n.src.slice(i).match(pDt);if(!o)return!1;if(!e){const s=n.push("html_inline","",0);s.content=o[0],FDt(s.content)&&n.linkLevel++,PDt(s.content)&&n.linkLevel--}return n.pos+=o[0].length,!0}const zDt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,HDt=/^&([a-z][a-z0-9]{1,31});/i;function jDt(n,e){const t=n.pos,i=n.posMax;if(n.src.charCodeAt(t)!==38||t+1>=i)return!1;if(n.src.charCodeAt(t+1)===35){const o=n.src.slice(t).match(zDt);if(o){if(!e){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=n.push("text_special","",0);a.content=LO(s)?Tw(s):Tw(65533),a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}else{const o=n.src.slice(t).match(HDt);if(o){const s=Nde(o[0]);if(s!==o[0]){if(!e){const a=n.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}}return!1}function jde(n){const e={},t=n.length;if(!t)return;let i=0,r=-2;const o=[];for(let s=0;s<t;s++){const a=n[s];if(o.push(0),(n[i].marker!==a.marker||r!==a.token-1)&&(i=s),r=a.token,a.length=a.length||0,!a.close)continue;e.hasOwnProperty(a.marker)||(e[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[a.marker][(a.open?3:0)+a.length%3];let u=i-o[i]-1,d=u;for(;u>l;u-=o[u]+1){const h=n[u];if(h.marker===a.marker&&h.open&&h.end<0){let f=!1;if((h.close||a.open)&&(h.length+a.length)%3===0&&(h.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=u>0&&!n[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,h.end=s,h.close=!1,d=-1,r=-2;break}}}d!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function WDt(n){const e=n.tokens_meta,t=n.tokens_meta.length;jde(n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&jde(e[i].delimiters)}function $Dt(n){let e,t,i=0;const r=n.tokens,o=n.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&i--,r[e].level=i,r[e].nesting>0&&i++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const RO=[["text",CDt],["linkify",xDt],["newline",SDt],["escape",DDt],["backticks",NDt],["strikethrough",Vde.tokenize],["emphasis",Hde.tokenize],["link",TDt],["image",ADt],["autolink",ODt],["html_inline",VDt],["entity",jDt]],OO=[["balance_pairs",WDt],["strikethrough",Vde.postProcess],["emphasis",Hde.postProcess],["fragments_join",$Dt]];function W8(){this.ruler=new ma;for(let n=0;n<RO.length;n++)this.ruler.push(RO[n][0],RO[n][1]);this.ruler2=new ma;for(let n=0;n<OO.length;n++)this.ruler2.push(OO[n][0],OO[n][1])}W8.prototype.skipToken=function(n){const e=n.pos,t=this.ruler.getRules(""),i=t.length,r=n.md.options.maxNesting,o=n.cache;if(typeof o[e]<"u"){n.pos=o[e];return}let s=!1;if(n.level<r){for(let a=0;a<i;a++)if(n.level++,s=t[a](n,!0),n.level--,s){if(e>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}else n.pos=n.posMax;s||n.pos++,o[e]=n.pos},W8.prototype.tokenize=function(n){const e=this.ruler.getRules(""),t=e.length,i=n.posMax,r=n.md.options.maxNesting;for(;n.pos<i;){const o=n.pos;let s=!1;if(n.level<r){for(let a=0;a<t;a++)if(s=e[a](n,!1),s){if(o>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(n.pos>=i)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()},W8.prototype.parse=function(n,e,t,i){const r=new this.State(n,e,t,i);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](r)},W8.prototype.State=j8;function UDt(n){const e={};n=n||{},e.src_Any=Cde.source,e.src_Cc=wde.source,e.src_Z=Sde.source,e.src_P=DO.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(n["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function FO(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(i){n[i]=t[i]})}),n}function Fw(n){return Object.prototype.toString.call(n)}function qDt(n){return Fw(n)==="[object String]"}function KDt(n){return Fw(n)==="[object Object]"}function GDt(n){return Fw(n)==="[object RegExp]"}function Wde(n){return Fw(n)==="[object Function]"}function YDt(n){return n.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const $de={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function QDt(n){return Object.keys(n||{}).reduce(function(e,t){return e||$de.hasOwnProperty(t)},!1)}const ZDt={"http:":{validate:function(n,e,t){const i=n.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(i)?i.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(n,e,t){const i=n.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(i)?e>=3&&n[e-3]===":"||e>=3&&n[e-3]==="/"?0:i.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(n,e,t){const i=n.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(i)?i.match(t.re.mailto)[0].length:0}}},XDt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",JDt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function eNt(n){n.__index__=-1,n.__text_cache__=""}function tNt(n){return function(e,t){const i=e.slice(t);return n.test(i)?i.match(n)[0].length:0}}function Ude(){return function(n,e){e.normalize(n)}}function Pw(n){const e=n.re=UDt(n.__opts__),t=n.__tlds__.slice();n.onCompile(),n.__tlds_replaced__||t.push(XDt),t.push(e.src_xn),e.src_tlds=t.join("|");function i(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(i(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(i(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(i(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(i(e.tpl_host_fuzzy_test),"i");const r=[];n.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(n.__schemas__).forEach(function(a){const l=n.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(n.__compiled__[a]=u,KDt(l)){GDt(l.validate)?u.validate=tNt(l.validate):Wde(l.validate)?u.validate=l.validate:o(a,l),Wde(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=Ude();return}if(qDt(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){n.__compiled__[n.__schemas__[a]]&&(n.__compiled__[a].validate=n.__compiled__[n.__schemas__[a]].validate,n.__compiled__[a].normalize=n.__compiled__[n.__schemas__[a]].normalize)}),n.__compiled__[""]={validate:null,normalize:Ude()};const s=Object.keys(n.__compiled__).filter(function(a){return a.length>0&&n.__compiled__[a]}).map(YDt).join("|");n.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","i"),n.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","ig"),n.re.schema_at_start=RegExp("^"+n.re.schema_search.source,"i"),n.re.pretest=RegExp("("+n.re.schema_test.source+")|("+n.re.host_fuzzy_test.source+")|@","i"),eNt(n)}function nNt(n,e){const t=n.__index__,i=n.__last_index__,r=n.__text_cache__.slice(t,i);this.schema=n.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=i+e,this.raw=r,this.text=r,this.url=r}function PO(n,e){const t=new nNt(n,e);return n.__compiled__[t.schema].normalize(t,n),t}function Ua(n,e){if(!(this instanceof Ua))return new Ua(n,e);e||QDt(n)&&(e=n,n={}),this.__opts__=FO({},$de,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=FO({},ZDt,n),this.__compiled__={},this.__tlds__=JDt,this.__tlds_replaced__=!1,this.re={},Pw(this)}Ua.prototype.add=function(e,t){return this.__schemas__[e]=t,Pw(this),this},Ua.prototype.set=function(e){return this.__opts__=FO(this.__opts__,e),this},Ua.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,i,r,o,s,a,l,u,d;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(t=l.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],l.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(i=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=i.index+i[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=e.indexOf("@"),d>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},Ua.prototype.pretest=function(e){return this.re.pretest.test(e)},Ua.prototype.testSchemaAt=function(e,t,i){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,i,this):0},Ua.prototype.match=function(e){const t=[];let i=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(PO(this,i)),i=this.__last_index__);let r=i?e.slice(i):e;for(;this.test(r);)t.push(PO(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return t.length?t:null},Ua.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const i=this.testSchemaAt(e,t[2],t[0].length);return i?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i,PO(this,0)):null},Ua.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Pw(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Pw(this),this)},Ua.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Ua.prototype.onCompile=function(){};const gg=2147483647,Qc=36,BO=1,$8=26,iNt=38,rNt=700,qde=72,Kde=128,Gde="-",oNt=/^xn--/,sNt=/[^\0-\x7F]/,aNt=/[\x2E\u3002\uFF0E\uFF61]/g,lNt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},VO=Qc-BO,Zc=Math.floor,zO=String.fromCharCode;function Ch(n){throw new RangeError(lNt[n])}function uNt(n,e){const t=[];let i=n.length;for(;i--;)t[i]=e(n[i]);return t}function Yde(n,e){const t=n.split("@");let i="";t.length>1&&(i=t[0]+"@",n=t[1]),n=n.replace(aNt,".");const r=n.split("."),o=uNt(r,e).join(".");return i+o}function Qde(n){const e=[];let t=0;const i=n.length;for(;t<i;){const r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){const o=n.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const cNt=n=>String.fromCodePoint(...n),dNt=function(n){return n>=48&&n<58?26+(n-48):n>=65&&n<91?n-65:n>=97&&n<123?n-97:Qc},Zde=function(n,e){return n+22+75*(n<26)-((e!=0)<<5)},Xde=function(n,e,t){let i=0;for(n=t?Zc(n/rNt):n>>1,n+=Zc(n/e);n>VO*$8>>1;i+=Qc)n=Zc(n/VO);return Zc(i+(VO+1)*n/(n+iNt))},Jde=function(n){const e=[],t=n.length;let i=0,r=Kde,o=qde,s=n.lastIndexOf(Gde);s<0&&(s=0);for(let a=0;a<s;++a)n.charCodeAt(a)>=128&&Ch("not-basic"),e.push(n.charCodeAt(a));for(let a=s>0?s+1:0;a<t;){const l=i;for(let d=1,h=Qc;;h+=Qc){a>=t&&Ch("invalid-input");const f=dNt(n.charCodeAt(a++));f>=Qc&&Ch("invalid-input"),f>Zc((gg-i)/d)&&Ch("overflow"),i+=f*d;const p=h<=o?BO:h>=o+$8?$8:h-o;if(f<p)break;const g=Qc-p;d>Zc(gg/g)&&Ch("overflow"),d*=g}const u=e.length+1;o=Xde(i-l,u,l==0),Zc(i/u)>gg-r&&Ch("overflow"),r+=Zc(i/u),i%=u,e.splice(i++,0,r)}return String.fromCodePoint(...e)},e0e=function(n){const e=[];n=Qde(n);const t=n.length;let i=Kde,r=0,o=qde;for(const l of n)l<128&&e.push(zO(l));const s=e.length;let a=s;for(s&&e.push(Gde);a<t;){let l=gg;for(const d of n)d>=i&&d<l&&(l=d);const u=a+1;l-i>Zc((gg-r)/u)&&Ch("overflow"),r+=(l-i)*u,i=l;for(const d of n)if(d<i&&++r>gg&&Ch("overflow"),d===i){let h=r;for(let f=Qc;;f+=Qc){const p=f<=o?BO:f>=o+$8?$8:f-o;if(h<p)break;const g=h-p,m=Qc-p;e.push(zO(Zde(p+g%m,0))),h=Zc(g/m)}e.push(zO(Zde(h,0))),o=Xde(r,u,a===s),r=0,++a}++r,++i}return e.join("")},t0e={version:"2.3.1",ucs2:{decode:Qde,encode:cNt},decode:Jde,encode:e0e,toASCII:function(n){return Yde(n,function(e){return sNt.test(e)?"xn--"+e0e(e):e})},toUnicode:function(n){return Yde(n,function(e){return oNt.test(e)?Jde(e.slice(4).toLowerCase()):e})}},hNt={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},fNt=/^(vbscript|javascript|file|data):/,pNt=/^data:image\/(gif|png|jpeg|webp);/;function gNt(n){const e=n.trim().toLowerCase();return fNt.test(e)?pNt.test(e):!0}const n0e=["http:","https:","mailto:"];function mNt(n){const e=SO(n,!0);if(e.hostname&&(!e.protocol||n0e.indexOf(e.protocol)>=0))try{e.hostname=t0e.toASCII(e.hostname)}catch{}return B8(xO(e))}function bNt(n){const e=SO(n,!0);if(e.hostname&&(!e.protocol||n0e.indexOf(e.protocol)>=0))try{e.hostname=t0e.toUnicode(e.hostname)}catch{}return dg(xO(e),dg.defaultChars+"%")}function Il(n,e){if(!(this instanceof Il))return new Il(n,e);e||kO(n)||(e=n||{},n="default"),this.inline=new W8,this.block=new Ow,this.core=new TO,this.renderer=new fg,this.linkify=new Ua,this.validateLink=gNt,this.normalizeLink=mNt,this.normalizeLinkText=bNt,this.utils=DSt,this.helpers=Mw({},LSt),this.options={},this.configure(n),e&&this.set(e)}Il.prototype.set=function(n){return Mw(this.options,n),this},Il.prototype.configure=function(n){const e=this;if(kO(n)){const t=n;if(n=hNt[t],!n)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&e.set(n.options),n.components&&Object.keys(n.components).forEach(function(t){n.components[t].rules&&e[t].ruler.enableOnly(n.components[t].rules),n.components[t].rules2&&e[t].ruler2.enableOnly(n.components[t].rules2)}),this},Il.prototype.enable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(n,!0))},this),t=t.concat(this.inline.ruler2.enable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Il.prototype.disable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(n,!0))},this),t=t.concat(this.inline.ruler2.disable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Il.prototype.use=function(n){const e=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,e),this},Il.prototype.parse=function(n,e){if(typeof n!="string")throw new Error("Input data should be a String");const t=new this.core.State(n,this,e);return this.core.process(t),t.tokens},Il.prototype.render=function(n,e){return e=e||{},this.renderer.render(this.parse(n,e),this.options,e)},Il.prototype.parseInline=function(n,e){const t=new this.core.State(n,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},Il.prototype.renderInline=function(n,e){return e=e||{},this.renderer.render(this.parseInline(n,e),this.options,e)};const _Nt=["innerHTML"],yNt={__name:"FactorDescription",props:c.mergeModels({factorType:{type:String,default:"模版"},data:{type:Array,default:[]}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(n){const{request:e}=c.inject("stConfig"),t=new Il,i=c.ref(""),r=c.useModel(n,"visible");return c.onMounted(async()=>{const{data:o}=await e.post("/middleLayer/special/getOss",{url:"resource/factor_select.md"}),s=new Uint8Array(o.data),l=new TextDecoder("utf-8").decode(s);i.value=t.render(l)}),(o,s)=>{const a=GS,l=KS,u=Sd,d=s1;return c.openBlock(),c.createBlock(d,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=h=>r.value=h),title:n.factorType==="模版"?"因子说明":"脚本编写说明",width:"1000","align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:c.withCtx(()=>[c.createVNode(u,{height:"500px"},{default:c.withCtx(()=>[n.factorType==="模版"?(c.openBlock(),c.createBlock(l,{key:0,data:n.data,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(a,{prop:"factorName",label:"因子名称",width:"200"}),c.createVNode(a,{prop:"factorDesc",label:"因子说明"}),c.createVNode(a,{prop:"factorScoreDefine",label:"分值定义"})]),_:1},8,["data"])):c.createCommentVNode("",!0),n.factorType==="脚本"?(c.openBlock(),c.createElementBlock("div",{key:1,class:"markdown-body",innerHTML:i.value},null,8,_Nt)):c.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}},XTt="",i0e=n=>(c.pushScopeId("data-v-13053ba7"),n=n(),c.popScopeId(),n),vNt={class:"factor-screen"},CNt={style:{"white-space":"pre-line"}},wNt={class:"custom-header"},xNt={class:"left"},SNt=["id"],DNt={class:"right"},NNt={class:"form-row"},ENt={class:"index"},kNt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},LNt=i0e(()=>c.createElementVNode("span",null,"~",-1)),MNt=i0e(()=>c.createElementVNode("span",null,"&&代表and,||代表or",-1)),TNt={class:"dialog-footer"},ANt=In({__name:"index",props:c.mergeModels({config:{type:Object,default:{sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]}}},{data:{default:{list:[],sqlEnable:0,sqlValue:null}},dataModifiers:{}}),emits:["update:data"],setup(n){const e=n,t=c.useModel(n,"data"),i=c.ref(),r=c.ref(),o=c.ref(!1),s=c.ref(!1),a=c.ref("模版"),l=c.ref(null),u=c.ref({list:[{cycle:e.config.cycleDefault??null,factor:null,score:[null,null]}],sqlEnable:0,sqlValue:null,factorSelectExpr:""});c.watch(()=>[a.value,o.value],()=>{(a.value==="模版"||o.value===!1)&&r.value.close()},{deep:!0});const d=()=>{const{list:_,sqlEnable:v,sqlValue:w,factorSelectExpr:x}=t.value;u.value={list:JSON.parse(JSON.stringify(_)),sqlEnable:v,sqlValue:w,factorSelectExpr:x},u.value.list.length||p(),o.value=!0,c.nextTick(()=>{x?(a.value="脚本",i.value.setValue(x)):a.value="模版",i.value.resize()})},h=()=>{if(a.value==="模版")l.value.validate(_=>{const{list:v,sqlEnable:w,sqlValue:x}=u.value;if(_){if(w){if(!x)return mi.error("SQL语句不能为空");const S=fde(x),D=v.map((L,E)=>`条件${E+1}`),N=S.filter(L=>!D.includes(L));if(N.length)return mi.error(`请检查SQL语句, 不存在[${N}]`)}t.value={list:JSON.parse(JSON.stringify(v)),sqlEnable:w,sqlValue:x,factorSelectExpr:""},o.value=!1}});else{const _=i.value.getValue();if(!_)return mi.error("请输入脚本语句");t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:_},o.value=!1}},f=_=>{u.value.list.splice(_,1)},p=_=>{switch(_){case"compare":{u.value.list.push({key:"compare",cycle:e.config.cycleDefault??null,factor:null,compareType:">",cycle2:e.config.cycleDefault??null,factor2:null});break}default:{u.value.list.push({cycle:e.config.cycleDefault??null,factor:null,score:[null,null]});break}}},g=()=>{l.value.validate(_=>{if(_)if(u.value.sqlValue){const v=fde(u.value.sqlValue);u.value.sqlValue=u.value.list.reduce((w,x,S)=>(v.includes(`条件${S+1}`)||(w+=`&& 条件${S+1} `),w),u.value.sqlValue)}else u.value.sqlValue=u.value.list.reduce((v,w,x)=>(x===0?v+=`条件${x+1} `:v+=`&& 条件${x+1} `,v),"")})},m=_=>{switch(_.key){case"compare":{const{cycle:v,factor:w,compareType:x,cycle2:S,factor2:D}=_;let N="";return N+=` ${e.config.cycleOptions.find(({value:L})=>L===v).label}`,N+=` ${e.config.factorOptions.find(({value:L})=>L===w).label}`,N+=` ${x}`,N+=` ${e.config.cycleOptions.find(({value:L})=>L===S).label}`,N+=` ${e.config.factorOptions.find(({value:L})=>L===D).label}`,N}default:{const{cycle:v,factor:w,score:x}=_;let S="";return S+=` ${e.config.cycleOptions.find(({value:D})=>D===v).label}`,S+=` ${e.config.factorOptions.find(({value:D})=>D===w).label}`,S+=` ${x[0]||x[0]===0?`${x[0]}分`:"∞"}`,S+=" ~",S+=` ${x[1]||x[1]===0?`${x[1]}分`:"∞"}`,S}}},y=(_,v)=>{switch(_){case"sqlTag":{t.value={list:[],sqlEnable:0,sqlValue:null};break}case"factorTag":{t.value.list.splice(v,1);break}case"scriptTag":{TH.confirm("是否确认删除因子筛选: 脚本模式","删除操作",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""}});break}}},b=()=>{r.value.open(i.value)},C=_=>{if(!i.value)return mi.error("未检测到编辑器实例");const v=_,w=i.value.getInstance(),x=w.getPosition(),D=i.value.getValue().split(`
824
- `);if(x.lineNumber<=D.length){const N=x.lineNumber-1,L=D[N],E=L.substring(0,x.column-1)+v+L.substring(x.column-1);D[N]=E;const k=D.join(`
825
- `);i.value.setValue(k);const A=x.column+v.length;w.setPosition({lineNumber:x.lineNumber,column:A}),w.focus()}};return(_,v)=>{var oe;const w=wH,x=N6,S=uz,D=Ko,N=yn,L=rl,E=_V,k=Gx,A=c.resolveComponent("st-customFunction"),R=ql,B=Ul,I=I6,T=R6,O=Kx,P=jl,U=A6,Y=Sd,$=s1,z=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",vNt,[c.createElementVNode("div",null,[t.value.sqlEnable&&t.value.sqlValue?(c.openBlock(),c.createBlock(x,{key:0,closable:"",type:"info",title:t.value.sqlValue,onClose:v[0]||(v[0]=ue=>y("sqlTag"))},{default:c.withCtx(()=>[c.createVNode(w,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):c.createCommentVNode("",!0),!t.value.sqlEnable&&t.value.list.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(t.value.list,(ue,le)=>(c.openBlock(),c.createBlock(x,{closable:"",type:"info",onClose:X=>y("factorTag",le)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m(ue)),1)]),_:2},1032,["onClose"]))),256)):c.createCommentVNode("",!0),t.value.factorSelectExpr?(c.openBlock(),c.createBlock(S,{key:2,width:"500",placement:"bottom-start"},{reference:c.withCtx(()=>[c.createVNode(x,{closable:"",type:"info",onClose:v[1]||(v[1]=ue=>y("scriptTag"))},{default:c.withCtx(()=>[c.createTextVNode(" 脚本模式 ")]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",CNt,c.toDisplayString(t.value.factorSelectExpr),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(D,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),c.createVNode($,{"modal-class":"factor-dialog",modelValue:o.value,"onUpdate:modelValue":v[8]||(v[8]=ue=>o.value=ue),width:"1000","align-center":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ue,titleClass:le})=>[c.createElementVNode("div",wNt,[c.createElementVNode("div",xNt,[c.createElementVNode("span",{id:ue,class:c.normalizeClass(le)}," 因子筛选 ",10,SNt),c.createVNode(L,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:c.withCtx(()=>[c.createVNode(N,{onClick:v[2]||(v[2]=X=>s.value=!0)},{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:1}),c.createVNode(k,{modelValue:a.value,"onUpdate:modelValue":v[3]||(v[3]=X=>a.value=X),size:"small"},{default:c.withCtx(()=>[c.createVNode(E,{label:"模版",value:"模版"}),c.createVNode(E,{label:"脚本",value:"脚本"})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(A,{size:"small",onInsert:C},null,512),[[c.vShow,a.value==="脚本"]])]),c.createElementVNode("div",DNt,[a.value==="脚本"?(c.openBlock(),c.createBlock(D,{key:0,size:"small",type:"primary",onClick:b},{default:c.withCtx(()=>[c.createTextVNode("变量选择器")]),_:1})):c.createCommentVNode("",!0),c.createVNode(N,{onClick:v[4]||(v[4]=X=>o.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(xd))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",TNt,[c.createVNode(D,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[a.value==="模版"?(c.openBlock(),c.createBlock(Y,{key:0,height:"400px"},{default:c.withCtx(()=>[c.createVNode(U,{ref_key:"dialogFormRef",ref:l,model:u.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.list,(ue,le)=>(c.openBlock(),c.createElementBlock("div",NNt,[c.createElementVNode("span",ENt,c.toDisplayString(`条件${le+1}`),1),ue.key==="compare"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{style:{width:"52px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.compareType,"onUpdate:modelValue":X=>ue.compareType=X,size:"small"},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([">",">=","<","<="],X=>c.createVNode(R,{label:X,value:X,key:X},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:1,prop:"list."+le+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle2,"onUpdate:modelValue":X=>ue.cycle2=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor2,"onUpdate:modelValue":X=>ue.factor2=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[1,3].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{prop:"list."+le+".score",rules:{validator:c.unref(Vxt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createElementVNode("div",kNt,[c.createVNode(T,{modelValue:ue.score[0],"onUpdate:modelValue":X=>ue.score[0]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),LNt,c.createVNode(T,{modelValue:ue.score[1],"onUpdate:modelValue":X=>ue.score[1]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),c.createVNode(N,{onClick:X=>f(le)},{default:c.withCtx(()=>[c.createVNode(c.unref(_x))]),_:2},1032,["onClick"])]))),256)),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:p,style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子")]),_:1},8,["icon"]),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:v[5]||(v[5]=ue=>p("compare")),style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(I,{label:"SQL功能: "},{default:c.withCtx(()=>[c.createVNode(k,{modelValue:u.value.sqlEnable,"onUpdate:modelValue":v[6]||(v[6]=ue=>u.value.sqlEnable=ue)},{default:c.withCtx(()=>[c.createVNode(O,{label:"关闭",value:0}),c.createVNode(O,{label:"启用",value:1})]),_:1},8,["modelValue"]),u.value.sqlEnable?(c.openBlock(),c.createBlock(D,{key:0,type:"primary",size:"small",onClick:g,style:{"margin-left":"auto"}},{default:c.withCtx(()=>[c.createTextVNode("生成SQL")]),_:1})):c.createCommentVNode("",!0)]),_:1}),u.value.sqlEnable?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(P,{modelValue:u.value.sqlValue,"onUpdate:modelValue":v[7]||(v[7]=ue=>u.value.sqlValue=ue),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),MNt],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",{style:c.normalizeStyle([{width:"968px",height:"400px"},a.value==="脚本"?null:{position:"fixed",top:"-400px",zIndex:-1,visibility:"hidden",pointerEvents:"none"}])},[c.createVNode(cde,{ref_key:"monacoEditorRef",ref:i,language:"lua"},null,512)],4)]),_:1},8,["modelValue"])]),c.createVNode(yNt,{visible:s.value,"onUpdate:visible":v[9]||(v[9]=ue=>s.value=ue),factorType:a.value,data:(oe=n.config.factorDescriptions)==null?void 0:oe.filter(ue=>[1,3].includes(ue.type))},null,8,["visible","factorType","data"]),c.createVNode(z,{ref_key:"stVarSelectDialogRef",ref:r},null,512)],64)}}},[["__scopeId","data-v-13053ba7"]]),eAt="",Bw=n=>(c.pushScopeId("data-v-3e69da40"),n=n(),c.popScopeId(),n),INt={key:0,class:"common-indicator"},RNt={class:"indicator"},ONt=Bw(()=>c.createElementVNode("div",{class:"title"},[c.createElementVNode("span",null,"常用指标: "),c.createElementVNode("span",null,"不限")],-1)),FNt={class:"options"},PNt=["onClick"],BNt={class:"tags"},VNt=["onClick"],zNt={style:{"font-size":"18px"}},HNt={key:0,class:"out-box"},jNt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),WNt={key:0,class:"convenient-option-box"},$Nt={class:"out-box"},UNt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),qNt={key:0},KNt={key:0},GNt={key:0},YNt={key:1},QNt={class:"tFeaturelncomes-option-box"},ZNt={class:"tFeaturelncomes-out-box"},XNt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),JNt={key:2},eEt={key:3},tEt={key:4},nEt={key:5},iEt={key:6},rEt={style:{display:"flex","align-items":"center"}},oEt={key:7},sEt={class:"dialog-footer"},aEt=In({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],i=c.useModel(n,"data"),r=n,o=c.ref(!1),s=c.computed(()=>{var b;return(b=r.data.find(C=>C.radioType==="1"))==null?void 0:b.key}),a=c.computed(()=>{let b=[];return r.varietyMarket===null&&!r.commonOption.length?b=r.config.options:(b=r.config.options,r.varietyMarket&&(b=b.filter(({parent:C})=>C.varietyMarketIds.includes(r.varietyMarket))),r.commonOption.length&&(b=b.filter(({parent:C})=>{const{commonOptionIds:_}=C;return[...new Set([..._,...r.commonOption])].length!==[..._,...r.commonOption].length}))),b}),l=c.ref({}),u=c.ref({}),d=b=>{l.value=b;const C={key:b.key,type:b.type,label:b.label};switch(b.key){case"st":{u.value={...C,st:null};break}case"tFeaturelncomes":{u.value={...C,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{u.value={...C,priceLevels:null};break}case"peTtmLevels":{u.value={...C,peTtmLevels:null};break}case"optionsCpType":{u.value={...C,optionsCpType:null};break}case"perVolumn":{u.value={...C,radio:null,levels:[]};break}case"mainFlow":{u.value={...C,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{u.value={...C,enumType:null};break}default:u.value={...C,range:[null,null],unit:b.defaultUnit.length?[...b.defaultUnit]:[null,null],radioType:s.value&&s.value!==b.key?"0":b.defaultRadioType,rankRange:b.defaultRankRange||[null,null]}}o.value=!0},h=()=>{var C,_;switch(u.value.key){case"st":{const{label:v,st:w}=u.value;if(w===null)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w?"是":"否"}`;break}case"tFeaturelncomes":{const{label:v,rule:w,withFewYears:x,yearsCount:S,netProfit:D}=u.value;if(["",null].includes(x)||["",null].includes(S)||["",null].includes(D))return mi.warning("格式错误: 请填写完整");u.value.tagText=`${v}: ${x}年内${S}年以上盈利${w===1?"超":"跌"}过${D}亿`;break}case"priceLevels":{const{label:v,priceLevels:w}=u.value;if(!w||w.length===0)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"peTtmLevels":{const{label:v,peTtmLevels:w}=u.value;if(!w||w.length===0)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"optionsCpType":{const{label:v,optionsCpType:w}=u.value;if(w===null)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:v,radio:w,levels:x}=u.value;if(!w)return mi.warning("格式错误: 请选择时间");if(!(x!=null&&x.length))return mi.warning("格式错误: 请选择分位");u.value.tagText=`${v}: ${(C=e.find(S=>S.value===w))==null?void 0:C.label}${x.map(S=>`${S}分位`).join("、")}`;break}case"mainFlow":{const{label:v,radioType:w,radio:x,rankRange:S}=u.value,D=N=>{if(N===""||N===null||N===void 0)return!1;const L=Number(N);return!isNaN(L)};if(!x)return mi.warning("格式错误: 请选择时间");if(!D(S[0])&&!D(S[1]))return mi.warning(`格式错误: 请填写${w==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ${S[0]}${w==="0"?"%":""} ~ ${S[1]}${w==="0"?"%":""}`:["",null].includes(S[0])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≤${S[1]}${w==="0"?"%":""}`:u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≥${S[0]}${w==="0"?"%":""}`;break}case"auditOpinionType":{const{label:v,enumType:w}=u.value;if(w===null)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${(_=t.find(x=>x.value===w))==null?void 0:_.label}`;break}default:{const{label:v,unit:w,radioType:x}=u.value,S=x==="1"?u.value.rankRange:u.value.range;if(["",null].includes(S[0])&&["",null].includes(S[1]))return mi.warning("格式错误: 请至少填写一个值");if(x==="1"){const L=Number(S[0]),E=Number(S[1]);if(isNaN(L)||isNaN(E))return mi.warning("格式错误: 请填写数字");if(L<0||E<0)return mi.warning("格式错误: 请填写大于0的数字");if(L>E)return mi.warning("格式错误: 请填写正确的排名范围")}const D=x==="1"?"":w[0]??"",N=x==="1"?"":w[1]??"";!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}${x==="1"?"排名":""}: ${S[0]}${D} ~ ${S[1]}${N}`:["",null].includes(S[0])?u.value.tagText=`${v}${x==="1"?"排名":""}: ≤${S[1]}${N}`:u.value.tagText=`${v}${x==="1"?"排名":""}: ≥${S[0]}${D}`}}const b=i.value.findIndex(({key:v})=>v===u.value.key);b===-1?i.value.push(u.value):i.value.splice(b,1,u.value),o.value=!1},f=b=>{l.value=a.value.find(({key:C})=>C===b.key),u.value=JSON.parse(JSON.stringify(b)),o.value=!0},p=b=>{i.value.splice(b,1)},g=b=>{u.value.range=[...b.range],u.value.unit=[...b.unit]},m=b=>{switch(b){case"≤0":Object.assign(u.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(u.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};c.watch(()=>a.value,()=>{i.value.length&&(i.value=i.value.filter(({key:b})=>a.value.find(C=>C.key===b)))});const y=()=>{u.value.radio=null,u.value.rankRange=[null,null]};return(b,C)=>{const _=N6,v=_V,w=Gx,x=jl,S=Ko,D=ql,N=Ul,L=Kx,E=R6,k=s1;return n.config.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",INt,[c.createElementVNode("div",RNt,[ONt,c.createElementVNode("div",FNt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,A=>(c.openBlock(),c.createElementBlock("span",{key:A.key,onClick:R=>d(A)},c.toDisplayString(A.label),9,PNt))),128))])]),c.createElementVNode("div",BNt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(A,R)=>(c.openBlock(),c.createBlock(_,{closable:"",type:"info",onClose:B=>p(R)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(A.tagText),1),c.createElementVNode("span",{class:"edit",onClick:B=>f(A)},"编辑",8,VNt)]),_:2},1032,["onClose"]))),256))]),c.createVNode(k,{modelValue:o.value,"onUpdate:modelValue":C[26]||(C[26]=A=>o.value=A),title:l.value.label,width:"600","align-center":"","destroy-on-close":""},c.createSlots({footer:c.withCtx(()=>[c.createElementVNode("div",sEt,[c.createVNode(S,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>{var A;return[l.value.type===void 0&&u.value.radioType==="1"?(c.openBlock(),c.createElementBlock("div",HNt,[jNt,c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[2]||(C[2]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[3]||(C[3]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):l.value.type===void 0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[(A=l.value.convenientOptions)!=null&&A.length?(c.openBlock(),c.createElementBlock("div",WNt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.convenientOptions,R=>(c.openBlock(),c.createBlock(S,{key:R.text,onClick:B=>g(R)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",$Nt,[UNt,c.createVNode(x,{modelValue:u.value.range[0],"onUpdate:modelValue":C[5]||(C[5]=R=>u.value.range[0]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",qNt,c.toDisplayString(u.value.unit[0]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[0],"onUpdate:modelValue":C[4]||(C[4]=R=>u.value.unit[0]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.range[1],"onUpdate:modelValue":C[7]||(C[7]=R=>u.value.range[1]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",KNt,c.toDisplayString(u.value.unit[1]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[1],"onUpdate:modelValue":C[6]||(C[6]=R=>u.value.unit[1]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[l.value.key==="st"?(c.openBlock(),c.createElementBlock("div",GNt,[c.createVNode(w,{modelValue:u.value.st,"onUpdate:modelValue":C[8]||(C[8]=R=>u.value.st=R)},{default:c.withCtx(()=>[c.createVNode(L,{label:"是",value:1}),c.createVNode(L,{label:"否",value:0})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="tFeaturelncomes"?(c.openBlock(),c.createElementBlock("div",YNt,[c.createElementVNode("div",QNt,[c.createVNode(S,{onClick:C[9]||(C[9]=R=>m("≤0"))},{default:c.withCtx(()=>[c.createTextVNode("≤0")]),_:1}),c.createVNode(S,{onClick:C[10]||(C[10]=R=>m("≥0"))},{default:c.withCtx(()=>[c.createTextVNode("≥0")]),_:1}),c.createVNode(S,{onClick:C[11]||(C[11]=R=>m("五年内有四年以上盈利超过5千万"))},{default:c.withCtx(()=>[c.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),c.createVNode(S,{onClick:C[12]||(C[12]=R=>m("≥10亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥10亿")]),_:1}),c.createVNode(S,{onClick:C[13]||(C[13]=R=>m("≥20亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥20亿")]),_:1})]),c.createElementVNode("div",ZNt,[XNt,c.createElementVNode("div",null,[c.createVNode(E,{modelValue:u.value.withFewYears,"onUpdate:modelValue":C[14]||(C[14]=R=>u.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年内 "),c.createVNode(E,{modelValue:u.value.yearsCount,"onUpdate:modelValue":C[15]||(C[15]=R=>u.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年以上盈利"+c.toDisplayString(u.value.rule===1?"超":"跌")+"过 ",1),c.createVNode(E,{modelValue:u.value.netProfit,"onUpdate:modelValue":C[16]||(C[16]=R=>u.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 亿 ")])])])):c.createCommentVNode("",!0),l.value.key==="priceLevels"?(c.openBlock(),c.createElementBlock("div",JNt,[c.createVNode(N,{modelValue:u.value.priceLevels,"onUpdate:modelValue":C[17]||(C[17]=R=>u.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="peTtmLevels"?(c.openBlock(),c.createElementBlock("div",eEt,[c.createVNode(N,{modelValue:u.value.peTtmLevels,"onUpdate:modelValue":C[18]||(C[18]=R=>u.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="optionsCpType"?(c.openBlock(),c.createElementBlock("div",tEt,[c.createVNode(w,{modelValue:u.value.optionsCpType,"onUpdate:modelValue":C[19]||(C[19]=R=>u.value.optionsCpType=R)},{default:c.withCtx(()=>[c.createVNode(L,{label:"看涨",value:1}),c.createVNode(L,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="perVolumn"?(c.openBlock(),c.createElementBlock("div",nEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[20]||(C[20]=R=>u.value.radio=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(e,R=>c.createVNode(L,{key:R.value,value:R.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),c.createVNode(N,{modelValue:u.value.levels,"onUpdate:modelValue":C[21]||(C[21]=R=>u.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="mainFlow"?(c.openBlock(),c.createElementBlock("div",iEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[22]||(C[22]=R=>u.value.radio=R)},{default:c.withCtx(()=>[c.createVNode(L,{value:"3"},{default:c.withCtx(()=>[c.createTextVNode("3日")]),_:1}),c.createVNode(L,{value:"5"},{default:c.withCtx(()=>[c.createTextVNode("5日")]),_:1}),c.createVNode(L,{value:"10"},{default:c.withCtx(()=>[c.createTextVNode("10日")]),_:1}),c.createVNode(L,{value:"20"},{default:c.withCtx(()=>[c.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",rEt,[c.createElementVNode("span",null,c.toDisplayString(u.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[23]||(C[23]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[24]||(C[24]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):c.createCommentVNode("",!0),l.value.key==="auditOpinionType"?(c.openBlock(),c.createElementBlock("div",oEt,[c.createVNode(w,{modelValue:u.value.enumType,"onUpdate:modelValue":C[25]||(C[25]=R=>u.value.enumType=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(t,(R,B)=>c.createVNode(L,{key:B,label:R.label,value:R.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)],64))]}),_:2},[l.value.showRankType?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",zNt,c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[0]||(C[0]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"}},{default:c.withCtx(()=>[c.createVNode(v,{label:"数值",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:l.value.key==="mainFlow"?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",{style:{"font-size":"18px"}},c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[1]||(C[1]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"},onChange:y},{default:c.withCtx(()=>[c.createVNode(v,{label:"涨幅范围",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-3e69da40"]]),nAt="",mg=n=>(c.pushScopeId("data-v-efd872de"),n=n(),c.popScopeId(),n),lEt={class:"variety-search"},uEt={key:0,class:"variety-search-row"},cEt={class:"title"},dEt=mg(()=>c.createElementVNode("span",null,"品种市场: ",-1)),hEt={key:1,class:"variety-search-row"},fEt={class:"title"},pEt=mg(()=>c.createElementVNode("span",null,"常用选项: ",-1)),gEt={key:2,class:"variety-search-row"},mEt={class:"title"},bEt=mg(()=>c.createElementVNode("span",null,"上市板块: ",-1)),_Et={key:3,class:"variety-search-row"},yEt={class:"title"},vEt=mg(()=>c.createElementVNode("span",null,"自定标签: ",-1)),CEt={key:4,class:"variety-search-row"},wEt={class:"title"},xEt=mg(()=>c.createElementVNode("span",null,"价差转换: ",-1)),SEt={key:5,class:"variety-search-row"},DEt={class:"title"},NEt=mg(()=>c.createElementVNode("span",null,"因子筛选: ",-1)),EEt=In({__name:"index",props:c.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=c.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]});const r=c.computed(()=>{const h={};return Object.keys(hde).forEach(f=>{const p=hde[f],g=t.config[f]??{},m={...p,...g};h[f]=m}),h}),o=c.computed(()=>r.value.varietyMarket.options),s=c.computed(()=>{const{varietyMarket:h}=i.value;return h?o.value.find(({value:p})=>p===h).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(y=>y.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=c.computed(()=>{const{varietyMarket:h}=i.value;return h?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(h)):r.value.marketIds.options}),l=c.computed(()=>r.value.customTag.options),u=c.computed(()=>r.value.jcTranslate.jcOptions),d=h=>{switch(h){case"commonOption":{i.value[h]=[];break}case"marketIds":{i.value[h]=[];break}case"customTag":{i.value[h]=[];break}case"jcTranslate":{i.value[h]={type:null,jcList:[]};break}case"factorScreen":{i.value[h]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{i.value[h]=[];break}default:{i.value[h]=null;break}}};return c.watch(()=>s.value,h=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>h.find(({value:g})=>g===p)))}),c.watch(()=>a.value,h=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>h.find(({value:g})=>g===p)))}),e({formatData:h=>{var p,g,m,y,b,C;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(h.varietyMarket&&(f.exchangeId=String(h.varietyMarket)),(p=h.commonOption)!=null&&p.length&&(f.optionId=h.commonOption.join(",")),(g=h.marketIds)!=null&&g.length&&(f.marketIds=h.marketIds),(m=h.customTag)!=null&&m.length&&(f.tagIds=h.customTag),(y=r.value.jcTranslate)!=null&&y.show){const{jcTranslate:_}=h,{type:v,jcList:w}=_;switch(v){case 1:{f.translateType=1,f.jcType=w.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:_}=h;if((C=_==null?void 0:_.list)!=null&&C.length&&(f.tbFeatureFactorScores=_.list.map(v=>{switch(v.key){case"compare":return{freqId:v.cycle,factorId:v.factor,compareType:v.compareType,freqId2:v.cycle2,factorId2:v.factor2};default:return{freqId:v.cycle,factorId:v.factor,startScore:v.score[0],endScore:v.score[1]}}})),_.sqlEnable){const v=_.list.reduce((x,S,D)=>{var L,E;const N=`条件${D+1}`;switch(S.key){case"compare":{let k="";(L=r.value.factorScreen)!=null&&L.cycleShow?k=`freq_id = ${S.cycle} and factor_id = ${S.factor} ${S.compareType} freq_id = ${S.cycle2} and factor_id = ${S.factor2}`:k=`factor_id = ${S.factor} ${S.compareType} factor_id = ${S.factor2}`,x.set(N,`(${k})`);break}default:{let k=`factor_id = ${S.factor} and `;(E=r.value.factorScreen)!=null&&E.cycleShow&&(k=`freq_id = ${S.cycle} and factor_id = ${S.factor} and `),(S.score[0]||S.score[0]===0)&&(S.score[1]||S.score[1]===0)?k+=`score >= ${S.score[0]} and score <= ${S.score[1]}`:S.score[0]||S.score[0]===0?k+=`score >= ${S.score[0]}`:(S.score[1]||S.score[1]===0)&&(k+=`score <= ${S.score[1]}`),x.set(N,`(${k})`)}}return x},new Map([]));let w=_.sqlValue;for(const[x,S]of v){const D=new RegExp(x,"g");w=w.replace(D,S)}f.sql=w,f.sqlExpression=_.sqlValue}f.enableSql=_.sqlEnable===1?2:1,_.factorSelectExpr&&(f.factorSelectExpr=_.factorSelectExpr)}{const _=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],v=h.commonIndicator.reduce((E,k)=>{const{key:A,type:R,range:B,unit:I,radioType:T,radio:O,rankRange:P}=k;if(A==="mainFlow"){let[U,Y]=P,$=T==="0"?`netInfow${O}d`:`last${O}DayMainFlowRank`;E.push({column:$,start:U,end:Y})}if(A==="auditOpinionType")E.push({column:k.key,enumType:k.enumType});else if(T==="1")f.sortBy={column:k.key,start:P[0]||null,end:P[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(A)){let[U,Y]=B;["",null].includes(U)||(U=U/100),["",null].includes(Y)||(Y=Y/100),E.push({column:k.key,start:U,end:Y})}else if(R===void 0&&!_.includes(A)){let[U,Y]=B;if(!["",null].includes(U))switch(I[0]){case"亿":U=U*1e8;break;case"千万":U=U*1e7;break;default:U=U;break}if(!["",null].includes(Y))switch(I[1]){case"亿":Y=Y*1e8;break;case"千万":Y=Y*1e7;break;default:Y=Y;break}E.push({column:k.key,start:U,end:Y})}return E},[]);v.length&&(f.query=v);const w=h.commonIndicator.find(({key:E})=>E==="st");w&&(f.st=w.st);const x=h.commonIndicator.find(({key:E})=>E==="tFeaturelncomes");x&&(f.netProfitQueryDto={...x,netProfit:x.netProfit*1e8});const S=h.commonIndicator.find(({key:E})=>E==="priceLevels");S&&(f.priceLevels=S.priceLevels);const D=h.commonIndicator.find(({key:E})=>E==="peTtmLevels");D&&(f.peTtmLevels=D.peTtmLevels);const N={};h.commonIndicator.forEach(E=>{const{key:k}=E;switch(k){case"expireDays":["",null].includes(E.range[0])||(N.minExpireDays=E.range[0]),["",null].includes(E.range[1])||(N.maxExpireDays=E.range[1]);break;case"virtualRealDegree":["",null].includes(E.range[0])||(N.minVirtualRealDegree=E.range[0]/100),["",null].includes(E.range[1])||(N.maxVirtualRealDegree=E.range[1]/100);break;case"yearProfitRate":["",null].includes(E.range[0])||(N.minYearProfitRate=E.range[0]/100),["",null].includes(E.range[1])||(N.maxYearProfitRate=E.range[1]/100);break;case"impliedVolatility":["",null].includes(E.range[0])||(N.minImpliedVolatility=E.range[0]/100),["",null].includes(E.range[1])||(N.maxImpliedVolatility=E.range[1]/100);break;case"levelMultiplier":["",null].includes(E.range[0])||(N.minLevelMultiplier=E.range[0]),["",null].includes(E.range[1])||(N.maxLevelMultiplier=E.range[1]);break;case"turnover":["",null].includes(E.range[0])||(N.minTurnover=E.range[0]*1e4),["",null].includes(E.range[1])||(N.maxTurnover=E.range[1]*1e4);break;case"volume":["",null].includes(E.range[0])||(N.minVolume=E.range[0]),["",null].includes(E.range[1])||(N.maxVolume=E.range[1]);break;case"openInterest":["",null].includes(E.range[0])||(N.minOpenInterest=E.range[0]),["",null].includes(E.range[1])||(N.maxOpenInterest=E.range[1]);break;case"optionsCpType":N.optionsCpType=E.optionsCpType;break;case"optionGear":["",null].includes(E.range[0])||(N.minOptionGear=E.range[0]),["",null].includes(E.range[1])||(N.maxOptionGear=E.range[1]);break}});const L=h.commonIndicator.find(({key:E})=>E==="perVolumn");L&&(f.perVolumn={type:L.radio,value:L.levels}),Object.keys(N).length&&(f.searchOptionDto={...f.searchOptionDto,...N})}return console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]}}}),(h,f)=>{var _,v,w,x,S,D;const p=Kx,g=Gx,m=Td,y=uV,b=ql,C=Ul;return c.openBlock(),c.createElementBlock("div",lEt,[(_=r.value.varietyMarket)!=null&&_.show?(c.openBlock(),c.createElementBlock("div",uEt,[c.createElementVNode("div",cEt,[dEt,c.createElementVNode("span",{onClick:f[0]||(f[0]=N=>d("varietyMarket"))},"不限")]),c.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=N=>i.value.varietyMarket=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(p,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(v=r.value.commonOption)!=null&&v.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",hEt,[c.createElementVNode("div",fEt,[pEt,c.createElementVNode("span",{onClick:f[2]||(f[2]=N=>d("commonOption"))},"不限")]),c.createVNode(y,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=N=>i.value.commonOption=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(w=r.value.marketIds)!=null&&w.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",gEt,[c.createElementVNode("div",mEt,[bEt,c.createElementVNode("span",{onClick:f[4]||(f[4]=N=>d("marketIds"))},"不限")]),c.createVNode(y,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=N=>i.value.marketIds=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(x=r.value.customTag)!=null&&x.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",_Et,[c.createElementVNode("div",yEt,[vEt,c.createElementVNode("span",{onClick:f[6]||(f[6]=N=>d("customTag"))},"不限")]),c.createVNode(y,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=N=>i.value.customTag=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(S=r.value.jcTranslate)!=null&&S.show?(c.openBlock(),c.createElementBlock("div",CEt,[c.createElementVNode("div",wEt,[xEt,c.createElementVNode("span",{onClick:f[8]||(f[8]=N=>d("jcTranslate"))},"不限")]),c.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=N=>i.value.jcTranslate.type=N),size:"small"},{default:c.withCtx(()=>[c.createVNode(p,{value:2},{default:c.withCtx(()=>[c.createTextVNode("价差转品种")]),_:1}),c.createVNode(p,{value:1},{default:c.withCtx(()=>[c.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(C,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=N=>i.value.jcTranslate.jcList=N),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,N=>(c.openBlock(),c.createBlock(b,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[c.vShow,i.value.jcTranslate.type===1]])])):c.createCommentVNode("",!0),(D=r.value.factorScreen)!=null&&D.show?(c.openBlock(),c.createElementBlock("div",SEt,[c.createElementVNode("div",DEt,[NEt,c.createElementVNode("span",{onClick:f[11]||(f[11]=N=>d("factorScreen"))},"不限")]),c.createVNode(ANt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=N=>i.value.factorScreen=N),config:r.value.factorScreen},null,8,["data","config"])])):c.createCommentVNode("",!0),c.createVNode(aEt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=N=>i.value.commonIndicator=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-efd872de"]]),kEt={install(n){n.component("st-varietySearch",EEt)}},rAt="",oAt="",LEt={class:"variety-auto-complete"},MEt={key:0},TEt={class:"label"},AEt=In({__name:"VarietySelect",props:{size:{type:String,default:"default"},placeholder:{type:String,default:"请输入品种名称或代码"},labelShowEnable:{type:Boolean,default:!0},selectClearEnable:{type:Boolean,default:!0}},emits:["select","change"],setup(n,{emit:e}){const t=c.inject("stConfig"),i=e,r=n,o=c.ref(""),s=async(u,d)=>{if(u===""||u==="null")d([]);else{const h={keyWord:u,pageNum:1,pageSize:999,userId:I2("id"),hotSearchFlag:1},{body:f}=await t.request.post("/common/qt/getFeatureInfosByPage",h),p=f.list.map(({code:g,featureName:m})=>({label:`${g}   ${m}`,value:g}));d(p)}},a=({label:u,value:d})=>{const h=u.split(" ").at(-1);i("select",{name:h,code:d}),r.selectClearEnable&&(o.value="")},l=u=>{i("change",u)};return(u,d)=>{const h=V9e;return c.openBlock(),c.createElementBlock("div",LEt,[n.labelShowEnable?(c.openBlock(),c.createElementBlock("span",MEt,"品种搜索:")):c.createCommentVNode("",!0),c.createVNode(h,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=f=>o.value=f),clearable:"",size:r.size,placeholder:r.placeholder,"fetch-suggestions":s,onSelect:a,onChange:l},{default:c.withCtx(({item:f})=>[c.createElementVNode("div",TEt,c.toDisplayString(f.label),1)]),_:1},8,["modelValue","size","placeholder"])])}}},[["__scopeId","data-v-d433c4b8"]]),aAt="",lAt="",IEt=n=>(c.pushScopeId("data-v-e4459978"),n=n(),c.popScopeId(),n),REt={class:"custom-header"},OEt={class:"left"},FEt=IEt(()=>c.createElementVNode("span",null," 选择变量 ",-1)),PEt={class:"right"},BEt={class:"custom-body"},VEt={class:"config-list"},zEt={class:"config-item"},HEt={key:0},jEt={key:0},WEt={key:1},$Et={key:0},UEt={style:{"max-width":"820px"}},qEt={style:{"white-space":"pre-line"}},KEt=In({__name:"index",props:{useCase:{type:String,default:"1"}},setup(n,{expose:e}){const t=c.inject("stConfig"),i=n,r=c.ref(null),o=c.ref(!1),s=c.ref(null),a=c.ref([]),l=c.computed(()=>{var h;return((h=a.value.find(f=>f.varName===s.value))==null?void 0:h.formatList)??[]}),u=h=>h.replace(/^\[|\]$/g,"").split("],[").map(g=>{const m=g.replace(/\[|\]/g,""),[y,b]=m.split(",");return{label:y.trim(),value:b.trim()}}),d=h=>{const f=[];for(let C=0;C<h.length;C++){const _=h[C];switch(console.log(_),_.vtype){case"text":{f.push(_.param);break}default:{if(!_.modelValue)return mi.error("请检查插入格式内是否填写完整");let v=_.modelValue;_.prefix&&(v=`${_.prefix}${v}`),_.suffix&&(v=`${v}${_.suffix}`),f.push(v);break}}}if(!r.value)return mi.error("未检测到编辑器实例");const p=f.join("_"),g=r.value.getInstance(),m=g.getPosition(),b=r.value.getValue().split(`
826
- `);if(m.lineNumber<=b.length){const C=m.lineNumber-1,_=b[C],v=_.substring(0,m.column-1)+p+_.substring(m.column-1);b[C]=v;const w=b.join(`
827
- `);r.value.setValue(w);const x=m.column+p.length;g.setPosition({lineNumber:m.lineNumber,column:x}),g.focus()}};return c.onMounted(async()=>{const{body:h}=await t.request.post("/common/conf/queryAllBackVariables",{useCase:i.useCase});a.value=h??[]}),e({open:h=>{r.value=h,o.value=!0},close:()=>{o.value=!1}}),(h,f)=>{const p=ql,g=Ul,m=yn,y=jl,b=Ko,C=rl,_=s1;return c.openBlock(),c.createBlock(_,{"modal-class":"var-select-dialog",modelValue:o.value,"onUpdate:modelValue":f[2]||(f[2]=v=>o.value=v),"align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(()=>[c.createElementVNode("div",REt,[c.createElementVNode("div",OEt,[FEt,c.createVNode(g,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value=v),placeholder:"选择变量",filterable:"",clearable:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,(v,w)=>(c.openBlock(),c.createBlock(p,{key:w,label:v.varName,value:v.varName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",PEt,[c.createVNode(m,{class:"el-icon--left",onClick:f[1]||(f[1]=v=>o.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(xd))]),_:1})])])]),default:c.withCtx(()=>[c.createElementVNode("div",BEt,[l.value.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(l.value,(v,w)=>(c.openBlock(),c.createElementBlock("div",{class:"format-item",key:w},[c.createElementVNode("span",null,"格式"+c.toDisplayString(w+1)+":",1),c.createElementVNode("div",VEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(v.configList,(x,S)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",zEt,[x.vtype==="text"?(c.openBlock(),c.createElementBlock("span",HEt,c.toDisplayString(x.param),1)):c.createCommentVNode("",!0),x.vtype==="inputVariety"?(c.openBlock(),c.createBlock(AEt,{key:1,size:"small",placeholder:x.param,selectClearEnable:!1,labelShowEnable:!1,onSelect:({name:D,code:N})=>x.modelValue=N,onChange:D=>x.modelValue=D,style:{width:"100px"}},null,8,["placeholder","onSelect","onChange"])):c.createCommentVNode("",!0),x.vtype==="input"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[x.prefix?(c.openBlock(),c.createElementBlock("span",jEt,c.toDisplayString(x.prefix),1)):c.createCommentVNode("",!0),c.createVNode(y,{modelValue:x.modelValue,"onUpdate:modelValue":D=>x.modelValue=D,placeholder:x.param,size:"small"},null,8,["modelValue","onUpdate:modelValue","placeholder"]),x.suffix?(c.openBlock(),c.createElementBlock("span",WEt,c.toDisplayString(x.suffix),1)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),x.vtype==="select"?(c.openBlock(),c.createBlock(g,{key:3,modelValue:x.modelValue,"onUpdate:modelValue":D=>x.modelValue=D,placeholder:x.param,clearable:"",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u(x.optionsStr),D=>(c.openBlock(),c.createBlock(p,{key:D.value,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):c.createCommentVNode("",!0)]),S!==v.configList.length-1?(c.openBlock(),c.createElementBlock("span",$Et,"_")):c.createCommentVNode("",!0)],64))),256))]),c.createVNode(b,{type:"primary",plain:"",size:"small",onClick:x=>d(v.configList)},{default:c.withCtx(()=>[c.createTextVNode(" 插入变量 ")]),_:2},1032,["onClick"]),c.createVNode(C,{effect:"dark",placement:"top-start"},{content:c.withCtx(()=>[c.createElementVNode("div",UEt,[c.createElementVNode("span",qEt,c.toDisplayString(v.tip),1)])]),default:c.withCtx(()=>[c.createVNode(m,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:2},1024)]))),128)):c.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}},[["__scopeId","data-v-e4459978"]]),GEt={install(n){n.component("st-varSelectDialog",KEt)}},cAt="",dAt="",YEt={key:0,class:"footer-box"},QEt={__name:"index",props:c.mergeModels({tableData:{type:Array,default:[]},tableColumn:{type:Array,default:[]},tableLoading:{type:[String,null],default:null},config:{type:Object}},{tableActiveData:{default:()=>[]},tableActiveDataModifiers:{}}),emits:c.mergeModels(["touchBottom"],["update:tableActiveData"]),setup(n,{emit:e}){const t=e,i=n,r=c.computed(()=>({headerHeight:50,rowHeight:50,tableActiveNum:9,tableActiveKey:"id",pageUpDownEnabled:!0,...i.config})),o=c.ref(null),s=c.ref(0);let a=0,l=!1,u=null;const d=c.useModel(n,"tableActiveData"),h=c.computed(()=>d.value.map(b=>b[r.value.tableActiveKey])),f=({rowData:b,rowIndex:C})=>{const{tableActiveNum:_,tableActiveKey:v}=r.value;if(h.value.includes(b[v]))return;const w=Math.floor(C/_)*_,x=w+_;d.value=i.tableData.slice(w,x)},p=({code:b})=>{const{tableData:C}=i,{tableActiveNum:_,tableActiveKey:v,pageUpDownEnabled:w}=r.value;if(!C.length||!w)return;const x=C.findIndex(L=>L[v]===h.value.at(0)),S=C.findIndex(L=>L[v]===h.value.at(-1));let D=null,N=null;switch(b){case"PageUp":if(x===0)return;D=x-_>0?x-_:0,N=D+_-1,d.value=C.slice(D,N+1),m(D,"PageUp");break;case"PageDown":if(S===C.length-1)return;D=x+_,N=D+_-1,d.value=C.slice(D,N+1),m(N,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,C)=>{b!==null&&(clearTimeout(u),l=!0,C==="PageUp"?s.value=0:b>=i.tableData.length-1&&(s.value=30,t("touchBottom")),c.nextTick(()=>{o.value.scrollToRow(b),o.value.scrollToLeft(a),u=setTimeout(()=>{l=!1},500)}))},y=({rowData:b})=>{if(!d.value.length)return;let C="";const{tableActiveKey:_}=r.value;return b[_]===h.value[0]&&(C+=" virtual-table-active-start"),h.value.includes(b[_])&&(C+=" virtual-table-active-row"),b[_]===h.value[h.value.length-1]&&(C+=" virtual-table-active-end"),C};return c.onMounted(()=>{window.addEventListener("keydown",p)}),c.watch(()=>i.tableLoading,b=>{b||(s.value=0)}),c.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(b,C)=>{const _=Kg,v=Ko,w=LV,x=Zve,S=Xve;return c.openBlock(),c.createBlock(S,null,{default:c.withCtx(({height:D,width:N})=>[c.createVNode(x,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:N,height:D,"header-height":r.value.headerHeight,"row-height":r.value.rowHeight,"row-class":y,"row-event-handlers":{onClick:f},"footer-height":s.value,"scrollbar-always-on":"",onScroll:g,onEndReached:C[0]||(C[0]=L=>m(n.tableData.length-1,"PageDown"))},{empty:c.withCtx(()=>[c.createVNode(_,{description:"暂无数据",style:{height:"100%"}})]),footer:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",YEt,[n.tableLoading==="more"?(c.openBlock(),c.createBlock(w,{key:0},{default:c.withCtx(()=>[c.createVNode(v,{type:"primary",text:"",loading:""},{default:c.withCtx(()=>[c.createTextVNode("正在加载更多数据")]),_:1})]),_:1})):n.tableLoading==="all"?(c.openBlock(),c.createBlock(w,{key:1},{default:c.withCtx(()=>[c.createTextVNode(" 已无更多数据 ")]),_:1})):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)]),_:2},1032,["data","columns","width","height","header-height","row-height","row-event-handlers","footer-height"])]),_:1})}}},hAt="",ZEt=In(QEt,[["__scopeId","data-v-7e702a8a"]]),XEt={install(n){n.component("st-virtualTable",ZEt)}},JEt={install(n){zCe.install(n),ket.install(n),Met.install(n),Wet.install(n),ptt.install(n),btt.install(n),Qat.install(n),Slt.install(n),tut.install(n),gut.install(n),Fut.install(n),$ut.install(n),Gut.install(n),fxt.install(n),mxt.install(n),Cxt.install(n),Sxt.install(n),Ext.install(n),Mxt.install(n),Bxt.install(n),kEt.install(n),GEt.install(n),XEt.install(n)}};/*!-----------------------------------------------------------------------------
823
+ `,o.map=[e,n.line],!0}function XSt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||r+3>o)return!1;const s=n.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=n.skipChars(r,s);let l=r-a;if(l<3)return!1;const u=n.src.slice(a,r),d=n.src.slice(r,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let h=e,f=!1;for(;h++,!(h>=t||(r=a=n.bMarks[h]+n.tShift[h],o=n.eMarks[h],r<o&&n.sCount[h]<n.blkIndent));)if(n.src.charCodeAt(r)===s&&!(n.sCount[h]-n.blkIndent>=4)&&(r=n.skipChars(r,s),!(r-a<l)&&(r=n.skipSpaces(r),!(r<o)))){f=!0;break}l=n.sCount[e],n.line=h+(f?1:0);const p=n.push("fence","code",0);return p.info=d,p.content=n.getLines(e+1,h,l,!0),p.markup=u,p.map=[e,n.line],!0}function JSt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];const s=n.lineMax;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==62)return!1;if(i)return!0;const a=[],l=[],u=[],d=[],h=n.md.block.ruler.getRules("blockquote"),f=n.parentType;n.parentType="blockquote";let p=!1,g;for(g=e;g<t;g++){const _=n.sCount[g]<n.blkIndent;if(r=n.bMarks[g]+n.tShift[g],o=n.eMarks[g],r>=o)break;if(n.src.charCodeAt(r++)===62&&!_){let w=n.sCount[g]+1,x,S;n.src.charCodeAt(r)===32?(r++,w++,S=!1,x=!0):n.src.charCodeAt(r)===9?(x=!0,(n.bsCount[g]+w)%4===3?(r++,w++,S=!1):S=!0):x=!1;let D=w;for(a.push(n.bMarks[g]),n.bMarks[g]=r;r<o;){const N=n.src.charCodeAt(r);if(Ui(N))N===9?D+=4-(D+n.bsCount[g]+(S?1:0))%4:D++;else break;r++}p=r>=o,l.push(n.bsCount[g]),n.bsCount[g]=n.sCount[g]+1+(x?1:0),u.push(n.sCount[g]),n.sCount[g]=D-w,d.push(n.tShift[g]),n.tShift[g]=r-n.bMarks[g];continue}if(p)break;let v=!1;for(let w=0,x=h.length;w<x;w++)if(h[w](n,g,t,!0)){v=!0;break}if(v){n.lineMax=g,n.blkIndent!==0&&(a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]-=n.blkIndent);break}a.push(n.bMarks[g]),l.push(n.bsCount[g]),d.push(n.tShift[g]),u.push(n.sCount[g]),n.sCount[g]=-1}const m=n.blkIndent;n.blkIndent=0;const y=n.push("blockquote_open","blockquote",1);y.markup=">";const b=[e,0];y.map=b,n.md.block.tokenize(n,e,g);const C=n.push("blockquote_close","blockquote",-1);C.markup=">",n.lineMax=s,n.parentType=f,b[1]=n.line;for(let _=0;_<d.length;_++)n.bMarks[_+e]=a[_],n.tShift[_+e]=d[_],n.sCount[_+e]=u[_],n.bsCount[_+e]=l[_];return n.blkIndent=m,!0}function eDt(n,e,t,i){const r=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let o=n.bMarks[e]+n.tShift[e];const s=n.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<r;){const u=n.src.charCodeAt(o++);if(u!==s&&!Ui(u))return!1;u===s&&a++}if(a<3)return!1;if(i)return!0;n.line=e+1;const l=n.push("hr","hr",0);return l.map=[e,n.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Rde(n,e){const t=n.eMarks[e];let i=n.bMarks[e]+n.tShift[e];const r=n.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<t){const o=n.src.charCodeAt(i);if(!Ui(o))return-1}return i}function Ode(n,e){const t=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];let r=t;if(r+1>=i)return-1;let o=n.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=n.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=n.src.charCodeAt(r),!Ui(o))?-1:r}function tDt(n,e){const t=n.level+2;for(let i=e+2,r=n.tokens.length-2;i<r;i++)n.tokens[i].level===t&&n.tokens[i].type==="paragraph_open"&&(n.tokens[i+2].hidden=!0,n.tokens[i].hidden=!0,i+=2)}function nDt(n,e,t,i){let r,o,s,a,l=e,u=!0;if(n.sCount[l]-n.blkIndent>=4||n.listIndent>=0&&n.sCount[l]-n.listIndent>=4&&n.sCount[l]<n.blkIndent)return!1;let d=!1;i&&n.parentType==="paragraph"&&n.sCount[l]>=n.blkIndent&&(d=!0);let h,f,p;if((p=Ode(n,l))>=0){if(h=!0,s=n.bMarks[l]+n.tShift[l],f=Number(n.src.slice(s,p-1)),d&&f!==1)return!1}else if((p=Rde(n,l))>=0)h=!1;else return!1;if(d&&n.skipSpaces(p)>=n.eMarks[l])return!1;if(i)return!0;const g=n.src.charCodeAt(p-1),m=n.tokens.length;h?(a=n.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=n.push("bullet_list_open","ul",1);const y=[l,0];a.map=y,a.markup=String.fromCharCode(g);let b=!1;const C=n.md.block.ruler.getRules("list"),_=n.parentType;for(n.parentType="list";l<t;){o=p,r=n.eMarks[l];const v=n.sCount[l]+p-(n.bMarks[l]+n.tShift[l]);let w=v;for(;o<r;){const B=n.src.charCodeAt(o);if(B===9)w+=4-(w+n.bsCount[l])%4;else if(B===32)w++;else break;o++}const x=o;let S;x>=r?S=1:S=w-v,S>4&&(S=1);const D=v+S;a=n.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const N=[l,0];a.map=N,h&&(a.info=n.src.slice(s,p-1));const L=n.tight,E=n.tShift[l],k=n.sCount[l],A=n.listIndent;if(n.listIndent=n.blkIndent,n.blkIndent=D,n.tight=!0,n.tShift[l]=x-n.bMarks[l],n.sCount[l]=w,x>=r&&n.isEmpty(l+1)?n.line=Math.min(n.line+2,t):n.md.block.tokenize(n,l,t,!0),(!n.tight||b)&&(u=!1),b=n.line-l>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=A,n.tShift[l]=E,n.sCount[l]=k,n.tight=L,a=n.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),l=n.line,N[1]=l,l>=t||n.sCount[l]<n.blkIndent||n.sCount[l]-n.blkIndent>=4)break;let R=!1;for(let B=0,I=C.length;B<I;B++)if(C[B](n,l,t,!0)){R=!0;break}if(R)break;if(h){if(p=Ode(n,l),p<0)break;s=n.bMarks[l]+n.tShift[l]}else if(p=Rde(n,l),p<0)break;if(g!==n.src.charCodeAt(p-1))break}return h?a=n.push("ordered_list_close","ol",-1):a=n.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),y[1]=l,n.line=l,n.parentType=_,u&&tDt(n,m),!0}function iDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e],s=e+1;if(n.sCount[e]-n.blkIndent>=4||n.src.charCodeAt(r)!==91)return!1;function a(C){const _=n.lineMax;if(C>=_||n.isEmpty(C))return null;let v=!1;if(n.sCount[C]-n.blkIndent>3&&(v=!0),n.sCount[C]<0&&(v=!0),!v){const S=n.md.block.ruler.getRules("reference"),D=n.parentType;n.parentType="reference";let N=!1;for(let L=0,E=S.length;L<E;L++)if(S[L](n,C,_,!0)){N=!0;break}if(n.parentType=D,N)return null}const w=n.bMarks[C]+n.tShift[C],x=n.eMarks[C];return n.src.slice(w,x+1)}let l=n.src.slice(r,o+1);o=l.length;let u=-1;for(r=1;r<o;r++){const C=l.charCodeAt(r);if(C===91)return!1;if(C===93){u=r;break}else if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(C===92&&(r++,r<o&&l.charCodeAt(r)===10)){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(r=u+2;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}const d=n.md.helpers.parseLinkDestination(l,r,o);if(!d.ok)return!1;const h=n.md.normalizeLink(d.str);if(!n.md.validateLink(h))return!1;r=d.pos;const f=r,p=s,g=r;for(;r<o;r++){const C=l.charCodeAt(r);if(C===10){const _=a(s);_!==null&&(l+=_,o=l.length,s++)}else if(!Ui(C))break}let m=n.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){const C=a(s);if(C===null)break;l+=C,r=o,o=l.length,s++,m=n.md.helpers.parseLinkTitle(l,r,o,m)}let y;for(r<o&&g!==r&&m.ok?(y=m.str,r=m.pos):(y="",r=f,s=p);r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10&&y)for(y="",r=f,s=p;r<o;){const C=l.charCodeAt(r);if(!Ui(C))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const b=Aw(l.slice(1,u));return b?(i||(typeof n.env.references>"u"&&(n.env.references={}),typeof n.env.references[b]>"u"&&(n.env.references[b]={title:y,href:h}),n.line=s),!0):!1}const rDt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],oDt="[a-zA-Z_:][a-zA-Z0-9:._-]*",sDt="[^\"'=<>`\\x00-\\x20]+",aDt="'[^']*'",lDt='"[^"]*"',uDt="(?:"+sDt+"|"+aDt+"|"+lDt+")",Fde="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+oDt+"(?:\\s*=\\s*"+uDt+")?)")+"*\\s*\\/?>",Pde="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",cDt="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",dDt="<[?][\\s\\S]*?[?]>",hDt="<![A-Za-z][^>]*>",fDt="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",pDt=new RegExp("^(?:"+Fde+"|"+Pde+"|"+cDt+"|"+dDt+"|"+hDt+"|"+fDt+")"),gDt=new RegExp("^(?:"+Fde+"|"+Pde+")"),pg=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+rDt.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(gDt.source+"\\s*$"),/^$/,!1]];function mDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4||!n.md.options.html||n.src.charCodeAt(r)!==60)return!1;let s=n.src.slice(r,o),a=0;for(;a<pg.length&&!pg[a][0].test(s);a++);if(a===pg.length)return!1;if(i)return pg[a][2];let l=e+1;if(!pg[a][1].test(s)){for(;l<t&&!(n.sCount[l]<n.blkIndent);l++)if(r=n.bMarks[l]+n.tShift[l],o=n.eMarks[l],s=n.src.slice(r,o),pg[a][1].test(s)){s.length!==0&&l++;break}}n.line=l;const u=n.push("html_block","",0);return u.map=[e,l],u.content=n.getLines(e,l,n.blkIndent,!0),!0}function bDt(n,e,t,i){let r=n.bMarks[e]+n.tShift[e],o=n.eMarks[e];if(n.sCount[e]-n.blkIndent>=4)return!1;let s=n.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=n.src.charCodeAt(++r);s===35&&r<o&&a<=6;)a++,s=n.src.charCodeAt(++r);if(a>6||r<o&&!Ui(s))return!1;if(i)return!0;o=n.skipSpacesBack(o,r);const l=n.skipCharsBack(o,35,r);l>r&&Ui(n.src.charCodeAt(l-1))&&(o=l),n.line=e+1;const u=n.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,n.line];const d=n.push("inline","",0);d.content=n.src.slice(r,o).trim(),d.map=[e,n.line],d.children=[];const h=n.push("heading_close","h"+String(a),-1);return h.markup="########".slice(0,a),!0}function _Dt(n,e,t){const i=n.md.block.ruler.getRules("paragraph");if(n.sCount[e]-n.blkIndent>=4)return!1;const r=n.parentType;n.parentType="paragraph";let o=0,s,a=e+1;for(;a<t&&!n.isEmpty(a);a++){if(n.sCount[a]-n.blkIndent>3)continue;if(n.sCount[a]>=n.blkIndent){let p=n.bMarks[a]+n.tShift[a];const g=n.eMarks[a];if(p<g&&(s=n.src.charCodeAt(p),(s===45||s===61)&&(p=n.skipChars(p,s),p=n.skipSpaces(p),p>=g))){o=s===61?1:2;break}}if(n.sCount[a]<0)continue;let f=!1;for(let p=0,g=i.length;p<g;p++)if(i[p](n,a,t,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=n.getLines(e,a,n.blkIndent,!1).trim();n.line=a+1;const u=n.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),u.map=[e,n.line];const d=n.push("inline","",0);d.content=l,d.map=[e,n.line-1],d.children=[];const h=n.push("heading_close","h"+String(o),-1);return h.markup=String.fromCharCode(s),n.parentType=r,!0}function yDt(n,e,t){const i=n.md.block.ruler.getRules("paragraph"),r=n.parentType;let o=e+1;for(n.parentType="paragraph";o<t&&!n.isEmpty(o);o++){if(n.sCount[o]-n.blkIndent>3||n.sCount[o]<0)continue;let u=!1;for(let d=0,h=i.length;d<h;d++)if(i[d](n,o,t,!0)){u=!0;break}if(u)break}const s=n.getLines(e,o,n.blkIndent,!1).trim();n.line=o;const a=n.push("paragraph_open","p",1);a.map=[e,n.line];const l=n.push("inline","",0);return l.content=s,l.map=[e,n.line],l.children=[],n.push("paragraph_close","p",-1),n.parentType=r,!0}const Rw=[["table",QSt,["paragraph","reference"]],["code",ZSt],["fence",XSt,["paragraph","reference","blockquote","list"]],["blockquote",JSt,["paragraph","reference","blockquote","list"]],["hr",eDt,["paragraph","reference","blockquote","list"]],["list",nDt,["paragraph","reference","blockquote"]],["reference",iDt],["html_block",mDt,["paragraph","reference","blockquote"]],["heading",bDt,["paragraph","reference","blockquote"]],["lheading",_Dt],["paragraph",yDt]];function Ow(){this.ruler=new ma;for(let n=0;n<Rw.length;n++)this.ruler.push(Rw[n][0],Rw[n][1],{alt:(Rw[n][2]||[]).slice()})}Ow.prototype.tokenize=function(n,e,t){const i=this.ruler.getRules(""),r=i.length,o=n.md.options.maxNesting;let s=e,a=!1;for(;s<t&&(n.line=s=n.skipEmptyLines(s),!(s>=t||n.sCount[s]<n.blkIndent));){if(n.level>=o){n.line=t;break}const l=n.line;let u=!1;for(let d=0;d<r;d++)if(u=i[d](n,s,t,!1),u){if(l>=n.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");n.tight=!a,n.isEmpty(n.line-1)&&(a=!0),s=n.line,s<t&&n.isEmpty(s)&&(a=!0,s++,n.line=s)}},Ow.prototype.parse=function(n,e,t,i){if(!n)return;const r=new this.State(n,e,t,i);this.tokenize(r,r.line,r.lineMax)},Ow.prototype.State=Yc;function j8(n,e,t,i){this.src=n,this.env=t,this.md=e,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}j8.prototype.pushPending=function(){const n=new ju("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n},j8.prototype.push=function(n,e,t){this.pending&&this.pushPending();const i=new ju(n,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},j8.prototype.scanDelims=function(n,e){const t=this.posMax,i=this.src.charCodeAt(n),r=n>0?this.src.charCodeAt(n-1):32;let o=n;for(;o<t&&this.src.charCodeAt(o)===i;)o++;const s=o-n,a=o<t?this.src.charCodeAt(o):32,l=H8(r)||z8(String.fromCharCode(r)),u=H8(a)||z8(String.fromCharCode(a)),d=V8(r),h=V8(a),f=!h&&(!u||d||l),p=!d&&(!l||h||u);return{can_open:f&&(e||!p||l),can_close:p&&(e||!f||u),length:s}},j8.prototype.Token=ju;function vDt(n){switch(n){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function CDt(n,e){let t=n.pos;for(;t<n.posMax&&!vDt(n.src.charCodeAt(t));)t++;return t===n.pos?!1:(e||(n.pending+=n.src.slice(n.pos,t)),n.pos=t,!0)}const wDt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function xDt(n,e){if(!n.md.options.linkify||n.linkLevel>0)return!1;const t=n.pos,i=n.posMax;if(t+3>i||n.src.charCodeAt(t)!==58||n.src.charCodeAt(t+1)!==47||n.src.charCodeAt(t+2)!==47)return!1;const r=n.pending.match(wDt);if(!r)return!1;const o=r[1],s=n.md.linkify.matchAtStart(n.src.slice(t-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;a=a.replace(/\*+$/,"");const l=n.md.normalizeLink(a);if(!n.md.validateLink(l))return!1;if(!e){n.pending=n.pending.slice(0,-o.length);const u=n.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const d=n.push("text","",0);d.content=n.md.normalizeLinkText(a);const h=n.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return n.pos+=a.length-o.length,!0}function SDt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==10)return!1;const i=n.pending.length-1,r=n.posMax;if(!e)if(i>=0&&n.pending.charCodeAt(i)===32)if(i>=1&&n.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&n.pending.charCodeAt(o-1)===32;)o--;n.pending=n.pending.slice(0,o),n.push("hardbreak","br",0)}else n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0);else n.push("softbreak","br",0);for(t++;t<r&&Ui(n.src.charCodeAt(t));)t++;return n.pos=t,!0}const IO=[];for(let n=0;n<256;n++)IO.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){IO[n.charCodeAt(0)]=1});function DDt(n,e){let t=n.pos;const i=n.posMax;if(n.src.charCodeAt(t)!==92||(t++,t>=i))return!1;let r=n.src.charCodeAt(t);if(r===10){for(e||n.push("hardbreak","br",0),t++;t<i&&(r=n.src.charCodeAt(t),!!Ui(r));)t++;return n.pos=t,!0}let o=n.src[t];if(r>=55296&&r<=56319&&t+1<i){const a=n.src.charCodeAt(t+1);a>=56320&&a<=57343&&(o+=n.src[t+1],t++)}const s="\\"+o;if(!e){const a=n.push("text_special","",0);r<256&&IO[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return n.pos=t+1,!0}function NDt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=n.posMax;for(;t<o&&n.src.charCodeAt(t)===96;)t++;const s=n.src.slice(r,t),a=s.length;if(n.backticksScanned&&(n.backticks[a]||0)<=r)return e||(n.pending+=s),n.pos+=a,!0;let l=t,u;for(;(u=n.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&n.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===a){if(!e){const h=n.push("code_inline","code",0);h.markup=s,h.content=n.src.slice(t,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return n.pos=l,!0}n.backticks[d]=u}return n.backticksScanned=!0,e||(n.pending+=s),n.pos+=a,!0}function EDt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==126)return!1;const r=n.scanDelims(n.pos,!0);let o=r.length;const s=String.fromCharCode(i);if(o<2)return!1;let a;o%2&&(a=n.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=n.push("text","",0),a.content=s+s,n.delimiters.push({marker:i,length:0,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return n.pos+=r.length,!0}function Bde(n,e){let t;const i=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];if(s.marker!==126||s.end===-1)continue;const a=e[s.end];t=n.tokens[s.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=n.tokens[a.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",n.tokens[a.token-1].type==="text"&&n.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){const o=i.pop();let s=o+1;for(;s<n.tokens.length&&n.tokens[s].type==="s_close";)s++;s--,o!==s&&(t=n.tokens[s],n.tokens[s]=n.tokens[o],n.tokens[o]=t)}}function kDt(n){const e=n.tokens_meta,t=n.tokens_meta.length;Bde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&Bde(n,e[i].delimiters)}const Vde={tokenize:EDt,postProcess:kDt};function LDt(n,e){const t=n.pos,i=n.src.charCodeAt(t);if(e||i!==95&&i!==42)return!1;const r=n.scanDelims(n.pos,i===42);for(let o=0;o<r.length;o++){const s=n.push("text","",0);s.content=String.fromCharCode(i),n.delimiters.push({marker:i,length:r.length,token:n.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return n.pos+=r.length,!0}function zde(n,e){const t=e.length;for(let i=t-1;i>=0;i--){const r=e[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],s=i>0&&e[i-1].end===r.end+1&&e[i-1].marker===r.marker&&e[i-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=n.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const u=n.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(n.tokens[e[i-1].token].content="",n.tokens[e[r.end+1].token].content="",i--)}}function MDt(n){const e=n.tokens_meta,t=n.tokens_meta.length;zde(n,n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&zde(n,e[i].delimiters)}const Hde={tokenize:LDt,postProcess:MDt};function TDt(n,e){let t,i,r,o,s="",a="",l=n.pos,u=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;const d=n.pos,h=n.posMax,f=n.pos+1,p=n.md.helpers.parseLinkLabel(n,n.pos,!0);if(p<0)return!1;let g=p+1;if(g<h&&n.src.charCodeAt(g)===40){for(u=!1,g++;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(g>=h)return!1;if(l=g,r=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),r.ok){for(s=n.md.normalizeLink(r.str),n.md.validateLink(s)?g=r.pos:s="",l=g;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);if(r=n.md.helpers.parseLinkTitle(n.src,g,n.posMax),g<h&&l!==g&&r.ok)for(a=r.str,g=r.pos;g<h&&(t=n.src.charCodeAt(g),!(!Ui(t)&&t!==10));g++);}(g>=h||n.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof n.env.references>"u")return!1;if(g<h&&n.src.charCodeAt(g)===91?(l=g+1,g=n.md.helpers.parseLinkLabel(n,g),g>=0?i=n.src.slice(l,g++):g=p+1):g=p+1,i||(i=n.src.slice(f,p)),o=n.env.references[Aw(i)],!o)return n.pos=d,!1;s=o.href,a=o.title}if(!e){n.pos=f,n.posMax=p;const m=n.push("link_open","a",1),y=[["href",s]];m.attrs=y,a&&y.push(["title",a]),n.linkLevel++,n.md.inline.tokenize(n),n.linkLevel--,n.push("link_close","a",-1)}return n.pos=g,n.posMax=h,!0}function ADt(n,e){let t,i,r,o,s,a,l,u,d="";const h=n.pos,f=n.posMax;if(n.src.charCodeAt(n.pos)!==33||n.src.charCodeAt(n.pos+1)!==91)return!1;const p=n.pos+2,g=n.md.helpers.parseLinkLabel(n,n.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&n.src.charCodeAt(o)===40){for(o++;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(o>=f)return!1;for(u=o,a=n.md.helpers.parseLinkDestination(n.src,o,n.posMax),a.ok&&(d=n.md.normalizeLink(a.str),n.md.validateLink(d)?o=a.pos:d=""),u=o;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);if(a=n.md.helpers.parseLinkTitle(n.src,o,n.posMax),o<f&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(t=n.src.charCodeAt(o),!(!Ui(t)&&t!==10));o++);else l="";if(o>=f||n.src.charCodeAt(o)!==41)return n.pos=h,!1;o++}else{if(typeof n.env.references>"u")return!1;if(o<f&&n.src.charCodeAt(o)===91?(u=o+1,o=n.md.helpers.parseLinkLabel(n,o),o>=0?r=n.src.slice(u,o++):o=g+1):o=g+1,r||(r=n.src.slice(p,g)),s=n.env.references[Aw(r)],!s)return n.pos=h,!1;d=s.href,l=s.title}if(!e){i=n.src.slice(p,g);const m=[];n.md.inline.parse(i,n.md,n.env,m);const y=n.push("image","img",0),b=[["src",d],["alt",""]];y.attrs=b,y.children=m,y.content=i,l&&b.push(["title",l])}return n.pos=o,n.posMax=f,!0}const IDt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,RDt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ODt(n,e){let t=n.pos;if(n.src.charCodeAt(t)!==60)return!1;const i=n.pos,r=n.posMax;for(;;){if(++t>=r)return!1;const s=n.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}const o=n.src.slice(i+1,t);if(RDt.test(o)){const s=n.md.normalizeLink(o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}if(IDt.test(o)){const s=n.md.normalizeLink("mailto:"+o);if(!n.md.validateLink(s))return!1;if(!e){const a=n.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=n.push("text","",0);l.content=n.md.normalizeLinkText(o);const u=n.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return n.pos+=o.length+2,!0}return!1}function FDt(n){return/^<a[>\s]/i.test(n)}function PDt(n){return/^<\/a\s*>/i.test(n)}function BDt(n){const e=n|32;return e>=97&&e<=122}function VDt(n,e){if(!n.md.options.html)return!1;const t=n.posMax,i=n.pos;if(n.src.charCodeAt(i)!==60||i+2>=t)return!1;const r=n.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!BDt(r))return!1;const o=n.src.slice(i).match(pDt);if(!o)return!1;if(!e){const s=n.push("html_inline","",0);s.content=o[0],FDt(s.content)&&n.linkLevel++,PDt(s.content)&&n.linkLevel--}return n.pos+=o[0].length,!0}const zDt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,HDt=/^&([a-z][a-z0-9]{1,31});/i;function jDt(n,e){const t=n.pos,i=n.posMax;if(n.src.charCodeAt(t)!==38||t+1>=i)return!1;if(n.src.charCodeAt(t+1)===35){const o=n.src.slice(t).match(zDt);if(o){if(!e){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=n.push("text_special","",0);a.content=LO(s)?Tw(s):Tw(65533),a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}else{const o=n.src.slice(t).match(HDt);if(o){const s=Nde(o[0]);if(s!==o[0]){if(!e){const a=n.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return n.pos+=o[0].length,!0}}}return!1}function jde(n){const e={},t=n.length;if(!t)return;let i=0,r=-2;const o=[];for(let s=0;s<t;s++){const a=n[s];if(o.push(0),(n[i].marker!==a.marker||r!==a.token-1)&&(i=s),r=a.token,a.length=a.length||0,!a.close)continue;e.hasOwnProperty(a.marker)||(e[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[a.marker][(a.open?3:0)+a.length%3];let u=i-o[i]-1,d=u;for(;u>l;u-=o[u]+1){const h=n[u];if(h.marker===a.marker&&h.open&&h.end<0){let f=!1;if((h.close||a.open)&&(h.length+a.length)%3===0&&(h.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=u>0&&!n[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,h.end=s,h.close=!1,d=-1,r=-2;break}}}d!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function WDt(n){const e=n.tokens_meta,t=n.tokens_meta.length;jde(n.delimiters);for(let i=0;i<t;i++)e[i]&&e[i].delimiters&&jde(e[i].delimiters)}function $Dt(n){let e,t,i=0;const r=n.tokens,o=n.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&i--,r[e].level=i,r[e].nesting>0&&i++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const RO=[["text",CDt],["linkify",xDt],["newline",SDt],["escape",DDt],["backticks",NDt],["strikethrough",Vde.tokenize],["emphasis",Hde.tokenize],["link",TDt],["image",ADt],["autolink",ODt],["html_inline",VDt],["entity",jDt]],OO=[["balance_pairs",WDt],["strikethrough",Vde.postProcess],["emphasis",Hde.postProcess],["fragments_join",$Dt]];function W8(){this.ruler=new ma;for(let n=0;n<RO.length;n++)this.ruler.push(RO[n][0],RO[n][1]);this.ruler2=new ma;for(let n=0;n<OO.length;n++)this.ruler2.push(OO[n][0],OO[n][1])}W8.prototype.skipToken=function(n){const e=n.pos,t=this.ruler.getRules(""),i=t.length,r=n.md.options.maxNesting,o=n.cache;if(typeof o[e]<"u"){n.pos=o[e];return}let s=!1;if(n.level<r){for(let a=0;a<i;a++)if(n.level++,s=t[a](n,!0),n.level--,s){if(e>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}else n.pos=n.posMax;s||n.pos++,o[e]=n.pos},W8.prototype.tokenize=function(n){const e=this.ruler.getRules(""),t=e.length,i=n.posMax,r=n.md.options.maxNesting;for(;n.pos<i;){const o=n.pos;let s=!1;if(n.level<r){for(let a=0;a<t;a++)if(s=e[a](n,!1),s){if(o>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(n.pos>=i)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()},W8.prototype.parse=function(n,e,t,i){const r=new this.State(n,e,t,i);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](r)},W8.prototype.State=j8;function UDt(n){const e={};n=n||{},e.src_Any=Cde.source,e.src_Cc=wde.source,e.src_Z=Sde.source,e.src_P=DO.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(n["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function FO(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(i){n[i]=t[i]})}),n}function Fw(n){return Object.prototype.toString.call(n)}function qDt(n){return Fw(n)==="[object String]"}function KDt(n){return Fw(n)==="[object Object]"}function GDt(n){return Fw(n)==="[object RegExp]"}function Wde(n){return Fw(n)==="[object Function]"}function YDt(n){return n.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const $de={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function QDt(n){return Object.keys(n||{}).reduce(function(e,t){return e||$de.hasOwnProperty(t)},!1)}const ZDt={"http:":{validate:function(n,e,t){const i=n.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(i)?i.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(n,e,t){const i=n.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(i)?e>=3&&n[e-3]===":"||e>=3&&n[e-3]==="/"?0:i.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(n,e,t){const i=n.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(i)?i.match(t.re.mailto)[0].length:0}}},XDt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",JDt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function eNt(n){n.__index__=-1,n.__text_cache__=""}function tNt(n){return function(e,t){const i=e.slice(t);return n.test(i)?i.match(n)[0].length:0}}function Ude(){return function(n,e){e.normalize(n)}}function Pw(n){const e=n.re=UDt(n.__opts__),t=n.__tlds__.slice();n.onCompile(),n.__tlds_replaced__||t.push(XDt),t.push(e.src_xn),e.src_tlds=t.join("|");function i(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(i(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(i(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(i(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(i(e.tpl_host_fuzzy_test),"i");const r=[];n.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(n.__schemas__).forEach(function(a){const l=n.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(n.__compiled__[a]=u,KDt(l)){GDt(l.validate)?u.validate=tNt(l.validate):Wde(l.validate)?u.validate=l.validate:o(a,l),Wde(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=Ude();return}if(qDt(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){n.__compiled__[n.__schemas__[a]]&&(n.__compiled__[a].validate=n.__compiled__[n.__schemas__[a]].validate,n.__compiled__[a].normalize=n.__compiled__[n.__schemas__[a]].normalize)}),n.__compiled__[""]={validate:null,normalize:Ude()};const s=Object.keys(n.__compiled__).filter(function(a){return a.length>0&&n.__compiled__[a]}).map(YDt).join("|");n.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","i"),n.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","ig"),n.re.schema_at_start=RegExp("^"+n.re.schema_search.source,"i"),n.re.pretest=RegExp("("+n.re.schema_test.source+")|("+n.re.host_fuzzy_test.source+")|@","i"),eNt(n)}function nNt(n,e){const t=n.__index__,i=n.__last_index__,r=n.__text_cache__.slice(t,i);this.schema=n.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=i+e,this.raw=r,this.text=r,this.url=r}function PO(n,e){const t=new nNt(n,e);return n.__compiled__[t.schema].normalize(t,n),t}function Ua(n,e){if(!(this instanceof Ua))return new Ua(n,e);e||QDt(n)&&(e=n,n={}),this.__opts__=FO({},$de,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=FO({},ZDt,n),this.__compiled__={},this.__tlds__=JDt,this.__tlds_replaced__=!1,this.re={},Pw(this)}Ua.prototype.add=function(e,t){return this.__schemas__[e]=t,Pw(this),this},Ua.prototype.set=function(e){return this.__opts__=FO(this.__opts__,e),this},Ua.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,i,r,o,s,a,l,u,d;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(t=l.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],l.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(i=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=i.index+i[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=e.indexOf("@"),d>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},Ua.prototype.pretest=function(e){return this.re.pretest.test(e)},Ua.prototype.testSchemaAt=function(e,t,i){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,i,this):0},Ua.prototype.match=function(e){const t=[];let i=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(PO(this,i)),i=this.__last_index__);let r=i?e.slice(i):e;for(;this.test(r);)t.push(PO(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return t.length?t:null},Ua.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const i=this.testSchemaAt(e,t[2],t[0].length);return i?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i,PO(this,0)):null},Ua.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Pw(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Pw(this),this)},Ua.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Ua.prototype.onCompile=function(){};const gg=2147483647,Qc=36,BO=1,$8=26,iNt=38,rNt=700,qde=72,Kde=128,Gde="-",oNt=/^xn--/,sNt=/[^\0-\x7F]/,aNt=/[\x2E\u3002\uFF0E\uFF61]/g,lNt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},VO=Qc-BO,Zc=Math.floor,zO=String.fromCharCode;function Ch(n){throw new RangeError(lNt[n])}function uNt(n,e){const t=[];let i=n.length;for(;i--;)t[i]=e(n[i]);return t}function Yde(n,e){const t=n.split("@");let i="";t.length>1&&(i=t[0]+"@",n=t[1]),n=n.replace(aNt,".");const r=n.split("."),o=uNt(r,e).join(".");return i+o}function Qde(n){const e=[];let t=0;const i=n.length;for(;t<i;){const r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){const o=n.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const cNt=n=>String.fromCodePoint(...n),dNt=function(n){return n>=48&&n<58?26+(n-48):n>=65&&n<91?n-65:n>=97&&n<123?n-97:Qc},Zde=function(n,e){return n+22+75*(n<26)-((e!=0)<<5)},Xde=function(n,e,t){let i=0;for(n=t?Zc(n/rNt):n>>1,n+=Zc(n/e);n>VO*$8>>1;i+=Qc)n=Zc(n/VO);return Zc(i+(VO+1)*n/(n+iNt))},Jde=function(n){const e=[],t=n.length;let i=0,r=Kde,o=qde,s=n.lastIndexOf(Gde);s<0&&(s=0);for(let a=0;a<s;++a)n.charCodeAt(a)>=128&&Ch("not-basic"),e.push(n.charCodeAt(a));for(let a=s>0?s+1:0;a<t;){const l=i;for(let d=1,h=Qc;;h+=Qc){a>=t&&Ch("invalid-input");const f=dNt(n.charCodeAt(a++));f>=Qc&&Ch("invalid-input"),f>Zc((gg-i)/d)&&Ch("overflow"),i+=f*d;const p=h<=o?BO:h>=o+$8?$8:h-o;if(f<p)break;const g=Qc-p;d>Zc(gg/g)&&Ch("overflow"),d*=g}const u=e.length+1;o=Xde(i-l,u,l==0),Zc(i/u)>gg-r&&Ch("overflow"),r+=Zc(i/u),i%=u,e.splice(i++,0,r)}return String.fromCodePoint(...e)},e0e=function(n){const e=[];n=Qde(n);const t=n.length;let i=Kde,r=0,o=qde;for(const l of n)l<128&&e.push(zO(l));const s=e.length;let a=s;for(s&&e.push(Gde);a<t;){let l=gg;for(const d of n)d>=i&&d<l&&(l=d);const u=a+1;l-i>Zc((gg-r)/u)&&Ch("overflow"),r+=(l-i)*u,i=l;for(const d of n)if(d<i&&++r>gg&&Ch("overflow"),d===i){let h=r;for(let f=Qc;;f+=Qc){const p=f<=o?BO:f>=o+$8?$8:f-o;if(h<p)break;const g=h-p,m=Qc-p;e.push(zO(Zde(p+g%m,0))),h=Zc(g/m)}e.push(zO(Zde(h,0))),o=Xde(r,u,a===s),r=0,++a}++r,++i}return e.join("")},t0e={version:"2.3.1",ucs2:{decode:Qde,encode:cNt},decode:Jde,encode:e0e,toASCII:function(n){return Yde(n,function(e){return sNt.test(e)?"xn--"+e0e(e):e})},toUnicode:function(n){return Yde(n,function(e){return oNt.test(e)?Jde(e.slice(4).toLowerCase()):e})}},hNt={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},fNt=/^(vbscript|javascript|file|data):/,pNt=/^data:image\/(gif|png|jpeg|webp);/;function gNt(n){const e=n.trim().toLowerCase();return fNt.test(e)?pNt.test(e):!0}const n0e=["http:","https:","mailto:"];function mNt(n){const e=SO(n,!0);if(e.hostname&&(!e.protocol||n0e.indexOf(e.protocol)>=0))try{e.hostname=t0e.toASCII(e.hostname)}catch{}return B8(xO(e))}function bNt(n){const e=SO(n,!0);if(e.hostname&&(!e.protocol||n0e.indexOf(e.protocol)>=0))try{e.hostname=t0e.toUnicode(e.hostname)}catch{}return dg(xO(e),dg.defaultChars+"%")}function Il(n,e){if(!(this instanceof Il))return new Il(n,e);e||kO(n)||(e=n||{},n="default"),this.inline=new W8,this.block=new Ow,this.core=new TO,this.renderer=new fg,this.linkify=new Ua,this.validateLink=gNt,this.normalizeLink=mNt,this.normalizeLinkText=bNt,this.utils=DSt,this.helpers=Mw({},LSt),this.options={},this.configure(n),e&&this.set(e)}Il.prototype.set=function(n){return Mw(this.options,n),this},Il.prototype.configure=function(n){const e=this;if(kO(n)){const t=n;if(n=hNt[t],!n)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&e.set(n.options),n.components&&Object.keys(n.components).forEach(function(t){n.components[t].rules&&e[t].ruler.enableOnly(n.components[t].rules),n.components[t].rules2&&e[t].ruler2.enableOnly(n.components[t].rules2)}),this},Il.prototype.enable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(n,!0))},this),t=t.concat(this.inline.ruler2.enable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Il.prototype.disable=function(n,e){let t=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(n,!0))},this),t=t.concat(this.inline.ruler2.disable(n,!0));const i=n.filter(function(r){return t.indexOf(r)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Il.prototype.use=function(n){const e=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,e),this},Il.prototype.parse=function(n,e){if(typeof n!="string")throw new Error("Input data should be a String");const t=new this.core.State(n,this,e);return this.core.process(t),t.tokens},Il.prototype.render=function(n,e){return e=e||{},this.renderer.render(this.parse(n,e),this.options,e)},Il.prototype.parseInline=function(n,e){const t=new this.core.State(n,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},Il.prototype.renderInline=function(n,e){return e=e||{},this.renderer.render(this.parseInline(n,e),this.options,e)};const _Nt=["innerHTML"],yNt={__name:"FactorDescription",props:c.mergeModels({factorType:{type:String,default:"模版"},data:{type:Array,default:[]}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(n){const{request:e}=c.inject("stConfig"),t=new Il,i=c.ref(""),r=c.useModel(n,"visible");return c.onMounted(async()=>{const{data:o}=await e.post("/middleLayer/special/getOss",{url:"resource/factor_select.md"}),s=new Uint8Array(o.data),l=new TextDecoder("utf-8").decode(s);i.value=t.render(l)}),(o,s)=>{const a=GS,l=KS,u=Sd,d=s1;return c.openBlock(),c.createBlock(d,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=h=>r.value=h),title:n.factorType==="模版"?"因子说明":"脚本编写说明",width:"1000","align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:c.withCtx(()=>[c.createVNode(u,{height:"500px"},{default:c.withCtx(()=>[n.factorType==="模版"?(c.openBlock(),c.createBlock(l,{key:0,data:n.data,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(a,{prop:"factorName",label:"因子名称",width:"200"}),c.createVNode(a,{prop:"factorDesc",label:"因子说明"}),c.createVNode(a,{prop:"factorScoreDefine",label:"分值定义"})]),_:1},8,["data"])):c.createCommentVNode("",!0),n.factorType==="脚本"?(c.openBlock(),c.createElementBlock("div",{key:1,class:"markdown-body",innerHTML:i.value},null,8,_Nt)):c.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}},XTt="",i0e=n=>(c.pushScopeId("data-v-b7036a88"),n=n(),c.popScopeId(),n),vNt={class:"factor-screen"},CNt={style:{"white-space":"pre-line"}},wNt={class:"custom-header"},xNt={class:"left"},SNt=["id"],DNt={class:"right"},NNt={class:"form-row"},ENt={class:"index"},kNt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},LNt=i0e(()=>c.createElementVNode("span",null,"~",-1)),MNt=i0e(()=>c.createElementVNode("span",null,"&&代表and,||代表or",-1)),TNt={class:"dialog-footer"},ANt=In({__name:"index",props:c.mergeModels({config:{type:Object,default:{sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]}}},{data:{default:{list:[],sqlEnable:0,sqlValue:null}},dataModifiers:{}}),emits:["update:data"],setup(n){const e=n,t=c.useModel(n,"data"),i=c.ref(),r=c.ref(),o=c.ref(!1),s=c.ref(!1),a=c.ref("模版"),l=c.ref(null),u=c.ref({list:[{cycle:e.config.cycleDefault??null,factor:null,score:[null,null]}],sqlEnable:0,sqlValue:null,factorSelectExpr:""});c.watch(()=>[a.value,o.value],()=>{(a.value==="模版"||o.value===!1)&&r.value.close()},{deep:!0});const d=()=>{const{list:_,sqlEnable:v,sqlValue:w,factorSelectExpr:x}=t.value;u.value={list:JSON.parse(JSON.stringify(_)),sqlEnable:v,sqlValue:w,factorSelectExpr:x},u.value.list.length||p(),o.value=!0,c.nextTick(()=>{x?(a.value="脚本",i.value.setValue(x)):a.value="模版",i.value.resize()})},h=()=>{if(a.value==="模版")l.value.validate(_=>{const{list:v,sqlEnable:w,sqlValue:x}=u.value;if(_){if(w){if(!x)return mi.error("SQL语句不能为空");const S=fde(x),D=v.map((L,E)=>`条件${E+1}`),N=S.filter(L=>!D.includes(L));if(N.length)return mi.error(`请检查SQL语句, 不存在[${N}]`)}t.value={list:JSON.parse(JSON.stringify(v)),sqlEnable:w,sqlValue:x,factorSelectExpr:""},o.value=!1}});else{const _=i.value.getValue();if(!_)return mi.error("请输入脚本语句");t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:_},o.value=!1}},f=_=>{u.value.list.splice(_,1)},p=_=>{switch(_){case"compare":{u.value.list.push({key:"compare",cycle:e.config.cycleDefault??null,factor:null,compareType:">",cycle2:e.config.cycleDefault??null,factor2:null});break}default:{u.value.list.push({cycle:e.config.cycleDefault??null,factor:null,score:[null,null]});break}}},g=()=>{l.value.validate(_=>{if(_)if(u.value.sqlValue){const v=fde(u.value.sqlValue);u.value.sqlValue=u.value.list.reduce((w,x,S)=>(v.includes(`条件${S+1}`)||(w+=`&& 条件${S+1} `),w),u.value.sqlValue)}else u.value.sqlValue=u.value.list.reduce((v,w,x)=>(x===0?v+=`条件${x+1} `:v+=`&& 条件${x+1} `,v),"")})},m=_=>{switch(_.key){case"compare":{const{cycle:v,factor:w,compareType:x,cycle2:S,factor2:D}=_;let N="";return N+=` ${e.config.cycleOptions.find(({value:L})=>L===v).label}`,N+=` ${e.config.factorOptions.find(({value:L})=>L===w).label}`,N+=` ${x}`,N+=` ${e.config.cycleOptions.find(({value:L})=>L===S).label}`,N+=` ${e.config.factorOptions.find(({value:L})=>L===D).label}`,N}default:{const{cycle:v,factor:w,score:x}=_;let S="";return S+=` ${e.config.cycleOptions.find(({value:D})=>D===v).label}`,S+=` ${e.config.factorOptions.find(({value:D})=>D===w).label}`,S+=` ${x[0]||x[0]===0?`${x[0]}分`:"∞"}`,S+=" ~",S+=` ${x[1]||x[1]===0?`${x[1]}分`:"∞"}`,S}}},y=(_,v)=>{switch(_){case"sqlTag":{t.value={list:[],sqlEnable:0,sqlValue:null};break}case"factorTag":{t.value.list.splice(v,1);break}case"scriptTag":{TH.confirm("是否确认删除因子筛选: 脚本模式","删除操作",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""}});break}}},b=()=>{r.value.open(i.value)},C=_=>{if(!i.value)return mi.error("未检测到编辑器实例");const v=_,w=i.value.getInstance(),x=w.getPosition(),D=i.value.getValue().split(`
824
+ `);if(x.lineNumber<=D.length){const N=x.lineNumber-1,L=D[N],E=x.column-1,k=E>0?L[E-1]:"",A=E<L.length?L[E]:"";let R=v;k&&k!==" "&&!/[\s({[ ]/.test(k)&&(R=" "+R),A&&A!==" "&&!/[\s)}\]]/.test(A)&&(R=R+" ");const B=L.substring(0,E)+R+L.substring(E);D[N]=B;const I=D.join(`
825
+ `);i.value.setValue(I);const T=x.column+R.length;w.setPosition({lineNumber:x.lineNumber,column:T}),w.focus()}};return(_,v)=>{var oe;const w=wH,x=N6,S=uz,D=Ko,N=yn,L=rl,E=_V,k=Gx,A=c.resolveComponent("st-customFunction"),R=ql,B=Ul,I=I6,T=R6,O=Kx,P=jl,U=A6,Y=Sd,$=s1,z=c.resolveComponent("st-varSelectDialog");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",vNt,[c.createElementVNode("div",null,[t.value.sqlEnable&&t.value.sqlValue?(c.openBlock(),c.createBlock(x,{key:0,closable:"",type:"info",title:t.value.sqlValue,onClose:v[0]||(v[0]=ue=>y("sqlTag"))},{default:c.withCtx(()=>[c.createVNode(w,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):c.createCommentVNode("",!0),!t.value.sqlEnable&&t.value.list.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(t.value.list,(ue,le)=>(c.openBlock(),c.createBlock(x,{closable:"",type:"info",onClose:X=>y("factorTag",le)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m(ue)),1)]),_:2},1032,["onClose"]))),256)):c.createCommentVNode("",!0),t.value.factorSelectExpr?(c.openBlock(),c.createBlock(S,{key:2,width:"500",placement:"bottom-start"},{reference:c.withCtx(()=>[c.createVNode(x,{closable:"",type:"info",onClose:v[1]||(v[1]=ue=>y("scriptTag"))},{default:c.withCtx(()=>[c.createTextVNode(" 脚本模式 ")]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("div",CNt,c.toDisplayString(t.value.factorSelectExpr),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(D,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:d},{default:c.withCtx(()=>[c.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),c.createVNode($,{"modal-class":"factor-dialog",modelValue:o.value,"onUpdate:modelValue":v[8]||(v[8]=ue=>o.value=ue),width:"1000","align-center":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(({titleId:ue,titleClass:le})=>[c.createElementVNode("div",wNt,[c.createElementVNode("div",xNt,[c.createElementVNode("span",{id:ue,class:c.normalizeClass(le)}," 因子筛选 ",10,SNt),c.createVNode(L,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:c.withCtx(()=>[c.createVNode(N,{onClick:v[2]||(v[2]=X=>s.value=!0)},{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:1}),c.createVNode(k,{modelValue:a.value,"onUpdate:modelValue":v[3]||(v[3]=X=>a.value=X),size:"small"},{default:c.withCtx(()=>[c.createVNode(E,{label:"模版",value:"模版"}),c.createVNode(E,{label:"脚本",value:"脚本"})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(A,{size:"small",onInsert:C},null,512),[[c.vShow,a.value==="脚本"]])]),c.createElementVNode("div",DNt,[a.value==="脚本"?(c.openBlock(),c.createBlock(D,{key:0,size:"small",type:"primary",onClick:b},{default:c.withCtx(()=>[c.createTextVNode("变量选择器")]),_:1})):c.createCommentVNode("",!0),c.createVNode(N,{onClick:v[4]||(v[4]=X=>o.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(xd))]),_:1})])])]),footer:c.withCtx(()=>[c.createElementVNode("div",TNt,[c.createVNode(D,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>[a.value==="模版"?(c.openBlock(),c.createBlock(Y,{key:0,height:"400px"},{default:c.withCtx(()=>[c.createVNode(U,{ref_key:"dialogFormRef",ref:l,model:u.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value.list,(ue,le)=>(c.openBlock(),c.createElementBlock("div",NNt,[c.createElementVNode("span",ENt,c.toDisplayString(`条件${le+1}`),1),ue.key==="compare"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{style:{width:"52px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.compareType,"onUpdate:modelValue":X=>ue.compareType=X,size:"small"},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([">",">=","<","<="],X=>c.createVNode(R,{label:X,value:X,key:X},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:1,prop:"list."+le+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle2,"onUpdate:modelValue":X=>ue.cycle2=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor2,"onUpdate:modelValue":X=>ue.factor2=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[4].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[n.config.cycleShow?(c.openBlock(),c.createBlock(I,{key:0,prop:"list."+le+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.cycle,"onUpdate:modelValue":X=>ue.cycle=X,placeholder:"选择周期",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.config.cycleOptions,({label:X,value:re})=>(c.openBlock(),c.createBlock(R,{label:X,value:re,key:re},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c.createCommentVNode("",!0),c.createVNode(I,{prop:"list."+le+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:ue.factor,"onUpdate:modelValue":X=>ue.factor=X,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:c.withCtx(()=>{var X;return[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((X=n.config.factorOptions)==null?void 0:X.filter(re=>[1,3].includes(re.type)),({label:re,value:he})=>(c.openBlock(),c.createBlock(R,{label:re,value:he,key:he},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),c.createVNode(I,{prop:"list."+le+".score",rules:{validator:c.unref(Vxt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:c.withCtx(()=>[c.createElementVNode("div",kNt,[c.createVNode(T,{modelValue:ue.score[0],"onUpdate:modelValue":X=>ue.score[0]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),LNt,c.createVNode(T,{modelValue:ue.score[1],"onUpdate:modelValue":X=>ue.score[1]=X,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),c.createVNode(N,{onClick:X=>f(le)},{default:c.withCtx(()=>[c.createVNode(c.unref(_x))]),_:2},1032,["onClick"])]))),256)),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:p,style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子")]),_:1},8,["icon"]),c.createVNode(D,{type:"primary",plain:"",size:"small",icon:c.unref(c6),onClick:v[5]||(v[5]=ue=>p("compare")),style:{"margin-bottom":"10px"}},{default:c.withCtx(()=>[c.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(I,{label:"SQL功能: "},{default:c.withCtx(()=>[c.createVNode(k,{modelValue:u.value.sqlEnable,"onUpdate:modelValue":v[6]||(v[6]=ue=>u.value.sqlEnable=ue)},{default:c.withCtx(()=>[c.createVNode(O,{label:"关闭",value:0}),c.createVNode(O,{label:"启用",value:1})]),_:1},8,["modelValue"]),u.value.sqlEnable?(c.openBlock(),c.createBlock(D,{key:0,type:"primary",size:"small",onClick:g,style:{"margin-left":"auto"}},{default:c.withCtx(()=>[c.createTextVNode("生成SQL")]),_:1})):c.createCommentVNode("",!0)]),_:1}),u.value.sqlEnable?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(P,{modelValue:u.value.sqlValue,"onUpdate:modelValue":v[7]||(v[7]=ue=>u.value.sqlValue=ue),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),MNt],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",{style:c.normalizeStyle([{width:"968px",height:"400px"},a.value==="脚本"?null:{position:"fixed",top:"-400px",zIndex:-1,visibility:"hidden",pointerEvents:"none"}])},[c.createVNode(cde,{ref_key:"monacoEditorRef",ref:i,language:"lua"},null,512)],4)]),_:1},8,["modelValue"])]),c.createVNode(yNt,{visible:s.value,"onUpdate:visible":v[9]||(v[9]=ue=>s.value=ue),factorType:a.value,data:(oe=n.config.factorDescriptions)==null?void 0:oe.filter(ue=>[1,3].includes(ue.type))},null,8,["visible","factorType","data"]),c.createVNode(z,{ref_key:"stVarSelectDialogRef",ref:r},null,512)],64)}}},[["__scopeId","data-v-b7036a88"]]),eAt="",Bw=n=>(c.pushScopeId("data-v-3e69da40"),n=n(),c.popScopeId(),n),INt={key:0,class:"common-indicator"},RNt={class:"indicator"},ONt=Bw(()=>c.createElementVNode("div",{class:"title"},[c.createElementVNode("span",null,"常用指标: "),c.createElementVNode("span",null,"不限")],-1)),FNt={class:"options"},PNt=["onClick"],BNt={class:"tags"},VNt=["onClick"],zNt={style:{"font-size":"18px"}},HNt={key:0,class:"out-box"},jNt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),WNt={key:0,class:"convenient-option-box"},$Nt={class:"out-box"},UNt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),qNt={key:0},KNt={key:0},GNt={key:0},YNt={key:1},QNt={class:"tFeaturelncomes-option-box"},ZNt={class:"tFeaturelncomes-out-box"},XNt=Bw(()=>c.createElementVNode("span",null,"自定义: ",-1)),JNt={key:2},eEt={key:3},tEt={key:4},nEt={key:5},iEt={key:6},rEt={style:{display:"flex","align-items":"center"}},oEt={key:7},sEt={class:"dialog-footer"},aEt=In({__name:"index",props:c.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],i=c.useModel(n,"data"),r=n,o=c.ref(!1),s=c.computed(()=>{var b;return(b=r.data.find(C=>C.radioType==="1"))==null?void 0:b.key}),a=c.computed(()=>{let b=[];return r.varietyMarket===null&&!r.commonOption.length?b=r.config.options:(b=r.config.options,r.varietyMarket&&(b=b.filter(({parent:C})=>C.varietyMarketIds.includes(r.varietyMarket))),r.commonOption.length&&(b=b.filter(({parent:C})=>{const{commonOptionIds:_}=C;return[...new Set([..._,...r.commonOption])].length!==[..._,...r.commonOption].length}))),b}),l=c.ref({}),u=c.ref({}),d=b=>{l.value=b;const C={key:b.key,type:b.type,label:b.label};switch(b.key){case"st":{u.value={...C,st:null};break}case"tFeaturelncomes":{u.value={...C,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{u.value={...C,priceLevels:null};break}case"peTtmLevels":{u.value={...C,peTtmLevels:null};break}case"optionsCpType":{u.value={...C,optionsCpType:null};break}case"perVolumn":{u.value={...C,radio:null,levels:[]};break}case"mainFlow":{u.value={...C,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{u.value={...C,enumType:null};break}default:u.value={...C,range:[null,null],unit:b.defaultUnit.length?[...b.defaultUnit]:[null,null],radioType:s.value&&s.value!==b.key?"0":b.defaultRadioType,rankRange:b.defaultRankRange||[null,null]}}o.value=!0},h=()=>{var C,_;switch(u.value.key){case"st":{const{label:v,st:w}=u.value;if(w===null)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w?"是":"否"}`;break}case"tFeaturelncomes":{const{label:v,rule:w,withFewYears:x,yearsCount:S,netProfit:D}=u.value;if(["",null].includes(x)||["",null].includes(S)||["",null].includes(D))return mi.warning("格式错误: 请填写完整");u.value.tagText=`${v}: ${x}年内${S}年以上盈利${w===1?"超":"跌"}过${D}亿`;break}case"priceLevels":{const{label:v,priceLevels:w}=u.value;if(!w||w.length===0)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"peTtmLevels":{const{label:v,peTtmLevels:w}=u.value;if(!w||w.length===0)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: 已选${w}分位`;break}case"optionsCpType":{const{label:v,optionsCpType:w}=u.value;if(w===null)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${w===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:v,radio:w,levels:x}=u.value;if(!w)return mi.warning("格式错误: 请选择时间");if(!(x!=null&&x.length))return mi.warning("格式错误: 请选择分位");u.value.tagText=`${v}: ${(C=e.find(S=>S.value===w))==null?void 0:C.label}${x.map(S=>`${S}分位`).join("、")}`;break}case"mainFlow":{const{label:v,radioType:w,radio:x,rankRange:S}=u.value,D=N=>{if(N===""||N===null||N===void 0)return!1;const L=Number(N);return!isNaN(L)};if(!x)return mi.warning("格式错误: 请选择时间");if(!D(S[0])&&!D(S[1]))return mi.warning(`格式错误: 请填写${w==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ${S[0]}${w==="0"?"%":""} ~ ${S[1]}${w==="0"?"%":""}`:["",null].includes(S[0])?u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≤${S[1]}${w==="0"?"%":""}`:u.value.tagText=`${v}: ${x}日${w==="0"?"涨幅范围":"排名范围"}: ≥${S[0]}${w==="0"?"%":""}`;break}case"auditOpinionType":{const{label:v,enumType:w}=u.value;if(w===null)return mi.warning("格式错误: 请至少选择一个值");u.value.tagText=`${v}: ${(_=t.find(x=>x.value===w))==null?void 0:_.label}`;break}default:{const{label:v,unit:w,radioType:x}=u.value,S=x==="1"?u.value.rankRange:u.value.range;if(["",null].includes(S[0])&&["",null].includes(S[1]))return mi.warning("格式错误: 请至少填写一个值");if(x==="1"){const L=Number(S[0]),E=Number(S[1]);if(isNaN(L)||isNaN(E))return mi.warning("格式错误: 请填写数字");if(L<0||E<0)return mi.warning("格式错误: 请填写大于0的数字");if(L>E)return mi.warning("格式错误: 请填写正确的排名范围")}const D=x==="1"?"":w[0]??"",N=x==="1"?"":w[1]??"";!["",null].includes(S[0])&&!["",null].includes(S[1])?u.value.tagText=`${v}${x==="1"?"排名":""}: ${S[0]}${D} ~ ${S[1]}${N}`:["",null].includes(S[0])?u.value.tagText=`${v}${x==="1"?"排名":""}: ≤${S[1]}${N}`:u.value.tagText=`${v}${x==="1"?"排名":""}: ≥${S[0]}${D}`}}const b=i.value.findIndex(({key:v})=>v===u.value.key);b===-1?i.value.push(u.value):i.value.splice(b,1,u.value),o.value=!1},f=b=>{l.value=a.value.find(({key:C})=>C===b.key),u.value=JSON.parse(JSON.stringify(b)),o.value=!0},p=b=>{i.value.splice(b,1)},g=b=>{u.value.range=[...b.range],u.value.unit=[...b.unit]},m=b=>{switch(b){case"≤0":Object.assign(u.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(u.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(u.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};c.watch(()=>a.value,()=>{i.value.length&&(i.value=i.value.filter(({key:b})=>a.value.find(C=>C.key===b)))});const y=()=>{u.value.radio=null,u.value.rankRange=[null,null]};return(b,C)=>{const _=N6,v=_V,w=Gx,x=jl,S=Ko,D=ql,N=Ul,L=Kx,E=R6,k=s1;return n.config.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",INt,[c.createElementVNode("div",RNt,[ONt,c.createElementVNode("div",FNt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,A=>(c.openBlock(),c.createElementBlock("span",{key:A.key,onClick:R=>d(A)},c.toDisplayString(A.label),9,PNt))),128))])]),c.createElementVNode("div",BNt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(A,R)=>(c.openBlock(),c.createBlock(_,{closable:"",type:"info",onClose:B=>p(R)},{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(A.tagText),1),c.createElementVNode("span",{class:"edit",onClick:B=>f(A)},"编辑",8,VNt)]),_:2},1032,["onClose"]))),256))]),c.createVNode(k,{modelValue:o.value,"onUpdate:modelValue":C[26]||(C[26]=A=>o.value=A),title:l.value.label,width:"600","align-center":"","destroy-on-close":""},c.createSlots({footer:c.withCtx(()=>[c.createElementVNode("div",sEt,[c.createVNode(S,{type:"primary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode("确定")]),_:1})])]),default:c.withCtx(()=>{var A;return[l.value.type===void 0&&u.value.radioType==="1"?(c.openBlock(),c.createElementBlock("div",HNt,[jNt,c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[2]||(C[2]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[3]||(C[3]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):l.value.type===void 0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[(A=l.value.convenientOptions)!=null&&A.length?(c.openBlock(),c.createElementBlock("div",WNt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.convenientOptions,R=>(c.openBlock(),c.createBlock(S,{key:R.text,onClick:B=>g(R)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",$Nt,[UNt,c.createVNode(x,{modelValue:u.value.range[0],"onUpdate:modelValue":C[5]||(C[5]=R=>u.value.range[0]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",qNt,c.toDisplayString(u.value.unit[0]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[0],"onUpdate:modelValue":C[4]||(C[4]=R=>u.value.unit[0]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.range[1],"onUpdate:modelValue":C[7]||(C[7]=R=>u.value.range[1]=R),style:{flex:"1"}},c.createSlots({_:2},[l.value.unitOptions.length?{name:"append",fn:c.withCtx(()=>[l.value.unitOptions.length===1?(c.openBlock(),c.createElementBlock("span",KNt,c.toDisplayString(u.value.unit[1]),1)):(c.openBlock(),c.createBlock(N,{key:1,modelValue:u.value.unit[1],"onUpdate:modelValue":C[6]||(C[6]=R=>u.value.unit[1]=R),style:{width:"72px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value.unitOptions,R=>(c.openBlock(),c.createBlock(D,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[l.value.key==="st"?(c.openBlock(),c.createElementBlock("div",GNt,[c.createVNode(w,{modelValue:u.value.st,"onUpdate:modelValue":C[8]||(C[8]=R=>u.value.st=R)},{default:c.withCtx(()=>[c.createVNode(L,{label:"是",value:1}),c.createVNode(L,{label:"否",value:0})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="tFeaturelncomes"?(c.openBlock(),c.createElementBlock("div",YNt,[c.createElementVNode("div",QNt,[c.createVNode(S,{onClick:C[9]||(C[9]=R=>m("≤0"))},{default:c.withCtx(()=>[c.createTextVNode("≤0")]),_:1}),c.createVNode(S,{onClick:C[10]||(C[10]=R=>m("≥0"))},{default:c.withCtx(()=>[c.createTextVNode("≥0")]),_:1}),c.createVNode(S,{onClick:C[11]||(C[11]=R=>m("五年内有四年以上盈利超过5千万"))},{default:c.withCtx(()=>[c.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),c.createVNode(S,{onClick:C[12]||(C[12]=R=>m("≥10亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥10亿")]),_:1}),c.createVNode(S,{onClick:C[13]||(C[13]=R=>m("≥20亿"))},{default:c.withCtx(()=>[c.createTextVNode("≥20亿")]),_:1})]),c.createElementVNode("div",ZNt,[XNt,c.createElementVNode("div",null,[c.createVNode(E,{modelValue:u.value.withFewYears,"onUpdate:modelValue":C[14]||(C[14]=R=>u.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年内 "),c.createVNode(E,{modelValue:u.value.yearsCount,"onUpdate:modelValue":C[15]||(C[15]=R=>u.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 年以上盈利"+c.toDisplayString(u.value.rule===1?"超":"跌")+"过 ",1),c.createVNode(E,{modelValue:u.value.netProfit,"onUpdate:modelValue":C[16]||(C[16]=R=>u.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),c.createTextVNode(" 亿 ")])])])):c.createCommentVNode("",!0),l.value.key==="priceLevels"?(c.openBlock(),c.createElementBlock("div",JNt,[c.createVNode(N,{modelValue:u.value.priceLevels,"onUpdate:modelValue":C[17]||(C[17]=R=>u.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="peTtmLevels"?(c.openBlock(),c.createElementBlock("div",eEt,[c.createVNode(N,{modelValue:u.value.peTtmLevels,"onUpdate:modelValue":C[18]||(C[18]=R=>u.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5,6,7,8,9,10],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="optionsCpType"?(c.openBlock(),c.createElementBlock("div",tEt,[c.createVNode(w,{modelValue:u.value.optionsCpType,"onUpdate:modelValue":C[19]||(C[19]=R=>u.value.optionsCpType=R)},{default:c.withCtx(()=>[c.createVNode(L,{label:"看涨",value:1}),c.createVNode(L,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="perVolumn"?(c.openBlock(),c.createElementBlock("div",nEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[20]||(C[20]=R=>u.value.radio=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(e,R=>c.createVNode(L,{key:R.value,value:R.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),c.createVNode(N,{modelValue:u.value.levels,"onUpdate:modelValue":C[21]||(C[21]=R=>u.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList([1,2,3,4,5],R=>c.createVNode(D,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),l.value.key==="mainFlow"?(c.openBlock(),c.createElementBlock("div",iEt,[c.createVNode(w,{modelValue:u.value.radio,"onUpdate:modelValue":C[22]||(C[22]=R=>u.value.radio=R)},{default:c.withCtx(()=>[c.createVNode(L,{value:"3"},{default:c.withCtx(()=>[c.createTextVNode("3日")]),_:1}),c.createVNode(L,{value:"5"},{default:c.withCtx(()=>[c.createTextVNode("5日")]),_:1}),c.createVNode(L,{value:"10"},{default:c.withCtx(()=>[c.createTextVNode("10日")]),_:1}),c.createVNode(L,{value:"20"},{default:c.withCtx(()=>[c.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",rEt,[c.createElementVNode("span",null,c.toDisplayString(u.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),c.createVNode(x,{modelValue:u.value.rankRange[0],"onUpdate:modelValue":C[23]||(C[23]=R=>u.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),c.createTextVNode(" ~ "),c.createVNode(x,{modelValue:u.value.rankRange[1],"onUpdate:modelValue":C[24]||(C[24]=R=>u.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):c.createCommentVNode("",!0),l.value.key==="auditOpinionType"?(c.openBlock(),c.createElementBlock("div",oEt,[c.createVNode(w,{modelValue:u.value.enumType,"onUpdate:modelValue":C[25]||(C[25]=R=>u.value.enumType=R)},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(t,(R,B)=>c.createVNode(L,{key:B,label:R.label,value:R.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0)],64))]}),_:2},[l.value.showRankType?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",zNt,c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[0]||(C[0]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"}},{default:c.withCtx(()=>[c.createVNode(v,{label:"数值",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:l.value.key==="mainFlow"?{name:"header",fn:c.withCtx(()=>[c.createElementVNode("span",{style:{"font-size":"18px"}},c.toDisplayString(l.value.label),1),c.createVNode(w,{modelValue:u.value.radioType,"onUpdate:modelValue":C[1]||(C[1]=A=>u.value.radioType=A),style:{"vertical-align":"4px","margin-left":"12px"},onChange:y},{default:c.withCtx(()=>[c.createVNode(v,{label:"涨幅范围",value:"0"}),c.createVNode(v,{disabled:s.value&&s.value!==l.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):c.createCommentVNode("",!0)}}},[["__scopeId","data-v-3e69da40"]]),nAt="",mg=n=>(c.pushScopeId("data-v-efd872de"),n=n(),c.popScopeId(),n),lEt={class:"variety-search"},uEt={key:0,class:"variety-search-row"},cEt={class:"title"},dEt=mg(()=>c.createElementVNode("span",null,"品种市场: ",-1)),hEt={key:1,class:"variety-search-row"},fEt={class:"title"},pEt=mg(()=>c.createElementVNode("span",null,"常用选项: ",-1)),gEt={key:2,class:"variety-search-row"},mEt={class:"title"},bEt=mg(()=>c.createElementVNode("span",null,"上市板块: ",-1)),_Et={key:3,class:"variety-search-row"},yEt={class:"title"},vEt=mg(()=>c.createElementVNode("span",null,"自定标签: ",-1)),CEt={key:4,class:"variety-search-row"},wEt={class:"title"},xEt=mg(()=>c.createElementVNode("span",null,"价差转换: ",-1)),SEt={key:5,class:"variety-search-row"},DEt={class:"title"},NEt=mg(()=>c.createElementVNode("span",null,"因子筛选: ",-1)),EEt=In({__name:"index",props:c.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=c.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]});const r=c.computed(()=>{const h={};return Object.keys(hde).forEach(f=>{const p=hde[f],g=t.config[f]??{},m={...p,...g};h[f]=m}),h}),o=c.computed(()=>r.value.varietyMarket.options),s=c.computed(()=>{const{varietyMarket:h}=i.value;return h?o.value.find(({value:p})=>p===h).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(y=>y.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=c.computed(()=>{const{varietyMarket:h}=i.value;return h?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(h)):r.value.marketIds.options}),l=c.computed(()=>r.value.customTag.options),u=c.computed(()=>r.value.jcTranslate.jcOptions),d=h=>{switch(h){case"commonOption":{i.value[h]=[];break}case"marketIds":{i.value[h]=[];break}case"customTag":{i.value[h]=[];break}case"jcTranslate":{i.value[h]={type:null,jcList:[]};break}case"factorScreen":{i.value[h]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{i.value[h]=[];break}default:{i.value[h]=null;break}}};return c.watch(()=>s.value,h=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>h.find(({value:g})=>g===p)))}),c.watch(()=>a.value,h=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>h.find(({value:g})=>g===p)))}),e({formatData:h=>{var p,g,m,y,b,C;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(h.varietyMarket&&(f.exchangeId=String(h.varietyMarket)),(p=h.commonOption)!=null&&p.length&&(f.optionId=h.commonOption.join(",")),(g=h.marketIds)!=null&&g.length&&(f.marketIds=h.marketIds),(m=h.customTag)!=null&&m.length&&(f.tagIds=h.customTag),(y=r.value.jcTranslate)!=null&&y.show){const{jcTranslate:_}=h,{type:v,jcList:w}=_;switch(v){case 1:{f.translateType=1,f.jcType=w.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:_}=h;if((C=_==null?void 0:_.list)!=null&&C.length&&(f.tbFeatureFactorScores=_.list.map(v=>{switch(v.key){case"compare":return{freqId:v.cycle,factorId:v.factor,compareType:v.compareType,freqId2:v.cycle2,factorId2:v.factor2};default:return{freqId:v.cycle,factorId:v.factor,startScore:v.score[0],endScore:v.score[1]}}})),_.sqlEnable){const v=_.list.reduce((x,S,D)=>{var L,E;const N=`条件${D+1}`;switch(S.key){case"compare":{let k="";(L=r.value.factorScreen)!=null&&L.cycleShow?k=`freq_id = ${S.cycle} and factor_id = ${S.factor} ${S.compareType} freq_id = ${S.cycle2} and factor_id = ${S.factor2}`:k=`factor_id = ${S.factor} ${S.compareType} factor_id = ${S.factor2}`,x.set(N,`(${k})`);break}default:{let k=`factor_id = ${S.factor} and `;(E=r.value.factorScreen)!=null&&E.cycleShow&&(k=`freq_id = ${S.cycle} and factor_id = ${S.factor} and `),(S.score[0]||S.score[0]===0)&&(S.score[1]||S.score[1]===0)?k+=`score >= ${S.score[0]} and score <= ${S.score[1]}`:S.score[0]||S.score[0]===0?k+=`score >= ${S.score[0]}`:(S.score[1]||S.score[1]===0)&&(k+=`score <= ${S.score[1]}`),x.set(N,`(${k})`)}}return x},new Map([]));let w=_.sqlValue;for(const[x,S]of v){const D=new RegExp(x,"g");w=w.replace(D,S)}f.sql=w,f.sqlExpression=_.sqlValue}f.enableSql=_.sqlEnable===1?2:1,_.factorSelectExpr&&(f.factorSelectExpr=_.factorSelectExpr)}{const _=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],v=h.commonIndicator.reduce((E,k)=>{const{key:A,type:R,range:B,unit:I,radioType:T,radio:O,rankRange:P}=k;if(A==="mainFlow"){let[U,Y]=P,$=T==="0"?`netInfow${O}d`:`last${O}DayMainFlowRank`;E.push({column:$,start:U,end:Y})}if(A==="auditOpinionType")E.push({column:k.key,enumType:k.enumType});else if(T==="1")f.sortBy={column:k.key,start:P[0]||null,end:P[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(A)){let[U,Y]=B;["",null].includes(U)||(U=U/100),["",null].includes(Y)||(Y=Y/100),E.push({column:k.key,start:U,end:Y})}else if(R===void 0&&!_.includes(A)){let[U,Y]=B;if(!["",null].includes(U))switch(I[0]){case"亿":U=U*1e8;break;case"千万":U=U*1e7;break;default:U=U;break}if(!["",null].includes(Y))switch(I[1]){case"亿":Y=Y*1e8;break;case"千万":Y=Y*1e7;break;default:Y=Y;break}E.push({column:k.key,start:U,end:Y})}return E},[]);v.length&&(f.query=v);const w=h.commonIndicator.find(({key:E})=>E==="st");w&&(f.st=w.st);const x=h.commonIndicator.find(({key:E})=>E==="tFeaturelncomes");x&&(f.netProfitQueryDto={...x,netProfit:x.netProfit*1e8});const S=h.commonIndicator.find(({key:E})=>E==="priceLevels");S&&(f.priceLevels=S.priceLevels);const D=h.commonIndicator.find(({key:E})=>E==="peTtmLevels");D&&(f.peTtmLevels=D.peTtmLevels);const N={};h.commonIndicator.forEach(E=>{const{key:k}=E;switch(k){case"expireDays":["",null].includes(E.range[0])||(N.minExpireDays=E.range[0]),["",null].includes(E.range[1])||(N.maxExpireDays=E.range[1]);break;case"virtualRealDegree":["",null].includes(E.range[0])||(N.minVirtualRealDegree=E.range[0]/100),["",null].includes(E.range[1])||(N.maxVirtualRealDegree=E.range[1]/100);break;case"yearProfitRate":["",null].includes(E.range[0])||(N.minYearProfitRate=E.range[0]/100),["",null].includes(E.range[1])||(N.maxYearProfitRate=E.range[1]/100);break;case"impliedVolatility":["",null].includes(E.range[0])||(N.minImpliedVolatility=E.range[0]/100),["",null].includes(E.range[1])||(N.maxImpliedVolatility=E.range[1]/100);break;case"levelMultiplier":["",null].includes(E.range[0])||(N.minLevelMultiplier=E.range[0]),["",null].includes(E.range[1])||(N.maxLevelMultiplier=E.range[1]);break;case"turnover":["",null].includes(E.range[0])||(N.minTurnover=E.range[0]*1e4),["",null].includes(E.range[1])||(N.maxTurnover=E.range[1]*1e4);break;case"volume":["",null].includes(E.range[0])||(N.minVolume=E.range[0]),["",null].includes(E.range[1])||(N.maxVolume=E.range[1]);break;case"openInterest":["",null].includes(E.range[0])||(N.minOpenInterest=E.range[0]),["",null].includes(E.range[1])||(N.maxOpenInterest=E.range[1]);break;case"optionsCpType":N.optionsCpType=E.optionsCpType;break;case"optionGear":["",null].includes(E.range[0])||(N.minOptionGear=E.range[0]),["",null].includes(E.range[1])||(N.maxOptionGear=E.range[1]);break}});const L=h.commonIndicator.find(({key:E})=>E==="perVolumn");L&&(f.perVolumn={type:L.radio,value:L.levels}),Object.keys(N).length&&(f.searchOptionDto={...f.searchOptionDto,...N})}return console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[]}}}),(h,f)=>{var _,v,w,x,S,D;const p=Kx,g=Gx,m=Td,y=uV,b=ql,C=Ul;return c.openBlock(),c.createElementBlock("div",lEt,[(_=r.value.varietyMarket)!=null&&_.show?(c.openBlock(),c.createElementBlock("div",uEt,[c.createElementVNode("div",cEt,[dEt,c.createElementVNode("span",{onClick:f[0]||(f[0]=N=>d("varietyMarket"))},"不限")]),c.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=N=>i.value.varietyMarket=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(p,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(v=r.value.commonOption)!=null&&v.show&&s.value.length?(c.openBlock(),c.createElementBlock("div",hEt,[c.createElementVNode("div",fEt,[pEt,c.createElementVNode("span",{onClick:f[2]||(f[2]=N=>d("commonOption"))},"不限")]),c.createVNode(y,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=N=>i.value.commonOption=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(w=r.value.marketIds)!=null&&w.show&&a.value.length?(c.openBlock(),c.createElementBlock("div",gEt,[c.createElementVNode("div",mEt,[bEt,c.createElementVNode("span",{onClick:f[4]||(f[4]=N=>d("marketIds"))},"不限")]),c.createVNode(y,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=N=>i.value.marketIds=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(x=r.value.customTag)!=null&&x.show&&l.value.length?(c.openBlock(),c.createElementBlock("div",_Et,[c.createElementVNode("div",yEt,[vEt,c.createElementVNode("span",{onClick:f[6]||(f[6]=N=>d("customTag"))},"不限")]),c.createVNode(y,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=N=>i.value.customTag=N),size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,({label:N,value:L})=>(c.openBlock(),c.createBlock(m,{label:N,value:L,key:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):c.createCommentVNode("",!0),(S=r.value.jcTranslate)!=null&&S.show?(c.openBlock(),c.createElementBlock("div",CEt,[c.createElementVNode("div",wEt,[xEt,c.createElementVNode("span",{onClick:f[8]||(f[8]=N=>d("jcTranslate"))},"不限")]),c.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=N=>i.value.jcTranslate.type=N),size:"small"},{default:c.withCtx(()=>[c.createVNode(p,{value:2},{default:c.withCtx(()=>[c.createTextVNode("价差转品种")]),_:1}),c.createVNode(p,{value:1},{default:c.withCtx(()=>[c.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),c.withDirectives(c.createVNode(C,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=N=>i.value.jcTranslate.jcList=N),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u.value,N=>(c.openBlock(),c.createBlock(b,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[c.vShow,i.value.jcTranslate.type===1]])])):c.createCommentVNode("",!0),(D=r.value.factorScreen)!=null&&D.show?(c.openBlock(),c.createElementBlock("div",SEt,[c.createElementVNode("div",DEt,[NEt,c.createElementVNode("span",{onClick:f[11]||(f[11]=N=>d("factorScreen"))},"不限")]),c.createVNode(ANt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=N=>i.value.factorScreen=N),config:r.value.factorScreen},null,8,["data","config"])])):c.createCommentVNode("",!0),c.createVNode(aEt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=N=>i.value.commonIndicator=N),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-efd872de"]]),kEt={install(n){n.component("st-varietySearch",EEt)}},rAt="",oAt="",LEt={class:"variety-auto-complete"},MEt={key:0},TEt={class:"label"},AEt=In({__name:"VarietySelect",props:{size:{type:String,default:"default"},placeholder:{type:String,default:"请输入品种名称或代码"},labelShowEnable:{type:Boolean,default:!0},selectClearEnable:{type:Boolean,default:!0}},emits:["select","change"],setup(n,{emit:e}){const t=c.inject("stConfig"),i=e,r=n,o=c.ref(""),s=async(u,d)=>{if(u===""||u==="null")d([]);else{const h={keyWord:u,pageNum:1,pageSize:999,userId:I2("id"),hotSearchFlag:1},{body:f}=await t.request.post("/common/qt/getFeatureInfosByPage",h),p=f.list.map(({code:g,featureName:m})=>({label:`${g}   ${m}`,value:g}));d(p)}},a=({label:u,value:d})=>{const h=u.split(" ").at(-1);i("select",{name:h,code:d}),r.selectClearEnable&&(o.value="")},l=u=>{i("change",u)};return(u,d)=>{const h=V9e;return c.openBlock(),c.createElementBlock("div",LEt,[n.labelShowEnable?(c.openBlock(),c.createElementBlock("span",MEt,"品种搜索:")):c.createCommentVNode("",!0),c.createVNode(h,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=f=>o.value=f),clearable:"",size:r.size,placeholder:r.placeholder,"fetch-suggestions":s,onSelect:a,onChange:l},{default:c.withCtx(({item:f})=>[c.createElementVNode("div",TEt,c.toDisplayString(f.label),1)]),_:1},8,["modelValue","size","placeholder"])])}}},[["__scopeId","data-v-d433c4b8"]]),aAt="",lAt="",IEt=n=>(c.pushScopeId("data-v-e4f6c06a"),n=n(),c.popScopeId(),n),REt={class:"custom-header"},OEt={class:"left"},FEt=IEt(()=>c.createElementVNode("span",null," 选择变量 ",-1)),PEt={class:"right"},BEt={class:"custom-body"},VEt={class:"config-list"},zEt={class:"config-item"},HEt={key:0},jEt={key:0},WEt={key:1},$Et={key:0},UEt={style:{"max-width":"820px"}},qEt={style:{"white-space":"pre-line"}},KEt=In({__name:"index",props:{useCase:{type:String,default:"1"}},setup(n,{expose:e}){const t=c.inject("stConfig"),i=n,r=c.ref(null),o=c.ref(!1),s=c.ref(null),a=c.ref([]),l=c.computed(()=>{var h;return((h=a.value.find(f=>f.varName===s.value))==null?void 0:h.formatList)??[]}),u=h=>h.replace(/^\[|\]$/g,"").split("],[").map(g=>{const m=g.replace(/\[|\]/g,""),[y,b]=m.split(",");return{label:y.trim(),value:b.trim()}}),d=h=>{const f=[];for(let C=0;C<h.length;C++){const _=h[C];switch(console.log(_),_.vtype){case"text":{f.push(_.param);break}default:{if(!_.modelValue)return mi.error("请检查插入格式内是否填写完整");let v=_.modelValue;_.prefix&&(v=`${_.prefix}${v}`),_.suffix&&(v=`${v}${_.suffix}`),f.push(v);break}}}if(!r.value)return mi.error("未检测到编辑器实例");const p=f.join("_"),g=r.value.getInstance(),m=g.getPosition(),b=r.value.getValue().split(`
826
+ `);if(m.lineNumber<=b.length){const C=m.lineNumber-1,_=b[C],v=m.column-1,w=v>0?_[v-1]:"",x=v<_.length?_[v]:"";let S=p;w&&w!==" "&&!/[\s({[ ]/.test(w)&&(S=" "+S),x&&x!==" "&&!/[\s)}\]]/.test(x)&&(S=S+" ");const D=_.substring(0,v)+S+_.substring(v);b[C]=D;const N=b.join(`
827
+ `);r.value.setValue(N);const L=m.column+S.length;g.setPosition({lineNumber:m.lineNumber,column:L}),g.focus()}};return c.onMounted(async()=>{const{body:h}=await t.request.post("/common/conf/queryAllBackVariables",{useCase:i.useCase});a.value=h??[]}),e({open:h=>{r.value=h,o.value=!0},close:()=>{o.value=!1}}),(h,f)=>{const p=ql,g=Ul,m=yn,y=jl,b=Ko,C=rl,_=s1;return c.openBlock(),c.createBlock(_,{"modal-class":"var-select-dialog",modelValue:o.value,"onUpdate:modelValue":f[2]||(f[2]=v=>o.value=v),"align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:c.withCtx(()=>[c.createElementVNode("div",REt,[c.createElementVNode("div",OEt,[FEt,c.createVNode(g,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value=v),placeholder:"选择变量",filterable:"",clearable:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.value,(v,w)=>(c.openBlock(),c.createBlock(p,{key:w,label:v.varName,value:v.varName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),c.createElementVNode("div",PEt,[c.createVNode(m,{class:"el-icon--left",onClick:f[1]||(f[1]=v=>o.value=!1)},{default:c.withCtx(()=>[c.createVNode(c.unref(xd))]),_:1})])])]),default:c.withCtx(()=>[c.createElementVNode("div",BEt,[l.value.length?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(l.value,(v,w)=>(c.openBlock(),c.createElementBlock("div",{class:"format-item",key:w},[c.createElementVNode("span",null,"格式"+c.toDisplayString(w+1)+":",1),c.createElementVNode("div",VEt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(v.configList,(x,S)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",zEt,[x.vtype==="text"?(c.openBlock(),c.createElementBlock("span",HEt,c.toDisplayString(x.param),1)):c.createCommentVNode("",!0),x.vtype==="inputVariety"?(c.openBlock(),c.createBlock(AEt,{key:1,size:"small",placeholder:x.param,selectClearEnable:!1,labelShowEnable:!1,onSelect:({name:D,code:N})=>x.modelValue=N,onChange:D=>x.modelValue=D,style:{width:"100px"}},null,8,["placeholder","onSelect","onChange"])):c.createCommentVNode("",!0),x.vtype==="input"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[x.prefix?(c.openBlock(),c.createElementBlock("span",jEt,c.toDisplayString(x.prefix),1)):c.createCommentVNode("",!0),c.createVNode(y,{modelValue:x.modelValue,"onUpdate:modelValue":D=>x.modelValue=D,placeholder:x.param,size:"small"},null,8,["modelValue","onUpdate:modelValue","placeholder"]),x.suffix?(c.openBlock(),c.createElementBlock("span",WEt,c.toDisplayString(x.suffix),1)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),x.vtype==="select"?(c.openBlock(),c.createBlock(g,{key:3,modelValue:x.modelValue,"onUpdate:modelValue":D=>x.modelValue=D,placeholder:x.param,clearable:"",size:"small"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u(x.optionsStr),D=>(c.openBlock(),c.createBlock(p,{key:D.value,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):c.createCommentVNode("",!0)]),S!==v.configList.length-1?(c.openBlock(),c.createElementBlock("span",$Et,"_")):c.createCommentVNode("",!0)],64))),256))]),c.createVNode(b,{type:"primary",plain:"",size:"small",onClick:x=>d(v.configList)},{default:c.withCtx(()=>[c.createTextVNode(" 插入变量 ")]),_:2},1032,["onClick"]),c.createVNode(C,{effect:"dark",placement:"top-start"},{content:c.withCtx(()=>[c.createElementVNode("div",UEt,[c.createElementVNode("span",qEt,c.toDisplayString(v.tip),1)])]),default:c.withCtx(()=>[c.createVNode(m,null,{default:c.withCtx(()=>[c.createVNode(c.unref(Ah))]),_:1})]),_:2},1024)]))),128)):c.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}},[["__scopeId","data-v-e4f6c06a"]]),GEt={install(n){n.component("st-varSelectDialog",KEt)}},cAt="",dAt="",YEt={key:0,class:"footer-box"},QEt={__name:"index",props:c.mergeModels({tableData:{type:Array,default:[]},tableColumn:{type:Array,default:[]},tableLoading:{type:[String,null],default:null},config:{type:Object}},{tableActiveData:{default:()=>[]},tableActiveDataModifiers:{}}),emits:c.mergeModels(["touchBottom"],["update:tableActiveData"]),setup(n,{emit:e}){const t=e,i=n,r=c.computed(()=>({headerHeight:50,rowHeight:50,tableActiveNum:9,tableActiveKey:"id",pageUpDownEnabled:!0,...i.config})),o=c.ref(null),s=c.ref(0);let a=0,l=!1,u=null;const d=c.useModel(n,"tableActiveData"),h=c.computed(()=>d.value.map(b=>b[r.value.tableActiveKey])),f=({rowData:b,rowIndex:C})=>{const{tableActiveNum:_,tableActiveKey:v}=r.value;if(h.value.includes(b[v]))return;const w=Math.floor(C/_)*_,x=w+_;d.value=i.tableData.slice(w,x)},p=({code:b})=>{const{tableData:C}=i,{tableActiveNum:_,tableActiveKey:v,pageUpDownEnabled:w}=r.value;if(!C.length||!w)return;const x=C.findIndex(L=>L[v]===h.value.at(0)),S=C.findIndex(L=>L[v]===h.value.at(-1));let D=null,N=null;switch(b){case"PageUp":if(x===0)return;D=x-_>0?x-_:0,N=D+_-1,d.value=C.slice(D,N+1),m(D,"PageUp");break;case"PageDown":if(S===C.length-1)return;D=x+_,N=D+_-1,d.value=C.slice(D,N+1),m(N,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,C)=>{b!==null&&(clearTimeout(u),l=!0,C==="PageUp"?s.value=0:b>=i.tableData.length-1&&(s.value=30,t("touchBottom")),c.nextTick(()=>{o.value.scrollToRow(b),o.value.scrollToLeft(a),u=setTimeout(()=>{l=!1},500)}))},y=({rowData:b})=>{if(!d.value.length)return;let C="";const{tableActiveKey:_}=r.value;return b[_]===h.value[0]&&(C+=" virtual-table-active-start"),h.value.includes(b[_])&&(C+=" virtual-table-active-row"),b[_]===h.value[h.value.length-1]&&(C+=" virtual-table-active-end"),C};return c.onMounted(()=>{window.addEventListener("keydown",p)}),c.watch(()=>i.tableLoading,b=>{b||(s.value=0)}),c.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(b,C)=>{const _=Kg,v=Ko,w=LV,x=Zve,S=Xve;return c.openBlock(),c.createBlock(S,null,{default:c.withCtx(({height:D,width:N})=>[c.createVNode(x,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:N,height:D,"header-height":r.value.headerHeight,"row-height":r.value.rowHeight,"row-class":y,"row-event-handlers":{onClick:f},"footer-height":s.value,"scrollbar-always-on":"",onScroll:g,onEndReached:C[0]||(C[0]=L=>m(n.tableData.length-1,"PageDown"))},{empty:c.withCtx(()=>[c.createVNode(_,{description:"暂无数据",style:{height:"100%"}})]),footer:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",YEt,[n.tableLoading==="more"?(c.openBlock(),c.createBlock(w,{key:0},{default:c.withCtx(()=>[c.createVNode(v,{type:"primary",text:"",loading:""},{default:c.withCtx(()=>[c.createTextVNode("正在加载更多数据")]),_:1})]),_:1})):n.tableLoading==="all"?(c.openBlock(),c.createBlock(w,{key:1},{default:c.withCtx(()=>[c.createTextVNode(" 已无更多数据 ")]),_:1})):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)]),_:2},1032,["data","columns","width","height","header-height","row-height","row-event-handlers","footer-height"])]),_:1})}}},hAt="",ZEt=In(QEt,[["__scopeId","data-v-7e702a8a"]]),XEt={install(n){n.component("st-virtualTable",ZEt)}},JEt={install(n){zCe.install(n),ket.install(n),Met.install(n),Wet.install(n),ptt.install(n),btt.install(n),Qat.install(n),Slt.install(n),tut.install(n),gut.install(n),Fut.install(n),$ut.install(n),Gut.install(n),fxt.install(n),mxt.install(n),Cxt.install(n),Sxt.install(n),Ext.install(n),Mxt.install(n),Bxt.install(n),kEt.install(n),GEt.install(n),XEt.install(n)}};/*!-----------------------------------------------------------------------------
828
828
  * Copyright (c) Microsoft Corporation. All rights reserved.
829
829
  * Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
830
830
  * Released under the MIT license