dsp-semactic 0.5.18 → 0.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Kt=require("vue-i18n"),Bo=["data-chart-type"],So={class:"dss-chart-header"},$o={class:"dss-chart-header-titles"},Vo={key:0,class:"dss-chart-title"},_o={key:1,class:"dss-chart-subtitle"},Do={key:0,class:"dss-chart-legend"},Lo=["onClick","onMouseenter"],zo={class:"dss-legend-text"},No=["width","height","data-smooth","data-animated"],Ho={id:"chart-clip"},Ao=["x","y","width","height"],Fo={key:0},Xo={key:0,class:"dss-grid-lines","clip-path":"url(#chart-clip)"},Io=["x1","x2","y1","y2"],To={class:"dss-axes"},Yo=["x1","x2","y1","y2"],Ro=["x1","x2","y1","y2"],Oo={class:"dss-axis-labels"},Po=["x","y"],Zo=["x","y"],jo=["x","y"],Uo=["y","transform"],Wo={key:1,class:"dss-flag-markers"},qo={"clip-path":"url(#chart-clip)"},Go=["x1","x2","y1","y2","onMouseover"],Ko=["x1","x2","y1","y2","onMouseover"],Qo=["x1","x2","y1","y2","onMouseover"],Jo=["cx","cy","onMouseover"],el=["cx","cy","fill","onMouseover"],tl=["x","y"],al={class:"dss-chart-data","clip-path":"url(#chart-clip)"},ol={key:0},ll={class:"dss-bar-chart"},sl=["d","fill","onMouseover"],nl=["x","y","width","height","fill","onMouseover"],rl={class:"dss-line-chart"},il=["d","stroke","stroke-width"],cl=["cx","cy","r","fill","onMouseover"],ul={key:1},dl=["d","stroke","stroke-width"],ml=["cx","cy","r","fill","onMouseover"],hl={key:2},vl=["id"],gl=["x","y","width","height"],pl=["d","fill","fill-opacity","mask"],fl=["d","stroke","stroke-width"],yl={key:3},kl=["d","fill","onMouseover"],Cl=["x","y","width","height","fill","onMouseover"],xl={key:2,class:"dss-crosshair","clip-path":"url(#chart-clip)"},Ml=["x1","x2","y1","y2","stroke"],wl=["cx","cy","r","fill"],bl={key:1,class:"dss-bubble-chart"},El={key:0,class:"dss-bubble-group"},Bl=["cx","cy","r","fill","fill-opacity","stroke","stroke-width","onMouseenter","onMouseleave","onClick"],Sl=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],$l={key:2,class:"radial-chart"},Vl=["cx","cy","r"],_l=["data-chart-type"],Dl=["d","fill","fill-opacity","stroke","stroke-width","onMouseover"],Ll={key:1,class:"dss-radial-labels"},zl=["x1","y1","x2","y2","stroke"],Nl=["x1","y1","x2","y2","stroke"],Hl=["x","y","text-anchor","font-size"],Al={key:3,class:"dss-spider-chart"},Fl={key:0,class:"dss-spider-grid"},Xl=["cx","cy","r"],Il={class:"dss-spider-grid-labels"},Tl=["x","y"],Yl=["x","y"],Rl=["x1","x2","y1","y2"],Ol={class:"dss-spider-labels"},Pl=["x","y","text-anchor","dominant-baseline"],Zl={class:"dss-spider-data"},jl=["points","fill","fill-opacity","stroke","stroke-width","onMouseover"],Ul=["cx","cy","r","fill","onMouseover"],Wl={class:"dss-chart-logos"},ql=["cx","cy","r","fill"],Gl=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Kl=["onClick","title"],Ql=["src","onError"],Jl={class:"dss-tooltip-section"},es={class:"dss-tooltip-title"},ts={class:"dss-tooltip-value"},as={key:0,class:"dss-tooltip-section"},os={class:"dss-tooltip-section-title"},ls={class:"dss-tooltip-group-header"},ss={class:"dss-tooltip-item-content"},ns={class:"dss-tooltip-item-text"},rs={key:1,class:"dss-tooltip-section"},is={class:"dss-tooltip-section-title"},cs={class:"dss-tooltip-item-content"},us={class:"dss-tooltip-item-title"},ds={key:0,class:"dss-tooltip-item-description"},ms={class:"dss-tooltip-section"},hs={class:"dss-tooltip-title"},vs={key:0,class:"dss-bubble-tooltip-data"},gs={class:"dss-tooltip-series-name"},ps={class:"dss-tooltip-series-value"},fs={key:0,class:"dss-tooltip-section"},ys={class:"dss-tooltip-section-title"},ks={class:"dss-tooltip-group-header"},Cs={class:"dss-tooltip-item-content"},xs={class:"dss-tooltip-item-text"},Ms={key:1,class:"dss-tooltip-section"},ws={class:"dss-tooltip-section-title"},bs={class:"dss-tooltip-item-content"},Es={class:"dss-tooltip-item-title"},Bs={key:0,class:"dss-tooltip-item-description"},Ss={key:2,class:"dss-context-menu-separator"},$s={key:0,class:"dss-context-menu-separator"},Vs={key:0,class:"dss-context-menu-separator"},_s=["onClick"],Ds=["innerHTML"],Ls={key:0,class:"dss-context-menu-icon"},zs={class:"dss-marker-modal-header"},Ns={class:"dss-marker-modal-body"},Hs={class:"dss-form-group"},As={for:"dss-marker-title"},Fs=["placeholder"],Xs={class:"dss-form-group"},Is={for:"dss-marker-description"},Ts=["placeholder"],Ys={key:0,class:"dss-form-group"},Rs={for:"dss-marker-type"},Os={value:"default"},Ps=["value"],Zs={class:"dss-form-group"},js={class:"icon-preview"},Us=["src"],Ws={class:"dss-marker-modal-footer"},qs={class:"modal-footer-left"},Gs={class:"dss-modal-footer-right"},Ks=["disabled"],Qs={name:"DSSChart"},Js=Object.assign(Qs,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},chartId:{type:String,default:()=>"chart-"+Math.random().toString(36).substring(2,9)},i18n:{type:Object,default:null},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:K=>typeof K=="object"&&K!==null}},setup(K){const{t:L,locale:fe}=Kt.useI18n(),f=K,Qt={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:"25%",position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!0,minScale:1,maxScale:2.5},smoothing:{enabled:!1,factor:.3,barRadius:4},animations:{enabled:!0,type:"draw",duration:2500,delay:0,staggerDelay:200,easing:"ease-out",onDataChange:!0,respectReducedMotion:!0},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function it(t,o){const a=Object.assign({},t);return Ze(t)&&Ze(o)&&Object.keys(o).forEach(l=>{Ze(o[l])?l in t?a[l]=it(t[l],o[l]):Object.assign(a,{[l]:o[l]}):Object.assign(a,{[l]:o[l]})}),a}const ct=()=>{let t=20,o=0;if(q.value&&(t+=30),J.value&&(t+=25),Ae.value&&f.series.length>0){const a=f.series.filter((c,r)=>!I.value.has(r)).length,s=Math.floor(Q.value/100);o=Math.ceil(a/s)*25+10,t+=o}return{height:t,legendHeight:o}};function Ze(t){return t&&typeof t=="object"&&!Array.isArray(t)}const p=e.computed(()=>it(Qt,f.options)),Q=e.computed(()=>{const t=p.value;return t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),se=e.computed(()=>{const t=p.value;return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),X=e.computed(()=>{const t=p.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),ut=e.computed(()=>{const t=f.series.map(o=>o.type||X.value);return new Set(t).size>1}),q=e.computed(()=>{const t=p.value;return t&&t.title&&t.title.text?t.title.text:""}),J=e.computed(()=>{const t=p.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),je=e.computed(()=>{const t=p.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),dt=e.computed(()=>{const t=p.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),Jt=e.computed(()=>{const t=p.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.min;return typeof o=="number"||o===pe?o:pe}),ea=e.computed(()=>{const t=p.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.max;return typeof o=="number"||o===pe?o:pe}),mt=e.computed(()=>{const t=p.value;return t&&t.grid&&t.grid.show!==!1}),Ae=e.computed(()=>{const t=p.value;return t&&t.legend&&t.legend.show!==!1}),ue=e.computed(()=>{const t=p.value;if(!t||!t.crosshair)return!1;const o=t.crosshair.show;return o===!0||o==="true"}),ta=e.computed(()=>{const t=p.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),xe=e.computed(()=>{const t=p.value;return t&&t.zoom&&t.zoom.enabled!==!1}),aa=e.computed(()=>{const t=p.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),oa=e.computed(()=>{const t=p.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),de=e.computed(()=>{const t=p.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),te=e.computed(()=>{const t=p.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),ht=e.computed(()=>{const t=p.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),re=e.computed(()=>{const t=p.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),Fe=e.computed(()=>{const t=p.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),vt=e.computed(()=>{const t=p.value;return re.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),la=e.computed(()=>{const t=p.value,o=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return o.length>0?o:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),$e=e.computed(()=>{const t=p.value;return t&&t.animations&&t.animations.enabled!==!1}),gt=e.computed(()=>{const t=p.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),pt=e.computed(()=>{const t=p.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),ft=e.computed(()=>{const t=p.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),yt=e.computed(()=>{const t=p.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),me=e.computed(()=>{const t=p.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),sa=e.computed(()=>{const t=p.value;return t&&t.animations&&t.animations.onDataChange!==!1}),na=e.computed(()=>{const t=p.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),Ve=e.computed(()=>{const t=p.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),ra=e.computed(()=>p.value?.spider?.gridSteps||5),Ue=e.computed(()=>{const t=[],o=ra.value;for(let a=1;a<=o;a++)t.push(F.value/o*a);return t}),ia=t=>{const o=ca.value;if(o&&Array.isArray(o)&&o[t]!==void 0)return o[t].toString();const a=Ue.value[t];return Math.round(a/F.value*100)+"%"},ca=e.computed(()=>p.value?.spider?.gridLabels||null);e.computed(()=>{const t=p.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0});const ae=e.computed(()=>{const t=p.value,o={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...o,...t.contextMenu.items}:o}),We=e.computed(()=>{const t=p.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),ua=e.computed(()=>{const t=p.value;return t&&t.markers&&t.markers.icon?t.markers.icon:ga.value}),Xe=e.computed(()=>{const t=p.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),kt=e.computed(()=>{const t=p.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),Ct=e.computed(()=>!m.value.isZooming),da=e.computed(()=>T.value.map(t=>{if(t.categoryIndex!==void 0&&(W.value||P.value)){const o=G(t.categoryIndex),a=i.value.bottom+(P.value?100:85);return{...t,x:o,y:a}}return t})),qe=e.computed(()=>{const t=p.value;return t&&t.watermark&&t.watermark.enabled===!0}),Ge=e.computed(()=>{const t=p.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),ma=e.computed(()=>{const t=p.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:"25%"}),Ke=e.computed(()=>{const t=p.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),Qe=e.computed(()=>{const t={left:i.value.left,top:i.value.top,width:i.value.width,height:i.value.height};let o,a;const l=String(ma.value);if(l.includes("%")){const s=parseFloat(l)/100;o=t.width*s,a=o*(96/499)}else{const s=parseFloat(l)||25;o=Math.min(t.width*.25,200)*(s/25),a=o*(96/499)}return{width:o,height:a,area:t}}),ha=e.computed(()=>{const{width:t,height:o}=Qe.value,a=Ke.value;let l,s;const n=i.value.left,c=i.value.right,r=i.value.top,u=i.value.bottom,d=i.value.width,h=i.value.height;switch(a){case"center":l=n+(d-t)/2,s=r+(h-o)/2;break;case"top-left":l=n+15,s=r+90;break;case"top-right":l=c-t-15,s=r+90;break;case"bottom-left":l=n+15,s=u-o+75;break;case"bottom-right":default:l=c-t-15,s=u-o+75;break}return{backgroundPositionX:l+"px",backgroundPositionY:s+"px",backgroundSize:`${t}px ${o}px`}}),va=t=>!f.flags||!f.flags.length?[]:f.flags.filter(o=>o.categoryIndex===t),he=t=>{const o=va(t),a=Da(t),l=o.filter(c=>c.manual),s=o.filter(c=>!c.manual),n=[];return l.length>0&&n.push({type:L("chart.tooltip.manualFlags"),color:"#047395",flags:l.map(c=>({text:c.text,color:"#047395"}))}),s.length>0&&n.push({type:L("chart.tooltip.autoFlags"),color:"#0dbf89",flags:s.map(c=>({text:c.text,color:"#0dbf89"}))}),{flagGroups:n,markers:a.map(c=>({title:c.title,description:c.description,type:L("chart.tooltip.markers"),color:c.color||"#FF6B6B"}))}},ga=e.computed(()=>`data:image/svg+xml;base64,${btoa(`<svg width="55" height="56" viewBox="0 0 55 56" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Qt=require("vue-i18n"),$o=["data-chart-type"],Vo={class:"dss-chart-header"},_o={class:"dss-chart-header-titles"},Do={key:0,class:"dss-chart-title"},Lo={key:1,class:"dss-chart-subtitle"},zo={key:0,class:"dss-chart-legend"},No=["onClick","onMouseenter"],Ho={class:"dss-legend-text"},Ao=["width","height","data-smooth","data-animated"],Fo={id:"chart-clip"},Xo=["x","y","width","height"],Io={key:0},To={key:0,class:"dss-grid-lines","clip-path":"url(#chart-clip)"},Yo=["x1","x2","y1","y2"],Ro={class:"dss-axes"},Oo=["x1","x2","y1","y2"],Po=["x1","x2","y1","y2"],Zo={class:"dss-axis-labels"},jo=["x","y"],Uo=["x","y"],Wo=["x","y"],qo=["y","transform"],Go={key:1,class:"dss-flag-markers"},Ko={"clip-path":"url(#chart-clip)"},Qo=["x1","x2","y1","y2","onMouseover"],Jo=["x1","x2","y1","y2","onMouseover"],el=["x1","x2","y1","y2","onMouseover"],tl=["cx","cy","onMouseover"],al=["cx","cy","fill","onMouseover"],ol=["x","y"],ll={class:"dss-chart-data","clip-path":"url(#chart-clip)"},sl={key:0},nl={class:"dss-bar-chart"},rl=["d","fill","onMouseover"],il=["x","y","width","height","fill","onMouseover"],cl={class:"dss-line-chart"},ul=["d","stroke","stroke-width"],dl=["cx","cy","r","fill","onMouseover"],ml={key:1},hl=["d","stroke","stroke-width"],vl=["cx","cy","r","fill","onMouseover"],gl={key:2},pl=["id"],fl=["x","y","width","height"],yl=["d","fill","fill-opacity","mask"],kl=["d","stroke","stroke-width"],Cl={key:3},xl=["d","fill","onMouseover"],Ml=["x","y","width","height","fill","onMouseover"],wl={key:2,class:"dss-crosshair","clip-path":"url(#chart-clip)"},bl=["x1","x2","y1","y2","stroke"],El=["cx","cy","r","fill"],Bl={key:1,class:"dss-bubble-chart"},Sl={key:0,class:"dss-bubble-group"},$l=["cx","cy","r","fill","fill-opacity","stroke","stroke-width","onMouseenter","onMouseleave","onClick"],Vl=["x","y","width","height","xlink:href","clip-path","onLoad","onError","onMouseenter","onMouseleave","onClick"],_l={key:2,class:"radial-chart"},Dl=["cx","cy","r"],Ll=["data-chart-type"],zl=["d","fill","fill-opacity","stroke","stroke-width","onMouseover"],Nl={key:1,class:"dss-radial-labels"},Hl=["x1","y1","x2","y2","stroke"],Al=["x1","y1","x2","y2","stroke"],Fl=["x","y","text-anchor","font-size"],Xl={key:3,class:"dss-spider-chart"},Il={key:0,class:"dss-spider-grid"},Tl=["cx","cy","r"],Yl={class:"dss-spider-grid-labels"},Rl=["x","y"],Ol=["x","y"],Pl=["x1","x2","y1","y2"],Zl={class:"dss-spider-labels"},jl=["x","y","text-anchor","dominant-baseline"],Ul={class:"dss-spider-data"},Wl=["points","fill","fill-opacity","stroke","stroke-width","onMouseover"],ql=["cx","cy","r","fill","onMouseover"],Gl={class:"dss-chart-logos"},Kl=["cx","cy","r","fill"],Ql=["x","y","width","height","xlink:href","onLoad","onError","clip-path"],Jl=["onClick"],es=["src"],ts={class:"dss-tooltip-section"},as={class:"dss-tooltip-title"},os={class:"dss-tooltip-value"},ls={key:0,class:"dss-tooltip-section"},ss={class:"dss-tooltip-section-title"},ns={class:"dss-tooltip-group-header"},rs={class:"dss-tooltip-item-content"},is={class:"dss-tooltip-item-text"},cs={key:1,class:"dss-tooltip-section"},us={class:"dss-tooltip-section-title"},ds={class:"dss-tooltip-item-content"},ms={class:"dss-tooltip-item-title"},hs={key:0,class:"dss-tooltip-item-description"},vs={class:"dss-tooltip-section"},gs={class:"dss-tooltip-title"},ps={key:0,class:"dss-bubble-tooltip-data"},fs={class:"dss-tooltip-series-name"},ys={class:"dss-tooltip-series-value"},ks={key:0,class:"dss-tooltip-section"},Cs={class:"dss-tooltip-section-title"},xs={class:"dss-tooltip-group-header"},Ms={class:"dss-tooltip-item-content"},ws={class:"dss-tooltip-item-text"},bs={key:1,class:"dss-tooltip-section"},Es={class:"dss-tooltip-section-title"},Bs={class:"dss-tooltip-item-content"},Ss={class:"dss-tooltip-item-title"},$s={key:0,class:"dss-tooltip-item-description"},Vs={key:2,class:"dss-context-menu-separator"},_s={key:0,class:"dss-context-menu-separator"},Ds={key:0,class:"dss-context-menu-separator"},Ls=["onClick"],zs=["innerHTML"],Ns={key:0,class:"dss-context-menu-icon"},Hs={class:"dss-marker-modal-header"},As={class:"dss-marker-modal-body"},Fs={class:"dss-form-group"},Xs={for:"dss-marker-title"},Is=["placeholder"],Ts={class:"dss-form-group"},Ys={for:"dss-marker-description"},Rs=["placeholder"],Os={key:0,class:"dss-form-group"},Ps={for:"dss-marker-type"},Zs={value:"default"},js=["value"],Us={class:"dss-form-group"},Ws={class:"icon-preview"},qs=["src"],Gs={class:"dss-marker-modal-footer"},Ks={class:"modal-footer-left"},Qs={class:"dss-modal-footer-right"},Js=["disabled"],en={name:"DSSChart"},tn=Object.assign(en,{props:{series:{type:Array,required:!0,default:()=>[]},categories:{type:Array,default:()=>[]},flags:{type:Array,default:()=>[]},markers:{type:Array,default:()=>[]},chartId:{type:String,default:()=>"chart-"+Math.random().toString(36).substring(2,9)},i18n:{type:Object,default:null},locale:{type:String,default:null},options:{type:Object,default:()=>({}),validator:K=>typeof K=="object"&&K!==null}},emits:["add-marker","update-marker","delete-marker"],setup(K,{emit:Pe}){const{t:D,locale:ct}=Qt.useI18n(),Ze=Pe,p=K,Jt={chart:{type:"line",width:800,height:400,orientation:"vertical"},title:{text:"",style:{}},subtitle:{text:"",style:{}},xAxis:{title:{text:""},type:"category"},yAxis:{min:"auto",max:"auto",title:{text:""}},legend:{show:!0},radialLabels:{show:!1,pointerLength:25,horizontalLength:35,fontSize:14,color:"#000",textOffset:8},grid:{show:!0,style:{}},watermark:{enabled:!0,opacity:.05,size:"25%",position:"bottom-right"},colors:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"],logos:[],stroke:{width:2,curve:"smooth"},bubbles:{size:4},markers:{show:!0,icon:null,iconSize:25,customIcons:{}},fill:{area:{opacity:.3},spider:{opacity:.15}},crosshair:{show:!1,color:"#666"},bubbles:{size:4,tooltip:{fields:["x","y","size"],labels:{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},formatters:{}}},spider:{gridLabels:null,gridSteps:5},zoom:{enabled:!0,minScale:1,maxScale:2.5},smoothing:{enabled:!1,factor:.3,barRadius:4},animations:{enabled:!0,type:"draw",duration:2500,delay:0,staggerDelay:200,easing:"ease-out",onDataChange:!0,respectReducedMotion:!0},contextMenu:{enabled:!0,items:{addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0},customItems:[]}};function ut(t,o){const a=Object.assign({},t);return je(t)&&je(o)&&Object.keys(o).forEach(l=>{je(o[l])?l in t?a[l]=ut(t[l],o[l]):Object.assign(a,{[l]:o[l]}):Object.assign(a,{[l]:o[l]})}),a}const dt=()=>{let t=20,o=0;if(G.value&&(t+=30),J.value&&(t+=25),He.value&&p.series.length>0){const a=p.series.filter((c,r)=>!I.value.has(r)).length,s=Math.floor(Q.value/100);o=Math.ceil(a/s)*25+10,t+=o}return{height:t,legendHeight:o}};function je(t){return t&&typeof t=="object"&&!Array.isArray(t)}const f=e.computed(()=>ut(Jt,p.options)),Q=e.computed(()=>{const t=f.value;return t&&t.chart&&typeof t.chart.width=="number"?t.chart.width:800}),se=e.computed(()=>{const t=f.value;return t&&t.chart&&typeof t.chart.height=="number"?t.chart.height:400}),X=e.computed(()=>{const t=f.value;return t&&t.chart&&t.chart.type?t.chart.type:"line"}),mt=e.computed(()=>{const t=p.series.map(o=>o.type||X.value);return new Set(t).size>1}),G=e.computed(()=>{const t=f.value;return t&&t.title&&t.title.text?t.title.text:""}),J=e.computed(()=>{const t=f.value;return t&&t.subtitle&&t.subtitle.text?t.subtitle.text:""}),Ue=e.computed(()=>{const t=f.value;return t&&t.xAxis&&t.xAxis.title&&t.xAxis.title.text?t.xAxis.title.text:""}),ht=e.computed(()=>{const t=f.value;return t&&t.yAxis&&t.yAxis.title&&t.yAxis.title.text?t.yAxis.title.text:""}),ea=e.computed(()=>{const t=f.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.min;return typeof o=="number"||o===pe?o:pe}),ta=e.computed(()=>{const t=f.value;if(!t||!t.yAxis)return pe;const o=t.yAxis.max;return typeof o=="number"||o===pe?o:pe}),vt=e.computed(()=>{const t=f.value;return t&&t.grid&&t.grid.show!==!1}),He=e.computed(()=>{const t=f.value;return t&&t.legend&&t.legend.show!==!1}),ue=e.computed(()=>{const t=f.value;if(!t||!t.crosshair)return!1;const o=t.crosshair.show;return o===!0||o==="true"}),aa=e.computed(()=>{const t=f.value;return t&&t.crosshair&&t.crosshair.color?t.crosshair.color:"#666"}),Ce=e.computed(()=>{const t=f.value;return t&&t.zoom&&t.zoom.enabled!==!1}),oa=e.computed(()=>{const t=f.value;return t&&t.zoom&&typeof t.zoom.minScale=="number"?t.zoom.minScale:1}),la=e.computed(()=>{const t=f.value;return t&&t.zoom&&typeof t.zoom.maxScale=="number"?t.zoom.maxScale:2.5}),de=e.computed(()=>{const t=f.value;return t&&t.stroke&&typeof t.stroke.width=="number"?t.stroke.width:2}),te=e.computed(()=>{const t=f.value;return t&&t.bubbles&&typeof t.bubbles.size=="number"?t.bubbles.size:4}),gt=e.computed(()=>{const t=f.value;return t&&t.fill&&t.fill.area&&typeof t.fill.area.opacity=="number"?t.fill.area.opacity:.3}),re=e.computed(()=>{const t=f.value;return t&&t.smoothing&&t.smoothing.enabled===!0}),Ae=e.computed(()=>{const t=f.value;return t&&t.smoothing&&typeof t.smoothing.factor=="number"?t.smoothing.factor:.3}),pt=e.computed(()=>{const t=f.value;return re.value?t&&t.smoothing&&typeof t.smoothing.barRadius=="number"?t.smoothing.barRadius:4:0}),sa=e.computed(()=>{const t=f.value,o=t&&t.colors&&Array.isArray(t.colors)?t.colors:[];return o.length>0?o:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"]}),Se=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.enabled!==!1}),ft=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.type?t.animations.type:"draw"}),yt=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.duration=="number"?t.animations.duration:2500}),kt=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.delay=="number"?t.animations.delay:0}),Ct=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.easing?t.animations.easing:"ease-out"}),me=e.computed(()=>{const t=f.value;return t&&t.animations&&typeof t.animations.staggerDelay=="number"?t.animations.staggerDelay:200}),na=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.onDataChange!==!1}),ra=e.computed(()=>{const t=f.value;return t&&t.animations&&t.animations.respectReducedMotion!==!1}),$e=e.computed(()=>{const t=f.value;return t&&t.fill&&t.fill.spider&&typeof t.fill.spider.opacity=="number"?t.fill.spider.opacity:.15}),ia=e.computed(()=>f.value?.spider?.gridSteps||5),We=e.computed(()=>{const t=[],o=ia.value;for(let a=1;a<=o;a++)t.push(F.value/o*a);return t}),ca=t=>{const o=ua.value;if(o&&Array.isArray(o)&&o[t]!==void 0)return o[t].toString();const a=We.value[t];return Math.round(a/F.value*100)+"%"},ua=e.computed(()=>f.value?.spider?.gridLabels||null);e.computed(()=>{const t=f.value;return t&&t.contextMenu&&t.contextMenu.enabled===!0});const ae=e.computed(()=>{const t=f.value,o={addMarker:!0,downloadSvg:!0,downloadPng:!0,downloadCsv:!0};return t&&t.contextMenu&&t.contextMenu.items?{...o,...t.contextMenu.items}:o}),qe=e.computed(()=>{const t=f.value;return t&&t.contextMenu&&Array.isArray(t.contextMenu.customItems)?t.contextMenu.customItems:[]}),da=e.computed(()=>{const t=f.value;return t&&t.markers&&t.markers.icon?t.markers.icon:ya.value}),Fe=e.computed(()=>{const t=f.value;return t&&t.markers&&t.markers.customIcons?t.markers.customIcons:{}}),xt=e.computed(()=>{const t=f.value;return t&&t.markers&&typeof t.markers.iconSize=="number"?t.markers.iconSize:20}),ma=e.computed(()=>!m.value.isZooming);e.computed(()=>T.value.map(t=>{if(t.categoryIndex!==void 0&&(W.value||P.value)){const o=q(t.categoryIndex),a=i.value.bottom+(P.value?100:85);return{...t,x:o,y:a}}return t}));function ha(t,o){const a=new Date(t);let l=0,s=1/0;return o.forEach((n,c)=>{const[r,u,d]=n.split("-"),h=new Date(`20${d}`,u-1,r),v=Math.abs(h-a);v<s&&(s=v,l=c)}),l}const va=e.computed(()=>p.markers.map(t=>{const o=ha(t.marker_date,p.categories),a=q(o),l=i.value.bottom+45;return{...t,x:a,y:l,categoryIndex:o}})),Ge=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.enabled===!0}),Ke=e.computed(()=>{const t=f.value;return t&&t.watermark&&typeof t.watermark.opacity=="number"?t.watermark.opacity:.05}),ga=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.size?t.watermark.size:"25%"}),Qe=e.computed(()=>{const t=f.value;return t&&t.watermark&&t.watermark.position?t.watermark.position:"bottom-right"}),Je=e.computed(()=>{const t={left:i.value.left,top:i.value.top,width:i.value.width,height:i.value.height};let o,a;const l=String(ga.value);if(l.includes("%")){const s=parseFloat(l)/100;o=t.width*s,a=o*(96/499)}else{const s=parseFloat(l)||25;o=Math.min(t.width*.25,200)*(s/25),a=o*(96/499)}return{width:o,height:a,area:t}}),pa=e.computed(()=>{const{width:t,height:o}=Je.value,a=Qe.value;let l,s;const n=i.value.left,c=i.value.right,r=i.value.top,u=i.value.bottom,d=i.value.width,h=i.value.height;switch(a){case"center":l=n+(d-t)/2,s=r+(h-o)/2;break;case"top-left":l=n+15,s=r+90;break;case"top-right":l=c-t-15,s=r+90;break;case"bottom-left":l=n+15,s=u-o+75;break;case"bottom-right":default:l=c-t-15,s=u-o+75;break}return{backgroundPositionX:l+"px",backgroundPositionY:s+"px",backgroundSize:`${t}px ${o}px`}}),fa=t=>!p.flags||!p.flags.length?[]:p.flags.filter(o=>o.categoryIndex===t),he=t=>{const o=fa(t),a=Na(t),l=o.filter(c=>c.manual),s=o.filter(c=>!c.manual),n=[];return l.length>0&&n.push({type:D("chart.tooltip.manualFlags"),color:"#047395",flags:l.map(c=>({text:c.text,color:"#047395"}))}),s.length>0&&n.push({type:D("chart.tooltip.autoFlags"),color:"#0dbf89",flags:s.map(c=>({text:c.text,color:"#0dbf89"}))}),{flagGroups:n,markers:a.map(c=>({title:c.title,description:c.description,type:D("chart.tooltip.markers"),color:c.color||"#FF6B6B"}))}},ya=e.computed(()=>`data:image/svg+xml;base64,${btoa(`<svg width="55" height="56" viewBox="0 0 55 56" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M55 51.841V4.14647C55 1.86149 53.1797 0.00915527 50.9343 0.00915527L4.06568 0.00915527C1.82027 0.00915527 0 1.86149 0 4.14647V51.841C0 54.126 1.82027 55.9783 4.06568 55.9783H50.9343C53.1797 55.9783 55 54.126 55 51.841Z" fill="#020203"/>
3
3
  <path d="M27.7145 10.8883H16.9591C12.7639 10.8883 9.3623 14.3498 9.3623 18.619C9.3623 22.8882 12.7639 26.3497 16.9591 26.3497H27.8036C28.3624 26.3497 28.816 25.8881 28.816 25.3112L28.7188 11.9103C28.7188 11.3416 28.2653 10.8883 27.7064 10.8883H27.7145Z" fill="#FFC230"/>
4
4
  <path d="M38.6799 25.649C42.5176 25.649 45.6288 22.483 45.6288 18.5776C45.6288 14.6722 42.5176 11.5063 38.6799 11.5063C34.8421 11.5063 31.731 14.6722 31.731 18.5776C31.731 22.483 34.8421 25.649 38.6799 25.649Z" fill="#fafafa"/>
5
5
  <path d="M27.2846 45.1083H38.04C42.2352 45.1083 45.6368 41.6468 45.6368 37.3776C45.6368 33.1084 42.2352 29.6469 38.04 29.6469H27.1955C26.6366 29.6469 26.1831 30.1084 26.1831 30.6854L26.2803 44.0863C26.2803 44.655 26.7338 45.1083 27.2927 45.1083H27.2846Z" fill="#07A9DA"/>
6
6
  <path d="M16.3198 44.4813C20.1575 44.4813 23.2687 41.3153 23.2687 37.4099C23.2687 33.5045 20.1575 30.3386 16.3198 30.3386C12.482 30.3386 9.37085 33.5045 9.37085 37.4099C9.37085 41.3153 12.482 44.4813 16.3198 44.4813Z" fill="#fafafa"/>
7
- </svg>`)}`),xt=e.computed(()=>`data:image/svg+xml;base64,${btoa(`<svg width="499" height="96" viewBox="0 0 499 96" fill="none" xmlns="http://www.w3.org/2000/svg">
7
+ </svg>`)}`),Mt=e.computed(()=>`data:image/svg+xml;base64,${btoa(`<svg width="499" height="96" viewBox="0 0 499 96" fill="none" xmlns="http://www.w3.org/2000/svg">
8
8
  <path d="M171.52 37.8399H160.38C160.26 36.4799 160.02 35.0599 159.68 33.5699C159.34 32.0799 158.77 30.7399 157.96 29.5299C157.16 28.3199 156 27.3199 154.48 26.5099C152.96 25.7099 150.94 25.2999 148.4 25.2999C144.69 25.2999 141.93 26.1299 140.14 27.8099C138.34 29.4799 137.45 31.5499 137.45 34.0299C137.45 37.7999 139.29 40.0799 142.97 40.8499C146.65 41.6299 150.67 42.3799 155.03 43.1199C159.39 43.8599 163.41 45.3899 167.09 47.7099C170.77 50.0299 172.61 54.6199 172.61 61.4899C172.61 64.6499 172.02 67.5099 170.85 70.0699C169.67 72.6399 168.02 74.7899 165.89 76.5199C163.76 78.2499 161.19 79.5799 158.19 80.5099C155.19 81.4399 151.93 81.8999 148.4 81.8999C143.95 81.8999 140.12 81.2699 136.94 79.9999C133.75 78.7299 131.19 77.0799 129.24 75.0399C127.29 72.9999 125.93 70.6899 125.16 68.1299C124.39 65.5599 124.19 62.9499 124.56 60.2899H136.25C136.37 62.0799 136.58 63.7899 136.85 65.3899C137.13 66.9999 137.68 68.4099 138.52 69.6099C139.35 70.8199 140.58 71.7799 142.19 72.4899C143.8 73.1999 145.99 73.5599 148.78 73.5599C153.3 73.5599 156.47 72.6199 158.29 70.7299C160.11 68.8399 161.03 66.6899 161.03 64.2799C161.03 60.2599 159.19 57.7799 155.51 56.8599C151.83 55.9299 147.79 55.0499 143.4 54.2099C139.01 53.3799 134.97 51.7699 131.29 49.3799C127.61 46.9999 125.77 42.3699 125.77 35.5099C125.77 32.8499 126.3 30.3899 127.35 28.1299C128.4 25.8699 129.9 23.9199 131.85 22.2799C133.8 20.6399 136.16 19.3399 138.95 18.3799C141.73 17.4199 144.8 16.9399 148.14 16.9399C152.41 16.9399 156.07 17.4699 159.14 18.5199C162.2 19.5699 164.69 21.0299 166.61 22.8799C168.53 24.7399 169.89 26.9499 170.69 29.5199C171.49 32.0899 171.77 34.8599 171.52 37.8199V37.8399Z" fill="#020203"/>
9
9
  <path d="M179.04 58.1699C179.04 55.0799 179.55 52.0499 180.57 49.0699C181.59 46.0999 183.04 43.4899 184.93 41.2299C186.82 38.9699 189.09 37.1499 191.75 35.7499C194.41 34.3599 197.35 33.6599 200.57 33.6599C207 33.6599 212.15 35.9299 216.02 40.4799C219.89 45.0299 221.97 51.5999 222.28 60.1999H189.34C189.77 64.2199 191.09 67.1499 193.28 68.9699C195.48 70.7999 198.12 71.7099 201.21 71.7099C203 71.7099 204.5 71.4599 205.71 70.9699C206.92 70.4799 207.91 69.8899 208.68 69.2099C209.45 68.5299 210.06 67.8199 210.49 67.0799C210.92 66.3399 211.26 65.7199 211.51 65.2199H221.72C221.6 66.7699 221.1 68.5099 220.24 70.4599C219.37 72.4099 218.14 74.2299 216.53 75.9399C214.92 77.6399 212.85 79.0599 210.31 80.2099C207.77 81.3499 204.77 81.9299 201.31 81.9299C197.85 81.9299 194.91 81.2799 192.12 79.9799C189.34 78.6799 186.98 76.9499 185.07 74.7799C183.15 72.6099 181.67 70.0899 180.61 67.2199C179.56 64.3399 179.03 61.3299 179.03 58.1699H179.04ZM200.94 42.0199C198.47 42.0199 196.24 42.7299 194.26 44.1499C192.28 45.5699 190.89 47.8299 190.08 50.9199H211.33C211.02 48.0799 209.95 45.8799 208.13 44.3299C206.3 42.7899 203.91 42.0099 200.94 42.0099V42.0199Z" fill="#020203"/>
10
10
  <path d="M268.59 80.9999H258.01V50.3799C258.01 48.2099 257.3 46.5099 255.88 45.2799C254.46 44.0399 252.6 43.4199 250.31 43.4199C248.45 43.4199 246.94 43.8399 245.76 44.6699C244.58 45.4999 243.67 46.5399 243.02 47.7799C242.37 49.0199 241.94 50.3799 241.72 51.8599C241.5 53.3399 241.4 54.7099 241.4 55.9399V80.9999H230.82V34.5999H241.03V38.3099C241.83 37.6899 243.27 36.7599 245.34 35.5199C247.41 34.2799 250.3 33.6599 254.02 33.6599C256.68 33.6599 259.12 34.1599 261.35 35.1399C263.58 36.1299 265.31 37.6799 266.55 39.7799C267.04 39.2899 267.71 38.6799 268.55 37.9699C269.38 37.2599 270.41 36.5799 271.61 35.9299C272.82 35.2799 274.22 34.7399 275.83 34.3099C277.44 33.8799 279.23 33.6599 281.21 33.6599C285.23 33.6599 288.67 34.8099 291.51 37.0899C294.36 39.3799 295.78 43.0599 295.78 48.1299V80.9799H285.2V50.3599C285.2 48.1899 284.49 46.4899 283.07 45.2599C281.65 44.0199 279.79 43.3999 277.5 43.3999C275.64 43.3999 274.13 43.8199 272.95 44.6499C271.77 45.4799 270.86 46.5199 270.21 47.7599C269.56 48.9999 269.13 50.3599 268.91 51.8399C268.69 53.3199 268.59 54.6899 268.59 55.9199V80.9799V80.9999Z" fill="#020203"/>
@@ -18,22 +18,22 @@
18
18
  <path d="M67.37 43.9C74.0582 43.9 79.48 38.4782 79.48 31.79C79.48 25.1018 74.0582 19.68 67.37 19.68C60.6818 19.68 55.26 25.1018 55.26 31.79C55.26 38.4782 60.6818 43.9 67.37 43.9Z" fill="#fafafa"/>
19
19
  <path d="M47.5201 77.18H66.2501C73.5601 77.18 79.4801 71.26 79.4801 63.95C79.4801 56.64 73.5601 50.72 66.2501 50.72H47.3601C46.3801 50.72 45.5901 51.52 45.6001 52.5L45.7601 75.44C45.7601 76.41 46.5501 77.19 47.5201 77.19V77.18Z" fill="#07ACDD"/>
20
20
  <path d="M28.4201 76.12C35.1082 76.12 40.5301 70.6982 40.5301 64.01C40.5301 57.3218 35.1082 51.9 28.4201 51.9C21.7319 51.9 16.3101 57.3218 16.3101 64.01C16.3101 70.6982 21.7319 76.12 28.4201 76.12Z" fill="#fafafa"/>
21
- </svg>`)}`),Mt=e.computed(()=>{const t=p.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),pa=e.computed(()=>{const t=p.value;return t&&t.radialLabels&&typeof t.radialLabels.fontSize=="number"?t.radialLabels.fontSize:12});e.computed(()=>{const t=p.value;return t&&t.radialLabels&&t.radialLabels.color?t.radialLabels.color:"#000"});const fa=e.computed(()=>{const t=p.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),ya=e.computed(()=>{const t=p.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),ka=e.computed(()=>{const t=p.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),wt=e.computed(()=>{if(!f.flags||!f.flags.length)return[];const t=new Map;return f.flags.forEach(o=>{const a=o.categoryIndex;t.has(a)||t.set(a,[]),t.get(a).push(o)}),Array.from(t.entries()).map(([o,a])=>{const l=G(o),s=a.filter(c=>c.manual),n=a.filter(c=>!c.manual);return{categoryIndex:parseInt(o),x:l,flags:a,manualCount:s.length,autoCount:n.length,totalCount:a.length,hasManual:s.length>0,hasAuto:n.length>0,texts:a.map(c=>c.text).join(`
22
- `)}})}),Je=e.ref({show:!1,x:0,y:0,content:"",count:0}),Ca=e.computed(()=>p.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),xa=e.computed(()=>{const t=p.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),Ma=e.computed(()=>p.value?.bubbles?.tooltip?.formatters||{}),I=e.ref(new Set),b=e.ref(null),et=e.ref(!1),O=e.ref({show:!1,x:0,y:0,title:"",value:""}),B=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),H=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),m=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),T=e.ref([]),D=e.ref({show:!1,title:"",description:"",color:"#FF6B6B",type:"default",editingMarkerId:null}),bt=e.computed(()=>{const t=["default"];return Xe.value&&t.push(...Object.keys(Xe.value)),t}),_e=e.computed(()=>D.value.editingMarkerId!==null),wa=t=>{I.value.has(t)||(rt.value=!0,b.value=t)},ba=()=>{rt.value=!1,b.value=null},Ea=t=>{if(Le.value||Oe.value){B.value.show=!1;return}const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,s=t.clientY-a.top,n=P.value?l>=i.value.left-50&&l<=i.value.right+50&&s>=i.value.top-50&&s<=i.value.bottom+100:l>=i.value.left&&l<=i.value.right&&s>=i.value.top&&s<=i.value.bottom;if(et.value=n,P.value){if(!ue.value||!n||m.value.isDragging||m.value.isZooming){B.value.show=!1;return}if(Ye.value.find(C=>!C||C.isHidden?!1:Math.sqrt(Math.pow(C.x-l,2)+Math.pow(C.y-s,2))<=C.radius+3))B.value.show=!1;else{const C=Ye.value.filter($=>!$||$.isHidden?!1:Math.sqrt(Math.pow($.x-l,2)+Math.pow($.y-s,2))<=250);if(C.length>0){let $=C[0],_=Math.sqrt(Math.pow($.x-l,2)+Math.pow($.y-s,2));C.forEach(y=>{const k=Math.sqrt(Math.pow(y.x-l,2)+Math.pow(y.y-s,2));k<_&&(_=k,$=y)});const g=30,V=Ye.value.filter(y=>!y||y.isHidden?!1:Math.abs(y.x-$.x)<=g).sort((y,k)=>y.y-k.y);B.value={show:!0,x:$.x,categoryIndex:Math.round($.originalX),data:(()=>{const y=Ca.value,k=xa.value,w=[];return V.forEach(x=>{y.forEach(z=>{const A=k[z]||z,le=no(z,x);le&&w.push({seriesName:x.seriesName,label:x.label,value:`${A}: ${le}`,color:x.color,y:x.y})})}),w})()}}else B.value.show=!1}return}if(m.value.isDragging&&m.value.scale>1&&W.value&&xe.value){B.value.show=!1;const S=t.clientX-m.value.lastMouseX,{minX:C,maxX:$}=Z.value,_=$-C||1,V=S*.8;m.value.offsetX+=V;const y=_/m.value.scale,k=_-y,w=0,x=-k/_*i.value.width,z=w;m.value.offsetX=Math.max(x,Math.min(z,m.value.offsetX)),m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY;return}if(!ue.value||!W.value||m.value.isDragging||m.value.isZooming||!n){B.value.show=!1;return}const{minX:c,maxX:r}=Z.value,u=r-c||1,d=u/m.value.scale,h=c-m.value.offsetX/i.value.width*u,v=(l-i.value.left)/i.value.width,E=h+v*d,M=Math.round(E);if(M>=0&&M<=r){const S=G(M),C=Ce.value.map(($,_)=>{const g=f.series.findIndex(y=>y===$),V=$.data[M];return{seriesName:$.name,value:V!==void 0?V:null,color:j(g),y:V!==void 0?oe(V):null}}).filter($=>$.value!==null);B.value={show:!0,x:S,categoryIndex:M,data:C}}},Ba=()=>{B.value.show=!1,et.value=!1,Oe.value=!1,Le.value||(Je.value.show=!1),m.value.isDragging&&(m.value.isDragging=!1),m.value.zoomTimeout&&(clearTimeout(m.value.zoomTimeout),m.value.zoomTimeout=null),m.value.isZooming=!1,setTimeout(()=>{b.value=null,O.value.show=!1},150)},Sa=t=>{if(t.preventDefault(),t.stopPropagation(),be.value)return;const o=t.currentTarget.getBoundingClientRect(),a=t.clientX-o.left,l=t.clientY-o.top,s=Math.max(0,i.value.left-20),n=i.value.right,c=i.value.top,r=i.value.bottom+80;a>=s&&a<=n&&l>=c&&l<=r&&(H.value.show=!1,e.nextTick(()=>{H.value.show=!0,H.value.x=t.clientX,H.value.y=t.clientY,H.value.categoryIndex=null;const u=Math.max(i.value.left,Math.min(a,i.value.right))-i.value.left,h=i.value.width/st.value.length,v=Math.floor(u/h);v>=0&&v<st.value.length&&(H.value.categoryIndex=v)}))},ve=t=>{if(!(t&&t.button===2)){if(H.value.show&&t&&t.type==="click"){const o=document.querySelector(".dss-context-menu");if(o&&o.contains(t.target))return}H.value.show=!1}},$a=t=>{if(typeof t.template=="function"){const o={series:f.series,categories:f.categories,markers:T.value},a={chartX:H.value.chartX,chartY:H.value.chartY,dataX:H.value.mouseDataX,dataY:H.value.mouseDataY,categoryIndex:H.value.categoryIndex};return t.template(o,a)}return t.template||t.label||""},Va=t=>{const o=["dss-context-menu-item"];return t.cssClass&&o.push(t.cssClass),o},_a=t=>t.style||{},Et=t=>t.type&&Xe.value[t.type]?Xe.value[t.type]:t.customIcon?t.customIcon:ua.value,Da=t=>T.value.length?T.value.filter(o=>o.categoryIndex===t):[],La=t=>{if(!W.value&&!P.value)return{x:0,y:0};const o=G(t),a=i.value.bottom+85;return{x:o,y:a}},Bt=()=>{T.value.forEach(t=>{if(t.categoryIndex!==void 0&&(W.value||P.value)){const o=La(t.categoryIndex);t.x=o.x,t.y=o.y}})},St=()=>{if(D.value.title.trim()){if(_e.value){const t=T.value.findIndex(o=>o.id===D.value.editingMarkerId);t!==-1&&(T.value[t].title=D.value.title.trim(),T.value[t].description=D.value.description.trim(),T.value[t].color=D.value.color,T.value[t].type=D.value.type||"default")}else{const t="dss-marker-"+Date.now()+"-"+Math.random().toString(36).substring(2,9);let o=Math.max(0,H.value.categoryIndex);if(P.value){const{maxX:n}=Z.value;o=Math.max(0,Math.min(o,Math.floor(n)))}else W.value&&(o=Math.max(0,Math.min(o,Z.value.maxX)));const a=G(o),l=i.value.bottom+85,s={id:t,title:D.value.title.trim(),description:D.value.description.trim(),color:D.value.color,type:D.value.type||"default",x:a,y:l,categoryIndex:o,chartType:X.value};T.value.push(s)}Me(),$t()}},Me=()=>{D.value.show=!1,D.value.title="",D.value.description="",D.value.color="#FF6B6B",D.value.type="default",D.value.editingMarkerId=null},za=()=>{_e.value&&(Na(D.value.editingMarkerId),Me())},Na=t=>{const o=T.value.findIndex(a=>a.id===t);o!==-1&&(T.value.splice(o,1),$t())},Ha=t=>{D.value.show=!0,D.value.title=t.title,D.value.description=t.description,D.value.color=t.color,D.value.type=t.type||"default",D.value.editingMarkerId=t.id},Aa=()=>{T.value=[],Ia(),ve()},Fa=(t,o)=>{console.warn(`Failed to load custom icon for marker ${o.id}, falling back to default`)},$t=()=>{try{const t=`dss-chart-markers-${f.chartId}`;localStorage.setItem(t,JSON.stringify(T.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},Xa=()=>{try{const t=`dss-chart-markers-${f.chartId}`,o=localStorage.getItem(t);if(o){const a=JSON.parse(o);Array.isArray(a)&&(T.value=a.map(l=>({...l,originalYOffset:l.originalYOffset!==void 0?l.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),T.value=[]}},Ia=()=>{try{const t=`dss-chart-markers-${f.chartId}`;localStorage.removeItem(t)}catch(t){console.warn("Could not clear markers from localStorage:",t)}},Ie=t=>{const o=q.value||"Chart",a=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${o.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${a}.${t}`},Vt=()=>{const t=B.value.show,o=O.value.show;return B.value.show=!1,O.value.show=!1,{originalCrosshair:t,originalTooltip:o}},ye=t=>{B.value.show=t.originalCrosshair,O.value.show=t.originalTooltip},Ta=async(t,o=32,a=32)=>new Promise((l,s)=>{if(t.startsWith("data:")){l(t);return}const n=new Image;n.crossOrigin="anonymous";const c=setTimeout(()=>{console.warn("Image conversion timeout for:",t),l(t)},5e3);n.onload=()=>{clearTimeout(c);try{const r=document.createElement("canvas"),u=r.getContext("2d");r.width=o,r.height=a,u.fillStyle="#fafafa",u.fillRect(0,0,o,a),u.drawImage(n,0,0,o,a);const d=r.toDataURL("image/png");l(d)}catch(r){console.warn("Canvas conversion failed:",r),l(t)}},n.onerror=r=>{clearTimeout(c),console.warn("Failed to load image:",t,r),l(t)},n.src=t}),Ya=async()=>{try{const t=Vt();setTimeout(async()=>{try{const o=document.querySelector(".dss-chart-svg");if(!o){console.error("Chart SVG element not found"),ye(t);return}const a=ct(),l=Q.value,s=se.value+a.height,n=o.cloneNode(!0);n.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(g=>g.remove());const r=n.querySelectorAll("image"),u=Array.from(r).map(async g=>{const V=g.getAttribute("xlink:href")||g.getAttribute("href");if(V&&!V.startsWith("data:"))try{const y=await Ta(V,32,32);g.setAttribute("xlink:href",y),g.setAttribute("href",y)}catch(y){console.warn("Failed to convert logo to base64:",y)}});await Promise.all(u);const h=new XMLSerializer().serializeToString(n).replace(/<svg[^>]*>/,"").replace("</svg>","");let v="",E=30;if(q.value&&(v+=`
21
+ </svg>`)}`),wt=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&t.radialLabels.show===!0}),ka=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.fontSize=="number"?t.radialLabels.fontSize:12});e.computed(()=>{const t=f.value;return t&&t.radialLabels&&t.radialLabels.color?t.radialLabels.color:"#000"});const Ca=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.pointerLength=="number"?t.radialLabels.pointerLength:25}),xa=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.horizontalLength=="number"?t.radialLabels.horizontalLength:40}),Ma=e.computed(()=>{const t=f.value;return t&&t.radialLabels&&typeof t.radialLabels.textOffset=="number"?t.radialLabels.textOffset:8}),bt=e.computed(()=>{if(!p.flags||!p.flags.length)return[];const t=new Map;return p.flags.forEach(o=>{const a=o.categoryIndex;t.has(a)||t.set(a,[]),t.get(a).push(o)}),Array.from(t.entries()).map(([o,a])=>{const l=q(o),s=a.filter(c=>c.manual),n=a.filter(c=>!c.manual);return{categoryIndex:parseInt(o),x:l,flags:a,manualCount:s.length,autoCount:n.length,totalCount:a.length,hasManual:s.length>0,hasAuto:n.length>0,texts:a.map(c=>c.text).join(`
22
+ `)}})}),et=e.ref({show:!1,x:0,y:0,content:"",count:0}),wa=e.computed(()=>f.value?.bubbles?.tooltip?.fields||["x","y","size","label"]),ba=e.computed(()=>{const t=f.value;return{...{x:"X",y:"Y",size:"Size",label:"Label",seriesName:"Series"},...t?.bubbles?.tooltip?.labels||{}}}),Ea=e.computed(()=>f.value?.bubbles?.tooltip?.formatters||{}),I=e.ref(new Set),b=e.ref(null),tt=e.ref(!1),O=e.ref({show:!1,x:0,y:0,title:"",value:""}),B=e.ref({show:!1,x:0,categoryIndex:-1,data:[]}),H=e.ref({show:!1,x:0,y:0,mouseDataX:0,mouseDataY:0,categoryIndex:-1,chartX:0,chartY:0}),m=e.ref({scale:1,offsetX:0,minScale:1,maxScale:2.5,isDragging:!1,lastMouseX:0,lastMouseY:0,isZooming:!1,zoomTimeout:null}),T=e.ref([]),L=e.ref({show:!1,title:"",description:"",color:"#FF6B6B",type:"default",editingMarkerId:null}),Et=e.computed(()=>{const t=["default"];return Fe.value&&t.push(...Object.keys(Fe.value)),t}),Ve=e.computed(()=>L.value.editingMarkerId!==null),Ba=t=>{I.value.has(t)||(it.value=!0,b.value=t)},Sa=()=>{it.value=!1,b.value=null},$a=t=>{if(De.value||Re.value){B.value.show=!1;return}const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,s=t.clientY-a.top,n=P.value?l>=i.value.left-50&&l<=i.value.right+50&&s>=i.value.top-50&&s<=i.value.bottom+100:l>=i.value.left&&l<=i.value.right&&s>=i.value.top&&s<=i.value.bottom;if(tt.value=n,P.value){if(!ue.value||!n||m.value.isDragging||m.value.isZooming){B.value.show=!1;return}if(Te.value.find(C=>!C||C.isHidden?!1:Math.sqrt(Math.pow(C.x-l,2)+Math.pow(C.y-s,2))<=C.radius+3))B.value.show=!1;else{const C=Te.value.filter($=>!$||$.isHidden?!1:Math.sqrt(Math.pow($.x-l,2)+Math.pow($.y-s,2))<=250);if(C.length>0){let $=C[0],_=Math.sqrt(Math.pow($.x-l,2)+Math.pow($.y-s,2));C.forEach(y=>{const k=Math.sqrt(Math.pow(y.x-l,2)+Math.pow(y.y-s,2));k<_&&(_=k,$=y)});const g=30,V=Te.value.filter(y=>!y||y.isHidden?!1:Math.abs(y.x-$.x)<=g).sort((y,k)=>y.y-k.y);B.value={show:!0,x:$.x,categoryIndex:Math.round($.originalX),data:(()=>{const y=wa.value,k=ba.value,w=[];return V.forEach(x=>{y.forEach(z=>{const A=k[z]||z,le=io(z,x);le&&w.push({seriesName:x.seriesName,label:x.label,value:`${A}: ${le}`,color:x.color,y:x.y})})}),w})()}}else B.value.show=!1}return}if(m.value.isDragging&&m.value.scale>1&&W.value&&Ce.value){B.value.show=!1;const S=t.clientX-m.value.lastMouseX,{minX:C,maxX:$}=Z.value,_=$-C||1,V=S*.8;m.value.offsetX+=V;const y=_/m.value.scale,k=_-y,w=0,x=-k/_*i.value.width,z=w;m.value.offsetX=Math.max(x,Math.min(z,m.value.offsetX)),m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY;return}if(!ue.value||!W.value||m.value.isDragging||m.value.isZooming||!n){B.value.show=!1;return}const{minX:c,maxX:r}=Z.value,u=r-c||1,d=u/m.value.scale,h=c-m.value.offsetX/i.value.width*u,v=(l-i.value.left)/i.value.width,E=h+v*d,M=Math.round(E);if(M>=0&&M<=r){const S=q(M),C=ke.value.map(($,_)=>{const g=p.series.findIndex(y=>y===$),V=$.data[M];return{seriesName:$.name,value:V!==void 0?V:null,color:j(g),y:V!==void 0?oe(V):null}}).filter($=>$.value!==null);B.value={show:!0,x:S,categoryIndex:M,data:C}}},Va=()=>{B.value.show=!1,tt.value=!1,Re.value=!1,De.value||(et.value.show=!1),m.value.isDragging&&(m.value.isDragging=!1),m.value.zoomTimeout&&(clearTimeout(m.value.zoomTimeout),m.value.zoomTimeout=null),m.value.isZooming=!1,setTimeout(()=>{b.value=null,O.value.show=!1},150)},_a=t=>{if(t.preventDefault(),t.stopPropagation(),we.value)return;const o=t.currentTarget.getBoundingClientRect(),a=t.clientX-o.left,l=t.clientY-o.top,s=Math.max(0,i.value.left-20),n=i.value.right,c=i.value.top,r=i.value.bottom+80;a>=s&&a<=n&&l>=c&&l<=r&&(H.value.show=!1,e.nextTick(()=>{H.value.show=!0,H.value.x=t.clientX,H.value.y=t.clientY,H.value.categoryIndex=null;const u=Math.max(i.value.left,Math.min(a,i.value.right))-i.value.left,h=i.value.width/nt.value.length,v=Math.floor(u/h);v>=0&&v<nt.value.length&&(H.value.categoryIndex=v)}))},ve=t=>{if(!(t&&t.button===2)){if(H.value.show&&t&&t.type==="click"){const o=document.querySelector(".dss-context-menu");if(o&&o.contains(t.target))return}H.value.show=!1}},Da=t=>{if(typeof t.template=="function"){const o={series:p.series,categories:p.categories,markers:T.value},a={chartX:H.value.chartX,chartY:H.value.chartY,dataX:H.value.mouseDataX,dataY:H.value.mouseDataY,categoryIndex:H.value.categoryIndex};return t.template(o,a)}return t.template||t.label||""},La=t=>{const o=["dss-context-menu-item"];return t.cssClass&&o.push(t.cssClass),o},za=t=>t.style||{},Bt=t=>t.type&&Fe.value[t.type]?Fe.value[t.type]:t.customIcon?t.customIcon:da.value,Na=t=>T.value.length?T.value.filter(o=>o.categoryIndex===t):[],Ha=t=>{if(!W.value&&!P.value)return{x:0,y:0};const o=q(t),a=i.value.bottom+85;return{x:o,y:a}},St=()=>{T.value.forEach(t=>{if(t.categoryIndex!==void 0&&(W.value||P.value)){const o=Ha(t.categoryIndex);t.x=o.x,t.y=o.y}})},$t=()=>{if(L.value.title){if(Ve.value){const t=T.value.findIndex(o=>o.id===L.value.editingMarkerId);t!==-1&&(T.value[t].title=L.value.title||"",T.value[t].description=L.value.description||"",T.value[t].color=L.value.color||"",T.value[t].type=L.value.type||"default",Ze("update-marker",T.value[t]))}else{""+Date.now()+Math.random().toString(36).substring(2,9);let t=Math.max(0,H.value.categoryIndex);if(P.value){const{maxX:o}=Z.value;t=Math.max(0,Math.min(t,Math.floor(o)))}else W.value&&(t=Math.max(0,Math.min(t,Z.value.maxX)));q(t),i.value.bottom+85,newMarker.title=L.value.title||"",newMarker.description=L.value.description||"",newMarker.color=L.value.color||"",newMarker.type=L.value.type||"default",Ze("add-marker",newMarker)}xe(),Vt()}},xe=()=>{L.value.show=!1,L.value.title="",L.value.description="",L.value.color="#FF6B6B",L.value.type="default",L.value.editingMarkerId=null},Aa=()=>{Ve.value&&(Fa(L.value.editingMarkerId),xe())},Fa=t=>{const o=T.value.findIndex(a=>a.id===t);o!==-1&&(T.value.splice(o,1),Vt(),Ze("delete-marker",t))},Xa=t=>{L.value.show=!0,L.value.title=t?.title??t?.comment??"",L.value.description=t?.description??t?.comment??"",L.value.color=t?.color??"",L.value.type=t?.type??"default",L.value.editingMarkerId=t?.id??null},Ia=()=>{T.value=[],Ya(),ve()},Vt=()=>{try{const t=`dss-chart-markers-${p.chartId}`;localStorage.setItem(t,JSON.stringify(T.value))}catch(t){console.warn("Could not save markers to localStorage:",t)}},Ta=()=>{try{const t=`dss-chart-markers-${p.chartId}`,o=localStorage.getItem(t);if(o){const a=JSON.parse(o);Array.isArray(a)&&(T.value=a.map(l=>({...l,originalYOffset:l.originalYOffset!==void 0?l.originalYOffset:15})))}}catch(t){console.warn("Could not load markers from localStorage:",t),T.value=[]}},Ya=()=>{try{const t=`dss-chart-markers-${p.chartId}`;localStorage.removeItem(t)}catch(t){console.warn("Could not clear markers from localStorage:",t)}},Xe=t=>{const o=G.value||"Chart",a=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"-");return`${o.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50).replace(/^-|-$/g,"")||"Chart"}-${a}.${t}`},_t=()=>{const t=B.value.show,o=O.value.show;return B.value.show=!1,O.value.show=!1,{originalCrosshair:t,originalTooltip:o}},fe=t=>{B.value.show=t.originalCrosshair,O.value.show=t.originalTooltip},Ra=async(t,o=32,a=32)=>new Promise((l,s)=>{if(t.startsWith("data:")){l(t);return}const n=new Image;n.crossOrigin="anonymous";const c=setTimeout(()=>{console.warn("Image conversion timeout for:",t),l(t)},5e3);n.onload=()=>{clearTimeout(c);try{const r=document.createElement("canvas"),u=r.getContext("2d");r.width=o,r.height=a,u.fillStyle="#fafafa",u.fillRect(0,0,o,a),u.drawImage(n,0,0,o,a);const d=r.toDataURL("image/png");l(d)}catch(r){console.warn("Canvas conversion failed:",r),l(t)}},n.onerror=r=>{clearTimeout(c),console.warn("Failed to load image:",t,r),l(t)},n.src=t}),Oa=async()=>{try{const t=_t();setTimeout(async()=>{try{const o=document.querySelector(".dss-chart-svg");if(!o){console.error("Chart SVG element not found"),fe(t);return}const a=dt(),l=Q.value,s=se.value+a.height,n=o.cloneNode(!0);n.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text").forEach(g=>g.remove());const r=n.querySelectorAll("image"),u=Array.from(r).map(async g=>{const V=g.getAttribute("xlink:href")||g.getAttribute("href");if(V&&!V.startsWith("data:"))try{const y=await Ra(V,32,32);g.setAttribute("xlink:href",y),g.setAttribute("href",y)}catch(y){console.warn("Failed to convert logo to base64:",y)}});await Promise.all(u);const h=new XMLSerializer().serializeToString(n).replace(/<svg[^>]*>/,"").replace("</svg>","");let v="",E=30;if(G.value&&(v+=`
23
23
  <text x="24" y="${E}"
24
24
  font-family="Arial, sans-serif"
25
25
  font-size="18"
26
26
  font-weight="bold"
27
27
  fill="#333">
28
- ${q.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
28
+ ${G.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
29
29
  </text>`,E+=30),J.value&&(v+=`
30
30
  <text x="24" y="${E}"
31
31
  font-family="Arial, sans-serif"
32
32
  font-size="14"
33
33
  fill="#666">
34
34
  ${J.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
35
- </text>`,E+=25),Ae.value&&f.series.length>0){let g=l-200,V=q.value||J.value?35:25;const y=Math.floor((l-250)/120);let k=0;f.series.forEach((w,x)=>{if(!I.value.has(x)){const z=j(x),A=w.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");v+=`<circle cx="${g+6}" cy="${V-4}" r="6" fill="${z}"/>`,v+=`<text x="${g+18}" y="${V}" font-family="Arial, sans-serif" font-size="12" fill="#333">${A}</text>`,k++,k%y===0?(g=l-200,V+=20):g+=Math.min(120,A.length*8+35)}})}let M="";if(qe.value)try{const{width:g,height:V}=Qe.value,y=Ke.value,k=i.value.left,w=i.value.right,x=i.value.top,z=i.value.bottom,A=i.value.width,le=i.value.height;let U,ne;switch(y){case"center":U=k+(A-g)/2,ne=x+(le-V)/2;break;case"top-left":U=k+15,ne=x+5;break;case"top-right":U=w-g-5,ne=x+5;break;case"bottom-left":U=k+15,ne=z-V-5;break;case"bottom-right":default:U=w-g-5,ne=z-V-5;break}M=`
36
- <g opacity="${Ge.value}">
35
+ </text>`,E+=25),He.value&&p.series.length>0){let g=l-200,V=G.value||J.value?35:25;const y=Math.floor((l-250)/120);let k=0;p.series.forEach((w,x)=>{if(!I.value.has(x)){const z=j(x),A=w.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");v+=`<circle cx="${g+6}" cy="${V-4}" r="6" fill="${z}"/>`,v+=`<text x="${g+18}" y="${V}" font-family="Arial, sans-serif" font-size="12" fill="#333">${A}</text>`,k++,k%y===0?(g=l-200,V+=20):g+=Math.min(120,A.length*8+35)}})}let M="";if(Ge.value)try{const{width:g,height:V}=Je.value,y=Qe.value,k=i.value.left,w=i.value.right,x=i.value.top,z=i.value.bottom,A=i.value.width,le=i.value.height;let U,ne;switch(y){case"center":U=k+(A-g)/2,ne=x+(le-V)/2;break;case"top-left":U=k+15,ne=x+5;break;case"top-right":U=w-g-5,ne=x+5;break;case"bottom-left":U=k+15,ne=z-V-5;break;case"bottom-right":default:U=w-g-5,ne=z-V-5;break}M=`
36
+ <g opacity="${Ke.value}">
37
37
  <g transform="translate(${U}, ${ne}) scale(${g/499})">
38
38
  <path d="M171.52 37.8399H160.38C160.26 36.4799 160.02 35.0599 159.68 33.5699C159.34 32.0799 158.77 30.7399 157.96 29.5299C157.16 28.3199 156 27.3199 154.48 26.5099C152.96 25.7099 150.94 25.2999 148.4 25.2999C144.69 25.2999 141.93 26.1299 140.14 27.8099C138.34 29.4799 137.45 31.5499 137.45 34.0299C137.45 37.7999 139.29 40.0799 142.97 40.8499C146.65 41.6299 150.67 42.3799 155.03 43.1199C159.39 43.8599 163.41 45.3899 167.09 47.7099C170.77 50.0299 172.61 54.6199 172.61 61.4899C172.61 64.6499 172.02 67.5099 170.85 70.0699C169.67 72.6399 168.02 74.7899 165.89 76.5199C163.76 78.2499 161.19 79.5799 158.19 80.5099C155.19 81.4399 151.93 81.8999 148.4 81.8999C143.95 81.8999 140.12 81.2699 136.94 79.9999C133.75 78.7299 131.19 77.0799 129.24 75.0399C127.29 72.9999 125.93 70.6899 125.16 68.1299C124.39 65.5599 124.19 62.9499 124.56 60.2899H136.25C136.37 62.0799 136.58 63.7899 136.85 65.3899C137.13 66.9999 137.68 68.4099 138.52 69.6099C139.35 70.8199 140.58 71.7799 142.19 72.4899C143.8 73.1999 145.99 73.5599 148.78 73.5599C153.3 73.5599 156.47 72.6199 158.29 70.7299C160.11 68.8399 161.03 66.6899 161.03 64.2799C161.03 60.2599 159.19 57.7799 155.51 56.8599C151.83 55.9299 147.79 55.0499 143.4 54.2099C139.01 53.3799 134.97 51.7699 131.29 49.3799C127.61 46.9999 125.77 42.3699 125.77 35.5099C125.77 32.8499 126.3 30.3899 127.35 28.1299C128.4 25.8699 129.9 23.9199 131.85 22.2799C133.8 20.6399 136.16 19.3399 138.95 18.3799C141.73 17.4199 144.8 16.9399 148.14 16.9399C152.41 16.9399 156.07 17.4699 159.14 18.5199C162.2 19.5699 164.69 21.0299 166.61 22.8799C168.53 24.7399 169.89 26.9499 170.69 29.5199C171.49 32.0899 171.77 34.8599 171.52 37.8199V37.8399Z" fill="#020203"/>
39
39
  <path d="M179.04 58.1699C179.04 55.0799 179.55 52.0499 180.57 49.0699C181.59 46.0999 183.04 43.4899 184.93 41.2299C186.82 38.9699 189.09 37.1499 191.75 35.7499C194.41 34.3599 197.35 33.6599 200.57 33.6599C207 33.6599 212.15 35.9299 216.02 40.4799C219.89 45.0299 221.97 51.5999 222.28 60.1999H189.34C189.77 64.2199 191.09 67.1499 193.28 68.9699C195.48 70.7999 198.12 71.7099 201.21 71.7099C203 71.7099 204.5 71.4599 205.71 70.9699C206.92 70.4799 207.91 69.8899 208.68 69.2099C209.45 68.5299 210.06 67.8199 210.49 67.0799C210.92 66.3399 211.26 65.7199 211.51 65.2199H221.72C221.6 66.7699 221.1 68.5099 220.24 70.4599C219.37 72.4099 218.14 74.2299 216.53 75.9399C214.92 77.6399 212.85 79.0599 210.31 80.2099C207.77 81.3499 204.77 81.9299 201.31 81.9299C197.85 81.9299 194.91 81.2799 192.12 79.9799C189.34 78.6799 186.98 76.9499 185.07 74.7799C183.15 72.6099 181.67 70.0899 180.61 67.2199C179.56 64.3399 179.03 61.3299 179.03 58.1699H179.04ZM200.94 42.0199C198.47 42.0199 196.24 42.7299 194.26 44.1499C192.28 45.5699 190.89 47.8299 190.08 50.9199H211.33C211.02 48.0799 209.95 45.8799 208.13 44.3299C206.3 42.7899 203.91 42.0099 200.94 42.0099V42.0199Z" fill="#020203"/>
@@ -66,10 +66,10 @@
66
66
  ${h}
67
67
  ${M}
68
68
  </g>
69
- </svg>`,C=new Blob([S],{type:"image/svg+xml;charset=utf-8"}),$=URL.createObjectURL(C),_=document.createElement("a");_.href=$,_.download=Ie("svg"),document.body.appendChild(_),_.click(),document.body.removeChild(_),URL.revokeObjectURL($),ye(t),ve()}catch(o){console.error("Error downloading SVG:",o),ye(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},Ra=async()=>{try{const t=Vt();document.querySelector(".dss-custom-chart-container").offsetHeight,await new Promise(g=>setTimeout(g,300));const o=ct(),a=Q.value,l=se.value+o.height,s=document.createElement("canvas"),n=s.getContext("2d"),c=2;s.width=a*c,s.height=l*c,s.style.width=a+"px",s.style.height=l+"px",n.scale(c,c),n.fillStyle="#fafafa",n.fillRect(0,0,a,l);let r=30;if(q.value&&(n.fillStyle="#333",n.font="bold 18px Arial, sans-serif",n.fillText(q.value,24,r),r+=30),J.value&&(n.fillStyle="#666",n.font="14px Arial, sans-serif",n.fillText(J.value,24,r),r+=25),Ae.value&&f.series.length>0){let g=a-200,V=q.value||J.value?35:25;const y=Math.floor((a-250)/120);let k=0;n.font="12px Arial, sans-serif",f.series.forEach((w,x)=>{if(!I.value.has(x)){const z=j(x);n.beginPath(),n.arc(g+6,V-4,6,0,2*Math.PI),n.fillStyle=z,n.fill(),n.fillStyle="#333",n.fillText(w.name,g+18,V),k++,k%y===0?(g=a-200,V+=20):g+=Math.min(120,w.name.length*8+35)}})}const d=document.querySelector(".dss-chart-svg").cloneNode(!0),h=d.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),v=d.querySelectorAll(".dss-crosshair"),E=d.querySelectorAll('[class*="tooltip"]');h.forEach(g=>g.remove()),v.forEach(g=>g.remove()),E.forEach(g=>g.remove()),d.querySelectorAll("image").forEach((g,V)=>{const y=g.getAttribute("xlink:href")||g.getAttribute("href");if(y&&!y.startsWith("data:")){const k=Re.value[V],w=k?j(k.seriesIndex):"#3B82F6",x=g.getAttribute("x")||0,z=g.getAttribute("y")||0,A=g.getAttribute("width")||32,le=g.getAttribute("height")||32,U=document.createElementNS("http://www.w3.org/2000/svg","circle");U.setAttribute("cx",parseFloat(x)+parseFloat(A)/2),U.setAttribute("cy",parseFloat(z)+parseFloat(le)/2),U.setAttribute("r",Math.min(parseFloat(A),parseFloat(le))/2-1),U.setAttribute("fill",w),U.setAttribute("stroke","#fafafa"),U.setAttribute("stroke-width","2"),g.parentNode.replaceChild(U,g)}});const S=new XMLSerializer().serializeToString(d),C=new Blob([S],{type:"image/svg+xml;charset=utf-8"}),$=URL.createObjectURL(C),_=new Image;return new Promise((g,V)=>{_.onload=async()=>{try{if(n.drawImage(_,0,o.height),Re.value.forEach(y=>{const k=y.x,w=y.y+o.height,x=(y.width||32)/2,z=j(y.seriesIndex);n.save(),n.beginPath(),n.arc(k,w,x-1,0,2*Math.PI),n.fillStyle=z,n.fill(),n.strokeStyle="#fafafa",n.lineWidth=2,n.stroke(),n.restore()}),qe.value){const y=new Image,k=()=>{const{width:x,height:z}=Qe.value,A=Ke.value,le=i.value.left,U=i.value.right,ne=i.value.top,Gt=i.value.bottom,bo=i.value.width,Eo=i.value.height;let Be,Se;switch(A){case"center":Be=le+(bo-x)/2,Se=ne+o.height+(Eo-z)/2;break;case"top-left":Be=le+15,Se=ne+o.height+10;break;case"top-right":Be=U-x-5,Se=ne+o.height+10;break;case"bottom-left":Be=le+15,Se=Gt+o.height-z-5;break;case"bottom-right":default:Be=U-x-5,Se=Gt+o.height-z-5;break}n.globalAlpha=Ge.value,n.drawImage(y,Be,Se,x,z),n.globalAlpha=1,w()},w=()=>{s.toBlob(x=>{const z=URL.createObjectURL(x),A=document.createElement("a");A.href=z,A.download=Ie("png"),document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(z),URL.revokeObjectURL($),ye(t),ve(),g()},"image/png")};y.onload=k,y.onerror=w,y.src=xt.value}else s.toBlob(y=>{const k=URL.createObjectURL(y),w=document.createElement("a");w.href=k,w.download=Ie("png"),document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(k),URL.revokeObjectURL($),ye(t),ve(),g()},"image/png")}catch(y){URL.revokeObjectURL($),ye(t),V(y)}},_.onerror=()=>{URL.revokeObjectURL($),ye(t),V(new Error("Failed to load SVG image"))},_.src=$})}catch(t){console.error("Error downloading PNG:",t)}},Oa=()=>{try{let t="";q.value&&(t+=`# ${L("chart.csv.chartTitle")}: ${q.value}
70
- `),J.value&&(t+=`# ${L("chart.csv.chartSubtitle")}: ${J.value}
71
- `),t+=`# ${L("chart.csv.generated")}: ${new Date().toLocaleString()}
69
+ </svg>`,C=new Blob([S],{type:"image/svg+xml;charset=utf-8"}),$=URL.createObjectURL(C),_=document.createElement("a");_.href=$,_.download=Xe("svg"),document.body.appendChild(_),_.click(),document.body.removeChild(_),URL.revokeObjectURL($),fe(t),ve()}catch(o){console.error("Error downloading SVG:",o),fe(t)}},50)}catch(t){console.error("Error downloading SVG:",t)}},Pa=async()=>{try{const t=_t();document.querySelector(".dss-custom-chart-container").offsetHeight,await new Promise(g=>setTimeout(g,300));const o=dt(),a=Q.value,l=se.value+o.height,s=document.createElement("canvas"),n=s.getContext("2d"),c=2;s.width=a*c,s.height=l*c,s.style.width=a+"px",s.style.height=l+"px",n.scale(c,c),n.fillStyle="#fafafa",n.fillRect(0,0,a,l);let r=30;if(G.value&&(n.fillStyle="#333",n.font="bold 18px Arial, sans-serif",n.fillText(G.value,24,r),r+=30),J.value&&(n.fillStyle="#666",n.font="14px Arial, sans-serif",n.fillText(J.value,24,r),r+=25),He.value&&p.series.length>0){let g=a-200,V=G.value||J.value?35:25;const y=Math.floor((a-250)/120);let k=0;n.font="12px Arial, sans-serif",p.series.forEach((w,x)=>{if(!I.value.has(x)){const z=j(x);n.beginPath(),n.arc(g+6,V-4,6,0,2*Math.PI),n.fillStyle=z,n.fill(),n.fillStyle="#333",n.fillText(w.name,g+18,V),k++,k%y===0?(g=a-200,V+=20):g+=Math.min(120,w.name.length*8+35)}})}const d=document.querySelector(".dss-chart-svg").cloneNode(!0),h=d.querySelectorAll(".dss-flag-markers, .dss-flag-line, .dss-flag-extension-line, .dss-flag-count-indicator, .dss-flag-count-text"),v=d.querySelectorAll(".dss-crosshair"),E=d.querySelectorAll('[class*="tooltip"]');h.forEach(g=>g.remove()),v.forEach(g=>g.remove()),E.forEach(g=>g.remove()),d.querySelectorAll("image").forEach((g,V)=>{const y=g.getAttribute("xlink:href")||g.getAttribute("href");if(y&&!y.startsWith("data:")){const k=Ye.value[V],w=k?j(k.seriesIndex):"#3B82F6",x=g.getAttribute("x")||0,z=g.getAttribute("y")||0,A=g.getAttribute("width")||32,le=g.getAttribute("height")||32,U=document.createElementNS("http://www.w3.org/2000/svg","circle");U.setAttribute("cx",parseFloat(x)+parseFloat(A)/2),U.setAttribute("cy",parseFloat(z)+parseFloat(le)/2),U.setAttribute("r",Math.min(parseFloat(A),parseFloat(le))/2-1),U.setAttribute("fill",w),U.setAttribute("stroke","#fafafa"),U.setAttribute("stroke-width","2"),g.parentNode.replaceChild(U,g)}});const S=new XMLSerializer().serializeToString(d),C=new Blob([S],{type:"image/svg+xml;charset=utf-8"}),$=URL.createObjectURL(C),_=new Image;return new Promise((g,V)=>{_.onload=async()=>{try{if(n.drawImage(_,0,o.height),Ye.value.forEach(y=>{const k=y.x,w=y.y+o.height,x=(y.width||32)/2,z=j(y.seriesIndex);n.save(),n.beginPath(),n.arc(k,w,x-1,0,2*Math.PI),n.fillStyle=z,n.fill(),n.strokeStyle="#fafafa",n.lineWidth=2,n.stroke(),n.restore()}),Ge.value){const y=new Image,k=()=>{const{width:x,height:z}=Je.value,A=Qe.value,le=i.value.left,U=i.value.right,ne=i.value.top,Kt=i.value.bottom,Bo=i.value.width,So=i.value.height;let Ee,Be;switch(A){case"center":Ee=le+(Bo-x)/2,Be=ne+o.height+(So-z)/2;break;case"top-left":Ee=le+15,Be=ne+o.height+10;break;case"top-right":Ee=U-x-5,Be=ne+o.height+10;break;case"bottom-left":Ee=le+15,Be=Kt+o.height-z-5;break;case"bottom-right":default:Ee=U-x-5,Be=Kt+o.height-z-5;break}n.globalAlpha=Ke.value,n.drawImage(y,Ee,Be,x,z),n.globalAlpha=1,w()},w=()=>{s.toBlob(x=>{const z=URL.createObjectURL(x),A=document.createElement("a");A.href=z,A.download=Xe("png"),document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(z),URL.revokeObjectURL($),fe(t),ve(),g()},"image/png")};y.onload=k,y.onerror=w,y.src=Mt.value}else s.toBlob(y=>{const k=URL.createObjectURL(y),w=document.createElement("a");w.href=k,w.download=Xe("png"),document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(k),URL.revokeObjectURL($),fe(t),ve(),g()},"image/png")}catch(y){URL.revokeObjectURL($),fe(t),V(y)}},_.onerror=()=>{URL.revokeObjectURL($),fe(t),V(new Error("Failed to load SVG image"))},_.src=$})}catch(t){console.error("Error downloading PNG:",t)}},Za=()=>{try{let t="";G.value&&(t+=`# ${D("chart.csv.chartTitle")}: ${G.value}
70
+ `),J.value&&(t+=`# ${D("chart.csv.chartSubtitle")}: ${J.value}
71
+ `),t+=`# ${D("chart.csv.generated")}: ${new Date().toLocaleString()}
72
72
 
73
- `,t+="Category",f.series.forEach(n=>{const c=n.name.replace(/"/g,'""');t+=',"'+c+'"'}),t+=`
74
- `;const o=Math.max(...f.series.map(n=>n.data?.length||0));for(let n=0;n<o;n++){let u='"'+(f.categories[n]||L("chart.fallback.item",{number:n+1})).toString().replace(/"/g,'""')+'"';f.series.forEach(d=>{const h=d.data&&d.data[n]!==void 0?d.data[n]:"";u+=","+h}),t+=u+`
75
- `}const a=new Blob([t],{type:"text/csv;charset=utf-8;"}),l=URL.createObjectURL(a),s=document.createElement("a");s.href=l,s.download=Ie("csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(l),ve()}catch(t){console.error("Error downloading CSV:",t)}},Pa=t=>{if(typeof t.action=="function"){const o={series:f.series,categories:f.categories,markers:T.value},a={chartX:H.value.chartX,chartY:H.value.chartY,dataX:H.value.mouseDataX,dataY:H.value.mouseDataY,categoryIndex:clampedCategoryIndex||H.value.categoryIndex};t.action(o,a)}ve()},Za=()=>{Me(),D.value.show=!0,ve()},_t=t=>{if(H.value.show){const o=document.querySelector(".dss-context-menu");o&&!o.contains(t.target)&&(H.value.show=!1)}},tt=t=>{H.value.show&&!t.target.closest(".context-menu")&&(H.value.show=!1)},Dt=t=>{if(!W.value||!xe.value)return;t.preventDefault(),t.stopPropagation(),m.value.isZooming=!0,B.value.show=!1,m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout);const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,s=t.clientY-a.top;if(l<i.value.left-50||l>i.value.right+50||s<i.value.top-50||s>i.value.bottom+100){m.value.isZooming=!1;return}const n=t.deltaY>0?.9:1.1,c=Math.max(m.value.minScale,Math.min(m.value.maxScale,m.value.scale*n));if(c!==m.value.scale){const{minX:r,maxX:u}=Z.value,d=u-r||1,h=d/m.value.scale,v=r-m.value.offsetX/i.value.width*d,E=(l-i.value.left)/i.value.width,M=v+E*h;m.value.scale=c;const S=d/m.value.scale,C=M-E*S;m.value.offsetX=-(C-r)/d*i.value.width,m.value.scale<=1.01&&(m.value.scale=1,m.value.offsetX=0)}m.value.zoomTimeout=setTimeout(()=>{m.value.isZooming=!1,m.value.zoomTimeout=null},300)},ja=t=>{if(!W.value||!xe.value||m.value.scale<=1)return;B.value.show=!1;const a=t.currentTarget.getBoundingClientRect();t.clientX-a.left,t.clientY-a.top,m.value.isDragging=!0,m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY,t.preventDefault()},Ua=()=>{m.value.isDragging=!1},at=()=>{!W.value||!xe.value||(m.value.scale=1,m.value.offsetX=0,m.value.isDragging=!1,m.value.zoomTimeout&&(clearTimeout(m.value.zoomTimeout),m.value.zoomTimeout=null),m.value.isZooming=!1)},Wa=()=>!W.value||!et.value||!xe.value?"default":m.value.isDragging?"grabbing":m.value.scale>1?"grab":"dss-crosshair",ot=t=>{if(t.length<2)return"";if(t.length===2)return`M ${t[0].x} ${t[0].y} L ${t[1].x} ${t[1].y}`;let o=`M ${t[0].x} ${t[0].y}`;for(let a=0;a<t.length-1;a++){const l=t[Math.max(a-1,0)],s=t[a],n=t[a+1],c=t[Math.min(a+2,t.length-1)],r=s.x+(n.x-l.x)/6*Fe.value,u=s.y+(n.y-l.y)/6*Fe.value,d=n.x-(c.x-s.x)/6*Fe.value,h=n.y-(c.y-s.y)/6*Fe.value;o+=` C ${r} ${u} ${d} ${h} ${n.x} ${n.y}`}return o},ge=e.computed(()=>{let o=50+(je.value?30:0)+60;if(Ee.value)return{left:90,top:90,right:90,bottom:90};let a=0;return q.value&&(a+=15),J.value&&(a+=10),{left:66,top:50+a,right:50,bottom:o}}),i=e.computed(()=>({left:ge.value.left,top:ge.value.top,right:Q.value-ge.value.right,bottom:se.value-ge.value.bottom,width:Q.value-(ge.value.left+ge.value.right),height:se.value-(ge.value.top+ge.value.bottom)})),W=e.computed(()=>["line","area","bar"].includes(X.value)||ut.value),we=e.computed(()=>ut.value),be=e.computed(()=>["radial","semi-radial"].includes(X.value)),Ee=e.computed(()=>X.value==="spider"),P=e.computed(()=>X.value==="bubble"),Te=e.computed(()=>p.value?.chart?.orientation==="horizontal"&&(X.value==="bar"||we.value)),Lt=t=>{const{minY:o,maxY:a}=Z.value,l=a-o||1;return i.value.left+(t-o)/l*i.value.width},zt=t=>{const{maxX:o}=Z.value,a=o+1,s=i.value.height/a;return i.value.top+(t+.5)*s},Y=e.computed(()=>Q.value/2),R=e.computed(()=>Ee.value?se.value/2-40:se.value/2),F=e.computed(()=>{if(Ee.value){const t=i.value.width-80,o=i.value.height-80;return Math.min(t,o)/2}return Math.min(i.value.width,i.value.height)/2}),ee=e.computed(()=>F.value*.45),lt=e.computed(()=>p.value?.bubbles?.minSize||8),Nt=e.computed(()=>p.value?.bubbles?.maxSize||50),Ht=e.computed(()=>p.value?.bubbles?.opacity||.7),At=(t,o)=>{const a=[15,20,25,18,22],l=a[t%a.length]||20,s=1+Math.sin(o*.5)*.2;return Math.max(5,l*s)},qa=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.opacity="1")},Ga=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.display="none")},ke=e.computed(()=>f.series),Ce=e.computed(()=>f.series.filter((t,o)=>!I.value.has(o))),pe="auto",Z=e.computed(()=>{if(P.value)return Ka();if(!Ce.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=1/0,o=-1/0,a=0;Ce.value.forEach(r=>{r.data&&r.data.length&&(a=Math.max(a,r.data.length-1),r.data.forEach(u=>{typeof u=="number"&&(t=Math.min(t,u),o=Math.max(o,u))}))}),f.categories.length>0&&(a=Math.max(a,f.categories.length-1)),t===1/0&&(t=0,o=100);const l=Jt.value,s=ea.value;let n,c;if(l===pe){const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}else if(typeof l=="number")n=l;else{const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}if(s===pe){const r=o-t,u=r>0?r*.1:2;c=o+u}else if(typeof s=="number")c=s;else{const r=o-t,u=r>0?r*.1:2;c=o+u}return{minX:0,maxX:a,minY:n,maxY:c}}),Ka=()=>{if(!Ce.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,o=-1/0,a=1/0,l=-1/0,s=1/0,n=-1/0,c=!1;if(Ce.value.forEach((d,h)=>{d?.data?.length&&d.data.forEach((v,E)=>{let M,S,C;if(typeof v=="object"&&v!==null&&!Array.isArray(v))M=typeof v.x=="number"?v.x:E,S=typeof v.y=="number"?v.y:0,C=typeof v.size=="number"?v.size:20;else if(Array.isArray(v)&&v.length>=3)M=typeof v[0]=="number"?v[0]:E,S=typeof v[1]=="number"?v[1]:0,C=typeof v[2]=="number"?v[2]:20;else if(typeof v=="number")M=E,S=v,C=At(h,E);else return;isFinite(M)&&isFinite(S)&&isFinite(C)&&(t=Math.min(t,M),o=Math.max(o,M),a=Math.min(a,S),l=Math.max(l,S),s=Math.min(s,C),n=Math.max(n,C),c=!0)})}),!c)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===o&&(t=Math.min(t,0),o=Math.max(o,f.categories?.length-1||8)),a===l&&(a=Math.max(0,a-10),l=a+20);const r=o-t,u=l-a;return{minX:t-r*.1,maxX:o+r*.1,minY:a-u*.1,maxY:l+u*.1,minSize:s,maxSize:n}},G=t=>{if(P.value){const{minX:r,maxX:u}=Z.value,d=u-r||1;return i.value.left+(t-r)/d*i.value.width}const{minX:o,maxX:a}=Z.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/i.value.width*l,c=(t-n)/s;return i.value.left+c*i.value.width},oe=t=>{const{minY:o,maxY:a}=Z.value,l=a-o||1;return i.value.bottom-(t-o)/l*i.value.height},Qa=t=>{if(!P.value)return te.value||4;const{minSize:o,maxSize:a}=Z.value,l=a-o||1;if(l===0)return(lt.value+Nt.value)/2;const s=(t-o)/l;return lt.value+s*(Nt.value-lt.value)},Ja=e.computed(()=>Ft.value.map(t=>({y:t.y}))),st=e.computed(()=>{if(P.value)return eo();if(X.value==="bar"){const S=[],{maxX:C}=Z.value,$=C+1,_=5,V=(i.value.width-_*2)/$;for(let y=0;y<=C;y++){const k=i.value.left+_+(y+.5)*V;S.push({x:k,y:i.value.bottom+20,text:f.categories[y]||L("chart.fallback.item",{number:y+1})})}return S}const t=[],{minX:o,maxX:a}=Z.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/i.value.width*l,c=n+s,r=Math.max(0,Math.floor(n-2)),u=Math.min(a,Math.ceil(c+2)),d=u-r,h=i.value.width,E=Math.floor(h/60);let M=1;d>E&&(M=Math.ceil(d/E));for(let S=r;S<=u;S+=M)if(S>=0&&S<=a){const C=G(S);C>=i.value.left-100&&C<=i.value.right+100&&t.push({x:C,y:i.value.bottom+20,text:f.categories[S]||`Item ${S+1}`})}return t}),eo=()=>{const t=[],{minX:o,maxX:a}=Z.value,l=a-o||1,s=Math.min(8,Math.max(4,Math.floor(i.value.width/80)));for(let n=0;n<=s;n++){const c=o+l*n/s,r=G(c);if(r>=i.value.left-10&&r<=i.value.right+10){const u=Math.round(c),d=f.categories?.[u];t.push({x:r,y:i.value.bottom+20,text:d||(Number.isInteger(c)?c.toString():c.toFixed(1))})}}return t},Ft=e.computed(()=>{if(Te.value){const s=[],{maxX:n}=Z.value;for(let c=0;c<=n;c++)s.push({x:i.value.left-10,y:zt(c),text:f.categories[c]||`Item ${c+1}`});return s}const t=[],{minY:o,maxY:a}=Z.value,l=5;for(let s=0;s<=l;s++){const n=o+(a-o)*(s/l),c=Math.round(n);t.push({x:i.value.left-10,y:oe(n),text:c.toString()})}return t}),j=t=>{const o=la.value;if(!o||o.length===0){const a=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return a[t%a.length]}return o[t%o.length]},Xt=t=>{let o=0;for(let a=1;a<t.length;a++){const l=t[a].x-t[a-1].x,s=t[a].y-t[a-1].y;o+=Math.sqrt(l*l+s*s)}return o},It=e.computed(()=>X.value==="line"||we.value?(we.value?f.series.filter(o=>(o.type||X.value)==="line"):ke.value).map((o,a)=>{const l=f.series.findIndex(h=>h===o),s=o.data.map((h,v)=>({x:Te.value?Lt(h):G(v),y:Te.value?zt(v):oe(h)}));let n="";s.length>0&&(re.value?n=ot(s):n=`M ${s[0].x} ${s[0].y}`+s.slice(1).map(h=>` L ${h.x} ${h.y}`).join(""));const c=Xt(s),r=I.value.has(l),u=b.value===l,d=b.value!==null&&b.value!==l;return{path:n,color:j(l),pathLength:c,seriesIndex:l,animationDelay:a*me.value,isHighlighted:u,isDimmed:d,isHidden:r}}):[]),to=e.computed(()=>{if(X.value!=="line")return[];const t=[];return ke.value.forEach((o,a)=>{const l=b.value===a,s=b.value!==null&&b.value!==a,n=I.value.has(a);o.data.forEach((c,r)=>{t.push({x:G(r),y:oe(c),color:j(a),value:c,label:f.categories[r]||r.toString(),seriesName:o.name,categoryIndex:r,dataIndex:r,animationDelay:(a*o.data.length+r)*(me.value/8),isHighlighted:l,isDimmed:s,isHidden:n})})}),t}),Ye=e.computed(()=>{if(!P.value)return[];const t=[];return ke.value.forEach((o,a)=>{if(!o?.data?.length)return;const l=b.value,s=l!==null&&l===a,n=l!==null&&l!==a,c=I.value.has(a);o.data.forEach((r,u)=>{let d,h,v,E,M;if(typeof r=="object"&&r!==null&&!Array.isArray(r))d=typeof r.x=="number"?r.x:u,h=typeof r.y=="number"?r.y:0,v=typeof r.size=="number"?r.size:20,E=r.label||f.categories?.[u]||`Point ${u+1}`,M=r.image||r.imageUrl;else if(Array.isArray(r)&&r.length>=3)d=typeof r[0]=="number"?r[0]:u,h=typeof r[1]=="number"?r[1]:0,v=typeof r[2]=="number"?r[2]:20,E=r[3]||f.categories?.[u]||`Point ${u+1}`,M=r[4];else if(typeof r=="number")d=u,h=r,v=At(a,u),E=f.categories?.[u]||`Point ${u+1}`;else return;!isFinite(d)||!isFinite(h)||!isFinite(v)||t.push({x:G(d),y:oe(h),radius:Qa(v),originalX:d,originalY:h,originalSize:v,color:j(a),seriesName:o.name||`Series ${a+1}`,label:E,imageUrl:M,seriesIndex:a,dataIndex:u,categoryIndex:Math.round(d),isHighlighted:s,isDimmed:n,isHidden:c,opacity:Ht.value})})}),t}),nt=e.computed(()=>X.value!=="area"?[]:ke.value.map((t,o)=>{const a=t.data.map((h,v)=>({x:G(v),y:oe(h)}));if(a.length===0)return{linePath:"",areaPath:"",color:j(o),isHidden:I.value.has(o)};let l=`M ${a[0].x} ${a[0].y}`;re.value&&a.length>1?l=ot(a):a.slice(1).forEach(h=>{l+=` L ${h.x} ${h.y}`});const s=i.value.bottom+1;let n=`M ${a[0].x} ${s}`;if(n+=` L ${a[0].x} ${a[0].y}`,re.value&&a.length>1){const h=ot(a),v=h.substring(h.indexOf("C")||h.indexOf("Q")||h.indexOf("L"));v?n+=" "+v:a.slice(1).forEach(E=>{n+=` L ${E.x} ${E.y}`})}else a.slice(1).forEach(h=>{n+=` L ${h.x} ${h.y}`});n+=` L ${a[a.length-1].x} ${s} Z`;const c=b.value===o,r=b.value!==null&&b.value!==o,u=I.value.has(o),d=Xt(a);return{linePath:l,areaPath:n,color:j(o),pathLength:d,isHighlighted:c,isDimmed:r,isHidden:u}})),Tt=e.computed(()=>{if(!(["bar"].includes(X.value)||we.value))return[];const t=[],{maxX:o}=Z.value,a=we.value?f.series.filter(s=>(s.type||X.value)==="bar"):ke.value,l=a.length;if(Te.value){const s=o+1,c=i.value.height/s,r=c*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=f.series.findIndex(_=>_===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((_,g)=>{const k=i.value.top+(g+.5)*c-r/2+E*u+d/2,w=i.value.left,x=Math.abs(Lt(_)-i.value.left);let z="";if(re.value&&x>0){const A=Math.min(vt.value,h/2,x/2);z=[`M ${w} ${k}`,`L ${w+x-A} ${k}`,`Q ${w+x} ${k} ${w+x} ${k+A}`,`L ${w+x} ${k+h-A}`,`Q ${w+x} ${k+h} ${w+x-A} ${k+h}`,`L ${w} ${k+h}`,"Z"].join(" ")}t.push({x:w,y:k,width:x,height:h,color:j(M),value:_,label:f.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}else{const s=o+1,c=i.value.width/s,r=c*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=f.series.findIndex(_=>_===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((_,g)=>{const k=i.value.left+(g+.5)*c-r/2+E*u+d/2,w=oe(Math.max(0,_)),x=Math.abs(oe(0)-oe(_));let z="";if(re.value&&x>0){const A=Math.min(vt.value,h/2,x/2);z=[`M ${k} ${w+x}`,`L ${k} ${w+A}`,`Q ${k} ${w} ${k+A} ${w}`,`L ${k+h-A} ${w}`,`Q ${k+h} ${w} ${k+h} ${w+A}`,`L ${k+h} ${w+x}`,"Z"].join(" ")}t.push({x:k,y:w,width:h,height:x,color:j(M),value:_,label:f.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}return t}),Yt=e.computed(()=>{if(!be.value)return[];const t=ke.value.map((n,c)=>({series:n,originalIndex:c})).filter(({originalIndex:n})=>!I.value.has(n));if(t.length===0)return[];let o=X.value==="semi-radial"?Math.PI:-Math.PI/2;const a=X.value==="semi-radial"?Math.PI:Math.PI*2,l=[];if(t.length===1){const{series:n,originalIndex:c}=t[0],r=n.data[0]||0,u=o,d=o+a-.001,h=u+a/2,v=Y.value+Math.cos(u)*ee.value,E=R.value+Math.sin(u)*ee.value,M=Y.value+Math.cos(d)*ee.value,S=R.value+Math.sin(d)*ee.value,C=Y.value+Math.cos(d)*F.value,$=R.value+Math.sin(d)*F.value,_=Y.value+Math.cos(u)*F.value,g=R.value+Math.sin(u)*F.value,V=1,y=[`M ${v} ${E}`,`A ${ee.value} ${ee.value} 0 ${V} 1 ${M} ${S}`,`L ${C} ${$}`,`A ${F.value} ${F.value} 0 ${V} 0 ${_} ${g}`,"Z"].join(" ");return l.push({path:y,color:j(c),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===c,isDimmed:!1,isHidden:!1,startAngle:u,endAngle:d,midAngle:h}),l}const s=t.reduce((n,{series:c})=>n+(c.data[0]||0),0);return s===0?[]:(t.forEach(({series:n,originalIndex:c})=>{const r=n.data[0]||0,u=r/s*a,d=o,h=o+u,v=d+u/2,E=Y.value+Math.cos(d)*ee.value,M=R.value+Math.sin(d)*ee.value,S=Y.value+Math.cos(h)*ee.value,C=R.value+Math.sin(h)*ee.value,$=Y.value+Math.cos(h)*F.value,_=R.value+Math.sin(h)*F.value,g=Y.value+Math.cos(d)*F.value,V=R.value+Math.sin(d)*F.value,y=u>Math.PI?1:0,k=[`M ${E} ${M}`,`A ${ee.value} ${ee.value} 0 ${y} 1 ${S} ${C}`,`L ${$} ${_}`,`A ${F.value} ${F.value} 0 ${y} 0 ${g} ${V}`,"Z"].join(" ");l.push({path:k,color:j(c),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===c,isDimmed:b.value!==null&&b.value!==c,isHidden:!1,startAngle:d,endAngle:h,midAngle:v}),o=h}),l)}),ao=e.computed(()=>!Mt.value||!be.value?[]:Yt.value.map((t,o)=>{if(t.isHidden)return null;const a=fa.value,l=ya.value,s=ka.value,n=Y.value+Math.cos(t.midAngle)*F.value,c=R.value+Math.sin(t.midAngle)*F.value,r=Y.value+Math.cos(t.midAngle)*(F.value+a),u=R.value+Math.sin(t.midAngle)*(F.value+a),d=Math.cos(t.midAngle)>=0,v=r+l*(d?1:-1),E=u,M=d?r+15:r-15,S=E-s,C=d?"start":"end";return{pointerStartX:n,pointerStartY:c,pointerEndX:r,pointerEndY:u,horizontalEndX:v,horizontalEndY:E,textX:M,textY:S,text:`${t.seriesName}: ${t.value}`,color:t.color,textAnchor:C,isRightSide:d,isHighlighted:t.isHighlighted,isDimmed:t.isDimmed}}).filter(Boolean)),oo=t=>{if(!t||t.isHidden)return 0;const o=t.opacity||Ht.value||.7;return b.value===null||b.value===void 0?o:b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):Math.max(.5,o*.8):o},lo=t=>{if(!t||t.isHidden)return 0;const o=t.radius>20?.9:.8;return b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):o*.7:o},Rt=(t,o)=>{if(t)try{if(b.value===t.seriesIndex?b.value=null:b.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const a=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:o,chartId:f.chartId}});window.dispatchEvent(a)}}catch(a){console.error("Error in onBubbleClick:",a)}},so=(t,o)=>{const a=[`dss-bubble-fallback-${o}`];return t.isHighlighted&&a.push("dss-bubble-highlighted"),t.isDimmed&&a.push("dss-bubble-dimmed"),t.isHidden&&a.push("dss-bubble-hidden"),a.push(`dss-bubble-series-${t.seriesIndex}`),a.join(" ")},Ot=(t,o)=>{t&&(o.stopPropagation(),Oe.value=!0,b.value=t.seriesIndex,B.value.show=!1)},no=(t,o)=>{let a;switch(t){case"x":a=o.originalX;break;case"y":a=o.originalY;break;case"size":a=o.originalSize;break;case"label":a=o.label;break;case"seriesName":a=o.seriesName;break;default:a=o[t]||""}const l=Ma.value[t];return typeof l=="function"?l(a,o):typeof a=="number"?a.toFixed(1):a?.toString()||""},ro=()=>{if(!P.value||!B.value.data||B.value.data.length===0)return"Bubbles";const t=[],o=new Set;return B.value.data.forEach(a=>{if(a.seriesName&&a.label){const l=`${a.seriesName} - ${a.label}`;o.has(l)||(t.push(l),o.add(l))}else a.seriesName&&(o.has(a.seriesName)||(t.push(a.seriesName),o.add(a.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},Pt=(t,o)=>{t&&(Oe.value=!1,b.value=null)},De=e.computed(()=>f.categories.length||Math.max(...Ce.value.map(t=>t.data.length))),io=e.computed(()=>{let t=0;return Ce.value.forEach(o=>{o.data.forEach(a=>{typeof a=="number"&&(t=Math.max(t,a))})}),t||100}),Zt=e.computed(()=>{const t=[],o=De.value;for(let a=0;a<o;a++){const l=a*2*Math.PI/o-Math.PI/2,s=Y.value+Math.cos(l)*F.value,n=R.value+Math.sin(l)*F.value;t.push({x:s,y:n,angle:l,index:a})}return t}),co=e.computed(()=>{const t=[],o=De.value;return Zt.value.forEach((a,l)=>{const s=F.value+15,n=l*2*Math.PI/o-Math.PI/2,c=Y.value+Math.cos(n)*s,r=R.value+Math.sin(n)*s+5;let u="middle",d="middle";Math.abs(Math.cos(n))>.5&&(u=Math.cos(n)>0?"start":"end"),Math.abs(Math.sin(n))>.5&&(d=Math.sin(n)>0?"hanging":"auto"),t.push({x:c,y:r,text:f.categories[l]||`Axis ${l+1}`,anchor:u,baseline:d})}),t}),uo=e.ref(new Set),mo=(t,o,a)=>{const l=`current-${a}`,s=uo.value.has(l);return!s&&b.value===null?o.fillOpacity||Ve.value:o.isHighlighted||s?(o.fillOpacity||Ve.value)+.15:o.isDimmed?(o.fillOpacity||Ve.value)*.3:o.fillOpacity||Ve.value},ho=e.computed(()=>{if(!Ee.value)return[];const t=[],o=De.value;return ke.value.forEach((a,l)=>{const s=[],n=[],c=b.value===l,r=b.value!==null&&b.value!==l,u=I.value.has(l);for(let d=0;d<o;d++){const h=a.data[d]||0,E=h/io.value*F.value,M=d*2*Math.PI/o-Math.PI/2,S=Y.value+Math.cos(M)*E,C=R.value+Math.sin(M)*E;s.push(`${S},${C}`),n.push({x:S,y:C,value:h,label:f.categories[d]||`Axis ${d+1}`,seriesName:a.name})}t.push({points:s.join(" "),dataPoints:n,color:j(l),fillOpacity:Ve.value,seriesName:a.name,value:`${a.name}: ${a.data.join(", ")}`,isHighlighted:c,isDimmed:r,isHidden:u})}),t}),Re=e.computed(()=>{const t=p.value;return t.logos.map((o,a)=>{const l=f.series[o.seriesIndex];if(!l||!l.data||l.data.length===0||I.value.has(o.seriesIndex))return null;let s,n;if(W.value){const r=l.data.map((u,d)=>({x:G(d),y:oe(u)}));if(t.animations.enabled&&!He.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(N.value.isAnimating||!N.value.hasAnimated))if(N.value.isAnimating){const u=N.value.currentFrame/N.value.totalFrames,d=jt(t.animations.easing,Math.min(u,1)),h=wo(r,d);s=h.x+(o.offsetX||0),n=h.y+(o.offsetY||0)}else s=r[0].x+(o.offsetX||0),n=r[0].y+(o.offsetY||0);else{const u=l.data.length-1,d=l.data[u];s=G(u)+(o.offsetX||0),n=oe(d)+(o.offsetY||0)}}else if(be.value||Ee.value){const r=Math.PI*2/t.logos.length*a;s=Y.value+Math.cos(r)*(F.value+30)+(o.offsetX||0),n=R.value+Math.sin(r)*(F.value+30)+(o.offsetY||0)}return{...o,x:s,y:n,seriesIndex:o.seriesIndex}}).filter(Boolean)}),vo=t=>{const o=document.querySelector(`.dss-logo-fallback-${t}`),a=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.opacity="0"),a&&(a.style.opacity="1")},go=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const o=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.display="none")},po=t=>{I.value.has(t)?I.value.delete(t):I.value.add(t)},fo=e.computed(()=>{if(!O.value.show&&!(ue.value&&B.value.show&&!m.value.isZooming))return{display:"none"};let t,o;if(ue.value&&B.value.show&&!m.value.isZooming){t=B.value.x+15,o=i.value.top;const a=P.value?200:150;t+a>Q.value&&(t=B.value.x-a-15),t<0&&(t=10),o<10&&(o=10)}else t=O.value.x,o=O.value.y;return{left:t+"px",top:o+"px"}}),ie=(t,o)=>{if(Le.value)return;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+10,n=o.clientY-l.top-10;const c=200,r=120,u=Q.value,d=se.value;s+c>u&&(s=o.clientX-l.left-c-10),n+r>d&&(n=o.clientY-l.top-r-10),s<0&&(s=10),n<0&&(n=10);let h;typeof t.categoryIndex=="number"?h=t.categoryIndex:typeof t.dataIndex=="number"?h=t.dataIndex:t.label&&f.categories.includes(t.label)&&(h=f.categories.indexOf(t.label)),O.value={show:!0,x:s,y:n,title:t.seriesName||t.label||"",value:t.value?.toString()||"",categoryIndex:h}},rt=e.ref(!1),Oe=e.ref(!1),ce=()=>{O.value.show=!1,B.value.show=!1,rt.value||(b.value=null)},Le=e.ref(!1),ze=(t,o)=>{Le.value=!0,O.value.show=!1,B.value.show=!1;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+15,n=o.clientY-l.top-10;const c=250;s+c>Q.value&&(s=o.clientX-l.left-c-15),s<0&&(s=10),n<0&&(n=10),Je.value={show:!0,x:s,y:n,content:t.texts,count:t.totalCount}},Ne=()=>{Le.value=!1,Je.value.show=!1},N=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),jt=(t,o)=>{switch(t){case"linear":return o;case"ease":return o<.5?2*o*o:-1+(4-2*o)*o;case"ease-in":return o*o;case"ease-out":return o*(2-o);case"ease-in-out":return o<.5?2*o*o:-1+(4-2*o)*o;default:return o}},He=e.computed(()=>na.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),Ut=()=>{if(!$e.value||He.value){N.value.hasAnimated=!0;return}N.value.isAnimating=!0,N.value.currentFrame=0,N.value.totalFrames=Math.ceil(pt.value/16.67);const t=()=>{const o=N.value.currentFrame/N.value.totalFrames,a=jt(yt.value,Math.min(o,1));yo(a),o<1?(N.value.currentFrame++,N.value.animationId=requestAnimationFrame(t)):ko()};N.value.animationId=requestAnimationFrame(t)},yo=t=>{const o=document.querySelector(".dss-custom-chart-container");o&&o.style.setProperty("--dss-animation-progress",t)},ko=()=>{N.value.isAnimating=!1,N.value.hasAnimated=!0,N.value.animationId&&(cancelAnimationFrame(N.value.animationId),N.value.animationId=null)},Co=e.computed(()=>{if(!$e.value||He.value||N.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${pt.value}ms`,t["--dss-animation-easing"]=xo(yt.value),t["--dss-stagger-delay"]=`${me.value}ms`,t}),xo=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",Mo=()=>{if(!$e.value||He.value)return"";const t=["dss-chart-animated"];return N.value.hasAnimated||t.push(`dss-animate-${gt.value}`),N.value.hasAnimated||(be.value?t.push("dss-animate-fill"):t.push(`dss-animate-${gt.value}`)),N.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>f.series,(t,o)=>{sa.value&&o&&N.value.hasAnimated&&(N.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>Ut(),ft.value)}))},{deep:!0}),e.watch(()=>m.value.isZooming,(t,o)=>{o&&!t&&setTimeout(()=>{Bt()},50)}),e.watch(()=>[m.value.scale,m.value.offsetX],()=>{!m.value.isZooming&&!m.value.isDragging&&Bt()},{flush:"post"}),e.watch([aa,oa],([t,o])=>{m.value.minScale=t,m.value.maxScale=o,(m.value.scale<t||m.value.scale>o)&&at()},{immediate:!0}),e.watch(()=>f.locale,t=>{t&&t!==fe.value&&(fe.value=t)},{immediate:!0}),e.watch(()=>H.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",tt)}):document.removeEventListener("click",tt)}),e.onMounted(()=>{b.value=null,Xa(),$e.value&&!He.value?setTimeout(()=>Ut(),ft.value):N.value.hasAnimated=!0,document.addEventListener("mousemove",Wt),document.addEventListener("mouseup",qt),document.addEventListener("click",_t)}),e.onUnmounted(()=>{N.value.animationId&&cancelAnimationFrame(N.value.animationId),m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout),document.removeEventListener("mousemove",Wt),document.removeEventListener("mouseup",qt),document.removeEventListener("click",_t),document.removeEventListener("click",tt)});const Wt=t=>{if(m.value.isDragging&&m.value.scale>1&&W.value){B.value.show=!1;const o=t.clientX-m.value.lastMouseX,{minX:a,maxX:l}=Z.value,s=l-a||1,c=o*.8;m.value.offsetX+=c;const r=s/m.value.scale,u=s-r,d=0,h=-u/s*i.value.width,v=d;m.value.offsetX=Math.max(h,Math.min(v,m.value.offsetX)),m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY}},qt=()=>{m.value.isDragging&&(m.value.isDragging=!1,setTimeout(()=>{!m.value.isDragging&&m.value.isZooming},100))},wo=(t,o)=>{if(!t||t.length===0)return{x:0,y:0};if(t.length===1||o<=0)return t[0];if(o>=1)return t[t.length-1];let a=0;const l=[];for(let c=1;c<t.length;c++){const r=t[c].x-t[c-1].x,u=t[c].y-t[c-1].y,d=Math.sqrt(r*r+u*u);l.push(d),a+=d}const s=a*o;let n=0;for(let c=0;c<l.length;c++){const r=n+l[c];if(s<=r){const u=(s-n)/l[c],d=t[c],h=t[c+1];return{x:d.x+(h.x-d.x)*u,y:d.y+(h.y-d.y)*u}}n=r}return t[t.length-1]};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",Mo()]),style:e.normalizeStyle({width:Q.value+"px",height:se.value+20+"px",...Co.value,cursor:Wa()}),"data-chart-type":X.value,onWheel:Dt,onMousedown:ja,onMousemove:Ea,onMouseup:Ua,onMouseleave:Ba,onDblclick:at,onContextmenu:e.withModifiers(Sa,["prevent"]),onClick:e.withModifiers(ve,["left"]),onWheelCapture:Dt},[e.createElementVNode("div",So,[e.createElementVNode("div",$o,[q.value?(e.openBlock(),e.createElementBlock("div",Vo,e.toDisplayString(q.value),1)):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",_o,e.toDisplayString(J.value),1)):e.createCommentVNode("",!0)]),Ae.value?(e.openBlock(),e.createElementBlock("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.series,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${l}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":I.value.has(l),"dss-legend-hovered":b.value===l,"dss-legend-dimmed":b.value!==null&&b.value!==l}]),onClick:s=>po(l),onMouseenter:s=>wa(l),onMouseleave:ba,style:e.normalizeStyle({animationDelay:`${l*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:j(l)})},null,4),e.createElementVNode("span",zo,e.toDisplayString(a.name),1)],46,Lo))),128))])):e.createCommentVNode("",!0)]),(e.openBlock(),e.createElementBlock("svg",{width:Q.value,height:se.value,class:"dss-chart-svg","data-smooth":re.value,"data-animated":$e.value},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Ho,[e.createElementVNode("rect",{x:i.value.left,y:i.value.top,width:i.value.width,height:i.value.height*4},null,8,Ao)])]),W.value||P.value?(e.openBlock(),e.createElementBlock("g",Fo,[mt.value?(e.openBlock(),e.createElementBlock("g",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ja.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${l}`,x1:i.value.left,x2:i.value.right,y1:a.y,y2:a.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${l*50}ms`})},null,12,Io))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",To,[e.createElementVNode("line",{x1:i.value.left,x2:i.value.right,y1:i.value.bottom,y2:i.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Yo),e.createElementVNode("line",{x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Ro)]),e.createElementVNode("g",Oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${l}`,x:a.x,y:a.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},e.toDisplayString(a.text),13,Po))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ft.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${l}`,x:a.x,y:a.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*80}ms`})},e.toDisplayString(a.text),13,Zo))),128)),je.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.value.left+i.value.width/2,y:i.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(je.value),9,jo)):e.createCommentVNode("",!0),dt.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:15,y:i.value.top+12+i.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${i.value.top+i.value.height/2})`},e.toDisplayString(dt.value),9,Uo)):e.createCommentVNode("",!0)]),wt.value.length>0?(e.openBlock(),e.createElementBlock("g",Wo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wt.value,a=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${a.categoryIndex}`},[e.createElementVNode("g",qo,[a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:i.value.bottom,y2:i.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:Ne},null,40,Go)):e.createCommentVNode("",!0),a.hasAuto&&!a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:i.value.bottom,y2:i.value.top,stroke:"#0dbf89","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:Ne},null,40,Ko)):e.createCommentVNode("",!0),a.hasAuto&&a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:i.value.bottom,y2:i.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>ze(a,l),onMouseleave:Ne},null,40,Qo)):e.createCommentVNode("",!0)]),a.hasManual&&a.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x+8,cy:Math.max(15,i.value.top-10),r:"14",fill:"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:l=>ze(a,l),onMouseleave:Ne},null,40,Jo)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:a.x,cy:Math.max(15,i.value.top-10),r:"14",fill:a.hasManual&&a.hasAuto||a.hasManual?"#047395":"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:l=>ze(a,l),onMouseleave:Ne},null,40,el),e.createElementVNode("text",{x:a.x,y:Math.max(15,i.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(a.totalCount),9,tl)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",al,[we.value?(e.openBlock(),e.createElementBlock("g",ol,[e.createElementVNode("g",ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,sl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,nl))],64))),128))]),e.createElementVNode("g",rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(It.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,il))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.mixedLinePoints,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,cl))),128)):e.createCommentVNode("",!0)])])):X.value==="line"?(e.openBlock(),e.createElementBlock("g",ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(It.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,dl))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(to.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,ml))),128)):e.createCommentVNode("",!0)])):X.value==="area"?(e.openBlock(),e.createElementBlock("g",hl,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nt.value,(a,l)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${l}`,id:`area-mask-${l}-${K.chartId}`},[e.createElementVNode("rect",{x:i.value.left-10,y:i.value.top-10,width:i.value.width+20,height:i.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${i.value.width+20}px`})},null,12,gl)],8,vl))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${l}`,d:a.areaPath,fill:a.color,"fill-opacity":a.isHighlighted?ht.value+.2:ht.value,mask:`url(#area-mask-${l}-${K.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden})},null,10,pl))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${l}`,d:a.linePath,stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${l*me.value}ms`})},null,14,fl))),128))])):X.value==="bar"?(e.openBlock(),e.createElementBlock("g",yl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,kl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,Cl))],64))),128))])):e.createCommentVNode("",!0)]),ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("g",xl,[e.createElementVNode("line",{x1:B.value.x,x2:B.value.x,y1:i.value.top,y2:i.value.bottom,stroke:ta.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,Ml),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${l}`,cx:B.value.x,cy:a.y,r:te.value+2,fill:a.color,stroke:"#fafafa","stroke-width":"2",opacity:"0.9"},null,8,wl))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("g",bl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ye.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${l}`},[a?(e.openBlock(),e.createElementBlock("g",El,[e.createElementVNode("circle",{cx:a.x,cy:a.y,r:a.radius,fill:a.color,"fill-opacity":oo(a),stroke:a.color,"stroke-width":a.isHighlighted?3:1,"stroke-opacity":"0.8",class:e.normalizeClass(so(a,l)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:s=>Ot(a,s),onMouseleave:s=>Pt(a),onClick:s=>Rt(a,s)},null,42,Bl),a.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:a.x-a.radius*.65,y:a.y-a.radius*.65,width:a.radius*1.3,height:a.radius*1.3,"xlink:href":a.imageUrl,class:e.normalizeClass(`dss-bubble-image-${l} ${a.isHighlighted?"dss-bubble-highlighted":""} ${a.isDimmed?"dss-bubble-dimmed":""} ${a.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${a.radius*.65}px at ${a.radius*.65}px ${a.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:lo(a)}),onLoad:s=>qa(l),onError:s=>Ga(l),onMouseenter:s=>Ot(a,s),onMouseleave:s=>Pt(a),onClick:s=>Rt(a,s)},null,46,Sl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),be.value?(e.openBlock(),e.createElementBlock("g",$l,[X.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Y.value,cy:R.value,r:F.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,Vl)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":X.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l}`,d:a.path,fill:a.color,"fill-opacity":a.isHighlighted?(a.opacity||.8)+.2:a.opacity||.8,stroke:a.color,"stroke-width":a.isHighlighted?2:1,class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,42,Dl))),128))],8,_l),Mt.value?(e.openBlock(),e.createElementBlock("g",Ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ao.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${l}`,class:e.normalizeClass({"dss-label-highlighted":a.isHighlighted,"dss-label-dimmed":a.isDimmed})},[e.createElementVNode("line",{x1:a.pointerStartX,y1:a.pointerStartY,x2:a.pointerEndX,y2:a.pointerEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,zl),e.createElementVNode("line",{x1:a.pointerEndX,y1:a.pointerEndY,x2:a.horizontalEndX,y2:a.horizontalEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},null,12,Nl),e.createElementVNode("text",{x:a.textX,y:a.textY,"text-anchor":a.textAnchor,"font-size":pa.value,"dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},e.toDisplayString(a.text),13,Hl)],2))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ee.value?(e.openBlock(),e.createElementBlock("g",Al,[mt.value?(e.openBlock(),e.createElementBlock("g",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${l}`,cx:Y.value,cy:R.value,r:a,fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},null,12,Xl))),128)),e.createElementVNode("g",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${l}`},[e.createElementVNode("rect",{x:Y.value-16,y:R.value-a-7,width:"32",height:"16",fill:"#fafafa",stroke:"none"},null,8,Tl),e.createElementVNode("text",{x:Y.value,y:R.value-a+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(ia(l)),9,Yl)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Zt.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${l}`,x1:Y.value,x2:a.x,y1:R.value,y2:a.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,Rl))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(co.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${l}`,x:a.x+Math.cos(l*2*Math.PI/De.value-Math.PI/2)*16,y:a.y+Math.sin(l*2*Math.PI/De.value-Math.PI/2)*16,"text-anchor":a.anchor,"dominant-baseline":a.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},e.toDisplayString(a.text.charAt(0).toUpperCase()+a.text.slice(1)),13,Pl))),128))]),e.createElementVNode("g",Zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ho.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${l}`},[e.createElementVNode("polygon",{points:a.points,fill:a.color,"fill-opacity":mo("current",a,l),stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value}ms`,transition:"all 0.2s ease"}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,jl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataPoints,(s,n)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${l}-${n}`,cx:s.x,cy:s.y,r:a.isHighlighted?te.value+1:te.value>0?te.value:0,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value+n*50}ms`,transition:"all 0.2s ease"}),onMouseover:c=>ie(s,c),onMouseleave:ce},null,46,Ul))),128))]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("g",Wl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${l}`,cx:a.x,cy:a.y,r:a.width/2,fill:j(a.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${l}`),style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,14,ql))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,(a,l)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${l}`,x:a.x-a.width/2,y:a.y-a.height/2,width:a.width,height:a.height,"xlink:href":a.url,onLoad:s=>vo(l),onError:s=>go(l),class:e.normalizeClass(`dss-logo-image-${l}`),"clip-path":`circle(${a.width/2}px at ${a.width/2}px ${a.height/2}px)`,style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,46,Gl))),128))])],8,No)),qe.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:Q.value+"px",height:se.value+"px",backgroundImage:`url('${xt.value}')`,backgroundRepeat:"no-repeat",...ha.value,opacity:Ge.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(da.value,(a,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+a.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:a.x+"px",top:a.y+"px",width:kt.value+"px",height:kt.value+"px",transform:"translate(-50%, -50%)",cursor:"pointer",zIndex:500,backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",pointerEvents:Ct.value?"auto":"none"}),onClick:e.withModifiers(s=>Ha(a),["stop"]),onWheel:o[0]||(o[0]=e.withModifiers(()=>{},["prevent","stop"])),title:a.title+(a.description?": "+a.description:"")},[e.createElementVNode("img",{src:Et(a),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:"50%",pointerEvents:"none"},onError:s=>Fa(s,a),draggable:"false"},null,40,Ql)],44,Kl)),[[e.vShow,Ct.value]])),128)),O.value.show||ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":ue.value&&B.value.show&&!m.value.isZooming}]),style:e.normalizeStyle(fo.value)},[!ue.value||!B.value.show||m.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Jl,[e.createElementVNode("div",es,e.toDisplayString(O.value.title),1),e.createElementVNode("div",ts,e.toDisplayString(O.value.value),1)]),O.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[he(O.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",as,[o[7]||(o[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",os,e.toDisplayString(e.unref(L)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(O.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${l}`},[e.createElementVNode("div",ls,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",ss,[e.createElementVNode("div",ns,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(O.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",rs,[o[8]||(o[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",is,e.toDisplayString(e.unref(L)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(O.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",cs,[e.createElementVNode("div",us,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",ds,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ms,[e.createElementVNode("div",hs,e.toDisplayString(P.value?ro():K.categories[B.value.categoryIndex]||`Category ${B.value.categoryIndex+1}`),1),P.value?(e.openBlock(),e.createElementBlock("div",vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(a.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",gs,e.toDisplayString(a.seriesName)+":",1),e.createElementVNode("span",ps,e.toDisplayString(a.value),1)]))),128))]),he(B.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",fs,[o[9]||(o[9]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ys,e.toDisplayString(e.unref(L)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${l}`},[e.createElementVNode("div",ks,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Cs,[e.createElementVNode("div",xs,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(B.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",Ms,[o[10]||(o[10]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ws,e.toDisplayString(e.unref(L)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",bs,[e.createElementVNode("div",Es,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",Bs,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),W.value&&xe.value&&m.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-zoom-indicator",onClick:at},[o[11]||(o[11]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(m.value.scale*100))+"% "+e.toDisplayString(e.unref(L)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,Bo),H.value.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-context-menu",style:e.normalizeStyle({left:H.value.x+"px",top:H.value.y+"px"}),onClick:o[1]||(o[1]=e.withModifiers(()=>{},["stop"]))},[ae.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:Za},e.toDisplayString(e.unref(L)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),T.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-context-menu-item",onClick:Aa},e.toDisplayString(e.unref(L)("chart.contextMenu.clearAllMarkers")),1)):e.createCommentVNode("",!0),ae.value.addMarker&&(ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv||We.value.length>0)?(e.openBlock(),e.createElementBlock("div",Ss)):e.createCommentVNode("",!0),ae.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Ya},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),ae.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:Ra},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:5,class:"dss-context-menu-item",onClick:Oa},e.toDisplayString(e.unref(L)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),We.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",$s)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+l},[a.separator?(e.openBlock(),e.createElementBlock("div",Vs)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(Va(a)),style:e.normalizeStyle(_a(a)),onClick:s=>Pa(a)},[a.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:$a(a),class:"dss-custom-menu-content"},null,8,Ds)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.icon?(e.openBlock(),e.createElementBlock("span",Ls,e.toDisplayString(a.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.label),1)],64))],14,_s)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),D.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-marker-modal-overlay",onClick:Me},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:o[6]||(o[6]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",zs,[e.createElementVNode("h3",null,e.toDisplayString(_e.value?e.unref(L)("chart.modalMarker.editMarker"):e.unref(L)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:Me},"×")]),e.createElementVNode("div",Ns,[e.createElementVNode("div",Hs,[e.createElementVNode("label",As,[e.createTextVNode(e.toDisplayString(e.unref(L)("chart.modalMarker.title"))+" ",1),o[12]||(o[12]=e.createElementVNode("span",{style:{color:"hsl(345, 94%, 44%)"}},"*",-1))]),e.withDirectives(e.createElementVNode("input",{id:"dss-marker-title","onUpdate:modelValue":o[2]||(o[2]=a=>D.value.title=a),type:"text",placeholder:e.unref(L)("chart.modalMarker.placeholderTitle"),class:"dss-form-input",onKeyup:e.withKeys(St,["enter"])},null,40,Fs),[[e.vModelText,D.value.title]])]),e.createElementVNode("div",Xs,[e.createElementVNode("label",Is,e.toDisplayString(e.unref(L)("chart.modalMarker.description")),1),e.withDirectives(e.createElementVNode("textarea",{id:"dss-marker-description","onUpdate:modelValue":o[3]||(o[3]=a=>D.value.description=a),placeholder:e.unref(L)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"3"},null,8,Ts),[[e.vModelText,D.value.description]])]),bt.value.length>1?(e.openBlock(),e.createElementBlock("div",Ys,[e.createElementVNode("label",Rs,e.toDisplayString(e.unref(L)("chart.modalMarker.iconType")),1),e.withDirectives(e.createElementVNode("select",{id:"dss-marker-type","onUpdate:modelValue":o[4]||(o[4]=a=>D.value.type=a),class:"form-select"},[e.createElementVNode("option",Os,e.toDisplayString(e.unref(L)("chart.modalMarker.defaultIcon")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bt.value.filter(a=>a!=="default"),a=>(e.openBlock(),e.createElementBlock("option",{key:a,value:a},e.toDisplayString(a.charAt(0).toUpperCase()+a.slice(1)),9,Ps))),128))],512),[[e.vModelSelect,D.value.type]])])):e.createCommentVNode("",!0),e.createElementVNode("div",Zs,[e.createElementVNode("label",null,e.toDisplayString(e.unref(L)("chart.modalMarker.iconPreview")),1),e.createElementVNode("div",js,[e.createElementVNode("img",{src:Et({type:D.value.type}),alt:"Marker Icon Preview",class:"preview-icon",style:{width:"32px",height:"32px","border-radius":"50%",border:"2px solid #ddd"},onError:o[5]||(o[5]=a=>a.target.style.display="none")},null,40,Us)])])]),e.createElementVNode("div",Ws,[e.createElementVNode("div",qs,[_e.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:za},e.toDisplayString(e.unref(L)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Gs,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:Me},e.toDisplayString(e.unref(L)("chart.modalMarker.cancel")),1),e.createElementVNode("button",{class:"dss-btn dss-btn-primary",onClick:St,disabled:!D.value.title.trim()},e.toDisplayString(_e.value?e.unref(L)("chart.modalMarker.save"):e.unref(L)("chart.contextMenu.addMarker")),9,Ks)])])])])):e.createCommentVNode("",!0)],64))}}),en={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (optional)"},zoom:{doubleClickToReset:"(Double-click to reset)"},csv:{chartTitle:"Chart Title",chartSubtitle:"Chart Subtitle",generated:"Generated"},fallback:{item:"Item",axis:"Axis"},tooltip:{flags:"Flags",markers:"Markers",manualFlags:"Manual Flags",autoFlags:"Auto Flags"}},tn={chart:en},an={contextMenu:{addMarker:"Ajouter un marqueur",clearAllMarkers:"Effacer tous les marqueurs",downloadSvg:"Télécharger SVG",downloadPng:"Télécharger PNG",downloadCsv:"Télécharger CSV"},modalMarker:{editMarker:"Modifier le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Prévisualisation de l'icône",deleteMarker:"Suprimer le marqueur",cancel:"Annuler",save:"Sauvegarder",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (optionnel)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Objet",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},on={chart:an},ln={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Wis alle markers",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",title:"Titel",description:"Beschrijving",iconType:"Icoon Type",defaultIcon:"Standaard Logo",iconPreview:"Icoon Voorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",save:"Opslaan",placeholderTitle:"Voer marker titel in",placeholderDescription:"Voer marker beschrijving in (optioneel)"},zoom:{doubleClickToReset:"(Dubbelklik om te resetten)"},csv:{chartTitle:"Grafiek Titel",chartSubtitle:"Grafiek Ondertitel",generated:"Gegenereerd"},fallback:{item:"Item",axis:"As"},tooltip:{flags:"Vlaggen",markers:"Markeringen",manualFlags:"Handmatige Vlaggen",autoFlags:"Automatische Vlaggen"}},sn={chart:ln},Pe={en:tn,fr:on,nl:sn};function nn(K){if(!K||!K.global)return;const L=K.global.availableLocales||[];Object.keys(Pe).forEach(fe=>{L.includes(fe)?K.global.mergeLocaleMessage(fe,Pe[fe]):console.error(`⊗ Skipped DSP translations for: ${fe} (not in app)`)})}Kt.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:Pe});exports.DSSChart=Js;exports.DSSChartMessages=Pe;exports.addDSSChartTranslations=nn;
73
+ `,t+="Category",p.series.forEach(n=>{const c=n.name.replace(/"/g,'""');t+=',"'+c+'"'}),t+=`
74
+ `;const o=Math.max(...p.series.map(n=>n.data?.length||0));for(let n=0;n<o;n++){let u='"'+(p.categories[n]||D("chart.fallback.item",{number:n+1})).toString().replace(/"/g,'""')+'"';p.series.forEach(d=>{const h=d.data&&d.data[n]!==void 0?d.data[n]:"";u+=","+h}),t+=u+`
75
+ `}const a=new Blob([t],{type:"text/csv;charset=utf-8;"}),l=URL.createObjectURL(a),s=document.createElement("a");s.href=l,s.download=Xe("csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(l),ve()}catch(t){console.error("Error downloading CSV:",t)}},ja=t=>{if(typeof t.action=="function"){const o={series:p.series,categories:p.categories,markers:T.value},a={chartX:H.value.chartX,chartY:H.value.chartY,dataX:H.value.mouseDataX,dataY:H.value.mouseDataY,categoryIndex:clampedCategoryIndex||H.value.categoryIndex};t.action(o,a)}ve()},Ua=()=>{xe(),L.value.show=!0,ve()},Dt=t=>{if(H.value.show){const o=document.querySelector(".dss-context-menu");o&&!o.contains(t.target)&&(H.value.show=!1)}},at=t=>{H.value.show&&!t.target.closest(".context-menu")&&(H.value.show=!1)},Lt=t=>{if(!W.value||!Ce.value)return;t.preventDefault(),t.stopPropagation(),m.value.isZooming=!0,B.value.show=!1,m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout);const a=t.currentTarget.getBoundingClientRect(),l=t.clientX-a.left,s=t.clientY-a.top;if(l<i.value.left-50||l>i.value.right+50||s<i.value.top-50||s>i.value.bottom+100){m.value.isZooming=!1;return}const n=t.deltaY>0?.9:1.1,c=Math.max(m.value.minScale,Math.min(m.value.maxScale,m.value.scale*n));if(c!==m.value.scale){const{minX:r,maxX:u}=Z.value,d=u-r||1,h=d/m.value.scale,v=r-m.value.offsetX/i.value.width*d,E=(l-i.value.left)/i.value.width,M=v+E*h;m.value.scale=c;const S=d/m.value.scale,C=M-E*S;m.value.offsetX=-(C-r)/d*i.value.width,m.value.scale<=1.01&&(m.value.scale=1,m.value.offsetX=0)}m.value.zoomTimeout=setTimeout(()=>{m.value.isZooming=!1,m.value.zoomTimeout=null},300)},Wa=t=>{if(!W.value||!Ce.value||m.value.scale<=1)return;B.value.show=!1;const a=t.currentTarget.getBoundingClientRect();t.clientX-a.left,t.clientY-a.top,m.value.isDragging=!0,m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY,t.preventDefault()},qa=()=>{m.value.isDragging=!1},ot=()=>{!W.value||!Ce.value||(m.value.scale=1,m.value.offsetX=0,m.value.isDragging=!1,m.value.zoomTimeout&&(clearTimeout(m.value.zoomTimeout),m.value.zoomTimeout=null),m.value.isZooming=!1)},Ga=()=>!W.value||!tt.value||!Ce.value?"default":m.value.isDragging?"grabbing":m.value.scale>1?"grab":"dss-crosshair",lt=t=>{if(t.length<2)return"";if(t.length===2)return`M ${t[0].x} ${t[0].y} L ${t[1].x} ${t[1].y}`;let o=`M ${t[0].x} ${t[0].y}`;for(let a=0;a<t.length-1;a++){const l=t[Math.max(a-1,0)],s=t[a],n=t[a+1],c=t[Math.min(a+2,t.length-1)],r=s.x+(n.x-l.x)/6*Ae.value,u=s.y+(n.y-l.y)/6*Ae.value,d=n.x-(c.x-s.x)/6*Ae.value,h=n.y-(c.y-s.y)/6*Ae.value;o+=` C ${r} ${u} ${d} ${h} ${n.x} ${n.y}`}return o},ge=e.computed(()=>{let o=50+(Ue.value?30:0)+60;if(be.value)return{left:90,top:90,right:90,bottom:90};let a=0;return G.value&&(a+=15),J.value&&(a+=10),{left:66,top:50+a,right:50,bottom:o}}),i=e.computed(()=>({left:ge.value.left,top:ge.value.top,right:Q.value-ge.value.right,bottom:se.value-ge.value.bottom,width:Q.value-(ge.value.left+ge.value.right),height:se.value-(ge.value.top+ge.value.bottom)})),W=e.computed(()=>["line","area","bar"].includes(X.value)||mt.value),Me=e.computed(()=>mt.value),we=e.computed(()=>["radial","semi-radial"].includes(X.value)),be=e.computed(()=>X.value==="spider"),P=e.computed(()=>X.value==="bubble"),Ie=e.computed(()=>f.value?.chart?.orientation==="horizontal"&&(X.value==="bar"||Me.value)),zt=t=>{const{minY:o,maxY:a}=Z.value,l=a-o||1;return i.value.left+(t-o)/l*i.value.width},Nt=t=>{const{maxX:o}=Z.value,a=o+1,s=i.value.height/a;return i.value.top+(t+.5)*s},Y=e.computed(()=>Q.value/2),R=e.computed(()=>be.value?se.value/2-40:se.value/2),F=e.computed(()=>{if(be.value){const t=i.value.width-80,o=i.value.height-80;return Math.min(t,o)/2}return Math.min(i.value.width,i.value.height)/2}),ee=e.computed(()=>F.value*.45),st=e.computed(()=>f.value?.bubbles?.minSize||8),Ht=e.computed(()=>f.value?.bubbles?.maxSize||50),At=e.computed(()=>f.value?.bubbles?.opacity||.7),Ft=(t,o)=>{const a=[15,20,25,18,22],l=a[t%a.length]||20,s=1+Math.sin(o*.5)*.2;return Math.max(5,l*s)},Ka=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.opacity="1")},Qa=t=>{const o=document.querySelector(`.dss-bubble-image-${t}`);o&&(o.style.display="none")},ye=e.computed(()=>p.series),ke=e.computed(()=>p.series.filter((t,o)=>!I.value.has(o))),pe="auto",Z=e.computed(()=>{if(P.value)return Ja();if(!ke.value.length)return{minX:0,maxX:1,minY:0,maxY:1};let t=1/0,o=-1/0,a=0;ke.value.forEach(r=>{r.data&&r.data.length&&(a=Math.max(a,r.data.length-1),r.data.forEach(u=>{typeof u=="number"&&(t=Math.min(t,u),o=Math.max(o,u))}))}),p.categories.length>0&&(a=Math.max(a,p.categories.length-1)),t===1/0&&(t=0,o=100);const l=ea.value,s=ta.value;let n,c;if(l===pe){const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}else if(typeof l=="number")n=l;else{const r=o-t,u=r>0?r*.1:1;n=Math.max(0,t-u)}if(s===pe){const r=o-t,u=r>0?r*.1:2;c=o+u}else if(typeof s=="number")c=s;else{const r=o-t,u=r>0?r*.1:2;c=o+u}return{minX:0,maxX:a,minY:n,maxY:c}}),Ja=()=>{if(!ke.value.length)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};let t=1/0,o=-1/0,a=1/0,l=-1/0,s=1/0,n=-1/0,c=!1;if(ke.value.forEach((d,h)=>{d?.data?.length&&d.data.forEach((v,E)=>{let M,S,C;if(typeof v=="object"&&v!==null&&!Array.isArray(v))M=typeof v.x=="number"?v.x:E,S=typeof v.y=="number"?v.y:0,C=typeof v.size=="number"?v.size:20;else if(Array.isArray(v)&&v.length>=3)M=typeof v[0]=="number"?v[0]:E,S=typeof v[1]=="number"?v[1]:0,C=typeof v[2]=="number"?v[2]:20;else if(typeof v=="number")M=E,S=v,C=Ft(h,E);else return;isFinite(M)&&isFinite(S)&&isFinite(C)&&(t=Math.min(t,M),o=Math.max(o,M),a=Math.min(a,S),l=Math.max(l,S),s=Math.min(s,C),n=Math.max(n,C),c=!0)})}),!c)return{minX:0,maxX:8,minY:0,maxY:50,minSize:10,maxSize:30};t===o&&(t=Math.min(t,0),o=Math.max(o,p.categories?.length-1||8)),a===l&&(a=Math.max(0,a-10),l=a+20);const r=o-t,u=l-a;return{minX:t-r*.1,maxX:o+r*.1,minY:a-u*.1,maxY:l+u*.1,minSize:s,maxSize:n}},q=t=>{if(P.value){const{minX:r,maxX:u}=Z.value,d=u-r||1;return i.value.left+(t-r)/d*i.value.width}const{minX:o,maxX:a}=Z.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/i.value.width*l,c=(t-n)/s;return i.value.left+c*i.value.width},oe=t=>{const{minY:o,maxY:a}=Z.value,l=a-o||1;return i.value.bottom-(t-o)/l*i.value.height},eo=t=>{if(!P.value)return te.value||4;const{minSize:o,maxSize:a}=Z.value,l=a-o||1;if(l===0)return(st.value+Ht.value)/2;const s=(t-o)/l;return st.value+s*(Ht.value-st.value)},to=e.computed(()=>Xt.value.map(t=>({y:t.y}))),nt=e.computed(()=>{if(P.value)return ao();if(X.value==="bar"){const S=[],{maxX:C}=Z.value,$=C+1,_=5,V=(i.value.width-_*2)/$;for(let y=0;y<=C;y++){const k=i.value.left+_+(y+.5)*V;S.push({x:k,y:i.value.bottom+20,text:p.categories[y]||D("chart.fallback.item",{number:y+1})})}return S}const t=[],{minX:o,maxX:a}=Z.value,l=a-o||1,s=l/m.value.scale,n=o-m.value.offsetX/i.value.width*l,c=n+s,r=Math.max(0,Math.floor(n-2)),u=Math.min(a,Math.ceil(c+2)),d=u-r,h=i.value.width,E=Math.floor(h/60);let M=1;d>E&&(M=Math.ceil(d/E));for(let S=r;S<=u;S+=M)if(S>=0&&S<=a){const C=q(S);C>=i.value.left-100&&C<=i.value.right+100&&t.push({x:C,y:i.value.bottom+20,text:p.categories[S]||`Item ${S+1}`})}return t}),ao=()=>{const t=[],{minX:o,maxX:a}=Z.value,l=a-o||1,s=Math.min(8,Math.max(4,Math.floor(i.value.width/80)));for(let n=0;n<=s;n++){const c=o+l*n/s,r=q(c);if(r>=i.value.left-10&&r<=i.value.right+10){const u=Math.round(c),d=p.categories?.[u];t.push({x:r,y:i.value.bottom+20,text:d||(Number.isInteger(c)?c.toString():c.toFixed(1))})}}return t},Xt=e.computed(()=>{if(Ie.value){const s=[],{maxX:n}=Z.value;for(let c=0;c<=n;c++)s.push({x:i.value.left-10,y:Nt(c),text:p.categories[c]||`Item ${c+1}`});return s}const t=[],{minY:o,maxY:a}=Z.value,l=5;for(let s=0;s<=l;s++){const n=o+(a-o)*(s/l),c=Math.round(n);t.push({x:i.value.left-10,y:oe(n),text:c.toString()})}return t}),j=t=>{const o=sa.value;if(!o||o.length===0){const a=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#F97316","#06B6D4","#84CC16"];return a[t%a.length]}return o[t%o.length]},It=t=>{let o=0;for(let a=1;a<t.length;a++){const l=t[a].x-t[a-1].x,s=t[a].y-t[a-1].y;o+=Math.sqrt(l*l+s*s)}return o},Tt=e.computed(()=>X.value==="line"||Me.value?(Me.value?p.series.filter(o=>(o.type||X.value)==="line"):ye.value).map((o,a)=>{const l=p.series.findIndex(h=>h===o),s=o.data.map((h,v)=>({x:Ie.value?zt(h):q(v),y:Ie.value?Nt(v):oe(h)}));let n="";s.length>0&&(re.value?n=lt(s):n=`M ${s[0].x} ${s[0].y}`+s.slice(1).map(h=>` L ${h.x} ${h.y}`).join(""));const c=It(s),r=I.value.has(l),u=b.value===l,d=b.value!==null&&b.value!==l;return{path:n,color:j(l),pathLength:c,seriesIndex:l,animationDelay:a*me.value,isHighlighted:u,isDimmed:d,isHidden:r}}):[]),oo=e.computed(()=>{if(X.value!=="line")return[];const t=[];return ye.value.forEach((o,a)=>{const l=b.value===a,s=b.value!==null&&b.value!==a,n=I.value.has(a);o.data.forEach((c,r)=>{t.push({x:q(r),y:oe(c),color:j(a),value:c,label:p.categories[r]||r.toString(),seriesName:o.name,categoryIndex:r,dataIndex:r,animationDelay:(a*o.data.length+r)*(me.value/8),isHighlighted:l,isDimmed:s,isHidden:n})})}),t}),Te=e.computed(()=>{if(!P.value)return[];const t=[];return ye.value.forEach((o,a)=>{if(!o?.data?.length)return;const l=b.value,s=l!==null&&l===a,n=l!==null&&l!==a,c=I.value.has(a);o.data.forEach((r,u)=>{let d,h,v,E,M;if(typeof r=="object"&&r!==null&&!Array.isArray(r))d=typeof r.x=="number"?r.x:u,h=typeof r.y=="number"?r.y:0,v=typeof r.size=="number"?r.size:20,E=r.label||p.categories?.[u]||`Point ${u+1}`,M=r.image||r.imageUrl;else if(Array.isArray(r)&&r.length>=3)d=typeof r[0]=="number"?r[0]:u,h=typeof r[1]=="number"?r[1]:0,v=typeof r[2]=="number"?r[2]:20,E=r[3]||p.categories?.[u]||`Point ${u+1}`,M=r[4];else if(typeof r=="number")d=u,h=r,v=Ft(a,u),E=p.categories?.[u]||`Point ${u+1}`;else return;!isFinite(d)||!isFinite(h)||!isFinite(v)||t.push({x:q(d),y:oe(h),radius:eo(v),originalX:d,originalY:h,originalSize:v,color:j(a),seriesName:o.name||`Series ${a+1}`,label:E,imageUrl:M,seriesIndex:a,dataIndex:u,categoryIndex:Math.round(d),isHighlighted:s,isDimmed:n,isHidden:c,opacity:At.value})})}),t}),rt=e.computed(()=>X.value!=="area"?[]:ye.value.map((t,o)=>{const a=t.data.map((h,v)=>({x:q(v),y:oe(h)}));if(a.length===0)return{linePath:"",areaPath:"",color:j(o),isHidden:I.value.has(o)};let l=`M ${a[0].x} ${a[0].y}`;re.value&&a.length>1?l=lt(a):a.slice(1).forEach(h=>{l+=` L ${h.x} ${h.y}`});const s=i.value.bottom+1;let n=`M ${a[0].x} ${s}`;if(n+=` L ${a[0].x} ${a[0].y}`,re.value&&a.length>1){const h=lt(a),v=h.substring(h.indexOf("C")||h.indexOf("Q")||h.indexOf("L"));v?n+=" "+v:a.slice(1).forEach(E=>{n+=` L ${E.x} ${E.y}`})}else a.slice(1).forEach(h=>{n+=` L ${h.x} ${h.y}`});n+=` L ${a[a.length-1].x} ${s} Z`;const c=b.value===o,r=b.value!==null&&b.value!==o,u=I.value.has(o),d=It(a);return{linePath:l,areaPath:n,color:j(o),pathLength:d,isHighlighted:c,isDimmed:r,isHidden:u}})),Yt=e.computed(()=>{if(!(["bar"].includes(X.value)||Me.value))return[];const t=[],{maxX:o}=Z.value,a=Me.value?p.series.filter(s=>(s.type||X.value)==="bar"):ye.value,l=a.length;if(Ie.value){const s=o+1,c=i.value.height/s,r=c*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=p.series.findIndex(_=>_===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((_,g)=>{const k=i.value.top+(g+.5)*c-r/2+E*u+d/2,w=i.value.left,x=Math.abs(zt(_)-i.value.left);let z="";if(re.value&&x>0){const A=Math.min(pt.value,h/2,x/2);z=[`M ${w} ${k}`,`L ${w+x-A} ${k}`,`Q ${w+x} ${k} ${w+x} ${k+A}`,`L ${w+x} ${k+h-A}`,`Q ${w+x} ${k+h} ${w+x-A} ${k+h}`,`L ${w} ${k+h}`,"Z"].join(" ")}t.push({x:w,y:k,width:x,height:h,color:j(M),value:_,label:p.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}else{const s=o+1,c=i.value.width/s,r=c*.8,u=r/l,d=u*.05,h=u-d;a.forEach((v,E)=>{const M=p.series.findIndex(_=>_===v),S=b.value===M,C=b.value!==null&&b.value!==M,$=I.value.has(M);v.data.forEach((_,g)=>{const k=i.value.left+(g+.5)*c-r/2+E*u+d/2,w=oe(Math.max(0,_)),x=Math.abs(oe(0)-oe(_));let z="";if(re.value&&x>0){const A=Math.min(pt.value,h/2,x/2);z=[`M ${k} ${w+x}`,`L ${k} ${w+A}`,`Q ${k} ${w} ${k+A} ${w}`,`L ${k+h-A} ${w}`,`Q ${k+h} ${w} ${k+h} ${w+A}`,`L ${k+h} ${w+x}`,"Z"].join(" ")}t.push({x:k,y:w,width:h,height:x,color:j(M),value:_,label:p.categories[g]||g.toString(),seriesName:v.name,animationDelay:(E*a.length+g)*(me.value/4),isHighlighted:S,isDimmed:C,isHidden:$,barPath:z,isSmooth:re.value&&x>0})})})}return t}),Rt=e.computed(()=>{if(!we.value)return[];const t=ye.value.map((n,c)=>({series:n,originalIndex:c})).filter(({originalIndex:n})=>!I.value.has(n));if(t.length===0)return[];let o=X.value==="semi-radial"?Math.PI:-Math.PI/2;const a=X.value==="semi-radial"?Math.PI:Math.PI*2,l=[];if(t.length===1){const{series:n,originalIndex:c}=t[0],r=n.data[0]||0,u=o,d=o+a-.001,h=u+a/2,v=Y.value+Math.cos(u)*ee.value,E=R.value+Math.sin(u)*ee.value,M=Y.value+Math.cos(d)*ee.value,S=R.value+Math.sin(d)*ee.value,C=Y.value+Math.cos(d)*F.value,$=R.value+Math.sin(d)*F.value,_=Y.value+Math.cos(u)*F.value,g=R.value+Math.sin(u)*F.value,V=1,y=[`M ${v} ${E}`,`A ${ee.value} ${ee.value} 0 ${V} 1 ${M} ${S}`,`L ${C} ${$}`,`A ${F.value} ${F.value} 0 ${V} 0 ${_} ${g}`,"Z"].join(" ");return l.push({path:y,color:j(c),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===c,isDimmed:!1,isHidden:!1,startAngle:u,endAngle:d,midAngle:h}),l}const s=t.reduce((n,{series:c})=>n+(c.data[0]||0),0);return s===0?[]:(t.forEach(({series:n,originalIndex:c})=>{const r=n.data[0]||0,u=r/s*a,d=o,h=o+u,v=d+u/2,E=Y.value+Math.cos(d)*ee.value,M=R.value+Math.sin(d)*ee.value,S=Y.value+Math.cos(h)*ee.value,C=R.value+Math.sin(h)*ee.value,$=Y.value+Math.cos(h)*F.value,_=R.value+Math.sin(h)*F.value,g=Y.value+Math.cos(d)*F.value,V=R.value+Math.sin(d)*F.value,y=u>Math.PI?1:0,k=[`M ${E} ${M}`,`A ${ee.value} ${ee.value} 0 ${y} 1 ${S} ${C}`,`L ${$} ${_}`,`A ${F.value} ${F.value} 0 ${y} 0 ${g} ${V}`,"Z"].join(" ");l.push({path:k,color:j(c),value:r,seriesName:n.name,opacity:.8,isHighlighted:b.value===c,isDimmed:b.value!==null&&b.value!==c,isHidden:!1,startAngle:d,endAngle:h,midAngle:v}),o=h}),l)}),lo=e.computed(()=>!wt.value||!we.value?[]:Rt.value.map((t,o)=>{if(t.isHidden)return null;const a=Ca.value,l=xa.value,s=Ma.value,n=Y.value+Math.cos(t.midAngle)*F.value,c=R.value+Math.sin(t.midAngle)*F.value,r=Y.value+Math.cos(t.midAngle)*(F.value+a),u=R.value+Math.sin(t.midAngle)*(F.value+a),d=Math.cos(t.midAngle)>=0,v=r+l*(d?1:-1),E=u,M=d?r+15:r-15,S=E-s,C=d?"start":"end";return{pointerStartX:n,pointerStartY:c,pointerEndX:r,pointerEndY:u,horizontalEndX:v,horizontalEndY:E,textX:M,textY:S,text:`${t.seriesName}: ${t.value}`,color:t.color,textAnchor:C,isRightSide:d,isHighlighted:t.isHighlighted,isDimmed:t.isDimmed}}).filter(Boolean)),so=t=>{if(!t||t.isHidden)return 0;const o=t.opacity||At.value||.7;return b.value===null||b.value===void 0?o:b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):Math.max(.5,o*.8):o},no=t=>{if(!t||t.isHidden)return 0;const o=t.radius>20?.9:.8;return b.value!==null?t.seriesIndex===b.value?Math.min(1,o+.1):o*.7:o},Ot=(t,o)=>{if(t)try{if(b.value===t.seriesIndex?b.value=null:b.value=t.seriesIndex,typeof window<"u"&&window.dispatchEvent){const a=new CustomEvent("dss-bubble-click",{detail:{bubble:t,originalEvent:o,chartId:p.chartId}});window.dispatchEvent(a)}}catch(a){console.error("Error in onBubbleClick:",a)}},ro=(t,o)=>{const a=[`dss-bubble-fallback-${o}`];return t.isHighlighted&&a.push("dss-bubble-highlighted"),t.isDimmed&&a.push("dss-bubble-dimmed"),t.isHidden&&a.push("dss-bubble-hidden"),a.push(`dss-bubble-series-${t.seriesIndex}`),a.join(" ")},Pt=(t,o)=>{t&&(o.stopPropagation(),Re.value=!0,b.value=t.seriesIndex,B.value.show=!1)},io=(t,o)=>{let a;switch(t){case"x":a=o.originalX;break;case"y":a=o.originalY;break;case"size":a=o.originalSize;break;case"label":a=o.label;break;case"seriesName":a=o.seriesName;break;default:a=o[t]||""}const l=Ea.value[t];return typeof l=="function"?l(a,o):typeof a=="number"?a.toFixed(1):a?.toString()||""},co=()=>{if(!P.value||!B.value.data||B.value.data.length===0)return"Bubbles";const t=[],o=new Set;return B.value.data.forEach(a=>{if(a.seriesName&&a.label){const l=`${a.seriesName} - ${a.label}`;o.has(l)||(t.push(l),o.add(l))}else a.seriesName&&(o.has(a.seriesName)||(t.push(a.seriesName),o.add(a.seriesName)))}),t.length>0?t.join(" | "):"Bubbles"},Zt=(t,o)=>{t&&(Re.value=!1,b.value=null)},_e=e.computed(()=>p.categories.length||Math.max(...ke.value.map(t=>t.data.length))),uo=e.computed(()=>{let t=0;return ke.value.forEach(o=>{o.data.forEach(a=>{typeof a=="number"&&(t=Math.max(t,a))})}),t||100}),jt=e.computed(()=>{const t=[],o=_e.value;for(let a=0;a<o;a++){const l=a*2*Math.PI/o-Math.PI/2,s=Y.value+Math.cos(l)*F.value,n=R.value+Math.sin(l)*F.value;t.push({x:s,y:n,angle:l,index:a})}return t}),mo=e.computed(()=>{const t=[],o=_e.value;return jt.value.forEach((a,l)=>{const s=F.value+15,n=l*2*Math.PI/o-Math.PI/2,c=Y.value+Math.cos(n)*s,r=R.value+Math.sin(n)*s+5;let u="middle",d="middle";Math.abs(Math.cos(n))>.5&&(u=Math.cos(n)>0?"start":"end"),Math.abs(Math.sin(n))>.5&&(d=Math.sin(n)>0?"hanging":"auto"),t.push({x:c,y:r,text:p.categories[l]||`Axis ${l+1}`,anchor:u,baseline:d})}),t}),ho=e.ref(new Set),vo=(t,o,a)=>{const l=`current-${a}`,s=ho.value.has(l);return!s&&b.value===null?o.fillOpacity||$e.value:o.isHighlighted||s?(o.fillOpacity||$e.value)+.15:o.isDimmed?(o.fillOpacity||$e.value)*.3:o.fillOpacity||$e.value},go=e.computed(()=>{if(!be.value)return[];const t=[],o=_e.value;return ye.value.forEach((a,l)=>{const s=[],n=[],c=b.value===l,r=b.value!==null&&b.value!==l,u=I.value.has(l);for(let d=0;d<o;d++){const h=a.data[d]||0,E=h/uo.value*F.value,M=d*2*Math.PI/o-Math.PI/2,S=Y.value+Math.cos(M)*E,C=R.value+Math.sin(M)*E;s.push(`${S},${C}`),n.push({x:S,y:C,value:h,label:p.categories[d]||`Axis ${d+1}`,seriesName:a.name})}t.push({points:s.join(" "),dataPoints:n,color:j(l),fillOpacity:$e.value,seriesName:a.name,value:`${a.name}: ${a.data.join(", ")}`,isHighlighted:c,isDimmed:r,isHidden:u})}),t}),Ye=e.computed(()=>{const t=f.value;return t.logos.map((o,a)=>{const l=p.series[o.seriesIndex];if(!l||!l.data||l.data.length===0||I.value.has(o.seriesIndex))return null;let s,n;if(W.value){const r=l.data.map((u,d)=>({x:q(d),y:oe(u)}));if(t.animations.enabled&&!Ne.value&&t.animations.type==="draw"&&t.chart.type==="line"&&(N.value.isAnimating||!N.value.hasAnimated))if(N.value.isAnimating){const u=N.value.currentFrame/N.value.totalFrames,d=Ut(t.animations.easing,Math.min(u,1)),h=Eo(r,d);s=h.x+(o.offsetX||0),n=h.y+(o.offsetY||0)}else s=r[0].x+(o.offsetX||0),n=r[0].y+(o.offsetY||0);else{const u=l.data.length-1,d=l.data[u];s=q(u)+(o.offsetX||0),n=oe(d)+(o.offsetY||0)}}else if(we.value||be.value){const r=Math.PI*2/t.logos.length*a;s=Y.value+Math.cos(r)*(F.value+30)+(o.offsetX||0),n=R.value+Math.sin(r)*(F.value+30)+(o.offsetY||0)}return{...o,x:s,y:n,seriesIndex:o.seriesIndex}}).filter(Boolean)}),po=t=>{const o=document.querySelector(`.dss-logo-fallback-${t}`),a=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.opacity="0"),a&&(a.style.opacity="1")},fo=t=>{console.warn(`Logo ${t} failed to load, keeping fallback circle`);const o=document.querySelector(`.dss-logo-image-${t}`);o&&(o.style.display="none")},yo=t=>{I.value.has(t)?I.value.delete(t):I.value.add(t)},ko=e.computed(()=>{if(!O.value.show&&!(ue.value&&B.value.show&&!m.value.isZooming))return{display:"none"};let t,o;if(ue.value&&B.value.show&&!m.value.isZooming){t=B.value.x+15,o=i.value.top;const a=P.value?200:150;t+a>Q.value&&(t=B.value.x-a-15),t<0&&(t=10),o<10&&(o=10)}else t=O.value.x,o=O.value.y;return{left:t+"px",top:o+"px"}}),ie=(t,o)=>{if(De.value)return;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+10,n=o.clientY-l.top-10;const c=200,r=120,u=Q.value,d=se.value;s+c>u&&(s=o.clientX-l.left-c-10),n+r>d&&(n=o.clientY-l.top-r-10),s<0&&(s=10),n<0&&(n=10);let h;typeof t.categoryIndex=="number"?h=t.categoryIndex:typeof t.dataIndex=="number"?h=t.dataIndex:t.label&&p.categories.includes(t.label)&&(h=p.categories.indexOf(t.label)),O.value={show:!0,x:s,y:n,title:t.seriesName||t.label||"",value:t.value?.toString()||"",categoryIndex:h}},it=e.ref(!1),Re=e.ref(!1),ce=()=>{O.value.show=!1,B.value.show=!1,it.value||(b.value=null)},De=e.ref(!1),Le=(t,o)=>{De.value=!0,O.value.show=!1,B.value.show=!1;const l=o.target.closest(".dss-custom-chart-container").getBoundingClientRect();let s=o.clientX-l.left+15,n=o.clientY-l.top-10;const c=250;s+c>Q.value&&(s=o.clientX-l.left-c-15),s<0&&(s=10),n<0&&(n=10),et.value={show:!0,x:s,y:n,content:t.texts,count:t.totalCount}},ze=()=>{De.value=!1,et.value.show=!1},N=e.ref({isAnimating:!1,currentFrame:0,totalFrames:0,animationId:null,hasAnimated:!1}),Ut=(t,o)=>{switch(t){case"linear":return o;case"ease":return o<.5?2*o*o:-1+(4-2*o)*o;case"ease-in":return o*o;case"ease-out":return o*(2-o);case"ease-in-out":return o<.5?2*o*o:-1+(4-2*o)*o;default:return o}},Ne=e.computed(()=>ra.value?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1),Wt=()=>{if(!Se.value||Ne.value){N.value.hasAnimated=!0;return}N.value.isAnimating=!0,N.value.currentFrame=0,N.value.totalFrames=Math.ceil(yt.value/16.67);const t=()=>{const o=N.value.currentFrame/N.value.totalFrames,a=Ut(Ct.value,Math.min(o,1));Co(a),o<1?(N.value.currentFrame++,N.value.animationId=requestAnimationFrame(t)):xo()};N.value.animationId=requestAnimationFrame(t)},Co=t=>{const o=document.querySelector(".dss-custom-chart-container");o&&o.style.setProperty("--dss-animation-progress",t)},xo=()=>{N.value.isAnimating=!1,N.value.hasAnimated=!0,N.value.animationId&&(cancelAnimationFrame(N.value.animationId),N.value.animationId=null)},Mo=e.computed(()=>{if(!Se.value||Ne.value||N.value.hasAnimated)return{};const t={};return t["--dss-animation-duration"]=`${yt.value}ms`,t["--dss-animation-easing"]=wo(Ct.value),t["--dss-stagger-delay"]=`${me.value}ms`,t}),wo=t=>({linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"})[t]||"ease-out",bo=()=>{if(!Se.value||Ne.value)return"";const t=["dss-chart-animated"];return N.value.hasAnimated||t.push(`dss-animate-${ft.value}`),N.value.hasAnimated||(we.value?t.push("dss-animate-fill"):t.push(`dss-animate-${ft.value}`)),N.value.isAnimating&&t.push("dss-is-animating"),t.join(" ")};e.watch(()=>p.series,(t,o)=>{na.value&&o&&N.value.hasAnimated&&(N.value.hasAnimated=!1,e.nextTick(()=>{setTimeout(()=>Wt(),kt.value)}))},{deep:!0}),e.watch(()=>m.value.isZooming,(t,o)=>{o&&!t&&setTimeout(()=>{St()},50)}),e.watch(()=>[m.value.scale,m.value.offsetX],()=>{!m.value.isZooming&&!m.value.isDragging&&St()},{flush:"post"}),e.watch([oa,la],([t,o])=>{m.value.minScale=t,m.value.maxScale=o,(m.value.scale<t||m.value.scale>o)&&ot()},{immediate:!0}),e.watch(()=>p.locale,t=>{t&&t!==ct.value&&(ct.value=t)},{immediate:!0}),e.watch(()=>H.value.show,t=>{t?e.nextTick(()=>{document.addEventListener("click",at)}):document.removeEventListener("click",at)}),e.onMounted(()=>{b.value=null,Ta(),Se.value&&!Ne.value?setTimeout(()=>Wt(),kt.value):N.value.hasAnimated=!0,document.addEventListener("mousemove",qt),document.addEventListener("mouseup",Gt),document.addEventListener("click",Dt)}),e.onUnmounted(()=>{N.value.animationId&&cancelAnimationFrame(N.value.animationId),m.value.zoomTimeout&&clearTimeout(m.value.zoomTimeout),document.removeEventListener("mousemove",qt),document.removeEventListener("mouseup",Gt),document.removeEventListener("click",Dt),document.removeEventListener("click",at)});const qt=t=>{if(m.value.isDragging&&m.value.scale>1&&W.value){B.value.show=!1;const o=t.clientX-m.value.lastMouseX,{minX:a,maxX:l}=Z.value,s=l-a||1,c=o*.8;m.value.offsetX+=c;const r=s/m.value.scale,u=s-r,d=0,h=-u/s*i.value.width,v=d;m.value.offsetX=Math.max(h,Math.min(v,m.value.offsetX)),m.value.lastMouseX=t.clientX,m.value.lastMouseY=t.clientY}},Gt=()=>{m.value.isDragging&&(m.value.isDragging=!1,setTimeout(()=>{!m.value.isDragging&&m.value.isZooming},100))},Eo=(t,o)=>{if(!t||t.length===0)return{x:0,y:0};if(t.length===1||o<=0)return t[0];if(o>=1)return t[t.length-1];let a=0;const l=[];for(let c=1;c<t.length;c++){const r=t[c].x-t[c-1].x,u=t[c].y-t[c-1].y,d=Math.sqrt(r*r+u*u);l.push(d),a+=d}const s=a*o;let n=0;for(let c=0;c<l.length;c++){const r=n+l[c];if(s<=r){const u=(s-n)/l[c],d=t[c],h=t[c+1];return{x:d.x+(h.x-d.x)*u,y:d.y+(h.y-d.y)*u}}n=r}return t[t.length-1]};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["dss-custom-chart-container",bo()]),style:e.normalizeStyle({width:Q.value+"px",height:se.value+20+"px",...Mo.value,cursor:Ga()}),"data-chart-type":X.value,onWheel:Lt,onMousedown:Wa,onMousemove:$a,onMouseup:qa,onMouseleave:Va,onDblclick:ot,onContextmenu:e.withModifiers(_a,["prevent"]),onClick:e.withModifiers(ve,["left"]),onWheelCapture:Lt},[e.createElementVNode("div",Vo,[e.createElementVNode("div",_o,[G.value?(e.openBlock(),e.createElementBlock("div",Do,e.toDisplayString(G.value),1)):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",Lo,e.toDisplayString(J.value),1)):e.createCommentVNode("",!0)]),He.value?(e.openBlock(),e.createElementBlock("div",zo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.series,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`legend-${l}`,class:e.normalizeClass(["dss-legend-item",{"dss-legend-hidden":I.value.has(l),"dss-legend-hovered":b.value===l,"dss-legend-dimmed":b.value!==null&&b.value!==l}]),onClick:s=>yo(l),onMouseenter:s=>Ba(l),onMouseleave:Sa,style:e.normalizeStyle({animationDelay:`${l*100}ms`})},[e.createElementVNode("div",{class:"dss-legend-color",style:e.normalizeStyle({backgroundColor:j(l)})},null,4),e.createElementVNode("span",Ho,e.toDisplayString(a.name),1)],46,No))),128))])):e.createCommentVNode("",!0)]),(e.openBlock(),e.createElementBlock("svg",{width:Q.value,height:se.value,class:"dss-chart-svg","data-smooth":re.value,"data-animated":Se.value},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Fo,[e.createElementVNode("rect",{x:i.value.left,y:i.value.top,width:i.value.width,height:i.value.height*4},null,8,Xo)])]),W.value||P.value?(e.openBlock(),e.createElementBlock("g",Io,[vt.value?(e.openBlock(),e.createElementBlock("g",To,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(to.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`h-grid-${l}`,x1:i.value.left,x2:i.value.right,y1:a.y,y2:a.y,stroke:"#e0e0e0","stroke-width":"1","stroke-dasharray":"4,2",style:e.normalizeStyle({animationDelay:`${l*50}ms`})},null,12,Yo))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ro,[e.createElementVNode("line",{x1:i.value.left,x2:i.value.right,y1:i.value.bottom,y2:i.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Oo),e.createElementVNode("line",{x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:"#ccc","stroke-width":"1"},null,8,Po)]),e.createElementVNode("g",Zo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nt.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`x-${l}`,x:a.x,y:a.y,"text-anchor":"middle","font-size":"12",fill:"#666",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},e.toDisplayString(a.text),13,jo))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xt.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`y-${l}`,x:a.x,y:a.y,"text-anchor":"end","font-size":"12",fill:"#666","dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*80}ms`})},e.toDisplayString(a.text),13,Uo))),128)),Ue.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.value.left+i.value.width/2,y:i.value.bottom+45,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333"},e.toDisplayString(Ue.value),9,Wo)):e.createCommentVNode("",!0),ht.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:15,y:i.value.top+12+i.value.height/2,"text-anchor":"middle","font-size":"14","font-weight":"bold",fill:"#333",transform:`rotate(-90, 15, ${i.value.top+i.value.height/2})`},e.toDisplayString(ht.value),9,qo)):e.createCommentVNode("",!0)]),bt.value.length>0?(e.openBlock(),e.createElementBlock("g",Go,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bt.value,a=>(e.openBlock(),e.createElementBlock("g",{key:`flag-group-${a.categoryIndex}`},[e.createElementVNode("g",Ko,[a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:i.value.bottom,y2:i.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>Le(a,l),onMouseleave:ze},null,40,Qo)):e.createCommentVNode("",!0),a.hasAuto&&!a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:i.value.bottom,y2:i.value.top,stroke:"#0dbf89","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>Le(a,l),onMouseleave:ze},null,40,Jo)):e.createCommentVNode("",!0),a.hasAuto&&a.hasManual?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:i.value.bottom,y2:i.value.top,stroke:"#047395","stroke-width":"2","stroke-dasharray":"8",opacity:"0.9",class:"dss-flag-line",onMouseover:l=>Le(a,l),onMouseleave:ze},null,40,el)):e.createCommentVNode("",!0)]),a.hasManual&&a.hasAuto?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x+8,cy:Math.max(15,i.value.top-10),r:"14",fill:"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"flag-count-circle",onMouseover:l=>Le(a,l),onMouseleave:ze},null,40,tl)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:a.x,cy:Math.max(15,i.value.top-10),r:"14",fill:a.hasManual&&a.hasAuto||a.hasManual?"#047395":"#0dbf89",stroke:"#fafafa","stroke-width":"2",class:"dss-flag-count-indicator",onMouseover:l=>Le(a,l),onMouseleave:ze},null,40,al),e.createElementVNode("text",{x:a.x,y:Math.max(15,i.value.top-5),"text-anchor":"middle","font-size":"12","font-weight":"bold",fill:"#fafafa",class:"dss-flag-count-text","pointer-events":"none"},e.toDisplayString(a.totalCount),9,ol)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",ll,[Me.value?(e.openBlock(),e.createElementBlock("g",sl,[e.createElementVNode("g",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yt.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`mixed-bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,rl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,il))],64))),128))]),e.createElementVNode("g",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`mixed-line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,ul))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.mixedLinePoints,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`mixed-point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,dl))),128)):e.createCommentVNode("",!0)])])):X.value==="line"?(e.openBlock(),e.createElementBlock("g",ml,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`line-${l}`,d:a.path,stroke:a.color,"stroke-width":a.isHighlighted?de.value+2:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${a.animationDelay}ms`})},null,14,hl))),128)),te.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(oo.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`point-${l}`,cx:a.x,cy:a.y,r:a.isHighlighted?te.value+2:te.value,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,vl))),128)):e.createCommentVNode("",!0)])):X.value==="area"?(e.openBlock(),e.createElementBlock("g",gl,[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,(a,l)=>(e.openBlock(),e.createElementBlock("mask",{key:`mask-${l}`,id:`area-mask-${l}-${K.chartId}`},[e.createElementVNode("rect",{x:i.value.left-10,y:i.value.top-10,width:i.value.width+20,height:i.value.height+20,fill:"#fafafa",class:"dss-area-mask-rect",style:e.normalizeStyle({"--dss-mask-width":`${i.value.width+20}px`})},null,12,fl)],8,pl))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-fill-${l}`,d:a.areaPath,fill:a.color,"fill-opacity":a.isHighlighted?gt.value+.2:gt.value,mask:`url(#area-mask-${l}-${K.chartId})`,class:e.normalizeClass({"dss-area-fill-smooth":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden})},null,10,yl))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(rt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`area-line-${l}`,d:a.linePath,stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"dss-area-line-animated":!0,"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({"--dss-path-length":a.pathLength,animationDelay:`${l*me.value}ms`})},null,14,kl))),128))])):X.value==="bar"?(e.openBlock(),e.createElementBlock("g",Cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yt.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bar-${l}`},[a.isSmooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.barPath,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,xl)):(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x,y:a.y,width:a.width,height:a.height,fill:a.color,stroke:"#fafafa","stroke-width":"1",class:e.normalizeClass({"dss-bar-highlighted":a.isHighlighted,"dss-bar-dimmed":a.isDimmed,"dss-bar-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${a.animationDelay}ms`}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,Ml))],64))),128))])):e.createCommentVNode("",!0)]),ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("g",wl,[e.createElementVNode("line",{x1:B.value.x,x2:B.value.x,y1:i.value.top,y2:i.value.bottom,stroke:aa.value,"stroke-width":"1","stroke-dasharray":"4,4",opacity:"0.8"},null,8,bl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`dss-crosshair-point-${l}`,cx:B.value.x,cy:a.y,r:te.value+2,fill:a.color,stroke:"#fafafa","stroke-width":"2",opacity:"0.9"},null,8,El))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("g",Bl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`bubble-${l}`},[a?(e.openBlock(),e.createElementBlock("g",Sl,[e.createElementVNode("circle",{cx:a.x,cy:a.y,r:a.radius,fill:a.color,"fill-opacity":so(a),stroke:a.color,"stroke-width":a.isHighlighted?3:1,"stroke-opacity":"0.8",class:e.normalizeClass(ro(a,l)),style:{cursor:"pointer",transition:"all 0.3s ease"},onMouseenter:s=>Pt(a,s),onMouseleave:s=>Zt(a),onClick:s=>Ot(a,s)},null,42,$l),a.imageUrl?(e.openBlock(),e.createElementBlock("image",{key:0,x:a.x-a.radius*.65,y:a.y-a.radius*.65,width:a.radius*1.3,height:a.radius*1.3,"xlink:href":a.imageUrl,class:e.normalizeClass(`dss-bubble-image-${l} ${a.isHighlighted?"dss-bubble-highlighted":""} ${a.isDimmed?"dss-bubble-dimmed":""} ${a.isHidden?"dss-bubble-hidden":""}`),"clip-path":`circle(${a.radius*.65}px at ${a.radius*.65}px ${a.radius*.65}px)`,style:e.normalizeStyle({cursor:"pointer",transition:"all 0.3s ease",opacity:no(a)}),onLoad:s=>Ka(l),onError:s=>Qa(l),onMouseenter:s=>Pt(a,s),onMouseleave:s=>Zt(a),onClick:s=>Ot(a,s)},null,46,Vl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createElementBlock("g",_l,[X.value==="radial"?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Y.value,cy:R.value,r:F.value,fill:"none",stroke:"#e0e0e0","stroke-width":"1"},null,8,Dl)):e.createCommentVNode("",!0),e.createElementVNode("g",{class:"dss-radial-data","data-chart-type":X.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt.value,(a,l)=>(e.openBlock(),e.createElementBlock("path",{key:`radial-${l}`,d:a.path,fill:a.color,"fill-opacity":a.isHighlighted?(a.opacity||.8)+.2:a.opacity||.8,stroke:a.color,"stroke-width":a.isHighlighted?2:1,class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,42,zl))),128))],8,Ll),wt.value?(e.openBlock(),e.createElementBlock("g",Nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lo.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`radial-label-${l}`,class:e.normalizeClass({"dss-label-highlighted":a.isHighlighted,"dss-label-dimmed":a.isDimmed})},[e.createElementVNode("line",{x1:a.pointerStartX,y1:a.pointerStartY,x2:a.pointerEndX,y2:a.pointerEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,Hl),e.createElementVNode("line",{x1:a.pointerEndX,y1:a.pointerEndY,x2:a.horizontalEndX,y2:a.horizontalEndY,stroke:a.color,"stroke-width":"1.5",opacity:"0.8",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},null,12,Al),e.createElementVNode("text",{x:a.textX,y:a.textY,"text-anchor":a.textAnchor,"font-size":ka.value,"dominant-baseline":"middle",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},e.toDisplayString(a.text),13,Fl)],2))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),be.value?(e.openBlock(),e.createElementBlock("g",Xl,[vt.value?(e.openBlock(),e.createElementBlock("g",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-grid-circle-${l}`,cx:Y.value,cy:R.value,r:a,fill:"none",stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*150}ms`})},null,12,Tl))),128)),e.createElementVNode("g",Yl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(We.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-grid-label-group-${l}`},[e.createElementVNode("rect",{x:Y.value-16,y:R.value-a-7,width:"32",height:"16",fill:"#fafafa",stroke:"none"},null,8,Rl),e.createElementVNode("text",{x:Y.value,y:R.value-a+2,"text-anchor":"middle","dominant-baseline":"central",class:"dss-spider-grid-label",style:{fontSize:"10px",fill:"#999",fontWeight:"600"}},e.toDisplayString(ca(l)),9,Ol)]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(jt.value,(a,l)=>(e.openBlock(),e.createElementBlock("line",{key:`spider-axis-${l}`,x1:Y.value,x2:a.x,y1:R.value,y2:a.y,stroke:"#dedede","stroke-width":"1",style:e.normalizeStyle({animationDelay:`${l*100}ms`})},null,12,Pl))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",Zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mo.value,(a,l)=>(e.openBlock(),e.createElementBlock("text",{key:`spider-label-${l}`,x:a.x+Math.cos(l*2*Math.PI/_e.value-Math.PI/2)*16,y:a.y+Math.sin(l*2*Math.PI/_e.value-Math.PI/2)*16,"text-anchor":a.anchor,"dominant-baseline":a.baseline,"font-size":"14px",fill:"#666","font-weight":"500",style:e.normalizeStyle({animationDelay:`${l*120}ms`})},e.toDisplayString(a.text.charAt(0).toUpperCase()+a.text.slice(1)),13,jl))),128))]),e.createElementVNode("g",Ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(go.value,(a,l)=>(e.openBlock(),e.createElementBlock("g",{key:`spider-${l}`},[e.createElementVNode("polygon",{points:a.points,fill:a.color,"fill-opacity":vo("current",a,l),stroke:a.color,"stroke-width":a.isHighlighted?de.value+1:de.value,"stroke-linejoin":"round",class:e.normalizeClass({"dss-series-highlighted":a.isHighlighted,"dss-series-dimmed":a.isDimmed,"dss-series-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value}ms`,transition:"all 0.2s ease"}),onMouseover:s=>ie(a,s),onMouseleave:ce},null,46,Wl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataPoints,(s,n)=>(e.openBlock(),e.createElementBlock("circle",{key:`spider-point-${l}-${n}`,cx:s.x,cy:s.y,r:a.isHighlighted?te.value+1:te.value>0?te.value:0,fill:a.color,stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass({"dss-point-highlighted":a.isHighlighted,"dss-point-dimmed":a.isDimmed,"dss-point-hidden":a.isHidden}),style:e.normalizeStyle({animationDelay:`${l*me.value+n*50}ms`,transition:"all 0.2s ease"}),onMouseover:c=>ie(s,c),onMouseleave:ce},null,46,ql))),128))]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("g",Gl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ye.value,(a,l)=>(e.openBlock(),e.createElementBlock("circle",{key:`logo-fallback-${l}`,cx:a.x,cy:a.y,r:a.width/2,fill:j(a.seriesIndex),stroke:"#fafafa","stroke-width":"2",class:e.normalizeClass(`logo-fallback-${l}`),style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,14,Kl))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ye.value,(a,l)=>(e.openBlock(),e.createElementBlock("image",{key:`logo-${l}`,x:a.x-a.width/2,y:a.y-a.height/2,width:a.width,height:a.height,"xlink:href":a.url,onLoad:s=>po(l),onError:s=>fo(l),class:e.normalizeClass(`dss-logo-image-${l}`),"clip-path":`circle(${a.width/2}px at ${a.width/2}px ${a.height/2}px)`,style:e.normalizeStyle({animationDelay:`${l*200}ms`})},null,46,Ql))),128))])],8,Ao)),Ge.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-watermark",style:e.normalizeStyle({position:"absolute",top:"0px",left:"0px",width:Q.value+"px",height:se.value+"px",backgroundImage:`url('${Mt.value}')`,backgroundRepeat:"no-repeat",...pa.value,opacity:Ke.value,pointerEvents:"none",zIndex:10})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(va.value,(a,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:"marker-"+a.id,class:"dss-chart-marker",style:e.normalizeStyle({position:"absolute",left:a.x+"px",top:a.y+"px",width:xt.value+"px",height:xt.value+"px",backgroundColor:"#fafafa",borderRadius:"50%",border:"2px solid #ddd",cursor:"pointer",zIndex:500}),onClick:e.withModifiers(s=>Xa(a),["stop"])},[e.createElementVNode("img",{src:Bt(a),class:"dss-marker-icon",alt:"Marker Icon",style:{width:"100%",height:"100%","object-fit":"contain","border-radius":"50%","pointer-events":"none"}},null,8,es)],12,Jl)),[[e.vShow,ma.value]])),128)),O.value.show||ue.value&&B.value.show&&!m.value.isZooming?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["dss-chart-tooltip",{"dss-crosshair-tooltip":ue.value&&B.value.show&&!m.value.isZooming}]),style:e.normalizeStyle(ko.value)},[!ue.value||!B.value.show||m.value.isZooming?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",ts,[e.createElementVNode("div",as,e.toDisplayString(O.value.title),1),e.createElementVNode("div",os,e.toDisplayString(O.value.value),1)]),O.value.categoryIndex!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[he(O.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",ls,[o[6]||(o[6]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",ss,e.toDisplayString(e.unref(D)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(O.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-group-${l}`},[e.createElementVNode("div",ns,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",rs,[e.createElementVNode("div",is,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(O.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",cs,[o[7]||(o[7]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",us,e.toDisplayString(e.unref(D)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(O.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`tooltip-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",ds,[e.createElementVNode("div",ms,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",hs,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",vs,[e.createElementVNode("div",gs,e.toDisplayString(P.value?co():K.categories[B.value.categoryIndex]||`Category ${B.value.categoryIndex+1}`),1),P.value?(e.openBlock(),e.createElementBlock("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-bubble-tooltip-item"},e.toDisplayString(a.value),1))),128))])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value.data,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-tooltip-${l}`,class:"dss-tooltip-series"},[e.createElementVNode("div",{class:"dss-tooltip-series-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",fs,e.toDisplayString(a.seriesName)+":",1),e.createElementVNode("span",ys,e.toDisplayString(a.value),1)]))),128))]),he(B.value.categoryIndex).flagGroups.length>0?(e.openBlock(),e.createElementBlock("div",ks,[o[8]||(o[8]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Cs,e.toDisplayString(e.unref(D)("chart.tooltip.flags")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).flagGroups,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-group-${l}`},[e.createElementVNode("div",xs,[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("span",null,e.toDisplayString(a.type),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.flags,(s,n)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-flag-${l}-${n}`,class:"dss-tooltip-item dss-tooltip-item-no-indicator"},[e.createElementVNode("div",Ms,[e.createElementVNode("div",ws,e.toDisplayString(s.text),1)])]))),128))]))),128))])):e.createCommentVNode("",!0),he(B.value.categoryIndex).markers.length>0?(e.openBlock(),e.createElementBlock("div",bs,[o[9]||(o[9]=e.createElementVNode("div",{class:"dss-tooltip-separator"},null,-1)),e.createElementVNode("div",Es,e.toDisplayString(e.unref(D)("chart.tooltip.markers")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(B.value.categoryIndex).markers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`crosshair-dss-marker-${l}`,class:"dss-tooltip-item"},[e.createElementVNode("div",{class:"dss-tooltip-item-indicator",style:e.normalizeStyle({backgroundColor:a.color})},null,4),e.createElementVNode("div",Bs,[e.createElementVNode("div",Ss,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",$s,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))),128))])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0),W.value&&Ce.value&&m.value.scale>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:"dss-zoom-indicator",onClick:ot},[o[10]||(o[10]=e.createElementVNode("span",{style:{display:"inline-block",transform:"scaleX(-1)","font-size":"14px"}},"⌕",-1)),e.createTextVNode(" "+e.toDisplayString(Math.round(m.value.scale*100))+"% "+e.toDisplayString(e.unref(D)("chart.zoom.doubleClickToReset")),1)])):e.createCommentVNode("",!0)],46,$o),H.value.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-chart-context-menu",style:e.normalizeStyle({left:H.value.x+"px",top:H.value.y+"px"}),onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},[ae.value.addMarker?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dss-context-menu-item",onClick:Ua},e.toDisplayString(e.unref(D)("chart.contextMenu.addMarker")),1)):e.createCommentVNode("",!0),T.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-context-menu-item",onClick:Ia},e.toDisplayString(e.unref(D)("chart.contextMenu.clearAllMarkers")),1)):e.createCommentVNode("",!0),ae.value.addMarker&&(ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv||qe.value.length>0)?(e.openBlock(),e.createElementBlock("div",Vs)):e.createCommentVNode("",!0),ae.value.downloadSvg?(e.openBlock(),e.createElementBlock("div",{key:3,class:"dss-context-menu-item",onClick:Oa},e.toDisplayString(e.unref(D)("chart.contextMenu.downloadSvg")),1)):e.createCommentVNode("",!0),ae.value.downloadPng?(e.openBlock(),e.createElementBlock("div",{key:4,class:"dss-context-menu-item",onClick:Pa},e.toDisplayString(e.unref(D)("chart.contextMenu.downloadPng")),1)):e.createCommentVNode("",!0),ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",{key:5,class:"dss-context-menu-item",onClick:Za},e.toDisplayString(e.unref(D)("chart.contextMenu.downloadCsv")),1)):e.createCommentVNode("",!0),qe.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[ae.value.downloadSvg||ae.value.downloadPng||ae.value.downloadCsv?(e.openBlock(),e.createElementBlock("div",_s)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(qe.value,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"custom-"+l},[a.separator?(e.openBlock(),e.createElementBlock("div",Ds)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(La(a)),style:e.normalizeStyle(za(a)),onClick:s=>ja(a)},[a.template?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:Da(a),class:"dss-custom-menu-content"},null,8,zs)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.icon?(e.openBlock(),e.createElementBlock("span",Ns,e.toDisplayString(a.icon),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.label),1)],64))],14,Ls)],64))),128))],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),L.value.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dss-marker-modal-overlay",onClick:xe},[e.createElementVNode("div",{class:"dss-marker-modal",onClick:o[5]||(o[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Hs,[e.createElementVNode("h3",null,e.toDisplayString(Ve.value?e.unref(D)("chart.modalMarker.editMarker"):e.unref(D)("chart.contextMenu.addMarker")),1),e.createElementVNode("button",{class:"dss-modal-close-btn",onClick:xe},"×")]),e.createElementVNode("div",As,[e.createElementVNode("div",Fs,[e.createElementVNode("label",Xs,[e.createTextVNode(e.toDisplayString(e.unref(D)("chart.modalMarker.title"))+" ",1),o[11]||(o[11]=e.createElementVNode("span",{style:{color:"hsl(345, 94%, 44%)"}},"*",-1))]),e.withDirectives(e.createElementVNode("input",{id:"dss-marker-title","onUpdate:modelValue":o[1]||(o[1]=a=>L.value.title=a),type:"text",placeholder:e.unref(D)("chart.modalMarker.placeholderTitle"),class:"dss-form-input",onKeyup:e.withKeys($t,["enter"])},null,40,Is),[[e.vModelText,L.value.title]])]),e.createElementVNode("div",Ts,[e.createElementVNode("label",Ys,e.toDisplayString(e.unref(D)("chart.modalMarker.description")),1),e.withDirectives(e.createElementVNode("textarea",{id:"dss-marker-description","onUpdate:modelValue":o[2]||(o[2]=a=>L.value.description=a),placeholder:e.unref(D)("chart.modalMarker.placeholderDescription"),class:"dss-form-textarea",rows:"3"},null,8,Rs),[[e.vModelText,L.value.description]])]),Et.value.length>1?(e.openBlock(),e.createElementBlock("div",Os,[e.createElementVNode("label",Ps,e.toDisplayString(e.unref(D)("chart.modalMarker.iconType")),1),e.withDirectives(e.createElementVNode("select",{id:"dss-marker-type","onUpdate:modelValue":o[3]||(o[3]=a=>L.value.type=a),class:"form-select"},[e.createElementVNode("option",Zs,e.toDisplayString(e.unref(D)("chart.modalMarker.defaultIcon")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Et.value.filter(a=>a!=="default"),a=>(e.openBlock(),e.createElementBlock("option",{key:a,value:a},e.toDisplayString(a.charAt(0).toUpperCase()+a.slice(1)),9,js))),128))],512),[[e.vModelSelect,L.value.type]])])):e.createCommentVNode("",!0),e.createElementVNode("div",Us,[e.createElementVNode("label",null,e.toDisplayString(e.unref(D)("chart.modalMarker.iconPreview")),1),e.createElementVNode("div",Ws,[e.createElementVNode("img",{src:Bt({type:L.value.type}),alt:"Marker Icon Preview",class:"preview-icon",style:{width:"32px",height:"32px","border-radius":"50%",border:"2px solid #ddd"},onError:o[4]||(o[4]=a=>a.target.style.display="none")},null,40,qs)])])]),e.createElementVNode("div",Gs,[e.createElementVNode("div",Ks,[Ve.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dss-btn dss-btn-danger",onClick:Aa},e.toDisplayString(e.unref(D)("chart.modalMarker.deleteMarker")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Qs,[e.createElementVNode("button",{class:"dss-btn dss-btn-secondary",onClick:xe},e.toDisplayString(e.unref(D)("chart.modalMarker.cancel")),1),e.createElementVNode("button",{class:"dss-btn dss-btn-primary",onClick:$t,disabled:!(L.value.title&&L.value.title.length)},e.toDisplayString(Ve.value?e.unref(D)("chart.modalMarker.save"):e.unref(D)("chart.contextMenu.addMarker")),9,Js)])])])])):e.createCommentVNode("",!0)],64))}}),an={contextMenu:{addMarker:"Add Marker",clearAllMarkers:"Clear All Markers",downloadSvg:"Download SVG",downloadPng:"Download PNG",downloadCsv:"Download CSV"},modalMarker:{editMarker:"Edit Marker",title:"Title",description:"Description",iconType:"Icon Type",defaultIcon:"Default Logo",iconPreview:"Icon Preview",deleteMarker:"Delete Marker",cancel:"Cancel",save:"Save",placeholderTitle:"Enter marker title",placeholderDescription:"Enter marker description (optional)"},zoom:{doubleClickToReset:"(Double-click to reset)"},csv:{chartTitle:"Chart Title",chartSubtitle:"Chart Subtitle",generated:"Generated"},fallback:{item:"Item",axis:"Axis"},tooltip:{flags:"Flags",markers:"Markers",manualFlags:"Manual Flags",autoFlags:"Auto Flags"}},on={chart:an},ln={contextMenu:{addMarker:"Ajouter un marqueur",clearAllMarkers:"Effacer tous les marqueurs",downloadSvg:"Télécharger SVG",downloadPng:"Télécharger PNG",downloadCsv:"Télécharger CSV"},modalMarker:{editMarker:"Modifier le marqueur",title:"Titre",description:"Description",iconType:"Type d'icône",defaultIcon:"Logo par défaut",iconPreview:"Prévisualisation de l'icône",deleteMarker:"Suprimer le marqueur",cancel:"Annuler",save:"Sauvegarder",placeholderTitle:"Entrez le titre du marqueur",placeholderDescription:"Entrez la description du marqueur (optionnel)"},zoom:{doubleClickToReset:"(Double-cliquez pour réinitialiser)"},csv:{chartTitle:"Titre du graphique",chartSubtitle:"Sous-titre du graphique",generated:"Généré"},fallback:{item:"Objet",axis:"Axe"},tooltip:{flags:"Drapeaux",markers:"Marqueurs",manualFlags:"Drapeaux manuels",autoFlags:"Drapeaux automatiques"}},sn={chart:ln},nn={contextMenu:{addMarker:"Markering toevoegen",clearAllMarkers:"Wis alle markers",downloadSvg:"SVG downloaden",downloadPng:"PNG downloaden",downloadCsv:"CSV downloaden"},modalMarker:{editMarker:"Markering bewerken",title:"Titel",description:"Beschrijving",iconType:"Icoon Type",defaultIcon:"Standaard Logo",iconPreview:"Icoon Voorbeeld",deleteMarker:"Markering verwijderen",cancel:"Annuleren",save:"Opslaan",placeholderTitle:"Voer marker titel in",placeholderDescription:"Voer marker beschrijving in (optioneel)"},zoom:{doubleClickToReset:"(Dubbelklik om te resetten)"},csv:{chartTitle:"Grafiek Titel",chartSubtitle:"Grafiek Ondertitel",generated:"Gegenereerd"},fallback:{item:"Item",axis:"As"},tooltip:{flags:"Vlaggen",markers:"Markeringen",manualFlags:"Handmatige Vlaggen",autoFlags:"Automatische Vlaggen"}},rn={chart:nn},Oe={en:on,fr:sn,nl:rn};function cn(K){if(!K||!K.global)return;const Pe=K.global.availableLocales||[];Object.keys(Oe).forEach(D=>{Pe.includes(D)?K.global.mergeLocaleMessage(D,Oe[D]):console.error(`⊗ Skipped DSP translations for: ${D} (not in app)`)})}Qt.createI18n({legacy:!1,locale:"en",fallbackLocale:"en",messages:Oe});exports.DSSChart=tn;exports.DSSChartMessages=Oe;exports.addDSSChartTranslations=cn;