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,4 +1,4 @@
1
- import{t as e}from"./useConfig-By3Vb5kz.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,i as f,in as p,j as m,nn as h,p as g,st as _,t as v}from"./lib-rPeBMZrn.js";import{t as y}from"./vue_ui_donut-T5PeOqvf.js";import{_ as b,a as x,c as S,d as C,g as w,i as T,l as E,n as D,o as O,p as k,r as A,s as ee,t as te,u as j,v as M}from"./render-common-DY4sNXDz.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=p({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=p({userConfig:y[i]||{},defaultConfig:n}),o=p({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:h[i]||r}}function N(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function P(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+N(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+N(t,0),0):N(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:N(P(o,`chart.padding.top`,24),24),right:N(P(o,`chart.padding.right`,24),24),bottom:N(P(o,`chart.padding.bottom`,24),24),left:N(P(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=N(P(o,`chart.donut.radius`,f),f),m=N(P(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:N(P(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function F(){return ue}function I(e){return O(x(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return b(e?.value??e?.absoluteValue??0,0)}function L(e){return w(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:O(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function R(e){return e.reduce((e,t)=>e+Math.abs(b(t.value,0)),0)}function fe(e){let t=x(e,`title`,{}),n=k(t,`subtitle`,{});if(!t.text)return 0;let r=b(t.fontSize,20),i=n.show!==!1&&n.text?b(n.fontSize,14):0;return b(t.paddingTop,12)+r+(i?i+12:0)+b(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=x(n,`legend`,{}),a=b(i.fontSize,12),o=b(i.markerSize,10),s=b(i.itemGap,24),c=b(i.rowGap,8),l=b(i.padding,8),u=b(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Be(e,t),r=D(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function z(e,t){return!x(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function B(e){return!!T(e,`pie`,x(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=z(e,t),s=x(n,`legend.show`,!0),c=x(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=b(x(n,`padding.top`,24),24),f=b(x(n,`padding.right`,24),24),p=b(x(n,`padding.bottom`,24),24),m=b(x(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?b(T(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=b(x(n,`layout.donut.radiusRatio`,.35),.35),S=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*S),w=x(n,`layout.donut.radius`,null),E=w==null?C:Math.min(C,b(w,C)),D=b(x(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(E*D*2,E),12*(1+D)),k=x(n,`layout.donut.thickness`,x(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(E-1,k==null?O:b(k,O)));return{...e,drawingArea:h,center:v,radius:E,thickness:A,innerRadius:B(n)?0:Math.max(0,E-A)}}function he(e,t){let n=b(x(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,B(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:O(e.color,t[n]?.color),value:b(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(b(e.value,0)))),r=t.map(e=>Math.abs(b(e.value,0))/n);return m({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function V(e){return`gradient_${F()}`}function H(e,t){return`polar_gradient_${t}_${F()}`}function _e(e){return T(e.config,`type`,`classic`)!==`classic`||!x(e.config,`useGradient`,!1)?``:C(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${V(e)})`})}function U(e){return`drop_shadow_${F()}`}function ve(e){let{config:t,width:n}=e,r=x(t,`title`,{}),i=k(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?b(r.paddingLeft,12):a===`right`?n-b(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=b(r.fontSize,20),l=b(i.fontSize,14),u=b(r.paddingTop,12)+c,d=[M(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:O(r.color,A(t))})];return i.text&&d.push(M(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:O(i.color||r.color,A(t))})),j(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!x(n,`useGradient`,!1),o=!!x(n,`layout.donut.useShadow`,!1);if(i){let i=T(n,`type`,`classic`),o=b(x(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=B(n)?1:e.thickness/e.radius;r.push(j(`radialGradient`,{id:V(e)},[C(`stop`,{offset:`0%`,"stop-color":a(I(n),0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),C(`stop`,{offset:`100%`,"stop-color":a(I(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(j(`radialGradient`,{id:H(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[C(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),C(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=O(x(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=b(x(n,`layout.donut.shadowOpacity`,.2),.2),a=b(x(n,`layout.donut.shadowBlur`,6),6),o=b(x(n,`layout.donut.shadowOffsetY`,3),3);r.push(j(`filter`,{id:U(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?j(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return x(e.config,`useGradient`,!1)?`url(#${H(e,n)})`:t.color}function W(e){let{config:t}=e;return x(t,`layout.donut.borderColorAuto`,!0)?I(t):O(x(t,`layout.donut.borderColor`,I(t)),I(t))}function G(e){return x(e.config,`layout.donut.useShadow`,!1)?`url(#${U(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=W(e),r=b(x(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{b(t.proportion,0)<=0||(i.push(C(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:I(e.config)})),i.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:G(e)})))}),j(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=W(e),i=b(x(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(C(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:G(e)})))}),j(`g`,{"data-layer":`polar-slices`},a.join(``))}function K(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=x(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:b(x(i,r,s.rounding??0),s.rounding??0)});return f(s.formatter,n.value,c,{datapoint:n})}function q(e,n){let{config:r}=e,i=x(r,`layout.labels.percentage`,{}),a=b(n.proportion,0)*100,o=t({v:a,s:`%`,r:b(i.rounding,0)});return f(i.formatter,a,o,{datapoint:n})}function J(e,t){let n=x(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?K(e,t):``,percentage:a?q(e,t):``}}function we(e,t){let{value:n,percentage:r}=J(e,t);return r&&n?`${r} (${n})`:r||n||``}function Y(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?K(e,t):``,s=a?q(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function X(e,t){let n=x(e.config,`layout.labels`,{}).dataLabels??{};if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=b(n.hideUnderValue,0);return b(t.proportion,0)*100>r}function Te(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r=b(n.smallArcClusterThreshold,0),i=b(n.hideUnderValue,0),a=b(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Z(e){return!!x(e.config,`layout.curvedMarkers`,x(e.config,`layout.donut.curvedMarkers`,!1))}function Q(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=b(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Z(e);function _(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function S({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:g(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>S({arc:e,index:t})).filter(({arc:t})=>X(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function Ee({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=x(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??g(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=J(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:O(s.color,A(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},_(t+(n===m.length-1?` `:``)))).join(``):``,v=p?j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},_(p)):``;return j(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${v}`)}function De(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!T(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=b(r.fontSize??n.value?.fontSize??12,12);O(r.color??n.value?.color??A(e.config),A(e.config)),r.bold??n.value?.bold;let a=b(r.offset,16),o=Q(e,t),s=[];return t.forEach((t,n)=>{if(!X(e,t))return;let c=o[n];Y(e,t),c?s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:b(r.smallArcClusterFontSize,i)})):s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:g(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?j(`g`,{"data-layer":`data-labels`},s.join(``)):``}function Oe(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function ke(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function Ae(e,t,n,r){let i=x(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=b(a.fontSize,i.dataLabels?.fontSize??12),c=b(o.fontSize,i.dataLabels?.fontSize??12),l=j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(a.color,A(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},_(String(Y(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:O(o.color,A(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},_(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function je(e,t,n){let r=x(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=b(a.fontSize,i.fontSize??12),d=b(s.fontSize,i.fontSize??12),f=O(o.color,A(e.config)),p=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!X(e,t))return;let a=Oe(e,i,42),m=ke(e,a);l?p.push(j(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":m},Ae(e,t,a.x,m))):(p.push(j(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":m,fill:f},te({content:Y(e,t),x:a.x,fontSize:u,fill:f,textAnchor:m}))),s.show&&p.push(j(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":m,fill:O(s.color,A(e.config))},c({content:_(String(t.name??``)),fontSize:d,fill:O(s.color,A(e.config)),x:a.x}))))}),p.length?j(`g`,{"data-layer":`polar-data-labels`},p.join(``)):``}function Me(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=x(e.config,`layout.labels.dataLabels`,{}),i=b(r.offset,16),a=b(r.markerFlatLength,12),o=Z(e),s=d(t).x,c=g(t,i,i)-4,l=s+(t.center.endX>t.cx?-a:a),u=`${s},${c}`,f=`${l},${c}`,p=`${t.center.endX},${t.center.endY}`;return o?`M${u} Q${f} ${p}`:`M${u} ${f} ${p}`}function Ne(e,t){let n=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Q(e,t),i=[];return t.forEach((t,a)=>{if(!X(e,t))return;let o=r[a],s=Me(e,t,o);s&&(i.push(C(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":b(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(C(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??g(t)-3.5,r:b(n.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1})))}),i.length?j(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Pe(e,t,r){let i=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!X(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(C(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":b(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(C(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:b(i.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1}))}),a.length?j(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:M(e,{"text-anchor":`middle`,...t})}function Fe(e,n,r){if(T(e.config,`type`,`classic`)!==`classic`||B(e.config)||!n)return``;let i=x(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=b(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+b(a.offsetY,0),l=a.value??{},u=b(l.fontSize,r),d=f(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:b(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:O(a.color,A(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+b(l.offsetY,0),fill:O(l.color,O(a.color,A(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=b(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=b(u.fontSize,i),p=f(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:b(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+b(o.offsetY,0),fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+b(u.offsetY,0),fill:O(u.color,O(o.color,A(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?j(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Ie(e,n){let{config:r,center:i}=e,a=x(r,`layout.donut.labels.total`,x(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=x(r,`layout.labels.dataLabels`,{}),s=b(a.fontSize,20),c=O(a.color,A(r)),l=f(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:b(a.rounding,0)}),{total:n});return M(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Le(e,t){let n=R(L(e));return n?b(t.value,0)/n*100:0}function Re(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:b(r.roundingValue,o.rounding??0)});return f(o.formatter,n.value,s,{datapoint:n,serie:n})}function ze(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}).percentage??{},a=Le(e,n),o=t({v:a,s:`%`,r:b(r.roundingPercentage,i.rounding??0)});return f(i.formatter,a,o,{datapoint:n,serie:n})}function Be(e,t){let n=x(e.config,`legend`,{}),r=[],i=n.showPercentage?ze(e,t):``,a=n.showValue?Re(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function Ve(e,t){let n=x(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=z(e,t),i=O(n.color,A(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(C(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(M(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),j(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function He(e){return j(`g`,{"data-layer":`no-data`},[C(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:O(x(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function Ue(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function We(e,t,n){let r=`${T(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return j(`title`,{},_(r))}async function Ge(e){let t=e.config,n=b(e.width,x(t,`width`,512)),r=b(e.height,x(t,`height`,512)),i=L(e),a=R(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=T(t,`type`,`classic`),u=a>0&&s.some(e=>b(e.proportion,0)>0);return`
1
+ import{t as e}from"./useConfig-By3Vb5kz.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,i as f,in as p,j as m,nn as h,p as g,st as _,t as v}from"./lib-rPeBMZrn.js";import{t as y}from"./vue_ui_donut-T5PeOqvf.js";import{_ as b,a as x,c as S,d as C,g as w,i as T,l as E,n as D,o as O,p as k,r as A,s as ee,t as te,u as j,v as M}from"./render-common-BbY81Ao2.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=p({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=p({userConfig:y[i]||{},defaultConfig:n}),o=p({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:h[i]||r}}function N(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function P(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+N(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+N(t,0),0):N(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:N(P(o,`chart.padding.top`,24),24),right:N(P(o,`chart.padding.right`,24),24),bottom:N(P(o,`chart.padding.bottom`,24),24),left:N(P(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=N(P(o,`chart.donut.radius`,f),f),m=N(P(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:N(P(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function F(){return ue}function I(e){return O(x(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return b(e?.value??e?.absoluteValue??0,0)}function L(e){return w(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:O(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function R(e){return e.reduce((e,t)=>e+Math.abs(b(t.value,0)),0)}function fe(e){let t=x(e,`title`,{}),n=k(t,`subtitle`,{});if(!t.text)return 0;let r=b(t.fontSize,20),i=n.show!==!1&&n.text?b(n.fontSize,14):0;return b(t.paddingTop,12)+r+(i?i+12:0)+b(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=x(n,`legend`,{}),a=b(i.fontSize,12),o=b(i.markerSize,10),s=b(i.itemGap,24),c=b(i.rowGap,8),l=b(i.padding,8),u=b(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Be(e,t),r=D(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function z(e,t){return!x(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function B(e){return!!T(e,`pie`,x(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=z(e,t),s=x(n,`legend.show`,!0),c=x(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=b(x(n,`padding.top`,24),24),f=b(x(n,`padding.right`,24),24),p=b(x(n,`padding.bottom`,24),24),m=b(x(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?b(T(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=b(x(n,`layout.donut.radiusRatio`,.35),.35),S=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*S),w=x(n,`layout.donut.radius`,null),E=w==null?C:Math.min(C,b(w,C)),D=b(x(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(E*D*2,E),12*(1+D)),k=x(n,`layout.donut.thickness`,x(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(E-1,k==null?O:b(k,O)));return{...e,drawingArea:h,center:v,radius:E,thickness:A,innerRadius:B(n)?0:Math.max(0,E-A)}}function he(e,t){let n=b(x(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,B(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:O(e.color,t[n]?.color),value:b(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(b(e.value,0)))),r=t.map(e=>Math.abs(b(e.value,0))/n);return m({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function V(e){return`gradient_${F()}`}function H(e,t){return`polar_gradient_${t}_${F()}`}function _e(e){return T(e.config,`type`,`classic`)!==`classic`||!x(e.config,`useGradient`,!1)?``:C(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${V(e)})`})}function U(e){return`drop_shadow_${F()}`}function ve(e){let{config:t,width:n}=e,r=x(t,`title`,{}),i=k(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?b(r.paddingLeft,12):a===`right`?n-b(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=b(r.fontSize,20),l=b(i.fontSize,14),u=b(r.paddingTop,12)+c,d=[M(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:O(r.color,A(t))})];return i.text&&d.push(M(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:O(i.color||r.color,A(t))})),j(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!x(n,`useGradient`,!1),o=!!x(n,`layout.donut.useShadow`,!1);if(i){let i=T(n,`type`,`classic`),o=b(x(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=B(n)?1:e.thickness/e.radius;r.push(j(`radialGradient`,{id:V(e)},[C(`stop`,{offset:`0%`,"stop-color":a(I(n),0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),C(`stop`,{offset:`100%`,"stop-color":a(I(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(j(`radialGradient`,{id:H(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[C(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),C(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=O(x(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=b(x(n,`layout.donut.shadowOpacity`,.2),.2),a=b(x(n,`layout.donut.shadowBlur`,6),6),o=b(x(n,`layout.donut.shadowOffsetY`,3),3);r.push(j(`filter`,{id:U(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?j(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return x(e.config,`useGradient`,!1)?`url(#${H(e,n)})`:t.color}function W(e){let{config:t}=e;return x(t,`layout.donut.borderColorAuto`,!0)?I(t):O(x(t,`layout.donut.borderColor`,I(t)),I(t))}function G(e){return x(e.config,`layout.donut.useShadow`,!1)?`url(#${U(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=W(e),r=b(x(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{b(t.proportion,0)<=0||(i.push(C(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:I(e.config)})),i.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:G(e)})))}),j(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=W(e),i=b(x(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(C(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:G(e)})))}),j(`g`,{"data-layer":`polar-slices`},a.join(``))}function K(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=x(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:b(x(i,r,s.rounding??0),s.rounding??0)});return f(s.formatter,n.value,c,{datapoint:n})}function q(e,n){let{config:r}=e,i=x(r,`layout.labels.percentage`,{}),a=b(n.proportion,0)*100,o=t({v:a,s:`%`,r:b(i.rounding,0)});return f(i.formatter,a,o,{datapoint:n})}function J(e,t){let n=x(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?K(e,t):``,percentage:a?q(e,t):``}}function we(e,t){let{value:n,percentage:r}=J(e,t);return r&&n?`${r} (${n})`:r||n||``}function Y(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?K(e,t):``,s=a?q(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function X(e,t){let n=x(e.config,`layout.labels`,{}).dataLabels??{};if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=b(n.hideUnderValue,0);return b(t.proportion,0)*100>r}function Te(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r=b(n.smallArcClusterThreshold,0),i=b(n.hideUnderValue,0),a=b(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Z(e){return!!x(e.config,`layout.curvedMarkers`,x(e.config,`layout.donut.curvedMarkers`,!1))}function Q(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=b(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Z(e);function _(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function S({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:g(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>S({arc:e,index:t})).filter(({arc:t})=>X(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function Ee({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=x(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??g(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=J(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:O(s.color,A(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},_(t+(n===m.length-1?` `:``)))).join(``):``,v=p?j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},_(p)):``;return j(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${v}`)}function De(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!T(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=b(r.fontSize??n.value?.fontSize??12,12);O(r.color??n.value?.color??A(e.config),A(e.config)),r.bold??n.value?.bold;let a=b(r.offset,16),o=Q(e,t),s=[];return t.forEach((t,n)=>{if(!X(e,t))return;let c=o[n];Y(e,t),c?s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:b(r.smallArcClusterFontSize,i)})):s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:g(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?j(`g`,{"data-layer":`data-labels`},s.join(``)):``}function Oe(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function ke(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function Ae(e,t,n,r){let i=x(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=b(a.fontSize,i.dataLabels?.fontSize??12),c=b(o.fontSize,i.dataLabels?.fontSize??12),l=j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(a.color,A(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},_(String(Y(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:O(o.color,A(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},_(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function je(e,t,n){let r=x(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=b(a.fontSize,i.fontSize??12),d=b(s.fontSize,i.fontSize??12),f=O(o.color,A(e.config)),p=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!X(e,t))return;let a=Oe(e,i,42),m=ke(e,a);l?p.push(j(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":m},Ae(e,t,a.x,m))):(p.push(j(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":m,fill:f},te({content:Y(e,t),x:a.x,fontSize:u,fill:f,textAnchor:m}))),s.show&&p.push(j(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":m,fill:O(s.color,A(e.config))},c({content:_(String(t.name??``)),fontSize:d,fill:O(s.color,A(e.config)),x:a.x}))))}),p.length?j(`g`,{"data-layer":`polar-data-labels`},p.join(``)):``}function Me(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=x(e.config,`layout.labels.dataLabels`,{}),i=b(r.offset,16),a=b(r.markerFlatLength,12),o=Z(e),s=d(t).x,c=g(t,i,i)-4,l=s+(t.center.endX>t.cx?-a:a),u=`${s},${c}`,f=`${l},${c}`,p=`${t.center.endX},${t.center.endY}`;return o?`M${u} Q${f} ${p}`:`M${u} ${f} ${p}`}function Ne(e,t){let n=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Q(e,t),i=[];return t.forEach((t,a)=>{if(!X(e,t))return;let o=r[a],s=Me(e,t,o);s&&(i.push(C(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":b(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(C(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??g(t)-3.5,r:b(n.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1})))}),i.length?j(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Pe(e,t,r){let i=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!X(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(C(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":b(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(C(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:b(i.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1}))}),a.length?j(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:M(e,{"text-anchor":`middle`,...t})}function Fe(e,n,r){if(T(e.config,`type`,`classic`)!==`classic`||B(e.config)||!n)return``;let i=x(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=b(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+b(a.offsetY,0),l=a.value??{},u=b(l.fontSize,r),d=f(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:b(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:O(a.color,A(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+b(l.offsetY,0),fill:O(l.color,O(a.color,A(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=b(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=b(u.fontSize,i),p=f(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:b(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+b(o.offsetY,0),fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+b(u.offsetY,0),fill:O(u.color,O(o.color,A(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?j(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Ie(e,n){let{config:r,center:i}=e,a=x(r,`layout.donut.labels.total`,x(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=x(r,`layout.labels.dataLabels`,{}),s=b(a.fontSize,20),c=O(a.color,A(r)),l=f(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:b(a.rounding,0)}),{total:n});return M(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Le(e,t){let n=R(L(e));return n?b(t.value,0)/n*100:0}function Re(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:b(r.roundingValue,o.rounding??0)});return f(o.formatter,n.value,s,{datapoint:n,serie:n})}function ze(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}).percentage??{},a=Le(e,n),o=t({v:a,s:`%`,r:b(r.roundingPercentage,i.rounding??0)});return f(i.formatter,a,o,{datapoint:n,serie:n})}function Be(e,t){let n=x(e.config,`legend`,{}),r=[],i=n.showPercentage?ze(e,t):``,a=n.showValue?Re(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function Ve(e,t){let n=x(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=z(e,t),i=O(n.color,A(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(C(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(M(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),j(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function He(e){return j(`g`,{"data-layer":`no-data`},[C(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:O(x(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function Ue(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function We(e,t,n){let r=`${T(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return j(`title`,{},_(r))}async function Ge(e){let t=e.config,n=b(e.width,x(t,`width`,512)),r=b(e.height,x(t,`height`,512)),i=L(e),a=R(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=T(t,`type`,`classic`),u=a>0&&s.some(e=>b(e.proportion,0)>0);return`
2
2
  <svg
3
3
  xmlns="${v}"
4
4
  width="100%"
@@ -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,$t as o,At as s,D as c,Ht as ee,It as te,J as ne,Jt as re,Kt as ie,S as ae,X as oe,_ as se,at as ce,f as le,h as ue,i as de,in as fe,nn as pe,nt as me,p as he,t as ge,tt as _e,w as ve,y as ye,yt as be,zt as xe}from"./lib-rPeBMZrn.js";import{n as Se,t as Ce}from"./BaseScanner-8NdoBs7B.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as De}from"./useNestedProp-DnGoh-XS.js";import{t as Oe}from"./useThemeCheck-BKNRbGeC.js";import{t as ke}from"./chartImage-DPGnEuYM.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{n as Me,t as Ne}from"./tableIntegration-CNoJ1CIY.js";import{n as Pe,t as Fe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ie}from"./useTimeLabels-Das5O74F.js";import{t as Le}from"./usePrinter-DVf3YcG5.js";import{t as Re}from"./useTransitions-ChGGrtrv.js";import{t as ze}from"./useStableElementSize-CegFbRlF.js";import{t as Be}from"./useSvgLabelLayout-42Kats14.js";import{t as Ve}from"./useTimeLabelCollider-BTybMUFi.js";import{t as He}from"./useResponsive-CENUxfEL.js";import{t as Ue}from"./DefGrad-DKMq1REY.js";import{t as We}from"./SlicerPreview-ChKbdZSU.js";import{t as Ge}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ke}from"./A11yDataTable-DWNlWXzs.js";import{t as qe}from"./useUserOptionState-CXlFnwPv.js";import{t as Je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ye}from"./annotationViewport-X8fvs7pz.js";import{t as Xe}from"./Legend-DM0ClX3D.js";import{t as Ze}from"./vue_ui_donut_evolution-CVoh3twl.js";import{Fragment as l,Teleport as Qe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as $e,createTextVNode as et,createVNode as tt,defineAsyncComponent as h,guardReactiveProps as nt,mergeProps as rt,nextTick as it,normalizeClass as g,normalizeProps as at,normalizeStyle as ot,onBeforeUnmount as st,onMounted as ct,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as lt,shallowRef as ut,toDisplayString as x,toRefs as dt,unref as S,watch as ft,watchEffect as pt,withCtx as C}from"vue";var mt=/* @__PURE__ */ e({default:()=>rn}),ht=[`id`],gt=[`id`],_t=[`id`],vt={style:{position:`relative`}},yt=[`xmlns`,`aria-describedby`,`viewBox`],bt=[`x`,`y`,`width`,`height`],xt={key:1},St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt={key:0},Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`font-size`,`fill`,`transform`],Dt=[`x`,`y`,`font-size`,`fill`],Ot=[`d`,`stroke`,`stroke-width`],kt=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],At={key:0},jt=[`text-anchor`,`font-size`,`fill`,`transform`],Mt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Nt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Pt={key:1},Ft=[`cx`,`cy`,`r`,`fill`],It={key:0},Lt={key:0},Rt=[`d`,`stroke`],zt=[`text-anchor`,`x`,`y`,`fill`],Bt=[`cx`,`cy`,`r`,`fill`],Vt={key:0},Ht=[`cx`,`cy`,`fill`],Ut={key:1},Wt=[`d`,`fill`,`stroke`],Gt={key:2},Kt=[`d`,`fill`,`stroke`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`width`,`height`,`fill`],Yt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Xt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Zt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Qt={key:5,class:`vue-data-ui-watermark`},$t=[`id`],en=[`onClick`],tn={key:0},nn={key:1},rn=/*#__PURE__*/ Ee({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Ee,emit:mt}){let rn=h(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),an=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),on=h(()=>import(`./DataTable-Dof6yhO7.js`)),sn=h(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),cn=h(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ln=h(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),un=h(()=>import(`./vue-ui-donut-Cv-bYyBN.js`).then(e=>e.n)),dn=h(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_donut_evolution:fn}=i(),{isThemeValid:pn,warnInvalidTheme:mn}=Oe(),w=e,T=v(oe()),E=v([]),D=v(null),O=v(null),hn=v(!1),k=v(null),A=v(null),gn=v(null),_n=v(0),vn=v(0),yn=v(0),bn=v(0),xn=v(0),Sn=v(null),Cn=v(null),wn=v(null),Tn=v(null),En=v(!1),Dn=v(null),On=v(null),kn=ut(null),An=v(0),jn=v(0),Mn=v(!1);function Nn(){kn.value=A.value?.parentNode??null}function Pn(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Fn(){let e=++jn.value;await it(),await Pn(),await Pn(),e===jn.value&&(An.value+=1)}function In(){Mn.value||(Mn.value=!0,it(()=>{Mn.value=!1,Nn(),Fn()}))}let Ln=ze({elementRef:kn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Fn()}}),Rn=v(null),zn=v(null),Bn=v(null),Vn=v(null),Hn=v(null),Un=v(!1),j=ut(null),Wn=ut(null),Gn=v(null),M=v(null),Kn=v(!1),N=mt,qn=u(()=>!!w.dataset&&w.dataset.length),Jn=v(!1),Yn=0;ct(()=>{En.value=!0,Nn(),Ln.start(),Zn(),Fn()});let Xn=u(()=>P.value.debug);function Zn(){xe(w.dataset)?(ce({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:Xn.value}),rr.value=!0):w.dataset.length&&w.dataset.forEach((e,t)=>{be({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:Xn.value}),rr.value=!0})}),xe(w.dataset)||(rr.value=P.value.loading),setTimeout(()=>{Un.value=!0},10),Sr(),P.value.responsive&&(j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect()),j.value=new ResizeObserver(()=>{Un.value=!1;let{width:e,height:t}=He({chart:A.value,title:P.value.style.chart.title.text?Rn.value:null,legend:P.value.style.chart.legend.show?zn.value:null,slicer:P.value.style.chart.zoom.show&&ir.value>1?Hn.value:null,source:Bn.value});cancelAnimationFrame(Yn),Yn=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,Jn.value=!0,In(),clearTimeout(Gn.value),Gn.value=setTimeout(()=>{Un.value=!0},10)})}),Wn.value=A.value.parentNode,j.value.observe(Wn.value)),In()}let P=v(Ar()),F=u(()=>I.value.grid),I=u(()=>P.value.style.chart.layout),Qn=u(()=>P.value.style.chart.dialog),L=u(()=>P.value.style.chart);we({config:()=>P.value,dataset:()=>w.dataset,component:`VueUiDonutEvolution`,rules:[Te.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:$n}=Re({config:()=>P.value.transitions,dataset:()=>w.dataset}),R=u(()=>P.value.userOptions.useCursorPointer),er=u(()=>fe({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:P.value.skeletonConfig??{}})),{loading:tr,FINAL_DATASET:nr,manualLoading:rr}=Se({...dt(w),FINAL_CONFIG:P,prepareConfig:Ar,callback:()=>{Promise.resolve().then(async()=>{await Sr()})},skeletonDataset:w.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:fe({defaultConfig:P.value,userConfig:er.value})}),z=v({width:I.value.width,height:I.value.height}),ir=u(()=>Math.max(...nr.value.map(e=>e.values.length))),B=v({start:0,end:ir.value}),V=v(!1),ar=v(!1),or=v(null),H=v(null),U=v(null),sr=v(!1),cr=v({time:0,x:0,y:0,pointerType:null}),lr=u(()=>P.value.style.chart.zoom?.dragToZoom),W=u(()=>lr.value.show&&qn.value&&dr.value&&Y.value>1&&!tr.value),ur=v(!1),dr=v(!1),fr=v(!1),pr=null,mr={};function hr(e,t=B.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 gr(e){let t=hr(e);t&&N(`update:zoomState`,t)}function _r(){pr&&=(cancelAnimationFrame(pr),null),mr={}}function vr(e,t=B.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function yr(){let e=Y.value;if(!Number.isFinite(e)||e<=0){B.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(B.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(B.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),B.value={start:t,end:n},Vn.value&&Vn.value.setRangeValues(t,n)}function br(e){let t=hr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(B.value.start)||r!==Number(B.value.end))&&(_r(),B.value={start:n,end:r},yr(),In()),{start:Number(B.value.start),end:Number(B.value.end)}}function xr(e){let t=br(e);return t?(gr(t),t):null}async function Sr(e=!0){if(!ur.value){ur.value=!0;try{await it(),await it();let{startIndex:t,endIndex:n}=L.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){B.value={start:0,end:0},dr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:vr(Number(n)+1,i);fr.value=!0,B.value={start:i,end:a},yr(),dr.value=!0,e&&w.zoomState&&br(w.zoomState)}finally{queueMicrotask(()=>{fr.value=!1}),ur.value=!1,In()}}}async function Cr({force:e=!1,publish:t=!1}={}){await Sr(!e),t&&(gr({start:Number(B.value.start),end:Number(B.value.end)}),N(`zoomReset`))}ft([()=>w.zoomState,dr],([e,t])=>{t&&e&&br(e)},{deep:!0,immediate:!0});function wr(e){mr={...mr,...e},pr&&cancelAnimationFrame(pr),pr=requestAnimationFrame(()=>{let e={...B.value,...mr};mr={},pr=null,B.value=e,yr(),In(),gr({start:Number(B.value.start),end:Number(B.value.end)})})}function Tr(e){if(ur.value||fr.value)return;let t=Number(e);Number.isFinite(t)&&(N(`zoomStart`,{index:t,isZoom:t!==0}),t!==B.value.start&&wr({start:t}))}function Er(e){if(ur.value||fr.value)return;let t=mr.start===void 0?B.value.start:mr.start,n=vr(Number(e),t);Number.isFinite(n)&&(N(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==B.value.end||mr.start!==void 0)&&wr({end:n}))}let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=qe({config:P.value}),{svgRef:G}=Je({config:L.value.title});function Ar(){let e=De({userConfig:w.config,defaultConfig:fn}),t={},n=e.theme;if(n){if(!pn.value(e))mn(e),t=e;else{let r=De({userConfig:Ze[n]||w.config,defaultConfig:e});t={...De({userConfig:w.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:pe[n]||ee}}}else t=e;return t}ft(()=>w.config,e=>{tr.value||(P.value=Ar()),Dr.value=!P.value.userOptions.showOnChartHover,Zn(),yn.value+=1,bn.value+=1,xn.value+=1,Lr.value.showTable=P.value.table.show},{deep:!0}),ft(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rr.value=!1),Cr()},{deep:!0});let{isPrinting:jr,isImaging:Mr,generatePdf:Nr,generateImage:Pr}=Le({elementId:T.value,fileName:L.value.title.text||`vue-ui-donut-evolution`,options:P.value.userOptions.print}),Fr=u(()=>P.value.userOptions.show&&!L.value.title.text),Ir=u(()=>ve(P.value.customPalette)),Lr=v({showTable:P.value.table.show});ft(P,()=>{Lr.value={showTable:P.value.table.show}},{immediate:!0});let Rr=u(()=>({top:I.value.padding.top,right:I.value.padding.right,bottom:I.value.padding.bottom,left:I.value.padding.left})),K=u(()=>F.value.yAxis.position===`right`),{metrics:zr,ready:Br,settling:Vr,update:Hr}=Be({svgRef:G,canMeasure:()=>(!P.value.responsive||Jn.value)&&(!F.value.xAxis.dataLabels.show||Kr.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(Sn.value).textWidth,yAxisLabelWidth:e(Tn.value).rotatedWidth,xAxisLabelHeight:e(wn.value).height,timeLabelsHeight:e(Cn.value).height})});function Ur(){let e=zr.value.scaleLabelsWidth,t=Tn.value?zr.value.yAxisLabelWidth+F.value.axis.yLabelOffsetX+F.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}st(()=>{cancelAnimationFrame(Yn),Ln.stop(),clearTimeout(Gn.value),_r(),yi(),ai(),j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect(),j.value=null,Wn.value=null)});let Wr=u(()=>zr.value.xAxisLabelHeight+zr.value.timeLabelsHeight+F.value.axis.fontSize+F.value.xAxis.dataLabels.offsetY),q=u(()=>{let e=Ur(),t=I.value.dataLabels.fontSize*3,n=z.value.width,r=z.value.height,i=Rr.value.left+e.left,a=n-Rr.value.right-e.right,o=n-i-Rr.value.right-e.right,s=r-Rr.value.top-Rr.value.bottom-t-Wr.value,c=Rr.value.top+t;return{top:c,left:i,right:a,bottom:r-Rr.value.bottom-Wr.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:c+Math.max(10,s)/2,width:Math.max(10,o),height:Math.max(10,s),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>(Xn.value&&nr.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),nr.value.map((e,t)=>({...e,values:ie(e.values),color:ae(e.color)||Ir.value[t]||ee[t]||ee[t%ee.length],length:(e.values||[]).length,uid:oe()})))),Gr=u(()=>J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=B.value.start&&t<=B.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=v([]),Kr=v(!1),qr=0;pt(()=>{let e=++qr;(async()=>{let t=await Ie({values:F.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:F.value.xAxis.dataLabels.datetimeFormatter,start:B.value.start,end:B.value.end});e===qr&&(X.value=t,Kr.value=!0)})()});let Z=u(()=>q.value.width/(B.value.end-B.value.start)),Jr=u(()=>{let e=[];for(let t=0;t<B.value.end-B.value.start;t+=1){let n=Gr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Yr=u(()=>{let e=Math.max(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??1,t=Math.min(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??0,n=Math.max(F.value.yAxis.scaleMax??0,e),r;return r=F.value.yAxis.scaleMin==null?0:Math.min(t,F.value.yAxis.scaleMin),F.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=Jr.value.length===1?Yr.value.max*2:Yr.value.max;return se(Yr.value.min,e,F.value.yAxis.dataLabels.steps)});ft(()=>Q.value.ticks.join(`|`),()=>{In()},{flush:`post`});function Xr(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Zr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Xr(e),value:e}))),$=u(()=>{let e=Jr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=D.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Xr(t.subtotal),c=Gr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:te({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:te({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:te({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function Qr(e,t,n){return de(I.value.dataLabels.formatter,e,a({p:I.value.dataLabels.prefix,v:e,s:I.value.dataLabels.suffix,r:I.value.dataLabels.rounding}),{datapoint:t,index:n})}function $r(e,t){return isNaN(e.value/o(t,`value`))?0:(e.value/o(t,`value`)*100).toFixed(0)+`%`}function ei(e){let t=G.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}let ti=u(()=>!V.value||or.value==null||H.value==null?null:{x:Math.min(or.value,H.value),y:q.value.top,width:Math.abs(H.value-or.value),height:q.value.height}),ni=u(()=>dr.value?Number(B.value.start)!==0||Number(B.value.end)!==Number(Y.value):!1);function ri(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function ii(){D.value=null,O.value=null,M.value=null}function ai(e){let t=e?.pointerId==null?U.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),V.value=!1,or.value=null,H.value=null,U.value=null}function oi(){sr.value=!0,setTimeout(()=>{sr.value=!1},0)}function si(e){sr.value&&(sr.value=!1,e.preventDefault(),e.stopPropagation())}function ci(e){if(!W.value||!ni.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=cr.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(cr.value={time:0,x:0,y:0,pointerType:null},oi(),yi(),ai(e),Hi(),Cr({force:!0,publish:!0}),!0):(cr.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function li(e){let t=Number(B.value.end)-Number(B.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((ri(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function ui(e,t){let n=li(e),r=li(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(B.value.start)+i,end:Number(B.value.start)+a+1}}function di(e){let t=xr(e);return t?(N(`zoomStart`,{index:t.start,isZoom:t.start!==0}),N(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function fi(e){if(!W.value||Ii.value||e.button!==void 0&&e.button!==0||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(B.value.end)-Number(B.value.start)<=1)return;ar.value=!0,G.value?.focus?.({preventScroll:!0}),yi(),ii();let n=ri(t.x);U.value=e.pointerId,V.value=!0,or.value=n,H.value=n}function pi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x),ii(),or.value!=null&&Math.abs(H.value-or.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function mi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x));let n=or.value,r=H.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(ci(e))return;ai(e);return}let i=ui(Math.min(n,r),Math.max(n,r));i?(ai(e),di(i)&&(cr.value={time:0,x:0,y:0,pointerType:null},ii(),oi())):ai(e)}function hi(e){V.value||(D.value=null,O.value=null,M.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+B.value.start}))}function gi(e){V.value||(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+B.value.start}),D.value=e.index,O.value=e,M.value=e.index)}let _i=v(null),vi=null;function yi(){vi&&=(clearTimeout(vi),null)}function bi(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.index+B.value.start}),e.subtotal&&Qn.value.show&&(O.value=null,D.value=null,hn.value=!0,k.value=e,Ui(e),[null,void 0].includes(t)||(_i.value=t))}function xi(e,t){if(yi(),!W.value||!ni.value){bi(e,t);return}let n=cr.value.pointerType===`touch`?480:380;vi=setTimeout(()=>{vi=null,bi(e,t)},n)}let Si=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(B.value.start,B.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:E.value.includes(e.uid)?.5:1,segregate:()=>Ei(e.uid),isSegregated:E.value.includes(e.uid),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${L.value.legend.showValue?de(I.value.dataLabels.formatter,e.value,a({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${L.value.legend.showPercentage?E.value.includes(e.uid)?`${L.value.legend.showValue?` (`:``}- %${L.value.legend.showValue?`)`:``}`:`${L.value.legend.showValue?` (`:``}${isNaN(e.value/Ci.value)?`-`:a({v:e.value/Ci.value*100,s:`%`,r:L.value.legend.roundingPercentage})}${L.value.legend.showValue?`)`:``}`:``}`}))),Ci=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),wi=u(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``}));function Ti(){E.value.length?E.value=[]:Si.value.forEach(e=>{E.value.push(e.uid)}),N(`selectLegend`,Gr.value)}function Ei(e){if(E.value.includes(e))E.value=E.value.filter(t=>t!==e),N(`selectLegend`,Gr.value);else{if(E.value.length===J.value.length-1)return;E.value.push(e),N(`selectLegend`,Gr.value)}k.value&&bi($.value.find((e,t)=>t===_i.value))}function Di(e){return J.value.length?J.value.find(t=>t.name===e)||(Xn.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):(Xn.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function Oi(e){let t=Di(e);t!==null&&E.value.includes(t.uid)&&Ei(t.uid)}function ki(e){let t=Di(e);t!==null&&(E.value.includes(t.uid)||Ei(t.uid))}let Ai=u(()=>{let e=[``].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!E.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${I.value.dataLabels.prefix}${Number(n.toFixed(P.value.table.td.roundingValue))}${I.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${Qr(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:[P.value.table.columnNames.period].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>e.name),P.value.table.columnNames.total)}});function ji(){return J.value}function Mi(e=null){it(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=[...Ai.value.head.map(e=>e.name??e)],r=[...Ai.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),a=c(i);e?e(a):me({csvContent:a,title:L.value.title.text||`vue-ui-donut-evolution`})})}let Ni=v(!1);function Pi(e){Ni.value=e,_n.value+=1}function Fi(){Lr.value.showTable=!Lr.value.showTable}let Ii=v(!1);function Li(){Ii.value=!Ii.value}function Ri(e){return e.proportion*100>L.value.donuts.hover.hideLabelsUnderValue}let zi=v([]),Bi=v({}),Vi=v(null);function Hi(){Vi.value?.close?.(),k.value=null,_i.value=null,hn.value=!1,O.value=null,D.value=null,M.value=null}function Ui(e){zi.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),Bi.value=_e({...Qn.value.donutChart,responsive:!0,theme:P.value.theme}),Vi.value&&Vi.value.open()}let Wi=ke(A,()=>L.value.title.text),Gi=u(()=>z.value.width),Ki=u(()=>z.value.height);Ve({timeLabelsEls:Cn,timeLabels:X,slicer:B,configRef:P,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Gi,height:Ki,rotation:F.value.xAxis.dataLabels.autoRotate.angle});let qi=u(()=>Ne({config:P,style:L,mutableConfig:Lr,dialog:dn,accordion:rn,isFullscreen:Ni,parent:A,maxWidth:800,isCursorPointer:R}));ft(()=>Lr.value.showTable,e=>Me(e,P,Dn));function Ji(){Lr.value.showTable=!1,On.value&&On.value.setTableIconState(!1)}let Yi=u(()=>Si.value.map(e=>({...e,name:e.display}))),Xi=u(()=>L.value.backgroundColor),Zi=u(()=>L.value.legend),Qi=u(()=>L.value.title),{isCallbackImaging:$i,isCallbackSvg:ea,generateSvg:ta,onGenerateImage:na}=je({svg:G,title:Qi,legend:Zi,legendItems:Yi,backgroundColor:Xi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Pr});async function ra(){N(`copyAlt`,{config:P.value,dataset:$.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ia(){M.value=null,Kn.value=!0}function aa(){ar.value=!1,M.value=null,D.value=null,O.value=null,Kn.value=!1}function oa(e){if(!G.value||Ii.value||document.activeElement!==G.value||(ar.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(W.value&&(ni.value||V.value)){yi(),ai(),Hi(),Cr({force:!0,publish:!0});return}M.value=null,D.value=null,O.value=null;return}if(r){if(M.value===null)return;let e=$.value[M.value];if(!e)return;bi(e,M.value);return}let a=M.value,o=D.value,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ee=$.value[a];ee&&gi(ee)}let sa=u(()=>({headers:Ai.value?.colNames??[],rows:Ai.value?.bodyA11y??[]}));Ee({getData:ji,getImage:Wi,generatePdf:Nr,generateCsv:Mi,generateImage:Pr,generateSvg:ta,hideSeries:ki,showSeries:Oi,toggleTable:Fi,toggleAnnotator:Li,toggleFullscreen:Pi,copyAlt:ra,resetZoom:()=>Cr({force:!0,publish:!0}),setZoomState:xr}),ft(()=>[z.value.width,z.value.height,An.value,X.value,Kr.value,B.value.start,B.value.end,F.value,I.value,P.value.style.fontFamily,w.dataset,Jn.value,Sn.value,Cn.value,wn.value,Tn.value],Hr,{flush:`post`,deep:!0});let ca=u(()=>Ye({enabled:P.value.userOptions?.annotator?.followZoom,area:q.value,range:B.value,ticks:Zr.value}));return(e,i)=>(_(),p(`div`,{ref_key:`donutEvolutionChart`,ref:A,class:g(`vue-data-ui-component vue-ui-donut-evolution ${Ni.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:ot(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor}`),id:T.value,onMouseenter:i[4]||=()=>S(Or)(!0),onMouseleave:i[5]||=()=>S(Or)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,x(P.value.a11y.translations.keyboardNavigation),1)],8,gt),sa.value?.rows?.length?(_(),d(Ke,{key:0,uid:T.value,head:sa.value.headers,body:sa.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(_(),d(S(cn),rt({key:1},S(n)(P.value.userOptions.annotator),{svgRef:S(G),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:ca.value,backgroundColor:L.value.backgroundColor,color:L.value.color,active:Ii.value,isCursorPointer:R.value,palette:P.value.userOptions.annotatorPalette,onClose:Li}),$e({_:2},[y(S(r),n=>({name:n,fn:C(r=>[b(e.$slots,n,at(nt(S(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Fr.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:gn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),L.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rn,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:hi},[(_(),d(Ae,{key:`title_${yn.value}`,config:{title:{cy:`donut-evolution-div-title`,...L.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${T.value}`},null,8,_t),P.value.userOptions.show&&qn.value&&(S(kr)||S(Dr))?(_(),d(S(ln),{ref_key:`userOptionsRef`,ref:On,key:`user_options_${_n.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:S(jr),isImaging:S(Mr),uid:T.value,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ni.value,titles:{...P.value.userOptions.buttonTitles},chartElement:A.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Ii.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Pi,onGeneratePdf:S(Nr),onGenerateCsv:Mi,onGenerateImage:S(na),onGenerateSvg:S(ta),onToggleTable:Fi,onToggleAnnotator:Li,onCopyAlt:ra,style:ot({visibility:S(kr)?S(Dr)?`visible`:`hidden`:`visible`})},$e({_:2},[y(S(Pe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,at(nt(S(Fe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,vt,[(_(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:S(ge),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Ni.value,"vue-data-ui-fulscreen--off":!Ni.value,"vue-data-ui-no-transition":!S($n)||S(Vr),"vue-ui-donut-evolution-chart-zoom-pointer-focus":W.value&&ar.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:ot({maxWidth:`100%`,visibility:S(Br)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:L.value.color,cursor:W.value?V.value?`col-resize`:`crosshair`:void 0,touchAction:W.value?`pan-y`:void 0,userSelect:W.value?`none`:void 0}),tabindex:`0`,onFocus:ia,onBlur:aa,onKeydown:oa,onPointerdown:fi,onPointermove:pi,onPointerup:mi,onPointercancel:ai,onClickCapture:si},[tt(S(sn)),b(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:S(jr)||S(Mr)||S($i),isPrintingSvg:S(ea)}},void 0,!0),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,bt)):f(``,!0),m(`defs`,null,[tt(Ue,{t:`linear`,id:`hover_${T.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,S(re)(L.value.backgroundColor,I.value.highlighter.opacity),1],[`100%`,S(re)(I.value.highlighter.color,I.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),tt(Ue,{t:`radial`,id:`focus_${T.value}`,stops:[[`0%`,S(re)(S(ae)(L.value.backgroundColor),0),1],[`77%`,S(re)(`#FFFFFF`,30),1],[`100%`,S(re)(S(ae)(L.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),F.value.show?(_(),p(`g`,xt,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,St),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Ct),F.value.showVerticalLines?(_(),p(`g`,wt,[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Tt))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[F.value.axis.yLabel?(_(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:Tn,"font-size":F.value.axis.fontSize,fill:F.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-F.value.axis.fontSize/2-F.value.axis.yLabelOffsetX:F.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},x(F.value.axis.yLabel),9,Et)):f(``,!0),F.value.axis.xLabel?(_(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:wn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":F.value.axis.fontSize,fill:F.value.axis.color},x(F.value.axis.xLabel),9,Dt)):f(``,!0)]),F.value.yAxis.dataLabels.show?(_(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:Sn,class:g({"donut-opacity":!0,"donut-behind":D.value!==null})},[(_(!0),p(l,null,y(Zr.value,(e,t)=>(_(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`path`,{key:0,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,10,Ot)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`text`,{key:1,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),transform:`translate(${K.value?q.value.right-F.value.yAxis.dataLabels.offsetX+7:q.value.left+F.value.yAxis.dataLabels.offsetX-7}, ${e.y+F.value.yAxis.dataLabels.fontSize/3})`,"font-size":F.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:F.value.yAxis.dataLabels.color,"font-weight":F.value.yAxis.dataLabels.bold?`bold`:`normal`},x(S(ye)(e.value)?S(de)(I.value.dataLabels.formatter,e.value,S(a)({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:I.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,kt)):f(``,!0)]))),128))],2)):f(``,!0),F.value.xAxis.dataLabels.show?(_(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Cn,class:g({"donut-opacity":!0})},[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`g`,null,[(F.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!F.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(_(),p(`g`,At,[String(X.value[t].text).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,$t as o,At as s,D as c,Ht as ee,It as te,J as ne,Jt as re,Kt as ie,S as ae,X as oe,_ as se,at as ce,f as le,h as ue,i as de,in as fe,nn as pe,nt as me,p as he,t as ge,tt as _e,w as ve,y as ye,yt as be,zt as xe}from"./lib-rPeBMZrn.js";import{n as Se,t as Ce}from"./BaseScanner-8NdoBs7B.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as De}from"./useNestedProp-DnGoh-XS.js";import{t as Oe}from"./useThemeCheck-BKNRbGeC.js";import{t as ke}from"./chartImage-DPGnEuYM.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{n as Me,t as Ne}from"./tableIntegration-CNoJ1CIY.js";import{n as Pe,t as Fe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ie}from"./useTimeLabels-Das5O74F.js";import{t as Le}from"./usePrinter-DVf3YcG5.js";import{t as Re}from"./useTransitions-ChGGrtrv.js";import{t as ze}from"./useStableElementSize-CegFbRlF.js";import{t as Be}from"./useSvgLabelLayout-42Kats14.js";import{t as Ve}from"./useTimeLabelCollider-BTybMUFi.js";import{t as He}from"./useResponsive-CENUxfEL.js";import{t as Ue}from"./DefGrad-DKMq1REY.js";import{t as We}from"./SlicerPreview-ChKbdZSU.js";import{t as Ge}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ke}from"./A11yDataTable-DWNlWXzs.js";import{t as qe}from"./useUserOptionState-CXlFnwPv.js";import{t as Je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ye}from"./annotationViewport-X8fvs7pz.js";import{t as Xe}from"./Legend-DM0ClX3D.js";import{t as Ze}from"./vue_ui_donut_evolution-CVoh3twl.js";import{Fragment as l,Teleport as Qe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as $e,createTextVNode as et,createVNode as tt,defineAsyncComponent as h,guardReactiveProps as nt,mergeProps as rt,nextTick as it,normalizeClass as g,normalizeProps as at,normalizeStyle as ot,onBeforeUnmount as st,onMounted as ct,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as lt,shallowRef as ut,toDisplayString as x,toRefs as dt,unref as S,watch as ft,watchEffect as pt,withCtx as C}from"vue";var mt=/* @__PURE__ */ e({default:()=>rn}),ht=[`id`],gt=[`id`],_t=[`id`],vt={style:{position:`relative`}},yt=[`xmlns`,`aria-describedby`,`viewBox`],bt=[`x`,`y`,`width`,`height`],xt={key:1},St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt={key:0},Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`font-size`,`fill`,`transform`],Dt=[`x`,`y`,`font-size`,`fill`],Ot=[`d`,`stroke`,`stroke-width`],kt=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],At={key:0},jt=[`text-anchor`,`font-size`,`fill`,`transform`],Mt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Nt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Pt={key:1},Ft=[`cx`,`cy`,`r`,`fill`],It={key:0},Lt={key:0},Rt=[`d`,`stroke`],zt=[`text-anchor`,`x`,`y`,`fill`],Bt=[`cx`,`cy`,`r`,`fill`],Vt={key:0},Ht=[`cx`,`cy`,`fill`],Ut={key:1},Wt=[`d`,`fill`,`stroke`],Gt={key:2},Kt=[`d`,`fill`,`stroke`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`width`,`height`,`fill`],Yt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Xt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Zt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Qt={key:5,class:`vue-data-ui-watermark`},$t=[`id`],en=[`onClick`],tn={key:0},nn={key:1},rn=/*#__PURE__*/ Ee({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Ee,emit:mt}){let rn=h(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),an=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),on=h(()=>import(`./DataTable-Dof6yhO7.js`)),sn=h(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),cn=h(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ln=h(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),un=h(()=>import(`./vue-ui-donut-BlQXnf7O.js`).then(e=>e.n)),dn=h(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_donut_evolution:fn}=i(),{isThemeValid:pn,warnInvalidTheme:mn}=Oe(),w=e,T=v(oe()),E=v([]),D=v(null),O=v(null),hn=v(!1),k=v(null),A=v(null),gn=v(null),_n=v(0),vn=v(0),yn=v(0),bn=v(0),xn=v(0),Sn=v(null),Cn=v(null),wn=v(null),Tn=v(null),En=v(!1),Dn=v(null),On=v(null),kn=ut(null),An=v(0),jn=v(0),Mn=v(!1);function Nn(){kn.value=A.value?.parentNode??null}function Pn(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Fn(){let e=++jn.value;await it(),await Pn(),await Pn(),e===jn.value&&(An.value+=1)}function In(){Mn.value||(Mn.value=!0,it(()=>{Mn.value=!1,Nn(),Fn()}))}let Ln=ze({elementRef:kn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Fn()}}),Rn=v(null),zn=v(null),Bn=v(null),Vn=v(null),Hn=v(null),Un=v(!1),j=ut(null),Wn=ut(null),Gn=v(null),M=v(null),Kn=v(!1),N=mt,qn=u(()=>!!w.dataset&&w.dataset.length),Jn=v(!1),Yn=0;ct(()=>{En.value=!0,Nn(),Ln.start(),Zn(),Fn()});let Xn=u(()=>P.value.debug);function Zn(){xe(w.dataset)?(ce({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:Xn.value}),rr.value=!0):w.dataset.length&&w.dataset.forEach((e,t)=>{be({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:Xn.value}),rr.value=!0})}),xe(w.dataset)||(rr.value=P.value.loading),setTimeout(()=>{Un.value=!0},10),Sr(),P.value.responsive&&(j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect()),j.value=new ResizeObserver(()=>{Un.value=!1;let{width:e,height:t}=He({chart:A.value,title:P.value.style.chart.title.text?Rn.value:null,legend:P.value.style.chart.legend.show?zn.value:null,slicer:P.value.style.chart.zoom.show&&ir.value>1?Hn.value:null,source:Bn.value});cancelAnimationFrame(Yn),Yn=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,Jn.value=!0,In(),clearTimeout(Gn.value),Gn.value=setTimeout(()=>{Un.value=!0},10)})}),Wn.value=A.value.parentNode,j.value.observe(Wn.value)),In()}let P=v(Ar()),F=u(()=>I.value.grid),I=u(()=>P.value.style.chart.layout),Qn=u(()=>P.value.style.chart.dialog),L=u(()=>P.value.style.chart);we({config:()=>P.value,dataset:()=>w.dataset,component:`VueUiDonutEvolution`,rules:[Te.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:$n}=Re({config:()=>P.value.transitions,dataset:()=>w.dataset}),R=u(()=>P.value.userOptions.useCursorPointer),er=u(()=>fe({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:P.value.skeletonConfig??{}})),{loading:tr,FINAL_DATASET:nr,manualLoading:rr}=Se({...dt(w),FINAL_CONFIG:P,prepareConfig:Ar,callback:()=>{Promise.resolve().then(async()=>{await Sr()})},skeletonDataset:w.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:fe({defaultConfig:P.value,userConfig:er.value})}),z=v({width:I.value.width,height:I.value.height}),ir=u(()=>Math.max(...nr.value.map(e=>e.values.length))),B=v({start:0,end:ir.value}),V=v(!1),ar=v(!1),or=v(null),H=v(null),U=v(null),sr=v(!1),cr=v({time:0,x:0,y:0,pointerType:null}),lr=u(()=>P.value.style.chart.zoom?.dragToZoom),W=u(()=>lr.value.show&&qn.value&&dr.value&&Y.value>1&&!tr.value),ur=v(!1),dr=v(!1),fr=v(!1),pr=null,mr={};function hr(e,t=B.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 gr(e){let t=hr(e);t&&N(`update:zoomState`,t)}function _r(){pr&&=(cancelAnimationFrame(pr),null),mr={}}function vr(e,t=B.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function yr(){let e=Y.value;if(!Number.isFinite(e)||e<=0){B.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(B.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(B.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),B.value={start:t,end:n},Vn.value&&Vn.value.setRangeValues(t,n)}function br(e){let t=hr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(B.value.start)||r!==Number(B.value.end))&&(_r(),B.value={start:n,end:r},yr(),In()),{start:Number(B.value.start),end:Number(B.value.end)}}function xr(e){let t=br(e);return t?(gr(t),t):null}async function Sr(e=!0){if(!ur.value){ur.value=!0;try{await it(),await it();let{startIndex:t,endIndex:n}=L.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){B.value={start:0,end:0},dr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:vr(Number(n)+1,i);fr.value=!0,B.value={start:i,end:a},yr(),dr.value=!0,e&&w.zoomState&&br(w.zoomState)}finally{queueMicrotask(()=>{fr.value=!1}),ur.value=!1,In()}}}async function Cr({force:e=!1,publish:t=!1}={}){await Sr(!e),t&&(gr({start:Number(B.value.start),end:Number(B.value.end)}),N(`zoomReset`))}ft([()=>w.zoomState,dr],([e,t])=>{t&&e&&br(e)},{deep:!0,immediate:!0});function wr(e){mr={...mr,...e},pr&&cancelAnimationFrame(pr),pr=requestAnimationFrame(()=>{let e={...B.value,...mr};mr={},pr=null,B.value=e,yr(),In(),gr({start:Number(B.value.start),end:Number(B.value.end)})})}function Tr(e){if(ur.value||fr.value)return;let t=Number(e);Number.isFinite(t)&&(N(`zoomStart`,{index:t,isZoom:t!==0}),t!==B.value.start&&wr({start:t}))}function Er(e){if(ur.value||fr.value)return;let t=mr.start===void 0?B.value.start:mr.start,n=vr(Number(e),t);Number.isFinite(n)&&(N(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==B.value.end||mr.start!==void 0)&&wr({end:n}))}let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=qe({config:P.value}),{svgRef:G}=Je({config:L.value.title});function Ar(){let e=De({userConfig:w.config,defaultConfig:fn}),t={},n=e.theme;if(n){if(!pn.value(e))mn(e),t=e;else{let r=De({userConfig:Ze[n]||w.config,defaultConfig:e});t={...De({userConfig:w.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:pe[n]||ee}}}else t=e;return t}ft(()=>w.config,e=>{tr.value||(P.value=Ar()),Dr.value=!P.value.userOptions.showOnChartHover,Zn(),yn.value+=1,bn.value+=1,xn.value+=1,Lr.value.showTable=P.value.table.show},{deep:!0}),ft(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rr.value=!1),Cr()},{deep:!0});let{isPrinting:jr,isImaging:Mr,generatePdf:Nr,generateImage:Pr}=Le({elementId:T.value,fileName:L.value.title.text||`vue-ui-donut-evolution`,options:P.value.userOptions.print}),Fr=u(()=>P.value.userOptions.show&&!L.value.title.text),Ir=u(()=>ve(P.value.customPalette)),Lr=v({showTable:P.value.table.show});ft(P,()=>{Lr.value={showTable:P.value.table.show}},{immediate:!0});let Rr=u(()=>({top:I.value.padding.top,right:I.value.padding.right,bottom:I.value.padding.bottom,left:I.value.padding.left})),K=u(()=>F.value.yAxis.position===`right`),{metrics:zr,ready:Br,settling:Vr,update:Hr}=Be({svgRef:G,canMeasure:()=>(!P.value.responsive||Jn.value)&&(!F.value.xAxis.dataLabels.show||Kr.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(Sn.value).textWidth,yAxisLabelWidth:e(Tn.value).rotatedWidth,xAxisLabelHeight:e(wn.value).height,timeLabelsHeight:e(Cn.value).height})});function Ur(){let e=zr.value.scaleLabelsWidth,t=Tn.value?zr.value.yAxisLabelWidth+F.value.axis.yLabelOffsetX+F.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}st(()=>{cancelAnimationFrame(Yn),Ln.stop(),clearTimeout(Gn.value),_r(),yi(),ai(),j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect(),j.value=null,Wn.value=null)});let Wr=u(()=>zr.value.xAxisLabelHeight+zr.value.timeLabelsHeight+F.value.axis.fontSize+F.value.xAxis.dataLabels.offsetY),q=u(()=>{let e=Ur(),t=I.value.dataLabels.fontSize*3,n=z.value.width,r=z.value.height,i=Rr.value.left+e.left,a=n-Rr.value.right-e.right,o=n-i-Rr.value.right-e.right,s=r-Rr.value.top-Rr.value.bottom-t-Wr.value,c=Rr.value.top+t;return{top:c,left:i,right:a,bottom:r-Rr.value.bottom-Wr.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:c+Math.max(10,s)/2,width:Math.max(10,o),height:Math.max(10,s),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>(Xn.value&&nr.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),nr.value.map((e,t)=>({...e,values:ie(e.values),color:ae(e.color)||Ir.value[t]||ee[t]||ee[t%ee.length],length:(e.values||[]).length,uid:oe()})))),Gr=u(()=>J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=B.value.start&&t<=B.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=v([]),Kr=v(!1),qr=0;pt(()=>{let e=++qr;(async()=>{let t=await Ie({values:F.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:F.value.xAxis.dataLabels.datetimeFormatter,start:B.value.start,end:B.value.end});e===qr&&(X.value=t,Kr.value=!0)})()});let Z=u(()=>q.value.width/(B.value.end-B.value.start)),Jr=u(()=>{let e=[];for(let t=0;t<B.value.end-B.value.start;t+=1){let n=Gr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Yr=u(()=>{let e=Math.max(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??1,t=Math.min(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??0,n=Math.max(F.value.yAxis.scaleMax??0,e),r;return r=F.value.yAxis.scaleMin==null?0:Math.min(t,F.value.yAxis.scaleMin),F.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=Jr.value.length===1?Yr.value.max*2:Yr.value.max;return se(Yr.value.min,e,F.value.yAxis.dataLabels.steps)});ft(()=>Q.value.ticks.join(`|`),()=>{In()},{flush:`post`});function Xr(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Zr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Xr(e),value:e}))),$=u(()=>{let e=Jr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=D.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Xr(t.subtotal),c=Gr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:te({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:te({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:te({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function Qr(e,t,n){return de(I.value.dataLabels.formatter,e,a({p:I.value.dataLabels.prefix,v:e,s:I.value.dataLabels.suffix,r:I.value.dataLabels.rounding}),{datapoint:t,index:n})}function $r(e,t){return isNaN(e.value/o(t,`value`))?0:(e.value/o(t,`value`)*100).toFixed(0)+`%`}function ei(e){let t=G.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}let ti=u(()=>!V.value||or.value==null||H.value==null?null:{x:Math.min(or.value,H.value),y:q.value.top,width:Math.abs(H.value-or.value),height:q.value.height}),ni=u(()=>dr.value?Number(B.value.start)!==0||Number(B.value.end)!==Number(Y.value):!1);function ri(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function ii(){D.value=null,O.value=null,M.value=null}function ai(e){let t=e?.pointerId==null?U.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),V.value=!1,or.value=null,H.value=null,U.value=null}function oi(){sr.value=!0,setTimeout(()=>{sr.value=!1},0)}function si(e){sr.value&&(sr.value=!1,e.preventDefault(),e.stopPropagation())}function ci(e){if(!W.value||!ni.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=cr.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(cr.value={time:0,x:0,y:0,pointerType:null},oi(),yi(),ai(e),Hi(),Cr({force:!0,publish:!0}),!0):(cr.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function li(e){let t=Number(B.value.end)-Number(B.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((ri(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function ui(e,t){let n=li(e),r=li(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(B.value.start)+i,end:Number(B.value.start)+a+1}}function di(e){let t=xr(e);return t?(N(`zoomStart`,{index:t.start,isZoom:t.start!==0}),N(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function fi(e){if(!W.value||Ii.value||e.button!==void 0&&e.button!==0||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(B.value.end)-Number(B.value.start)<=1)return;ar.value=!0,G.value?.focus?.({preventScroll:!0}),yi(),ii();let n=ri(t.x);U.value=e.pointerId,V.value=!0,or.value=n,H.value=n}function pi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x),ii(),or.value!=null&&Math.abs(H.value-or.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function mi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x));let n=or.value,r=H.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(ci(e))return;ai(e);return}let i=ui(Math.min(n,r),Math.max(n,r));i?(ai(e),di(i)&&(cr.value={time:0,x:0,y:0,pointerType:null},ii(),oi())):ai(e)}function hi(e){V.value||(D.value=null,O.value=null,M.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+B.value.start}))}function gi(e){V.value||(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+B.value.start}),D.value=e.index,O.value=e,M.value=e.index)}let _i=v(null),vi=null;function yi(){vi&&=(clearTimeout(vi),null)}function bi(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.index+B.value.start}),e.subtotal&&Qn.value.show&&(O.value=null,D.value=null,hn.value=!0,k.value=e,Ui(e),[null,void 0].includes(t)||(_i.value=t))}function xi(e,t){if(yi(),!W.value||!ni.value){bi(e,t);return}let n=cr.value.pointerType===`touch`?480:380;vi=setTimeout(()=>{vi=null,bi(e,t)},n)}let Si=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(B.value.start,B.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:E.value.includes(e.uid)?.5:1,segregate:()=>Ei(e.uid),isSegregated:E.value.includes(e.uid),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${L.value.legend.showValue?de(I.value.dataLabels.formatter,e.value,a({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${L.value.legend.showPercentage?E.value.includes(e.uid)?`${L.value.legend.showValue?` (`:``}- %${L.value.legend.showValue?`)`:``}`:`${L.value.legend.showValue?` (`:``}${isNaN(e.value/Ci.value)?`-`:a({v:e.value/Ci.value*100,s:`%`,r:L.value.legend.roundingPercentage})}${L.value.legend.showValue?`)`:``}`:``}`}))),Ci=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),wi=u(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``}));function Ti(){E.value.length?E.value=[]:Si.value.forEach(e=>{E.value.push(e.uid)}),N(`selectLegend`,Gr.value)}function Ei(e){if(E.value.includes(e))E.value=E.value.filter(t=>t!==e),N(`selectLegend`,Gr.value);else{if(E.value.length===J.value.length-1)return;E.value.push(e),N(`selectLegend`,Gr.value)}k.value&&bi($.value.find((e,t)=>t===_i.value))}function Di(e){return J.value.length?J.value.find(t=>t.name===e)||(Xn.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):(Xn.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function Oi(e){let t=Di(e);t!==null&&E.value.includes(t.uid)&&Ei(t.uid)}function ki(e){let t=Di(e);t!==null&&(E.value.includes(t.uid)||Ei(t.uid))}let Ai=u(()=>{let e=[``].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!E.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${I.value.dataLabels.prefix}${Number(n.toFixed(P.value.table.td.roundingValue))}${I.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${Qr(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:[P.value.table.columnNames.period].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>e.name),P.value.table.columnNames.total)}});function ji(){return J.value}function Mi(e=null){it(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=[...Ai.value.head.map(e=>e.name??e)],r=[...Ai.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),a=c(i);e?e(a):me({csvContent:a,title:L.value.title.text||`vue-ui-donut-evolution`})})}let Ni=v(!1);function Pi(e){Ni.value=e,_n.value+=1}function Fi(){Lr.value.showTable=!Lr.value.showTable}let Ii=v(!1);function Li(){Ii.value=!Ii.value}function Ri(e){return e.proportion*100>L.value.donuts.hover.hideLabelsUnderValue}let zi=v([]),Bi=v({}),Vi=v(null);function Hi(){Vi.value?.close?.(),k.value=null,_i.value=null,hn.value=!1,O.value=null,D.value=null,M.value=null}function Ui(e){zi.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),Bi.value=_e({...Qn.value.donutChart,responsive:!0,theme:P.value.theme}),Vi.value&&Vi.value.open()}let Wi=ke(A,()=>L.value.title.text),Gi=u(()=>z.value.width),Ki=u(()=>z.value.height);Ve({timeLabelsEls:Cn,timeLabels:X,slicer:B,configRef:P,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Gi,height:Ki,rotation:F.value.xAxis.dataLabels.autoRotate.angle});let qi=u(()=>Ne({config:P,style:L,mutableConfig:Lr,dialog:dn,accordion:rn,isFullscreen:Ni,parent:A,maxWidth:800,isCursorPointer:R}));ft(()=>Lr.value.showTable,e=>Me(e,P,Dn));function Ji(){Lr.value.showTable=!1,On.value&&On.value.setTableIconState(!1)}let Yi=u(()=>Si.value.map(e=>({...e,name:e.display}))),Xi=u(()=>L.value.backgroundColor),Zi=u(()=>L.value.legend),Qi=u(()=>L.value.title),{isCallbackImaging:$i,isCallbackSvg:ea,generateSvg:ta,onGenerateImage:na}=je({svg:G,title:Qi,legend:Zi,legendItems:Yi,backgroundColor:Xi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Pr});async function ra(){N(`copyAlt`,{config:P.value,dataset:$.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ia(){M.value=null,Kn.value=!0}function aa(){ar.value=!1,M.value=null,D.value=null,O.value=null,Kn.value=!1}function oa(e){if(!G.value||Ii.value||document.activeElement!==G.value||(ar.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(W.value&&(ni.value||V.value)){yi(),ai(),Hi(),Cr({force:!0,publish:!0});return}M.value=null,D.value=null,O.value=null;return}if(r){if(M.value===null)return;let e=$.value[M.value];if(!e)return;bi(e,M.value);return}let a=M.value,o=D.value,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ee=$.value[a];ee&&gi(ee)}let sa=u(()=>({headers:Ai.value?.colNames??[],rows:Ai.value?.bodyA11y??[]}));Ee({getData:ji,getImage:Wi,generatePdf:Nr,generateCsv:Mi,generateImage:Pr,generateSvg:ta,hideSeries:ki,showSeries:Oi,toggleTable:Fi,toggleAnnotator:Li,toggleFullscreen:Pi,copyAlt:ra,resetZoom:()=>Cr({force:!0,publish:!0}),setZoomState:xr}),ft(()=>[z.value.width,z.value.height,An.value,X.value,Kr.value,B.value.start,B.value.end,F.value,I.value,P.value.style.fontFamily,w.dataset,Jn.value,Sn.value,Cn.value,wn.value,Tn.value],Hr,{flush:`post`,deep:!0});let ca=u(()=>Ye({enabled:P.value.userOptions?.annotator?.followZoom,area:q.value,range:B.value,ticks:Zr.value}));return(e,i)=>(_(),p(`div`,{ref_key:`donutEvolutionChart`,ref:A,class:g(`vue-data-ui-component vue-ui-donut-evolution ${Ni.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:ot(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor}`),id:T.value,onMouseenter:i[4]||=()=>S(Or)(!0),onMouseleave:i[5]||=()=>S(Or)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,x(P.value.a11y.translations.keyboardNavigation),1)],8,gt),sa.value?.rows?.length?(_(),d(Ke,{key:0,uid:T.value,head:sa.value.headers,body:sa.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(_(),d(S(cn),rt({key:1},S(n)(P.value.userOptions.annotator),{svgRef:S(G),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:ca.value,backgroundColor:L.value.backgroundColor,color:L.value.color,active:Ii.value,isCursorPointer:R.value,palette:P.value.userOptions.annotatorPalette,onClose:Li}),$e({_:2},[y(S(r),n=>({name:n,fn:C(r=>[b(e.$slots,n,at(nt(S(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Fr.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:gn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),L.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rn,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:hi},[(_(),d(Ae,{key:`title_${yn.value}`,config:{title:{cy:`donut-evolution-div-title`,...L.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${T.value}`},null,8,_t),P.value.userOptions.show&&qn.value&&(S(kr)||S(Dr))?(_(),d(S(ln),{ref_key:`userOptionsRef`,ref:On,key:`user_options_${_n.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:S(jr),isImaging:S(Mr),uid:T.value,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ni.value,titles:{...P.value.userOptions.buttonTitles},chartElement:A.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Ii.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Pi,onGeneratePdf:S(Nr),onGenerateCsv:Mi,onGenerateImage:S(na),onGenerateSvg:S(ta),onToggleTable:Fi,onToggleAnnotator:Li,onCopyAlt:ra,style:ot({visibility:S(kr)?S(Dr)?`visible`:`hidden`:`visible`})},$e({_:2},[y(S(Pe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,at(nt(S(Fe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,vt,[(_(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:S(ge),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Ni.value,"vue-data-ui-fulscreen--off":!Ni.value,"vue-data-ui-no-transition":!S($n)||S(Vr),"vue-ui-donut-evolution-chart-zoom-pointer-focus":W.value&&ar.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:ot({maxWidth:`100%`,visibility:S(Br)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:L.value.color,cursor:W.value?V.value?`col-resize`:`crosshair`:void 0,touchAction:W.value?`pan-y`:void 0,userSelect:W.value?`none`:void 0}),tabindex:`0`,onFocus:ia,onBlur:aa,onKeydown:oa,onPointerdown:fi,onPointermove:pi,onPointerup:mi,onPointercancel:ai,onClickCapture:si},[tt(S(sn)),b(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:S(jr)||S(Mr)||S($i),isPrintingSvg:S(ea)}},void 0,!0),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,bt)):f(``,!0),m(`defs`,null,[tt(Ue,{t:`linear`,id:`hover_${T.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,S(re)(L.value.backgroundColor,I.value.highlighter.opacity),1],[`100%`,S(re)(I.value.highlighter.color,I.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),tt(Ue,{t:`radial`,id:`focus_${T.value}`,stops:[[`0%`,S(re)(S(ae)(L.value.backgroundColor),0),1],[`77%`,S(re)(`#FFFFFF`,30),1],[`100%`,S(re)(S(ae)(L.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),F.value.show?(_(),p(`g`,xt,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,St),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Ct),F.value.showVerticalLines?(_(),p(`g`,wt,[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Tt))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[F.value.axis.yLabel?(_(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:Tn,"font-size":F.value.axis.fontSize,fill:F.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-F.value.axis.fontSize/2-F.value.axis.yLabelOffsetX:F.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},x(F.value.axis.yLabel),9,Et)):f(``,!0),F.value.axis.xLabel?(_(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:wn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":F.value.axis.fontSize,fill:F.value.axis.color},x(F.value.axis.xLabel),9,Dt)):f(``,!0)]),F.value.yAxis.dataLabels.show?(_(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:Sn,class:g({"donut-opacity":!0,"donut-behind":D.value!==null})},[(_(!0),p(l,null,y(Zr.value,(e,t)=>(_(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`path`,{key:0,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,10,Ot)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`text`,{key:1,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),transform:`translate(${K.value?q.value.right-F.value.yAxis.dataLabels.offsetX+7:q.value.left+F.value.yAxis.dataLabels.offsetX-7}, ${e.y+F.value.yAxis.dataLabels.fontSize/3})`,"font-size":F.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:F.value.yAxis.dataLabels.color,"font-weight":F.value.yAxis.dataLabels.bold?`bold`:`normal`},x(S(ye)(e.value)?S(de)(I.value.dataLabels.formatter,e.value,S(a)({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:I.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,kt)):f(``,!0)]))),128))],2)):f(``,!0),F.value.xAxis.dataLabels.show?(_(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Cn,class:g({"donut-opacity":!0})},[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`g`,null,[(F.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!F.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(_(),p(`g`,At,[String(X.value[t].text).includes(`
2
2
  `)?(_(),p(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":F.value.xAxis.dataLabels.rotation>0?`start`:F.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":F.value.xAxis.dataLabels.fontSize,fill:F.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+F.value.xAxis.dataLabels.fontSize+F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`,innerHTML:S(ne)({content:String(X.value[t].text),fontSize:F.value.xAxis.dataLabels.fontSize,fill:I.value.grid.xAxis.dataLabels.color,x:0,y:0})},null,8,Mt)):(_(),p(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":F.value.xAxis.dataLabels.rotation>0?`start`:F.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":F.value.xAxis.dataLabels.fontSize,fill:F.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+F.value.xAxis.dataLabels.fontSize+F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`},x(X.value[t].text||``),9,jt))])):f(``,!0)]))),256))],512)):f(``,!0),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,null,[I.value.line.show&&t<$.value.length-1&&![e.subtotal,$.value[t+1].subtotal].includes(null)?(_(),p(`line`,{key:0,class:g({"donut-opacity":!0,"donut-behind":D.value!==null}),x1:e.x,y1:e.y,x2:$.value[t+1].x,y2:$.value[t+1].y,stroke:I.value.line.stroke,"stroke-width":I.value.line.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Nt)):f(``,!0),e.subtotal===null?f(``,!0):(_(),p(`g`,Pt,[e.subtotal?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:e.activeRadius,fill:L.value.backgroundColor},null,8,Ft)):f(``,!0)]))]))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal?(_(),p(`g`,It,[D.value!==null&&D.value===t?(_(),p(`g`,Lt,[(_(!0),p(l,null,y(e.donutHover,t=>(_(),p(`g`,null,[Ri(t)?(_(),p(`path`,{key:0,d:S(ue)(t,{x:t.center.endX,y:t.center.endY},12,12,{x:e.x,y:e.y},!1,20),stroke:t.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Rt)):f(``,!0)]))),256)),(_(!0),p(l,null,y(e.donutHover,(t,n)=>(_(),p(`g`,null,[Ri(t)?(_(),p(`text`,{key:0,"data-cy-hover-label":``,"text-anchor":S(le)(t,!0,0).anchor,x:S(le)(t,!0,9).x,y:S(he)(t,14,10),fill:F.value.yAxis.dataLabels.color,"font-size":8,"font-weight":`bold`},x(t.name)+`: `+x($r(t,e.donut))+` (`+x(t.value===null?`-`:Qr(t.value,t,n))+`) `,9,zt)):f(``,!0)]))),256)),m(`g`,null,[m(`circle`,{cx:e.x,cy:e.y,r:e.hoverRadius,fill:L.value.backgroundColor},null,8,Bt)])])):f(``,!0)])):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal===null?f(``,!0):(_(),p(`g`,Vt,[e.subtotal===0?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:3,fill:L.value.color},null,8,Ht)):D.value!==null&&D.value===t?(_(),p(`g`,Ut,[(_(!0),p(l,null,y(e.donutHover,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":1,stroke:L.value.backgroundColor},null,8,Wt))),256))])):(_(),p(`g`,Gt,[(_(!0),p(l,null,y(e.donut,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":.5,stroke:L.value.backgroundColor},null,8,Kt))),256))]))]))],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null||hn.value&&t!==k.value.index})},[e.subtotal!==null&&I.value.dataLabels.show?(_(),p(`text`,{key:0,"text-anchor":`middle`,x:e.x,y:D.value===e.index&&e.subtotal?e.y+I.value.dataLabels.fontSize/3:e.y-e.radius-I.value.dataLabels.fontSize+I.value.dataLabels.offsetY,"font-size":I.value.dataLabels.fontSize,"font-weight":`bold`,fill:I.value.dataLabels.color},x(Qr(e.subtotal,e,t)),9,qt)):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:[D.value,_i.value].includes(e.index)?`url(#hover_${T.value})`:`transparent`,class:g({"donut-hover":R.value&&e.subtotal&&[D.value,_i.value].includes(e.index)}),style:{pointerEvents:`none`}},null,10,Jt))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{"data-cy-trap":``,x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:`transparent`,onMouseenter:t=>gi(e),onMouseleave:t=>hi(e),onClick:n=>xi(e,t),style:ot({cursor:W.value?V.value?`col-resize`:`crosshair`:void 0}),class:g({"donut-hover":R.value&&D.value===e.index&&e.subtotal})},null,46,Yt))),256)),ti.value?(_(),p(`rect`,{key:4,x:ti.value.x,y:ti.value.y,width:ti.value.width,height:ti.value.height,fill:lr.value.selection.fill,"fill-opacity":lr.value.selection.fillOpacity,stroke:lr.value.selection.stroke,"stroke-opacity":lr.value.selection.strokeOpacity,"stroke-width":lr.value.selection.strokeWidth,"stroke-dasharray":lr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Xt)):f(``,!0),b(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:S(jr)||S(Mr)||S($i),isPrintingSvg:S(ea)}},void 0,!0)],46,yt)),e.$slots.hint?(_(),p(`div`,Zt,[b(e.$slots,`hint`,at(nt({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Kn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(_(),p(`div`,Qt,[b(e.$slots,`watermark`,at(nt({isPrinting:S(jr)||S(Mr)||S($i)||S(ea)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartSlicer`,ref:Hn,style:ot(`width:100%;background:${L.value.backgroundColor}`),"data-dom-to-png-ignore":``},[Y.value>1&&L.value.zoom.show?(_(),d(We,{ref_key:`slicerComponent`,ref:Vn,key:`slicer_${vn.value}`,background:L.value.zoom.color,borderColor:L.value.backgroundColor,fontSize:L.value.zoom.fontSize,useResetSlot:L.value.zoom.useResetSlot,timeLabels:X.value,textColor:L.value.color,inputColor:L.value.zoom.color,selectColor:L.value.zoom.highlightColor,max:Y.value,min:0,valueStart:B.value.start,valueEnd:B.value.end,refreshStartPoint:L.value.zoom.startIndex===null?0:L.value.zoom.startIndex,refreshEndPoint:L.value.zoom.endIndex===null?Y.value:L.value.zoom.endIndex+1,enableRangeHandles:L.value.zoom.enableRangeHandles,enableSelectionDrag:L.value.zoom.enableSelectionDrag,focusOnDrag:L.value.zoom.focusOnDrag,focusRangeRatio:L.value.zoom.focusRangeRatio,isCursorPointer:R.value,maxWidth:L.value.zoom.maxWidth,minimapLeftInsetRatio:q.value.absoluteWidth>0&&L.value.zoom.autoFit?q.value.left/q.value.absoluteWidth:null,minimapRightInsetRatio:q.value.absoluteWidth>0&&L.value.zoom.autoFit?(q.value.absoluteWidth-q.value.right)/q.value.absoluteWidth:null,"onUpdate:start":Tr,"onUpdate:end":Er,onReset:i[0]||=()=>Cr({force:!0,publish:!0})},{"reset-action":C(({reset:t})=>[b(e.$slots,`reset-action`,at(nt({reset:t})),void 0,!0)]),_:3},8,[`background`,`borderColor`,`fontSize`,`useResetSlot`,`timeLabels`,`textColor`,`inputColor`,`selectColor`,`max`,`valueStart`,`valueEnd`,`refreshStartPoint`,`refreshEndPoint`,`enableRangeHandles`,`enableSelectionDrag`,`focusOnDrag`,`focusRangeRatio`,`isCursorPointer`,`maxWidth`,`minimapLeftInsetRatio`,`minimapRightInsetRatio`])):f(``,!0)],4),m(`div`,{id:`legend-bottom-${T.value}`},null,8,$t),En.value&&(L.value.legend.show||e.$slots.legend)?(_(),d(Qe,{key:6,to:L.value.legend.position===`top`?`#legend-top-${T.value}`:`#legend-bottom-${T.value}`},[m(`div`,{ref_key:`chartLegend`,ref:zn},[b(e.$slots,`legend`,{legend:Si.value},()=>[L.value.legend.show?(_(),d(Xe,{key:`legend_${xn.value}`,legendSet:Si.value,config:wi.value,onClickMarker:i[1]||=({legend:e})=>Ei(e.uid)},{item:C(({legend:e,index:t})=>[m(`div`,{onClick:t=>Ei(e.uid),style:ot(`opacity:${E.value.includes(e.uid)?.5:1}`)},x(e.display),13,en)]),legendToggle:C(()=>[Si.value.length>2&&L.value.legend.selectAllToggle.show&&!S(tr)?(_(),d(Ge,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:E.value.length>0,onToggle:Ti},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):f(``,!0)]),_:1},8,[`legendSet`,`config`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(_(),p(`div`,{key:7,ref_key:`source`,ref:Bn,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),qn.value&&P.value.userOptions.buttons.table?(_(),d(lt(qi.value.component),rt({key:8},qi.value.props,{ref_key:`tableUnit`,ref:Dn,onClose:Ji}),$e({content:C(()=>[(_(),d(S(on),{key:`table_${bn.value}`,colNames:Ai.value.colNames,head:Ai.value.head,body:Ai.value.body,config:Ai.value.config,title:P.value.table.useDialog?``:qi.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:R.value,onClose:Ji},{th:C(({th:e})=>[et(x(e.name??e),1)]),td:C(({td:e})=>[e.value===null?(_(),p(`span`,tn,`-`)):(_(),p(`b`,nn,x(isNaN(e.value)?``:I.value.dataLabels.prefix)+x(!isNaN(e.value)&&e.value!==null?Number(e.value.toFixed(P.value.table.td.roundingValue)).toLocaleString():e)+x(isNaN(e.value)?``:I.value.dataLabels.suffix),1)),m(`span`,null,x(e.percentage&&!isNaN(e.percentage)?`(${Number(e.percentage.toFixed(P.value.table.td.roundingPercentage)).toLocaleString()}%)`:``),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:C(()=>[et(x(qi.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:C(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[2]||=e=>Mi(P.value.userOptions.callbacks.csv),style:ot({cursor:R.value?`cursor`:`default`})},[tt(S(an),{name:`fileCsv`,stroke:qi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),Qn.value.show?(_(),d(S(dn),{key:9,ref_key:`dialog`,ref:Vi,onClose:i[3]||=e=>{k.value=null,hn.value=!1,O.value=null,D.value=null,_i.value=null},backgroundColor:Qn.value.backgroundColor,color:Qn.value.color,headerBg:Qn.value.header.backgroundColor,headerColor:Qn.value.header.color,isFullscreen:Ni.value,fullscreenParent:A.value},{title:C(()=>[et(x(X.value[Number(k.value.index)]?X.value[Number(k.value.index)].text:``),1)]),content:C(()=>[k.value?(_(),d(S(un),{key:0,config:Bi.value,dataset:zi.value},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`])):f(``,!0),S(tr)?(_(),d(Ce,{key:10})):f(``,!0)],46,ht))}},[[`__scopeId`,`data-v-124ecc8a`]]);export{mt as n,rn 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,D as o,Ft as s,Jt as ee,Q as c,X as te,_ as ne,at as re,b as ie,i as l,in as ae,nt as oe,t as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useSvgLabelLayout-42Kats14.js";import{t as Te}from"./useTimeLabelCollider-BTybMUFi.js";import{c as Ee}from"./canvas-lib-22VpOI4_.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as u}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./Legend-DM0ClX3D.js";import{t as Me}from"./usePrefersMotion-XLHwega2.js";import{t as Ne}from"./vue_ui_dumbbell-BMcxK0N3.js";import{Fragment as d,Teleport as Pe,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Fe,createTextVNode as Ie,createVNode as _,defineAsyncComponent as v,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as Ve,normalizeStyle as y,onBeforeUnmount as He,onMounted as Ue,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as We,shallowRef as Ge,toDisplayString as w,toRefs as Ke,unref as T,vShow as qe,watch as Je,withCtx as E,withDirectives as Ye}from"vue";var Xe=/* @__PURE__ */ e({default:()=>Ft}),Ze=[`id`],Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`viewBox`,`aria-describedby`],nt=[`x`,`y`,`width`,`height`],rt={key:1},it=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],at={key:2},ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],st=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ct=[`transform`,`font-size`,`fill`],lt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`onMouseenter`,`onMouseleave`,`onClick`],ut=[`x`,`y`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],dt=[`x`,`y`,`font-size`,`fill`],ft=[`transform`,`font-size`,`fill`,`font-weight`,`text-anchor`],pt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`x`,`y`,`height`,`width`,`fill`],gt=[`transform`,`fill`,`font-size`],_t={key:0},vt={key:0},yt=[`d`,`fill`],bt={key:1},xt=[`x`,`y`,`height`,`width`,`fill`],St=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ct=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],wt={key:7},Tt=[`x`,`y`,`fill`,`font-size`],Et={key:8},Dt=[`x`,`y`,`fill`,`font-size`],Ot=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],kt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},At={key:5,class:`vue-data-ui-watermark`},jt=[`id`],Mt=[`xmlns`,`height`,`width`],Nt=[`fill`],Pt={style:{display:`flex`,"align-items":`center`}},Ft=/*#__PURE__*/ me({__name:`vue-ui-dumbbell`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:me,emit:Xe}){let Ft=v(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),It=v(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Lt=v(()=>import(`./DataTable-Dof6yhO7.js`)),Rt=v(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),zt=v(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),Bt=v(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Vt=v(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_dumbbell:Ht}=i(),Ut=Me(),D=e,Wt=Xe,Gt=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(te()),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),rn=x(null),an=x(null),on=x(null),sn=x(null),A=x(null),j=x(null),M=x(null),cn=x(!1),N=x(!1),P=x(vn()),F=f(()=>P.value.style.chart.grid.horizontalGrid),ln=f(()=>P.value.style.chart.grid.verticalGrid),I=f(()=>P.value.style.chart.labels);f(()=>P.value.style.chart.grid);let L=f(()=>P.value.style.chart.plots),R=f(()=>P.value.style.chart.comparisonLines),z=f(()=>P.value.style.chart);fe({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiDumbbell`,rules:[pe.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the component to display related series.`]}]});let un=f(()=>P.value.userOptions.useCursorPointer),dn=f(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},useAnimation:!1,style:{chart:{backgroundColor:`#99999930`,padding:{top:12,right:12,bottom:12,left:12},grid:{horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},labels:{axis:{yLabel:``,xLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1},endLabels:{show:!1},startLabels:{show:!1}},legend:{backgroundColor:`transparent`},plots:{endColor:`#969696`,startColor:`#DBDBDB`,stroke:`#6A6A6A`,evaluationColors:{enable:!1}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:fn,FINAL_DATASET:pn,manualLoading:mn}=ue({...Ke(D),FINAL_CONFIG:P,prepareConfig:vn,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,start:21,end:34},{name:`_`,start:13,end:21},{name:`_`,start:8,end:13},{name:`_`,start:5,end:8},{name:`_`,start:3,end:5}],skeletonConfig:ae({defaultConfig:P.value,userConfig:dn.value})}),{userOptionsVisible:hn,setUserOptionsVisibility:gn,keepUserOptionState:_n}=ke({config:P.value}),{svgRef:B}=Ae({config:z.value.title});function vn(){return he(D.config,Ht,Ne)}Je(()=>D.config,e=>{fn.value||(P.value=vn()),hn.value=!P.value.userOptions.showOnChartHover,Sn(),Zt.value+=1,Qt.value+=1,$t.value+=1,P.value.responsive||(K.value=z.value.rowHeight,q.value=z.value.width),U.value.showTable=P.value.table.show},{deep:!0}),Je(()=>pn.value,e=>{Array.isArray(e)&&e.length>0&&(mn.value=!1),Rn(),zn()},{deep:!0});let V=Ge(null),H=Ge(null),yn=x(!1),bn=0;Ue(()=>{en.value=!0,Sn()});let xn=f(()=>P.value.debug);function Sn(){le(D.dataset)?re({componentName:`VueUiDumbbell`,type:`dataset`,debug:xn.value}):D.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`start`,`end`]}).forEach(e=>{Gt.value=!1,re({componentName:`VueUiDumbbell`,type:`datasetSerieAttribute`,property:e,index:t,debug:xn.value})})}),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:k.value,title:z.value.title.text?qt.value:null,legend:z.value.legend.show?Jt.value:null,source:Yt.value,noTitle:Xt.value}),n=z.value.title.text?24:0,r=z.value.legend.show?24:0;cancelAnimationFrame(bn),bn=requestAnimationFrame(async()=>{q.value=Math.max(.1,e),K.value=Math.max(.1,(Math.max(.1,t)-(n+r))/pn.value.length),er(),yn.value=!0})}),H.value=k.value.parentNode,V.value.observe(H.value)),er()}He(()=>{cancelAnimationFrame(bn),Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:Cn,isImaging:wn,generatePdf:Tn,generateImage:En}=Ce({elementId:`dumbbell_${O.value}`,fileName:z.value.title.text||`vue-ui-dumbbell`,options:P.value.userOptions.print}),Dn=f(()=>P.value.userOptions.show&&!z.value.title.text),U=x({showTable:P.value.table.show});Je(P,()=>{U.value={showTable:P.value.table.show}},{immediate:!0});let W=f(()=>pn.value.map((e,t)=>({...e,start:ie(e.start),end:ie(e.end),id:e.id??`${String(e.name)}__${String(e.start)}__${String(e.end)}__${te()}`}))),On=f(()=>{let e=z.value.grid,t=W.value.flatMap(e=>[e.start,e.end]).map(e=>Number(e)).filter(e=>Number.isFinite(e)),n=t.length?Math.min(...t):0,r=t.length?Math.max(...t):0;return{min:e.scaleMin??Math.min(n,0),max:e.scaleMax??r}}),G=f(()=>ne(On.value.min,On.value.max,z.value.grid.scaleSteps)),K=x(z.value.rowHeight),q=x(z.value.width),{metrics:kn,ready:An,settling:jn,update:Mn}=we({svgRef:B,canMeasure:()=>!P.value.responsive||yn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(an.value).textWidth,yAxisLabelWidth:e(rn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(on.value).height})});function Nn(){let e=kn.value.scaleLabelsWidth,t=kn.value.yAxisLabelWidth;return e+t+(t?24+I.value.axis.yLabelOffsetX:0)}let Pn=f(()=>kn.value.xAxisLabelHeight+kn.value.timeLabelsHeight),Fn=f(()=>W.value.length);function In(e,t,n){let r=Number(e),i=Number(t.min),a=Number(t.max),o=Number(n.width);if(!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||!Number.isFinite(o))return n.left;let s=a-i;return s<=0?n.left:n.left+(r-i)/s*o}let J=f(()=>{N.value;let e=Nn(),t=z.value.padding,n=I.value.axis.xLabel?I.value.axis.xLabelOffsetY:0,r=K.value*Fn.value-Pn.value-t.top-t.bottom-n,i=r/Fn.value,a=K.value*Fn.value,o=q.value-e-t.left-t.right,s=G.value.ticks.length*(o/G.value.ticks.length);return{left:z.value.padding.left+e,right:q.value-z.value.padding.right,top:z.value.padding.top,bottom:a-z.value.padding.bottom-Pn.value-n,width:o,height:r,rowHeight:i,absoluteHeight:a,widthPlotReference:s}}),Y=f(()=>Math.min(K.value/2*.7,L.value.radius)),Ln=x([]),X=f({get(){let e=J.value,t=G.value;return Ln.value.map((n,r)=>{let i=In(n.start,t,e),a=In(n.endVal,t,e),o=i+(a-i)/2,s=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end>n.start,ee=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end<n.start,c=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end===n.start||[null,void 0].includes(n.start)||[null,void 0].includes(n.end),te=s?L.value.evaluationColors.positive:ee?L.value.evaluationColors.negative:L.value.evaluationColors.neutral;return{...n,isPositive:s,isNegative:ee,isNeutral:c,evaluationColor:te,evaluationGrad:`url(#${s?`positive`:ee?`negative`:`neutral`}_grad_${O.value})`,startX:i,endX:a,centerX:o,y:e.top+r*e.rowHeight+e.rowHeight/2}})},set(e){Ln.value=e}});function Rn(){Ln.value=W.value.map(e=>{let t=Number(e.start);return{...e,endVal:Number.isFinite(t)?t:0}})}let Z=x(null);Ue(()=>{zn()});function zn(){if(Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),Rn(),!P.value.useAnimation||Ut.value){X.value=Ln.value.map(e=>{let t=Number(e.end);return{...e,endVal:Number.isFinite(t)?t:e.endVal}});return}let e=Math.max(1,Math.min(100,P.value.animationSpeed||100))/100,t=W.value.map(e=>{let t=Number(e.start),n=Number(e.end),r=Number.isFinite(t)?t:0;return(Number.isFinite(n)?n:r)-r}),n=()=>{let r=!0;X.value=Ln.value.map((n,i)=>{let a=Number.isFinite(Number(n.end))?Number(n.end):n.endVal,o=n.endVal+t[i]*e,s=t[i]>=0?Math.min(o,a):Math.max(o,a);return s!==a&&(r=!1),{...n,endVal:s}}),r?Z.value=null:Z.value=requestAnimationFrame(n)};Z.value=requestAnimationFrame(n)}let Bn=f(()=>L.value.evaluationColors.enable?[{name:z.value.legend.labelNegative,color:L.value.gradient.show?`url(#negative_grad_${O.value})`:L.value.evaluationColors.negative},{name:z.value.legend.labelNeutral,color:L.value.gradient.show?`url(#neutral_grad_${O.value})`:L.value.evaluationColors.neutral},{name:z.value.legend.labelPositive,color:L.value.gradient.show?`url(#positive_grad_${O.value})`:L.value.evaluationColors.positive}]:[{name:z.value.legend.labelStart,color:L.value.gradient.show?`url(#start_grad_${O.value})`:L.value.startColor},{name:z.value.legend.labelEnd,color:L.value.gradient.show?`url(#end_grad_${O.value})`:L.value.endColor}]),Vn=f(()=>({cy:`donut-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:z.value.legend.bold?`bold`:``})),Q=f(()=>({head:X.value.map(e=>({name:e.name})),body:X.value.map(e=>({start:e.start,end:e.end}))})),$=f(()=>{let e=[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],t=Q.value.head.map((e,t)=>{let n=a({p:I.value.prefix,v:Q.value.body[t].start,s:I.value.suffix,r:P.value.table.td.roundingValue}),r=a({p:I.value.prefix,v:Q.value.body[t].end,s:I.value.suffix,r:P.value.table.td.roundingValue}),i=a({v:100*(Q.value.body[t].end/Q.value.body[t].start-1),s:`%`,r:P.value.table.td.roundingPercentage});return[{name:e.name},n,r,i]}),n={th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],head:e,body:t,config:n}});function Hn(e=null){ze(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t].start],[Q.value.body[t].end]]),n=[[z.value.title.text],[z.value.title.subtitle.text],[[P.value.table.columnNames.series],[P.value.table.columnNames.start],[P.value.table.columnNames.end]]].concat(t),r=o(n);e?e(r):oe({csvContent:r,title:z.value.title.text||`vue-ui-dumbbell`})})}let Un=x(!1);function Wn(e){Un.value=e,Kt.value+=1}function Gn(){return W.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=x(!1);function Jn(){qn.value=!qn.value}let Yn=ge(k,()=>z.value.title.text),Xn=f(()=>G.value.ticks),Zn=f(()=>({start:0,end:Xn.value.length}));Te({timeLabelsEls:on,timeLabels:Xn,slicer:Zn,configRef:P,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:q,height:K,targetClass:`.vue-ui-dumbbell-scale-label`,rotation:I.value.xAxisLabels.autoRotate.angle});function Qn({rowHeight:e,fontSize:t,showProgression:n}){if(!n)return!1;let r=e/3,i=e/1.3;return Math.abs(i-r)<t*1.2}let $n=(()=>{let e=null,t=0;return n=>{n===N.value?(e=null,t=0):e===null||e!==n?(e=n,t=1):(t+=1,t>=1&&(N.value=n,e=null,t=0))}})(),er=Ee(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=Qn({rowHeight:J.value.rowHeight,fontSize:I.value.yAxisLabels.fontSize,showProgression:I.value.yAxisLabels.showProgression});$n(e)})})},100);function tr({datapoint:e,seriesIndex:t}){A.value=t,j.value=e,P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function nr({datapoint:e,seriesIndex:t}){A.value=null,j.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function rr({datapoint:e,seriesIndex:t}){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t}),Wt(`selectDatapoint`,{...e,seriesIndex:t})}let ir=f(()=>{if(j.value===null)return 0;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end);return e&&t?Math.min(j.value.startX,j.value.endX)+Math.abs(j.value.startX-j.value.endX)/2:e&&!t?j.value.startX:t&&!e?j.value.endX:null}),ar=f(()=>{if(j.value===null)return``;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end),n=``,r=``;return e&&(n=l(I.value.formatter,j.value.start,a({p:I.value.prefix,v:j.value.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),t&&(r=l(I.value.formatter,j.value.end,a({p:I.value.prefix,v:j.value.end,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),e&&t?`${n} → ${r}`:e&&!t?n:t&&!e?r:``}),or=f(()=>be({config:P,style:z,mutableConfig:U,dialog:Vt,accordion:It,isFullscreen:Un,parent:k,maxWidth:800,isCursorPointer:un}));Je(()=>U.value.showTable,e=>ye(e,P,tn));function sr(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let cr=f(()=>Bn.value.map(e=>({...e,shape:`circle`}))),lr=f(()=>z.value.backgroundColor),ur=f(()=>z.value.legend),dr=f(()=>z.value.title),{isCallbackImaging:fr,isCallbackSvg:pr,generateSvg:mr,onGenerateImage:hr}=ve({svg:B,title:dr,legend:ur,legendItems:cr,backgroundColor:lr,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:En});async function gr(){Wt(`copyAlt`,{config:P.value,dataset:X.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function _r(e){let t=X.value.length;return t?(e%t+t)%t:null}function vr(){if(M.value!==null){let e=X.value[M.value];e&&nr({datapoint:e,seriesIndex:M.value})}M.value=null,A.value=null,j.value=null}function yr(){M.value=null,cn.value=!0}function br(){vr(),cn.value=!1}function xr(e){if(!B.value||qn.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].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){vr();return}if(r){if(M.value===null)return;let e=X.value[M.value];if(!e)return;rr({datapoint:e,seriesIndex:M.value});return}let a=M.value;a=a===null?n?0:X.value.length-1:_r(a+(n?1:-1));let o=X.value[a];o&&(M.value=a,tr({datapoint:o,seriesIndex:a}))}let Sr=f(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,e[1],e[2],e[3]]),caption:P.value.a11y.translations.tableCaption,notice:P.value.a11y.translations.tableAvailable}));return me({getData:Gn,getImage:Yn,generatePdf:Tn,generateCsv:Hn,generateImage:En,generateSvg:mr,toggleTable:Kn,toggleAnnotator:Jn,toggleFullscreen:Wn,copyAlt:gr}),Je(()=>[q.value,K.value,N.value,I.value,z.value,P.value.style.fontFamily,D.dataset,yn.value,an.value,on.value,sn.value,rn.value],Mn,{flush:`post`,deep:!0}),(e,i)=>(b(),h(`div`,{ref_key:`dumbbellChart`,ref:k,class:Be(`vue-data-ui-component vue-ui-dumbbell ${Un.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:y(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${z.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),id:`dumbbell_${O.value}`,onMouseenter:i[1]||=()=>T(gn)(!0),onMouseleave:i[2]||=()=>T(gn)(!1)},[g(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[g(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,Qe),Sr.value.body.length?(b(),p(Oe,{key:0,uid:O.value,head:Sr.value.head,body:Sr.value.body,caption:Sr.value.caption,notice:Sr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),P.value.userOptions.buttons.annotator?(b(),p(T(Rt),Re({key:1},T(n)(P.value.userOptions.annotator),{svgRef:T(B),backgroundColor:z.value.backgroundColor,color:z.value.color,active:qn.value,isCursorPointer:un.value,palette:P.value.userOptions.annotatorPalette,onClose:Jn}),Fe({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,Ve(Le(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Dn.value?(b(),h(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),z.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:24px`},[(b(),p(_e,{key:`title_${Zt.value}`,config:{title:{cy:`donut-div-title`,...z.value.title},subtitle:{cy:`donut-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${O.value}`},null,8,$e),P.value.userOptions.show&&Gt.value&&(T(_n)||T(hn))?(b(),p(T(zt),{ref_key:`userOptionsRef`,ref:nn,key:`user_option_${Kt.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:T(Cn),isImaging:T(wn),uid:O.value,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Un.value,titles:{...P.value.userOptions.buttonTitles},chartElement:k.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:qn.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:un.value,onToggleFullscreen:Wn,onGeneratePdf:T(Tn),onGenerateCsv:Hn,onGenerateImage:T(hr),onGenerateSvg:T(mr),onToggleTable:Kn,onToggleAnnotator:Jn,onCopyAlt:gr,style:y({visibility:T(_n)?T(hn)?`visible`:`hidden`:`visible`})},Fe({_:2},[S(T(xe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,Ve(Le(T(Se)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,et,[(b(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:T(se),class:Be({"vue-data-ui-fullscreen--on":Un.value,"vue-data-ui-fulscreen--off":!Un.value}),viewBox:`0 0 ${q.value} ${J.value.absoluteHeight<=0?10:J.value.absoluteHeight}`,style:y(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};visibility:${T(An)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${O.value}`,tabindex:`0`,onFocus:yr,onBlur:br,onKeydown:xr},[_(T(Bt)),C(e.$slots,`svg-underlayer`,{svg:{...J.value,isPrintingImg:T(Cn)||T(wn)||T(fr),isPrintingSvg:T(pr)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.height),style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,nt)):m(``,!0),ln.value.show?(b(),h(`g`,rt,[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`line`,{x1:J.value.left+t*J.value.width/(G.value.ticks.length-1),x2:J.value.left+t*J.value.width/(G.value.ticks.length-1),y1:J.value.top,y2:J.value.bottom,stroke:ln.value.stroke,"stroke-width":ln.value.strokeWidth,"stroke-dasharray":ln.value.strokeDasharray},null,8,it))),256))])):m(``,!0),F.value.show?(b(),h(`g`,at,[(b(!0),h(d,null,S(W.value,(e,t)=>(b(),h(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.top+t*J.value.rowHeight,y2:J.value.top+t*J.value.rowHeight,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,ot))),256)),g(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.bottom,y2:J.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,st)])):m(``,!0),I.value.axis.yLabel?(b(),h(`text`,{key:3,ref_key:`yAxisLabel`,ref:rn,transform:`translate(${I.value.axis.fontSize}, ${J.value.absoluteHeight/2}), rotate(-90)`,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.yLabel),9,ct)):m(``,!0),I.value.yAxisLabels.show?(b(),h(`g`,{key:4,ref_key:`serieLabels`,ref:an},[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-name`,key:`serieLabel_${e.id}_${t}`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+(!I.value.yAxisLabels.showProgression||N.value?J.value.rowHeight/2:J.value.rowHeight/3)+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"font-weight":I.value.yAxisLabels.bold?`bold`:`normal`,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w(e.name)+` `+w(N.value&&I.value.yAxisLabels.showProgression?[null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:`(${T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})})`:``),41,lt))),128)),I.value.yAxisLabels.showProgression&&!N.value?(b(!0),h(d,{key:0},S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-value`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+J.value.rowHeight/1.3+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w([null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})),41,ut))),256)):m(``,!0)],512)):m(``,!0),I.value.axis.xLabel?(b(),h(`text`,{key:5,ref_key:`xAxisLabel`,ref:sn,x:J.value.left+J.value.width/2,y:J.value.absoluteHeight-I.value.axis.fontSize/3,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.xLabel),9,dt)):m(``,!0),I.value.xAxisLabels.show?(b(),h(`g`,{key:6,ref_key:`scaleLabels`,ref:on},[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-scale-label`,key:`tick_${t}`,transform:`translate(${J.value.left+t*(J.value.width/(G.value.ticks.length-1))}, ${J.value.bottom+I.value.xAxisLabels.fontSize+I.value.xAxisLabels.offsetY}), rotate(${I.value.xAxisLabels.rotation})`,"font-size":I.value.xAxisLabels.fontSize,fill:I.value.xAxisLabels.color,"font-weight":I.value.xAxisLabels.bold?`bold`:`normal`,"text-anchor":I.value.xAxisLabels.rotation>0?`start`:I.value.xAxisLabels.rotation<0?`end`:`middle`},w(T(l)(I.value.formatter,e,T(a)({p:I.value.prefix,v:e,s:I.value.suffix,r:I.value.xAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),9,ft))),128))],512)):m(``,!0),Ye(g(`g`,null,[Ye(g(`path`,{d:`M ${j.value?j.value.startX:J.value.left},${J.value.top} ${j.value?j.value.startX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.startColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,pt),[[qe,j.value!==null&&![null,void 0].includes(j.value.start)]]),Ye(g(`path`,{d:`M ${j.value?j.value.endX:J.value.left},${J.value.top} ${j.value?j.value.endX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.endColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,mt),[[qe,j.value!==null&&![null,void 0].includes(j.value.end)]]),Ye(g(`rect`,{x:j.value?Math.min(j.value.startX,j.value.endX):J.value.left,y:J.value.top,height:Math.max(.1,J.value.height),width:j.value?Math.max(.1,Math.abs(j.value.endX-j.value.startX)):0,fill:j.value?T(ee)(R.value.rectColor,R.value.rectOpacity):`transparent`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,ht),[[qe,R.value.showRect&&j.value!==null&&![null,void 0].includes(j.value.start)&&![null,void 0].includes(j.value.end)]]),Ye(g(`text`,{transform:`translate(${ir.value==null?0:ir.value}, ${J.value.top-6})`,fill:R.value.labelColor,"font-size":R.value.labelFontSize,"text-anchor":`middle`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},w(ar.value),13,gt),[[qe,j.value!==null&&ir.value!==null&&R.value.showLabel]])],512),[[qe,R.value.show&&A.value!==null]]),g(`defs`,null,[_(u,{t:`radial`,id:`start_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.startColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.startColor,.1),1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`end_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.endColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.endColor,.1),1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`positive_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.positive,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.positive,.1),1],[`100%`,L.value.evaluationColors.positive,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`negative_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.negative,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.negative,.1),1],[`100%`,L.value.evaluationColors.negative,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`neutral_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.neutral,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.neutral,.1),1],[`100%`,L.value.evaluationColors.neutral,1]]},null,8,[`id`,`stops`])]),(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`plot_${t}_${e.id}`},[g(`defs`,null,[_(u,{t:`linear`,id:`grad_pos_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.startColor,1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`linear`,id:`grad_neg_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.endColor,1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`])]),![void 0,null].includes(e.end)&&![void 0,null].includes(e.start)?(b(),h(`g`,_t,[L.value.link.type===`curved`?(b(),h(`g`,vt,[g(`path`,{d:`M
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,Ft as s,Jt as ee,Q as c,X as te,_ as ne,at as re,b as ie,i as l,in as ae,nt as oe,t as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useSvgLabelLayout-42Kats14.js";import{t as Te}from"./useTimeLabelCollider-BTybMUFi.js";import{c as Ee}from"./canvas-lib-22VpOI4_.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as u}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./Legend-DM0ClX3D.js";import{t as Me}from"./usePrefersMotion-XLHwega2.js";import{t as Ne}from"./vue_ui_dumbbell-BMcxK0N3.js";import{Fragment as d,Teleport as Pe,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Fe,createTextVNode as Ie,createVNode as _,defineAsyncComponent as v,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as Ve,normalizeStyle as y,onBeforeUnmount as He,onMounted as Ue,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as We,shallowRef as Ge,toDisplayString as w,toRefs as Ke,unref as T,vShow as qe,watch as Je,withCtx as E,withDirectives as Ye}from"vue";var Xe=/* @__PURE__ */ e({default:()=>Ft}),Ze=[`id`],Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`viewBox`,`aria-describedby`],nt=[`x`,`y`,`width`,`height`],rt={key:1},it=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],at={key:2},ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],st=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ct=[`transform`,`font-size`,`fill`],lt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`onMouseenter`,`onMouseleave`,`onClick`],ut=[`x`,`y`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],dt=[`x`,`y`,`font-size`,`fill`],ft=[`transform`,`font-size`,`fill`,`font-weight`,`text-anchor`],pt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`x`,`y`,`height`,`width`,`fill`],gt=[`transform`,`fill`,`font-size`],_t={key:0},vt={key:0},yt=[`d`,`fill`],bt={key:1},xt=[`x`,`y`,`height`,`width`,`fill`],St=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ct=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],wt={key:7},Tt=[`x`,`y`,`fill`,`font-size`],Et={key:8},Dt=[`x`,`y`,`fill`,`font-size`],Ot=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],kt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},At={key:5,class:`vue-data-ui-watermark`},jt=[`id`],Mt=[`xmlns`,`height`,`width`],Nt=[`fill`],Pt={style:{display:`flex`,"align-items":`center`}},Ft=/*#__PURE__*/ me({__name:`vue-ui-dumbbell`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:me,emit:Xe}){let Ft=v(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),It=v(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Lt=v(()=>import(`./DataTable-Dof6yhO7.js`)),Rt=v(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),zt=v(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Bt=v(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Vt=v(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_dumbbell:Ht}=i(),Ut=Me(),D=e,Wt=Xe,Gt=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(te()),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),rn=x(null),an=x(null),on=x(null),sn=x(null),A=x(null),j=x(null),M=x(null),cn=x(!1),N=x(!1),P=x(vn()),F=f(()=>P.value.style.chart.grid.horizontalGrid),ln=f(()=>P.value.style.chart.grid.verticalGrid),I=f(()=>P.value.style.chart.labels);f(()=>P.value.style.chart.grid);let L=f(()=>P.value.style.chart.plots),R=f(()=>P.value.style.chart.comparisonLines),z=f(()=>P.value.style.chart);fe({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiDumbbell`,rules:[pe.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the component to display related series.`]}]});let un=f(()=>P.value.userOptions.useCursorPointer),dn=f(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},useAnimation:!1,style:{chart:{backgroundColor:`#99999930`,padding:{top:12,right:12,bottom:12,left:12},grid:{horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},labels:{axis:{yLabel:``,xLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1},endLabels:{show:!1},startLabels:{show:!1}},legend:{backgroundColor:`transparent`},plots:{endColor:`#969696`,startColor:`#DBDBDB`,stroke:`#6A6A6A`,evaluationColors:{enable:!1}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:fn,FINAL_DATASET:pn,manualLoading:mn}=ue({...Ke(D),FINAL_CONFIG:P,prepareConfig:vn,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,start:21,end:34},{name:`_`,start:13,end:21},{name:`_`,start:8,end:13},{name:`_`,start:5,end:8},{name:`_`,start:3,end:5}],skeletonConfig:ae({defaultConfig:P.value,userConfig:dn.value})}),{userOptionsVisible:hn,setUserOptionsVisibility:gn,keepUserOptionState:_n}=ke({config:P.value}),{svgRef:B}=Ae({config:z.value.title});function vn(){return he(D.config,Ht,Ne)}Je(()=>D.config,e=>{fn.value||(P.value=vn()),hn.value=!P.value.userOptions.showOnChartHover,Sn(),Zt.value+=1,Qt.value+=1,$t.value+=1,P.value.responsive||(K.value=z.value.rowHeight,q.value=z.value.width),U.value.showTable=P.value.table.show},{deep:!0}),Je(()=>pn.value,e=>{Array.isArray(e)&&e.length>0&&(mn.value=!1),Rn(),zn()},{deep:!0});let V=Ge(null),H=Ge(null),yn=x(!1),bn=0;Ue(()=>{en.value=!0,Sn()});let xn=f(()=>P.value.debug);function Sn(){le(D.dataset)?re({componentName:`VueUiDumbbell`,type:`dataset`,debug:xn.value}):D.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`start`,`end`]}).forEach(e=>{Gt.value=!1,re({componentName:`VueUiDumbbell`,type:`datasetSerieAttribute`,property:e,index:t,debug:xn.value})})}),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:k.value,title:z.value.title.text?qt.value:null,legend:z.value.legend.show?Jt.value:null,source:Yt.value,noTitle:Xt.value}),n=z.value.title.text?24:0,r=z.value.legend.show?24:0;cancelAnimationFrame(bn),bn=requestAnimationFrame(async()=>{q.value=Math.max(.1,e),K.value=Math.max(.1,(Math.max(.1,t)-(n+r))/pn.value.length),er(),yn.value=!0})}),H.value=k.value.parentNode,V.value.observe(H.value)),er()}He(()=>{cancelAnimationFrame(bn),Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:Cn,isImaging:wn,generatePdf:Tn,generateImage:En}=Ce({elementId:`dumbbell_${O.value}`,fileName:z.value.title.text||`vue-ui-dumbbell`,options:P.value.userOptions.print}),Dn=f(()=>P.value.userOptions.show&&!z.value.title.text),U=x({showTable:P.value.table.show});Je(P,()=>{U.value={showTable:P.value.table.show}},{immediate:!0});let W=f(()=>pn.value.map((e,t)=>({...e,start:ie(e.start),end:ie(e.end),id:e.id??`${String(e.name)}__${String(e.start)}__${String(e.end)}__${te()}`}))),On=f(()=>{let e=z.value.grid,t=W.value.flatMap(e=>[e.start,e.end]).map(e=>Number(e)).filter(e=>Number.isFinite(e)),n=t.length?Math.min(...t):0,r=t.length?Math.max(...t):0;return{min:e.scaleMin??Math.min(n,0),max:e.scaleMax??r}}),G=f(()=>ne(On.value.min,On.value.max,z.value.grid.scaleSteps)),K=x(z.value.rowHeight),q=x(z.value.width),{metrics:kn,ready:An,settling:jn,update:Mn}=we({svgRef:B,canMeasure:()=>!P.value.responsive||yn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(an.value).textWidth,yAxisLabelWidth:e(rn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(on.value).height})});function Nn(){let e=kn.value.scaleLabelsWidth,t=kn.value.yAxisLabelWidth;return e+t+(t?24+I.value.axis.yLabelOffsetX:0)}let Pn=f(()=>kn.value.xAxisLabelHeight+kn.value.timeLabelsHeight),Fn=f(()=>W.value.length);function In(e,t,n){let r=Number(e),i=Number(t.min),a=Number(t.max),o=Number(n.width);if(!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||!Number.isFinite(o))return n.left;let s=a-i;return s<=0?n.left:n.left+(r-i)/s*o}let J=f(()=>{N.value;let e=Nn(),t=z.value.padding,n=I.value.axis.xLabel?I.value.axis.xLabelOffsetY:0,r=K.value*Fn.value-Pn.value-t.top-t.bottom-n,i=r/Fn.value,a=K.value*Fn.value,o=q.value-e-t.left-t.right,s=G.value.ticks.length*(o/G.value.ticks.length);return{left:z.value.padding.left+e,right:q.value-z.value.padding.right,top:z.value.padding.top,bottom:a-z.value.padding.bottom-Pn.value-n,width:o,height:r,rowHeight:i,absoluteHeight:a,widthPlotReference:s}}),Y=f(()=>Math.min(K.value/2*.7,L.value.radius)),Ln=x([]),X=f({get(){let e=J.value,t=G.value;return Ln.value.map((n,r)=>{let i=In(n.start,t,e),a=In(n.endVal,t,e),o=i+(a-i)/2,s=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end>n.start,ee=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end<n.start,c=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end===n.start||[null,void 0].includes(n.start)||[null,void 0].includes(n.end),te=s?L.value.evaluationColors.positive:ee?L.value.evaluationColors.negative:L.value.evaluationColors.neutral;return{...n,isPositive:s,isNegative:ee,isNeutral:c,evaluationColor:te,evaluationGrad:`url(#${s?`positive`:ee?`negative`:`neutral`}_grad_${O.value})`,startX:i,endX:a,centerX:o,y:e.top+r*e.rowHeight+e.rowHeight/2}})},set(e){Ln.value=e}});function Rn(){Ln.value=W.value.map(e=>{let t=Number(e.start);return{...e,endVal:Number.isFinite(t)?t:0}})}let Z=x(null);Ue(()=>{zn()});function zn(){if(Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),Rn(),!P.value.useAnimation||Ut.value){X.value=Ln.value.map(e=>{let t=Number(e.end);return{...e,endVal:Number.isFinite(t)?t:e.endVal}});return}let e=Math.max(1,Math.min(100,P.value.animationSpeed||100))/100,t=W.value.map(e=>{let t=Number(e.start),n=Number(e.end),r=Number.isFinite(t)?t:0;return(Number.isFinite(n)?n:r)-r}),n=()=>{let r=!0;X.value=Ln.value.map((n,i)=>{let a=Number.isFinite(Number(n.end))?Number(n.end):n.endVal,o=n.endVal+t[i]*e,s=t[i]>=0?Math.min(o,a):Math.max(o,a);return s!==a&&(r=!1),{...n,endVal:s}}),r?Z.value=null:Z.value=requestAnimationFrame(n)};Z.value=requestAnimationFrame(n)}let Bn=f(()=>L.value.evaluationColors.enable?[{name:z.value.legend.labelNegative,color:L.value.gradient.show?`url(#negative_grad_${O.value})`:L.value.evaluationColors.negative},{name:z.value.legend.labelNeutral,color:L.value.gradient.show?`url(#neutral_grad_${O.value})`:L.value.evaluationColors.neutral},{name:z.value.legend.labelPositive,color:L.value.gradient.show?`url(#positive_grad_${O.value})`:L.value.evaluationColors.positive}]:[{name:z.value.legend.labelStart,color:L.value.gradient.show?`url(#start_grad_${O.value})`:L.value.startColor},{name:z.value.legend.labelEnd,color:L.value.gradient.show?`url(#end_grad_${O.value})`:L.value.endColor}]),Vn=f(()=>({cy:`donut-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:z.value.legend.bold?`bold`:``})),Q=f(()=>({head:X.value.map(e=>({name:e.name})),body:X.value.map(e=>({start:e.start,end:e.end}))})),$=f(()=>{let e=[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],t=Q.value.head.map((e,t)=>{let n=a({p:I.value.prefix,v:Q.value.body[t].start,s:I.value.suffix,r:P.value.table.td.roundingValue}),r=a({p:I.value.prefix,v:Q.value.body[t].end,s:I.value.suffix,r:P.value.table.td.roundingValue}),i=a({v:100*(Q.value.body[t].end/Q.value.body[t].start-1),s:`%`,r:P.value.table.td.roundingPercentage});return[{name:e.name},n,r,i]}),n={th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],head:e,body:t,config:n}});function Hn(e=null){ze(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t].start],[Q.value.body[t].end]]),n=[[z.value.title.text],[z.value.title.subtitle.text],[[P.value.table.columnNames.series],[P.value.table.columnNames.start],[P.value.table.columnNames.end]]].concat(t),r=o(n);e?e(r):oe({csvContent:r,title:z.value.title.text||`vue-ui-dumbbell`})})}let Un=x(!1);function Wn(e){Un.value=e,Kt.value+=1}function Gn(){return W.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=x(!1);function Jn(){qn.value=!qn.value}let Yn=ge(k,()=>z.value.title.text),Xn=f(()=>G.value.ticks),Zn=f(()=>({start:0,end:Xn.value.length}));Te({timeLabelsEls:on,timeLabels:Xn,slicer:Zn,configRef:P,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:q,height:K,targetClass:`.vue-ui-dumbbell-scale-label`,rotation:I.value.xAxisLabels.autoRotate.angle});function Qn({rowHeight:e,fontSize:t,showProgression:n}){if(!n)return!1;let r=e/3,i=e/1.3;return Math.abs(i-r)<t*1.2}let $n=(()=>{let e=null,t=0;return n=>{n===N.value?(e=null,t=0):e===null||e!==n?(e=n,t=1):(t+=1,t>=1&&(N.value=n,e=null,t=0))}})(),er=Ee(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=Qn({rowHeight:J.value.rowHeight,fontSize:I.value.yAxisLabels.fontSize,showProgression:I.value.yAxisLabels.showProgression});$n(e)})})},100);function tr({datapoint:e,seriesIndex:t}){A.value=t,j.value=e,P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function nr({datapoint:e,seriesIndex:t}){A.value=null,j.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function rr({datapoint:e,seriesIndex:t}){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t}),Wt(`selectDatapoint`,{...e,seriesIndex:t})}let ir=f(()=>{if(j.value===null)return 0;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end);return e&&t?Math.min(j.value.startX,j.value.endX)+Math.abs(j.value.startX-j.value.endX)/2:e&&!t?j.value.startX:t&&!e?j.value.endX:null}),ar=f(()=>{if(j.value===null)return``;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end),n=``,r=``;return e&&(n=l(I.value.formatter,j.value.start,a({p:I.value.prefix,v:j.value.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),t&&(r=l(I.value.formatter,j.value.end,a({p:I.value.prefix,v:j.value.end,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),e&&t?`${n} → ${r}`:e&&!t?n:t&&!e?r:``}),or=f(()=>be({config:P,style:z,mutableConfig:U,dialog:Vt,accordion:It,isFullscreen:Un,parent:k,maxWidth:800,isCursorPointer:un}));Je(()=>U.value.showTable,e=>ye(e,P,tn));function sr(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let cr=f(()=>Bn.value.map(e=>({...e,shape:`circle`}))),lr=f(()=>z.value.backgroundColor),ur=f(()=>z.value.legend),dr=f(()=>z.value.title),{isCallbackImaging:fr,isCallbackSvg:pr,generateSvg:mr,onGenerateImage:hr}=ve({svg:B,title:dr,legend:ur,legendItems:cr,backgroundColor:lr,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:En});async function gr(){Wt(`copyAlt`,{config:P.value,dataset:X.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function _r(e){let t=X.value.length;return t?(e%t+t)%t:null}function vr(){if(M.value!==null){let e=X.value[M.value];e&&nr({datapoint:e,seriesIndex:M.value})}M.value=null,A.value=null,j.value=null}function yr(){M.value=null,cn.value=!0}function br(){vr(),cn.value=!1}function xr(e){if(!B.value||qn.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].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){vr();return}if(r){if(M.value===null)return;let e=X.value[M.value];if(!e)return;rr({datapoint:e,seriesIndex:M.value});return}let a=M.value;a=a===null?n?0:X.value.length-1:_r(a+(n?1:-1));let o=X.value[a];o&&(M.value=a,tr({datapoint:o,seriesIndex:a}))}let Sr=f(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,e[1],e[2],e[3]]),caption:P.value.a11y.translations.tableCaption,notice:P.value.a11y.translations.tableAvailable}));return me({getData:Gn,getImage:Yn,generatePdf:Tn,generateCsv:Hn,generateImage:En,generateSvg:mr,toggleTable:Kn,toggleAnnotator:Jn,toggleFullscreen:Wn,copyAlt:gr}),Je(()=>[q.value,K.value,N.value,I.value,z.value,P.value.style.fontFamily,D.dataset,yn.value,an.value,on.value,sn.value,rn.value],Mn,{flush:`post`,deep:!0}),(e,i)=>(b(),h(`div`,{ref_key:`dumbbellChart`,ref:k,class:Be(`vue-data-ui-component vue-ui-dumbbell ${Un.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:y(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${z.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),id:`dumbbell_${O.value}`,onMouseenter:i[1]||=()=>T(gn)(!0),onMouseleave:i[2]||=()=>T(gn)(!1)},[g(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[g(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,Qe),Sr.value.body.length?(b(),p(Oe,{key:0,uid:O.value,head:Sr.value.head,body:Sr.value.body,caption:Sr.value.caption,notice:Sr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),P.value.userOptions.buttons.annotator?(b(),p(T(Rt),Re({key:1},T(n)(P.value.userOptions.annotator),{svgRef:T(B),backgroundColor:z.value.backgroundColor,color:z.value.color,active:qn.value,isCursorPointer:un.value,palette:P.value.userOptions.annotatorPalette,onClose:Jn}),Fe({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,Ve(Le(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Dn.value?(b(),h(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),z.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:24px`},[(b(),p(_e,{key:`title_${Zt.value}`,config:{title:{cy:`donut-div-title`,...z.value.title},subtitle:{cy:`donut-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${O.value}`},null,8,$e),P.value.userOptions.show&&Gt.value&&(T(_n)||T(hn))?(b(),p(T(zt),{ref_key:`userOptionsRef`,ref:nn,key:`user_option_${Kt.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:T(Cn),isImaging:T(wn),uid:O.value,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Un.value,titles:{...P.value.userOptions.buttonTitles},chartElement:k.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:qn.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:un.value,onToggleFullscreen:Wn,onGeneratePdf:T(Tn),onGenerateCsv:Hn,onGenerateImage:T(hr),onGenerateSvg:T(mr),onToggleTable:Kn,onToggleAnnotator:Jn,onCopyAlt:gr,style:y({visibility:T(_n)?T(hn)?`visible`:`hidden`:`visible`})},Fe({_:2},[S(T(xe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,Ve(Le(T(Se)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,et,[(b(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:T(se),class:Be({"vue-data-ui-fullscreen--on":Un.value,"vue-data-ui-fulscreen--off":!Un.value}),viewBox:`0 0 ${q.value} ${J.value.absoluteHeight<=0?10:J.value.absoluteHeight}`,style:y(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};visibility:${T(An)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${O.value}`,tabindex:`0`,onFocus:yr,onBlur:br,onKeydown:xr},[_(T(Bt)),C(e.$slots,`svg-underlayer`,{svg:{...J.value,isPrintingImg:T(Cn)||T(wn)||T(fr),isPrintingSvg:T(pr)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.height),style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,nt)):m(``,!0),ln.value.show?(b(),h(`g`,rt,[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`line`,{x1:J.value.left+t*J.value.width/(G.value.ticks.length-1),x2:J.value.left+t*J.value.width/(G.value.ticks.length-1),y1:J.value.top,y2:J.value.bottom,stroke:ln.value.stroke,"stroke-width":ln.value.strokeWidth,"stroke-dasharray":ln.value.strokeDasharray},null,8,it))),256))])):m(``,!0),F.value.show?(b(),h(`g`,at,[(b(!0),h(d,null,S(W.value,(e,t)=>(b(),h(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.top+t*J.value.rowHeight,y2:J.value.top+t*J.value.rowHeight,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,ot))),256)),g(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.bottom,y2:J.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,st)])):m(``,!0),I.value.axis.yLabel?(b(),h(`text`,{key:3,ref_key:`yAxisLabel`,ref:rn,transform:`translate(${I.value.axis.fontSize}, ${J.value.absoluteHeight/2}), rotate(-90)`,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.yLabel),9,ct)):m(``,!0),I.value.yAxisLabels.show?(b(),h(`g`,{key:4,ref_key:`serieLabels`,ref:an},[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-name`,key:`serieLabel_${e.id}_${t}`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+(!I.value.yAxisLabels.showProgression||N.value?J.value.rowHeight/2:J.value.rowHeight/3)+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"font-weight":I.value.yAxisLabels.bold?`bold`:`normal`,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w(e.name)+` `+w(N.value&&I.value.yAxisLabels.showProgression?[null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:`(${T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})})`:``),41,lt))),128)),I.value.yAxisLabels.showProgression&&!N.value?(b(!0),h(d,{key:0},S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-value`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+J.value.rowHeight/1.3+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w([null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})),41,ut))),256)):m(``,!0)],512)):m(``,!0),I.value.axis.xLabel?(b(),h(`text`,{key:5,ref_key:`xAxisLabel`,ref:sn,x:J.value.left+J.value.width/2,y:J.value.absoluteHeight-I.value.axis.fontSize/3,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.xLabel),9,dt)):m(``,!0),I.value.xAxisLabels.show?(b(),h(`g`,{key:6,ref_key:`scaleLabels`,ref:on},[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-scale-label`,key:`tick_${t}`,transform:`translate(${J.value.left+t*(J.value.width/(G.value.ticks.length-1))}, ${J.value.bottom+I.value.xAxisLabels.fontSize+I.value.xAxisLabels.offsetY}), rotate(${I.value.xAxisLabels.rotation})`,"font-size":I.value.xAxisLabels.fontSize,fill:I.value.xAxisLabels.color,"font-weight":I.value.xAxisLabels.bold?`bold`:`normal`,"text-anchor":I.value.xAxisLabels.rotation>0?`start`:I.value.xAxisLabels.rotation<0?`end`:`middle`},w(T(l)(I.value.formatter,e,T(a)({p:I.value.prefix,v:e,s:I.value.suffix,r:I.value.xAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),9,ft))),128))],512)):m(``,!0),Ye(g(`g`,null,[Ye(g(`path`,{d:`M ${j.value?j.value.startX:J.value.left},${J.value.top} ${j.value?j.value.startX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.startColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,pt),[[qe,j.value!==null&&![null,void 0].includes(j.value.start)]]),Ye(g(`path`,{d:`M ${j.value?j.value.endX:J.value.left},${J.value.top} ${j.value?j.value.endX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.endColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,mt),[[qe,j.value!==null&&![null,void 0].includes(j.value.end)]]),Ye(g(`rect`,{x:j.value?Math.min(j.value.startX,j.value.endX):J.value.left,y:J.value.top,height:Math.max(.1,J.value.height),width:j.value?Math.max(.1,Math.abs(j.value.endX-j.value.startX)):0,fill:j.value?T(ee)(R.value.rectColor,R.value.rectOpacity):`transparent`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,ht),[[qe,R.value.showRect&&j.value!==null&&![null,void 0].includes(j.value.start)&&![null,void 0].includes(j.value.end)]]),Ye(g(`text`,{transform:`translate(${ir.value==null?0:ir.value}, ${J.value.top-6})`,fill:R.value.labelColor,"font-size":R.value.labelFontSize,"text-anchor":`middle`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},w(ar.value),13,gt),[[qe,j.value!==null&&ir.value!==null&&R.value.showLabel]])],512),[[qe,R.value.show&&A.value!==null]]),g(`defs`,null,[_(u,{t:`radial`,id:`start_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.startColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.startColor,.1),1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`end_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.endColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.endColor,.1),1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`positive_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.positive,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.positive,.1),1],[`100%`,L.value.evaluationColors.positive,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`negative_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.negative,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.negative,.1),1],[`100%`,L.value.evaluationColors.negative,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`neutral_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.neutral,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.neutral,.1),1],[`100%`,L.value.evaluationColors.neutral,1]]},null,8,[`id`,`stops`])]),(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`plot_${t}_${e.id}`},[g(`defs`,null,[_(u,{t:`linear`,id:`grad_pos_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.startColor,1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`linear`,id:`grad_neg_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.endColor,1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`])]),![void 0,null].includes(e.end)&&![void 0,null].includes(e.start)?(b(),h(`g`,_t,[L.value.link.type===`curved`?(b(),h(`g`,vt,[g(`path`,{d:`M
2
2
  ${e.startX},${e.y+Y.value/2}
3
3
  C ${e.centerX},${e.y} ${e.centerX},${e.y}
4
4
  ${e.endX},${e.y+Y.value/2}