vue-data-ui 3.28.8 → 3.28.9

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.
Files changed (144) hide show
  1. package/dist/{PackageVersion-Bczw6rsP.js → PackageVersion-D6_O7PmZ.js} +1 -1
  2. package/dist/UserOptions-B9EyfU9n.js +1 -0
  3. package/dist/{XyAnalysisOptions-U4UJx51x.js → XyAnalysisOptions-djGOJdKc.js} +1 -1
  4. package/dist/components/vue-ui-3d-bar.js +1 -1
  5. package/dist/components/vue-ui-age-pyramid.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-graph.js +1 -1
  27. package/dist/components/vue-ui-heatmap.js +1 -1
  28. package/dist/components/vue-ui-hill.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-molecule.js +1 -1
  33. package/dist/components/vue-ui-mood-radar.js +1 -1
  34. package/dist/components/vue-ui-nested-donuts.js +1 -1
  35. package/dist/components/vue-ui-onion.js +1 -1
  36. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  37. package/dist/components/vue-ui-quadrant.js +1 -1
  38. package/dist/components/vue-ui-quick-chart.js +1 -1
  39. package/dist/components/vue-ui-radar.js +1 -1
  40. package/dist/components/vue-ui-relation-circle.js +1 -1
  41. package/dist/components/vue-ui-ridgeline.js +1 -1
  42. package/dist/components/vue-ui-rings.js +1 -1
  43. package/dist/components/vue-ui-scatter.js +1 -1
  44. package/dist/components/vue-ui-skeleton.js +1 -1
  45. package/dist/components/vue-ui-spark-trend.js +1 -1
  46. package/dist/components/vue-ui-sparkbar.js +1 -1
  47. package/dist/components/vue-ui-sparkgauge.js +1 -1
  48. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  49. package/dist/components/vue-ui-sparkline.js +1 -1
  50. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  51. package/dist/components/vue-ui-stackbar.js +1 -1
  52. package/dist/components/vue-ui-stackline.js +1 -1
  53. package/dist/components/vue-ui-strip-plot.js +1 -1
  54. package/dist/components/vue-ui-table-heatmap.js +1 -1
  55. package/dist/components/vue-ui-table-sparkline.js +1 -1
  56. package/dist/components/vue-ui-table.js +1 -1
  57. package/dist/components/vue-ui-thermometer.js +1 -1
  58. package/dist/components/vue-ui-timer.js +1 -1
  59. package/dist/components/vue-ui-tiremarks.js +1 -1
  60. package/dist/components/vue-ui-treemap.js +1 -1
  61. package/dist/components/vue-ui-vertical-bar.js +1 -1
  62. package/dist/components/vue-ui-waffle.js +1 -1
  63. package/dist/components/vue-ui-wheel.js +1 -1
  64. package/dist/components/vue-ui-word-cloud.js +1 -1
  65. package/dist/components/vue-ui-world.js +1 -1
  66. package/dist/components/vue-ui-xy-canvas.js +1 -1
  67. package/dist/components/vue-ui-xy.js +1 -1
  68. package/dist/package-BEq7yyhf.js +1 -0
  69. package/dist/{render-common-DY4sNXDz.js → render-common-BbY81Ao2.js} +1 -1
  70. package/dist/ssr/vue-ui-donut.js +1 -1
  71. package/dist/ssr/vue-ui-xy.js +1 -1
  72. package/dist/ssr.js +1 -1
  73. package/dist/style.css +1 -1
  74. package/dist/vue-data-ui-BwiGr37w.js +1 -0
  75. package/dist/vue-data-ui.js +1 -1
  76. package/dist/{vue-ui-3d-bar-DmRrbXjK.js → vue-ui-3d-bar-C2igj6OX.js} +1 -1
  77. package/dist/{vue-ui-age-pyramid-CJJIp5gY.js → vue-ui-age-pyramid-DOG_ZOgO.js} +1 -1
  78. package/dist/{vue-ui-bullet-Br7H7FSM.js → vue-ui-bullet-HUKP90GR.js} +1 -1
  79. package/dist/{vue-ui-bump-DCDHNvWE.js → vue-ui-bump-BuHuxEzm.js} +1 -1
  80. package/dist/{vue-ui-candlestick-C_swW8gM.js → vue-ui-candlestick-CZkyowA5.js} +1 -1
  81. package/dist/{vue-ui-carousel-table-BP_yVdDm.js → vue-ui-carousel-table-B73USTMi.js} +1 -1
  82. package/dist/{vue-ui-chestnut-CIGNqBsT.js → vue-ui-chestnut-VdMHjsWk.js} +1 -1
  83. package/dist/{vue-ui-chord-DZRFBkRJ.js → vue-ui-chord-DfWjMAuo.js} +1 -1
  84. package/dist/{vue-ui-circle-pack-CtdPeMsY.js → vue-ui-circle-pack-ByV3SOkF.js} +1 -1
  85. package/dist/{vue-ui-cursor-DRQc_V2R.js → vue-ui-cursor-D3E3f7Lc.js} +1 -1
  86. package/dist/{vue-ui-dag-Cj0CcntI.js → vue-ui-dag-DlllVyCV.js} +1 -1
  87. package/dist/{vue-ui-dashboard-HyzHqAtX.js → vue-ui-dashboard-C9aGsEAi.js} +1 -1
  88. package/dist/{vue-ui-digits-CfdB0vaP.js → vue-ui-digits-p2met3a2.js} +1 -1
  89. package/dist/{vue-ui-donut-Cv-bYyBN.js → vue-ui-donut-BlQXnf7O.js} +1 -1
  90. package/dist/{vue-ui-donut-Dy4j7B9b.js → vue-ui-donut-CZbBq7bs.js} +1 -1
  91. package/dist/{vue-ui-donut-evolution-DL112anx.js → vue-ui-donut-evolution-Csq1sqhK.js} +1 -1
  92. package/dist/{vue-ui-dumbbell-owG24VsQ.js → vue-ui-dumbbell-ChLfyyGq.js} +1 -1
  93. package/dist/{vue-ui-flow-BMNIydqI.js → vue-ui-flow-DfEHi_Cq.js} +1 -1
  94. package/dist/{vue-ui-funnel-BsVS3vuI.js → vue-ui-funnel-QCG-rmsx.js} +1 -1
  95. package/dist/{vue-ui-galaxy-B8HgdBjc.js → vue-ui-galaxy-DFTeXUse.js} +1 -1
  96. package/dist/{vue-ui-gauge-B1A_NFY6.js → vue-ui-gauge-XTx--A-H.js} +1 -1
  97. package/dist/{vue-ui-geo-_TG4jaV9.js → vue-ui-geo-BXB5xFcV.js} +1 -1
  98. package/dist/{vue-ui-gizmo-D0QjzIGt.js → vue-ui-gizmo-COJHVo7O.js} +1 -1
  99. package/dist/{vue-ui-graph-DScVnTzu.js → vue-ui-graph-BqnyGn9p.js} +1 -1
  100. package/dist/{vue-ui-heatmap-BbQseEbM.js → vue-ui-heatmap-CPq3bcnS.js} +1 -1
  101. package/dist/{vue-ui-hill-D3V84h_t.js → vue-ui-hill-DKm3PjHT.js} +1 -1
  102. package/dist/{vue-ui-history-plot-Bx4WYG6U.js → vue-ui-history-plot-B5OPsHZ1.js} +1 -1
  103. package/dist/{vue-ui-horizontal-bar-Do0HJy4f.js → vue-ui-horizontal-bar-C8SymyhN.js} +1 -1
  104. package/dist/{vue-ui-kpi-CF7pAl08.js → vue-ui-kpi-D1Ps7D_O.js} +1 -1
  105. package/dist/{vue-ui-molecule-bAMGCA2Y.js → vue-ui-molecule-f-GNAQ0p.js} +1 -1
  106. package/dist/{vue-ui-mood-radar-CFpgxjuR.js → vue-ui-mood-radar-kp-jOb4S.js} +1 -1
  107. package/dist/{vue-ui-nested-donuts-CWY26iKX.js → vue-ui-nested-donuts-DCCSKIGa.js} +1 -1
  108. package/dist/{vue-ui-onion-DsBUqL_c.js → vue-ui-onion-KqzGj1z_.js} +1 -1
  109. package/dist/{vue-ui-parallel-coordinate-plot-BF3gO85b.js → vue-ui-parallel-coordinate-plot-dn_41Wv5.js} +1 -1
  110. package/dist/{vue-ui-quadrant-BkNG2LGm.js → vue-ui-quadrant-CP8n4v5B.js} +1 -1
  111. package/dist/{vue-ui-quick-chart-CYxvgVpD.js → vue-ui-quick-chart-D8PbGpSw.js} +1 -1
  112. package/dist/{vue-ui-radar-0H8CiLmc.js → vue-ui-radar-ybR3N44-.js} +1 -1
  113. package/dist/{vue-ui-relation-circle-B0BM4xf8.js → vue-ui-relation-circle-B0PwfFpT.js} +1 -1
  114. package/dist/{vue-ui-ridgeline-D-fDuE3y.js → vue-ui-ridgeline-BnslUzA-.js} +1 -1
  115. package/dist/{vue-ui-rings-UtlBiaZZ.js → vue-ui-rings-B-cOW0Dw.js} +1 -1
  116. package/dist/{vue-ui-scatter-CduaARRt.js → vue-ui-scatter-BX5cTC01.js} +1 -1
  117. package/dist/{vue-ui-skeleton-an0peDis.js → vue-ui-skeleton-98OnGJ2N.js} +1 -1
  118. package/dist/{vue-ui-spark-trend-DCP7blHB.js → vue-ui-spark-trend-C4uYyXEy.js} +1 -1
  119. package/dist/{vue-ui-sparkbar-DT3sDgda.js → vue-ui-sparkbar-BcZyqPB9.js} +1 -1
  120. package/dist/{vue-ui-sparkgauge-AQt2L5dI.js → vue-ui-sparkgauge-dBZzMqn5.js} +1 -1
  121. package/dist/{vue-ui-sparkhistogram-a_jc2Dv2.js → vue-ui-sparkhistogram-DcbAY6vr.js} +1 -1
  122. package/dist/{vue-ui-sparkline-D2-KcHAU.js → vue-ui-sparkline-BizzsAR5.js} +1 -1
  123. package/dist/{vue-ui-sparkstackbar-CBI4S5cu.js → vue-ui-sparkstackbar-xlg048YB.js} +1 -1
  124. package/dist/{vue-ui-stackbar-DS_31-a3.js → vue-ui-stackbar-2AX-m3Pb.js} +1 -1
  125. package/dist/{vue-ui-stackline-CuxohB0U.js → vue-ui-stackline-GKaZJh8y.js} +1 -1
  126. package/dist/{vue-ui-strip-plot-bYGhsPA5.js → vue-ui-strip-plot-BhxIrd67.js} +1 -1
  127. package/dist/{vue-ui-table-lzolsJ_n.js → vue-ui-table-D9FJBxrk.js} +1 -1
  128. package/dist/{vue-ui-table-heatmap-D6gpmHg8.js → vue-ui-table-heatmap-SGJGI5Wq.js} +1 -1
  129. package/dist/{vue-ui-table-sparkline-By319cB8.js → vue-ui-table-sparkline-B6ynMUGE.js} +1 -1
  130. package/dist/{vue-ui-thermometer-B3Uv3aWc.js → vue-ui-thermometer-SE_c51TO.js} +1 -1
  131. package/dist/{vue-ui-timer-C6Pevf4N.js → vue-ui-timer-B1JNZk6j.js} +1 -1
  132. package/dist/{vue-ui-tiremarks-DeNdCFVD.js → vue-ui-tiremarks-Cr8EG4T5.js} +1 -1
  133. package/dist/{vue-ui-treemap-Ck9_llHA.js → vue-ui-treemap-DKJVe7v7.js} +1 -1
  134. package/dist/{vue-ui-waffle-BW2SacnV.js → vue-ui-waffle-DSq3l2sE.js} +1 -1
  135. package/dist/{vue-ui-wheel-BXDhx5bf.js → vue-ui-wheel-CcYOzS05.js} +1 -1
  136. package/dist/{vue-ui-word-cloud-DKPtoruY.js → vue-ui-word-cloud-gogYiwIU.js} +1 -1
  137. package/dist/{vue-ui-world-D9vpDbN7.js → vue-ui-world-C2zGhq_U.js} +1 -1
  138. package/dist/{vue-ui-xy-Df5gIADT.js → vue-ui-xy-B2lrTGG4.js} +1 -1
  139. package/dist/{vue-ui-xy-CMckdUft.js → vue-ui-xy-CpS-ASnd.js} +3 -3
  140. package/dist/{vue-ui-xy-canvas-CBrKi3nN.js → vue-ui-xy-canvas-CXBsRU35.js} +1 -1
  141. package/package.json +1 -1
  142. package/dist/UserOptions-DW84OKKr.js +0 -1
  143. package/dist/package-CNWVs68D.js +0 -1
  144. package/dist/vue-data-ui-BWqplouA.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ct as o,D as ee,Dt as te,Ht as ne,J as re,Jt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,i as s,in as ue,jt as de,nt as fe,pt as pe,r as me,t as he,w as ge,zt as _e}from"./lib-rPeBMZrn.js";import{n as ve,t as ye}from"./BaseScanner-8NdoBs7B.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as Ce}from"./resolveChartConfig-CIhClE5R.js";import{t as we}from"./chartImage-DPGnEuYM.js";import{n as Te}from"./Title-BliHuXfT.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{n as De,t as Oe}from"./tableIntegration-CNoJ1CIY.js";import{n as ke,t as Ae}from"./userOptionsSlots-DYuo-E5m.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./Shape-CRe8woTu.js";import{c as Ne}from"./canvas-lib-22VpOI4_.js";import{t as Pe}from"./useResponsive-CENUxfEL.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./Legend-DM0ClX3D.js";import{t as Ve}from"./vue_ui_quadrant-BUv-SqzP.js";import{Fragment as c,Teleport as He,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Ue,createTextVNode as We,createVNode as Ge,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Ke,nextTick as qe,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Je,onMounted as Ye,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as C,toRefs as Qe,unref as w,watch as $e,withCtx as T}from"vue";var et=/* @__PURE__ */ e({default:()=>ln}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`aria-describedby`,`viewBox`,`id`],ot=[`x`,`y`,`width`,`height`],st={key:1},ct=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],lt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],dt={key:2},ft=[`points`,`fill`],pt=[`points`,`fill`],mt=[`points`,`fill`],ht=[`points`,`fill`],gt={key:3},_t=[`y`,`fill`,`font-size`],vt=[`x`,`y`,`fill`,`font-size`],yt=[`x`,`y`,`fill`,`font-size`],bt=[`y`,`fill`,`font-size`],xt={key:4},St=[`x`,`y`,`font-size`,`fill`],Ct=[`x`,`y`,`font-size`,`fill`],wt=[`x`,`y`,`font-size`,`fill`],Tt=[`id`,`font-size`,`transform`,`fill`],Et=[`id`,`font-size`,`transform`,`fill`],Dt=[`id`,`font-size`,`transform`,`fill`],Ot={key:5},kt=[`fill`,`points`],At=[`x`,`y`,`width`,`height`],jt=[`x`,`y`,`width`,`height`],Mt=[`x`,`y`,`width`,`height`],Nt=[`x`,`y`,`width`,`height`],Pt=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Ft=[`data-a11y-plot-id`,`cx`,`cy`,`r`],It=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Lt={key:0,style:{"pointer-events":`none`}},Rt=[`x`,`y`,`font-size`,`fill`],zt=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Bt={key:0},Vt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Ht={key:8,class:`vue-ui-dna`},Ut=[`points`,`fill`],Wt=[`points`,`fill`],Gt=[`points`,`fill`],Kt=[`points`,`fill`],qt={key:9},Jt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Yt={key:10},Xt=[`x`,`y`,`fill`],Zt=[`x`,`y`,`fill`],Qt=[`x`,`y`,`fill`],$t=[`x`,`y`,`fill`],en=[`stroke`,`d`],tn=[`stroke`,`d`],nn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},rn={key:5,class:`vue-data-ui-watermark`},an=[`id`],on=[`onClick`],sn={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},cn=[`innerHTML`],ln=/*#__PURE__*/ Se({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Se,emit:et}){let ln=m(()=>import(`./Tooltip-C1q0Qoh7.js`)),un=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),dn=m(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),fn=m(()=>import(`./DataTable-Dof6yhO7.js`)),pn=m(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),mn=m(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),hn=m(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),gn=m(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_quadrant:_n}=i(),E=e,vn=l(()=>!!E.dataset&&E.dataset.length),D=b(oe()),yn=et,bn=b(!1),xn=b(``),Sn=b(0),O=b(!1),k=b(null),Cn=b(null),wn=b(null),Tn=b(null),En=b(null),Dn=b(0),On=b(0),kn=b(0),An=b(!1),jn=b(null),Mn=b(null),Nn=b(null),Pn=b(null),Fn=b({x:0,y:0}),In=b(`pointer`),Ln=b(!1),A=b(Wn()),j=l(()=>A.value.userOptions),M=l(()=>A.value.style.chart.layout.grid),N=l(()=>A.value.style.chart.layout.labels),P=l(()=>A.value.style.chart.tooltip),F=l(()=>A.value.style.chart);be({config:()=>A.value,dataset:()=>E.dataset,component:`VueUiQuadrant`,rules:[xe.emptyArray,xe.noHint]});let I=l(()=>A.value.userOptions.useCursorPointer),Rn=l(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:zn,FINAL_DATASET:Bn}=ve({...Qe(E),FINAL_CONFIG:A,prepareConfig:Wn,callback:()=>{Promise.resolve().then(async()=>{await qe(),z.value.showTable=A.value.table.show})},skeletonDataset:E.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:ue({defaultConfig:A.value,userConfig:Rn.value})}),{userOptionsVisible:Vn,setUserOptionsVisibility:Hn,keepUserOptionState:Un}=Re({config:A.value}),{svgRef:L}=ze({config:F.value.title});function Wn(){return Ce(E.config,_n,Ve)}let Gn=ce(E.config);$e(()=>E.config,(e,t)=>{let n=ce(e),r=n!==Gn;Gn=n;let i=Wn();r?(A.value=i,Vn.value=!A.value.userOptions.showOnChartHover,Jn(),Dn.value+=1,On.value+=1,kn.value+=1,z.value.plotLabels.show=N.value.plotLabels.show,z.value.showTable=A.value.table.show,z.value.showTooltip=P.value.show):(A.value.style.chart.tooltip=i.style.chart.tooltip,z.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let R=Ze(null),Kn=Ze(null),qn=l(()=>A.value.debug);function Jn(){if(_e(E.dataset)?le({componentName:`VueUiQuadrant`,type:`dataset`,debug:qn.value}):qn.value&&E.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),A.value.responsive){let e=Ne(()=>{let{width:e,height:t}=Pe({chart:k.value,title:F.value.title.text?Cn.value:null,legend:F.value.legend.show?wn.value:null,source:Tn.value,noTitle:En.value});B.value=48,requestAnimationFrame(()=>{V.value.height=t,V.value.usableHeight=t-B.value*2,V.value.width=e,V.value.usableWidth=e-B.value*2,V.value.top=B.value,V.value.left=B.value,V.value.right=e-B.value,V.value.bottom=t-B.value,V.value.centerX=e/2,V.value.centerY=t-t/2,V.value.padding=B.value})});R.value&&(Kn.value&&R.value.unobserve(Kn.value),R.value.disconnect()),R.value=new ResizeObserver(e),Kn.value=k.value.parentNode,R.value.observe(Kn.value)}}Ye(()=>{An.value=!0,Jn()}),Je(()=>{R.value&&(Kn.value&&R.value.unobserve(Kn.value),R.value.disconnect())});let{isPrinting:Yn,isImaging:Xn,generatePdf:Zn,generateImage:Qn}=je({elementId:`vue-ui-quadrant_${D.value}`,fileName:F.value.title.text||`vue-ui-quadrant`,options:A.value.userOptions.print}),$n=l(()=>A.value.userOptions.show&&!F.value.title.text),er=l(()=>ge(A.value.customPalette)),z=b({plotLabels:{show:N.value.plotLabels.show},showTable:A.value.table.show,showTooltip:P.value.show}),B=b(48),V=b({height:F.value.height,usableHeight:F.value.height-B.value*2,width:F.value.width,usableWidth:F.value.width-B.value*2,top:B.value,left:B.value,right:F.value.width-B.value,bottom:F.value.height-B.value,centerX:F.value.width/2,centerY:F.value.height-F.value.height/2,padding:B.value}),H=b({...JSON.parse(JSON.stringify(V.value)),startX:0,startY:0});$e(()=>V.value,e=>{e&&(H.value={...JSON.parse(JSON.stringify(V.value)),startX:0,startY:0})},{deep:!0});let U=b(null),W=l(()=>{switch(U.value){case`TL`:return{x:H.value.startX+H.value.width/2,y:H.value.height,text:N.value.quadrantLabels.tl.text||`Top Left`,fontSize:N.value.quadrantLabels.tl.fontSize,fill:N.value.quadrantLabels.tl.color,bold:N.value.quadrantLabels.tl.bold};case`TR`:return{x:H.value.startX+H.value.width/2,y:H.value.height,text:N.value.quadrantLabels.tr.text||`Top Right`,fontSize:N.value.quadrantLabels.tr.fontSize,fill:N.value.quadrantLabels.tr.color,bold:N.value.quadrantLabels.tr.bold};case`BR`:return{x:H.value.startX+H.value.width/2,y:H.value.height*1.678,text:N.value.quadrantLabels.br.text||`Bottom Right`,fontSize:N.value.quadrantLabels.br.fontSize,fill:N.value.quadrantLabels.br.color,bold:N.value.quadrantLabels.br.bold};case`BL`:return{x:H.value.startX+H.value.width/2,y:H.value.height*1.678,text:N.value.quadrantLabels.bl.text||`Bottom Left`,fontSize:N.value.quadrantLabels.bl.fontSize,fill:N.value.quadrantLabels.bl.color,bold:N.value.quadrantLabels.bl.bold};default:return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1}}}),tr=b(null),nr=b(!1);function rr({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){U.value&&Er(i);let a={x:e-H.value.startX,y:t-H.value.startY,w:n-H.value.width,h:r-H.value.height},o=A.value.zoomAnimationFrames,ee=0;function te(){nr.value=!0,H.value.startX+=a.x/o,H.value.startY+=a.y/o,H.value.width+=a.w/o,H.value.height+=a.h/o,ee+=1,ee<o?tr.value=requestAnimationFrame(te):nr.value=!1}te()}let G=l(()=>A.value.zoomEnabled);function K(e){if(G.value&&!nr.value){if(O.value&&U.value===e)rr({targetX:0,targetY:0,targetW:V.value.width,targetH:V.value.height}),U.value=null,O.value=!1;else{switch(U.value=e,e){case`TL`:rr({targetX:0,targetY:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`tl`});break;case`TR`:rr({targetX:V.value.width/2-V.value.left,targetY:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`tr`});break;case`BR`:rr({targetX:V.value.width/2-V.value.left,targetY:V.value.height/2-V.value.top,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`br`});break;case`BL`:rr({targetX:0,targetY:V.value.height/2-V.value.top,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`bl`});break;default:H.value.startX=0,H.value.startY=0,H.value.width=V.value.width,H.value.height=V.value.height}O.value=!0}}}let ir=l(()=>{let e=M.value.graduations.steps,t=V.value.usableWidth/(e*2),n=V.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:V.value.padding+t*i,y:n+V.value.usableHeight*(i/e/2),height:V.value.usableHeight*(1-i/e),width:V.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),q=l(()=>{let e=M.value.xAxis.max,t=M.value.xAxis.min,n=M.value.yAxis.max,r=M.value.yAxis.min;return M.value.xAxis.auto&&(e=Math.max(...ar.value.flatMap(e=>e.series.map(e=>e.x))),t=Math.min(...ar.value.flatMap(e=>e.series.map(e=>e.x)))),M.value.yAxis.auto&&(n=Math.max(...ar.value.flatMap(e=>e.series.map(e=>e.y))),r=Math.min(...ar.value.flatMap(e=>e.series.map(e=>e.y)))),{x:{max:e,min:t},y:{max:n,min:r}}}),J=b([]),ar=l(()=>Bn.value.map((e,t)=>({...e,series:de({data:e.series,threshold:A.value.downsample.threshold}),id:`cat_${t}_${D.value}`,color:ae(e.color)||er.value[t]||ne[t]}))),or=l(()=>ar.value.filter(e=>!J.value.includes(e.id))),sr=l(()=>ar.value.map((e,t)=>({...e,shape:e.shape||`circle`,series:e.series.map(t=>({...t,x:cr(t.x),y:lr(t.y),xValue:t.x,yValue:t.y,quadrantSide:vr({x:t.x,y:t.y}),categoryName:e.name,category:e,shape:e.shape,color:e.color}))}))),Y=l(()=>(qn.value&&Bn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),or.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||er.value[t]||ne[t],series:e.series.map(t=>({...t,category:e,x:cr(t.x),y:lr(t.y),xValue:t.x,yValue:t.y,quadrantSide:vr({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:oe()}))}))));function cr(e){if(e>=0){let t=e/q.value.x.max;return V.value.centerX+V.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(q.value.x.min);return V.value.centerX-V.value.usableWidth/2*t}}function lr(e){if(e>=0){let t=e/q.value.y.max;return V.value.centerY+(1-V.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(q.value.y.min);return V.value.centerY-(1-V.value.usableHeight/2*t)}}let ur=l(()=>{let e=Y.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:N.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=M.value.xAxis.name||`x`,n=M.value.yAxis.name||`y`;return{head:[A.value.translations.category,A.value.translations.item,t,n,A.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),itsShapes:e.map(e=>({shape:e.shape,color:e.color})),tableData:e}}),dr=l(()=>{let e=ur.value.head,t=ur.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,s(N.value.plotLabels.x.formatter,e.x,a({v:e.x,r:N.value.plotLabels.rounding})),s(N.value.plotLabels.y.formatter,e.y,a({v:e.y,r:N.value.plotLabels.rounding})),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:e}});function fr(){J.value.length?J.value=[]:X.value.forEach(e=>{J.value.push(e.id)}),yn(`selectLegend`,Dr())}function pr(e){J.value.includes(e)?J.value=J.value.filter(t=>t!==e):J.value.push(e),yn(`selectLegend`,Dr())}let X=l(()=>sr.value.map(e=>({name:e.name,shape:e.shape,color:e.color,id:e.id,opacity:J.value.includes(e.id)?.5:1,segregate:()=>pr(e.id),isSegregated:J.value.includes(e.id)})));function mr(e){return X.value.length?X.value.find(t=>t.name===e)||(qn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(qn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function hr(e){let t=mr(e);t!==null&&J.value.includes(t.id)&&pr(t.id)}function gr(e){let t=mr(e);t!==null&&(J.value.includes(t.id)||pr(t.id))}let _r=l(()=>({cy:`quadrant-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``}));function vr(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=b(null),yr=b(null),br=b(null);function xr(){Z.value=null,yr.value=null,Nn.value=null,Pn.value=null,bn.value=!1}function Sr(e){if(!L.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=L.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();Fn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function Cr(e,t,n,r=`pointer`,i=null){A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,yr.value={color:e.color,shape:e.shape},In.value=r,Nn.value=i,Pn.value=t.uid,br.value={datapoint:t,seriesIndex:n,series:Y.value,config:A.value};let o=P.value.customFormat;if(te(o)&&pe(()=>o({seriesIndex:n,datapoint:t,series:Y.value,config:A.value})))xn.value=o({seriesIndex:n,datapoint:t,series:Y.value,config:A.value});else{let r=``;t.quadrantSide&&(r+=`<div style="color:${N.value.quadrantLabels[t.quadrantSide].color};font-weight:${N.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${N.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${P.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${M.value.xAxis.name?M.value.xAxis.name:`x`}: <b>${s(N.value.plotLabels.x.formatter,t.xValue,a({v:t.xValue,r:P.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${M.value.yAxis.name?M.value.yAxis.name:`y`}: <b>${s(N.value.plotLabels.y.formatter,t.yValue,a({v:t.yValue,r:P.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,xn.value=`<div style="text-align:left;font-size:${P.value.fontSize}px">${r}</div>`}r===`keyboard`&&qe(()=>{Sr(t.uid)}),bn.value=!0}function wr(e,t){A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Pn.value!==e.uid||In.value!==`keyboard`)&&(bn.value=!1,Z.value=null,yr.value=null)}function Tr(e,t,n){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:N.value.quadrantLabels[t.quadrantSide].text};yn(`selectPlot`,r)}function Er(e){if(!e)return;let t=Y.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:N.value.quadrantLabels[e].text,items:[...t]};yn(`selectSide`,n)}let Q=l(()=>({TL:{tl:{x:V.value.left+V.value.usableWidth/4-20,y:0,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.left+V.value.usableWidth/4,y:0,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.left+V.value.usableWidth/4,y:20,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.left+V.value.usableWidth/4-20,y:20,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.left+V.value.usableWidth/4-20},20 ${V.value.left+V.value.usableWidth/4+20},20`,vertical:`M ${V.value.left+V.value.usableWidth/4},0 ${V.value.left+V.value.usableWidth/4},40`}},TR:{tl:{x:V.value.centerX+V.value.usableWidth/4-20,y:0,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.centerX+V.value.usableWidth/4,y:0,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.centerX+V.value.usableWidth/4,y:20,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.centerX+V.value.usableWidth/4-20,y:20,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.centerX+V.value.usableWidth/4-20},20 ${V.value.centerX+V.value.usableWidth/4+20},20`,vertical:`M ${V.value.centerX+V.value.usableWidth/4},0 ${V.value.centerX+V.value.usableWidth/4},40`}},BR:{tl:{x:V.value.centerX+V.value.usableWidth/4-20,y:V.value.centerY-48,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.centerX+V.value.usableWidth/4,y:V.value.centerY-48,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.centerX+V.value.usableWidth/4,y:V.value.centerY-28,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.centerX+V.value.usableWidth/4-20,y:V.value.centerY-28,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.centerX+V.value.usableWidth/4-20},${V.value.centerY-28} ${V.value.centerX+V.value.usableWidth/4+20},${V.value.centerY-28}`,vertical:`M ${V.value.centerX+V.value.usableWidth/4},${V.value.centerY-48} ${V.value.centerX+V.value.usableWidth/4},${V.value.centerY-8}`}},BL:{tl:{x:V.value.left+V.value.usableWidth/4-20,y:V.value.centerY-48,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.left+V.value.usableWidth/4,y:V.value.centerY-48,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.left+V.value.usableWidth/4,y:V.value.centerY-28,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.left+V.value.usableWidth/4-20,y:V.value.centerY-28,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.left+V.value.usableWidth/4-20},${V.value.centerY-28} ${V.value.left+V.value.usableWidth/4+20},${V.value.centerY-28}`,vertical:`M ${V.value.left+V.value.usableWidth/4},${V.value.centerY-48} ${V.value.left+V.value.usableWidth/4},${V.value.centerY-8}`}}}));function Dr(){return Y.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:N.value.quadrantLabels[e.quadrantSide].text}))}))}function Or(e=null){qe(()=>{let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=ur.value.head,r=ur.value.body,i=t.concat([n]).concat(r),a=ee(i);e?e(a):fe({csvContent:a,title:F.value.title.text||`vue-ui-quadrant`})})}let kr=b(!1);function Ar(e){kr.value=e,Sn.value+=1}function jr(){z.value.showTable=!z.value.showTable}function Mr(){z.value.plotLabels.show=!z.value.plotLabels.show}function Nr(){z.value.showTooltip=!z.value.showTooltip}let Pr=b(!1);function Fr(){Pr.value=!Pr.value}let Ir=we(k,()=>F.value.title.text),Lr=l(()=>Oe({config:A,style:F,mutableConfig:z,dialog:gn,accordion:dn,isFullscreen:kr,parent:k,maxWidth:800,isCursorPointer:I}));$e(()=>z.value.showTable,e=>De(e,A,jn));function Rr(){z.value.showTable=!1,Mn.value&&Mn.value.setTableIconState(!1)}let zr=l(()=>F.value.backgroundColor),Br=l(()=>F.value.legend),Vr=l(()=>F.value.title),{isCallbackImaging:Hr,isCallbackSvg:Ur,generateSvg:Wr,onGenerateImage:Gr}=Ee({svg:L,title:Vr,legend:Br,legendItems:X,backgroundColor:zr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Qn});async function Kr(){yn(`copyAlt`,{config:A.value,dataset:or.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:or.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qr(){Nn.value=null,Pn.value=null,Ln.value=!0}function Jr(){xr(),Ln.value=!1}function Yr(e){if(!L.value||Pr.value||document.activeElement!==L.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){xr();return}if(r){if(Nn.value===null)return;let e=$.value[Nn.value];if(!e)return;Tr(e.category,e.plot,e.categoryIndex);return}let a=Nn.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,ee=a!==null&&a>=0&&a<$.value.length,te=o!==null&&o>=0&&o<$.value.length;ee?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):te?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ne=$.value[a];ne&&Cr(ne.category,ne.plot,ne.categoryIndex,`keyboard`,a)}let Xr=l(()=>({headers:dr.value?.colNames??[],rows:dr.value?.a11yBody??[]})),$=l(()=>Y.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Se({getData:Dr,getImage:Ir,generatePdf:Zn,generateCsv:Or,generateImage:Qn,generateSvg:Wr,hideSeries:gr,showSeries:hr,toggleTable:jr,toggleLabels:Mr,toggleTooltip:Nr,toggleAnnotator:Fr,toggleFullscreen:Ar,copyAlt:Kr}),(e,i)=>(y(),f(`div`,{class:g(`vue-data-ui-component vue-ui-quadrant ${kr.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:k,id:`vue-ui-quadrant_${D.value}`,style:v(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),onMouseenter:i[14]||=()=>w(Hn)(!0),onMouseleave:i[15]||=()=>{w(Hn)(!1),Ln.value||xr()}},[p(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[p(`p`,null,C(A.value.a11y.translations.keyboardNavigation),1)],8,nt),Xr.value?.rows?.length?(y(),u(Le,{key:0,uid:D.value,head:Xr.value.headers,body:Xr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):d(``,!0),j.value.buttons.annotator?(y(),u(w(pn),Ke({key:1},w(n)(j.value.annotator),{svgRef:w(L),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Pr.value,isCursorPointer:I.value,palette:j.value.annotatorPalette,onClose:Fr}),Ue({_:2},[x(w(r),n=>({name:n,fn:T(r=>[S(e.$slots,n,_(h(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),$n.value?(y(),f(`div`,{key:2,ref_key:`noTitle`,ref:En,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),F.value.title.text?(y(),f(`div`,{key:3,ref_key:`chartTitle`,ref:Cn,style:`width:100%;background:transparent;padding-bottom:12px`},[(y(),u(Te,{key:`table_${Dn.value}`,config:{title:{cy:`quadrant-title`,...F.value.title},subtitle:{cy:`quadrant-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),p(`div`,{id:`legend-top-${D.value}`},null,8,rt),j.value.show&&vn.value&&(w(Un)||w(Vn))?(y(),u(w(mn),{ref_key:`userOptionsRef`,ref:Mn,key:`user_options_${Sn.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(Xn),isPrinting:w(Yn),uid:D.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasXls:j.value.buttons.csv,hasTable:j.value.buttons.table,hasLabel:j.value.buttons.labels,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,isFullscreen:kr.value,isTooltip:z.value.showTooltip,titles:{...j.value.buttonTitles},chartElement:k.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Pr.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Ar,onGeneratePdf:w(Zn),onGenerateCsv:Or,onGenerateImage:w(Gr),onGenerateSvg:w(Wr),onToggleTable:jr,onToggleLabels:Mr,onToggleTooltip:Nr,onToggleAnnotator:Fr,onCopyAlt:Kr,style:v({visibility:w(Un)?w(Vn)?`visible`:`hidden`:`visible`})},Ue({_:2},[x(w(ke)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(h(w(Ae)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):d(``,!0),p(`div`,it,[(y(),f(`svg`,{ref_key:`svgRef`,ref:L,xmlns:w(he),"aria-describedby":`chart-instructions-${D.value}`,class:g({"vue-data-ui-fullscreen--on":kr.value,"vue-data-ui-fulscreen--off":!kr.value}),viewBox:`${H.value.startX} ${H.value.startY} ${H.value.width} ${H.value.height}`,style:v(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),id:`svg_${D.value}`,tabindex:`0`,onFocus:qr,onBlur:Jr,onKeydown:Yr},[Ge(w(hn)),S(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:w(Yn)||w(Xn)||w(Hr),isPrintingSvg:w(Ur)}},void 0,!0),e.$slots[`chart-background`]?(y(),f(`foreignObject`,{key:0,x:H.value.startX,y:H.value.startY,width:H.value.width,height:H.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):d(``,!0),p(`defs`,null,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),u(Fe,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${D.value}_${t}`,key:`quadrant_gradient_${D.value}_${t}`,stops:[[`0%`,w(ie)(w(se)(e.color,.05),F.value.layout.areas.opacity),1],[`100%`,w(ie)(e.color,F.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),M.value.graduations.show?(y(),f(`g`,st,[(y(!0),f(c,null,x(ir.value,e=>(y(),f(`rect`,{fill:M.value.graduations.fill?w(ie)(M.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":M.value.graduations.strokeWidth,stroke:M.value.graduations.stroke,rx:M.value.graduations.roundingForce},null,8,ct))),256))])):d(``,!0),p(`line`,{x1:V.value.left,y1:V.value.centerY,x2:V.value.right,y2:V.value.centerY,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,lt),p(`line`,{x1:V.value.centerX,y1:V.value.top,x2:V.value.centerX,y2:V.value.bottom,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,ut),M.value.showArrows?(y(),f(`g`,dt,[p(`polygon`,{points:`${V.value.right-8},${V.value.centerY-6} ${V.value.right},${V.value.centerY} ${V.value.right-8},${V.value.centerY+6}`,fill:M.value.stroke,stroke:`none`},null,8,ft),p(`polygon`,{points:`${V.value.left+8},${V.value.centerY-6} ${V.value.left},${V.value.centerY} ${V.value.left+8},${V.value.centerY+6}`,fill:M.value.stroke,stroke:`none`},null,8,pt),p(`polygon`,{points:`${V.value.centerX-6},${V.value.top+8} ${V.value.centerX},${V.value.top} ${V.value.centerX+6},${V.value.top+8}`,fill:M.value.stroke,stroke:`none`},null,8,mt),p(`polygon`,{points:`${V.value.centerX-6},${V.value.bottom-8} ${V.value.centerX},${V.value.bottom} ${V.value.centerX+6},${V.value.bottom-8}`,fill:M.value.stroke,stroke:`none`},null,8,ht)])):d(``,!0),N.value.quadrantLabels.show&&!O.value?(y(),f(`g`,gt,[N.value.quadrantLabels.tl.text?(y(),f(`text`,{key:0,x:0,y:V.value.top-V.value.padding/2,"text-anchor":`start`,fill:N.value.quadrantLabels.tl.color,"font-size":N.value.quadrantLabels.tl.fontSize,style:v(`font-weight:${N.value.quadrantLabels.tl.bold?`bold`:``}`),onClick:i[0]||=e=>Er(`tl`)},C(N.value.quadrantLabels.tl.text),13,_t)):d(``,!0),N.value.quadrantLabels.tr.text?(y(),f(`text`,{key:1,x:V.value.width,y:V.value.top-V.value.padding/2,"text-anchor":`end`,fill:N.value.quadrantLabels.tr.color,"font-size":N.value.quadrantLabels.tr.fontSize,style:v(`font-weight:${N.value.quadrantLabels.tr.bold?`bold`:``}`),onClick:i[1]||=e=>Er(`tr`)},C(N.value.quadrantLabels.tr.text),13,vt)):d(``,!0),N.value.quadrantLabels.br.text?(y(),f(`text`,{key:2,x:V.value.width,y:V.value.bottom+V.value.padding*.7,"text-anchor":`end`,fill:N.value.quadrantLabels.br.color,"font-size":N.value.quadrantLabels.br.fontSize,style:v(`font-weight:${N.value.quadrantLabels.br.bold?`bold`:``}`),onClick:i[2]||=e=>Er(`br`)},C(N.value.quadrantLabels.br.text),13,yt)):d(``,!0),N.value.quadrantLabels.bl.text?(y(),f(`text`,{key:3,x:0,y:V.value.bottom+V.value.padding*.7,"text-anchor":`start`,fill:N.value.quadrantLabels.bl.color,"font-size":N.value.quadrantLabels.bl.fontSize,style:v(`font-weight:${N.value.quadrantLabels.bl.bold?`bold`:``}`),onClick:i[3]||=e=>Er(`bl`)},C(N.value.quadrantLabels.bl.text),13,bt)):d(``,!0)])):d(``,!0),N.value.axisLabels.show?(y(),f(`g`,xt,[M.value.yAxis.show?(y(),f(`text`,{key:0,x:V.value.centerX,y:V.value.top-V.value.padding/6,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.positive},C(w(s)(N.value.plotLabels.y.formatter,q.value.y.max,w(a)({v:q.value.y.max,r:N.value.plotLabels.rounding}))),9,St)):d(``,!0),p(`text`,{x:V.value.centerX,y:V.value.top-V.value.padding/2,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.positive},C(M.value.yAxis.name),9,Ct),M.value.yAxis.show?(y(),f(`text`,{key:1,x:V.value.centerX,y:V.value.bottom+V.value.padding*.35,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.negative},C(w(s)(N.value.plotLabels.y.formatter,q.value.y.min,w(a)({v:q.value.y.min,r:N.value.plotLabels.rounding}))),9,wt)):d(``,!0),M.value.xAxis.show?(y(),f(`text`,{key:2,id:`xLabelMin_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.padding-N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(-90)`,fill:N.value.axisLabels.color.negative},C(w(s)(N.value.plotLabels.x.formatter,q.value.x.min,w(a)({v:q.value.x.min,r:N.value.plotLabels.rounding}))),9,Tt)):d(``,!0),M.value.xAxis.show?(y(),f(`text`,{key:3,id:`xLabelMax_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.width-V.value.padding+N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:N.value.axisLabels.color.positive},C(w(s)(N.value.plotLabels.x.formatter,q.value.x.max,w(a)({v:q.value.x.max,r:N.value.plotLabels.rounding}))),9,Et)):d(``,!0),p(`text`,{id:`xLabelMaxName_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.width-N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:N.value.axisLabels.color.positive},C(M.value.xAxis.name),9,Dt)])):d(``,!0),F.value.layout.areas.show?(y(),f(`g`,Ot,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),f(`g`,null,[e.series.length>2?(y(),f(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:F.value.layout.areas.useGradient?`url(#quadrant_gradient_${D.value}_${t})`:w(ie)(e.color,F.value.layout.areas.opacity),points:w(o)(e)},null,8,kt)):d(``,!0)]))),256))])):d(``,!0),p(`g`,null,[p(`rect`,{onClick:i[4]||=e=>K(`TL`),x:V.value.left,y:V.value.top,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,At),p(`rect`,{onClick:i[5]||=e=>K(`TR`),x:V.value.centerX,y:V.value.top,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,jt),p(`rect`,{onClick:i[6]||=e=>K(`BR`),x:V.value.centerX,y:V.value.centerY,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,Mt),p(`rect`,{onClick:i[7]||=e=>K(`BL`),x:V.value.left,y:V.value.centerY,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,Nt)]),N.value.plotLabels.showAsTag?(y(),f(c,{key:7},[z.value.plotLabels.show?(y(),f(`g`,Bt,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),f(c,null,[(y(!0),f(c,null,x(e.series,n=>(y(),f(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-N.value.plotLabels.fontSize,onMouseover:r=>Cr(e,n,t),onMouseleave:e=>wr(n,t),onClick:r=>Tr(e,n,t)},[p(`div`,{style:v(`color:${w(me)(e.color)};margin: 0 auto; font-size:${N.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},C(n.name),5)],40,Vt))),256))],64))),256))])):d(``,!0)],64)):(y(),f(c,{key:6},[(y(!0),f(c,null,x(Y.value,(t,n)=>(y(),f(`g`,null,[e.$slots.datapoint&&!w(zn)?(y(!0),f(c,{key:0},x(t.series,r=>(y(),f(`g`,{key:r.uid},[(y(),f(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>Cr(t,r,n),onMouseleave:e=>wr(r,n),onClick:e=>Tr(t,r,n)},[S(e.$slots,`datapoint`,Ke({ref_for:!0},{datapoint:{...r,onEnter:()=>Cr(t,r,n),onLeave:()=>wr(r,n),onClick:()=>Tr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)],40,Pt)),p(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(F.value.layout.plots.radius/(O.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Ft)]))),128)):e.$slots.datapointSvg&&!w(zn)?(y(!0),f(c,{key:1},x(t.series,r=>(y(),f(`g`,{key:r.uid},[S(e.$slots,`datapointSvg`,Ke({ref_for:!0},{datapoint:{...r,onEnter:()=>Cr(t,r,n),onLeave:()=>wr(r,n),onClick:()=>Tr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)]))),128)):(y(!0),f(c,{key:2},x(t.series,(e,r)=>(y(),f(`g`,{key:e.uid},[Ge(Me,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:F.value.layout.plots.radius/(O.value?1.5:1),shape:t.shape,stroke:F.value.layout.plots.outline?F.value.layout.plots.outlineColor:`none`,strokeWidth:F.value.layout.plots.outlineWidth,onMouseenter:r=>Cr(t,e,n,`pointer`),onMouseleave:t=>wr(e,n),onClick:r=>Tr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),p(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(F.value.layout.plots.radius/(O.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,It)]))),128))]))),256)),z.value.plotLabels.show?(y(),f(`g`,Lt,[(y(!0),f(c,null,x(Y.value,e=>(y(),f(`g`,null,[(y(!0),f(c,null,x(e.series,e=>(y(),f(`g`,null,[String(e.name).includes(`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ct as o,D as ee,Dt as te,Ht as ne,J as re,Jt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,i as s,in as ue,jt as de,nt as fe,pt as pe,r as me,t as he,w as ge,zt as _e}from"./lib-rPeBMZrn.js";import{n as ve,t as ye}from"./BaseScanner-8NdoBs7B.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as Ce}from"./resolveChartConfig-CIhClE5R.js";import{t as we}from"./chartImage-DPGnEuYM.js";import{n as Te}from"./Title-BliHuXfT.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{n as De,t as Oe}from"./tableIntegration-CNoJ1CIY.js";import{n as ke,t as Ae}from"./userOptionsSlots-DYuo-E5m.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./Shape-CRe8woTu.js";import{c as Ne}from"./canvas-lib-22VpOI4_.js";import{t as Pe}from"./useResponsive-CENUxfEL.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./Legend-DM0ClX3D.js";import{t as Ve}from"./vue_ui_quadrant-BUv-SqzP.js";import{Fragment as c,Teleport as He,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Ue,createTextVNode as We,createVNode as Ge,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Ke,nextTick as qe,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Je,onMounted as Ye,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as C,toRefs as Qe,unref as w,watch as $e,withCtx as T}from"vue";var et=/* @__PURE__ */ e({default:()=>ln}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`aria-describedby`,`viewBox`,`id`],ot=[`x`,`y`,`width`,`height`],st={key:1},ct=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],lt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],dt={key:2},ft=[`points`,`fill`],pt=[`points`,`fill`],mt=[`points`,`fill`],ht=[`points`,`fill`],gt={key:3},_t=[`y`,`fill`,`font-size`],vt=[`x`,`y`,`fill`,`font-size`],yt=[`x`,`y`,`fill`,`font-size`],bt=[`y`,`fill`,`font-size`],xt={key:4},St=[`x`,`y`,`font-size`,`fill`],Ct=[`x`,`y`,`font-size`,`fill`],wt=[`x`,`y`,`font-size`,`fill`],Tt=[`id`,`font-size`,`transform`,`fill`],Et=[`id`,`font-size`,`transform`,`fill`],Dt=[`id`,`font-size`,`transform`,`fill`],Ot={key:5},kt=[`fill`,`points`],At=[`x`,`y`,`width`,`height`],jt=[`x`,`y`,`width`,`height`],Mt=[`x`,`y`,`width`,`height`],Nt=[`x`,`y`,`width`,`height`],Pt=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Ft=[`data-a11y-plot-id`,`cx`,`cy`,`r`],It=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Lt={key:0,style:{"pointer-events":`none`}},Rt=[`x`,`y`,`font-size`,`fill`],zt=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Bt={key:0},Vt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Ht={key:8,class:`vue-ui-dna`},Ut=[`points`,`fill`],Wt=[`points`,`fill`],Gt=[`points`,`fill`],Kt=[`points`,`fill`],qt={key:9},Jt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Yt={key:10},Xt=[`x`,`y`,`fill`],Zt=[`x`,`y`,`fill`],Qt=[`x`,`y`,`fill`],$t=[`x`,`y`,`fill`],en=[`stroke`,`d`],tn=[`stroke`,`d`],nn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},rn={key:5,class:`vue-data-ui-watermark`},an=[`id`],on=[`onClick`],sn={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},cn=[`innerHTML`],ln=/*#__PURE__*/ Se({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Se,emit:et}){let ln=m(()=>import(`./Tooltip-C1q0Qoh7.js`)),un=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),dn=m(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),fn=m(()=>import(`./DataTable-Dof6yhO7.js`)),pn=m(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),mn=m(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),hn=m(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),gn=m(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_quadrant:_n}=i(),E=e,vn=l(()=>!!E.dataset&&E.dataset.length),D=b(oe()),yn=et,bn=b(!1),xn=b(``),Sn=b(0),O=b(!1),k=b(null),Cn=b(null),wn=b(null),Tn=b(null),En=b(null),Dn=b(0),On=b(0),kn=b(0),An=b(!1),jn=b(null),Mn=b(null),Nn=b(null),Pn=b(null),Fn=b({x:0,y:0}),In=b(`pointer`),Ln=b(!1),A=b(Wn()),j=l(()=>A.value.userOptions),M=l(()=>A.value.style.chart.layout.grid),N=l(()=>A.value.style.chart.layout.labels),P=l(()=>A.value.style.chart.tooltip),F=l(()=>A.value.style.chart);be({config:()=>A.value,dataset:()=>E.dataset,component:`VueUiQuadrant`,rules:[xe.emptyArray,xe.noHint]});let I=l(()=>A.value.userOptions.useCursorPointer),Rn=l(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:zn,FINAL_DATASET:Bn}=ve({...Qe(E),FINAL_CONFIG:A,prepareConfig:Wn,callback:()=>{Promise.resolve().then(async()=>{await qe(),z.value.showTable=A.value.table.show})},skeletonDataset:E.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:ue({defaultConfig:A.value,userConfig:Rn.value})}),{userOptionsVisible:Vn,setUserOptionsVisibility:Hn,keepUserOptionState:Un}=Re({config:A.value}),{svgRef:L}=ze({config:F.value.title});function Wn(){return Ce(E.config,_n,Ve)}let Gn=ce(E.config);$e(()=>E.config,(e,t)=>{let n=ce(e),r=n!==Gn;Gn=n;let i=Wn();r?(A.value=i,Vn.value=!A.value.userOptions.showOnChartHover,Jn(),Dn.value+=1,On.value+=1,kn.value+=1,z.value.plotLabels.show=N.value.plotLabels.show,z.value.showTable=A.value.table.show,z.value.showTooltip=P.value.show):(A.value.style.chart.tooltip=i.style.chart.tooltip,z.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let R=Ze(null),Kn=Ze(null),qn=l(()=>A.value.debug);function Jn(){if(_e(E.dataset)?le({componentName:`VueUiQuadrant`,type:`dataset`,debug:qn.value}):qn.value&&E.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),A.value.responsive){let e=Ne(()=>{let{width:e,height:t}=Pe({chart:k.value,title:F.value.title.text?Cn.value:null,legend:F.value.legend.show?wn.value:null,source:Tn.value,noTitle:En.value});B.value=48,requestAnimationFrame(()=>{V.value.height=t,V.value.usableHeight=t-B.value*2,V.value.width=e,V.value.usableWidth=e-B.value*2,V.value.top=B.value,V.value.left=B.value,V.value.right=e-B.value,V.value.bottom=t-B.value,V.value.centerX=e/2,V.value.centerY=t-t/2,V.value.padding=B.value})});R.value&&(Kn.value&&R.value.unobserve(Kn.value),R.value.disconnect()),R.value=new ResizeObserver(e),Kn.value=k.value.parentNode,R.value.observe(Kn.value)}}Ye(()=>{An.value=!0,Jn()}),Je(()=>{R.value&&(Kn.value&&R.value.unobserve(Kn.value),R.value.disconnect())});let{isPrinting:Yn,isImaging:Xn,generatePdf:Zn,generateImage:Qn}=je({elementId:`vue-ui-quadrant_${D.value}`,fileName:F.value.title.text||`vue-ui-quadrant`,options:A.value.userOptions.print}),$n=l(()=>A.value.userOptions.show&&!F.value.title.text),er=l(()=>ge(A.value.customPalette)),z=b({plotLabels:{show:N.value.plotLabels.show},showTable:A.value.table.show,showTooltip:P.value.show}),B=b(48),V=b({height:F.value.height,usableHeight:F.value.height-B.value*2,width:F.value.width,usableWidth:F.value.width-B.value*2,top:B.value,left:B.value,right:F.value.width-B.value,bottom:F.value.height-B.value,centerX:F.value.width/2,centerY:F.value.height-F.value.height/2,padding:B.value}),H=b({...JSON.parse(JSON.stringify(V.value)),startX:0,startY:0});$e(()=>V.value,e=>{e&&(H.value={...JSON.parse(JSON.stringify(V.value)),startX:0,startY:0})},{deep:!0});let U=b(null),W=l(()=>{switch(U.value){case`TL`:return{x:H.value.startX+H.value.width/2,y:H.value.height,text:N.value.quadrantLabels.tl.text||`Top Left`,fontSize:N.value.quadrantLabels.tl.fontSize,fill:N.value.quadrantLabels.tl.color,bold:N.value.quadrantLabels.tl.bold};case`TR`:return{x:H.value.startX+H.value.width/2,y:H.value.height,text:N.value.quadrantLabels.tr.text||`Top Right`,fontSize:N.value.quadrantLabels.tr.fontSize,fill:N.value.quadrantLabels.tr.color,bold:N.value.quadrantLabels.tr.bold};case`BR`:return{x:H.value.startX+H.value.width/2,y:H.value.height*1.678,text:N.value.quadrantLabels.br.text||`Bottom Right`,fontSize:N.value.quadrantLabels.br.fontSize,fill:N.value.quadrantLabels.br.color,bold:N.value.quadrantLabels.br.bold};case`BL`:return{x:H.value.startX+H.value.width/2,y:H.value.height*1.678,text:N.value.quadrantLabels.bl.text||`Bottom Left`,fontSize:N.value.quadrantLabels.bl.fontSize,fill:N.value.quadrantLabels.bl.color,bold:N.value.quadrantLabels.bl.bold};default:return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1}}}),tr=b(null),nr=b(!1);function rr({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){U.value&&Er(i);let a={x:e-H.value.startX,y:t-H.value.startY,w:n-H.value.width,h:r-H.value.height},o=A.value.zoomAnimationFrames,ee=0;function te(){nr.value=!0,H.value.startX+=a.x/o,H.value.startY+=a.y/o,H.value.width+=a.w/o,H.value.height+=a.h/o,ee+=1,ee<o?tr.value=requestAnimationFrame(te):nr.value=!1}te()}let G=l(()=>A.value.zoomEnabled);function K(e){if(G.value&&!nr.value){if(O.value&&U.value===e)rr({targetX:0,targetY:0,targetW:V.value.width,targetH:V.value.height}),U.value=null,O.value=!1;else{switch(U.value=e,e){case`TL`:rr({targetX:0,targetY:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`tl`});break;case`TR`:rr({targetX:V.value.width/2-V.value.left,targetY:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`tr`});break;case`BR`:rr({targetX:V.value.width/2-V.value.left,targetY:V.value.height/2-V.value.top,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`br`});break;case`BL`:rr({targetX:0,targetY:V.value.height/2-V.value.top,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`bl`});break;default:H.value.startX=0,H.value.startY=0,H.value.width=V.value.width,H.value.height=V.value.height}O.value=!0}}}let ir=l(()=>{let e=M.value.graduations.steps,t=V.value.usableWidth/(e*2),n=V.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:V.value.padding+t*i,y:n+V.value.usableHeight*(i/e/2),height:V.value.usableHeight*(1-i/e),width:V.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),q=l(()=>{let e=M.value.xAxis.max,t=M.value.xAxis.min,n=M.value.yAxis.max,r=M.value.yAxis.min;return M.value.xAxis.auto&&(e=Math.max(...ar.value.flatMap(e=>e.series.map(e=>e.x))),t=Math.min(...ar.value.flatMap(e=>e.series.map(e=>e.x)))),M.value.yAxis.auto&&(n=Math.max(...ar.value.flatMap(e=>e.series.map(e=>e.y))),r=Math.min(...ar.value.flatMap(e=>e.series.map(e=>e.y)))),{x:{max:e,min:t},y:{max:n,min:r}}}),J=b([]),ar=l(()=>Bn.value.map((e,t)=>({...e,series:de({data:e.series,threshold:A.value.downsample.threshold}),id:`cat_${t}_${D.value}`,color:ae(e.color)||er.value[t]||ne[t]}))),or=l(()=>ar.value.filter(e=>!J.value.includes(e.id))),sr=l(()=>ar.value.map((e,t)=>({...e,shape:e.shape||`circle`,series:e.series.map(t=>({...t,x:cr(t.x),y:lr(t.y),xValue:t.x,yValue:t.y,quadrantSide:vr({x:t.x,y:t.y}),categoryName:e.name,category:e,shape:e.shape,color:e.color}))}))),Y=l(()=>(qn.value&&Bn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),or.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||er.value[t]||ne[t],series:e.series.map(t=>({...t,category:e,x:cr(t.x),y:lr(t.y),xValue:t.x,yValue:t.y,quadrantSide:vr({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:oe()}))}))));function cr(e){if(e>=0){let t=e/q.value.x.max;return V.value.centerX+V.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(q.value.x.min);return V.value.centerX-V.value.usableWidth/2*t}}function lr(e){if(e>=0){let t=e/q.value.y.max;return V.value.centerY+(1-V.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(q.value.y.min);return V.value.centerY-(1-V.value.usableHeight/2*t)}}let ur=l(()=>{let e=Y.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:N.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=M.value.xAxis.name||`x`,n=M.value.yAxis.name||`y`;return{head:[A.value.translations.category,A.value.translations.item,t,n,A.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),itsShapes:e.map(e=>({shape:e.shape,color:e.color})),tableData:e}}),dr=l(()=>{let e=ur.value.head,t=ur.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,s(N.value.plotLabels.x.formatter,e.x,a({v:e.x,r:N.value.plotLabels.rounding})),s(N.value.plotLabels.y.formatter,e.y,a({v:e.y,r:N.value.plotLabels.rounding})),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:e}});function fr(){J.value.length?J.value=[]:X.value.forEach(e=>{J.value.push(e.id)}),yn(`selectLegend`,Dr())}function pr(e){J.value.includes(e)?J.value=J.value.filter(t=>t!==e):J.value.push(e),yn(`selectLegend`,Dr())}let X=l(()=>sr.value.map(e=>({name:e.name,shape:e.shape,color:e.color,id:e.id,opacity:J.value.includes(e.id)?.5:1,segregate:()=>pr(e.id),isSegregated:J.value.includes(e.id)})));function mr(e){return X.value.length?X.value.find(t=>t.name===e)||(qn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(qn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function hr(e){let t=mr(e);t!==null&&J.value.includes(t.id)&&pr(t.id)}function gr(e){let t=mr(e);t!==null&&(J.value.includes(t.id)||pr(t.id))}let _r=l(()=>({cy:`quadrant-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``}));function vr(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=b(null),yr=b(null),br=b(null);function xr(){Z.value=null,yr.value=null,Nn.value=null,Pn.value=null,bn.value=!1}function Sr(e){if(!L.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=L.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();Fn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function Cr(e,t,n,r=`pointer`,i=null){A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,yr.value={color:e.color,shape:e.shape},In.value=r,Nn.value=i,Pn.value=t.uid,br.value={datapoint:t,seriesIndex:n,series:Y.value,config:A.value};let o=P.value.customFormat;if(te(o)&&pe(()=>o({seriesIndex:n,datapoint:t,series:Y.value,config:A.value})))xn.value=o({seriesIndex:n,datapoint:t,series:Y.value,config:A.value});else{let r=``;t.quadrantSide&&(r+=`<div style="color:${N.value.quadrantLabels[t.quadrantSide].color};font-weight:${N.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${N.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${P.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${M.value.xAxis.name?M.value.xAxis.name:`x`}: <b>${s(N.value.plotLabels.x.formatter,t.xValue,a({v:t.xValue,r:P.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${M.value.yAxis.name?M.value.yAxis.name:`y`}: <b>${s(N.value.plotLabels.y.formatter,t.yValue,a({v:t.yValue,r:P.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,xn.value=`<div style="text-align:left;font-size:${P.value.fontSize}px">${r}</div>`}r===`keyboard`&&qe(()=>{Sr(t.uid)}),bn.value=!0}function wr(e,t){A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Pn.value!==e.uid||In.value!==`keyboard`)&&(bn.value=!1,Z.value=null,yr.value=null)}function Tr(e,t,n){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:N.value.quadrantLabels[t.quadrantSide].text};yn(`selectPlot`,r)}function Er(e){if(!e)return;let t=Y.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:N.value.quadrantLabels[e].text,items:[...t]};yn(`selectSide`,n)}let Q=l(()=>({TL:{tl:{x:V.value.left+V.value.usableWidth/4-20,y:0,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.left+V.value.usableWidth/4,y:0,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.left+V.value.usableWidth/4,y:20,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.left+V.value.usableWidth/4-20,y:20,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.left+V.value.usableWidth/4-20},20 ${V.value.left+V.value.usableWidth/4+20},20`,vertical:`M ${V.value.left+V.value.usableWidth/4},0 ${V.value.left+V.value.usableWidth/4},40`}},TR:{tl:{x:V.value.centerX+V.value.usableWidth/4-20,y:0,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.centerX+V.value.usableWidth/4,y:0,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.centerX+V.value.usableWidth/4,y:20,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.centerX+V.value.usableWidth/4-20,y:20,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.centerX+V.value.usableWidth/4-20},20 ${V.value.centerX+V.value.usableWidth/4+20},20`,vertical:`M ${V.value.centerX+V.value.usableWidth/4},0 ${V.value.centerX+V.value.usableWidth/4},40`}},BR:{tl:{x:V.value.centerX+V.value.usableWidth/4-20,y:V.value.centerY-48,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.centerX+V.value.usableWidth/4,y:V.value.centerY-48,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.centerX+V.value.usableWidth/4,y:V.value.centerY-28,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.centerX+V.value.usableWidth/4-20,y:V.value.centerY-28,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.centerX+V.value.usableWidth/4-20},${V.value.centerY-28} ${V.value.centerX+V.value.usableWidth/4+20},${V.value.centerY-28}`,vertical:`M ${V.value.centerX+V.value.usableWidth/4},${V.value.centerY-48} ${V.value.centerX+V.value.usableWidth/4},${V.value.centerY-8}`}},BL:{tl:{x:V.value.left+V.value.usableWidth/4-20,y:V.value.centerY-48,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.left+V.value.usableWidth/4,y:V.value.centerY-48,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.left+V.value.usableWidth/4,y:V.value.centerY-28,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.left+V.value.usableWidth/4-20,y:V.value.centerY-28,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.left+V.value.usableWidth/4-20},${V.value.centerY-28} ${V.value.left+V.value.usableWidth/4+20},${V.value.centerY-28}`,vertical:`M ${V.value.left+V.value.usableWidth/4},${V.value.centerY-48} ${V.value.left+V.value.usableWidth/4},${V.value.centerY-8}`}}}));function Dr(){return Y.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:N.value.quadrantLabels[e.quadrantSide].text}))}))}function Or(e=null){qe(()=>{let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=ur.value.head,r=ur.value.body,i=t.concat([n]).concat(r),a=ee(i);e?e(a):fe({csvContent:a,title:F.value.title.text||`vue-ui-quadrant`})})}let kr=b(!1);function Ar(e){kr.value=e,Sn.value+=1}function jr(){z.value.showTable=!z.value.showTable}function Mr(){z.value.plotLabels.show=!z.value.plotLabels.show}function Nr(){z.value.showTooltip=!z.value.showTooltip}let Pr=b(!1);function Fr(){Pr.value=!Pr.value}let Ir=we(k,()=>F.value.title.text),Lr=l(()=>Oe({config:A,style:F,mutableConfig:z,dialog:gn,accordion:dn,isFullscreen:kr,parent:k,maxWidth:800,isCursorPointer:I}));$e(()=>z.value.showTable,e=>De(e,A,jn));function Rr(){z.value.showTable=!1,Mn.value&&Mn.value.setTableIconState(!1)}let zr=l(()=>F.value.backgroundColor),Br=l(()=>F.value.legend),Vr=l(()=>F.value.title),{isCallbackImaging:Hr,isCallbackSvg:Ur,generateSvg:Wr,onGenerateImage:Gr}=Ee({svg:L,title:Vr,legend:Br,legendItems:X,backgroundColor:zr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Qn});async function Kr(){yn(`copyAlt`,{config:A.value,dataset:or.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:or.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qr(){Nn.value=null,Pn.value=null,Ln.value=!0}function Jr(){xr(),Ln.value=!1}function Yr(e){if(!L.value||Pr.value||document.activeElement!==L.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){xr();return}if(r){if(Nn.value===null)return;let e=$.value[Nn.value];if(!e)return;Tr(e.category,e.plot,e.categoryIndex);return}let a=Nn.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,ee=a!==null&&a>=0&&a<$.value.length,te=o!==null&&o>=0&&o<$.value.length;ee?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):te?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ne=$.value[a];ne&&Cr(ne.category,ne.plot,ne.categoryIndex,`keyboard`,a)}let Xr=l(()=>({headers:dr.value?.colNames??[],rows:dr.value?.a11yBody??[]})),$=l(()=>Y.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Se({getData:Dr,getImage:Ir,generatePdf:Zn,generateCsv:Or,generateImage:Qn,generateSvg:Wr,hideSeries:gr,showSeries:hr,toggleTable:jr,toggleLabels:Mr,toggleTooltip:Nr,toggleAnnotator:Fr,toggleFullscreen:Ar,copyAlt:Kr}),(e,i)=>(y(),f(`div`,{class:g(`vue-data-ui-component vue-ui-quadrant ${kr.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:k,id:`vue-ui-quadrant_${D.value}`,style:v(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),onMouseenter:i[14]||=()=>w(Hn)(!0),onMouseleave:i[15]||=()=>{w(Hn)(!1),Ln.value||xr()}},[p(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[p(`p`,null,C(A.value.a11y.translations.keyboardNavigation),1)],8,nt),Xr.value?.rows?.length?(y(),u(Le,{key:0,uid:D.value,head:Xr.value.headers,body:Xr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):d(``,!0),j.value.buttons.annotator?(y(),u(w(pn),Ke({key:1},w(n)(j.value.annotator),{svgRef:w(L),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Pr.value,isCursorPointer:I.value,palette:j.value.annotatorPalette,onClose:Fr}),Ue({_:2},[x(w(r),n=>({name:n,fn:T(r=>[S(e.$slots,n,_(h(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),$n.value?(y(),f(`div`,{key:2,ref_key:`noTitle`,ref:En,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),F.value.title.text?(y(),f(`div`,{key:3,ref_key:`chartTitle`,ref:Cn,style:`width:100%;background:transparent;padding-bottom:12px`},[(y(),u(Te,{key:`table_${Dn.value}`,config:{title:{cy:`quadrant-title`,...F.value.title},subtitle:{cy:`quadrant-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),p(`div`,{id:`legend-top-${D.value}`},null,8,rt),j.value.show&&vn.value&&(w(Un)||w(Vn))?(y(),u(w(mn),{ref_key:`userOptionsRef`,ref:Mn,key:`user_options_${Sn.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(Xn),isPrinting:w(Yn),uid:D.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasXls:j.value.buttons.csv,hasTable:j.value.buttons.table,hasLabel:j.value.buttons.labels,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,isFullscreen:kr.value,isTooltip:z.value.showTooltip,titles:{...j.value.buttonTitles},chartElement:k.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Pr.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Ar,onGeneratePdf:w(Zn),onGenerateCsv:Or,onGenerateImage:w(Gr),onGenerateSvg:w(Wr),onToggleTable:jr,onToggleLabels:Mr,onToggleTooltip:Nr,onToggleAnnotator:Fr,onCopyAlt:Kr,style:v({visibility:w(Un)?w(Vn)?`visible`:`hidden`:`visible`})},Ue({_:2},[x(w(ke)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(h(w(Ae)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):d(``,!0),p(`div`,it,[(y(),f(`svg`,{ref_key:`svgRef`,ref:L,xmlns:w(he),"aria-describedby":`chart-instructions-${D.value}`,class:g({"vue-data-ui-fullscreen--on":kr.value,"vue-data-ui-fulscreen--off":!kr.value}),viewBox:`${H.value.startX} ${H.value.startY} ${H.value.width} ${H.value.height}`,style:v(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),id:`svg_${D.value}`,tabindex:`0`,onFocus:qr,onBlur:Jr,onKeydown:Yr},[Ge(w(hn)),S(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:w(Yn)||w(Xn)||w(Hr),isPrintingSvg:w(Ur)}},void 0,!0),e.$slots[`chart-background`]?(y(),f(`foreignObject`,{key:0,x:H.value.startX,y:H.value.startY,width:H.value.width,height:H.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):d(``,!0),p(`defs`,null,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),u(Fe,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${D.value}_${t}`,key:`quadrant_gradient_${D.value}_${t}`,stops:[[`0%`,w(ie)(w(se)(e.color,.05),F.value.layout.areas.opacity),1],[`100%`,w(ie)(e.color,F.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),M.value.graduations.show?(y(),f(`g`,st,[(y(!0),f(c,null,x(ir.value,e=>(y(),f(`rect`,{fill:M.value.graduations.fill?w(ie)(M.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":M.value.graduations.strokeWidth,stroke:M.value.graduations.stroke,rx:M.value.graduations.roundingForce},null,8,ct))),256))])):d(``,!0),p(`line`,{x1:V.value.left,y1:V.value.centerY,x2:V.value.right,y2:V.value.centerY,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,lt),p(`line`,{x1:V.value.centerX,y1:V.value.top,x2:V.value.centerX,y2:V.value.bottom,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,ut),M.value.showArrows?(y(),f(`g`,dt,[p(`polygon`,{points:`${V.value.right-8},${V.value.centerY-6} ${V.value.right},${V.value.centerY} ${V.value.right-8},${V.value.centerY+6}`,fill:M.value.stroke,stroke:`none`},null,8,ft),p(`polygon`,{points:`${V.value.left+8},${V.value.centerY-6} ${V.value.left},${V.value.centerY} ${V.value.left+8},${V.value.centerY+6}`,fill:M.value.stroke,stroke:`none`},null,8,pt),p(`polygon`,{points:`${V.value.centerX-6},${V.value.top+8} ${V.value.centerX},${V.value.top} ${V.value.centerX+6},${V.value.top+8}`,fill:M.value.stroke,stroke:`none`},null,8,mt),p(`polygon`,{points:`${V.value.centerX-6},${V.value.bottom-8} ${V.value.centerX},${V.value.bottom} ${V.value.centerX+6},${V.value.bottom-8}`,fill:M.value.stroke,stroke:`none`},null,8,ht)])):d(``,!0),N.value.quadrantLabels.show&&!O.value?(y(),f(`g`,gt,[N.value.quadrantLabels.tl.text?(y(),f(`text`,{key:0,x:0,y:V.value.top-V.value.padding/2,"text-anchor":`start`,fill:N.value.quadrantLabels.tl.color,"font-size":N.value.quadrantLabels.tl.fontSize,style:v(`font-weight:${N.value.quadrantLabels.tl.bold?`bold`:``}`),onClick:i[0]||=e=>Er(`tl`)},C(N.value.quadrantLabels.tl.text),13,_t)):d(``,!0),N.value.quadrantLabels.tr.text?(y(),f(`text`,{key:1,x:V.value.width,y:V.value.top-V.value.padding/2,"text-anchor":`end`,fill:N.value.quadrantLabels.tr.color,"font-size":N.value.quadrantLabels.tr.fontSize,style:v(`font-weight:${N.value.quadrantLabels.tr.bold?`bold`:``}`),onClick:i[1]||=e=>Er(`tr`)},C(N.value.quadrantLabels.tr.text),13,vt)):d(``,!0),N.value.quadrantLabels.br.text?(y(),f(`text`,{key:2,x:V.value.width,y:V.value.bottom+V.value.padding*.7,"text-anchor":`end`,fill:N.value.quadrantLabels.br.color,"font-size":N.value.quadrantLabels.br.fontSize,style:v(`font-weight:${N.value.quadrantLabels.br.bold?`bold`:``}`),onClick:i[2]||=e=>Er(`br`)},C(N.value.quadrantLabels.br.text),13,yt)):d(``,!0),N.value.quadrantLabels.bl.text?(y(),f(`text`,{key:3,x:0,y:V.value.bottom+V.value.padding*.7,"text-anchor":`start`,fill:N.value.quadrantLabels.bl.color,"font-size":N.value.quadrantLabels.bl.fontSize,style:v(`font-weight:${N.value.quadrantLabels.bl.bold?`bold`:``}`),onClick:i[3]||=e=>Er(`bl`)},C(N.value.quadrantLabels.bl.text),13,bt)):d(``,!0)])):d(``,!0),N.value.axisLabels.show?(y(),f(`g`,xt,[M.value.yAxis.show?(y(),f(`text`,{key:0,x:V.value.centerX,y:V.value.top-V.value.padding/6,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.positive},C(w(s)(N.value.plotLabels.y.formatter,q.value.y.max,w(a)({v:q.value.y.max,r:N.value.plotLabels.rounding}))),9,St)):d(``,!0),p(`text`,{x:V.value.centerX,y:V.value.top-V.value.padding/2,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.positive},C(M.value.yAxis.name),9,Ct),M.value.yAxis.show?(y(),f(`text`,{key:1,x:V.value.centerX,y:V.value.bottom+V.value.padding*.35,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.negative},C(w(s)(N.value.plotLabels.y.formatter,q.value.y.min,w(a)({v:q.value.y.min,r:N.value.plotLabels.rounding}))),9,wt)):d(``,!0),M.value.xAxis.show?(y(),f(`text`,{key:2,id:`xLabelMin_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.padding-N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(-90)`,fill:N.value.axisLabels.color.negative},C(w(s)(N.value.plotLabels.x.formatter,q.value.x.min,w(a)({v:q.value.x.min,r:N.value.plotLabels.rounding}))),9,Tt)):d(``,!0),M.value.xAxis.show?(y(),f(`text`,{key:3,id:`xLabelMax_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.width-V.value.padding+N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:N.value.axisLabels.color.positive},C(w(s)(N.value.plotLabels.x.formatter,q.value.x.max,w(a)({v:q.value.x.max,r:N.value.plotLabels.rounding}))),9,Et)):d(``,!0),p(`text`,{id:`xLabelMaxName_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.width-N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:N.value.axisLabels.color.positive},C(M.value.xAxis.name),9,Dt)])):d(``,!0),F.value.layout.areas.show?(y(),f(`g`,Ot,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),f(`g`,null,[e.series.length>2?(y(),f(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:F.value.layout.areas.useGradient?`url(#quadrant_gradient_${D.value}_${t})`:w(ie)(e.color,F.value.layout.areas.opacity),points:w(o)(e)},null,8,kt)):d(``,!0)]))),256))])):d(``,!0),p(`g`,null,[p(`rect`,{onClick:i[4]||=e=>K(`TL`),x:V.value.left,y:V.value.top,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,At),p(`rect`,{onClick:i[5]||=e=>K(`TR`),x:V.value.centerX,y:V.value.top,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,jt),p(`rect`,{onClick:i[6]||=e=>K(`BR`),x:V.value.centerX,y:V.value.centerY,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,Mt),p(`rect`,{onClick:i[7]||=e=>K(`BL`),x:V.value.left,y:V.value.centerY,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,Nt)]),N.value.plotLabels.showAsTag?(y(),f(c,{key:7},[z.value.plotLabels.show?(y(),f(`g`,Bt,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),f(c,null,[(y(!0),f(c,null,x(e.series,n=>(y(),f(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-N.value.plotLabels.fontSize,onMouseover:r=>Cr(e,n,t),onMouseleave:e=>wr(n,t),onClick:r=>Tr(e,n,t)},[p(`div`,{style:v(`color:${w(me)(e.color)};margin: 0 auto; font-size:${N.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},C(n.name),5)],40,Vt))),256))],64))),256))])):d(``,!0)],64)):(y(),f(c,{key:6},[(y(!0),f(c,null,x(Y.value,(t,n)=>(y(),f(`g`,null,[e.$slots.datapoint&&!w(zn)?(y(!0),f(c,{key:0},x(t.series,r=>(y(),f(`g`,{key:r.uid},[(y(),f(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>Cr(t,r,n),onMouseleave:e=>wr(r,n),onClick:e=>Tr(t,r,n)},[S(e.$slots,`datapoint`,Ke({ref_for:!0},{datapoint:{...r,onEnter:()=>Cr(t,r,n),onLeave:()=>wr(r,n),onClick:()=>Tr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)],40,Pt)),p(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(F.value.layout.plots.radius/(O.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Ft)]))),128)):e.$slots.datapointSvg&&!w(zn)?(y(!0),f(c,{key:1},x(t.series,r=>(y(),f(`g`,{key:r.uid},[S(e.$slots,`datapointSvg`,Ke({ref_for:!0},{datapoint:{...r,onEnter:()=>Cr(t,r,n),onLeave:()=>wr(r,n),onClick:()=>Tr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)]))),128)):(y(!0),f(c,{key:2},x(t.series,(e,r)=>(y(),f(`g`,{key:e.uid},[Ge(Me,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:F.value.layout.plots.radius/(O.value?1.5:1),shape:t.shape,stroke:F.value.layout.plots.outline?F.value.layout.plots.outlineColor:`none`,strokeWidth:F.value.layout.plots.outlineWidth,onMouseenter:r=>Cr(t,e,n,`pointer`),onMouseleave:t=>wr(e,n),onClick:r=>Tr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),p(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(F.value.layout.plots.radius/(O.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,It)]))),128))]))),256)),z.value.plotLabels.show?(y(),f(`g`,Lt,[(y(!0),f(c,null,x(Y.value,e=>(y(),f(`g`,null,[(y(!0),f(c,null,x(e.series,e=>(y(),f(`g`,null,[String(e.name).includes(`
2
2
  `)?(y(),f(`text`,{key:1,x:e.x,y:e.y+N.value.plotLabels.offsetY+F.value.layout.plots.radius,"text-anchor":`middle`,"font-size":N.value.plotLabels.fontSize/(O.value?1.5:1),fill:N.value.plotLabels.color,innerHTML:w(re)({content:String(e.name),fontSize:F.value.layout.labels.plotLabels.fontSize/(O.value?1.5:1),fill:F.value.layout.labels.plotLabels.color,x:e.x,y:e.y+F.value.layout.labels.plotLabels.offsetY+F.value.layout.plots.radius})},null,8,zt)):(y(),f(`text`,{key:0,x:e.x,y:e.y+N.value.plotLabels.offsetY+F.value.layout.plots.radius,"text-anchor":`middle`,"font-size":N.value.plotLabels.fontSize/(O.value?1.5:1),fill:N.value.plotLabels.color},C(e.name),9,Rt))]))),256))]))),256))])):d(``,!0)],64)),O.value?(y(),f(`g`,Ht,[U.value===`TL`?(y(),f(`polygon`,{key:0,points:`${V.value.left-1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.top-1} ${V.value.right},${V.value.top-1} ${V.value.right},${V.value.bottom} ${V.value.left-1},${V.value.bottom} ${V.value.left-1},${V.value.centerY}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Ut)):d(``,!0),U.value===`TR`?(y(),f(`polygon`,{key:1,points:`${V.value.left},${V.value.top-1} ${V.value.centerX},${V.value.top-1} ${V.value.centerX},${V.value.centerY} ${V.value.right+1},${V.value.centerY} ${V.value.right+1},${V.value.bottom} ${V.value.left},${V.value.bottom} ${V.value.left},${V.value.top-1}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Wt)):d(``,!0),U.value===`BR`?(y(),f(`polygon`,{key:2,points:`${V.value.left},${V.value.top} ${V.value.right+1},${V.value.top} ${V.value.right+1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.bottom+1} ${V.value.left},${V.value.bottom+1} ${V.value.left},${V.value.top}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Gt)):d(``,!0),U.value===`BL`?(y(),f(`polygon`,{key:3,points:`${V.value.left-1},${V.value.top} ${V.value.right},${V.value.top} ${V.value.right},${V.value.bottom+1} ${V.value.centerX},${V.value.bottom+1} ${V.value.centerX},${V.value.centerY} ${V.value.left-1},${V.value.centerY} ${V.value.left-1},${V.value.top}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Kt)):d(``,!0)])):d(``,!0),U.value&&!nr.value?(y(),f(`g`,qt,[p(`text`,{x:W.value.x,y:W.value.y-W.value.fontSize/1.5,"font-size":W.value.fontSize/1.5,fill:W.value.fill,"text-anchor":`middle`,"font-weight":W.value.bold?`bold`:`normal`},C(W.value.text),9,Jt)])):d(``,!0),O.value&&U.value?(y(),f(`g`,Yt,[p(`rect`,{x:Q.value[U.value].tl.x,y:Q.value[U.value].tl.y,height:`20`,width:`20`,fill:Q.value[U.value].tl.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`TL`?1:.2}`),onClick:i[8]||=e=>K(`TL`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`TL`})},null,14,Xt),p(`rect`,{x:Q.value[U.value].tr.x,y:Q.value[U.value].tr.y,height:`20`,width:`20`,fill:Q.value[U.value].tr.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`TR`?1:.2}`),onClick:i[9]||=e=>K(`TR`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`TR`})},null,14,Zt),p(`rect`,{x:Q.value[U.value].br.x,y:Q.value[U.value].br.y,height:`20`,width:`20`,fill:Q.value[U.value].br.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`BR`?1:.2}`),onClick:i[10]||=e=>K(`BR`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`BR`})},null,14,Qt),p(`rect`,{x:Q.value[U.value].bl.x,y:Q.value[U.value].bl.y,height:`20`,width:`20`,fill:Q.value[U.value].bl.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`BL`?1:.2}`),onClick:i[11]||=e=>K(`BL`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`BL`})},null,14,$t),p(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:F.value.backgroundColor,"stroke-width":1,d:Q.value[U.value].crosshairs.horizontal},null,8,en),p(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:F.value.backgroundColor,"stroke-width":1,d:Q.value[U.value].crosshairs.vertical},null,8,tn)])):d(``,!0),S(e.$slots,`svg`,{svg:{...V.value,isPrintingImg:w(Yn)||w(Xn)||w(Hr),isPrintingSvg:w(Ur)}},void 0,!0)],46,at)),e.$slots.hint?(y(),f(`div`,nn,[S(e.$slots,`hint`,_(h({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Ln.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(y(),f(`div`,rn,[S(e.$slots,`watermark`,_(h({isPrinting:w(Yn)||w(Xn)||w(Hr)||w(Ur)})),void 0,!0)])):d(``,!0),p(`div`,{id:`legend-bottom-${D.value}`},null,8,an),An.value&&(F.value.legend.show||e.$slots.legend)?(y(),u(He,{key:6,to:F.value.legend.position===`top`?`#legend-top-${D.value}`:`#legend-bottom-${D.value}`},[p(`div`,{ref_key:`chartLegend`,ref:wn},[S(e.$slots,`legend`,{legend:X.value},()=>[F.value.legend.show?(y(),u(Be,{key:`legend_${kn.value}`,legendSet:X.value,config:_r.value,isCursorPointer:I.value,onClickMarker:i[12]||=({legend:e})=>pr(e.id)},{item:T(({legend:e})=>[w(zn)?d(``,!0):(y(),f(`div`,{key:0,onClick:t=>pr(e.id),style:v(`opacity:${J.value.includes(e.id)?.5:1}`)},C(e.name),13,on))]),legendToggle:T(()=>[X.value.length>2&&F.value.legend.selectAllToggle.show&&!w(zn)?(y(),u(Ie,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:J.value.length>0,isCursorPointer:I.value,onToggle:fr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):d(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):d(``,!0)],!0)],512)],8,[`to`])):d(``,!0),e.$slots.source?(y(),f(`div`,{key:7,ref_key:`source`,ref:Tn,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),Ge(w(ln),{teleportTo:P.value.teleportTo,show:z.value.showTooltip&&bn.value,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:k.value,content:xn.value,isFullscreen:kr.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:In.value===`keyboard`,a11yPosition:Fn.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,_(h({...br.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,_(h({...br.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,_(h({...br.value})),void 0,!0)]),default:T(()=>[P.value.showShape?(y(),f(`svg`,sn,[Ge(Me,{plot:{x:10,y:10},shape:yr.value.shape,color:yr.value.color,radius:8,stroke:F.value.layout.plots.outline?F.value.layout.plots.outlineColor:`none`,"stroke-width":F.value.layout.plots.outlineWidth},null,8,[`shape`,`color`,`stroke`,`stroke-width`])])):d(``,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),vn.value&&j.value.buttons.table?(y(),u(Xe(Lr.value.component),Ke({key:8},Lr.value.props,{ref_key:`tableUnit`,ref:jn,onClose:Rr}),Ue({content:T(()=>[(y(),u(w(fn),{key:`table_${On.value}`,colNames:dr.value.colNames,head:dr.value.head,body:dr.value.body,config:dr.value.config,title:A.value.table.useDialog?``:Lr.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:I.value,onClose:Rr},{th:T(({th:e})=>[We(C(e),1)]),td:T(({td:e})=>[p(`div`,{innerHTML:e.name||e},null,8,cn)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:T(()=>[We(C(Lr.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:T(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[13]||=e=>Or(j.value.callbacks.csv),style:v({cursor:I.value?`pointer`:`default`})},[Ge(w(un),{name:`fileCsv`,stroke:Lr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),S(e.$slots,`skeleton`,{},()=>[w(zn)?(y(),u(ye,{key:0})):d(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-1c2a6ea2`]]);export{et as n,ln as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Dt as o,Ht as s,It as c,J as l,Kt as ee,P as u,S as te,X as ne,_ as re,at as ie,b as d,et as ae,f as oe,h as se,i as f,in as ce,nn as le,p as ue,pt as de,t as fe,w as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./img-D4RQwASc.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./useTimeLabels-Das5O74F.js";import{t as De}from"./usePrinter-DVf3YcG5.js";import{t as Oe}from"./useTransitions-ChGGrtrv.js";import{t as ke}from"./useStableElementSize-CegFbRlF.js";import{t as Ae}from"./useSvgLabelLayout-42Kats14.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./SlicerPreview-ChKbdZSU.js";import{t as Pe}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./annotationViewport-X8fvs7pz.js";import{t as Re}from"./vue_ui_quick_chart-BRfcRW6Z.js";import{Fragment as p,Teleport as ze,computed as m,createBlock as Be,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as Ve,createVNode as He,defineAsyncComponent as Ue,guardReactiveProps as We,mergeProps as Ge,nextTick as Ke,normalizeClass as v,normalizeProps as qe,normalizeStyle as y,onBeforeUnmount as Je,onMounted as Ye,openBlock as b,ref as x,renderList as S,renderSlot as C,shallowRef as Xe,toDisplayString as w,toRefs as Ze,unref as T,watch as Qe,watchEffect as $e,withCtx as et}from"vue";var E={LINE:`LINE`,BAR:`BAR`,DONUT:`DONUT`},tt=[`SERIE`,`SERIES`,`DATA`,`VALUE`,`VALUES`,`NUM`];function nt({dataset:e,barLineSwitch:t=6,debug:n=!0}){let r=null,i=null,a=0;if((typeof e==`number`||typeof e==`string`)&&n&&console.warn(`The provided dataset (${e}) is not sufficient to build a chart`),it(e)&&(at(e)&&(r=e.length<t?E.BAR:E.LINE,i=e,a=e.length),ot(e))){if(!ct(e))return n&&console.warn(`The objects in the dataset array have a different data structure. Either keys or value types are different.`),!1;let o=Object.keys(e[0]),s=Object.values(e[0]);if(!o.some(e=>lt(e)))return n&&console.warn(`The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important.`),!1;ut(s,e=>typeof e==`number`)&&(r=E.DONUT,i=e),ut(s,e=>Array.isArray(e)&&at(e))&&(r=dt(e)>t?E.LINE:E.BAR,a=dt(e),i=e.map(e=>({...e,data:ft(e,e=>at(e))}))),e=e.map(e=>D(e)),i=i.map(e=>D(e))}return{dataset:e,type:r,usableDataset:i,maxSeriesLength:a}}function rt(e){return!e||it(e)&&!e.length}function it(e){return Array.isArray(e)}function at(e){if(!it(e)||rt(e))return!1;let t=e.map(e=>Number(e));return![...new Set(t.flatMap(e=>typeof e==`number`&&!isNaN(e)))].includes(!1)}function ot(e){return!it(e)||rt(e)||[...new Set(e.flatMap(e=>typeof e==`object`&&!Array.isArray(e)))].includes(!1)?!1:!e.map(e=>Object.keys(e).length>0).includes(!1)}function st(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){let a=n[i],o=r[i];if(a!==o||typeof e[a]!=typeof t[o])return!1}return!0}function ct(e){if(e.length<=1)return!0;for(let t=0;t<e.length;t+=1)for(let n=t+1;n<e.length;n+=1)if(!st(e[t],e[n]))return!1;return!0}function lt(e){return tt.includes(e.toUpperCase())}function ut(e,t){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n.includes(!0)}function dt(e){return Math.max(...[...e].flatMap(e=>Object.values(e).filter(e=>at(e)).map(e=>e.length)))}function ft(e,t){return Object.values(e).filter(e=>t(e))[0]}function D(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toUpperCase()]=e[n]);return t}var O=/* @__PURE__ */ e({default:()=>Bn}),pt=[`id`],mt=[`id`],ht=[`id`],gt={style:{position:`relative`}},_t=[`xmlns`,`aria-describedby`,`viewBox`],vt=[`x`,`y`,`width`,`height`],yt=[`x`,`y`,`width`,`height`],bt=[`width`,`height`],xt=[`id`],St=[`id`],Ct=[`id`],wt=[`flood-color`],Tt={key:0,class:`donut-label-connectors`},Et=[`d`,`stroke`,`stroke-width`,`filter`],Dt=[`cx`,`cy`,`r`,`fill`,`filter`],Ot={class:`donut`},kt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],At=[`d`,`onMouseenter`,`onMouseout`,`onClick`],jt={key:1,class:`donut-labels`},Mt=[`cx`,`cy`,`fill`,`stroke`,`filter`],Nt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Pt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Ft={key:2,class:`donut-hollow`},It=[`x`,`y`,`font-size`,`fill`],Lt=[`x`,`y`,`font-size`,`fill`],Rt={key:0,class:`line-grid`},zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Vt={key:1,class:`line-axis`},Ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Wt=[`d`,`stroke`,`stroke-width`],Gt=[`transform`,`font-size`,`fill`],Kt={key:3,class:`periodLabels`},qt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Jt={key:0},Yt=[`font-size`,`text-anchor`,`fill`,`transform`],Xt=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],Zt={class:`plots`},Qt=[`d`,`stroke`,`stroke-width`],$t=[`d`,`stroke`,`stroke-width`],en=[`d`,`stroke`,`stroke-width`],tn=[`d`,`stroke`,`stroke-width`],nn=[`cx`,`cy`,`fill`,`stroke`],rn={key:4,class:`dataLabels`},an=[`font-size`,`fill`,`transform`],on={key:5,class:`tooltip-traps`},sn=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],cn={key:0,class:`line-grid`},ln=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],un=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dn={key:1,class:`line-axis`},fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mn=[`d`,`stroke`,`stroke-width`],hn=[`transform`,`font-size`,`fill`],gn={key:3,class:`periodLabels`},_n=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vn={key:0},yn=[`font-size`,`text-anchor`,`fill`,`transform`],bn=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],xn={class:`plots`},Sn=[`x`,`width`,`height`,`y`,`fill`,`stroke`,`stroke-width`],Cn={key:4,class:`dataLabels`},wn=[`transform`,`font-size`,`fill`],Tn={key:5,class:`tooltip-traps`},En=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Dn={key:6,class:`axis-labels`},On=[`font-size`,`fill`,`x`,`y`],kn=[`font-size`,`fill`,`x`,`y`],An=[`font-size`,`fill`,`transform`],jn=[`font-size`,`fill`,`transform`],Mn=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Nn={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Pn={key:5,class:`vue-data-ui-watermark`},Fn=[`id`],In=[`onClick`,`onKeydown`],Ln=[`onClick`,`onKeydown`],Rn=[`onClick`,`onKeydown`],zn={key:1,class:`vue-ui-quick-chart-not-processable`},Bn=/*#__PURE__*/ ye({__name:`vue-ui-quick-chart`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ye,emit:tt}){let rt=Ue(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),it=Ue(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),st=Ue(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ct=Ue(()=>import(`./Tooltip-C1q0Qoh7.js`)),lt=Ue(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),{vue_ui_quick_chart:ut}=i(),{isThemeValid:dt,warnInvalidTheme:ft}=xe(),D=e,O=x(null),Bn=x(null),Vn=x(null),Hn=x(null),k=x(ne()),A=x(!1),Un=x(null),Wn=x(``),j=x(null),Gn=x(null),Kn=x(null),M=x([]),qn=x(0),Jn=x(0),Yn=x(!1),Xn=x(null),Zn=x(null),Qn=x(null),$n=x(null),er=x(null),tr=x(null),nr=Xe(null),rr=x(!1),ir=x(0),ar=x(0),or=x(!1);function sr(){nr.value=O.value?.parentNode??null}function cr(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function lr(){let e=++ar.value;rr.value=!1,await Ke(),await cr(),await cr(),e===ar.value&&(ir.value+=1,rr.value=!0)}function ur(){or.value||(or.value=!0,Ke(()=>{or.value=!1,sr(),lr()}))}let dr=ke({elementRef:nr,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{lr()}});x(`#FFFFFF`);let N=x(Tr());_e({config:()=>N.value,dataset:()=>D.dataset,component:`VueUiQuickChart`,rules:[ve.emptyArray,{test:()=>!0,message:[`👀 This is a swiss-knife component. If you need more control, consider using dedicated components:`,``,`▶️ VueUiXy for time series line and/or bars`,``,`▶️ VueUiDonut, VueUiWaffle, VueUiRings for proportions`]}]});let{transitionEnabled:P}=Oe({config:()=>N.value.transitions,dataset:()=>D.dataset}),fr=m(()=>N.value.debug),pr=m(()=>N.value.useCursorPointer),F=x(null),mr=x({x:0,y:0}),I=x(`pointer`),hr=x(!1),gr=m(()=>ce({dafaultConfig:{backgroundColor:`#99999930`,customPalette:[`#BABABA`],showDataLabels:!1,paletteStartIndex:0,showUserOptions:!1,showTooltip:!1,xAxisLabel:``,yAxisLabel:``,xyAxisStroke:`#999999`,xyGridStroke:`#99999950`,xyPeriods:[],xyShowScale:!1,xyPaddingLeft:6,xyPaddingBottom:12,zoomXy:!1,zoomStartIndex:null,zoomEndIndex:null},userConfig:N.value.skeletonConfig??{}})),{loading:_r,FINAL_DATASET:vr,manualLoading:yr}=he({...Ze(D),FINAL_CONFIG:N,prepareConfig:Tr,skeletonDataset:D.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89],skeletonConfig:ce({defaultConfig:N.value,userConfig:gr.value})}),{svgRef:L}=Ie({config:{text:N.value.title}}),br=m(()=>N.value.showUserOptionsOnChartHover),xr=m(()=>N.value.keepUserOptionsStateOnChartLeave),Sr=x(!N.value.showUserOptionsOnChartHover),Cr=x(!1);function wr(e=!1){Cr.value=e,br.value&&(Sr.value=e)}function Tr(){let e=be({userConfig:D.config,defaultConfig:ut}),t={},n=e.theme;if(n){if(!dt.value(e))ft(e),t=e;else{let r=be({userConfig:Re[n]||D.config,defaultConfig:e});t={...be({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:le[n]||s}}}else t=e;return t}function Er(e){let t=ae(e);return t?.tooltipPosition&&delete t.tooltipPosition,JSON.stringify(t)}let Dr=Er(D.config);Qe(()=>D.config,(e,t)=>{let n=Er(e),r=n!==Dr;Dr=n;let i=Tr();r?(_r.value||(N.value=i),N.value.responsive||(V.value.width=N.value.width,V.value.height=N.value.height),Sr.value=!N.value.showUserOptionsOnChartHover,Hr(),Rr.value.showTooltip=N.value.showTooltip):(N.value.tooltipPosition=i.tooltipPosition,Rr.value.showTooltip=N.value.showTooltip)},{deep:!0}),Qe(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(yr.value=!1)},{immediate:!0});let Or=m(()=>pe(N.value.customPalette)),R=tt,kr=m(()=>{let e=nt({debug:fr.value,dataset:ee(vr.value,[`serie`,`series`,`data`,`value`,`values`,`num`]),barLineSwitch:N.value.chartIsBarUnderDatasetLength});return!e&&fr.value&&console.error(`VueUiQuickChart : Dataset is not processable`),e}),z=x(kr.value),Ar=m(()=>!!z.value),B=m(()=>z.value?z.value.type:null),jr=m(()=>[E.BAR,E.LINE].includes(B.value)),Mr=m(()=>jr.value&&N.value.zoomXy&&Number(z.value?.maxSeriesLength??0)>1);Qe(()=>B.value,e=>{e||ie({componentName:`VueUiQuickChart`,type:`dataset`,debug:fr.value})},{immediate:!0});let{isPrinting:Nr,isImaging:Pr,generatePdf:Fr,generateImage:Ir}=De({elementId:`${B.value}_${k.value}`,fileName:N.value.title||B.value,options:N.value.userOptionsPrint}),Lr=m(()=>N.value.showUserOptions&&!N.value.title),V=x({width:N.value.width,height:N.value.height}),Rr=x({showTooltip:N.value.showTooltip});Qe(N,()=>{Rr.value={showTooltip:N.value.showTooltip}},{immediate:!0});let H=Xe(null),zr=Xe(null),Br=x(!1),Vr=0;Ye(()=>{Yn.value=!0,sr(),dr.start(),Hr(),lr()});function Hr(){me(D.dataset)||(yr.value=N.value.loading),N.value.responsive&&(H.value&&(zr.value&&H.value.unobserve(zr.value),H.value.disconnect()),H.value=new ResizeObserver(()=>{let{width:e,height:t}=Me({chart:O.value,title:N.value.title?Bn.value:null,legend:N.value.showLegend?Vn.value:null,slicer:Mr.value?Hn.value:null,source:Gn.value,noTitle:Kn.value});cancelAnimationFrame(Vr),Vr=requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,Br.value=!0,ur()})}),zr.value=O.value.parentNode,H.value.observe(zr.value)),xi(),ur()}Je(()=>{cancelAnimationFrame(Vr),dr.stop(),hi(),Bi(),H.value&&(zr.value&&H.value.unobserve(zr.value),H.value.disconnect(),H.value=null,zr.value=null)});let Ur=m(()=>{switch(B.value){case E.LINE:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;case E.BAR:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;case E.DONUT:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;default:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`}});function Wr(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}function Gr(e){return N.value.blurOnHover&&![null,void 0].includes(j.value)&&j.value!==e?`url(#blur_${k.value})`:``}function Kr(){M.value.length?M.value=[]:B.value===E.DONUT?W.value.legend.forEach(e=>{M.value.push(e.id)}):B.value===E.LINE?Z.value.legend.forEach(e=>{M.value.push(e.id)}):B.value===E.BAR&&Q.value.legend.forEach(e=>{M.value.push(e.id)}),B.value===E.DONUT?R(`selectLegend`,W.value.dataset):B.value===E.LINE?R(`selectLegend`,Z.value.dataset):B.value===E.BAR&&R(`selectLegend`,Q.value.dataset)}function qr(e,t){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<t&&M.value.push(e)}let Jr=x(null),Yr=x(null),Xr=x(!1);function Zr(e,t){Xr.value=!0;let n=e.value,r=kr.value.dataset.find((t,n)=>e.id===`donut_${n}`).VALUE;if(M.value.includes(e.id)){M.value=M.value.filter(t=>t!==e.id);function t(){n>r?(Xr.value=!1,cancelAnimationFrame(Yr.value),z.value={...z.value,dataset:z.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:r,VALUE:r}:t)},R(`selectLegend`,W.value.dataset)):(n+=r*.025,z.value={...z.value,dataset:z.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Yr.value=requestAnimationFrame(t))}t()}else if(t.length>1){function t(){n<r/100?(Xr.value=!1,cancelAnimationFrame(Jr.value),M.value.push(e.id),z.value={...z.value,dataset:z.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:0,VALUE:0}:t)},R(`selectLegend`,W.value.dataset)):(n/=1.1,z.value={...z.value,dataset:z.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Jr.value=requestAnimationFrame(t))}t()}else R(`selectLegend`,W.value.dataset)}let U=x(null);function Qr(e){U.value=e}let $r=m(()=>N.value.donutThicknessRatio<.01?.01:N.value.donutThicknessRatio>.4?.4:N.value.donutThicknessRatio),W=m(()=>{if(B.value!==E.DONUT)return null;let e=z.value.dataset.map((e,t)=>({...e,value:e.VALUE||e.DATA||e.SERIE||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`donut_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Or.value[t+N.value.paletteStartIndex]||s[t+N.value.paletteStartIndex]||s[(t+N.value.paletteStartIndex)%s.length],immutableValue:e.value}));function t(e,t){return a({v:isNaN(e.value/Wr(t))?0:e.value/Wr(t)*100,s:`%`,r:N.value.dataLabelRoundingPercentage})}function n(e){return e.proportion*100>N.value.donutHideLabelUnderPercentage}function r(e,t){let n=kr.value.dataset.find((t,n)=>`donut_${n}`===e).VALUE;return Math.abs(String(Number(n.toFixed(0))).length-String(Number(t.toFixed(0))).length)}function i({datapoint:t,seriesIndex:n,triggerMode:r=`pointer`}){Un.value={datapoint:t,seriesIndex:n,config:N.value,dataset:e},j.value=t.id,F.value=n,I.value=r;let i=N.value.tooltipCustomFormat;if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:t,seriesIndex:n}),o(i)&&de(()=>i({datapoint:t,seriesIndex:n,series:e,config:N.value})))Wn.value=i({datapoint:t,seriesIndex:n,series:e,config:N.value});else{let e=``;e+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,e+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`,e+=`<b>${f(N.value.formatter,t.value,a({p:N.value.valuePrefix,v:t.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}</b>`,e+=`<span>(${a({v:t.proportion*100,s:`%`,r:N.value.dataLabelRoundingPercentage})})</span></div>`,Wn.value=`<div>${e}</div>`}A.value=!0}function l({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),A.value=!1,j.value=null,U.value=null,F.value=null,I.value=`pointer`}function ee({datapoint:e,seriesIndex:t}){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t}),R(`selectDatapoint`,e)}let u={centerX:V.value.width/2,centerY:V.value.height/2},ne=e.filter(e=>!M.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0),re=e.map((e,t)=>({...e,proportion:(e.value||0)/ne,value:e.value||0,absoluteValue:kr.value.dataset.find((t,n)=>`donut_${n}`===e.id).VALUE,shape:`circle`})),ie=V.value.width/2,d=V.value.height/2,ae=V.value.height*N.value.donutRadiusRatio;return{dataset:re.filter(e=>!M.value.includes(e.id)),legend:re,drawingArea:u,displayArcPercentage:t,isArcBigEnough:n,useTooltip:i,killTooltip:l,selectDatapoint:ee,getSpaces:r,total:ne,cx:ie,cy:d,radius:ae,chart:c({series:e.filter(e=>!M.value.includes(e.id))},ie,d,ae,ae,1.99999,2,1,360,105.25,V.value.height*$r.value)}}),G=x({start:0,end:z.value.maxSeriesLength}),ei=x({...G.value}),ti=x(null),K=x(!1),ni=x(!1),ri=x(!1),q=x(!1),ii=x(!1),ai=x(null),J=x(null),Y=x(null),oi=x(!1),si=x({time:0,x:0,y:0,pointerType:null}),ci={show:!1,selection:{fill:`#2D353C`,stroke:`transparent`,fillOpacity:.1,strokeOpacity:.5,strokeWidth:1,strokeDasharray:0}},li=m(()=>{let e=N.value.dragToZoom??{};return{...ci,...e,selection:{...ci.selection,...e.selection??{}}}}),ui=m(()=>jr.value&&li.value.show&&K.value&&gi()>1&&!_r.value),di=null,fi={};function pi(e,t=G.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function mi(e){let t=pi(e);t&&R(`update:zoomState`,t)}function hi(){di&&=(cancelAnimationFrame(di),null),fi={}}function gi(){let e=Number(z.value?.maxSeriesLength);return Number.isFinite(e)?Math.max(0,e):0}function _i(e,t=G.value.start){let n=gi();if(n<=0)return 0;let r=Math.max(0,Math.min(Number(t)||0,n-1)),i=Number(e);return Number.isFinite(i)?i>n?n:i<=r?Math.min(r+1,n):Math.max(0,i):Math.min(r+1,n)}function vi(){let e=gi();if(e<=0){G.value={start:0,end:0},ei.value={...G.value},ti.value&&ti.value.setRangeValues(0,0);return}let t=Number(G.value.start),n=Number(G.value.end);Number.isFinite(t)||(t=0),Number.isFinite(n)||(n=e),t=Math.max(0,Math.min(t,e-1)),n=Math.max(t+1,Math.min(n,e)),G.value={start:t,end:n},ei.value={start:t,end:n},ti.value&&ti.value.setRangeValues(t,n)}function yi(e){if(!jr.value)return null;let t=pi(e);return t?((t.start!==Number(G.value.start)||t.end!==Number(G.value.end))&&(hi(),G.value={start:t.start,end:t.end},ei.value={...G.value},vi(),ur()),{start:Number(G.value.start),end:Number(G.value.end)}):null}function bi(e){let t=yi(e);return t?(mi(t),t):null}async function xi({applyControlledZoom:e=!0}={}){if(!ni.value){if(!jr.value)K.value=!1;else{ni.value=!0;try{await Ke(),await Ke();let{zoomStartIndex:t,zoomEndIndex:n}=N.value,r=gi();if(r<=0){G.value={start:0,end:0},ei.value={...G.value},K.value=!1;return}let i=t==null?0:Number(t),a=n==null?r:_i(Number(n)+1,i);if(e&&pi(D.zoomState)){let e=pi(D.zoomState);i=e.start,a=e.end}ri.value=!0,G.value={start:i,end:a},ei.value={start:i,end:a},vi(),K.value=!0,await Ke(),ti.value&&ti.value.setRangeValues(G.value.start,G.value.end)}finally{queueMicrotask(()=>{ri.value=!1}),ni.value=!1,ur()}}}}async function Si({applyControlledZoom:e=!1,publish:t=!1}={}){hi(),await xi({applyControlledZoom:e}),t&&(mi({start:Number(G.value.start),end:Number(G.value.end)}),R(`zoomReset`))}function Ci(e){fi={...fi,...e},di&&cancelAnimationFrame(di),di=requestAnimationFrame(()=>{let e={...G.value,...fi};fi={},di=null,G.value=e,ei.value={...e},vi(),mi({start:Number(G.value.start),end:Number(G.value.end)}),ur()})}function wi(e){if(ni.value||ri.value)return;let t=Number(e);Number.isFinite(t)&&(R(`zoomStart`,{index:t,isZoom:t!==0}),(t!==G.value.start||fi.end!==void 0)&&Ci({start:t}))}function Ti(e){if(ni.value||ri.value)return;let t=fi.start===void 0?G.value.start:fi.start,n=_i(Number(e),t);R(`zoomEnd`,{index:n,isZoom:n!==gi()}),(n!==G.value.end||fi.start!==void 0)&&Ci({end:n})}Qe([()=>D.zoomState,jr,()=>Number(z.value?.maxSeriesLength??0)],async([e,t,n])=>{!t||n<=0||!e||(K.value?yi(e):await xi({applyControlledZoom:!0}))},{deep:!0,immediate:!0}),Qe(kr,async e=>{if(!e){K.value=!1;return}let t=z.value?.type,n=Number(z.value?.maxSeriesLength??0);z.value=e;let r=e.type,i=Number(e.maxSeriesLength??0);[E.BAR,E.LINE].includes(r)?(t!==r||n!==i?(hi(),K.value=!1,G.value={start:0,end:i},ei.value={...G.value},Jn.value+=1,await Ke(),await xi({applyControlledZoom:!0})):D.zoomState&&yi(D.zoomState),ur()):(hi(),K.value=!1,ur())},{deep:!0});let Ei=m(()=>{if(!N.value.zoomMinimap.show||B.value===E.DONUT)return[];let e=[];at(z.value.dataset)&&(e=z.value.dataset),ot(z.value.dataset)&&(e=z.value.dataset.map((e,t)=>({values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,id:B.value===E.LINE?`line_${t}`:`bar_${t}`})).filter(e=>!M.value.includes(e.id)));let t=at(e)?e.length:Math.max(...e.map(e=>e.values.length)),n=[];if(at(e))n=e;else for(let r=0;r<t;r+=1)n.push(e.map(e=>e.values[r]||0).reduce((e,t)=>(e||0)+(t||0),0));let r=Math.min(...n);return n.map(e=>e+(r<0?Math.abs(r):0))}),{metrics:Di,ready:Oi,settling:X,update:ki}=Ae({svgRef:L,canMeasure:()=>(!N.value.responsive||Br.value)&&(![E.LINE,E.BAR].includes(B.value)||$i.value),initialMetrics:{scale:0,bottom:0,leftOverhang:0},measure:e=>({scale:e($n.value).textWidth,bottom:e(Qn.value).height,leftOverhang:e(Qn.value).leftOverhang})});function Ai(){return Math.max(Di.value.scale+4,Di.value.leftOverhang-N.value.xyPaddingLeft)}let ji=m(()=>Di.value.bottom),Z=m(()=>{if(B.value!==E.LINE)return null;let e={height:V.value.height,width:V.value.width},t=Ai(),n={left:t+N.value.xyPaddingLeft,top:N.value.xyPaddingTop,right:e.width-N.value.xyPaddingRight,bottom:e.height-N.value.xyPaddingBottom-ji.value,width:Math.max(10,e.width-N.value.xyPaddingLeft-N.value.xyPaddingRight-t),height:Math.max(10,e.height-N.value.xyPaddingTop-N.value.xyPaddingBottom-ji.value)},r=[];at(z.value.dataset)&&(r=[{values:z.value.dataset.slice(G.value.start,G.value.end),absoluteValues:z.value.dataset,absoluteIndices:z.value.dataset.map((e,t)=>t).slice(G.value.start,G.value.end),name:N.value.title,color:Or.value[N.value.paletteStartIndex]||s[N.value.paletteStartIndex],id:`line_0`}]),ot(z.value.dataset)&&(r=z.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`line_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Or.value[t+N.value.paletteStartIndex]||s[t+N.value.paletteStartIndex]||s[(t+N.value.paletteStartIndex)%s.length],values:e.values.slice(G.value.start,G.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(G.value.start,G.value.end)})));let i={max:Math.max(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),min:Math.min(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),maxSeries:Math.max(...r.map(e=>e.values.length))},c=i.max===i.min?re(Math.min(i.min,0),i.min===0?1:Math.max(i.min,0),N.value.xyScaleSegments):re(i.min<0?i.min:0,i.max<0?0:i.max,N.value.xyScaleSegments),l=i.min<0?Math.abs(i.min):0,ee=i.max<0?n.top:n.bottom-l/(c.max+l)*n.height,u=n.width/i.maxSeries,ne=c.ticks.map(e=>({y:n.bottom-n.height*((e+l)/(c.max+l)),x:n.left-8,value:e})),ie=r.map((e,t)=>({...e,shape:`circle`,coordinates:e.values.map((e,t)=>({x:n.left+u*(t+1)-u/2,y:n.bottom-(e+l)/(c.max+l)*n.height,value:e}))})).map(e=>{let t=[];return e.coordinates.forEach(e=>{t.push(`${e.x},${e.y} `)}),{...e,linePath:t.join(` `)}});function d(e){return r.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!M.value.includes(e.id))}function ae(e,t=`pointer`){if(q.value&&t===`pointer`)return;j.value=e,U.value=e,F.value=e,I.value=t;let n=d(e);Un.value={datapoint:n,seriesIndex:e,config:N.value,dataset:r};let i=N.value.tooltipCustomFormat;if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:n,seriesIndex:e+G.value.start}),o(i)&&de(()=>i({datapoint:n,seriesIndex:e,series:r,config:N.value})))Wn.value=i({datapoint:n,seriesIndex:e,series:r,config:N.value});else{let e=``;$.value[n[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`),n.forEach((t,n)=>{e+=`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Dt as o,Ht as s,It as c,J as l,Kt as ee,P as u,S as te,X as ne,_ as re,at as ie,b as d,et as ae,f as oe,h as se,i as f,in as ce,nn as le,p as ue,pt as de,t as fe,w as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./img-D4RQwASc.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./useTimeLabels-Das5O74F.js";import{t as De}from"./usePrinter-DVf3YcG5.js";import{t as Oe}from"./useTransitions-ChGGrtrv.js";import{t as ke}from"./useStableElementSize-CegFbRlF.js";import{t as Ae}from"./useSvgLabelLayout-42Kats14.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./SlicerPreview-ChKbdZSU.js";import{t as Pe}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./annotationViewport-X8fvs7pz.js";import{t as Re}from"./vue_ui_quick_chart-BRfcRW6Z.js";import{Fragment as p,Teleport as ze,computed as m,createBlock as Be,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as Ve,createVNode as He,defineAsyncComponent as Ue,guardReactiveProps as We,mergeProps as Ge,nextTick as Ke,normalizeClass as v,normalizeProps as qe,normalizeStyle as y,onBeforeUnmount as Je,onMounted as Ye,openBlock as b,ref as x,renderList as S,renderSlot as C,shallowRef as Xe,toDisplayString as w,toRefs as Ze,unref as T,watch as Qe,watchEffect as $e,withCtx as et}from"vue";var E={LINE:`LINE`,BAR:`BAR`,DONUT:`DONUT`},tt=[`SERIE`,`SERIES`,`DATA`,`VALUE`,`VALUES`,`NUM`];function nt({dataset:e,barLineSwitch:t=6,debug:n=!0}){let r=null,i=null,a=0;if((typeof e==`number`||typeof e==`string`)&&n&&console.warn(`The provided dataset (${e}) is not sufficient to build a chart`),it(e)&&(at(e)&&(r=e.length<t?E.BAR:E.LINE,i=e,a=e.length),ot(e))){if(!ct(e))return n&&console.warn(`The objects in the dataset array have a different data structure. Either keys or value types are different.`),!1;let o=Object.keys(e[0]),s=Object.values(e[0]);if(!o.some(e=>lt(e)))return n&&console.warn(`The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important.`),!1;ut(s,e=>typeof e==`number`)&&(r=E.DONUT,i=e),ut(s,e=>Array.isArray(e)&&at(e))&&(r=dt(e)>t?E.LINE:E.BAR,a=dt(e),i=e.map(e=>({...e,data:ft(e,e=>at(e))}))),e=e.map(e=>D(e)),i=i.map(e=>D(e))}return{dataset:e,type:r,usableDataset:i,maxSeriesLength:a}}function rt(e){return!e||it(e)&&!e.length}function it(e){return Array.isArray(e)}function at(e){if(!it(e)||rt(e))return!1;let t=e.map(e=>Number(e));return![...new Set(t.flatMap(e=>typeof e==`number`&&!isNaN(e)))].includes(!1)}function ot(e){return!it(e)||rt(e)||[...new Set(e.flatMap(e=>typeof e==`object`&&!Array.isArray(e)))].includes(!1)?!1:!e.map(e=>Object.keys(e).length>0).includes(!1)}function st(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){let a=n[i],o=r[i];if(a!==o||typeof e[a]!=typeof t[o])return!1}return!0}function ct(e){if(e.length<=1)return!0;for(let t=0;t<e.length;t+=1)for(let n=t+1;n<e.length;n+=1)if(!st(e[t],e[n]))return!1;return!0}function lt(e){return tt.includes(e.toUpperCase())}function ut(e,t){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n.includes(!0)}function dt(e){return Math.max(...[...e].flatMap(e=>Object.values(e).filter(e=>at(e)).map(e=>e.length)))}function ft(e,t){return Object.values(e).filter(e=>t(e))[0]}function D(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toUpperCase()]=e[n]);return t}var O=/* @__PURE__ */ e({default:()=>Bn}),pt=[`id`],mt=[`id`],ht=[`id`],gt={style:{position:`relative`}},_t=[`xmlns`,`aria-describedby`,`viewBox`],vt=[`x`,`y`,`width`,`height`],yt=[`x`,`y`,`width`,`height`],bt=[`width`,`height`],xt=[`id`],St=[`id`],Ct=[`id`],wt=[`flood-color`],Tt={key:0,class:`donut-label-connectors`},Et=[`d`,`stroke`,`stroke-width`,`filter`],Dt=[`cx`,`cy`,`r`,`fill`,`filter`],Ot={class:`donut`},kt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],At=[`d`,`onMouseenter`,`onMouseout`,`onClick`],jt={key:1,class:`donut-labels`},Mt=[`cx`,`cy`,`fill`,`stroke`,`filter`],Nt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Pt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Ft={key:2,class:`donut-hollow`},It=[`x`,`y`,`font-size`,`fill`],Lt=[`x`,`y`,`font-size`,`fill`],Rt={key:0,class:`line-grid`},zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Vt={key:1,class:`line-axis`},Ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Wt=[`d`,`stroke`,`stroke-width`],Gt=[`transform`,`font-size`,`fill`],Kt={key:3,class:`periodLabels`},qt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Jt={key:0},Yt=[`font-size`,`text-anchor`,`fill`,`transform`],Xt=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],Zt={class:`plots`},Qt=[`d`,`stroke`,`stroke-width`],$t=[`d`,`stroke`,`stroke-width`],en=[`d`,`stroke`,`stroke-width`],tn=[`d`,`stroke`,`stroke-width`],nn=[`cx`,`cy`,`fill`,`stroke`],rn={key:4,class:`dataLabels`},an=[`font-size`,`fill`,`transform`],on={key:5,class:`tooltip-traps`},sn=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],cn={key:0,class:`line-grid`},ln=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],un=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dn={key:1,class:`line-axis`},fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mn=[`d`,`stroke`,`stroke-width`],hn=[`transform`,`font-size`,`fill`],gn={key:3,class:`periodLabels`},_n=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vn={key:0},yn=[`font-size`,`text-anchor`,`fill`,`transform`],bn=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],xn={class:`plots`},Sn=[`x`,`width`,`height`,`y`,`fill`,`stroke`,`stroke-width`],Cn={key:4,class:`dataLabels`},wn=[`transform`,`font-size`,`fill`],Tn={key:5,class:`tooltip-traps`},En=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Dn={key:6,class:`axis-labels`},On=[`font-size`,`fill`,`x`,`y`],kn=[`font-size`,`fill`,`x`,`y`],An=[`font-size`,`fill`,`transform`],jn=[`font-size`,`fill`,`transform`],Mn=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Nn={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Pn={key:5,class:`vue-data-ui-watermark`},Fn=[`id`],In=[`onClick`,`onKeydown`],Ln=[`onClick`,`onKeydown`],Rn=[`onClick`,`onKeydown`],zn={key:1,class:`vue-ui-quick-chart-not-processable`},Bn=/*#__PURE__*/ ye({__name:`vue-ui-quick-chart`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ye,emit:tt}){let rt=Ue(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),it=Ue(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),st=Ue(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ct=Ue(()=>import(`./Tooltip-C1q0Qoh7.js`)),lt=Ue(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),{vue_ui_quick_chart:ut}=i(),{isThemeValid:dt,warnInvalidTheme:ft}=xe(),D=e,O=x(null),Bn=x(null),Vn=x(null),Hn=x(null),k=x(ne()),A=x(!1),Un=x(null),Wn=x(``),j=x(null),Gn=x(null),Kn=x(null),M=x([]),qn=x(0),Jn=x(0),Yn=x(!1),Xn=x(null),Zn=x(null),Qn=x(null),$n=x(null),er=x(null),tr=x(null),nr=Xe(null),rr=x(!1),ir=x(0),ar=x(0),or=x(!1);function sr(){nr.value=O.value?.parentNode??null}function cr(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function lr(){let e=++ar.value;rr.value=!1,await Ke(),await cr(),await cr(),e===ar.value&&(ir.value+=1,rr.value=!0)}function ur(){or.value||(or.value=!0,Ke(()=>{or.value=!1,sr(),lr()}))}let dr=ke({elementRef:nr,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{lr()}});x(`#FFFFFF`);let N=x(Tr());_e({config:()=>N.value,dataset:()=>D.dataset,component:`VueUiQuickChart`,rules:[ve.emptyArray,{test:()=>!0,message:[`👀 This is a swiss-knife component. If you need more control, consider using dedicated components:`,``,`▶️ VueUiXy for time series line and/or bars`,``,`▶️ VueUiDonut, VueUiWaffle, VueUiRings for proportions`]}]});let{transitionEnabled:P}=Oe({config:()=>N.value.transitions,dataset:()=>D.dataset}),fr=m(()=>N.value.debug),pr=m(()=>N.value.useCursorPointer),F=x(null),mr=x({x:0,y:0}),I=x(`pointer`),hr=x(!1),gr=m(()=>ce({dafaultConfig:{backgroundColor:`#99999930`,customPalette:[`#BABABA`],showDataLabels:!1,paletteStartIndex:0,showUserOptions:!1,showTooltip:!1,xAxisLabel:``,yAxisLabel:``,xyAxisStroke:`#999999`,xyGridStroke:`#99999950`,xyPeriods:[],xyShowScale:!1,xyPaddingLeft:6,xyPaddingBottom:12,zoomXy:!1,zoomStartIndex:null,zoomEndIndex:null},userConfig:N.value.skeletonConfig??{}})),{loading:_r,FINAL_DATASET:vr,manualLoading:yr}=he({...Ze(D),FINAL_CONFIG:N,prepareConfig:Tr,skeletonDataset:D.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89],skeletonConfig:ce({defaultConfig:N.value,userConfig:gr.value})}),{svgRef:L}=Ie({config:{text:N.value.title}}),br=m(()=>N.value.showUserOptionsOnChartHover),xr=m(()=>N.value.keepUserOptionsStateOnChartLeave),Sr=x(!N.value.showUserOptionsOnChartHover),Cr=x(!1);function wr(e=!1){Cr.value=e,br.value&&(Sr.value=e)}function Tr(){let e=be({userConfig:D.config,defaultConfig:ut}),t={},n=e.theme;if(n){if(!dt.value(e))ft(e),t=e;else{let r=be({userConfig:Re[n]||D.config,defaultConfig:e});t={...be({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:le[n]||s}}}else t=e;return t}function Er(e){let t=ae(e);return t?.tooltipPosition&&delete t.tooltipPosition,JSON.stringify(t)}let Dr=Er(D.config);Qe(()=>D.config,(e,t)=>{let n=Er(e),r=n!==Dr;Dr=n;let i=Tr();r?(_r.value||(N.value=i),N.value.responsive||(V.value.width=N.value.width,V.value.height=N.value.height),Sr.value=!N.value.showUserOptionsOnChartHover,Hr(),Rr.value.showTooltip=N.value.showTooltip):(N.value.tooltipPosition=i.tooltipPosition,Rr.value.showTooltip=N.value.showTooltip)},{deep:!0}),Qe(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(yr.value=!1)},{immediate:!0});let Or=m(()=>pe(N.value.customPalette)),R=tt,kr=m(()=>{let e=nt({debug:fr.value,dataset:ee(vr.value,[`serie`,`series`,`data`,`value`,`values`,`num`]),barLineSwitch:N.value.chartIsBarUnderDatasetLength});return!e&&fr.value&&console.error(`VueUiQuickChart : Dataset is not processable`),e}),z=x(kr.value),Ar=m(()=>!!z.value),B=m(()=>z.value?z.value.type:null),jr=m(()=>[E.BAR,E.LINE].includes(B.value)),Mr=m(()=>jr.value&&N.value.zoomXy&&Number(z.value?.maxSeriesLength??0)>1);Qe(()=>B.value,e=>{e||ie({componentName:`VueUiQuickChart`,type:`dataset`,debug:fr.value})},{immediate:!0});let{isPrinting:Nr,isImaging:Pr,generatePdf:Fr,generateImage:Ir}=De({elementId:`${B.value}_${k.value}`,fileName:N.value.title||B.value,options:N.value.userOptionsPrint}),Lr=m(()=>N.value.showUserOptions&&!N.value.title),V=x({width:N.value.width,height:N.value.height}),Rr=x({showTooltip:N.value.showTooltip});Qe(N,()=>{Rr.value={showTooltip:N.value.showTooltip}},{immediate:!0});let H=Xe(null),zr=Xe(null),Br=x(!1),Vr=0;Ye(()=>{Yn.value=!0,sr(),dr.start(),Hr(),lr()});function Hr(){me(D.dataset)||(yr.value=N.value.loading),N.value.responsive&&(H.value&&(zr.value&&H.value.unobserve(zr.value),H.value.disconnect()),H.value=new ResizeObserver(()=>{let{width:e,height:t}=Me({chart:O.value,title:N.value.title?Bn.value:null,legend:N.value.showLegend?Vn.value:null,slicer:Mr.value?Hn.value:null,source:Gn.value,noTitle:Kn.value});cancelAnimationFrame(Vr),Vr=requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,Br.value=!0,ur()})}),zr.value=O.value.parentNode,H.value.observe(zr.value)),xi(),ur()}Je(()=>{cancelAnimationFrame(Vr),dr.stop(),hi(),Bi(),H.value&&(zr.value&&H.value.unobserve(zr.value),H.value.disconnect(),H.value=null,zr.value=null)});let Ur=m(()=>{switch(B.value){case E.LINE:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;case E.BAR:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;case E.DONUT:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;default:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`}});function Wr(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}function Gr(e){return N.value.blurOnHover&&![null,void 0].includes(j.value)&&j.value!==e?`url(#blur_${k.value})`:``}function Kr(){M.value.length?M.value=[]:B.value===E.DONUT?W.value.legend.forEach(e=>{M.value.push(e.id)}):B.value===E.LINE?Z.value.legend.forEach(e=>{M.value.push(e.id)}):B.value===E.BAR&&Q.value.legend.forEach(e=>{M.value.push(e.id)}),B.value===E.DONUT?R(`selectLegend`,W.value.dataset):B.value===E.LINE?R(`selectLegend`,Z.value.dataset):B.value===E.BAR&&R(`selectLegend`,Q.value.dataset)}function qr(e,t){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<t&&M.value.push(e)}let Jr=x(null),Yr=x(null),Xr=x(!1);function Zr(e,t){Xr.value=!0;let n=e.value,r=kr.value.dataset.find((t,n)=>e.id===`donut_${n}`).VALUE;if(M.value.includes(e.id)){M.value=M.value.filter(t=>t!==e.id);function t(){n>r?(Xr.value=!1,cancelAnimationFrame(Yr.value),z.value={...z.value,dataset:z.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:r,VALUE:r}:t)},R(`selectLegend`,W.value.dataset)):(n+=r*.025,z.value={...z.value,dataset:z.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Yr.value=requestAnimationFrame(t))}t()}else if(t.length>1){function t(){n<r/100?(Xr.value=!1,cancelAnimationFrame(Jr.value),M.value.push(e.id),z.value={...z.value,dataset:z.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:0,VALUE:0}:t)},R(`selectLegend`,W.value.dataset)):(n/=1.1,z.value={...z.value,dataset:z.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Jr.value=requestAnimationFrame(t))}t()}else R(`selectLegend`,W.value.dataset)}let U=x(null);function Qr(e){U.value=e}let $r=m(()=>N.value.donutThicknessRatio<.01?.01:N.value.donutThicknessRatio>.4?.4:N.value.donutThicknessRatio),W=m(()=>{if(B.value!==E.DONUT)return null;let e=z.value.dataset.map((e,t)=>({...e,value:e.VALUE||e.DATA||e.SERIE||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`donut_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Or.value[t+N.value.paletteStartIndex]||s[t+N.value.paletteStartIndex]||s[(t+N.value.paletteStartIndex)%s.length],immutableValue:e.value}));function t(e,t){return a({v:isNaN(e.value/Wr(t))?0:e.value/Wr(t)*100,s:`%`,r:N.value.dataLabelRoundingPercentage})}function n(e){return e.proportion*100>N.value.donutHideLabelUnderPercentage}function r(e,t){let n=kr.value.dataset.find((t,n)=>`donut_${n}`===e).VALUE;return Math.abs(String(Number(n.toFixed(0))).length-String(Number(t.toFixed(0))).length)}function i({datapoint:t,seriesIndex:n,triggerMode:r=`pointer`}){Un.value={datapoint:t,seriesIndex:n,config:N.value,dataset:e},j.value=t.id,F.value=n,I.value=r;let i=N.value.tooltipCustomFormat;if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:t,seriesIndex:n}),o(i)&&de(()=>i({datapoint:t,seriesIndex:n,series:e,config:N.value})))Wn.value=i({datapoint:t,seriesIndex:n,series:e,config:N.value});else{let e=``;e+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,e+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`,e+=`<b>${f(N.value.formatter,t.value,a({p:N.value.valuePrefix,v:t.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}</b>`,e+=`<span>(${a({v:t.proportion*100,s:`%`,r:N.value.dataLabelRoundingPercentage})})</span></div>`,Wn.value=`<div>${e}</div>`}A.value=!0}function l({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),A.value=!1,j.value=null,U.value=null,F.value=null,I.value=`pointer`}function ee({datapoint:e,seriesIndex:t}){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t}),R(`selectDatapoint`,e)}let u={centerX:V.value.width/2,centerY:V.value.height/2},ne=e.filter(e=>!M.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0),re=e.map((e,t)=>({...e,proportion:(e.value||0)/ne,value:e.value||0,absoluteValue:kr.value.dataset.find((t,n)=>`donut_${n}`===e.id).VALUE,shape:`circle`})),ie=V.value.width/2,d=V.value.height/2,ae=V.value.height*N.value.donutRadiusRatio;return{dataset:re.filter(e=>!M.value.includes(e.id)),legend:re,drawingArea:u,displayArcPercentage:t,isArcBigEnough:n,useTooltip:i,killTooltip:l,selectDatapoint:ee,getSpaces:r,total:ne,cx:ie,cy:d,radius:ae,chart:c({series:e.filter(e=>!M.value.includes(e.id))},ie,d,ae,ae,1.99999,2,1,360,105.25,V.value.height*$r.value)}}),G=x({start:0,end:z.value.maxSeriesLength}),ei=x({...G.value}),ti=x(null),K=x(!1),ni=x(!1),ri=x(!1),q=x(!1),ii=x(!1),ai=x(null),J=x(null),Y=x(null),oi=x(!1),si=x({time:0,x:0,y:0,pointerType:null}),ci={show:!1,selection:{fill:`#2D353C`,stroke:`transparent`,fillOpacity:.1,strokeOpacity:.5,strokeWidth:1,strokeDasharray:0}},li=m(()=>{let e=N.value.dragToZoom??{};return{...ci,...e,selection:{...ci.selection,...e.selection??{}}}}),ui=m(()=>jr.value&&li.value.show&&K.value&&gi()>1&&!_r.value),di=null,fi={};function pi(e,t=G.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function mi(e){let t=pi(e);t&&R(`update:zoomState`,t)}function hi(){di&&=(cancelAnimationFrame(di),null),fi={}}function gi(){let e=Number(z.value?.maxSeriesLength);return Number.isFinite(e)?Math.max(0,e):0}function _i(e,t=G.value.start){let n=gi();if(n<=0)return 0;let r=Math.max(0,Math.min(Number(t)||0,n-1)),i=Number(e);return Number.isFinite(i)?i>n?n:i<=r?Math.min(r+1,n):Math.max(0,i):Math.min(r+1,n)}function vi(){let e=gi();if(e<=0){G.value={start:0,end:0},ei.value={...G.value},ti.value&&ti.value.setRangeValues(0,0);return}let t=Number(G.value.start),n=Number(G.value.end);Number.isFinite(t)||(t=0),Number.isFinite(n)||(n=e),t=Math.max(0,Math.min(t,e-1)),n=Math.max(t+1,Math.min(n,e)),G.value={start:t,end:n},ei.value={start:t,end:n},ti.value&&ti.value.setRangeValues(t,n)}function yi(e){if(!jr.value)return null;let t=pi(e);return t?((t.start!==Number(G.value.start)||t.end!==Number(G.value.end))&&(hi(),G.value={start:t.start,end:t.end},ei.value={...G.value},vi(),ur()),{start:Number(G.value.start),end:Number(G.value.end)}):null}function bi(e){let t=yi(e);return t?(mi(t),t):null}async function xi({applyControlledZoom:e=!0}={}){if(!ni.value){if(!jr.value)K.value=!1;else{ni.value=!0;try{await Ke(),await Ke();let{zoomStartIndex:t,zoomEndIndex:n}=N.value,r=gi();if(r<=0){G.value={start:0,end:0},ei.value={...G.value},K.value=!1;return}let i=t==null?0:Number(t),a=n==null?r:_i(Number(n)+1,i);if(e&&pi(D.zoomState)){let e=pi(D.zoomState);i=e.start,a=e.end}ri.value=!0,G.value={start:i,end:a},ei.value={start:i,end:a},vi(),K.value=!0,await Ke(),ti.value&&ti.value.setRangeValues(G.value.start,G.value.end)}finally{queueMicrotask(()=>{ri.value=!1}),ni.value=!1,ur()}}}}async function Si({applyControlledZoom:e=!1,publish:t=!1}={}){hi(),await xi({applyControlledZoom:e}),t&&(mi({start:Number(G.value.start),end:Number(G.value.end)}),R(`zoomReset`))}function Ci(e){fi={...fi,...e},di&&cancelAnimationFrame(di),di=requestAnimationFrame(()=>{let e={...G.value,...fi};fi={},di=null,G.value=e,ei.value={...e},vi(),mi({start:Number(G.value.start),end:Number(G.value.end)}),ur()})}function wi(e){if(ni.value||ri.value)return;let t=Number(e);Number.isFinite(t)&&(R(`zoomStart`,{index:t,isZoom:t!==0}),(t!==G.value.start||fi.end!==void 0)&&Ci({start:t}))}function Ti(e){if(ni.value||ri.value)return;let t=fi.start===void 0?G.value.start:fi.start,n=_i(Number(e),t);R(`zoomEnd`,{index:n,isZoom:n!==gi()}),(n!==G.value.end||fi.start!==void 0)&&Ci({end:n})}Qe([()=>D.zoomState,jr,()=>Number(z.value?.maxSeriesLength??0)],async([e,t,n])=>{!t||n<=0||!e||(K.value?yi(e):await xi({applyControlledZoom:!0}))},{deep:!0,immediate:!0}),Qe(kr,async e=>{if(!e){K.value=!1;return}let t=z.value?.type,n=Number(z.value?.maxSeriesLength??0);z.value=e;let r=e.type,i=Number(e.maxSeriesLength??0);[E.BAR,E.LINE].includes(r)?(t!==r||n!==i?(hi(),K.value=!1,G.value={start:0,end:i},ei.value={...G.value},Jn.value+=1,await Ke(),await xi({applyControlledZoom:!0})):D.zoomState&&yi(D.zoomState),ur()):(hi(),K.value=!1,ur())},{deep:!0});let Ei=m(()=>{if(!N.value.zoomMinimap.show||B.value===E.DONUT)return[];let e=[];at(z.value.dataset)&&(e=z.value.dataset),ot(z.value.dataset)&&(e=z.value.dataset.map((e,t)=>({values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,id:B.value===E.LINE?`line_${t}`:`bar_${t}`})).filter(e=>!M.value.includes(e.id)));let t=at(e)?e.length:Math.max(...e.map(e=>e.values.length)),n=[];if(at(e))n=e;else for(let r=0;r<t;r+=1)n.push(e.map(e=>e.values[r]||0).reduce((e,t)=>(e||0)+(t||0),0));let r=Math.min(...n);return n.map(e=>e+(r<0?Math.abs(r):0))}),{metrics:Di,ready:Oi,settling:X,update:ki}=Ae({svgRef:L,canMeasure:()=>(!N.value.responsive||Br.value)&&(![E.LINE,E.BAR].includes(B.value)||$i.value),initialMetrics:{scale:0,bottom:0,leftOverhang:0},measure:e=>({scale:e($n.value).textWidth,bottom:e(Qn.value).height,leftOverhang:e(Qn.value).leftOverhang})});function Ai(){return Math.max(Di.value.scale+4,Di.value.leftOverhang-N.value.xyPaddingLeft)}let ji=m(()=>Di.value.bottom),Z=m(()=>{if(B.value!==E.LINE)return null;let e={height:V.value.height,width:V.value.width},t=Ai(),n={left:t+N.value.xyPaddingLeft,top:N.value.xyPaddingTop,right:e.width-N.value.xyPaddingRight,bottom:e.height-N.value.xyPaddingBottom-ji.value,width:Math.max(10,e.width-N.value.xyPaddingLeft-N.value.xyPaddingRight-t),height:Math.max(10,e.height-N.value.xyPaddingTop-N.value.xyPaddingBottom-ji.value)},r=[];at(z.value.dataset)&&(r=[{values:z.value.dataset.slice(G.value.start,G.value.end),absoluteValues:z.value.dataset,absoluteIndices:z.value.dataset.map((e,t)=>t).slice(G.value.start,G.value.end),name:N.value.title,color:Or.value[N.value.paletteStartIndex]||s[N.value.paletteStartIndex],id:`line_0`}]),ot(z.value.dataset)&&(r=z.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`line_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Or.value[t+N.value.paletteStartIndex]||s[t+N.value.paletteStartIndex]||s[(t+N.value.paletteStartIndex)%s.length],values:e.values.slice(G.value.start,G.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(G.value.start,G.value.end)})));let i={max:Math.max(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),min:Math.min(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),maxSeries:Math.max(...r.map(e=>e.values.length))},c=i.max===i.min?re(Math.min(i.min,0),i.min===0?1:Math.max(i.min,0),N.value.xyScaleSegments):re(i.min<0?i.min:0,i.max<0?0:i.max,N.value.xyScaleSegments),l=i.min<0?Math.abs(i.min):0,ee=i.max<0?n.top:n.bottom-l/(c.max+l)*n.height,u=n.width/i.maxSeries,ne=c.ticks.map(e=>({y:n.bottom-n.height*((e+l)/(c.max+l)),x:n.left-8,value:e})),ie=r.map((e,t)=>({...e,shape:`circle`,coordinates:e.values.map((e,t)=>({x:n.left+u*(t+1)-u/2,y:n.bottom-(e+l)/(c.max+l)*n.height,value:e}))})).map(e=>{let t=[];return e.coordinates.forEach(e=>{t.push(`${e.x},${e.y} `)}),{...e,linePath:t.join(` `)}});function d(e){return r.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!M.value.includes(e.id))}function ae(e,t=`pointer`){if(q.value&&t===`pointer`)return;j.value=e,U.value=e,F.value=e,I.value=t;let n=d(e);Un.value={datapoint:n,seriesIndex:e,config:N.value,dataset:r};let i=N.value.tooltipCustomFormat;if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:n,seriesIndex:e+G.value.start}),o(i)&&de(()=>i({datapoint:n,seriesIndex:e,series:r,config:N.value})))Wn.value=i({datapoint:n,seriesIndex:e,series:r,config:N.value});else{let e=``;$.value[n[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`),n.forEach((t,n)=>{e+=`
2
2
  <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
3
  <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>
4
4
  <span>${t.name}:</span>
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as ee,Ht as s,Jt as c,Lt as te,M as ne,S as re,X as ie,Yt as ae,Zt as oe,at as l,b as se,i as ce,in as le,nn as ue,nt as de,pt as fe,t as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{n as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-DPGnEuYM.js";import{n as we}from"./Title-BliHuXfT.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{c as je}from"./canvas-lib-22VpOI4_.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./DefGrad-DKMq1REY.js";import{t as Pe}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useUserOptionState-CXlFnwPv.js";import{t as Le}from"./useChartAccessibility-DOMuYJfm.js";import{t as Re}from"./Legend-DM0ClX3D.js";import{t as ze}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Be}from"./vue_ui_radar-68iK9Fam.js";import{Fragment as u,Teleport as Ve,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as He,createTextVNode as Ue,createVNode as We,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ge,nextTick as Ke,normalizeClass as qe,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Je,onMounted as Ye,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as w,toRefs as Qe,unref as T,watch as $e,withCtx as E}from"vue";var et=/* @__PURE__ */ e({default:()=>jt}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`aria-describedby`,`viewBox`],ot=[`width`,`height`],st={key:1},ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:0,style:{"pointer-events":`none`}},ut=[`d`,`stroke`,`stroke-width`],dt=[`d`,`stroke`,`stroke-width`],ft={key:2},pt=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],mt=[`points`,`stroke`,`stroke-width`],ht=[`points`,`stroke`,`stroke-width`,`fill`],gt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],_t={key:4},vt=[`onMouseenter`,`onMouseleave`,`onClick`],yt=[`cx`,`cy`,`r`],bt=[`cx`,`cy`,`fill`,`r`,`stroke`],xt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},St={key:5,class:`vue-data-ui-watermark`},Ct=[`id`],wt=[`onClick`],Tt={class:`vue-data-ui-legend-item`},Et=[`stroke`,`stroke-width`,`stroke-dasharray`],Dt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},Ot={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},kt={class:`vue-ui-radar-tooltip-datalabel-name`},At={key:0},jt=/*#__PURE__*/ be({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:be,emit:et}){let jt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Mt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Nt=g(()=>import(`./vue-ui-sparkbar-DT3sDgda.js`).then(e=>e.n)),Pt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ft=g(()=>import(`./DataTable-Dof6yhO7.js`)),It=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Lt=g(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),Rt=g(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),zt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_radar:Bt}=i(),{isThemeValid:Vt,warnInvalidTheme:Ht}=Se(),D=e,Ut=d(()=>!!D.dataset&&Object.keys(D.dataset).length),O=x(ie()),Wt=x(!1),Gt=x(``),Kt=x(0),k=x(null),qt=x(null),Jt=x(null),Yt=x(null),Xt=x(null),Zt=x(0),Qt=x(0),$t=x(0),en=x(!1),tn=x(null),nn=x(null),A=x(null),rn=x({x:0,y:0}),an=x(`pointer`),on=x(!1),j=x(pn()),M=d(()=>j.value.userOptions),N=d(()=>j.value.style.chart.layout.labels),P=d(()=>j.value.style.chart.layout),F=d(()=>j.value.style.chart.tooltip),I=d(()=>j.value.style.chart);ye({config:()=>j.value,dataset:()=>D.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let L=d(()=>j.value.userOptions.useCursorPointer),sn=d(()=>le({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:j.value.skeletonConfig??{}})),{loading:cn,FINAL_DATASET:R}=_e({...Qe(D),FINAL_CONFIG:j,prepareConfig:pn,callback:()=>{Promise.resolve().then(async()=>{await Ke(),U.value.showTable=j.value.table.show})},skeletonDataset:D.config?.skeletonDataset??{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]},skeletonConfig:le({defaultConfig:j.value,userConfig:sn.value})}),{userOptionsVisible:ln,setUserOptionsVisibility:un,keepUserOptionState:dn}=Ie({config:j.value}),{svgRef:z}=Le({config:I.value.title});function fn(e){return{...e,style:{...e.style,chart:{...e.style.chart,layout:{...e.style.chart.layout,grid:{rotate:0,...e.style.chart.layout.grid},labels:{...e.style.chart.layout.labels,dataLabels:{offset:0,...e.style.chart.layout.labels.dataLabels}}}}}}}function pn(){let e=fn(xe({userConfig:D.config,defaultConfig:Bt})),t=e.theme;if(!t)return e;if(!Vt.value(e))return Ht(e),e;let n=xe({userConfig:Be[t]||D.config,defaultConfig:e}),r=xe({userConfig:D.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:ue[t]||s}}let mn=oe(D.config);$e(()=>D.config,(e,t)=>{let n=oe(e),r=n!==mn;mn=n;let i=pn();r?(j.value=i,ln.value=!j.value.userOptions.showOnChartHover,hn(),Zt.value+=1,Qt.value+=1,$t.value+=1,U.value.dataLabels.show=N.value.dataLabels.show,U.value.showTable=j.value.table.show,U.value.showTooltip=F.value?F.value.show:!1):(j.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=j.value.style.chart.tooltip.show)},{deep:!0});let B=Ze(null),V=Ze(null),H=d(()=>j.value.debug);function hn(){if(ge(D.dataset)&&l({componentName:`VueUiRadar`,type:`dataset`,debug:H.value}),j.value.responsive){let e=je(()=>{let{width:e,height:t}=Me({chart:k.value,title:I.value.title.text?qt.value:null,legend:I.value.legend.show?Jt.value:null,source:Yt.value,noTitle:Xt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,Wn()})});B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(e),V.value=k.value.parentNode,B.value.observe(V.value)}Wn()}Ye(()=>{en.value=!0,hn()}),Je(()=>{B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let{isPrinting:gn,isImaging:_n,generatePdf:vn,generateImage:yn}=Ae({elementId:`vue-ui-radar_${O.value}`,fileName:I.value.title.text||`vue-ui-radar`,options:j.value.userOptions.print}),bn=d(()=>j.value.userOptions.show&&!I.value.title.text),xn=d(()=>me(j.value.customPalette)),U=x({dataLabels:{show:N.value.dataLabels.show},showTable:j.value.table.show,showTooltip:F.value.show}),Sn=d(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:F.value.animation.show,animationFrames:F.value.animation.animationFrames},labels:{fontSize:F.value.fontSize,name:{color:F.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),W=x({height:312,width:512}),Cn=et,G=x([]),wn=x(null),K=x(!1);function Tn(){G.value.length?G.value=[]:X.value.forEach((e,t)=>{G.value.push(t)}),En()}function En(){Cn(`selectLegend`,X.value.filter((e,t)=>!G.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}function Dn(e){K.value=!0,G.value.includes(e)?(wn.value=e,G.value=G.value.filter(t=>t!==e),setTimeout(()=>{K.value=!1,wn.value=null},500)):(G.value.push(e),setTimeout(()=>{K.value=!1},500)),En()}function On(){return X.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function kn(){let e=R.value;[null,void 0].includes(e?.categories)?(l({componentName:`VueUiRadar`,type:`dataset`,debug:H.value}),l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:H.value})):(e.categories.length===0?l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:H.value}):H.value&&e.categories.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}),[null,void 0].includes(e?.series)?l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target: number}[])`,debug:H.value}):H.value&&e.series.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`,`values`,`target`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:t})})}))}$e(()=>R.value,()=>kn(),{deep:!0,immediate:!0});let q=d(()=>{let e=Array.isArray(R.value?.categories)?R.value.categories:[],t=xn.value??s;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${O.value}_${n}`,color:re(e?.color)||t[n]||s[n%s.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),J=d(()=>R.value.series.map((e,t)=>({...e,color:re(e.color)||xn.value[t]||s[t]||s[t%s.length],serieId:`radar_serie_${O.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));function An(e){return J.value.length?X.value.find(t=>t.name===e)||(H.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(H.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function jn(e){let t=An(e);t!==null&&G.value.includes(t.absoluteIndex)&&Dn(t.absoluteIndex)}function Mn(e){let t=An(e);t!==null&&(G.value.includes(t.absoluteIndex)||Dn(t.absoluteIndex))}let Nn=d(()=>Math.max(0,...J.value.flatMap(e=>e.values)));function Pn(e){return P.value.scaleToAxisMax?Math.max(1,e.target||0,...e.values):e.target||Nn.value||1}let Fn=d(()=>J.value.map((e,t)=>{let n=Bn.value.coordinates[t];return Gn({centerX:W.value.width/2,centerY:W.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/Pn(e)})})),In=d(()=>J.value.length),Ln=d(()=>Math.min(W.value.width,W.value.height)/3),Rn=d(()=>{let e=Number(P.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),zn=d(()=>{let e=Number(P.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Bn=d(()=>ne({plot:{x:W.value.width/2,y:W.value.height/2},radius:Ln.value,sides:In.value,rotation:zn.value})),Vn=d(()=>{let e=[];for(let t=0;t<Ln.value;t+=Ln.value/P.value.grid.graduations)e.push(t);return e}),Y=d(()=>Bn.value.coordinates.map((e,t)=>{let n=J.value[t],r=J.value[t].values.map(t=>Gn({centerX:W.value.width/2,centerY:W.value.height/2,apexX:e.x,apexY:e.y,proportion:t/Pn(n)}));return{...e,...n,plots:r}}).map(e=>({...e,labelX:Hn(e).x,labelY:Hn(e).y,labelAnchor:Hn(e).anchor})));function Hn({x:e,y:t}){let n=W.value.width/2,r=W.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),ee=Number(N.value.dataLabels.offset??0),s=20+(Number.isFinite(ee)?ee:0);if(!o)return{x:e,y:t,anchor:`middle`};let c=i/o,te=a/o,ne=`middle`;return c>.01?ne=`start`:c<-.01&&(ne=`end`),{x:e+c*s,y:t+te*s,anchor:ne}}let Un=d({get:()=>N.value.dataLabels.fontSize,set:e=>e}),{autoSizeLabels:Wn}=ze({svgRef:z,fontSize:N.value.dataLabels.fontSize,minFontSize:6,sizeRef:Un,labelClass:`.vue-ui-radar-apex-label`});function Gn({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let X=d(()=>{let e=J.value.map((e,t)=>e.values.map(t=>t/(e.target||Nn.value)));return q.value.map((t,n)=>{let r=se(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/J.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:G.value.includes(n)?.5:1,segregate:()=>Dn(n),isSegregated:G.value.includes(n),display:`${t.name}: ${a({v:(r??0)*100,s:`%`,r:I.value.legend.roundingPercentage})}`}})}),Kn=d(()=>({cy:`radar-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),Z=d(()=>{let e=[{name:j.value.translations.datapoint,color:``},{name:j.value.translations.target,color:``},...X.value];return{head:e,body:R.value.series.map(e=>[e.name,ce(e.formatter,e.target,a({p:e.prefix,v:e.target,s:e.suffix,r:j.value.table.td.roundingValue})),...e.values.map((t,n)=>`${ce(e.formatter,t,a({p:q.value[n]?.prefix??``,v:t,s:q.value[n]?.suffix??``,r:j.value.table.td.roundingValue}))} (${isNaN(t/e.target)?``:a({v:t/e.target*100,s:`%`,r:j.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:e}}),Q=x(null),qn=x([]),Jn=x(null);function Yn(e,t){Wt.value=!1,Q.value=null,A.value=null,an.value=`pointer`,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Xn(e,t){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Zn(e,t,n=`pointer`){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:t}),an.value=n,A.value=t;let r=q.value.slice();qn.value=[],Q.value=t,Wt.value=!0,Jn.value={datapoint:e,seriesIndex:t,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value};let i=F.value.customFormat;if(ee(i)&&fe(()=>i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value})))Gt.value=i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value});else{Gt.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!G.value.includes(t)){let n=r[t],i=e.values[t],o=isNaN(i/e.target)?0:i/e.target*100,ee=ce(e.formatter,i,a({p:q.value[t].prefix,v:i,s:q.value[t].suffix,r:F.value.roundingValue}),{datapoint:e}),s=a({v:o,s:`%`,r:F.value.roundingPercentage}),c=F.value.showValue&&F.value.showPercentage?`${ee} (${s})`:F.value.showValue&&!F.value.showPercentage?ee:!F.value.showValue&&F.value.showPercentage?`${s}`:``;qn.value.push({name:n?.name??`#${t+1}`,value:e.values[t]/e.target*100,color:n?.color,suffix:c,prefix:``,rounding:F.value.roundingPercentage,formatter:e.formatter})}}}function Qn(e=null){Ke(()=>{let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=[[``],[j.value.translations.target],...X.value.flatMap(e=>[[e.name],[`%`]])],r=R.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,isNaN(t/e.target)?``:t/e.target*100])]),i=t.concat([n]).concat(r),a=o(i);e?e(a):de({csvContent:a,title:I.value.title.text||`vue-ui-radar`})})}let $=x(!1);function $n(e){$.value=e,Kt.value+=1}function er(){U.value.showTable=!U.value.showTable}function tr(){U.value.showTooltip=!U.value.showTooltip}let nr=x(!1);function rr(){nr.value=!nr.value}let ir=Ce(k,()=>I.value.title.text),ar=d(()=>De({config:j,style:I,mutableConfig:U,dialog:zt,accordion:Pt,isFullscreen:$,parent:k,maxWidth:800,isCursorPointer:L}));$e(()=>U.value.showTable,e=>Ee(e,j,tn));function or(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let sr=d(()=>X.value.map(e=>({...e,name:e.display}))),cr=d(()=>I.value.backgroundColor),lr=d(()=>I.value.legend),ur=d(()=>I.value.title),{isCallbackImaging:dr,isCallbackSvg:fr,generateSvg:pr,onGenerateImage:mr}=Te({svg:z,title:ur,legend:lr,legendItems:sr,backgroundColor:cr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:yn});async function hr(){Cn(`copyAlt`,{config:j.value,dataset:Y.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function gr(){A.value=null,on.value=!0}function _r(){A.value=null,an.value=`pointer`,Wt.value=!1,Q.value=null,on.value=!1}function vr(e){if(!Number.isFinite(e)||!z.value)return;let t=Y.value[e];if(!t)return;let n=z.value.getBoundingClientRect();rn.value={x:n.left+t.labelX/W.value.width*n.width,y:n.top+t.labelY/W.value.height*n.height}}function yr(e){if(!z.value||nr.value||document.activeElement!==z.value||!Y.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){A.value=null,an.value=`pointer`,Wt.value=!1,Q.value=null;return}if(r){if(A.value===null)return;let e=Y.value[A.value];if(!e)return;Xn(e,A.value);return}let a=A.value;a===null||a<0||a>=Y.value.length?a=n?0:Y.value.length-1:n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1));let o=Y.value[a];o&&(A.value=a,vr(a),Zn(o,a,`keyboard`))}let br=d(()=>({headers:Z.value?.colNames?.map(e=>e.name??e)??[],rows:Z.value?.body??[]}));return be({getData:On,getImage:ir,generatePdf:vn,generateCsv:Qn,generateImage:yn,generateSvg:pr,hideSeries:Mn,showSeries:jn,toggleTable:er,toggleTooltip:tr,toggleAnnotator:rr,toggleFullscreen:$n,copyAlt:hr}),(e,i)=>(b(),m(`div`,{class:qe(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:k,id:`vue-ui-radar_${O.value}`,style:y(`font-family:${j.value.style.fontFamily};width:100%; ${j.value.responsive?`height: 100%;`:``} text-align:center;background:${I.value.backgroundColor}`),onMouseenter:i[2]||=()=>T(un)(!0),onMouseleave:i[3]||=()=>T(un)(!1)},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,w(j.value.a11y.translations.keyboardNavigation),1)],8,nt),br.value?.rows?.length?(b(),f(Fe,{key:0,uid:O.value,head:br.value.headers,body:br.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),M.value.buttons.annotator?(b(),f(T(It),Ge({key:1},T(n)(M.value.annotator),{svgRef:T(z),backgroundColor:I.value.backgroundColor,color:I.value.color,active:nr.value,isCursorPointer:L.value,palette:M.value.annotatorPalette,onClose:rr}),He({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,v(_(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),bn.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),I.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),f(we,{key:`title_${Zt.value}`,config:{title:{cy:`radar-div-title`,...I.value.title},subtitle:{cy:`radar-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,rt),M.value.show&&Ut.value&&(T(dn)||T(ln))?(b(),f(T(Lt),{ref_key:`userOptionsRef`,ref:nn,key:`user_options_${Kt.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isImaging:T(_n),isPrinting:T(gn),uid:O.value,hasTooltip:M.value.buttons.tooltip&&F.value.show,hasPdf:M.value.buttons.pdf,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasXls:M.value.buttons.csv,hasTable:M.value.buttons.table,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isFullscreen:$.value,isTooltip:U.value.showTooltip,titles:{...M.value.buttonTitles},chartElement:k.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:nr.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:$n,onGeneratePdf:T(vn),onGenerateCsv:Qn,onGenerateImage:T(mr),onGenerateSvg:T(pr),onToggleTable:er,onToggleTooltip:tr,onToggleAnnotator:rr,onCopyAlt:hr,style:y({visibility:T(dn)?T(ln)?`visible`:`hidden`:`visible`})},He({_:2},[S(T(Oe)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(ke)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,it,[(b(),m(`svg`,{ref_key:`svgRef`,ref:z,xmlns:T(pe),"aria-describedby":`chart-instructions-${O.value}`,class:qe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${I.value.color}`),tabindex:`0`,onFocus:gr,onBlur:_r,onKeydown:yr},[We(T(Rt)),C(e.$slots,`svg-underlayer`,{svg:{...W.value,outerPolygon:Bn.value,isPrintingImg:T(gn)||T(_n)||T(dr),isPrintingSvg:T(fr)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(q.value,(e,t)=>(b(),f(Ne,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${O.value}_${t}`,key:`radar_gradient_${O.value}_${t}`,stops:[[`0%`,T(c)(T(ae)(e.color,.05),P.value.dataPolygon.opacity),1],[`100%`,T(c)(e.color,P.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),P.value.grid.show?(b(),m(`g`,st,[(b(!0),m(u,null,S(Y.value,e=>(b(),m(`line`,{x1:W.value.width/2,y1:W.value.height/2,x2:e.x,y2:e.y,stroke:P.value.grid.stroke,"stroke-width":P.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,ct))),256)),P.value.grid.graduations>0?(b(),m(`g`,lt,[(b(!0),m(u,null,S(Vn.value,e=>(b(),m(`path`,{d:T(ne)({plot:{x:W.value.width/2,y:W.value.height/2},radius:e,sides:In.value,rotation:zn.value}).path,fill:`none`,stroke:P.value.grid.stroke,"stroke-width":P.value.grid.strokeWidth},null,8,ut))),256))])):p(``,!0)])):p(``,!0),h(`path`,{d:Bn.value.path,fill:`none`,stroke:P.value.outerPolygon.stroke,"stroke-width":P.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,dt),N.value.dataLabels.show?(b(),m(`g`,ft,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,onMouseenter:n=>Zn(e,t,`pointer`),onMouseleave:n=>Yn(e,t),onClick:n=>Xn(e,t)},w(e.name),41,pt))),256))])):p(``,!0),(b(!0),m(u,null,S(q.value,(e,t)=>(b(),m(`g`,null,[h(`g`,null,[j.value.useCssAnimation||!j.value.useCssAnimation&&!G.value.includes(t)?(b(),m(`polygon`,{key:0,points:T(te)(Y.value.map(e=>e.plots[t]),!1,!0),stroke:I.value.backgroundColor,"stroke-width":P.value.dataPolygon.strokeWidth+1,fill:`none`,class:qe({"animated-out":G.value.includes(t)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===t&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,mt)):p(``,!0),j.value.useCssAnimation||!j.value.useCssAnimation&&!G.value.includes(t)?(b(),m(`polygon`,{key:1,points:T(te)(Y.value.map(e=>e.plots[t]),!1,!0),stroke:e.color,"stroke-width":P.value.dataPolygon.strokeWidth,fill:P.value.dataPolygon.transparent?`transparent`:P.value.dataPolygon.useGradient?`url(#radar_gradient_${O.value}_${t})`:T(c)(e.color,P.value.dataPolygon.opacity),class:qe({"animated-out":G.value.includes(t)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===t&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ht)):p(``,!0)])]))),256)),P.value.targetReference.show?(b(),m(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${T(te)(Fn.value,!1,!0)}Z`,fill:`none`,stroke:P.value.targetReference.stroke,"stroke-width":P.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":P.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,gt)):p(``,!0),P.value.plots.show?(b(),m(`g`,_t,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`g`,{key:`radar-category-${t}`},[(b(!0),m(u,null,S(e.plots,(n,r)=>(b(),m(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!G.value.includes(r)&&Zn(e,t,`pointer`),onMouseleave:n=>!G.value.includes(r)&&Yn(e,t),onClick:n=>!G.value.includes(r)&&Xn(e,t)},[h(`circle`,{cx:n.x,cy:n.y,r:Rn.value,fill:`transparent`,stroke:`transparent`,style:y({pointerEvents:G.value.includes(r)?`none`:`all`})},null,12,yt),h(`circle`,{cx:n.x,cy:n.y,fill:G.value.includes(r)?`transparent`:q.value[r]?q.value[r].color:`transparent`,r:Q.value!==null&&Q.value===t?P.value.plots.radius*1.6:P.value.plots.radius,stroke:G.value.includes(r)?`transparent`:I.value.backgroundColor,"stroke-width":.5,class:qe({"animated-out":G.value.includes(r)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===r&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,bt)],40,vt))),128))]))),128))])):p(``,!0),C(e.$slots,`svg`,{svg:{...W.value,outerPolygon:Bn.value,isPrintingImg:T(gn)||T(_n)||T(dr),isPrintingSvg:T(fr)}},void 0,!0)],46,at)),e.$slots.hint?(b(),m(`div`,xt,[C(e.$slots,`hint`,v(_({hint:j.value.a11y.translations.keyboardNavigation,isVisible:on.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,St,[C(e.$slots,`watermark`,v(_({isPrinting:T(gn)||T(_n)||T(dr)||T(fr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${O.value}`},null,8,Ct),en.value&&(I.value.legend.show||e.$slots.legend)?(b(),f(Ve,{key:6,to:I.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Jt},[C(e.$slots,`legend`,{legend:X.value},()=>[I.value.legend.show?(b(),f(Re,{key:`legend_${$t.value}`,legendSet:X.value,config:Kn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({i:e})=>Dn(e)},He({item:E(({legend:e,index:t})=>[T(cn)?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>e.segregate(),style:y(`opacity:${G.value.includes(t)?.5:1}`)},w(e.display),13,wt))]),legendToggle:E(()=>[X.value.length>2&&I.value.legend.selectAllToggle.show&&!T(cn)?(b(),f(Pe,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:Tn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[P.value.targetReference.show&&P.value.targetReference.showInLegend?{name:`after`,fn:E(()=>[h(`div`,Tt,[h(`div`,{style:y({display:`flex`,height:I.value.legend.fontSize})},[(b(),m(`svg`,{style:y({width:I.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[h(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:P.value.targetReference.stroke,"stroke-width":P.value.targetReference.strokeWidth*.7,"stroke-dasharray":P.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,Et)],4))],4),h(`span`,null,w(P.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:7,ref_key:`source`,ref:Yt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),We(T(jt),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&Wt.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,backgroundOpacity:F.value.backgroundOpacity,fontSize:F.value.fontSize,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:k.value,content:Gt.value,isFullscreen:$.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:an.value===`keyboard`,a11yPosition:rn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,v(_({...Jn.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,v(_({...Jn.value})),void 0,!0)]),"tooltip-after":E(()=>[![`function`].includes(typeof F.value.customFormat)&&!e.$slots.tooltip?(b(),m(`div`,Dt,[We(T(Nt),{dataset:qn.value,config:Sn.value,backgroundOpacity:0},{"data-label":E(({bar:e})=>[h(`div`,Ot,[h(`span`,kt,w(e.name+(F.value.showValue||F.value.showPercentage?`:`:``)),1),F.value.showValue||F.value.showPercentage?(b(),m(`span`,At,w(e.suffix),1)):p(``,!0)])]),_:1},8,[`dataset`,`config`])])):p(``,!0),C(e.$slots,`tooltip-after`,v(_({...Jn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Ut.value&&M.value.buttons.table?(b(),f(Xe(ar.value.component),Ge({key:8},ar.value.props,{ref_key:`tableUnit`,ref:tn,onClose:or}),He({content:E(()=>[(b(),f(T(Ft),{key:`table_${Qt.value}`,colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:j.value.table.useDialog?``:ar.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:L.value,onClose:or},{th:E(({th:e})=>[Ue(w(e.name),1)]),td:E(({td:e})=>[Ue(w(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:E(()=>[Ue(w(ar.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:E(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Qn(M.value.callbacks.csv),style:y({cursor:L.value?`pointer`:`default`})},[We(T(Mt),{name:`fileCsv`,stroke:ar.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[T(cn)?(b(),f(ve,{key:0})):p(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-7693dabb`]]);export{et as n,jt as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as ee,Ht as s,Jt as c,Lt as te,M as ne,S as re,X as ie,Yt as ae,Zt as oe,at as l,b as se,i as ce,in as le,nn as ue,nt as de,pt as fe,t as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{n as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-DPGnEuYM.js";import{n as we}from"./Title-BliHuXfT.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{c as je}from"./canvas-lib-22VpOI4_.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./DefGrad-DKMq1REY.js";import{t as Pe}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useUserOptionState-CXlFnwPv.js";import{t as Le}from"./useChartAccessibility-DOMuYJfm.js";import{t as Re}from"./Legend-DM0ClX3D.js";import{t as ze}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Be}from"./vue_ui_radar-68iK9Fam.js";import{Fragment as u,Teleport as Ve,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as He,createTextVNode as Ue,createVNode as We,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ge,nextTick as Ke,normalizeClass as qe,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Je,onMounted as Ye,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as w,toRefs as Qe,unref as T,watch as $e,withCtx as E}from"vue";var et=/* @__PURE__ */ e({default:()=>jt}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`aria-describedby`,`viewBox`],ot=[`width`,`height`],st={key:1},ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:0,style:{"pointer-events":`none`}},ut=[`d`,`stroke`,`stroke-width`],dt=[`d`,`stroke`,`stroke-width`],ft={key:2},pt=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],mt=[`points`,`stroke`,`stroke-width`],ht=[`points`,`stroke`,`stroke-width`,`fill`],gt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],_t={key:4},vt=[`onMouseenter`,`onMouseleave`,`onClick`],yt=[`cx`,`cy`,`r`],bt=[`cx`,`cy`,`fill`,`r`,`stroke`],xt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},St={key:5,class:`vue-data-ui-watermark`},Ct=[`id`],wt=[`onClick`],Tt={class:`vue-data-ui-legend-item`},Et=[`stroke`,`stroke-width`,`stroke-dasharray`],Dt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},Ot={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},kt={class:`vue-ui-radar-tooltip-datalabel-name`},At={key:0},jt=/*#__PURE__*/ be({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:be,emit:et}){let jt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Mt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Nt=g(()=>import(`./vue-ui-sparkbar-BcZyqPB9.js`).then(e=>e.n)),Pt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ft=g(()=>import(`./DataTable-Dof6yhO7.js`)),It=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Lt=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Rt=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),zt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_radar:Bt}=i(),{isThemeValid:Vt,warnInvalidTheme:Ht}=Se(),D=e,Ut=d(()=>!!D.dataset&&Object.keys(D.dataset).length),O=x(ie()),Wt=x(!1),Gt=x(``),Kt=x(0),k=x(null),qt=x(null),Jt=x(null),Yt=x(null),Xt=x(null),Zt=x(0),Qt=x(0),$t=x(0),en=x(!1),tn=x(null),nn=x(null),A=x(null),rn=x({x:0,y:0}),an=x(`pointer`),on=x(!1),j=x(pn()),M=d(()=>j.value.userOptions),N=d(()=>j.value.style.chart.layout.labels),P=d(()=>j.value.style.chart.layout),F=d(()=>j.value.style.chart.tooltip),I=d(()=>j.value.style.chart);ye({config:()=>j.value,dataset:()=>D.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let L=d(()=>j.value.userOptions.useCursorPointer),sn=d(()=>le({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:j.value.skeletonConfig??{}})),{loading:cn,FINAL_DATASET:R}=_e({...Qe(D),FINAL_CONFIG:j,prepareConfig:pn,callback:()=>{Promise.resolve().then(async()=>{await Ke(),U.value.showTable=j.value.table.show})},skeletonDataset:D.config?.skeletonDataset??{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]},skeletonConfig:le({defaultConfig:j.value,userConfig:sn.value})}),{userOptionsVisible:ln,setUserOptionsVisibility:un,keepUserOptionState:dn}=Ie({config:j.value}),{svgRef:z}=Le({config:I.value.title});function fn(e){return{...e,style:{...e.style,chart:{...e.style.chart,layout:{...e.style.chart.layout,grid:{rotate:0,...e.style.chart.layout.grid},labels:{...e.style.chart.layout.labels,dataLabels:{offset:0,...e.style.chart.layout.labels.dataLabels}}}}}}}function pn(){let e=fn(xe({userConfig:D.config,defaultConfig:Bt})),t=e.theme;if(!t)return e;if(!Vt.value(e))return Ht(e),e;let n=xe({userConfig:Be[t]||D.config,defaultConfig:e}),r=xe({userConfig:D.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:ue[t]||s}}let mn=oe(D.config);$e(()=>D.config,(e,t)=>{let n=oe(e),r=n!==mn;mn=n;let i=pn();r?(j.value=i,ln.value=!j.value.userOptions.showOnChartHover,hn(),Zt.value+=1,Qt.value+=1,$t.value+=1,U.value.dataLabels.show=N.value.dataLabels.show,U.value.showTable=j.value.table.show,U.value.showTooltip=F.value?F.value.show:!1):(j.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=j.value.style.chart.tooltip.show)},{deep:!0});let B=Ze(null),V=Ze(null),H=d(()=>j.value.debug);function hn(){if(ge(D.dataset)&&l({componentName:`VueUiRadar`,type:`dataset`,debug:H.value}),j.value.responsive){let e=je(()=>{let{width:e,height:t}=Me({chart:k.value,title:I.value.title.text?qt.value:null,legend:I.value.legend.show?Jt.value:null,source:Yt.value,noTitle:Xt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,Wn()})});B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(e),V.value=k.value.parentNode,B.value.observe(V.value)}Wn()}Ye(()=>{en.value=!0,hn()}),Je(()=>{B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let{isPrinting:gn,isImaging:_n,generatePdf:vn,generateImage:yn}=Ae({elementId:`vue-ui-radar_${O.value}`,fileName:I.value.title.text||`vue-ui-radar`,options:j.value.userOptions.print}),bn=d(()=>j.value.userOptions.show&&!I.value.title.text),xn=d(()=>me(j.value.customPalette)),U=x({dataLabels:{show:N.value.dataLabels.show},showTable:j.value.table.show,showTooltip:F.value.show}),Sn=d(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:F.value.animation.show,animationFrames:F.value.animation.animationFrames},labels:{fontSize:F.value.fontSize,name:{color:F.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),W=x({height:312,width:512}),Cn=et,G=x([]),wn=x(null),K=x(!1);function Tn(){G.value.length?G.value=[]:X.value.forEach((e,t)=>{G.value.push(t)}),En()}function En(){Cn(`selectLegend`,X.value.filter((e,t)=>!G.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}function Dn(e){K.value=!0,G.value.includes(e)?(wn.value=e,G.value=G.value.filter(t=>t!==e),setTimeout(()=>{K.value=!1,wn.value=null},500)):(G.value.push(e),setTimeout(()=>{K.value=!1},500)),En()}function On(){return X.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function kn(){let e=R.value;[null,void 0].includes(e?.categories)?(l({componentName:`VueUiRadar`,type:`dataset`,debug:H.value}),l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:H.value})):(e.categories.length===0?l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:H.value}):H.value&&e.categories.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}),[null,void 0].includes(e?.series)?l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target: number}[])`,debug:H.value}):H.value&&e.series.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`,`values`,`target`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:t})})}))}$e(()=>R.value,()=>kn(),{deep:!0,immediate:!0});let q=d(()=>{let e=Array.isArray(R.value?.categories)?R.value.categories:[],t=xn.value??s;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${O.value}_${n}`,color:re(e?.color)||t[n]||s[n%s.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),J=d(()=>R.value.series.map((e,t)=>({...e,color:re(e.color)||xn.value[t]||s[t]||s[t%s.length],serieId:`radar_serie_${O.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));function An(e){return J.value.length?X.value.find(t=>t.name===e)||(H.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(H.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function jn(e){let t=An(e);t!==null&&G.value.includes(t.absoluteIndex)&&Dn(t.absoluteIndex)}function Mn(e){let t=An(e);t!==null&&(G.value.includes(t.absoluteIndex)||Dn(t.absoluteIndex))}let Nn=d(()=>Math.max(0,...J.value.flatMap(e=>e.values)));function Pn(e){return P.value.scaleToAxisMax?Math.max(1,e.target||0,...e.values):e.target||Nn.value||1}let Fn=d(()=>J.value.map((e,t)=>{let n=Bn.value.coordinates[t];return Gn({centerX:W.value.width/2,centerY:W.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/Pn(e)})})),In=d(()=>J.value.length),Ln=d(()=>Math.min(W.value.width,W.value.height)/3),Rn=d(()=>{let e=Number(P.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),zn=d(()=>{let e=Number(P.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Bn=d(()=>ne({plot:{x:W.value.width/2,y:W.value.height/2},radius:Ln.value,sides:In.value,rotation:zn.value})),Vn=d(()=>{let e=[];for(let t=0;t<Ln.value;t+=Ln.value/P.value.grid.graduations)e.push(t);return e}),Y=d(()=>Bn.value.coordinates.map((e,t)=>{let n=J.value[t],r=J.value[t].values.map(t=>Gn({centerX:W.value.width/2,centerY:W.value.height/2,apexX:e.x,apexY:e.y,proportion:t/Pn(n)}));return{...e,...n,plots:r}}).map(e=>({...e,labelX:Hn(e).x,labelY:Hn(e).y,labelAnchor:Hn(e).anchor})));function Hn({x:e,y:t}){let n=W.value.width/2,r=W.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),ee=Number(N.value.dataLabels.offset??0),s=20+(Number.isFinite(ee)?ee:0);if(!o)return{x:e,y:t,anchor:`middle`};let c=i/o,te=a/o,ne=`middle`;return c>.01?ne=`start`:c<-.01&&(ne=`end`),{x:e+c*s,y:t+te*s,anchor:ne}}let Un=d({get:()=>N.value.dataLabels.fontSize,set:e=>e}),{autoSizeLabels:Wn}=ze({svgRef:z,fontSize:N.value.dataLabels.fontSize,minFontSize:6,sizeRef:Un,labelClass:`.vue-ui-radar-apex-label`});function Gn({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let X=d(()=>{let e=J.value.map((e,t)=>e.values.map(t=>t/(e.target||Nn.value)));return q.value.map((t,n)=>{let r=se(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/J.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:G.value.includes(n)?.5:1,segregate:()=>Dn(n),isSegregated:G.value.includes(n),display:`${t.name}: ${a({v:(r??0)*100,s:`%`,r:I.value.legend.roundingPercentage})}`}})}),Kn=d(()=>({cy:`radar-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),Z=d(()=>{let e=[{name:j.value.translations.datapoint,color:``},{name:j.value.translations.target,color:``},...X.value];return{head:e,body:R.value.series.map(e=>[e.name,ce(e.formatter,e.target,a({p:e.prefix,v:e.target,s:e.suffix,r:j.value.table.td.roundingValue})),...e.values.map((t,n)=>`${ce(e.formatter,t,a({p:q.value[n]?.prefix??``,v:t,s:q.value[n]?.suffix??``,r:j.value.table.td.roundingValue}))} (${isNaN(t/e.target)?``:a({v:t/e.target*100,s:`%`,r:j.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:e}}),Q=x(null),qn=x([]),Jn=x(null);function Yn(e,t){Wt.value=!1,Q.value=null,A.value=null,an.value=`pointer`,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Xn(e,t){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Zn(e,t,n=`pointer`){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:t}),an.value=n,A.value=t;let r=q.value.slice();qn.value=[],Q.value=t,Wt.value=!0,Jn.value={datapoint:e,seriesIndex:t,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value};let i=F.value.customFormat;if(ee(i)&&fe(()=>i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value})))Gt.value=i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value});else{Gt.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!G.value.includes(t)){let n=r[t],i=e.values[t],o=isNaN(i/e.target)?0:i/e.target*100,ee=ce(e.formatter,i,a({p:q.value[t].prefix,v:i,s:q.value[t].suffix,r:F.value.roundingValue}),{datapoint:e}),s=a({v:o,s:`%`,r:F.value.roundingPercentage}),c=F.value.showValue&&F.value.showPercentage?`${ee} (${s})`:F.value.showValue&&!F.value.showPercentage?ee:!F.value.showValue&&F.value.showPercentage?`${s}`:``;qn.value.push({name:n?.name??`#${t+1}`,value:e.values[t]/e.target*100,color:n?.color,suffix:c,prefix:``,rounding:F.value.roundingPercentage,formatter:e.formatter})}}}function Qn(e=null){Ke(()=>{let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=[[``],[j.value.translations.target],...X.value.flatMap(e=>[[e.name],[`%`]])],r=R.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,isNaN(t/e.target)?``:t/e.target*100])]),i=t.concat([n]).concat(r),a=o(i);e?e(a):de({csvContent:a,title:I.value.title.text||`vue-ui-radar`})})}let $=x(!1);function $n(e){$.value=e,Kt.value+=1}function er(){U.value.showTable=!U.value.showTable}function tr(){U.value.showTooltip=!U.value.showTooltip}let nr=x(!1);function rr(){nr.value=!nr.value}let ir=Ce(k,()=>I.value.title.text),ar=d(()=>De({config:j,style:I,mutableConfig:U,dialog:zt,accordion:Pt,isFullscreen:$,parent:k,maxWidth:800,isCursorPointer:L}));$e(()=>U.value.showTable,e=>Ee(e,j,tn));function or(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let sr=d(()=>X.value.map(e=>({...e,name:e.display}))),cr=d(()=>I.value.backgroundColor),lr=d(()=>I.value.legend),ur=d(()=>I.value.title),{isCallbackImaging:dr,isCallbackSvg:fr,generateSvg:pr,onGenerateImage:mr}=Te({svg:z,title:ur,legend:lr,legendItems:sr,backgroundColor:cr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:yn});async function hr(){Cn(`copyAlt`,{config:j.value,dataset:Y.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function gr(){A.value=null,on.value=!0}function _r(){A.value=null,an.value=`pointer`,Wt.value=!1,Q.value=null,on.value=!1}function vr(e){if(!Number.isFinite(e)||!z.value)return;let t=Y.value[e];if(!t)return;let n=z.value.getBoundingClientRect();rn.value={x:n.left+t.labelX/W.value.width*n.width,y:n.top+t.labelY/W.value.height*n.height}}function yr(e){if(!z.value||nr.value||document.activeElement!==z.value||!Y.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){A.value=null,an.value=`pointer`,Wt.value=!1,Q.value=null;return}if(r){if(A.value===null)return;let e=Y.value[A.value];if(!e)return;Xn(e,A.value);return}let a=A.value;a===null||a<0||a>=Y.value.length?a=n?0:Y.value.length-1:n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1));let o=Y.value[a];o&&(A.value=a,vr(a),Zn(o,a,`keyboard`))}let br=d(()=>({headers:Z.value?.colNames?.map(e=>e.name??e)??[],rows:Z.value?.body??[]}));return be({getData:On,getImage:ir,generatePdf:vn,generateCsv:Qn,generateImage:yn,generateSvg:pr,hideSeries:Mn,showSeries:jn,toggleTable:er,toggleTooltip:tr,toggleAnnotator:rr,toggleFullscreen:$n,copyAlt:hr}),(e,i)=>(b(),m(`div`,{class:qe(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:k,id:`vue-ui-radar_${O.value}`,style:y(`font-family:${j.value.style.fontFamily};width:100%; ${j.value.responsive?`height: 100%;`:``} text-align:center;background:${I.value.backgroundColor}`),onMouseenter:i[2]||=()=>T(un)(!0),onMouseleave:i[3]||=()=>T(un)(!1)},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,w(j.value.a11y.translations.keyboardNavigation),1)],8,nt),br.value?.rows?.length?(b(),f(Fe,{key:0,uid:O.value,head:br.value.headers,body:br.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),M.value.buttons.annotator?(b(),f(T(It),Ge({key:1},T(n)(M.value.annotator),{svgRef:T(z),backgroundColor:I.value.backgroundColor,color:I.value.color,active:nr.value,isCursorPointer:L.value,palette:M.value.annotatorPalette,onClose:rr}),He({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,v(_(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),bn.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),I.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),f(we,{key:`title_${Zt.value}`,config:{title:{cy:`radar-div-title`,...I.value.title},subtitle:{cy:`radar-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,rt),M.value.show&&Ut.value&&(T(dn)||T(ln))?(b(),f(T(Lt),{ref_key:`userOptionsRef`,ref:nn,key:`user_options_${Kt.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isImaging:T(_n),isPrinting:T(gn),uid:O.value,hasTooltip:M.value.buttons.tooltip&&F.value.show,hasPdf:M.value.buttons.pdf,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasXls:M.value.buttons.csv,hasTable:M.value.buttons.table,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isFullscreen:$.value,isTooltip:U.value.showTooltip,titles:{...M.value.buttonTitles},chartElement:k.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:nr.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:$n,onGeneratePdf:T(vn),onGenerateCsv:Qn,onGenerateImage:T(mr),onGenerateSvg:T(pr),onToggleTable:er,onToggleTooltip:tr,onToggleAnnotator:rr,onCopyAlt:hr,style:y({visibility:T(dn)?T(ln)?`visible`:`hidden`:`visible`})},He({_:2},[S(T(Oe)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(ke)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,it,[(b(),m(`svg`,{ref_key:`svgRef`,ref:z,xmlns:T(pe),"aria-describedby":`chart-instructions-${O.value}`,class:qe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${I.value.color}`),tabindex:`0`,onFocus:gr,onBlur:_r,onKeydown:yr},[We(T(Rt)),C(e.$slots,`svg-underlayer`,{svg:{...W.value,outerPolygon:Bn.value,isPrintingImg:T(gn)||T(_n)||T(dr),isPrintingSvg:T(fr)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(q.value,(e,t)=>(b(),f(Ne,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${O.value}_${t}`,key:`radar_gradient_${O.value}_${t}`,stops:[[`0%`,T(c)(T(ae)(e.color,.05),P.value.dataPolygon.opacity),1],[`100%`,T(c)(e.color,P.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),P.value.grid.show?(b(),m(`g`,st,[(b(!0),m(u,null,S(Y.value,e=>(b(),m(`line`,{x1:W.value.width/2,y1:W.value.height/2,x2:e.x,y2:e.y,stroke:P.value.grid.stroke,"stroke-width":P.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,ct))),256)),P.value.grid.graduations>0?(b(),m(`g`,lt,[(b(!0),m(u,null,S(Vn.value,e=>(b(),m(`path`,{d:T(ne)({plot:{x:W.value.width/2,y:W.value.height/2},radius:e,sides:In.value,rotation:zn.value}).path,fill:`none`,stroke:P.value.grid.stroke,"stroke-width":P.value.grid.strokeWidth},null,8,ut))),256))])):p(``,!0)])):p(``,!0),h(`path`,{d:Bn.value.path,fill:`none`,stroke:P.value.outerPolygon.stroke,"stroke-width":P.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,dt),N.value.dataLabels.show?(b(),m(`g`,ft,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,onMouseenter:n=>Zn(e,t,`pointer`),onMouseleave:n=>Yn(e,t),onClick:n=>Xn(e,t)},w(e.name),41,pt))),256))])):p(``,!0),(b(!0),m(u,null,S(q.value,(e,t)=>(b(),m(`g`,null,[h(`g`,null,[j.value.useCssAnimation||!j.value.useCssAnimation&&!G.value.includes(t)?(b(),m(`polygon`,{key:0,points:T(te)(Y.value.map(e=>e.plots[t]),!1,!0),stroke:I.value.backgroundColor,"stroke-width":P.value.dataPolygon.strokeWidth+1,fill:`none`,class:qe({"animated-out":G.value.includes(t)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===t&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,mt)):p(``,!0),j.value.useCssAnimation||!j.value.useCssAnimation&&!G.value.includes(t)?(b(),m(`polygon`,{key:1,points:T(te)(Y.value.map(e=>e.plots[t]),!1,!0),stroke:e.color,"stroke-width":P.value.dataPolygon.strokeWidth,fill:P.value.dataPolygon.transparent?`transparent`:P.value.dataPolygon.useGradient?`url(#radar_gradient_${O.value}_${t})`:T(c)(e.color,P.value.dataPolygon.opacity),class:qe({"animated-out":G.value.includes(t)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===t&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ht)):p(``,!0)])]))),256)),P.value.targetReference.show?(b(),m(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${T(te)(Fn.value,!1,!0)}Z`,fill:`none`,stroke:P.value.targetReference.stroke,"stroke-width":P.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":P.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,gt)):p(``,!0),P.value.plots.show?(b(),m(`g`,_t,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`g`,{key:`radar-category-${t}`},[(b(!0),m(u,null,S(e.plots,(n,r)=>(b(),m(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!G.value.includes(r)&&Zn(e,t,`pointer`),onMouseleave:n=>!G.value.includes(r)&&Yn(e,t),onClick:n=>!G.value.includes(r)&&Xn(e,t)},[h(`circle`,{cx:n.x,cy:n.y,r:Rn.value,fill:`transparent`,stroke:`transparent`,style:y({pointerEvents:G.value.includes(r)?`none`:`all`})},null,12,yt),h(`circle`,{cx:n.x,cy:n.y,fill:G.value.includes(r)?`transparent`:q.value[r]?q.value[r].color:`transparent`,r:Q.value!==null&&Q.value===t?P.value.plots.radius*1.6:P.value.plots.radius,stroke:G.value.includes(r)?`transparent`:I.value.backgroundColor,"stroke-width":.5,class:qe({"animated-out":G.value.includes(r)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===r&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,bt)],40,vt))),128))]))),128))])):p(``,!0),C(e.$slots,`svg`,{svg:{...W.value,outerPolygon:Bn.value,isPrintingImg:T(gn)||T(_n)||T(dr),isPrintingSvg:T(fr)}},void 0,!0)],46,at)),e.$slots.hint?(b(),m(`div`,xt,[C(e.$slots,`hint`,v(_({hint:j.value.a11y.translations.keyboardNavigation,isVisible:on.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,St,[C(e.$slots,`watermark`,v(_({isPrinting:T(gn)||T(_n)||T(dr)||T(fr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${O.value}`},null,8,Ct),en.value&&(I.value.legend.show||e.$slots.legend)?(b(),f(Ve,{key:6,to:I.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Jt},[C(e.$slots,`legend`,{legend:X.value},()=>[I.value.legend.show?(b(),f(Re,{key:`legend_${$t.value}`,legendSet:X.value,config:Kn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({i:e})=>Dn(e)},He({item:E(({legend:e,index:t})=>[T(cn)?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>e.segregate(),style:y(`opacity:${G.value.includes(t)?.5:1}`)},w(e.display),13,wt))]),legendToggle:E(()=>[X.value.length>2&&I.value.legend.selectAllToggle.show&&!T(cn)?(b(),f(Pe,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:Tn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[P.value.targetReference.show&&P.value.targetReference.showInLegend?{name:`after`,fn:E(()=>[h(`div`,Tt,[h(`div`,{style:y({display:`flex`,height:I.value.legend.fontSize})},[(b(),m(`svg`,{style:y({width:I.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[h(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:P.value.targetReference.stroke,"stroke-width":P.value.targetReference.strokeWidth*.7,"stroke-dasharray":P.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,Et)],4))],4),h(`span`,null,w(P.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:7,ref_key:`source`,ref:Yt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),We(T(jt),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&Wt.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,backgroundOpacity:F.value.backgroundOpacity,fontSize:F.value.fontSize,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:k.value,content:Gt.value,isFullscreen:$.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:an.value===`keyboard`,a11yPosition:rn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,v(_({...Jn.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,v(_({...Jn.value})),void 0,!0)]),"tooltip-after":E(()=>[![`function`].includes(typeof F.value.customFormat)&&!e.$slots.tooltip?(b(),m(`div`,Dt,[We(T(Nt),{dataset:qn.value,config:Sn.value,backgroundOpacity:0},{"data-label":E(({bar:e})=>[h(`div`,Ot,[h(`span`,kt,w(e.name+(F.value.showValue||F.value.showPercentage?`:`:``)),1),F.value.showValue||F.value.showPercentage?(b(),m(`span`,At,w(e.suffix),1)):p(``,!0)])]),_:1},8,[`dataset`,`config`])])):p(``,!0),C(e.$slots,`tooltip-after`,v(_({...Jn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Ut.value&&M.value.buttons.table?(b(),f(Xe(ar.value.component),Ge({key:8},ar.value.props,{ref_key:`tableUnit`,ref:tn,onClose:or}),He({content:E(()=>[(b(),f(T(Ft),{key:`table_${Qt.value}`,colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:j.value.table.useDialog?``:ar.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:L.value,onClose:or},{th:E(({th:e})=>[Ue(w(e.name),1)]),td:E(({td:e})=>[Ue(w(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:E(()=>[Ue(w(ar.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:E(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Qn(M.value.callbacks.csv),style:y({cursor:L.value?`pointer`:`default`})},[We(T(Mt),{name:`fileCsv`,stroke:ar.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[T(cn)?(b(),f(ve,{key:0})):p(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-7693dabb`]]);export{et as n,jt as t};