1import{_ as x}from"./SkeletonData-80f72d36.js";import{i as _}from"./index-ae948f2a.js";import{a as y}from"./api-3aaf5ab5.js";import{r as s,z as w,o as k,b as S,f as l,c as v,j as h,A as z,p as I,k as A}from"./index-39f1fba6.js";import{_ as C}from"./_plugin-vue_export-helper-c27b6911.js";import"./content-b44536f5.js";import"./loading-65bf546c.js";const $=n=>(I("data-v-62ef4485"),n=n(),A(),n),L={class:"Heatmap custom-bg pb-40"},M={class:"custom-box container"},R=$(()=>l("div",{class:"flex items-center pb-50","lt-md":"flex-col items-start"},[l("h3",{class:"custom-title font-bold text-#fff"}," Sector Map "),l("ul",{class:"ml-auto flex flex-wrap justify-center gap-y-12 text-center text-12 text-white","lt-md":"ml-0"},[l("li",{class:"mx-6 inline-block h-22 w-65 rounded-2 bg-#8b2b2e text-[10px] leading-22"}," -3% "),l("li",{class:"mx-6 inline-block h-22 w-65 rounded-2 bg-#dc484c text-[10px] leading-22"}," -2% "),l("li",{class:"mx-6 inline-block h-22 w-65 rounded-2 bg-#d08694 text-[10px] leading-22"}," -1% "),l("li",{class:"mx-6 inline-block h-22 w-65 rounded-2 bg-#b8c2d0 text-[10px] leading-22"}," 0% "),l("li",{class:"mx-6 inline-block h-22 w-65 rounded-2 bg-#67b594 text-[10px] leading-22"}," 1% "),l("li",{class:"mx-6 inline-block h-22 w-65 rounded-2 bg-#49966e text-[10px] leading-22"}," 2% "),l("li",{class:"mx-6 inline-block h-22 w-65 rounded-2 bg-#336b55 text-[10px] leading-22"}," 3% ")])],-1)),B={class:"flex flex-col"},H={__name:"heatmap",setup(n){const a=s([]),c=s(!1),d=s(null),u=z();w();function g(t){t.on("click",e=>{e.treePathInfo&&u.push(`/quantization/heatmap-detail?stock_id=${e.data.exchange}:${e.data.symbol}`)})}function f(t){if(t<-2)return"#8b2b2e";if(t>=-2&&t<-1)return"#dc484c";if(t>=-1&&t<0)return"#d08694";if(t==0)return"#b8c2d0";if(t>0&&t<=1)return"#67b594";if(t>1&&t<=2)return"#49966e";if(t>2)return"#336b55"}function b(){return[{label:{show:!0,formatter:"{b}"},upperLabel:{show:!0,height:0},itemStyle:{borderWidth:4}},{label:{show:!0,formatter:"{b}"},upperLabel:{show:!0,height:14,lineHeight:14,fontSize:12},itemStyle:{borderWidth:2,gapWidth:2},position:"inside",rich:{}}]}function p(t,e,r,i){return{show:!0,formatter(){return`{img|} 2{txt|${e}} 3{txt|${i}}`},rich:{img:{width:20,height:20,align:"center",verticalAlign:"middle",backgroundColor:{image:t}},txt:{align:"center",fontSize:10,lineHeight:10,padding:[10,0,0,0]}}}}async function m(){c.value=!0;try{const e=await y.getIndustryRanking({top_n:"5",locale:"us"});let r;a.value=e.data.list.map(i=>({value:i.market_number,name:i.sector,path:i.sector,children:[...i.industry_detail.map(o=>({value:o.market_number,name:o.symbol,exchange:o.exchange,symbol:o.symbol,path:`${i.sector}/${o.symbol}`,label:p(o.logo,o.symbol,o.market_value,o.change),image:o.logo,itemStyle:{color:f(Number.parseFloat(o.change.replace("â","-")))}}))]}))}catch{}c.value=!1;const t=_(d.value);t.setOption({series:[{top:0,left:0,right:0,bottom:0,type:"treemap",visibleMin:300,roam:!1,labelLayout(e){const r=e.rect.y+e.rect.height-20;return e.rect.width<1||e.rect.height<1?{fontSize:0,x:e.rect.x+e.rect.width/2,y:e.rect.y+e.rect.height/2,align:"center",verticalAlign:"top"}:{fontSize:Math.min(Math.sqrt(e.rect.width*e.rect.height)/6,8),x:e.rect.x+e.rect.width/2,y:r,align:"center",verticalAlign:"middle"}},label:{show:!0,align:"center",verticalAlign:"top",rich:{img:{width:24,height:24,backgroundColor:{image:e=>e.data.url}},title:{fontSize:8,color:"#333"},change:{fontSize:8,color:"#666"}}},itemStyle:{borderColor:"#fff"},breadcrumb:{show:!1},levels:b(),data:a.value}]}),g(t)}return m(),(t,e)=>{const r=x;return k(),S("div",L,[l("div",M,[R,v(r,{load:h(c),empty:!h(a).length,border:!1},null,8,["load","empty"]),l("div",B,[l("div",{ref_key:"heatmapRef",ref:d,class:"mb-80 h-[623px]"},null,512)])])])}}},D=C(H,[["__scopeId","data-v-62ef4485"]]);export{D as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.