vue-data-ui 2.4.77 → 2.4.78

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 (151) hide show
  1. package/dist/{Arrow-f_Kuk8SY.js → Arrow-C7AmfY-d.js} +1 -1
  2. package/dist/{Arrow-CfSMP_pf.cjs → Arrow-DbrjRMa6.cjs} +1 -1
  3. package/dist/{BaseIcon-BnnMILPX.cjs → BaseIcon-CIjjPDqj.cjs} +1 -1
  4. package/dist/{BaseIcon-QuseiwxO.js → BaseIcon-Dzpk4O8L.js} +1 -1
  5. package/dist/{DataTable--ofk92Yb.js → DataTable-DtRXoetj.js} +2 -2
  6. package/dist/{DataTable-D0qYxBVZ.cjs → DataTable-wN-jvOfe.cjs} +1 -1
  7. package/dist/{Legend-DV4QFlV9.cjs → Legend-DqGE1lkA.cjs} +1 -1
  8. package/dist/{Legend-BhrGSZRp.js → Legend-RnRqBxiV.js} +2 -2
  9. package/dist/{PackageVersion-BqwuIW-T.js → PackageVersion-CgJdp_Ki.js} +1 -1
  10. package/dist/{PackageVersion-sBYhtscP.cjs → PackageVersion-Dn-t7tbm.cjs} +1 -1
  11. package/dist/{PenAndPaper-LsFeEPDj.js → PenAndPaper-BTLEk55u.js} +3 -3
  12. package/dist/{PenAndPaper-CHz_Iy5T.cjs → PenAndPaper-DFXJJink.cjs} +1 -1
  13. package/dist/{Shape-Dorp4kyF.js → Shape-B1fqUhjt.js} +1 -1
  14. package/dist/{Shape-BO7Gprqr.cjs → Shape-D7IbPjU8.cjs} +1 -1
  15. package/dist/{Slicer-BDdf60jQ.cjs → Slicer-8bCK41mN.cjs} +1 -1
  16. package/dist/{Slicer-CD8VkksI.js → Slicer-GQf9ZyPj.js} +2 -2
  17. package/dist/{Title-BzcIyo-x.cjs → Title-D-6pIV0l.cjs} +1 -1
  18. package/dist/{Title-2MaMBji9.js → Title-XYNHfYwN.js} +1 -1
  19. package/dist/{Tooltip-DWo9kakv.cjs → Tooltip-CNox4F8U.cjs} +1 -1
  20. package/dist/{Tooltip-C_eI7NfC.js → Tooltip-DYRo59nq.js} +1 -1
  21. package/dist/{index-DMvK32iW.js → index-B8Eaq54E.js} +1 -1
  22. package/dist/{index-CbMyzHGj.cjs → index-KJL8ra_6.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-DqPx8kFh.cjs → useNestedProp-Bu958azG.cjs} +1 -1
  25. package/dist/{useNestedProp-3oLbIjGJ.js → useNestedProp-Ka0R_Yqa.js} +1 -1
  26. package/dist/{usePrinter-7L_B-x1F.js → usePrinter-D83W2gfG.js} +1 -1
  27. package/dist/{usePrinter-BzVsUZ9_.cjs → usePrinter-pDOF3CfL.cjs} +1 -1
  28. package/dist/{vue-data-ui-Cp4r0fLf.js → vue-data-ui-DgmXnSUU.js} +60 -60
  29. package/dist/{vue-data-ui-CFnKc2Ol.cjs → vue-data-ui-Ot5xYhbV.cjs} +1 -1
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-DTrJuAnz.cjs → vue-ui-3d-bar-CB0XzatQ.cjs} +1 -1
  33. package/dist/{vue-ui-3d-bar-Cf1Q84nf.js → vue-ui-3d-bar-CqiW8qFZ.js} +9 -9
  34. package/dist/{vue-ui-accordion-D9SRsoRT.js → vue-ui-accordion--5td7b94.js} +3 -3
  35. package/dist/{vue-ui-accordion-Uftgxo97.cjs → vue-ui-accordion-4-dyMgJA.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-BpfajTvk.js → vue-ui-age-pyramid-Bsg0z9ei.js} +10 -10
  37. package/dist/{vue-ui-age-pyramid-CFWWFo_T.cjs → vue-ui-age-pyramid-DNseB8ej.cjs} +1 -1
  38. package/dist/{vue-ui-annotator-CI9JxLDD.cjs → vue-ui-annotator-CHjtF8NT.cjs} +1 -1
  39. package/dist/{vue-ui-annotator-BGErHIWg.js → vue-ui-annotator-obnYFvvq.js} +1 -1
  40. package/dist/{vue-ui-bullet-CCcAE1gt.cjs → vue-ui-bullet-CNWHd7dO.cjs} +1 -1
  41. package/dist/{vue-ui-bullet-CerH0yY6.js → vue-ui-bullet-yKEVhE17.js} +8 -8
  42. package/dist/{vue-ui-candlestick-DaXMRecz.js → vue-ui-candlestick-Cc-Ee4zv.js} +11 -11
  43. package/dist/{vue-ui-candlestick-B0AfUFwT.cjs → vue-ui-candlestick-VBq82rfW.cjs} +1 -1
  44. package/dist/{vue-ui-carousel-table-Ct8iLKVC.js → vue-ui-carousel-table-B6v1NycN.js} +4 -4
  45. package/dist/{vue-ui-carousel-table-DU1f-7PI.cjs → vue-ui-carousel-table-DLwVijSb.cjs} +1 -1
  46. package/dist/{vue-ui-chestnut-BimMImm7.js → vue-ui-chestnut-CekC1moT.js} +8 -8
  47. package/dist/{vue-ui-chestnut-Bo6vX7Xa.cjs → vue-ui-chestnut-DHZbhIf_.cjs} +1 -1
  48. package/dist/{vue-ui-cursor-O8Y4gIKa.cjs → vue-ui-cursor-Bz-jVx3a.cjs} +1 -1
  49. package/dist/{vue-ui-cursor-BqjV3i9U.js → vue-ui-cursor-CISKzkNu.js} +2 -2
  50. package/dist/{vue-ui-dashboard-DNJUgWJ3.cjs → vue-ui-dashboard-PAi8o4AC.cjs} +1 -1
  51. package/dist/{vue-ui-dashboard-BGBnagEV.js → vue-ui-dashboard-w7Ts26Xc.js} +2 -2
  52. package/dist/{vue-ui-digits-D3pzhtVy.cjs → vue-ui-digits-I_lj1m6d.cjs} +1 -1
  53. package/dist/{vue-ui-digits-DUXLRlXF.js → vue-ui-digits-kaBR5FUU.js} +2 -2
  54. package/dist/{vue-ui-donut-eljChQvj.js → vue-ui-donut-BVuaExCl.js} +12 -12
  55. package/dist/{vue-ui-donut-DKME6kEY.cjs → vue-ui-donut-dDpMdK4G.cjs} +1 -1
  56. package/dist/{vue-ui-donut-evolution-DGaEBhHF.cjs → vue-ui-donut-evolution-ChGao_WW.cjs} +1 -1
  57. package/dist/{vue-ui-donut-evolution-HbunKbYi.js → vue-ui-donut-evolution-DAmX1OX-.js} +11 -11
  58. package/dist/{vue-ui-dumbbell-C7Zv4NgK.js → vue-ui-dumbbell-CrQNRN_m.js} +10 -10
  59. package/dist/{vue-ui-dumbbell-CGw-Zwk-.cjs → vue-ui-dumbbell-DsR4RQY9.cjs} +1 -1
  60. package/dist/{vue-ui-flow-DcRyVL45.js → vue-ui-flow-B0lCe4G8.js} +9 -9
  61. package/dist/{vue-ui-flow-DbWddpZi.cjs → vue-ui-flow-Dhcvvzee.cjs} +1 -1
  62. package/dist/{vue-ui-funnel-ByUFSg1s.cjs → vue-ui-funnel-Bu_wMJ98.cjs} +1 -1
  63. package/dist/{vue-ui-funnel-D3G2G4P3.js → vue-ui-funnel-Cinv1hUx.js} +9 -9
  64. package/dist/{vue-ui-galaxy-CXssUv3X.js → vue-ui-galaxy-BcwunIK3.js} +11 -11
  65. package/dist/{vue-ui-galaxy-ad_Bh1lr.cjs → vue-ui-galaxy-zx6O9AuV.cjs} +1 -1
  66. package/dist/{vue-ui-gauge-DEROTsyc.js → vue-ui-gauge-C4W4OAXQ.js} +7 -7
  67. package/dist/{vue-ui-gauge-Bss6mlN7.cjs → vue-ui-gauge-Cb6sxoZI.cjs} +1 -1
  68. package/dist/{vue-ui-gizmo--6Xw6Dh6.js → vue-ui-gizmo-D4VHyFmN.js} +3 -3
  69. package/dist/{vue-ui-gizmo-D4CEw0HZ.cjs → vue-ui-gizmo-DBSYx24z.cjs} +1 -1
  70. package/dist/{vue-ui-heatmap-q8JmNnG2.js → vue-ui-heatmap-C3WHfifV.js} +10 -10
  71. package/dist/{vue-ui-heatmap-DwCve3RN.cjs → vue-ui-heatmap-CBNt4Huo.cjs} +1 -1
  72. package/dist/{vue-ui-history-plot-DaZNgu_Z.cjs → vue-ui-history-plot-Dp8Llb3A.cjs} +1 -1
  73. package/dist/{vue-ui-history-plot-DnT-Ao3t.js → vue-ui-history-plot-dJp-Lai2.js} +11 -11
  74. package/dist/{vue-ui-kpi-IXgBP9oJ.js → vue-ui-kpi-B3XhowYx.js} +3 -3
  75. package/dist/{vue-ui-kpi-Dn49_E2W.cjs → vue-ui-kpi-Dnp8IUyb.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-CiVFd_Pp.cjs → vue-ui-mini-loader-BgwhuEda.cjs} +1 -1
  77. package/dist/{vue-ui-mini-loader-Cm88qObv.js → vue-ui-mini-loader-Cca7PA4v.js} +2 -2
  78. package/dist/{vue-ui-molecule-Cu92ujex.cjs → vue-ui-molecule-B1AocG3H.cjs} +1 -1
  79. package/dist/{vue-ui-molecule-C27vhrLA.js → vue-ui-molecule-BcZNqWfD.js} +11 -11
  80. package/dist/{vue-ui-mood-radar-DvkK8J8b.cjs → vue-ui-mood-radar-Cn65TQEs.cjs} +1 -1
  81. package/dist/{vue-ui-mood-radar-DIJ9q9Cc.js → vue-ui-mood-radar-HjLL0ZZ8.js} +11 -11
  82. package/dist/{vue-ui-nested-donuts-CcqhlN0R.js → vue-ui-nested-donuts-BIqySYG_.js} +11 -11
  83. package/dist/{vue-ui-nested-donuts-DMaF0m31.cjs → vue-ui-nested-donuts-CymFt4B3.cjs} +1 -1
  84. package/dist/{vue-ui-onion-D20_PGGT.cjs → vue-ui-onion-BLMFR0GK.cjs} +1 -1
  85. package/dist/{vue-ui-onion-DQOu8srN.js → vue-ui-onion-muCAMEG8.js} +11 -11
  86. package/dist/{vue-ui-parallel-coordinate-plot-DEtBAZkv.js → vue-ui-parallel-coordinate-plot-DYOlnKPw.js} +12 -12
  87. package/dist/{vue-ui-parallel-coordinate-plot-CDDv5TXW.cjs → vue-ui-parallel-coordinate-plot-i-hhfnwF.cjs} +1 -1
  88. package/dist/{vue-ui-quadrant-CVKT0Mil.cjs → vue-ui-quadrant-DJPOp1-A.cjs} +1 -1
  89. package/dist/{vue-ui-quadrant-9nixb7y0.js → vue-ui-quadrant-TU5fWoEw.js} +12 -12
  90. package/dist/{vue-ui-quick-chart-DOqmZQuC.cjs → vue-ui-quick-chart-CTJxOisL.cjs} +1 -1
  91. package/dist/{vue-ui-quick-chart-BBWe0rII.js → vue-ui-quick-chart-DzuUofFN.js} +9 -9
  92. package/dist/{vue-ui-radar-C_HKZN_s.js → vue-ui-radar-C0WA20R8.js} +12 -12
  93. package/dist/{vue-ui-radar-crw-BUWI.cjs → vue-ui-radar-D4xX7TNQ.cjs} +1 -1
  94. package/dist/{vue-ui-rating-D9C-jHN_.cjs → vue-ui-rating-C2JILb2g.cjs} +1 -1
  95. package/dist/{vue-ui-rating-Bb5D2NLX.js → vue-ui-rating-DUcyhyrN.js} +2 -2
  96. package/dist/{vue-ui-relation-circle-D94QdFpd.js → vue-ui-relation-circle-BYlIjbUK.js} +7 -7
  97. package/dist/{vue-ui-relation-circle-BeinsphZ.cjs → vue-ui-relation-circle-D-Wxskec.cjs} +1 -1
  98. package/dist/{vue-ui-rings-8X_K59uf.cjs → vue-ui-rings-CsXVOIn3.cjs} +1 -1
  99. package/dist/{vue-ui-rings-B9WghU7W.js → vue-ui-rings-w4KQSfym.js} +12 -12
  100. package/dist/{vue-ui-scatter-BcGcpFFg.cjs → vue-ui-scatter--5Ob2lKM.cjs} +1 -1
  101. package/dist/{vue-ui-scatter-DOOY2ZmO.js → vue-ui-scatter-CfgCA3Di.js} +12 -12
  102. package/dist/{vue-ui-screenshot--dGw9WTO.js → vue-ui-screenshot-BsD3ySuA.js} +1 -1
  103. package/dist/{vue-ui-screenshot-kqXcFrbS.cjs → vue-ui-screenshot-UEVUHXWY.cjs} +1 -1
  104. package/dist/{vue-ui-skeleton-Dm5NZ_MQ.cjs → vue-ui-skeleton-D_YCUi1y.cjs} +1 -1
  105. package/dist/{vue-ui-skeleton-Bzsl5gab.js → vue-ui-skeleton-DpadzgbS.js} +3 -3
  106. package/dist/{vue-ui-smiley-CHDBpGz6.js → vue-ui-smiley-BHqeb-Ol.js} +2 -2
  107. package/dist/{vue-ui-smiley-CzUbbfNC.cjs → vue-ui-smiley-C32dLhtP.cjs} +1 -1
  108. package/dist/{vue-ui-spark-trend-CBuzPxBw.cjs → vue-ui-spark-trend-Bt2wpc5C.cjs} +1 -1
  109. package/dist/{vue-ui-spark-trend-DDmtsL-M.js → vue-ui-spark-trend-NAcB2zZ1.js} +5 -5
  110. package/dist/{vue-ui-sparkbar-clHgL-Jf.js → vue-ui-sparkbar-BPpSxe5Z.js} +4 -4
  111. package/dist/{vue-ui-sparkbar-BOWdoskI.cjs → vue-ui-sparkbar-CgoGRT0_.cjs} +1 -1
  112. package/dist/{vue-ui-sparkgauge-ClpG_Qy_.js → vue-ui-sparkgauge-C1mW3KbZ.js} +4 -4
  113. package/dist/{vue-ui-sparkgauge-BCpab_To.cjs → vue-ui-sparkgauge-frN6uK_L.cjs} +1 -1
  114. package/dist/{vue-ui-sparkhistogram-_-2qzDRQ.cjs → vue-ui-sparkhistogram-CqQY434G.cjs} +1 -1
  115. package/dist/{vue-ui-sparkhistogram-DtcZvaVe.js → vue-ui-sparkhistogram-HgBi5OvP.js} +5 -5
  116. package/dist/{vue-ui-sparkline-Hw74DjL2.js → vue-ui-sparkline-BABBXY2c.js} +4 -4
  117. package/dist/{vue-ui-sparkline-BiPWJRwq.cjs → vue-ui-sparkline-XOa6LfX2.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-C65Dz1NY.cjs → vue-ui-sparkstackbar-B4Xduiv1.cjs} +1 -1
  119. package/dist/{vue-ui-sparkstackbar-BvdFMu7C.js → vue-ui-sparkstackbar-Ch3JvFBq.js} +5 -5
  120. package/dist/{vue-ui-stackbar-CUbWqpvI.cjs → vue-ui-stackbar-CH8tLDZq.cjs} +1 -1
  121. package/dist/{vue-ui-stackbar-DHihhNbH.js → vue-ui-stackbar-JIEn0g7t.js} +13 -13
  122. package/dist/{vue-ui-strip-plot-CuoQTnRG.cjs → vue-ui-strip-plot-BkWzm1mI.cjs} +1 -1
  123. package/dist/{vue-ui-strip-plot-BeRtOGC8.js → vue-ui-strip-plot-RZu43QbP.js} +11 -11
  124. package/dist/{vue-ui-table-00JpIXEn.js → vue-ui-table-CJ2gGmYi.js} +1 -1
  125. package/dist/{vue-ui-table-C6jU1DC3.cjs → vue-ui-table-CgtE4HWs.cjs} +1 -1
  126. package/dist/{vue-ui-table-heatmap-iRdyUnBz.js → vue-ui-table-heatmap-B_TfeHsa.js} +4 -4
  127. package/dist/{vue-ui-table-heatmap-BKwt85XQ.cjs → vue-ui-table-heatmap-DxTs_PZF.cjs} +1 -1
  128. package/dist/{vue-ui-table-sparkline-B4S_DJRU.js → vue-ui-table-sparkline-DqMH7xbY.js} +5 -5
  129. package/dist/{vue-ui-table-sparkline-Z-VfjBcc.cjs → vue-ui-table-sparkline-PA9L6AjE.cjs} +1 -1
  130. package/dist/{vue-ui-thermometer-MNfpy-bk.cjs → vue-ui-thermometer-AwZdEG3j.cjs} +1 -1
  131. package/dist/{vue-ui-thermometer-BVETzQ_9.js → vue-ui-thermometer-D7aR0elr.js} +7 -7
  132. package/dist/{vue-ui-timer-DzzNUzOv.cjs → vue-ui-timer-C6fnDeD8.cjs} +1 -1
  133. package/dist/{vue-ui-timer-Dafx7lL2.js → vue-ui-timer-C9sO9AoQ.js} +5 -5
  134. package/dist/{vue-ui-tiremarks-VmJ74REn.cjs → vue-ui-tiremarks-Dje0I1vf.cjs} +1 -1
  135. package/dist/{vue-ui-tiremarks-DvIZxZFn.js → vue-ui-tiremarks-KvOyYNVW.js} +7 -7
  136. package/dist/{vue-ui-treemap-Bqurrxbn.js → vue-ui-treemap-BPxLXNZ5.js} +11 -11
  137. package/dist/{vue-ui-treemap-jtIS1DF3.cjs → vue-ui-treemap-C2Vrj3tg.cjs} +1 -1
  138. package/dist/{vue-ui-vertical-bar-CAQNpuVV.js → vue-ui-vertical-bar-BAdSzbYU.js} +12 -12
  139. package/dist/{vue-ui-vertical-bar-B7gHw4NU.cjs → vue-ui-vertical-bar-_MWpPkwZ.cjs} +1 -1
  140. package/dist/{vue-ui-waffle-BW2oPwaN.js → vue-ui-waffle-CW1UVf-q.js} +12 -12
  141. package/dist/{vue-ui-waffle-Bx-yIwH9.cjs → vue-ui-waffle-DfJI5Lez.cjs} +1 -1
  142. package/dist/{vue-ui-wheel-DdBcwGLj.cjs → vue-ui-wheel-CzZEsjmd.cjs} +1 -1
  143. package/dist/{vue-ui-wheel-LE-u6_KV.js → vue-ui-wheel-DAwYc7XY.js} +7 -7
  144. package/dist/{vue-ui-word-cloud-C1X5oYBt.cjs → vue-ui-word-cloud-BEyV6jMo.cjs} +1 -1
  145. package/dist/{vue-ui-word-cloud-CjCNiXGN.js → vue-ui-word-cloud-BzfYkI08.js} +10 -10
  146. package/dist/vue-ui-xy-BolkwiXB.cjs +3 -0
  147. package/dist/{vue-ui-xy-jjjT4XDo.js → vue-ui-xy-CJYGMbMt.js} +610 -609
  148. package/dist/{vue-ui-xy-canvas-CBx1LM4e.cjs → vue-ui-xy-canvas-DkltjVWN.cjs} +1 -1
  149. package/dist/{vue-ui-xy-canvas-BgWkLI4n.js → vue-ui-xy-canvas-sB1dmJQc.js} +11 -11
  150. package/package.json +1 -1
  151. package/dist/vue-ui-xy-Dr_MT-o-.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CbMyzHGj.cjs"),ze=require("./Title-BzcIyo-x.cjs"),me=require("./usePrinter-BzVsUZ9_.cjs"),Ve=require("./DataTable-D0qYxBVZ.cjs"),Ae=require("./Legend-DV4QFlV9.cjs"),$e=require("./vue-ui-skeleton-Dm5NZ_MQ.cjs"),De=require("./Slicer-BDdf60jQ.cjs"),Fe=require("./vue-ui-accordion-Uftgxo97.cjs"),fe=require("./useNestedProp-DqPx8kFh.cjs"),Pe=require("./PackageVersion-sBYhtscP.cjs"),Ie=require("./PenAndPaper-CHz_Iy5T.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Me=["xmlns","viewBox"],Re=["x","y","width","height"],Ue=["id"],qe=["stop-color"],We=["stop-color"],Xe=["id"],Ge=["stop-color"],je=["stop-color"],Ye=["stop-color"],Ke={key:1},Je=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:0},et=["x1","x2","y1","y2","stroke","stroke-width"],tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["x","y","font-size","fill","font-weight"],at=["text-anchor","font-size","fill","transform"],ot=["x1","y1","x2","y2","stroke","stroke-width"],nt={key:1},ut=["cx","cy","r","fill"],rt={key:0},st={key:0},ct=["d","stroke"],it=["text-anchor","x","y","fill"],dt=["cx","cy","r","fill"],vt={key:0},ht=["cx","cy","fill"],yt={key:1},mt=["d","fill","stroke"],ft={key:2},gt=["d","fill","stroke"],pt=["x","y","font-size","fill"],kt=["x","y","width","fill","onClick"],bt=["x","y","width","height","onMouseenter","onClick"],xt={key:4,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},Bt=["x","y","width","height","fill"],Ct=["x1","y1","x2","y2","stroke"],_t=["x1","y2","x2","y1","stroke"],Et=["onKeypress","cx","cy","r"],Nt=["d","stroke"],wt=["cx","cy","r","fill"],St=["d","fill","stroke"],Lt={class:"vue-ui-donut-evolution-focus"},zt=["text-anchor","x","y","fill"],Vt=["cx","cy","r","fill"],At=["cx","cy","r","fill"],$t=["x","y","fill"],Dt=["x","y","font-size","fill"],Ft={key:5,class:"vue-data-ui-watermark"},Pt=["onClick"],It={key:0},Ot={key:1},Tt={key:9,ref:"source",dir:"auto"},Ht={key:0},Mt={key:1},Rt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ge,{expose:pe,emit:W}){const y=ge,{vue_ui_donut_evolution:ke}=r.useConfig(),A=e.computed(()=>!!y.dataset&&y.dataset.length),i=e.ref({start:0,end:Math.max(...y.dataset.map(a=>a.values.length))});function X(){G()}const N=e.ref(null);async function G(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&N.value?(t.value.style.chart.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setEndValue(be(t.value.style.chart.zoom.endIndex+1)))):(i.value={start:0,end:E.value},K.value+=1)}function be(a){const o=E.value;return a>o?o:a<0||t.value.style.chart.zoom.startIndex!==null&&a<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:a}e.onMounted(()=>{j()});function j(){r.objectIsEmpty(y.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):y.dataset.length&&y.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:o})})}),G()}const _=e.ref(r.createUid()),m=e.ref([]),h=e.ref(null),P=e.ref(null),k=e.ref(!1),b=e.ref(null),I=e.ref(null),xe=e.ref(null),Y=e.ref(0),K=e.ref(0),J=e.ref(0),Q=e.ref(0),Z=e.ref(0),t=e.computed({get:()=>le(),set:a=>a}),{userOptionsVisible:O,setUserOptionsVisibility:ee,keepUserOptionState:te}=Oe.useUserOptionState({config:t.value});function le(){const a=fe.useNestedProp({userConfig:y.config,defaultConfig:ke});let o={};return a.theme?o={...fe.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||y.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:o=a,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=y.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=y.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}e.watch(()=>y.config,a=>{t.value=le(),O.value=!t.value.showOnChartHover,j(),J.value+=1,Q.value+=1,Z.value+=1},{deep:!0}),e.watch(()=>y.dataset,a=>{X()},{deep:!0});const{isPrinting:ae,isImaging:oe,generatePdf:ne,generateImage:ue}=me.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ce=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})),s=e.computed(()=>{const a=t.value.style.chart.layout.height,o=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,c=o-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:o,centerX:u.value.left+c/2,centerY:u.value.top+l/2,height:l,width:c}}),C=e.computed(()=>(y.dataset.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:o}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:o})}),y.dataset.map((a,o)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||Ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),z=e.computed(()=>C.value.filter(a=>!m.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((o,l)=>l>=i.value.start&&l<=i.value.end)}))),E=e.computed(()=>Math.max(...z.value.map(a=>a.length))),g=e.computed(()=>s.value.width/(i.value.end-i.value.start)),f=e.computed(()=>{const a=[];for(let n=0;n<i.value.end-i.value.start;n+=1){const v=z.value.map(B=>B.values[n]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,p)=>B+p,0),q=v.map(B=>B/x),L=u.value.left+g.value*n+g.value/2;a.push({index:n,percentages:q,subtotal:d||x<0?null:x,values:v,x:L})}const o=0,l=Math.max(...a.map(n=>n.subtotal)),c=a.length===1?l*2:l;return a.map((n,v)=>{const d=g.value/2*.7,x=d>s.value.width/16?s.value.width/16:d,q=h.value===n.index?s.value.width/16:x,L=a.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,B=s.value.absoluteHeight-u.value.bottom-s.value.height*n.subtotal/r.calculateNiceScale(o,c,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...n,y:B,radius:x,activeRadius:q,hoverRadius:L,donut:r.makeDonut({series:z.value.map((p,ye)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:z.value.map((p,ye)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,L,L,1.99999,2,1,360,105.25,L/2),donutFocus:r.makeDonut({series:z.value.map((p,ye)=>({color:p.color,name:p.name,value:p.values[v]??0}))},s.value.centerX,s.value.centerY,s.value.height/3.6,s.value.height/3.6,1.99999,2,1,360,105.25,s.value.height/6)}})});function D(a,o,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:o,index:l})}const T=e.computed(()=>({max:Math.max(...f.value.map(a=>a.subtotal)),min:0})),w=e.computed(()=>{const a=f.value.length===1?T.value.max*2:T.value.max;return r.calculateNiceScale(T.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function _e(a){return a/w.value.max}const Ee=e.computed(()=>w.value.ticks.map(a=>({y:s.value.absoluteHeight-u.value.bottom-s.value.height*_e(a),value:a})));function re(a,o){return isNaN(a.value/r.sumByAttribute(o,"value"))?0:(a.value/r.sumByAttribute(o,"value")*100).toFixed(0)+"%"}function se(){k.value||(h.value=null,P.value=null)}function Ne(a){k.value||(h.value=a.index,P.value=a)}const H=e.ref(null);function M(a,o){a.subtotal&&(P.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(o)||(H.value=o))}function ce(){b.value=null,k.value=!1,H.value=null}const ie=e.computed(()=>C.value.map((a,o)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,c)=>l+c,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,o)=>o.value-a.value).map(a=>({...a,opacity:m.value.includes(a.uid)?.5:1,segregate:()=>R(a.uid),isSegregated:m.value.includes(a.uid)}))),de=e.computed(()=>f.value.map(a=>a.subtotal).reduce((a,o)=>a+o,0)),we=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 R(a){if(m.value.includes(a))m.value=m.value.filter(o=>o!==a),W("selectLegend",null);else{if(m.value.length===C.value.length-1)return;m.value.push(a),W("selectLegend",C.value.find(o=>o.uid===a))}b.value&&M(f.value.find((o,l)=>l===H.value))}const S=e.computed(()=>{const a=[""].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>({name:n.name,color:n.color}))).concat(["Σ"]);let o=[];for(let n=0;n<E.value;n+=1){const v=C.value.filter(d=>!m.value.includes(d.uid)).map(d=>d.values[n]??0).reduce((d,x)=>d+x,0);o.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[n]??"-"].concat(C.value.filter(d=>!m.value.includes(d.uid)).map(d=>({value:d.values[n]??0,percentage:d.values[n]?d.values[n]/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},c=[t.value.table.columnNames.period].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:a,body:o,config:l,colNames:c}});function Se(){return C.value}function ve(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=[...S.value.head.map(v=>v.name??v)],l=[...S.value.body.map(v=>v.map(d=>d.value??d))],c=a.concat([o]).concat(l),n=r.createCsvContent(c);r.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function Le(a){V.value=a,Y.value+=1}function he(){$.value.showTable=!$.value.showTable}const F=e.ref(!1);function U(){F.value=!F.value}return pe({getData:Se,generatePdf:ne,generateCsv:ve,generateImage:ue,toggleTable:he,toggleAnnotator:U}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:I,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;background:${t.value.style.chart.backgroundColor}`),id:_.value,onMouseenter:o[4]||(o[4]=()=>e.unref(ee)(!0)),onMouseleave:o[5]||(o[5]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:I.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:xe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:se},[(e.openBlock(),e.createBlock(ze._sfc_main,{key:`title_${J.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&&A.value&&(e.unref(te)||e.unref(O))?(e.openBlock(),e.createBlock(me.UserOptions,{ref:"details",key:`user_options_${Y.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(oe),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:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Le,onGeneratePdf:e.unref(ne),onGenerateCsv:ve,onGenerateImage:e.unref(ue),onToggleTable:he,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(O)?"visible":"hidden":"visible"})},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:c})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:c})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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 ${s.value.absoluteWidth} ${s.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Pe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:u.value.left,y:u.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),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,qe),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,We)],8,Ue),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,Ge),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ye)],8,Xe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+s.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Je),e.createElementVNode("line",{x1:u.value.left,x2:s.value.absoluteWidth-u.value.right,y1:s.value.absoluteHeight-u.value.bottom,y2:s.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,Qe),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,c)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(c+1)*g.value,x2:u.value.left+(c+1)*g.value,y1:u.value.top,y2:s.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,et))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=w.value.min&&l.value<=w.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,tt)):e.createCommentVNode("",!0),l.value>=w.value.min&&l.value<=w.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:c}):""),9,lt)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:3,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,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(c===0||c===E.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+g.value*c+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+s.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(c)+Number(i.value.start)]??""),9,at)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&c<f.value.length-1&&![l.subtotal,f.value[c+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:f.value[c+1].x,y2:f.value[c+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,ot)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",nt,[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,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":c!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",rt,[h.value!==null&&h.value===c?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,n=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(n,{x:n.center.endX,y:n.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:n.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ct)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(n),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(n.name)+": "+e.toDisplayString(re(n,l.donut))+" ("+e.toDisplayString(n.value===null?"-":D(n.value,n,v))+") ",9,it)]))),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,dt)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":c!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",vt,[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,ht)):h.value!==null&&h.value===c?(e.openBlock(),e.createElementBlock("g",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,mt))),256))])):(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,gt))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":c!==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(D(l.subtotal,l,c)),9,pt)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+c*g.value,y:s.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:n=>M(l,c),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,kt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+c*g.value,y:u.value.top,width:g.value,height:s.value.height,fill:"transparent",onMouseenter:n=>Ne(l),onMouseleave:se,onClick:n=>M(l,c),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,bt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",xt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:s.value.width,height:s.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,Bt),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:s.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,Ct),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:s.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,_t),e.createElementVNode("circle",{"data-cy-close":"",onClick:ce,onKeypress:e.withKeys(ce,["enter"]),cx:s.value.absoluteWidth-u.value.right-s.value.width/40,cy:u.value.top+s.value.height/30,r:s.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,Et),(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:s.value.centerX,y:s.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,Nt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,wt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,c)=>(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,St))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,c)=>(e.openBlock(),e.createElementBlock("g",Lt,[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(re(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":D(l.value,l,c))+") ",9,zt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,Vt),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,At),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+s.value.width/2,y:u.value.top+s.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(D(b.value.subtotal,b.value,null)),9,$t),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,Dt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:s.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),E.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(De.Slicer,{ref_key:"slicerComponent",ref:N,key:`slicer_${K.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:E.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":o[0]||(o[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":o[1]||(o[1]=l=>i.value.end=l),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:E.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:X},{"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","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${Z.value}`,legendSet:ie.value,config:we.value,onClickMarker:o[2]||(o[2]=({legend:l})=>R(l.uid))},{item:e.withCtx(({legend:l,index:c})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:n=>R(l.uid),style:e.normalizeStyle(`opacity:${m.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:c}))+" ",1),m.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Ot," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",It," ("+e.toDisplayString(isNaN(l.value/de.value)?"-":e.unref(r.dataLabel)({v:l.value/de.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Pt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ie.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",Tt,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createBlock(Fe.default,{key:10,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(Ve.DataTable,{key:`table_${Q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[3]||(o[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",Ht,"-")):(e.openBlock(),e.createElementBlock("b",Mt,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)],46,He))}},Ut=Te._export_sfc(Rt,[["__scopeId","data-v-bfca0728"]]);exports.default=Ut;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-KJL8ra_6.cjs"),ze=require("./Title-D-6pIV0l.cjs"),me=require("./usePrinter-pDOF3CfL.cjs"),Ve=require("./DataTable-wN-jvOfe.cjs"),Ae=require("./Legend-DqGE1lkA.cjs"),$e=require("./vue-ui-skeleton-D_YCUi1y.cjs"),De=require("./Slicer-8bCK41mN.cjs"),Fe=require("./vue-ui-accordion-4-dyMgJA.cjs"),fe=require("./useNestedProp-Bu958azG.cjs"),Pe=require("./PackageVersion-Dn-t7tbm.cjs"),Ie=require("./PenAndPaper-DFXJJink.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Me=["xmlns","viewBox"],Re=["x","y","width","height"],Ue=["id"],qe=["stop-color"],We=["stop-color"],Xe=["id"],Ge=["stop-color"],je=["stop-color"],Ye=["stop-color"],Ke={key:1},Je=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:0},et=["x1","x2","y1","y2","stroke","stroke-width"],tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["x","y","font-size","fill","font-weight"],at=["text-anchor","font-size","fill","transform"],ot=["x1","y1","x2","y2","stroke","stroke-width"],nt={key:1},ut=["cx","cy","r","fill"],rt={key:0},st={key:0},ct=["d","stroke"],it=["text-anchor","x","y","fill"],dt=["cx","cy","r","fill"],vt={key:0},ht=["cx","cy","fill"],yt={key:1},mt=["d","fill","stroke"],ft={key:2},gt=["d","fill","stroke"],pt=["x","y","font-size","fill"],kt=["x","y","width","fill","onClick"],bt=["x","y","width","height","onMouseenter","onClick"],xt={key:4,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},Bt=["x","y","width","height","fill"],Ct=["x1","y1","x2","y2","stroke"],_t=["x1","y2","x2","y1","stroke"],Et=["onKeypress","cx","cy","r"],Nt=["d","stroke"],wt=["cx","cy","r","fill"],St=["d","fill","stroke"],Lt={class:"vue-ui-donut-evolution-focus"},zt=["text-anchor","x","y","fill"],Vt=["cx","cy","r","fill"],At=["cx","cy","r","fill"],$t=["x","y","fill"],Dt=["x","y","font-size","fill"],Ft={key:5,class:"vue-data-ui-watermark"},Pt=["onClick"],It={key:0},Ot={key:1},Tt={key:9,ref:"source",dir:"auto"},Ht={key:0},Mt={key:1},Rt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ge,{expose:pe,emit:W}){const y=ge,{vue_ui_donut_evolution:ke}=r.useConfig(),A=e.computed(()=>!!y.dataset&&y.dataset.length),i=e.ref({start:0,end:Math.max(...y.dataset.map(a=>a.values.length))});function X(){G()}const N=e.ref(null);async function G(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&N.value?(t.value.style.chart.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setEndValue(be(t.value.style.chart.zoom.endIndex+1)))):(i.value={start:0,end:E.value},K.value+=1)}function be(a){const o=E.value;return a>o?o:a<0||t.value.style.chart.zoom.startIndex!==null&&a<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:a}e.onMounted(()=>{j()});function j(){r.objectIsEmpty(y.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):y.dataset.length&&y.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:o})})}),G()}const _=e.ref(r.createUid()),m=e.ref([]),h=e.ref(null),P=e.ref(null),k=e.ref(!1),b=e.ref(null),I=e.ref(null),xe=e.ref(null),Y=e.ref(0),K=e.ref(0),J=e.ref(0),Q=e.ref(0),Z=e.ref(0),t=e.computed({get:()=>le(),set:a=>a}),{userOptionsVisible:O,setUserOptionsVisibility:ee,keepUserOptionState:te}=Oe.useUserOptionState({config:t.value});function le(){const a=fe.useNestedProp({userConfig:y.config,defaultConfig:ke});let o={};return a.theme?o={...fe.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||y.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:o=a,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=y.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=y.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}e.watch(()=>y.config,a=>{t.value=le(),O.value=!t.value.showOnChartHover,j(),J.value+=1,Q.value+=1,Z.value+=1},{deep:!0}),e.watch(()=>y.dataset,a=>{X()},{deep:!0});const{isPrinting:ae,isImaging:oe,generatePdf:ne,generateImage:ue}=me.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ce=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})),s=e.computed(()=>{const a=t.value.style.chart.layout.height,o=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,c=o-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:o,centerX:u.value.left+c/2,centerY:u.value.top+l/2,height:l,width:c}}),C=e.computed(()=>(y.dataset.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:o}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:o})}),y.dataset.map((a,o)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||Ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),z=e.computed(()=>C.value.filter(a=>!m.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((o,l)=>l>=i.value.start&&l<=i.value.end)}))),E=e.computed(()=>Math.max(...z.value.map(a=>a.length))),g=e.computed(()=>s.value.width/(i.value.end-i.value.start)),f=e.computed(()=>{const a=[];for(let n=0;n<i.value.end-i.value.start;n+=1){const v=z.value.map(B=>B.values[n]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,p)=>B+p,0),q=v.map(B=>B/x),L=u.value.left+g.value*n+g.value/2;a.push({index:n,percentages:q,subtotal:d||x<0?null:x,values:v,x:L})}const o=0,l=Math.max(...a.map(n=>n.subtotal)),c=a.length===1?l*2:l;return a.map((n,v)=>{const d=g.value/2*.7,x=d>s.value.width/16?s.value.width/16:d,q=h.value===n.index?s.value.width/16:x,L=a.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,B=s.value.absoluteHeight-u.value.bottom-s.value.height*n.subtotal/r.calculateNiceScale(o,c,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...n,y:B,radius:x,activeRadius:q,hoverRadius:L,donut:r.makeDonut({series:z.value.map((p,ye)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:z.value.map((p,ye)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,L,L,1.99999,2,1,360,105.25,L/2),donutFocus:r.makeDonut({series:z.value.map((p,ye)=>({color:p.color,name:p.name,value:p.values[v]??0}))},s.value.centerX,s.value.centerY,s.value.height/3.6,s.value.height/3.6,1.99999,2,1,360,105.25,s.value.height/6)}})});function D(a,o,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:o,index:l})}const T=e.computed(()=>({max:Math.max(...f.value.map(a=>a.subtotal)),min:0})),w=e.computed(()=>{const a=f.value.length===1?T.value.max*2:T.value.max;return r.calculateNiceScale(T.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function _e(a){return a/w.value.max}const Ee=e.computed(()=>w.value.ticks.map(a=>({y:s.value.absoluteHeight-u.value.bottom-s.value.height*_e(a),value:a})));function re(a,o){return isNaN(a.value/r.sumByAttribute(o,"value"))?0:(a.value/r.sumByAttribute(o,"value")*100).toFixed(0)+"%"}function se(){k.value||(h.value=null,P.value=null)}function Ne(a){k.value||(h.value=a.index,P.value=a)}const H=e.ref(null);function M(a,o){a.subtotal&&(P.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(o)||(H.value=o))}function ce(){b.value=null,k.value=!1,H.value=null}const ie=e.computed(()=>C.value.map((a,o)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,c)=>l+c,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,o)=>o.value-a.value).map(a=>({...a,opacity:m.value.includes(a.uid)?.5:1,segregate:()=>R(a.uid),isSegregated:m.value.includes(a.uid)}))),de=e.computed(()=>f.value.map(a=>a.subtotal).reduce((a,o)=>a+o,0)),we=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 R(a){if(m.value.includes(a))m.value=m.value.filter(o=>o!==a),W("selectLegend",null);else{if(m.value.length===C.value.length-1)return;m.value.push(a),W("selectLegend",C.value.find(o=>o.uid===a))}b.value&&M(f.value.find((o,l)=>l===H.value))}const S=e.computed(()=>{const a=[""].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>({name:n.name,color:n.color}))).concat(["Σ"]);let o=[];for(let n=0;n<E.value;n+=1){const v=C.value.filter(d=>!m.value.includes(d.uid)).map(d=>d.values[n]??0).reduce((d,x)=>d+x,0);o.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[n]??"-"].concat(C.value.filter(d=>!m.value.includes(d.uid)).map(d=>({value:d.values[n]??0,percentage:d.values[n]?d.values[n]/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},c=[t.value.table.columnNames.period].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:a,body:o,config:l,colNames:c}});function Se(){return C.value}function ve(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=[...S.value.head.map(v=>v.name??v)],l=[...S.value.body.map(v=>v.map(d=>d.value??d))],c=a.concat([o]).concat(l),n=r.createCsvContent(c);r.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function Le(a){V.value=a,Y.value+=1}function he(){$.value.showTable=!$.value.showTable}const F=e.ref(!1);function U(){F.value=!F.value}return pe({getData:Se,generatePdf:ne,generateCsv:ve,generateImage:ue,toggleTable:he,toggleAnnotator:U}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:I,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;background:${t.value.style.chart.backgroundColor}`),id:_.value,onMouseenter:o[4]||(o[4]=()=>e.unref(ee)(!0)),onMouseleave:o[5]||(o[5]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:I.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:xe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:se},[(e.openBlock(),e.createBlock(ze._sfc_main,{key:`title_${J.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&&A.value&&(e.unref(te)||e.unref(O))?(e.openBlock(),e.createBlock(me.UserOptions,{ref:"details",key:`user_options_${Y.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(oe),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:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Le,onGeneratePdf:e.unref(ne),onGenerateCsv:ve,onGenerateImage:e.unref(ue),onToggleTable:he,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(O)?"visible":"hidden":"visible"})},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:c})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:c})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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 ${s.value.absoluteWidth} ${s.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Pe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:u.value.left,y:u.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),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,qe),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,We)],8,Ue),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,Ge),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ye)],8,Xe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+s.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Je),e.createElementVNode("line",{x1:u.value.left,x2:s.value.absoluteWidth-u.value.right,y1:s.value.absoluteHeight-u.value.bottom,y2:s.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,Qe),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,c)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(c+1)*g.value,x2:u.value.left+(c+1)*g.value,y1:u.value.top,y2:s.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,et))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=w.value.min&&l.value<=w.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,tt)):e.createCommentVNode("",!0),l.value>=w.value.min&&l.value<=w.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:c}):""),9,lt)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:3,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,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(c===0||c===E.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+g.value*c+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+s.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(c)+Number(i.value.start)]??""),9,at)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&c<f.value.length-1&&![l.subtotal,f.value[c+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:f.value[c+1].x,y2:f.value[c+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,ot)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",nt,[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,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":c!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",rt,[h.value!==null&&h.value===c?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,n=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(n,{x:n.center.endX,y:n.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:n.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ct)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(n),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(n.name)+": "+e.toDisplayString(re(n,l.donut))+" ("+e.toDisplayString(n.value===null?"-":D(n.value,n,v))+") ",9,it)]))),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,dt)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":c!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",vt,[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,ht)):h.value!==null&&h.value===c?(e.openBlock(),e.createElementBlock("g",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,mt))),256))])):(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,gt))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":c!==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(D(l.subtotal,l,c)),9,pt)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+c*g.value,y:s.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:n=>M(l,c),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,kt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,c)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+c*g.value,y:u.value.top,width:g.value,height:s.value.height,fill:"transparent",onMouseenter:n=>Ne(l),onMouseleave:se,onClick:n=>M(l,c),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,bt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",xt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:s.value.width,height:s.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,Bt),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:s.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,Ct),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:s.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,_t),e.createElementVNode("circle",{"data-cy-close":"",onClick:ce,onKeypress:e.withKeys(ce,["enter"]),cx:s.value.absoluteWidth-u.value.right-s.value.width/40,cy:u.value.top+s.value.height/30,r:s.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,Et),(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:s.value.centerX,y:s.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,Nt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,wt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,c)=>(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,St))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,c)=>(e.openBlock(),e.createElementBlock("g",Lt,[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(re(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":D(l.value,l,c))+") ",9,zt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,Vt),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,At),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+s.value.width/2,y:u.value.top+s.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(D(b.value.subtotal,b.value,null)),9,$t),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,Dt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:s.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),E.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(De.Slicer,{ref_key:"slicerComponent",ref:N,key:`slicer_${K.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:E.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":o[0]||(o[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":o[1]||(o[1]=l=>i.value.end=l),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:E.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:X},{"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","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${Z.value}`,legendSet:ie.value,config:we.value,onClickMarker:o[2]||(o[2]=({legend:l})=>R(l.uid))},{item:e.withCtx(({legend:l,index:c})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:n=>R(l.uid),style:e.normalizeStyle(`opacity:${m.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:c}))+" ",1),m.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Ot," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",It," ("+e.toDisplayString(isNaN(l.value/de.value)?"-":e.unref(r.dataLabel)({v:l.value/de.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Pt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ie.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",Tt,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createBlock(Fe.default,{key:10,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(Ve.DataTable,{key:`table_${Q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[3]||(o[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",Ht,"-")):(e.openBlock(),e.createElementBlock("b",Mt,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)],46,He))}},Ut=Te._export_sfc(Rt,[["__scopeId","data-v-bfca0728"]]);exports.default=Ut;
@@ -1,15 +1,15 @@
1
1
  import { computed as p, ref as b, onMounted as nt, watch as He, openBlock as a, createElementBlock as o, normalizeClass as P, normalizeStyle as q, unref as c, createBlock as O, createCommentVNode as v, createSlots as rt, withCtx as F, renderSlot as S, normalizeProps as J, guardReactiveProps as Q, createVNode as it, createElementVNode as d, Fragment as k, renderList as _, toDisplayString as m, withKeys as ct, createTextVNode as Me, nextTick as X } from "vue";
2
- import { u as vt, o as dt, e as Z, g as ht, c as Re, t as yt, a as ft, p as ee, C as Ue, b as gt, J as bt, d as de, D as We, m as he, X as mt, s as G, E as xt, i as ye, f as te, j as Xe, k as le, n as Ge, K as je, q as pt, r as kt } from "./index-DMvK32iW.js";
3
- import { _ as _t } from "./Title-2MaMBji9.js";
4
- import { u as Ct, U as wt } from "./usePrinter-7L_B-x1F.js";
5
- import { D as zt } from "./DataTable--ofk92Yb.js";
6
- import { L as Lt } from "./Legend-BhrGSZRp.js";
7
- import St from "./vue-ui-skeleton-Bzsl5gab.js";
8
- import { S as $t } from "./Slicer-CD8VkksI.js";
9
- import At from "./vue-ui-accordion-D9SRsoRT.js";
10
- import { u as Be } from "./useNestedProp-3oLbIjGJ.js";
11
- import { _ as Nt } from "./PackageVersion-BqwuIW-T.js";
12
- import { P as It } from "./PenAndPaper-LsFeEPDj.js";
2
+ import { u as vt, o as dt, e as Z, g as ht, c as Re, t as yt, a as ft, p as ee, C as Ue, b as gt, J as bt, d as de, D as We, m as he, X as mt, s as G, E as xt, i as ye, f as te, j as Xe, k as le, n as Ge, K as je, q as pt, r as kt } from "./index-B8Eaq54E.js";
3
+ import { _ as _t } from "./Title-XYNHfYwN.js";
4
+ import { u as Ct, U as wt } from "./usePrinter-D83W2gfG.js";
5
+ import { D as zt } from "./DataTable-DtRXoetj.js";
6
+ import { L as Lt } from "./Legend-RnRqBxiV.js";
7
+ import St from "./vue-ui-skeleton-DpadzgbS.js";
8
+ import { S as $t } from "./Slicer-GQf9ZyPj.js";
9
+ import At from "./vue-ui-accordion--5td7b94.js";
10
+ import { u as Be } from "./useNestedProp-Ka0R_Yqa.js";
11
+ import { _ as Nt } from "./PackageVersion-CgJdp_Ki.js";
12
+ import { P as It } from "./PenAndPaper-BTLEk55u.js";
13
13
  import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as Pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const Dt = ["id"], Ot = ["xmlns", "viewBox"], Et = ["x", "y", "width", "height"], Tt = ["id"], Vt = ["stop-color"], Ht = ["stop-color"], Mt = ["id"], Rt = ["stop-color"], Ut = ["stop-color"], Wt = ["stop-color"], Xt = { key: 1 }, Gt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bt = { key: 0 }, Yt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], qt = ["x", "y", "font-size", "fill", "font-weight"], Jt = ["text-anchor", "font-size", "fill", "transform"], Qt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Zt = { key: 1 }, el = ["cx", "cy", "r", "fill"], tl = { key: 0 }, ll = { key: 0 }, al = ["d", "stroke"], ol = ["text-anchor", "x", "y", "fill"], ul = ["cx", "cy", "r", "fill"], sl = { key: 0 }, nl = ["cx", "cy", "fill"], rl = { key: 1 }, il = ["d", "fill", "stroke"], cl = { key: 2 }, vl = ["d", "fill", "stroke"], dl = ["x", "y", "font-size", "fill"], hl = ["x", "y", "width", "fill", "onClick"], yl = ["x", "y", "width", "height", "onMouseenter", "onClick"], fl = {
@@ -1,15 +1,15 @@
1
1
  import { computed as m, ref as v, watch as ye, onMounted as fe, onBeforeUnmount as Oe, openBlock as o, createElementBlock as r, normalizeClass as be, normalizeStyle as F, unref as u, createBlock as L, createCommentVNode as h, createSlots as Ge, withCtx as k, renderSlot as _, normalizeProps as U, guardReactiveProps as R, createVNode as Me, Fragment as C, renderList as $, createElementVNode as i, toDisplayString as A, createTextVNode as ge, nextTick as De } from "vue";
2
- import { u as Ie, c as pe, t as Fe, o as Ve, e as me, g as Ee, v as _e, D as He, f as z, X as ke, i as B, l as xe, h as we, q as We, r as Ue } from "./index-DMvK32iW.js";
2
+ import { u as Ie, c as pe, t as Fe, o as Ve, e as me, g as Ee, v as _e, D as He, f as z, X as ke, i as B, l as xe, h as we, q as We, r as Ue } from "./index-B8Eaq54E.js";
3
3
  import { t as Re, u as Be } from "./useResponsive-CoxXLe23.js";
4
- import { _ as je } from "./Title-2MaMBji9.js";
5
- import { u as qe, U as Ye } from "./usePrinter-7L_B-x1F.js";
6
- import { D as Ze } from "./DataTable--ofk92Yb.js";
7
- import Je from "./vue-ui-skeleton-Bzsl5gab.js";
8
- import { L as Ke } from "./Legend-BhrGSZRp.js";
9
- import Qe from "./vue-ui-accordion-D9SRsoRT.js";
10
- import { u as Ce } from "./useNestedProp-3oLbIjGJ.js";
11
- import { _ as et } from "./PackageVersion-BqwuIW-T.js";
12
- import { P as tt } from "./PenAndPaper-LsFeEPDj.js";
4
+ import { _ as je } from "./Title-XYNHfYwN.js";
5
+ import { u as qe, U as Ye } from "./usePrinter-D83W2gfG.js";
6
+ import { D as Ze } from "./DataTable-DtRXoetj.js";
7
+ import Je from "./vue-ui-skeleton-DpadzgbS.js";
8
+ import { L as Ke } from "./Legend-RnRqBxiV.js";
9
+ import Qe from "./vue-ui-accordion--5td7b94.js";
10
+ import { u as Ce } from "./useNestedProp-Ka0R_Yqa.js";
11
+ import { _ as et } from "./PackageVersion-CgJdp_Ki.js";
12
+ import { P as tt } from "./PenAndPaper-BTLEk55u.js";
13
13
  import { u as lt } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const st = ["id"], ot = ["xmlns", "viewBox"], rt = ["x", "y", "width", "height"], nt = { key: 1 }, ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], it = { key: 2 }, ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], vt = { key: 3 }, ht = ["x", "y", "font-size", "fill", "font-weight"], yt = ["x", "y", "font-size", "fill"], ft = { key: 4 }, bt = ["x", "y", "font-size", "fill", "font-weight"], gt = ["id"], pt = ["stop-color"], mt = ["stop-color"], _t = ["stop-color"], kt = ["id"], xt = ["stop-color"], wt = ["stop-color"], Ct = ["stop-color"], $t = ["id"], Lt = ["stop-color"], At = ["stop-color"], zt = ["id"], St = ["stop-color"], Xt = ["stop-color"], Nt = { key: 0 }, Tt = ["d", "fill"], Pt = { key: 1 }, Ot = ["x", "y", "height", "width", "fill"], Gt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Mt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Dt = { key: 2 }, It = ["x", "y", "fill", "font-size"], Ft = { key: 3 }, Vt = ["x", "y", "fill", "font-size"], Et = {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CbMyzHGj.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ce=require("./Title-BzcIyo-x.cjs"),Q=require("./usePrinter-BzVsUZ9_.cjs"),de=require("./DataTable-D0qYxBVZ.cjs"),ve=require("./vue-ui-skeleton-Dm5NZ_MQ.cjs"),he=require("./Legend-DV4QFlV9.cjs"),ye=require("./vue-ui-accordion-Uftgxo97.cjs"),ee=require("./useNestedProp-DqPx8kFh.cjs"),fe=require("./PackageVersion-sBYhtscP.cjs"),me=require("./PenAndPaper-CHz_Iy5T.cjs"),be=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],ke=["xmlns","viewBox"],xe=["x","y","width","height"],_e={key:1},Ce=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],we={key:2},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ee={key:3},$e=["x","y","font-size","fill","font-weight"],Le=["x","y","font-size","fill"],Se={key:4},Ve=["x","y","font-size","fill","font-weight"],ze=["id"],Ae=["stop-color"],Pe=["stop-color"],Te=["stop-color"],Xe=["id"],De=["stop-color"],Oe=["stop-color"],Fe=["stop-color"],Me=["id"],Ge=["stop-color"],Ie=["stop-color"],qe=["id"],He=["stop-color"],Ue=["stop-color"],Re={key:0},We=["d","fill"],je={key:1},Ye=["x","y","height","width","fill"],Ze=["cx","cy","r","fill","stroke","stroke-width"],Je=["cx","cy","r","fill","stroke","stroke-width"],Ke={key:2},Qe=["x","y","fill","font-size"],et={key:3},tt=["x","y","fill","font-size"],lt={key:5,class:"vue-data-ui-watermark"},at=["xmlns","height","width"],ot=["fill"],rt=["innerHTML"],st={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(te,{expose:le,emit:ut}){const y=te,{vue_ui_dumbbell:ae}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),V=e.ref(0),p=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),D=e.ref(0),O=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=be.useUserOptionState({config:t.value});function G(){const a=ee.useNestedProp({userConfig:y.config,defaultConfig:ae});return a.theme?{...ee.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=G(),E.value=!t.value.showOnChartHover,I(),X.value+=1,D.value+=1,O.value+=1,c.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{j()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{I()});function I(){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=K.throttle(()=>{const{width:n,height:l}=K.useResponsive({chart:p.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});g.value=n,c.value=l/y.dataset.length,v.value=C()});x.value=new ResizeObserver(a),x.value.observe(p.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:q,isImaging:H,generatePdf:U,generateImage:R}=Q.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),oe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),_=e.ref({showTable:t.value.table.show}),f=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...f.value.flatMap(a=>[a.start,a.end])),min:Math.min(...f.value.flatMap(a=>[a.start,a.end]))})),i=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),c=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=c.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=i.value.ticks.length*(g.value/i.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 f.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*c.value+c.value/2,endVal:a.start}})}const v=e.ref([]),W=e.ref(null),re=e.computed(()=>f.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{j()});function j(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=f.value.map(r=>r.end-r.start);a>=re.value?(cancelAnimationFrame(W.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(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,N=o.value.left+(r.endVal+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,S=h+(N-h)/2;return{...r,startX:h,endX:N,centerX:S,y:o.value.top+u*c.value+c.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),W.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const Y=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}]),se=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":""})),m=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=m.value.head.map((u,h)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ie=s.dataLabel({v:100*(m.value.body[h].end/m.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},N,S,ie]}),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 Z(){e.nextTick(()=>{const a=m.value.head.map((r,u)=>[[r.name],[m.value.body[u].start],[m.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 k=e.ref(!1);function ne(a){k.value=a,V.value+=1}function ue(){return v.value}function J(){_.value.showTable=!_.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return le({getData:ue,generatePdf:U,generateCsv:Z,generateImage:R,toggleTable:J,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${X.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.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(H),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:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(U),onGenerateCsv:Z,onGenerateImage:e.unref(R),onToggleTable:J,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},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,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.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(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:o.value.left,y:o.value.top,width:o.value.width,height:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(i.value.ticks.length-1),x2:o.value.left+r*o.value.width/(i.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,Ce))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*c.value,y2:o.value.top+r*c.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,Be))),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,Ne)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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*c.value+(t.value.style.chart.labels.yAxisLabels.showProgression?c.value/3:c.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,$e))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.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*c.value+c.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,Le))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(i.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,Ve))),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,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Te)],8,ze),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,De),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Fe)],8,Xe)]),(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,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,Me),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,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ue)],8,qe)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-KJL8ra_6.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ce=require("./Title-D-6pIV0l.cjs"),Q=require("./usePrinter-pDOF3CfL.cjs"),de=require("./DataTable-wN-jvOfe.cjs"),ve=require("./vue-ui-skeleton-D_YCUi1y.cjs"),he=require("./Legend-DqGE1lkA.cjs"),ye=require("./vue-ui-accordion-4-dyMgJA.cjs"),ee=require("./useNestedProp-Bu958azG.cjs"),fe=require("./PackageVersion-Dn-t7tbm.cjs"),me=require("./PenAndPaper-DFXJJink.cjs"),be=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],ke=["xmlns","viewBox"],xe=["x","y","width","height"],_e={key:1},Ce=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],we={key:2},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ee={key:3},$e=["x","y","font-size","fill","font-weight"],Le=["x","y","font-size","fill"],Se={key:4},Ve=["x","y","font-size","fill","font-weight"],ze=["id"],Ae=["stop-color"],Pe=["stop-color"],Te=["stop-color"],Xe=["id"],De=["stop-color"],Oe=["stop-color"],Fe=["stop-color"],Me=["id"],Ge=["stop-color"],Ie=["stop-color"],qe=["id"],He=["stop-color"],Ue=["stop-color"],Re={key:0},We=["d","fill"],je={key:1},Ye=["x","y","height","width","fill"],Ze=["cx","cy","r","fill","stroke","stroke-width"],Je=["cx","cy","r","fill","stroke","stroke-width"],Ke={key:2},Qe=["x","y","fill","font-size"],et={key:3},tt=["x","y","fill","font-size"],lt={key:5,class:"vue-data-ui-watermark"},at=["xmlns","height","width"],ot=["fill"],rt=["innerHTML"],st={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(te,{expose:le,emit:ut}){const y=te,{vue_ui_dumbbell:ae}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),V=e.ref(0),p=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),D=e.ref(0),O=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=be.useUserOptionState({config:t.value});function G(){const a=ee.useNestedProp({userConfig:y.config,defaultConfig:ae});return a.theme?{...ee.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=G(),E.value=!t.value.showOnChartHover,I(),X.value+=1,D.value+=1,O.value+=1,c.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{j()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{I()});function I(){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=K.throttle(()=>{const{width:n,height:l}=K.useResponsive({chart:p.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});g.value=n,c.value=l/y.dataset.length,v.value=C()});x.value=new ResizeObserver(a),x.value.observe(p.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:q,isImaging:H,generatePdf:U,generateImage:R}=Q.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),oe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),_=e.ref({showTable:t.value.table.show}),f=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...f.value.flatMap(a=>[a.start,a.end])),min:Math.min(...f.value.flatMap(a=>[a.start,a.end]))})),i=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),c=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=c.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=i.value.ticks.length*(g.value/i.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 f.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*c.value+c.value/2,endVal:a.start}})}const v=e.ref([]),W=e.ref(null),re=e.computed(()=>f.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{j()});function j(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=f.value.map(r=>r.end-r.start);a>=re.value?(cancelAnimationFrame(W.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(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,N=o.value.left+(r.endVal+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,S=h+(N-h)/2;return{...r,startX:h,endX:N,centerX:S,y:o.value.top+u*c.value+c.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),W.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const Y=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}]),se=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":""})),m=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=m.value.head.map((u,h)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ie=s.dataLabel({v:100*(m.value.body[h].end/m.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},N,S,ie]}),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 Z(){e.nextTick(()=>{const a=m.value.head.map((r,u)=>[[r.name],[m.value.body[u].start],[m.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 k=e.ref(!1);function ne(a){k.value=a,V.value+=1}function ue(){return v.value}function J(){_.value.showTable=!_.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return le({getData:ue,generatePdf:U,generateCsv:Z,generateImage:R,toggleTable:J,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${X.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.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(H),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:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(U),onGenerateCsv:Z,onGenerateImage:e.unref(R),onToggleTable:J,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},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,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.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(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:o.value.left,y:o.value.top,width:o.value.width,height:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(i.value.ticks.length-1),x2:o.value.left+r*o.value.width/(i.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,Ce))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*c.value,y2:o.value.top+r*c.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,Be))),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,Ne)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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*c.value+(t.value.style.chart.labels.yAxisLabels.showProgression?c.value/3:c.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,$e))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.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*c.value+c.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,Le))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(i.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,Ve))),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,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Te)],8,ze),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,De),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Fe)],8,Xe)]),(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,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,Me),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,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ue)],8,qe)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Re,[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,13 +1,13 @@
1
1
  import { computed as p, onMounted as ze, ref as b, watch as Ye, openBlock as u, createElementBlock as c, normalizeClass as me, normalizeStyle as x, unref as i, createBlock as P, createCommentVNode as k, createSlots as De, withCtx as w, renderSlot as m, normalizeProps as W, guardReactiveProps as q, createVNode as ye, createElementVNode as M, Fragment as F, renderList as I, toDisplayString as R, createTextVNode as Ge, nextTick as Ue } from "vue";
2
- import { u as Ve, o as Be, e as je, c as be, t as Xe, a as We, p as Z, b as qe, v as h, f as ke, X as Re, G as we, L as Ze, i as Je, q as Ke, r as Qe } from "./index-DMvK32iW.js";
3
- import { _ as et } from "./Title-2MaMBji9.js";
4
- import { u as tt, U as ot } from "./usePrinter-7L_B-x1F.js";
5
- import { D as lt } from "./DataTable--ofk92Yb.js";
6
- import at from "./vue-ui-accordion-D9SRsoRT.js";
7
- import nt from "./vue-ui-skeleton-Bzsl5gab.js";
8
- import { u as Ce } from "./useNestedProp-3oLbIjGJ.js";
9
- import { _ as st } from "./PackageVersion-BqwuIW-T.js";
10
- import { P as rt } from "./PenAndPaper-LsFeEPDj.js";
2
+ import { u as Ve, o as Be, e as je, c as be, t as Xe, a as We, p as Z, b as qe, v as h, f as ke, X as Re, G as we, L as Ze, i as Je, q as Ke, r as Qe } from "./index-B8Eaq54E.js";
3
+ import { _ as et } from "./Title-XYNHfYwN.js";
4
+ import { u as tt, U as ot } from "./usePrinter-D83W2gfG.js";
5
+ import { D as lt } from "./DataTable-DtRXoetj.js";
6
+ import at from "./vue-ui-accordion--5td7b94.js";
7
+ import nt from "./vue-ui-skeleton-DpadzgbS.js";
8
+ import { u as Ce } from "./useNestedProp-Ka0R_Yqa.js";
9
+ import { _ as st } from "./PackageVersion-CgJdp_Ki.js";
10
+ import { P as rt } from "./PenAndPaper-BTLEk55u.js";
11
11
  import { u as ut } from "./useUserOptionState-BIvW1Kz7.js";
12
12
  import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const ct = ["id"], dt = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CbMyzHGj.cjs"),ke=require("./Title-BzcIyo-x.cjs"),te=require("./usePrinter-BzVsUZ9_.cjs"),ye=require("./DataTable-D0qYxBVZ.cjs"),be=require("./vue-ui-accordion-Uftgxo97.cjs"),we=require("./vue-ui-skeleton-Dm5NZ_MQ.cjs"),oe=require("./useNestedProp-DqPx8kFh.cjs"),Ce=require("./PackageVersion-sBYhtscP.cjs"),Ne=require("./PenAndPaper-CHz_Iy5T.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ee=["xmlns","viewBox"],Pe=["width","height"],Te=["id"],Oe=["stop-color"],Fe=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ze=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Ae={key:4,class:"vue-data-ui-watermark"},He={key:6,ref:"source",dir:"auto"},Me=["innerHTML"],qe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(le,{expose:ne}){const h=le,{vue_ui_flow:ae}=s.useConfig(),$=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{V()});function V(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),S=e.ref(null),z=e.ref(0),I=e.ref(0),y=e.ref(!1);function re(o){y.value=o,z.value+=1}const t=e.computed({get:()=>M(),set:o=>o}),{userOptionsVisible:E,setUserOptionsVisibility:A,keepUserOptionState:H}=xe.useUserOptionState({config:t.value});function M(){const o=oe.useNestedProp({userConfig:h.config,defaultConfig:ae});return o.theme?{...oe.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=M(),E.value=!t.value.showOnChartHover,V(),I.value+=1},{deep:!0});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:Y}=te.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),G=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),w=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),T=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}T.value.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ue(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ie(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function ce(o){const n={},l={};function r(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,B=m+1;r(u,m),r(i,B),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=P.value[i]||P.value[i%P.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ue(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;a[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ie(m)},i+=m+G.value})}const c=[];for(const u in n){let i=a[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const B=a[v].y+t.value.style.chart.padding.top,F=a[u],L=a[v],J=s.checkNaN(i),K=s.checkNaN(i+k/n[u].outflow*F.height),Q=s.checkNaN(B),ee=s.checkNaN(B+k/n[v].inflow*L.height),ge={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${J} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(L.x)} ${ee} L ${s.checkNaN(L.x)} ${Q} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ge),i+=K-J,a[v].y+=ee-Q})}return{nodeCoordinates:a,links:c}}const f=e.computed(()=>{const o=ce(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),de=e.computed(()=>ve(f.value.nodes));function ve(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+G.value}return Math.max(...Object.values(n))}const b=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=T.value.length*j.value;return{height:de.value+o+r,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function he(o){const n={},l={},r=new Set;return T.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const p=e.ref(null),C=e.ref(null);function fe(o){p.value=he(o.name),C.value=o.name}function pe(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function R(){e.nextTick(()=>{const o=X.value.map((r,a)=>[[r.source],[r.target],[r.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(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.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})]),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.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function me(){return f.value}function Z(){w.value.showTable=!w.value.showTable}const x=e.ref(!1);function O(){x.value=!x.value}return ne({getData:me,generateCsv:R,generateImage:Y,generatePdf:U,toggleTable:Z,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:S,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;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${I.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&&$.value&&(e.unref(H)||e.unref(E))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_option_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),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:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:R,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${b.value.width} ${b.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(Ce._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:b.value.width,height:b.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Fe)],8,Te))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>fe(l),onMouseleave:n[0]||(n[0]=a=>pe()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Ie))),256)),e.renderSlot(o.$slots,"svg",{svg:b.value},void 0,!0)],14,Ee)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:w.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(ye.DataTable,{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:n[1]||(n[1]=l=>w.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},De=Be._export_sfc(qe,[["__scopeId","data-v-02e90f12"]]);exports.default=De;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-KJL8ra_6.cjs"),ke=require("./Title-D-6pIV0l.cjs"),te=require("./usePrinter-pDOF3CfL.cjs"),ye=require("./DataTable-wN-jvOfe.cjs"),be=require("./vue-ui-accordion-4-dyMgJA.cjs"),we=require("./vue-ui-skeleton-D_YCUi1y.cjs"),oe=require("./useNestedProp-Bu958azG.cjs"),Ce=require("./PackageVersion-Dn-t7tbm.cjs"),Ne=require("./PenAndPaper-DFXJJink.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ee=["xmlns","viewBox"],Pe=["width","height"],Te=["id"],Oe=["stop-color"],Fe=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ze=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Ae={key:4,class:"vue-data-ui-watermark"},He={key:6,ref:"source",dir:"auto"},Me=["innerHTML"],qe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(le,{expose:ne}){const h=le,{vue_ui_flow:ae}=s.useConfig(),$=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{V()});function V(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),S=e.ref(null),z=e.ref(0),I=e.ref(0),y=e.ref(!1);function re(o){y.value=o,z.value+=1}const t=e.computed({get:()=>M(),set:o=>o}),{userOptionsVisible:E,setUserOptionsVisibility:A,keepUserOptionState:H}=xe.useUserOptionState({config:t.value});function M(){const o=oe.useNestedProp({userConfig:h.config,defaultConfig:ae});return o.theme?{...oe.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=M(),E.value=!t.value.showOnChartHover,V(),I.value+=1},{deep:!0});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:Y}=te.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),G=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),w=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),T=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}T.value.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ue(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ie(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function ce(o){const n={},l={};function r(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,B=m+1;r(u,m),r(i,B),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=P.value[i]||P.value[i%P.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ue(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;a[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ie(m)},i+=m+G.value})}const c=[];for(const u in n){let i=a[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const B=a[v].y+t.value.style.chart.padding.top,F=a[u],L=a[v],J=s.checkNaN(i),K=s.checkNaN(i+k/n[u].outflow*F.height),Q=s.checkNaN(B),ee=s.checkNaN(B+k/n[v].inflow*L.height),ge={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${J} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(L.x)} ${ee} L ${s.checkNaN(L.x)} ${Q} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ge),i+=K-J,a[v].y+=ee-Q})}return{nodeCoordinates:a,links:c}}const f=e.computed(()=>{const o=ce(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),de=e.computed(()=>ve(f.value.nodes));function ve(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+G.value}return Math.max(...Object.values(n))}const b=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=T.value.length*j.value;return{height:de.value+o+r,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function he(o){const n={},l={},r=new Set;return T.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const p=e.ref(null),C=e.ref(null);function fe(o){p.value=he(o.name),C.value=o.name}function pe(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function R(){e.nextTick(()=>{const o=X.value.map((r,a)=>[[r.source],[r.target],[r.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(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.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})]),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.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function me(){return f.value}function Z(){w.value.showTable=!w.value.showTable}const x=e.ref(!1);function O(){x.value=!x.value}return ne({getData:me,generateCsv:R,generateImage:Y,generatePdf:U,toggleTable:Z,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:S,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;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${I.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&&$.value&&(e.unref(H)||e.unref(E))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_option_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),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:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:R,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${b.value.width} ${b.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(Ce._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:b.value.width,height:b.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Fe)],8,Te))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>fe(l),onMouseleave:n[0]||(n[0]=a=>pe()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Ie))),256)),e.renderSlot(o.$slots,"svg",{svg:b.value},void 0,!0)],14,Ee)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:w.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(ye.DataTable,{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:n[1]||(n[1]=l=>w.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},De=Be._export_sfc(qe,[["__scopeId","data-v-02e90f12"]]);exports.default=De;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CbMyzHGj.cjs"),W=require("./useNestedProp-DqPx8kFh.cjs"),J=require("./usePrinter-BzVsUZ9_.cjs"),se=require("./Title-BzcIyo-x.cjs"),ue=require("./PenAndPaper-CHz_Iy5T.cjs"),ie=require("./DataTable-D0qYxBVZ.cjs"),ce=require("./vue-ui-accordion-Uftgxo97.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ve=require("./vue-ui-skeleton-Dm5NZ_MQ.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),he=require("./PackageVersion-sBYhtscP.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],be=["width","height"],ye=["id"],ge=["stop-color"],ke=["stop-color"],Ce=["stop-color"],we=["stroke","stroke-width"],xe=["stroke","stroke-width"],Le=["x","y","font-size","fill","font-weight"],Be=["points","fill"],$e=["stroke","stroke-width","rx"],_e=["x","y","font-size","fill","font-weight"],Ne=["x","y","font-size","fill","font-weight"],Se={key:5,class:"vue-data-ui-watermark"},ze=["innerHTML"],Te={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Q,{expose:Z}){const d=Q;e.useCssVars(a=>({"427f8ea6":re.value}));const{vue_ui_funnel:ee}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:g.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});u.value.height=l,u.value.width=o,m.value=G(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})});D.value=new ResizeObserver(a),D.value.observe(g.value.parentNode)}}const g=e.ref(null),k=e.ref(r.createUid()),T=e.ref(0),P=e.ref(0),A=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),f=e.ref(!1);function F(){const a=W.useNestedProp({userConfig:d.config,defaultConfig:ee});return a.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:q}=de.useUserOptionState({config:t.value});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.showOnChartHover,z(),P.value+=1,A.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize},{deep:!0});const{isPrinting:M,isImaging:R,generatePdf:U,generateImage:j}=J.usePrinter({elementId:`funnel_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),L=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{f.value=!0},h.value.length*150);function G(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const m=e.ref(G()),y=e.computed(()=>m.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),H=e.computed(()=>m.value.width*t.value.style.chart.barCircleSpacingRatio),n=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,s=m.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(m.value.width-l-H.value)*(a.value/h.value[0].value);return{...a,cx:m.value.left+l/2,cy:s+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:m.value.left+l+H.value,y:s}})),ae=e.computed(()=>{const a=n.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${n.value[0].x},${n.value[0].y+(y.value-p.value)/2} ${a.toString()} ${n.value.at(-1).x},${n.value.at(-1).y+(y.value-p.value)/2}`}),le=e.computed(()=>({x1:n.value[0].cx,y1:n.value[0].cy,x2:n.value.at(-1).cx,y2:n.value.at(-1).cy})),C=e.ref(!1);function oe(a){C.value=a,T.value+=1}const re=e.computed(()=>`${h.value.length*150}ms`),B=e.ref(!1);function N(){B.value=!B.value}function X(){L.value.showTable=!L.value.showTable}const w=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),$=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=w.value.head.map((v,c)=>{const x=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,w.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:w.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:n.value[c]}),S=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,n.value[c].proportion*100,r.dataLabel({v:n.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:n.value[c]});return[{color:v.color,name:v.name},x,S]}),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.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function Y(){e.nextTick(()=>{const a=w.value.head.map((s,v)=>[[s.name],[w.value.body[v]],[n.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function ne(){return h.value}return Z({getData:ne,generatePdf:U,generateCsv:Y,generateImage:j,toggleTable:X,toggleAnnotator:N}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:g,class:e.normalizeClass(`vue-ui-funnel ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${k.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:N},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(se._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(q)||e.unref(_))?(e.openBlock(),e.createBlock(J.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(R),uid:k.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,chartElement:g.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleAnnotator:N,onToggleFullscreen:oe,onGeneratePdf:e.unref(U),onGenerateImage:e.unref(j),onToggleTable:X,onGenerateCsv:Y,style:e.normalizeStyle({visibility:e.unref(q)?e.unref(_)?"visible":"hidden":"visible"})},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,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,ge),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,Ce)],8,ye)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},le.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?m.value.height:0,strokeDashoffset:t.value.useCssAnimation?m.value.height:0}}),null,16,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({cx:l,cy:s,r:v,fill:c},x)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({cx:l,cy:s,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*x}ms`}}),null,16,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Le))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:ae.value,fill:`url(#funnel_area_${k.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,Be)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({x:l,y:s,height:v,width:c,fill:x},S)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({x:l,y:s,height:v,width:c,fill:x},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*S}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(l.name),15,_e),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,Ne)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ce.default,{key:8,hideDetails:"",config:{open:L.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(ie.DataTable,{key:`table_${A.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>L.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},Pe=me._export_sfc(Te,[["__scopeId","data-v-bf9e380b"]]);exports.default=Pe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-KJL8ra_6.cjs"),W=require("./useNestedProp-Bu958azG.cjs"),J=require("./usePrinter-pDOF3CfL.cjs"),se=require("./Title-D-6pIV0l.cjs"),ue=require("./PenAndPaper-DFXJJink.cjs"),ie=require("./DataTable-wN-jvOfe.cjs"),ce=require("./vue-ui-accordion-4-dyMgJA.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ve=require("./vue-ui-skeleton-D_YCUi1y.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),he=require("./PackageVersion-Dn-t7tbm.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],be=["width","height"],ye=["id"],ge=["stop-color"],ke=["stop-color"],Ce=["stop-color"],we=["stroke","stroke-width"],xe=["stroke","stroke-width"],Le=["x","y","font-size","fill","font-weight"],Be=["points","fill"],$e=["stroke","stroke-width","rx"],_e=["x","y","font-size","fill","font-weight"],Ne=["x","y","font-size","fill","font-weight"],Se={key:5,class:"vue-data-ui-watermark"},ze=["innerHTML"],Te={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Q,{expose:Z}){const d=Q;e.useCssVars(a=>({"427f8ea6":re.value}));const{vue_ui_funnel:ee}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:g.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});u.value.height=l,u.value.width=o,m.value=G(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})});D.value=new ResizeObserver(a),D.value.observe(g.value.parentNode)}}const g=e.ref(null),k=e.ref(r.createUid()),T=e.ref(0),P=e.ref(0),A=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),f=e.ref(!1);function F(){const a=W.useNestedProp({userConfig:d.config,defaultConfig:ee});return a.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:q}=de.useUserOptionState({config:t.value});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.showOnChartHover,z(),P.value+=1,A.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize},{deep:!0});const{isPrinting:M,isImaging:R,generatePdf:U,generateImage:j}=J.usePrinter({elementId:`funnel_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),L=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{f.value=!0},h.value.length*150);function G(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const m=e.ref(G()),y=e.computed(()=>m.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),H=e.computed(()=>m.value.width*t.value.style.chart.barCircleSpacingRatio),n=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,s=m.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(m.value.width-l-H.value)*(a.value/h.value[0].value);return{...a,cx:m.value.left+l/2,cy:s+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:m.value.left+l+H.value,y:s}})),ae=e.computed(()=>{const a=n.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${n.value[0].x},${n.value[0].y+(y.value-p.value)/2} ${a.toString()} ${n.value.at(-1).x},${n.value.at(-1).y+(y.value-p.value)/2}`}),le=e.computed(()=>({x1:n.value[0].cx,y1:n.value[0].cy,x2:n.value.at(-1).cx,y2:n.value.at(-1).cy})),C=e.ref(!1);function oe(a){C.value=a,T.value+=1}const re=e.computed(()=>`${h.value.length*150}ms`),B=e.ref(!1);function N(){B.value=!B.value}function X(){L.value.showTable=!L.value.showTable}const w=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),$=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=w.value.head.map((v,c)=>{const x=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,w.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:w.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:n.value[c]}),S=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,n.value[c].proportion*100,r.dataLabel({v:n.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:n.value[c]});return[{color:v.color,name:v.name},x,S]}),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.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function Y(){e.nextTick(()=>{const a=w.value.head.map((s,v)=>[[s.name],[w.value.body[v]],[n.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function ne(){return h.value}return Z({getData:ne,generatePdf:U,generateCsv:Y,generateImage:j,toggleTable:X,toggleAnnotator:N}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:g,class:e.normalizeClass(`vue-ui-funnel ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${k.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:N},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(se._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(q)||e.unref(_))?(e.openBlock(),e.createBlock(J.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(R),uid:k.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,chartElement:g.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleAnnotator:N,onToggleFullscreen:oe,onGeneratePdf:e.unref(U),onGenerateImage:e.unref(j),onToggleTable:X,onGenerateCsv:Y,style:e.normalizeStyle({visibility:e.unref(q)?e.unref(_)?"visible":"hidden":"visible"})},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,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,ge),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,Ce)],8,ye)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},le.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?m.value.height:0,strokeDashoffset:t.value.useCssAnimation?m.value.height:0}}),null,16,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({cx:l,cy:s,r:v,fill:c},x)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({cx:l,cy:s,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*x}ms`}}),null,16,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Le))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:ae.value,fill:`url(#funnel_area_${k.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,Be)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({x:l,y:s,height:v,width:c,fill:x},S)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({x:l,y:s,height:v,width:c,fill:x},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*S}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(l.name),15,_e),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,Ne)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ce.default,{key:8,hideDetails:"",config:{open:L.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(ie.DataTable,{key:`table_${A.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>L.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},Pe=me._export_sfc(Te,[["__scopeId","data-v-bf9e380b"]]);exports.default=Pe;
@@ -1,15 +1,15 @@
1
1
  import { useCssVars as _e, computed as v, onMounted as Le, ref as c, watch as Te, openBlock as s, createElementBlock as u, normalizeClass as T, normalizeStyle as x, unref as r, createBlock as A, createCommentVNode as f, createSlots as Ae, withCtx as k, renderSlot as y, normalizeProps as H, guardReactiveProps as X, createVNode as Ne, createElementVNode as C, mergeProps as Y, Fragment as M, renderList as V, toDisplayString as B, createTextVNode as Oe, nextTick as ze } from "vue";
2
- import { u as Se, o as Pe, e as fe, g as Fe, c as De, d as Ie, l as Me, i as U, f as E, X as Ve, G as Be, t as Ue, q as Ee, r as Ge, F as q } from "./index-DMvK32iW.js";
3
- import { u as be } from "./useNestedProp-3oLbIjGJ.js";
4
- import { u as Re, U as je } from "./usePrinter-7L_B-x1F.js";
5
- import { _ as He } from "./Title-2MaMBji9.js";
6
- import { P as Xe } from "./PenAndPaper-LsFeEPDj.js";
7
- import { D as Ye } from "./DataTable--ofk92Yb.js";
8
- import qe from "./vue-ui-accordion-D9SRsoRT.js";
2
+ import { u as Se, o as Pe, e as fe, g as Fe, c as De, d as Ie, l as Me, i as U, f as E, X as Ve, G as Be, t as Ue, q as Ee, r as Ge, F as q } from "./index-B8Eaq54E.js";
3
+ import { u as be } from "./useNestedProp-Ka0R_Yqa.js";
4
+ import { u as Re, U as je } from "./usePrinter-D83W2gfG.js";
5
+ import { _ as He } from "./Title-XYNHfYwN.js";
6
+ import { P as Xe } from "./PenAndPaper-BTLEk55u.js";
7
+ import { D as Ye } from "./DataTable-DtRXoetj.js";
8
+ import qe from "./vue-ui-accordion--5td7b94.js";
9
9
  import { t as We, u as Je } from "./useResponsive-CoxXLe23.js";
10
- import Ke from "./vue-ui-skeleton-Bzsl5gab.js";
10
+ import Ke from "./vue-ui-skeleton-DpadzgbS.js";
11
11
  import { u as Qe } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { _ as Ze } from "./PackageVersion-BqwuIW-T.js";
12
+ import { _ as Ze } from "./PackageVersion-CgJdp_Ki.js";
13
13
  import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["width", "height"], st = ["id"], ot = ["stop-color"], nt = ["stop-color"], rt = ["stop-color"], ut = ["stroke", "stroke-width"], it = ["stroke", "stroke-width"], ct = ["x", "y", "font-size", "fill", "font-weight"], vt = ["points", "fill"], dt = ["stroke", "stroke-width", "rx"], ht = ["x", "y", "font-size", "fill", "font-weight"], ft = ["x", "y", "font-size", "fill", "font-weight"], bt = {
15
15
  key: 5,