vue-data-ui 2.3.97 → 2.3.99

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 (148) hide show
  1. package/dist/{Arrow-CD-z6ya0.cjs → Arrow-DwqF2Xky.cjs} +1 -1
  2. package/dist/{Arrow-BAg5kQhG.js → Arrow-Dyp57i2e.js} +1 -1
  3. package/dist/BaseIcon-BDeByyf-.cjs +1 -0
  4. package/dist/{BaseIcon-CiQsJmEc.js → BaseIcon-DHB44s-g.js} +17 -16
  5. package/dist/{DataTable-DRJUrEXP.cjs → DataTable-CiVu-yQZ.cjs} +1 -1
  6. package/dist/{DataTable-BczvA492.js → DataTable-Dv3mZD4M.js} +2 -2
  7. package/dist/{Legend-DDmBZxt8.cjs → Legend-ComtyeZF.cjs} +1 -1
  8. package/dist/{Legend-DnOc-JGW.js → Legend-iUlykl4S.js} +1 -1
  9. package/dist/{PackageVersion-rOhPenOY.cjs → PackageVersion-BqVp7cHC.cjs} +1 -1
  10. package/dist/{PackageVersion-DN8qp-uI.js → PackageVersion-DWAqn7t0.js} +1 -1
  11. package/dist/{Shape-DhRVUsKe.js → Shape-CDqrt_yL.js} +1 -1
  12. package/dist/{Shape-CDDjN4N-.cjs → Shape-D-cMBFx-.cjs} +1 -1
  13. package/dist/{Slicer-B7JFT6tT.js → Slicer-CQbVH6fI.js} +2 -2
  14. package/dist/{Slicer-IdC3VhM9.cjs → Slicer-iAp8x_Wq.cjs} +1 -1
  15. package/dist/{Title-Cjusozo5.cjs → Title-Bpx2Ub4Z.cjs} +1 -1
  16. package/dist/{Title-0tYDaWv7.js → Title-CDfZWgra.js} +1 -1
  17. package/dist/{Tooltip-DdWGiVyf.js → Tooltip-0-aPeOmA.js} +1 -1
  18. package/dist/{Tooltip-CkqTs_wn.cjs → Tooltip-D-JR_3NK.cjs} +1 -1
  19. package/dist/{index-BJNSbAx7.js → index-COTjlcVF.js} +725 -703
  20. package/dist/{index-NvxTr0fZ.cjs → index-DQRLTu78.cjs} +8 -8
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +1 -1
  23. package/dist/types/vue-data-ui.d.ts +1 -1
  24. package/dist/{useNestedProp-CLh4tPxT.js → useNestedProp-CcjyiBlC.js} +1 -1
  25. package/dist/{useNestedProp-DhLxBAwX.cjs → useNestedProp-np0rM3ep.cjs} +1 -1
  26. package/dist/{usePrinter-CkV5eORP.js → usePrinter-5XpNgqjh.js} +27 -23
  27. package/dist/usePrinter-DuYSC89K.cjs +1 -0
  28. package/dist/{vue-data-ui-CyOAruHW.js → vue-data-ui-Bu3V-W6l.js} +57 -57
  29. package/dist/{vue-data-ui-OR4tWNiS.cjs → vue-data-ui-D3zaRZjl.cjs} +1 -1
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +7 -7
  32. package/dist/{vue-ui-3d-bar-DrnEff_D.cjs → vue-ui-3d-bar-C3EecSgn.cjs} +1 -1
  33. package/dist/{vue-ui-3d-bar-CxDdjFAw.js → vue-ui-3d-bar-DmM70v1H.js} +8 -8
  34. package/dist/{vue-ui-accordion-DDf5Y2GY.js → vue-ui-accordion-CzKJYxd2.js} +3 -3
  35. package/dist/{vue-ui-accordion-CxPjShWo.cjs → vue-ui-accordion-ZppPKpGK.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-BiHpf1Rk.cjs → vue-ui-age-pyramid-BhmOvXIW.cjs} +1 -1
  37. package/dist/{vue-ui-age-pyramid-BMjBTeyH.js → vue-ui-age-pyramid-Bkyd3O37.js} +9 -9
  38. package/dist/{vue-ui-annotator-B-myvrhe.js → vue-ui-annotator-Bmk4N4Co.js} +1 -1
  39. package/dist/{vue-ui-annotator--NmsTiIf.cjs → vue-ui-annotator-rwo7Hm5A.cjs} +1 -1
  40. package/dist/{vue-ui-candlestick-DSwIFt7i.cjs → vue-ui-candlestick-CnYobq1k.cjs} +1 -1
  41. package/dist/{vue-ui-candlestick-J1JpFsJT.js → vue-ui-candlestick-o8m1DAm8.js} +10 -10
  42. package/dist/{vue-ui-carousel-table-B62mAFeV.js → vue-ui-carousel-table-DAck3_R_.js} +26 -25
  43. package/dist/vue-ui-carousel-table-DLQcAZx4.cjs +1 -0
  44. package/dist/{vue-ui-chestnut-ChAwKgeO.js → vue-ui-chestnut-BAQVvxrX.js} +7 -7
  45. package/dist/{vue-ui-chestnut-lQvVg9Rn.cjs → vue-ui-chestnut-r6lsB6H0.cjs} +1 -1
  46. package/dist/{vue-ui-cursor-XXjnAIH2.js → vue-ui-cursor-CYNxiijm.js} +2 -2
  47. package/dist/{vue-ui-cursor-D-qe8qez.cjs → vue-ui-cursor-ucua7LYB.cjs} +1 -1
  48. package/dist/{vue-ui-dashboard-CB41KQ7y.cjs → vue-ui-dashboard-DhLCwsFn.cjs} +1 -1
  49. package/dist/{vue-ui-dashboard-CC-DF6iU.js → vue-ui-dashboard-nnHIe25Y.js} +2 -2
  50. package/dist/{vue-ui-digits-Degwjx76.js → vue-ui-digits-BB3ZlyZ6.js} +2 -2
  51. package/dist/{vue-ui-digits-CIHkrLL6.cjs → vue-ui-digits-CEI69I0y.cjs} +1 -1
  52. package/dist/{vue-ui-donut-CYBpOCFo.js → vue-ui-donut-Ba9Qhfte.js} +10 -10
  53. package/dist/{vue-ui-donut-jwD3vNoD.cjs → vue-ui-donut-Cruh6AlQ.cjs} +1 -1
  54. package/dist/{vue-ui-donut-evolution-Bbt27unL.cjs → vue-ui-donut-evolution-BZaYmvPf.cjs} +1 -1
  55. package/dist/{vue-ui-donut-evolution-Bxq-hr-P.js → vue-ui-donut-evolution-CJHa5S50.js} +10 -10
  56. package/dist/{vue-ui-dumbbell-7f9d2mh-.cjs → vue-ui-dumbbell-D6Yu9qxX.cjs} +1 -1
  57. package/dist/{vue-ui-dumbbell-KsVxecua.js → vue-ui-dumbbell-D_reERJf.js} +9 -9
  58. package/dist/{vue-ui-flow-BzcB3iiZ.cjs → vue-ui-flow-1HFdth8-.cjs} +1 -1
  59. package/dist/{vue-ui-flow-FqXhCo7u.js → vue-ui-flow-sBFdpbtF.js} +8 -8
  60. package/dist/{vue-ui-galaxy-xVldWSiq.cjs → vue-ui-galaxy-DO1moKk6.cjs} +1 -1
  61. package/dist/{vue-ui-galaxy-B9rSYr7m.js → vue-ui-galaxy-ccP0yuQ3.js} +10 -10
  62. package/dist/{vue-ui-gauge-k6fqkXqN.js → vue-ui-gauge-CYjZx4Zz.js} +6 -6
  63. package/dist/{vue-ui-gauge-B4r-qdzi.cjs → vue-ui-gauge-CuFpl36r.cjs} +1 -1
  64. package/dist/{vue-ui-gizmo-By3-mz_t.cjs → vue-ui-gizmo-C3dyTngy.cjs} +1 -1
  65. package/dist/{vue-ui-gizmo-CYaThghf.js → vue-ui-gizmo-DNZwsdp9.js} +3 -3
  66. package/dist/{vue-ui-heatmap-Bdffdnay.js → vue-ui-heatmap-0qNGXzdN.js} +9 -9
  67. package/dist/{vue-ui-heatmap-B0w5CXLi.cjs → vue-ui-heatmap-CLjngS-G.cjs} +1 -1
  68. package/dist/{vue-ui-kpi-DG8_lFYS.js → vue-ui-kpi-BiOt8Z9k.js} +3 -3
  69. package/dist/{vue-ui-kpi-BqN5GILt.cjs → vue-ui-kpi-iclD49Wb.cjs} +1 -1
  70. package/dist/{vue-ui-mini-loader-C-Na_wY7.cjs → vue-ui-mini-loader-ASe27a1V.cjs} +1 -1
  71. package/dist/{vue-ui-mini-loader-BZS_gsWT.js → vue-ui-mini-loader-CBPZAUuP.js} +2 -2
  72. package/dist/{vue-ui-molecule-BK6bSbRU.js → vue-ui-molecule-VqY8WZHi.js} +10 -10
  73. package/dist/{vue-ui-molecule-Cdg96qiI.cjs → vue-ui-molecule-uCEX5lMP.cjs} +1 -1
  74. package/dist/{vue-ui-mood-radar-D5GRHLEE.js → vue-ui-mood-radar-B0cjzFkt.js} +10 -10
  75. package/dist/{vue-ui-mood-radar-D-BCyG9b.cjs → vue-ui-mood-radar-RYbB7jdY.cjs} +1 -1
  76. package/dist/{vue-ui-nested-donuts-D1fD0b-H.cjs → vue-ui-nested-donuts-Bfu90lZl.cjs} +1 -1
  77. package/dist/{vue-ui-nested-donuts-mxJHstX4.js → vue-ui-nested-donuts-DbBSbOjx.js} +10 -10
  78. package/dist/{vue-ui-onion-6mkIHe9R.js → vue-ui-onion-DJLGXvfr.js} +10 -10
  79. package/dist/{vue-ui-onion-vKC5zZVM.cjs → vue-ui-onion-DK7lJvIH.cjs} +1 -1
  80. package/dist/{vue-ui-parallel-coordinate-plot-B_gGjFqe.js → vue-ui-parallel-coordinate-plot-B0_1Uh7a.js} +11 -11
  81. package/dist/{vue-ui-parallel-coordinate-plot-DqbwxRdK.cjs → vue-ui-parallel-coordinate-plot-BaZ5niQk.cjs} +1 -1
  82. package/dist/{vue-ui-quadrant-C54oPX3B.cjs → vue-ui-quadrant-BCadkOrx.cjs} +1 -1
  83. package/dist/{vue-ui-quadrant-SEj9AJdW.js → vue-ui-quadrant-CnAk8Np9.js} +11 -11
  84. package/dist/{vue-ui-quick-chart-DoEE3OMA.cjs → vue-ui-quick-chart--4pkEtK0.cjs} +1 -1
  85. package/dist/{vue-ui-quick-chart-CqmbqQdH.js → vue-ui-quick-chart-BrgtffFL.js} +8 -8
  86. package/dist/{vue-ui-radar-Dr91p7eK.cjs → vue-ui-radar-C68BFXPH.cjs} +1 -1
  87. package/dist/{vue-ui-radar-CKjssi06.js → vue-ui-radar-CDlE8jus.js} +11 -11
  88. package/dist/{vue-ui-rating-DQvO4ejI.cjs → vue-ui-rating-DV3d_vAO.cjs} +1 -1
  89. package/dist/{vue-ui-rating-DUSE6rvR.js → vue-ui-rating-DwTC908t.js} +2 -2
  90. package/dist/{vue-ui-relation-circle-D089YHBB.cjs → vue-ui-relation-circle-0OvmIoRR.cjs} +1 -1
  91. package/dist/{vue-ui-relation-circle-BmijKEEN.js → vue-ui-relation-circle-_5UsoCBf.js} +6 -6
  92. package/dist/{vue-ui-rings-BtzbZYTW.js → vue-ui-rings-BHVrR1L1.js} +10 -10
  93. package/dist/{vue-ui-rings-D237PxGP.cjs → vue-ui-rings-Duu-Dbns.cjs} +1 -1
  94. package/dist/{vue-ui-scatter-BeKQhHUw.js → vue-ui-scatter-CSfeAiML.js} +147 -147
  95. package/dist/vue-ui-scatter-azoiHq_a.cjs +1 -0
  96. package/dist/{vue-ui-screenshot-CnwCy_Kg.cjs → vue-ui-screenshot-D2-GzcYt.cjs} +1 -1
  97. package/dist/{vue-ui-screenshot-DNuimpRf.js → vue-ui-screenshot-DhMpdJsm.js} +1 -1
  98. package/dist/{vue-ui-skeleton-CsU74BI7.js → vue-ui-skeleton-CYgbDsKG.js} +3 -3
  99. package/dist/{vue-ui-skeleton-DYHqPo98.cjs → vue-ui-skeleton-yOWIPVsZ.cjs} +1 -1
  100. package/dist/{vue-ui-smiley-D150KQ7d.cjs → vue-ui-smiley-BXV9UMjs.cjs} +1 -1
  101. package/dist/{vue-ui-smiley-d0tQ2o9w.js → vue-ui-smiley-DDn0IZKJ.js} +2 -2
  102. package/dist/{vue-ui-spark-trend-BDibnFmx.cjs → vue-ui-spark-trend-BMdLIhg7.cjs} +1 -1
  103. package/dist/{vue-ui-spark-trend-CtZdqmLI.js → vue-ui-spark-trend-DxwmzstI.js} +18 -18
  104. package/dist/{vue-ui-sparkbar-C-HlLkKi.js → vue-ui-sparkbar-Dk8VLc5p.js} +4 -4
  105. package/dist/{vue-ui-sparkbar-BpFs4ZhV.cjs → vue-ui-sparkbar-yocSweJn.cjs} +1 -1
  106. package/dist/{vue-ui-sparkgauge-BHBI7l12.cjs → vue-ui-sparkgauge-CdW6FTRw.cjs} +1 -1
  107. package/dist/{vue-ui-sparkgauge-BDRCFVP5.js → vue-ui-sparkgauge-G7BowYq4.js} +4 -4
  108. package/dist/{vue-ui-sparkhistogram-BjWnqdfo.cjs → vue-ui-sparkhistogram-BWulWwCi.cjs} +1 -1
  109. package/dist/{vue-ui-sparkhistogram-B5nNXynh.js → vue-ui-sparkhistogram-CkkEGb0a.js} +5 -5
  110. package/dist/{vue-ui-sparkline-DpnhvlTf.cjs → vue-ui-sparkline-CaetICAe.cjs} +1 -1
  111. package/dist/{vue-ui-sparkline-o3mpXRV-.js → vue-ui-sparkline-LBi6ypp4.js} +4 -4
  112. package/dist/{vue-ui-sparkstackbar-CST5NcMP.cjs → vue-ui-sparkstackbar-CAJaJ3ZQ.cjs} +1 -1
  113. package/dist/{vue-ui-sparkstackbar-Bko-XhdQ.js → vue-ui-sparkstackbar-DxUkSfRG.js} +4 -4
  114. package/dist/{vue-ui-stackbar-Br1WGSyo.js → vue-ui-stackbar-BP1YHhjl.js} +33 -33
  115. package/dist/{vue-ui-stackbar-B3nyr_3-.cjs → vue-ui-stackbar-BPyxp0m8.cjs} +1 -1
  116. package/dist/{vue-ui-strip-plot-DkAf9HPJ.cjs → vue-ui-strip-plot-BJSzqxzi.cjs} +1 -1
  117. package/dist/{vue-ui-strip-plot-C7Q-J22i.js → vue-ui-strip-plot-BYJWkk2_.js} +10 -10
  118. package/dist/{vue-ui-table-1vOGIOAk.cjs → vue-ui-table-C0-NQWi3.cjs} +1 -1
  119. package/dist/{vue-ui-table-BTXo44Nv.js → vue-ui-table-CWHUBpqz.js} +16 -16
  120. package/dist/{vue-ui-table-heatmap-BNcfBY7T.cjs → vue-ui-table-heatmap-9oVqDvLC.cjs} +1 -1
  121. package/dist/{vue-ui-table-heatmap-BosdMOLZ.js → vue-ui-table-heatmap-uYQph968.js} +15 -15
  122. package/dist/{vue-ui-table-sparkline-BGCEgn2A.cjs → vue-ui-table-sparkline-BHJAP-Uh.cjs} +1 -1
  123. package/dist/{vue-ui-table-sparkline-D0NjMfnV.js → vue-ui-table-sparkline-Bv39O2DT.js} +16 -16
  124. package/dist/{vue-ui-thermometer-CUBnp6lX.cjs → vue-ui-thermometer-CqcNegd7.cjs} +1 -1
  125. package/dist/{vue-ui-thermometer-Bnn77E-v.js → vue-ui-thermometer-JLaF8-hy.js} +6 -6
  126. package/dist/{vue-ui-timer-JupC7c3X.js → vue-ui-timer-B2ZQBIVg.js} +5 -5
  127. package/dist/{vue-ui-timer-D2WCDGWF.cjs → vue-ui-timer-fu2zcs6f.cjs} +1 -1
  128. package/dist/{vue-ui-tiremarks-Db9JjYq5.js → vue-ui-tiremarks-CXuGp82M.js} +6 -6
  129. package/dist/{vue-ui-tiremarks-FxWaEnUD.cjs → vue-ui-tiremarks-DzrCVTcA.cjs} +1 -1
  130. package/dist/{vue-ui-treemap-DPD9rcYE.js → vue-ui-treemap-CubutXgp.js} +10 -10
  131. package/dist/{vue-ui-treemap-oplXghMz.cjs → vue-ui-treemap-DmEpWWkN.cjs} +1 -1
  132. package/dist/{vue-ui-vertical-bar-BrOR3Xkc.cjs → vue-ui-vertical-bar-BpyY1mcc.cjs} +1 -1
  133. package/dist/{vue-ui-vertical-bar-DeUOAiy4.js → vue-ui-vertical-bar-Dqd4bZVC.js} +10 -10
  134. package/dist/{vue-ui-waffle-qvh8AKep.js → vue-ui-waffle-D1n_ln-O.js} +10 -10
  135. package/dist/{vue-ui-waffle-DGrZjGQR.cjs → vue-ui-waffle-DzbRkTbY.cjs} +1 -1
  136. package/dist/{vue-ui-wheel-CuEobbmN.cjs → vue-ui-wheel-BTJ9Ds5T.cjs} +1 -1
  137. package/dist/{vue-ui-wheel-DmG03DhW.js → vue-ui-wheel-C-BFxhCO.js} +6 -6
  138. package/dist/{vue-ui-word-cloud-CbnPyd1_.cjs → vue-ui-word-cloud-BZLUTH8A.cjs} +1 -1
  139. package/dist/{vue-ui-word-cloud-Dg0WQKL1.js → vue-ui-word-cloud-DdbqYmZz.js} +26 -26
  140. package/dist/{vue-ui-xy-gHnKcmgZ.cjs → vue-ui-xy-BEB7zD0E.cjs} +2 -2
  141. package/dist/{vue-ui-xy-BBlRgHyb.js → vue-ui-xy-CLJaG6lQ.js} +272 -272
  142. package/dist/{vue-ui-xy-canvas-CzCS04yK.cjs → vue-ui-xy-canvas-CJHNw8ek.cjs} +1 -1
  143. package/dist/{vue-ui-xy-canvas-CqyEve92.js → vue-ui-xy-canvas-DE1jTXbE.js} +34 -34
  144. package/package.json +1 -1
  145. package/dist/BaseIcon-JWYc0t9a.cjs +0 -1
  146. package/dist/usePrinter-0s8wVGIy.cjs +0 -1
  147. package/dist/vue-ui-carousel-table-Cg3I81MW.cjs +0 -1
  148. package/dist/vue-ui-scatter-_bZ2lVMS.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NvxTr0fZ.cjs"),be=require("./Title-Cjusozo5.cjs"),se=require("./usePrinter-0s8wVGIy.cjs"),xe=require("./DataTable-DRJUrEXP.cjs"),Be=require("./Legend-DDmBZxt8.cjs"),Ce=require("./vue-ui-skeleton-DYHqPo98.cjs"),_e=require("./Slicer-IdC3VhM9.cjs"),Ee=require("./vue-ui-accordion-CxPjShWo.cjs"),ce=require("./useNestedProp-DhLxBAwX.cjs"),Ne=require("./PackageVersion-rOhPenOY.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Le=["xmlns","viewBox"],Ve=["id"],ze=["stop-color"],$e=["stop-color"],Fe=["id"],Ae=["stop-color"],De=["stop-color"],Pe=["stop-color"],Te={key:0},Oe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],Me={key:0},He=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x1","x2","y1","y2","stroke","stroke-width"],We=["x","y","font-size","fill","font-weight"],qe=["text-anchor","font-size","fill","transform"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Xe={key:1},Ge=["cx","cy","r","fill"],Ye={key:0},je={key:0},Ke=["d","stroke"],Je=["text-anchor","x","y","fill"],Qe=["cx","cy","r","fill"],Ze={key:0},et=["cx","cy","fill"],tt={key:1},lt=["d","fill","stroke"],at={key:2},ot=["d","fill","stroke"],ut=["x","y","font-size","fill"],rt=["x","y","width","fill","onClick"],nt=["x","y","width","height","onMouseenter","onClick"],st={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ct=["x","y","width","height","fill"],it=["x1","y1","x2","y2","stroke"],dt=["x1","y2","x2","y1","stroke"],vt=["onKeypress","cx","cy","r"],ht=["d","stroke"],yt=["cx","cy","r","fill"],mt=["d","fill","stroke"],ft={class:"vue-ui-donut-evolution-focus"},gt=["text-anchor","x","y","fill"],pt=["cx","cy","r","fill"],kt=["cx","cy","r","fill"],bt=["x","y","fill"],xt=["x","y","font-size","fill"],Bt={key:3,class:"vue-data-ui-watermark"},Ct=["onClick"],_t={key:0},Et={key:1},Nt={key:0},wt={key:1},St={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ie,{expose:de,emit:M}){const p=ie,{vue_ui_donut_evolution:ve}=r.useConfig(),z=e.computed(()=>!!p.dataset&&p.dataset.length),i=e.ref({start:0,end:Math.max(...p.dataset.map(a=>a.values.length))});function H(){i.value={start:0,end:L.value},U.value+=1}e.onMounted(()=>{R()});function R(){r.objectIsEmpty(p.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):p.dataset.length&&p.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),k=e.ref(!1),b=e.ref(null),W=e.ref(null),q=e.ref(0),U=e.ref(0),X=e.ref(0),G=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>j(),set:a=>a});function j(){const a=ce.useNestedProp({userConfig:p.config,defaultConfig:ve});return a.theme?{...ce.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||p.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>p.config,a=>{t.value=j(),R(),X.value+=1,G.value+=1,Y.value+=1},{deep:!0}),e.watch(()=>p.dataset,a=>{H()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=se.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),he=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),$=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(p.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),p.dataset.map((a,c)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||he.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),I=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:I,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>n.value.width/16?n.value.width/16:d,I=h.value===o.index?n.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:I,hoverRadius:w,donut:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ye(a){return a/E.value.max}const me=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ye(a),value:a})));function ee(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function te(){k.value||(h.value=null,A.value=null)}function fe(a){k.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(c)||(P.value=c))}function le(){b.value=null,k.value=!1,P.value=null}const ae=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>O(a.uid),isSegregated:y.value.includes(a.uid)}))),oe=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ge=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function O(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}b.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function pe(){return C.value}function ue(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ke(a){V.value=a,q.value+=1}function re(){$.value.showTable=!$.value.showTable}return de({getData:pe,generatePdf:Q,generateCsv:ue,generateImage:Z,toggleTable:re}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:W,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:te},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(J),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:W.value,position:t.value.userOptions.position,onToggleFullscreen:ke,onGeneratePdf:e.unref(Q),onGenerateCsv:ue,onGenerateImage:e.unref(Z),onToggleTable:re},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,$e)],8,Ve),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ae),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Pe)],8,Fe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ie),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*f.value,x2:u.value.left+(s+1)*f.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,He))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Re)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,We)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+f.value*s+f.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,qe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Ue)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Xe,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,Ge)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ye,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(ee(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Je)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,Qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ze,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,et)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,lt))),256))])):(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,ot))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(F(l.subtotal,l,s)),9,ut)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*f.value,y:n.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,rt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*f.value,y:u.value.top,width:f.value,height:n.value.height,fill:"transparent",onMouseenter:o=>fe(l),onMouseleave:te,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,nt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",st,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ct),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,it),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,dt),e.createElementVNode("circle",{"data-cy-close":"",onClick:le,onKeypress:e.withKeys(le,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,vt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,ht)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,yt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,mt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("text",{"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(ee(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,gt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,pt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,kt),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(F(b.value.subtotal,b.value,null)),9,bt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,xt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(_e.Slicer,{key:`slicer_${U.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Be.Legend,{key:`legend_${Y.value}`,legendSet:ae.value,config:ge.value,onClickMarker:c[2]||(c[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Et," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",_t," ("+e.toDisplayString(isNaN(l.value/oe.value)?"-":e.unref(r.dataLabel)({v:l.value/oe.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ct)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0),z.value?(e.openBlock(),e.createBlock(Ee.default,{key:7,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(xe.DataTable,{key:`table_${G.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[3]||(c[3]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",Nt,"-")):(e.openBlock(),e.createElementBlock("b",wt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},Lt=we._export_sfc(St,[["__scopeId","data-v-715ec8d1"]]);exports.default=Lt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DQRLTu78.cjs"),be=require("./Title-Bpx2Ub4Z.cjs"),se=require("./usePrinter-DuYSC89K.cjs"),xe=require("./DataTable-CiVu-yQZ.cjs"),Be=require("./Legend-ComtyeZF.cjs"),Ce=require("./vue-ui-skeleton-yOWIPVsZ.cjs"),_e=require("./Slicer-iAp8x_Wq.cjs"),Ee=require("./vue-ui-accordion-ZppPKpGK.cjs"),ce=require("./useNestedProp-np0rM3ep.cjs"),Ne=require("./PackageVersion-BqVp7cHC.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Le=["xmlns","viewBox"],Ve=["id"],ze=["stop-color"],$e=["stop-color"],Fe=["id"],Ae=["stop-color"],De=["stop-color"],Pe=["stop-color"],Te={key:0},Oe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],Me={key:0},He=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x1","x2","y1","y2","stroke","stroke-width"],We=["x","y","font-size","fill","font-weight"],qe=["text-anchor","font-size","fill","transform"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Xe={key:1},Ge=["cx","cy","r","fill"],Ye={key:0},je={key:0},Ke=["d","stroke"],Je=["text-anchor","x","y","fill"],Qe=["cx","cy","r","fill"],Ze={key:0},et=["cx","cy","fill"],tt={key:1},lt=["d","fill","stroke"],at={key:2},ot=["d","fill","stroke"],ut=["x","y","font-size","fill"],rt=["x","y","width","fill","onClick"],nt=["x","y","width","height","onMouseenter","onClick"],st={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ct=["x","y","width","height","fill"],it=["x1","y1","x2","y2","stroke"],dt=["x1","y2","x2","y1","stroke"],vt=["onKeypress","cx","cy","r"],ht=["d","stroke"],yt=["cx","cy","r","fill"],mt=["d","fill","stroke"],ft={class:"vue-ui-donut-evolution-focus"},gt=["text-anchor","x","y","fill"],pt=["cx","cy","r","fill"],kt=["cx","cy","r","fill"],bt=["x","y","fill"],xt=["x","y","font-size","fill"],Bt={key:3,class:"vue-data-ui-watermark"},Ct=["onClick"],_t={key:0},Et={key:1},Nt={key:0},wt={key:1},St={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ie,{expose:de,emit:M}){const p=ie,{vue_ui_donut_evolution:ve}=r.useConfig(),z=e.computed(()=>!!p.dataset&&p.dataset.length),i=e.ref({start:0,end:Math.max(...p.dataset.map(a=>a.values.length))});function H(){i.value={start:0,end:L.value},U.value+=1}e.onMounted(()=>{R()});function R(){r.objectIsEmpty(p.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):p.dataset.length&&p.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),k=e.ref(!1),b=e.ref(null),W=e.ref(null),q=e.ref(0),U=e.ref(0),X=e.ref(0),G=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>j(),set:a=>a});function j(){const a=ce.useNestedProp({userConfig:p.config,defaultConfig:ve});return a.theme?{...ce.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||p.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>p.config,a=>{t.value=j(),R(),X.value+=1,G.value+=1,Y.value+=1},{deep:!0}),e.watch(()=>p.dataset,a=>{H()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=se.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),he=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),$=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(p.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),p.dataset.map((a,c)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||he.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),I=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:I,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>n.value.width/16?n.value.width/16:d,I=h.value===o.index?n.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:I,hoverRadius:w,donut:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ye(a){return a/E.value.max}const me=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ye(a),value:a})));function ee(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function te(){k.value||(h.value=null,A.value=null)}function fe(a){k.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(c)||(P.value=c))}function le(){b.value=null,k.value=!1,P.value=null}const ae=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>O(a.uid),isSegregated:y.value.includes(a.uid)}))),oe=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ge=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function O(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}b.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function pe(){return C.value}function ue(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ke(a){V.value=a,q.value+=1}function re(){$.value.showTable=!$.value.showTable}return de({getData:pe,generatePdf:Q,generateCsv:ue,generateImage:Z,toggleTable:re}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:W,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:te},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(J),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:W.value,position:t.value.userOptions.position,onToggleFullscreen:ke,onGeneratePdf:e.unref(Q),onGenerateCsv:ue,onGenerateImage:e.unref(Z),onToggleTable:re},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,$e)],8,Ve),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ae),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Pe)],8,Fe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ie),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*f.value,x2:u.value.left+(s+1)*f.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,He))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Re)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,We)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+f.value*s+f.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,qe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Ue)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Xe,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,Ge)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ye,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(ee(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Je)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,Qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ze,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,et)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,lt))),256))])):(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,ot))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(F(l.subtotal,l,s)),9,ut)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*f.value,y:n.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,rt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*f.value,y:u.value.top,width:f.value,height:n.value.height,fill:"transparent",onMouseenter:o=>fe(l),onMouseleave:te,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,nt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",st,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ct),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,it),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,dt),e.createElementVNode("circle",{"data-cy-close":"",onClick:le,onKeypress:e.withKeys(le,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,vt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,ht)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,yt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,mt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("text",{"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(ee(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,gt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,pt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,kt),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(F(b.value.subtotal,b.value,null)),9,bt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,xt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(_e.Slicer,{key:`slicer_${U.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Be.Legend,{key:`legend_${Y.value}`,legendSet:ae.value,config:ge.value,onClickMarker:c[2]||(c[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Et," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",_t," ("+e.toDisplayString(isNaN(l.value/oe.value)?"-":e.unref(r.dataLabel)({v:l.value/oe.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ct)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0),z.value?(e.openBlock(),e.createBlock(Ee.default,{key:7,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(xe.DataTable,{key:`table_${G.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[3]||(c[3]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",Nt,"-")):(e.openBlock(),e.createElementBlock("b",wt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},Lt=we._export_sfc(St,[["__scopeId","data-v-715ec8d1"]]);exports.default=Lt;
@@ -1,14 +1,14 @@
1
1
  import { computed as x, ref as m, onMounted as Ke, watch as Fe, openBlock as a, createElementBlock as u, normalizeClass as F, normalizeStyle as ae, createBlock as E, createCommentVNode as d, unref as c, createSlots as qe, withCtx as P, renderSlot as I, normalizeProps as ue, guardReactiveProps as oe, createVNode as Je, createElementVNode as v, Fragment as p, renderList as k, toDisplayString as b, withKeys as Qe, createTextVNode as Pe, nextTick as Ze } from "vue";
2
- import { u as et, o as tt, e as B, g as lt, c as De, t as at, a as ut, p as Y, b as ot, I as st, d as se, C as Ie, m as re, X as rt, s as U, D as nt, i as ne, f as K, j as Te, k as q, n as Ee, J as Oe, q as it, r as ct } from "./index-BJNSbAx7.js";
3
- import { _ as vt } from "./Title-0tYDaWv7.js";
4
- import { u as dt, U as ht } from "./usePrinter-CkV5eORP.js";
5
- import { D as yt } from "./DataTable-BczvA492.js";
6
- import { L as ft } from "./Legend-DnOc-JGW.js";
7
- import gt from "./vue-ui-skeleton-CsU74BI7.js";
8
- import { S as bt } from "./Slicer-B7JFT6tT.js";
9
- import xt from "./vue-ui-accordion-DDf5Y2GY.js";
10
- import { u as Ve } from "./useNestedProp-CLh4tPxT.js";
11
- import { _ as mt } from "./PackageVersion-DN8qp-uI.js";
2
+ import { u as et, o as tt, e as B, g as lt, c as De, t as at, a as ut, p as Y, b as ot, I as st, d as se, C as Ie, m as re, X as rt, s as U, D as nt, i as ne, f as K, j as Te, k as q, n as Ee, J as Oe, q as it, r as ct } from "./index-COTjlcVF.js";
3
+ import { _ as vt } from "./Title-CDfZWgra.js";
4
+ import { u as dt, U as ht } from "./usePrinter-5XpNgqjh.js";
5
+ import { D as yt } from "./DataTable-Dv3mZD4M.js";
6
+ import { L as ft } from "./Legend-iUlykl4S.js";
7
+ import gt from "./vue-ui-skeleton-CYgbDsKG.js";
8
+ import { S as bt } from "./Slicer-CQbVH6fI.js";
9
+ import xt from "./vue-ui-accordion-CzKJYxd2.js";
10
+ import { u as Ve } from "./useNestedProp-CcjyiBlC.js";
11
+ import { _ as mt } from "./PackageVersion-DWAqn7t0.js";
12
12
  import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const kt = ["id"], _t = ["xmlns", "viewBox"], Ct = ["id"], wt = ["stop-color"], Lt = ["stop-color"], $t = ["id"], St = ["stop-color"], At = ["stop-color"], Nt = ["stop-color"], zt = { key: 0 }, Ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = { key: 0 }, It = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = ["x", "y", "font-size", "fill", "font-weight"], Ot = ["text-anchor", "font-size", "fill", "transform"], Vt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ht = { key: 1 }, Mt = ["cx", "cy", "r", "fill"], Wt = { key: 0 }, Rt = { key: 0 }, Ut = ["d", "stroke"], Xt = ["text-anchor", "x", "y", "fill"], Gt = ["cx", "cy", "r", "fill"], jt = { key: 0 }, Bt = ["cx", "cy", "fill"], Yt = { key: 1 }, Kt = ["d", "fill", "stroke"], qt = { key: 2 }, Jt = ["d", "fill", "stroke"], Qt = ["x", "y", "font-size", "fill"], Zt = ["x", "y", "width", "fill", "onClick"], el = ["x", "y", "width", "height", "onMouseenter", "onClick"], tl = {
14
14
  key: 3,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-NvxTr0fZ.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-Cjusozo5.cjs"),W=require("./usePrinter-0s8wVGIy.cjs"),ae=require("./DataTable-DRJUrEXP.cjs"),oe=require("./vue-ui-skeleton-DYHqPo98.cjs"),re=require("./Legend-DDmBZxt8.cjs"),se=require("./vue-ui-accordion-CxPjShWo.cjs"),U=require("./useNestedProp-DhLxBAwX.cjs"),ne=require("./PackageVersion-rOhPenOY.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],ie=["xmlns","viewBox"],de={key:0},ve=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],he={key:1},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:2},be=["x","y","font-size","fill","font-weight"],ge=["x","y","font-size","fill"],pe={key:3},ke=["x","y","font-size","fill","font-weight"],_e=["id"],xe=["stop-color"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le=["stop-color"],$e=["id"],Ve=["stop-color"],Se=["stop-color"],ze=["id"],Xe=["stop-color"],Pe=["stop-color"],Ae={key:0},Te=["d","fill"],De={key:1},Fe=["x","y","height","width","fill"],Me=["cx","cy","r","fill","stroke","stroke-width"],Ge=["cx","cy","r","fill","stroke","stroke-width"],Ie={key:2},Oe=["x","y","fill","font-size"],He={key:3},qe=["x","y","fill","font-size"],Re={key:3,class:"vue-data-ui-watermark"},We=["xmlns","height","width"],Ue=["fill"],je=["innerHTML"],Ye={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(j,{expose:Y,emit:Je}){const y=j,{vue_ui_dumbbell:Z}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),L=e.ref(0),k=e.ref(null),$=e.ref(null),V=e.ref(null),S=e.ref(0),z=e.ref(0),X=e.ref(0),t=e.computed({get:()=>P(),set:a=>a});function P(){const a=U.useNestedProp({userConfig:y.config,defaultConfig:Z});return a.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=P(),A(),S.value+=1,z.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{I()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{A()});function A(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:k.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:T,isImaging:D,generatePdf:F,generateImage:M}=W.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),G=e.ref(null),J=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{I()});function I(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=J.value?(cancelAnimationFrame(G.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+u*i.value+i.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),G.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const O=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),K=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((u,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),te=s.dataLabel({v:100*(f.value.body[h].end/f.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},B,E,te]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function H(){e.nextTick(()=>{const a=f.value.head.map((r,u)=>[[r.name],[f.value.body[u].start],[f.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const p=e.ref(!1);function Q(a){p.value=a,L.value+=1}function ee(){return v.value}function q(){x.value.showTable=!x.value.showTable}return Y({getData:ee,generatePdf:F,generateCsv:H,generateImage:M,toggleTable:q}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:k,class:e.normalizeClass(`vue-ui-dumbbell ${p.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(le._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(D),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(F),onGenerateCsv:H,onGenerateImage:e.unref(M),onToggleTable:q},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(c.value.ticks.length-1),x2:o.value.left+r*o.value.width/(c.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*i.value,y2:o.value.top+r*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ye))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,me)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,be))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,ge))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(c.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:r})),9,ke))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,xe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,we)],8,_e),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ne),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Le)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,$e),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Pe)],8,ze)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DQRLTu78.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-Bpx2Ub4Z.cjs"),W=require("./usePrinter-DuYSC89K.cjs"),ae=require("./DataTable-CiVu-yQZ.cjs"),oe=require("./vue-ui-skeleton-yOWIPVsZ.cjs"),re=require("./Legend-ComtyeZF.cjs"),se=require("./vue-ui-accordion-ZppPKpGK.cjs"),U=require("./useNestedProp-np0rM3ep.cjs"),ne=require("./PackageVersion-BqVp7cHC.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],ie=["xmlns","viewBox"],de={key:0},ve=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],he={key:1},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:2},be=["x","y","font-size","fill","font-weight"],ge=["x","y","font-size","fill"],pe={key:3},ke=["x","y","font-size","fill","font-weight"],_e=["id"],xe=["stop-color"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le=["stop-color"],$e=["id"],Ve=["stop-color"],Se=["stop-color"],ze=["id"],Xe=["stop-color"],Pe=["stop-color"],Ae={key:0},Te=["d","fill"],De={key:1},Fe=["x","y","height","width","fill"],Me=["cx","cy","r","fill","stroke","stroke-width"],Ge=["cx","cy","r","fill","stroke","stroke-width"],Ie={key:2},Oe=["x","y","fill","font-size"],He={key:3},qe=["x","y","fill","font-size"],Re={key:3,class:"vue-data-ui-watermark"},We=["xmlns","height","width"],Ue=["fill"],je=["innerHTML"],Ye={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(j,{expose:Y,emit:Je}){const y=j,{vue_ui_dumbbell:Z}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),L=e.ref(0),k=e.ref(null),$=e.ref(null),V=e.ref(null),S=e.ref(0),z=e.ref(0),X=e.ref(0),t=e.computed({get:()=>P(),set:a=>a});function P(){const a=U.useNestedProp({userConfig:y.config,defaultConfig:Z});return a.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=P(),A(),S.value+=1,z.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{I()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{A()});function A(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:k.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:T,isImaging:D,generatePdf:F,generateImage:M}=W.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),G=e.ref(null),J=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{I()});function I(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=J.value?(cancelAnimationFrame(G.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+u*i.value+i.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),G.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const O=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),K=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((u,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),te=s.dataLabel({v:100*(f.value.body[h].end/f.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},B,E,te]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function H(){e.nextTick(()=>{const a=f.value.head.map((r,u)=>[[r.name],[f.value.body[u].start],[f.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const p=e.ref(!1);function Q(a){p.value=a,L.value+=1}function ee(){return v.value}function q(){x.value.showTable=!x.value.showTable}return Y({getData:ee,generatePdf:F,generateCsv:H,generateImage:M,toggleTable:q}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:k,class:e.normalizeClass(`vue-ui-dumbbell ${p.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(le._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(D),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(F),onGenerateCsv:H,onGenerateImage:e.unref(M),onToggleTable:q},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(c.value.ticks.length-1),x2:o.value.left+r*o.value.width/(c.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*i.value,y2:o.value.top+r*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ye))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,me)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,be))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,ge))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(c.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:r})),9,ke))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,xe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,we)],8,_e),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ne),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Le)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,$e),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Pe)],8,ze)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("path",{d:`M
2
2
  ${l.startX},${l.y+t.value.style.chart.plots.radius/2}
3
3
  C ${l.centerX},${l.y} ${l.centerX},${l.y}
4
4
  ${l.endX},${l.y+t.value.style.chart.plots.radius/2}
@@ -1,14 +1,14 @@
1
1
  import { computed as p, ref as y, watch as oe, onMounted as re, onBeforeUnmount as Le, openBlock as o, createElementBlock as r, normalizeClass as ne, normalizeStyle as V, createBlock as S, createCommentVNode as g, unref as d, createSlots as ze, withCtx as _, renderSlot as C, normalizeProps as ue, guardReactiveProps as ie, createVNode as Xe, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as ce, nextTick as Se } from "vue";
2
- import { u as Ne, c as de, t as Ae, o as Te, e as ve, g as Pe, v as he, C as Ge, f as z, X as ye, i as E, l as be, h as fe, q as De, r as Ie } from "./index-BJNSbAx7.js";
2
+ import { u as Ne, c as de, t as Ae, o as Te, e as ve, g as Pe, v as he, C as Ge, f as z, X as ye, i as E, l as be, h as fe, q as De, r as Ie } from "./index-COTjlcVF.js";
3
3
  import { t as Me, u as Fe } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Oe } from "./Title-0tYDaWv7.js";
5
- import { u as Ve, U as Ee } from "./usePrinter-CkV5eORP.js";
6
- import { D as He } from "./DataTable-BczvA492.js";
7
- import We from "./vue-ui-skeleton-CsU74BI7.js";
8
- import { L as Re } from "./Legend-DnOc-JGW.js";
9
- import Be from "./vue-ui-accordion-DDf5Y2GY.js";
10
- import { u as ge } from "./useNestedProp-CLh4tPxT.js";
11
- import { _ as Ue } from "./PackageVersion-DN8qp-uI.js";
4
+ import { _ as Oe } from "./Title-CDfZWgra.js";
5
+ import { u as Ve, U as Ee } from "./usePrinter-5XpNgqjh.js";
6
+ import { D as He } from "./DataTable-Dv3mZD4M.js";
7
+ import We from "./vue-ui-skeleton-CYgbDsKG.js";
8
+ import { L as Re } from "./Legend-iUlykl4S.js";
9
+ import Be from "./vue-ui-accordion-CzKJYxd2.js";
10
+ import { u as ge } from "./useNestedProp-CcjyiBlC.js";
11
+ import { _ as Ue } from "./PackageVersion-DWAqn7t0.js";
12
12
  import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const qe = ["id"], Ye = ["xmlns", "viewBox"], Ze = { key: 0 }, Je = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ke = { key: 1 }, Qe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], tt = { key: 2 }, lt = ["x", "y", "font-size", "fill", "font-weight"], at = ["x", "y", "font-size", "fill"], st = { key: 3 }, ot = ["x", "y", "font-size", "fill", "font-weight"], rt = ["id"], nt = ["stop-color"], ut = ["stop-color"], it = ["stop-color"], ct = ["id"], dt = ["stop-color"], vt = ["stop-color"], ht = ["stop-color"], yt = ["id"], bt = ["stop-color"], ft = ["stop-color"], gt = ["id"], mt = ["stop-color"], pt = ["stop-color"], _t = { key: 0 }, xt = ["d", "fill"], kt = { key: 1 }, Ct = ["x", "y", "height", "width", "fill"], wt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], $t = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Lt = { key: 2 }, zt = ["x", "y", "fill", "font-size"], Xt = { key: 3 }, St = ["x", "y", "fill", "font-size"], Nt = {
14
14
  key: 3,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NvxTr0fZ.cjs"),fe=require("./Title-Cjusozo5.cjs"),Z=require("./usePrinter-0s8wVGIy.cjs"),he=require("./DataTable-DRJUrEXP.cjs"),ve=require("./vue-ui-accordion-CxPjShWo.cjs"),me=require("./vue-ui-skeleton-DYHqPo98.cjs"),J=require("./useNestedProp-DhLxBAwX.cjs"),pe=require("./PackageVersion-rOhPenOY.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ye={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},be=["xmlns","viewBox"],we=["id"],Ce=["stop-color"],Ne=["stop-color"],xe=["d","fill","stroke","stroke-width"],_e=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],$e=["x","y","font-size","fill"],Be=["x","y","font-size","fill"],Ee={key:2,class:"vue-data-ui-watermark"},Se=["innerHTML"],Pe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(K,{expose:Q}){const h=K,{vue_ui_flow:ee}=r.useConfig(),x=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{T()});function T(){r.objectIsEmpty(h.dataset)&&r.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(r.createUid()),F=e.ref(null),L=e.ref(0),z=e.ref(0),y=e.ref(!1);function te(l){y.value=l,L.value+=1}const t=e.computed({get:()=>I(),set:l=>l});function I(){const l=J.useNestedProp({userConfig:h.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_flow[l.theme]||h.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>h.config,l=>{t.value=I(),T(),z.value+=1},{deep:!0});const{isPrinting:H,isImaging:O,generatePdf:V,generateImage:M}=Z.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),$=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),D=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),B=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(l=>[l[0],l[1],r.checkNaN(l[2])])),q=e.computed(()=>{const l={};function n(s){l[s]||(l[s]={inflow:0,outflow:0})}B.value.forEach(([s,a,c])=>{n(s),n(a),l[s].outflow+=c,l[a].inflow+=c});let o=0;for(const s in l){const a=Math.max(l[s].inflow,l[s].outflow);o=Math.max(o,a)}return o});function le(l){return l/q.value*100+t.value.style.chart.nodes.minHeight}function oe(l){const n=t.value.style.chart.nodes.minHeight;return(l-n)/100*q.value}function ne(l){const n={},o={};function s(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),o[i]||(o[i]=[]),o[i].includes(u)||o[i].push(u)}l.forEach(([u,i,f],k)=>{const p=n[u]?n[u].level:0,N=p+1;s(u,p),s(i,N),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:f}),n[u].outflow+=f,n[i].inflow+=f}),Object.keys(n).forEach((u,i)=>{n[u].color=$.value[i]||$.value[i%$.value.length]||r.palette[i]||r.palette[i%d.length]});for(const u in n)n[u].height=le(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in o){let i=0;o[u].forEach((f,k)=>{const p=n[f].height;a[f]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:p,i:k,color:n[f].color,value:oe(p)},i+=p+D.value})}const c=[];for(const u in n){let i=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:f,value:k},p)=>{const N=a[f].y,S=a[u],P=a[f],A=r.checkNaN(i),W=r.checkNaN(i+k/n[u].outflow*S.height),X=r.checkNaN(N),R=r.checkNaN(N+k/n[f].inflow*P.height),de={id:r.createUid(),source:u,target:f,path:`M ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${A} L ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${W} L ${r.checkNaN(P.x)} ${R} L ${r.checkNaN(P.x)} ${X} Z`,value:k,sourceColor:n[u].color,targetColor:n[f].color};c.push(de),i+=W-A,a[f].y+=R-X})}return{nodeCoordinates:a,links:c}}const v=e.computed(()=>{const l=ne(h.dataset);return{nodes:Object.keys(l.nodeCoordinates).map((n,o)=>({...l.nodeCoordinates[n],name:n})),links:l.links}}),ae=e.computed(()=>re(v.value.nodes));function re(l){const n={};for(const s in l){const{x:a,height:c}=l[s];n[a]||(n[a]=0),n[a]+=c+D.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:l,right:n,left:o,bottom:s}=t.value.style.chart.padding,a=B.value.length*Y.value;return{height:ae.value+l+s,width:n+Math.max(...v.value.nodes.map(c=>c.x))+g.value,left:o,top:l,right:a-n,p_top:l,p_bottom:s}});function se(l){const n={},o={},s=new Set;return B.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),o[c]||(o[c]=[]),n[a].push(c),o[c].push(a)}),n[l]&&n[l].forEach(a=>s.add(a)),o[l]&&o[l].forEach(a=>s.add(a)),Array.from(s).concat(l)}const m=e.ref(null),w=e.ref(null);function ue(l){m.value=se(l.name),w.value=l.name}function ie(){m.value=null,w.value=null}const G=e.computed(()=>v.value.links.map(({source:l,target:n,sourceColor:o,targetColor:s,value:a})=>({source:l,target:n,sourceColor:o,targetColor:s,value:a})));function U(){e.nextTick(()=>{const l=G.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(n);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const l=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=G.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},r.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:l,body:n,config:o}});function ce(){return v.value}function j(){b.value.showTable=!b.value.showTable}return Q({getData:ce,generateCsv:U,generateImage:M,generatePdf:V,toggleTable:j}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:F,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(fe._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(O),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,position:t.value.userOptions.position,onToggleFullscreen:te,onGeneratePdf:e.unref(V),onGenerateCsv:U,onGenerateImage:e.unref(M),onToggleTable:j},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(pe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,(o,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:o.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.sourceColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":o.targetColor},null,8,Ne)],8,we))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,o=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:o.path,fill:`url(#${o.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[o.target,o.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:o.x,y:e.unref(r.checkNaN)(o.absoluteY),height:e.unref(r.checkNaN)(o.height),width:g.value,fill:o.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ue(o),onMouseleave:n[0]||(n[0]=a=>ie()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(o.name)?1:.2:1}`)},null,44,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):o.name),13,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:o.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:o,seriesIndex:s})),13,Be))),256)),e.renderSlot(l.$slots,"svg",{svg:E.value},void 0,!0)],14,be)),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(ve.default,{key:4,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(he.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=o=>b.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Se)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ke))}},Te=ge._export_sfc(Pe,[["__scopeId","data-v-53bf76e7"]]);exports.default=Te;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DQRLTu78.cjs"),fe=require("./Title-Bpx2Ub4Z.cjs"),Z=require("./usePrinter-DuYSC89K.cjs"),he=require("./DataTable-CiVu-yQZ.cjs"),ve=require("./vue-ui-accordion-ZppPKpGK.cjs"),me=require("./vue-ui-skeleton-yOWIPVsZ.cjs"),J=require("./useNestedProp-np0rM3ep.cjs"),pe=require("./PackageVersion-BqVp7cHC.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ye={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},be=["xmlns","viewBox"],we=["id"],Ce=["stop-color"],Ne=["stop-color"],xe=["d","fill","stroke","stroke-width"],_e=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],$e=["x","y","font-size","fill"],Be=["x","y","font-size","fill"],Ee={key:2,class:"vue-data-ui-watermark"},Se=["innerHTML"],Pe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(K,{expose:Q}){const h=K,{vue_ui_flow:ee}=r.useConfig(),x=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{T()});function T(){r.objectIsEmpty(h.dataset)&&r.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(r.createUid()),F=e.ref(null),L=e.ref(0),z=e.ref(0),y=e.ref(!1);function te(l){y.value=l,L.value+=1}const t=e.computed({get:()=>I(),set:l=>l});function I(){const l=J.useNestedProp({userConfig:h.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_flow[l.theme]||h.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>h.config,l=>{t.value=I(),T(),z.value+=1},{deep:!0});const{isPrinting:H,isImaging:O,generatePdf:V,generateImage:M}=Z.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),$=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),D=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),B=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(l=>[l[0],l[1],r.checkNaN(l[2])])),q=e.computed(()=>{const l={};function n(s){l[s]||(l[s]={inflow:0,outflow:0})}B.value.forEach(([s,a,c])=>{n(s),n(a),l[s].outflow+=c,l[a].inflow+=c});let o=0;for(const s in l){const a=Math.max(l[s].inflow,l[s].outflow);o=Math.max(o,a)}return o});function le(l){return l/q.value*100+t.value.style.chart.nodes.minHeight}function oe(l){const n=t.value.style.chart.nodes.minHeight;return(l-n)/100*q.value}function ne(l){const n={},o={};function s(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),o[i]||(o[i]=[]),o[i].includes(u)||o[i].push(u)}l.forEach(([u,i,f],k)=>{const p=n[u]?n[u].level:0,N=p+1;s(u,p),s(i,N),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:f}),n[u].outflow+=f,n[i].inflow+=f}),Object.keys(n).forEach((u,i)=>{n[u].color=$.value[i]||$.value[i%$.value.length]||r.palette[i]||r.palette[i%d.length]});for(const u in n)n[u].height=le(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in o){let i=0;o[u].forEach((f,k)=>{const p=n[f].height;a[f]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:p,i:k,color:n[f].color,value:oe(p)},i+=p+D.value})}const c=[];for(const u in n){let i=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:f,value:k},p)=>{const N=a[f].y,S=a[u],P=a[f],A=r.checkNaN(i),W=r.checkNaN(i+k/n[u].outflow*S.height),X=r.checkNaN(N),R=r.checkNaN(N+k/n[f].inflow*P.height),de={id:r.createUid(),source:u,target:f,path:`M ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${A} L ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${W} L ${r.checkNaN(P.x)} ${R} L ${r.checkNaN(P.x)} ${X} Z`,value:k,sourceColor:n[u].color,targetColor:n[f].color};c.push(de),i+=W-A,a[f].y+=R-X})}return{nodeCoordinates:a,links:c}}const v=e.computed(()=>{const l=ne(h.dataset);return{nodes:Object.keys(l.nodeCoordinates).map((n,o)=>({...l.nodeCoordinates[n],name:n})),links:l.links}}),ae=e.computed(()=>re(v.value.nodes));function re(l){const n={};for(const s in l){const{x:a,height:c}=l[s];n[a]||(n[a]=0),n[a]+=c+D.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:l,right:n,left:o,bottom:s}=t.value.style.chart.padding,a=B.value.length*Y.value;return{height:ae.value+l+s,width:n+Math.max(...v.value.nodes.map(c=>c.x))+g.value,left:o,top:l,right:a-n,p_top:l,p_bottom:s}});function se(l){const n={},o={},s=new Set;return B.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),o[c]||(o[c]=[]),n[a].push(c),o[c].push(a)}),n[l]&&n[l].forEach(a=>s.add(a)),o[l]&&o[l].forEach(a=>s.add(a)),Array.from(s).concat(l)}const m=e.ref(null),w=e.ref(null);function ue(l){m.value=se(l.name),w.value=l.name}function ie(){m.value=null,w.value=null}const G=e.computed(()=>v.value.links.map(({source:l,target:n,sourceColor:o,targetColor:s,value:a})=>({source:l,target:n,sourceColor:o,targetColor:s,value:a})));function U(){e.nextTick(()=>{const l=G.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(n);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const l=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=G.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},r.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:l,body:n,config:o}});function ce(){return v.value}function j(){b.value.showTable=!b.value.showTable}return Q({getData:ce,generateCsv:U,generateImage:M,generatePdf:V,toggleTable:j}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:F,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(fe._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(O),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,position:t.value.userOptions.position,onToggleFullscreen:te,onGeneratePdf:e.unref(V),onGenerateCsv:U,onGenerateImage:e.unref(M),onToggleTable:j},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(pe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,(o,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:o.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.sourceColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":o.targetColor},null,8,Ne)],8,we))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,o=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:o.path,fill:`url(#${o.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[o.target,o.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:o.x,y:e.unref(r.checkNaN)(o.absoluteY),height:e.unref(r.checkNaN)(o.height),width:g.value,fill:o.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ue(o),onMouseleave:n[0]||(n[0]=a=>ie()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(o.name)?1:.2:1}`)},null,44,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):o.name),13,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:o.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:o,seriesIndex:s})),13,Be))),256)),e.renderSlot(l.$slots,"svg",{svg:E.value},void 0,!0)],14,be)),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(ve.default,{key:4,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(he.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=o=>b.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Se)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ke))}},Te=ge._export_sfc(Pe,[["__scopeId","data-v-53bf76e7"]]);exports.default=Te;
@@ -1,12 +1,12 @@
1
1
  import { computed as m, onMounted as He, ref as y, watch as Oe, openBlock as r, createElementBlock as h, normalizeClass as ce, normalizeStyle as _, createBlock as E, createCommentVNode as T, unref as i, createSlots as Ee, withCtx as k, renderSlot as C, normalizeProps as de, guardReactiveProps as ve, createVNode as fe, createElementVNode as S, Fragment as P, renderList as F, toDisplayString as U, createTextVNode as Se, nextTick as Me } from "vue";
2
- import { u as ze, o as Ye, e as De, c as he, t as Ge, a as Be, p as V, b as Ae, v, f as me, X as Ue, F as ge, K as Ve, i as je, q as Xe, r as We } from "./index-BJNSbAx7.js";
3
- import { _ as qe } from "./Title-0tYDaWv7.js";
4
- import { u as Ke, U as Re } from "./usePrinter-CkV5eORP.js";
5
- import { D as Ze } from "./DataTable-BczvA492.js";
6
- import Je from "./vue-ui-accordion-DDf5Y2GY.js";
7
- import Qe from "./vue-ui-skeleton-CsU74BI7.js";
8
- import { u as pe } from "./useNestedProp-CLh4tPxT.js";
9
- import { _ as et } from "./PackageVersion-DN8qp-uI.js";
2
+ import { u as ze, o as Ye, e as De, c as he, t as Ge, a as Be, p as V, b as Ae, v, f as me, X as Ue, F as ge, K as Ve, i as je, q as Xe, r as We } from "./index-COTjlcVF.js";
3
+ import { _ as qe } from "./Title-CDfZWgra.js";
4
+ import { u as Ke, U as Re } from "./usePrinter-5XpNgqjh.js";
5
+ import { D as Ze } from "./DataTable-Dv3mZD4M.js";
6
+ import Je from "./vue-ui-accordion-CzKJYxd2.js";
7
+ import Qe from "./vue-ui-skeleton-CYgbDsKG.js";
8
+ import { u as pe } from "./useNestedProp-CcjyiBlC.js";
9
+ import { _ as et } from "./PackageVersion-DWAqn7t0.js";
10
10
  import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const lt = ["id"], ot = {
12
12
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NvxTr0fZ.cjs"),le=require("./Legend-DDmBZxt8.cjs"),oe=require("./Title-Cjusozo5.cjs"),ae=require("./Tooltip-CkqTs_wn.cjs"),re=require("./DataTable-DRJUrEXP.cjs"),W=require("./usePrinter-0s8wVGIy.cjs"),ne=require("./vue-ui-skeleton-DYHqPo98.cjs"),se=require("./vue-ui-accordion-CxPjShWo.cjs"),U=require("./useNestedProp-DhLxBAwX.cjs"),ue=require("./PackageVersion-rOhPenOY.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},ve=["xmlns","viewBox"],he=["id"],pe=["stdDeviation"],fe=["d","stroke","stroke-width"],ye=["d","stroke","stroke-width"],ge=["filter"],me=["d","stroke","stroke-width"],be=["d","stroke-width","onMouseenter","onClick"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},$e=["innerHTML"],Be={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),S=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:O,generateImage:z}=W.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),u=e.ref([]);function B(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),T("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<D.value.length;a+=1){const o=D.value[a];let n=o.value/d.value*K.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function Q(l){m.value=l,S.value+=1}const _=e.ref(null);function Z({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){_.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},w.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?x.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${s}</div>`)}const q=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:u.value.includes(l.id)}))),ee=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function G(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/d.value)?"-":h.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},te,isNaN(h.value.body[f]/d.value)?"-":r.dataLabel({v:h.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:O,generateCsv:G,generateImage:z,toggleTable:M,toggleTooltip:A}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(O),onGenerateCsv:G,onGenerateImage:e.unref(z),onToggleTable:M,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ue._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,pe)],8,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ye)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,me)],8,ge)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>Z({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{w.value=!1,c.value=null}),onClick:s=>T("selectDatapoint",o)},null,40,be)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>B(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(ae._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(se.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(re.DataTable,{key:`table_${L.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,$e)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ce))}},_e=ie._export_sfc(Be,[["__scopeId","data-v-20ef4a66"]]);exports.default=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DQRLTu78.cjs"),le=require("./Legend-ComtyeZF.cjs"),oe=require("./Title-Bpx2Ub4Z.cjs"),ae=require("./Tooltip-D-JR_3NK.cjs"),re=require("./DataTable-CiVu-yQZ.cjs"),W=require("./usePrinter-DuYSC89K.cjs"),ne=require("./vue-ui-skeleton-yOWIPVsZ.cjs"),se=require("./vue-ui-accordion-ZppPKpGK.cjs"),U=require("./useNestedProp-np0rM3ep.cjs"),ue=require("./PackageVersion-BqVp7cHC.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},ve=["xmlns","viewBox"],he=["id"],pe=["stdDeviation"],fe=["d","stroke","stroke-width"],ye=["d","stroke","stroke-width"],ge=["filter"],me=["d","stroke","stroke-width"],be=["d","stroke-width","onMouseenter","onClick"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},$e=["innerHTML"],Be={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),S=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:O,generateImage:z}=W.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),u=e.ref([]);function B(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),T("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<D.value.length;a+=1){const o=D.value[a];let n=o.value/d.value*K.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function Q(l){m.value=l,S.value+=1}const _=e.ref(null);function Z({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){_.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},w.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?x.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${s}</div>`)}const q=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:u.value.includes(l.id)}))),ee=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function G(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/d.value)?"-":h.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},te,isNaN(h.value.body[f]/d.value)?"-":r.dataLabel({v:h.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:O,generateCsv:G,generateImage:z,toggleTable:M,toggleTooltip:A}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(O),onGenerateCsv:G,onGenerateImage:e.unref(z),onToggleTable:M,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ue._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,pe)],8,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ye)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,me)],8,ge)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>Z({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{w.value=!1,c.value=null}),onClick:s=>T("selectDatapoint",o)},null,40,be)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>B(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(ae._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(se.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(re.DataTable,{key:`table_${L.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,$e)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ce))}},_e=ie._export_sfc(Be,[["__scopeId","data-v-20ef4a66"]]);exports.default=_e;
@@ -1,14 +1,14 @@
1
1
  import { computed as v, onMounted as _e, ref as u, watch as Te, openBlock as s, createElementBlock as n, normalizeClass as L, normalizeStyle as W, createBlock as x, createCommentVNode as d, unref as h, createSlots as Pe, withCtx as i, renderSlot as y, normalizeProps as I, guardReactiveProps as F, createVNode as oe, createElementVNode as $, Fragment as se, renderList as re, createTextVNode as ue, toDisplayString as O, nextTick as Se } from "vue";
2
- import { u as Ne, o as Le, e as ne, g as Ie, c as ie, t as Fe, a as Oe, p as E, b as Ee, d as De, I as ce, L as Ve, f as k, X as Be, i as ve, x as de, y as Ge, q as Me, r as ze } from "./index-BJNSbAx7.js";
3
- import { L as We } from "./Legend-DnOc-JGW.js";
4
- import { _ as Ae } from "./Title-0tYDaWv7.js";
5
- import { _ as He } from "./Tooltip-DdWGiVyf.js";
6
- import { D as Ue } from "./DataTable-BczvA492.js";
7
- import { u as Xe, U as Re } from "./usePrinter-CkV5eORP.js";
8
- import Ye from "./vue-ui-skeleton-CsU74BI7.js";
9
- import je from "./vue-ui-accordion-DDf5Y2GY.js";
10
- import { u as he } from "./useNestedProp-CLh4tPxT.js";
11
- import { _ as qe } from "./PackageVersion-DN8qp-uI.js";
2
+ import { u as Ne, o as Le, e as ne, g as Ie, c as ie, t as Fe, a as Oe, p as E, b as Ee, d as De, I as ce, L as Ve, f as k, X as Be, i as ve, x as de, y as Ge, q as Me, r as ze } from "./index-COTjlcVF.js";
3
+ import { L as We } from "./Legend-iUlykl4S.js";
4
+ import { _ as Ae } from "./Title-CDfZWgra.js";
5
+ import { _ as He } from "./Tooltip-0-aPeOmA.js";
6
+ import { D as Ue } from "./DataTable-Dv3mZD4M.js";
7
+ import { u as Xe, U as Re } from "./usePrinter-5XpNgqjh.js";
8
+ import Ye from "./vue-ui-skeleton-CYgbDsKG.js";
9
+ import je from "./vue-ui-accordion-CzKJYxd2.js";
10
+ import { u as he } from "./useNestedProp-CcjyiBlC.js";
11
+ import { _ as qe } from "./PackageVersion-DWAqn7t0.js";
12
12
  import { _ as Je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const Ke = ["id"], Qe = {
14
14
  key: 0,
@@ -1,11 +1,11 @@
1
1
  import { computed as g, ref as h, watch as K, onMounted as ke, onBeforeUnmount as be, openBlock as o, createElementBlock as i, normalizeClass as Q, normalizeStyle as ee, createBlock as G, withCtx as I, toDisplayString as S, createCommentVNode as p, unref as c, createSlots as _e, renderSlot as x, normalizeProps as te, guardReactiveProps as ae, createVNode as xe, createElementVNode as f, Fragment as R, renderList as E } from "vue";
2
- import { u as we, c as Fe, t as Se, a as ze, p as le, b as Ce, o as se, d as $e, e as O, g as re, m as oe, X as Me, s as A, H as X, i as Pe, f as Ie, E as ue } from "./index-BJNSbAx7.js";
2
+ import { u as we, c as Fe, t as Se, a as ze, p as le, b as Ce, o as se, d as $e, e as O, g as re, m as oe, X as Me, s as A, H as X, i as Pe, f as Ie, E as ue } from "./index-COTjlcVF.js";
3
3
  import { t as Oe, u as Xe } from "./useResponsive-NZB-WLRF.js";
4
- import { u as Ne, U as Ye } from "./usePrinter-CkV5eORP.js";
5
- import Ge from "./vue-ui-skeleton-CsU74BI7.js";
6
- import { _ as Re } from "./Title-0tYDaWv7.js";
7
- import { u as ne } from "./useNestedProp-CLh4tPxT.js";
8
- import { _ as Ee } from "./PackageVersion-DN8qp-uI.js";
4
+ import { u as Ne, U as Ye } from "./usePrinter-5XpNgqjh.js";
5
+ import Ge from "./vue-ui-skeleton-CYgbDsKG.js";
6
+ import { _ as Re } from "./Title-CDfZWgra.js";
7
+ import { u as ne } from "./useNestedProp-CcjyiBlC.js";
8
+ import { _ as Ee } from "./PackageVersion-DWAqn7t0.js";
9
9
  import { _ as Ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const je = ["id"], De = { key: 0 }, Ue = ["xmlns", "viewBox"], Be = ["id"], Le = ["stop-color"], We = ["stop-color"], Te = ["stop-color"], Ve = ["id"], qe = ["stdDeviation"], He = ["d", "fill", "stroke"], Ze = ["d", "filter"], Je = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Ke = ["x", "y", "font-size", "font-weight", "fill"], Qe = { key: 1 }, et = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], tt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], at = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], lt = { key: 2 }, st = ["d", "fill", "stroke", "stroke-width"], rt = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], ot = ["x", "y", "font-size", "fill"], ut = {
11
11
  key: 3,