vue-data-ui 2.3.39 → 2.3.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/{Arrow-gLWBasXL.cjs → Arrow-CcJ2U3U0.cjs} +1 -1
  2. package/dist/{Arrow-B0RusPlY.js → Arrow-DHJ0seDm.js} +1 -1
  3. package/dist/{BaseIcon-E5xGjSQn.js → BaseIcon-D7REqiel.js} +1 -1
  4. package/dist/{BaseIcon-Cfy7hUAu.cjs → BaseIcon-Durv5g7g.cjs} +1 -1
  5. package/dist/{DataTable-D7JJfjpO.cjs → DataTable-Di-7_6Aq.cjs} +1 -1
  6. package/dist/{DataTable-CcVgHrwx.js → DataTable-xRoJJLCK.js} +2 -2
  7. package/dist/{Legend-BPGeRVxf.js → Legend-DFjWlPTO.js} +1 -1
  8. package/dist/{Legend-BDgAlEzL.cjs → Legend-DHtuLr86.cjs} +1 -1
  9. package/dist/{Shape-DnfO-k8Q.js → Shape-Cnsn1U1B.js} +1 -1
  10. package/dist/{Shape-DDEKu71I.cjs → Shape-dOTW06jG.cjs} +1 -1
  11. package/dist/{Slicer-BhktgQpC.cjs → Slicer-B-Doztix.cjs} +1 -1
  12. package/dist/{Slicer-Dr5g4_di.js → Slicer-CdoJYj--.js} +1 -1
  13. package/dist/{Title-BngFmPpq.cjs → Title-CUD-K-0i.cjs} +1 -1
  14. package/dist/{Title-DJW7JJGo.js → Title-WVL1w90F.js} +1 -1
  15. package/dist/{Tooltip-pvQzx3z4.js → Tooltip-B5_8pR7S.js} +1 -1
  16. package/dist/{Tooltip-ztxY4WiA.cjs → Tooltip-CdjFc0lT.cjs} +1 -1
  17. package/dist/{index-CQyrBpOX.js → index-CLohkSjv.js} +543 -518
  18. package/dist/index-Clt49H-j.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +28 -17
  21. package/dist/types/vue-data-ui.d.ts +28 -17
  22. package/dist/{useNestedProp-CK_S9Ya9.js → useNestedProp-BsIUgLPI.js} +1 -1
  23. package/dist/{useNestedProp-DJwc68Re.cjs → useNestedProp-y541YeYg.cjs} +1 -1
  24. package/dist/{usePrinter-THxtdQMP.cjs → usePrinter-B9AbYwAC.cjs} +1 -1
  25. package/dist/{usePrinter-BJn_Etby.js → usePrinter-CLjymPxw.js} +1 -1
  26. package/dist/{vue-data-ui-gHSCvnDy.cjs → vue-data-ui-8vGw_xvX.cjs} +1 -1
  27. package/dist/{vue-data-ui-9yG_ZuXl.js → vue-data-ui-R6Kj9vzU.js} +57 -57
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +4 -4
  30. package/dist/{vue-ui-3d-bar-6G46Xaar.cjs → vue-ui-3d-bar-D_SoQlA7.cjs} +1 -1
  31. package/dist/{vue-ui-3d-bar-BqL1MhRd.js → vue-ui-3d-bar-tGkaU8fG.js} +7 -7
  32. package/dist/{vue-ui-accordion-DqRnuig6.js → vue-ui-accordion-B6lUgTu6.js} +3 -3
  33. package/dist/{vue-ui-accordion-BDkYau8u.cjs → vue-ui-accordion-Czitboqc.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-BPyJ5l9B.cjs → vue-ui-age-pyramid-CN27TQYe.cjs} +1 -1
  35. package/dist/{vue-ui-age-pyramid-IRh5kfKI.js → vue-ui-age-pyramid-yJgEO7Ur.js} +8 -8
  36. package/dist/{vue-ui-annotator-CS2-dXB1.cjs → vue-ui-annotator-BByjovvv.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-BlxLsUao.js → vue-ui-annotator-k8KyQmMk.js} +1 -1
  38. package/dist/{vue-ui-candlestick-bqMr_UNG.js → vue-ui-candlestick-ClOsAfCQ.js} +9 -9
  39. package/dist/{vue-ui-candlestick-D6iWs_w-.cjs → vue-ui-candlestick-DjwGhojD.cjs} +1 -1
  40. package/dist/{vue-ui-carousel-table-BmR6Xj7Q.cjs → vue-ui-carousel-table-nZYD_4Jp.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-BPbrMmZ5.js → vue-ui-carousel-table-xdb3tSHu.js} +4 -4
  42. package/dist/{vue-ui-chestnut-BlhoOgtt.js → vue-ui-chestnut-CKSdf5Wx.js} +6 -6
  43. package/dist/{vue-ui-chestnut-lh4q8a6L.cjs → vue-ui-chestnut-CQrFwjq4.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-DwilivV-.js → vue-ui-cursor-B4fFZ1Xh.js} +2 -2
  45. package/dist/{vue-ui-cursor-BWUNJ2kc.cjs → vue-ui-cursor-R-_LJ7BC.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-BCeu5EHs.cjs → vue-ui-dashboard-BGgb7Ylt.cjs} +1 -1
  47. package/dist/{vue-ui-dashboard-B1EdqIcE.js → vue-ui-dashboard-DkYbzLSj.js} +2 -2
  48. package/dist/{vue-ui-digits-DqGz7C40.cjs → vue-ui-digits-DdKxR0He.cjs} +1 -1
  49. package/dist/{vue-ui-digits-YOnGoYnu.js → vue-ui-digits-Lq_MZu0_.js} +2 -2
  50. package/dist/{vue-ui-donut-Crhz1o2x.cjs → vue-ui-donut-C5benoAI.cjs} +1 -1
  51. package/dist/{vue-ui-donut-evolution-irJ5g-tB.cjs → vue-ui-donut-evolution-C2nM8AVm.cjs} +1 -1
  52. package/dist/{vue-ui-donut-evolution-CGBLKyts.js → vue-ui-donut-evolution-D_b9hPYy.js} +9 -9
  53. package/dist/{vue-ui-donut-DJ3z2Uyy.js → vue-ui-donut-qzmnXplU.js} +9 -9
  54. package/dist/{vue-ui-dumbbell-YiLDRgnr.js → vue-ui-dumbbell-BTbPNzqx.js} +8 -8
  55. package/dist/{vue-ui-dumbbell-C7lYqtns.cjs → vue-ui-dumbbell-C94N1mry.cjs} +1 -1
  56. package/dist/{vue-ui-flow-B7nJzAUa.js → vue-ui-flow-C8jT8any.js} +7 -7
  57. package/dist/{vue-ui-flow-C5XhyO1a.cjs → vue-ui-flow-CkZtvF7p.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-CkiIGplF.cjs → vue-ui-galaxy-DZKVmKTf.cjs} +1 -1
  59. package/dist/{vue-ui-galaxy-CXiYVwzF.js → vue-ui-galaxy-DuA4MPUu.js} +9 -9
  60. package/dist/{vue-ui-gauge-DQdwIuYM.js → vue-ui-gauge-CujXhTuR.js} +5 -5
  61. package/dist/{vue-ui-gauge-Box-ij8Z.cjs → vue-ui-gauge-DBhAo4ED.cjs} +1 -1
  62. package/dist/{vue-ui-gizmo-lQ-JQuH5.cjs → vue-ui-gizmo-BsxB_JfW.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-yMLEUprK.js → vue-ui-gizmo-DlWB95Xv.js} +2 -2
  64. package/dist/{vue-ui-heatmap-D9uCI4vM.cjs → vue-ui-heatmap-B6MbT38S.cjs} +1 -1
  65. package/dist/{vue-ui-heatmap-DdolYuul.js → vue-ui-heatmap-DlDIlSK-.js} +8 -8
  66. package/dist/{vue-ui-kpi-Db-iLGIK.js → vue-ui-kpi-C0kZxq3K.js} +3 -3
  67. package/dist/{vue-ui-kpi-CcufgDrC.cjs → vue-ui-kpi-CaqMEHto.cjs} +1 -1
  68. package/dist/{vue-ui-mini-loader-CxJ-z9rE.cjs → vue-ui-mini-loader-DGVlizno.cjs} +1 -1
  69. package/dist/{vue-ui-mini-loader-B5ZAVomk.js → vue-ui-mini-loader-DfiHD95x.js} +2 -2
  70. package/dist/{vue-ui-molecule-C2m9xcdx.cjs → vue-ui-molecule-BTtAYDlx.cjs} +1 -1
  71. package/dist/{vue-ui-molecule-DjClBVrK.js → vue-ui-molecule-MmZA7D4v.js} +9 -9
  72. package/dist/{vue-ui-mood-radar-CE3utSmC.cjs → vue-ui-mood-radar-C-qaQqJf.cjs} +1 -1
  73. package/dist/{vue-ui-mood-radar-UN10Owti.js → vue-ui-mood-radar-DRHMkdU1.js} +9 -9
  74. package/dist/{vue-ui-nested-donuts-DUytF3gU.js → vue-ui-nested-donuts-BZV-PTLD.js} +9 -9
  75. package/dist/{vue-ui-nested-donuts-iXADllgD.cjs → vue-ui-nested-donuts-BkpZgLg7.cjs} +1 -1
  76. package/dist/{vue-ui-onion-D5nX9TfZ.js → vue-ui-onion-Bpw8RJ7Y.js} +9 -9
  77. package/dist/{vue-ui-onion-BUI2Pkue.cjs → vue-ui-onion-C4OvOsH0.cjs} +1 -1
  78. package/dist/{vue-ui-parallel-coordinate-plot-CXOgpfTc.js → vue-ui-parallel-coordinate-plot-Bf64Wi3u.js} +10 -10
  79. package/dist/{vue-ui-parallel-coordinate-plot-q1BCGfqt.cjs → vue-ui-parallel-coordinate-plot-yFikaAWJ.cjs} +1 -1
  80. package/dist/{vue-ui-quadrant-g-zHilV9.cjs → vue-ui-quadrant-BVHTFKxd.cjs} +1 -1
  81. package/dist/{vue-ui-quadrant-BF2MCegC.js → vue-ui-quadrant-CmCcySxg.js} +10 -10
  82. package/dist/{vue-ui-quick-chart-zvfAdour.js → vue-ui-quick-chart-Cml1Twya.js} +6 -6
  83. package/dist/{vue-ui-quick-chart-Ca-2xvNg.cjs → vue-ui-quick-chart-DrZwV4mI.cjs} +1 -1
  84. package/dist/{vue-ui-radar-BjPOMUF0.cjs → vue-ui-radar-DE3BMdwV.cjs} +1 -1
  85. package/dist/{vue-ui-radar-CzEW9PsS.js → vue-ui-radar-DP1EuYGX.js} +10 -10
  86. package/dist/{vue-ui-rating-BjmKc3wq.js → vue-ui-rating-BkYeHWvl.js} +2 -2
  87. package/dist/{vue-ui-rating-BNg7w51y.cjs → vue-ui-rating-RbXEpR6a.cjs} +1 -1
  88. package/dist/{vue-ui-relation-circle-DA3hM60W.cjs → vue-ui-relation-circle-Dx2XZJS8.cjs} +1 -1
  89. package/dist/{vue-ui-relation-circle-BJJ7raSa.js → vue-ui-relation-circle-VO7PJR9n.js} +5 -5
  90. package/dist/{vue-ui-rings-DB7ZLrAT.cjs → vue-ui-rings-B-t-1DXJ.cjs} +1 -1
  91. package/dist/{vue-ui-rings-bHA_aSSF.js → vue-ui-rings-DxG6p7tF.js} +9 -9
  92. package/dist/{vue-ui-scatter-B6SJj98H.js → vue-ui-scatter-BRrsv69b.js} +10 -10
  93. package/dist/{vue-ui-scatter-HNeVup0c.cjs → vue-ui-scatter-ctKFC1hB.cjs} +1 -1
  94. package/dist/{vue-ui-screenshot-BiiJxMC8.js → vue-ui-screenshot-BBoHtZtA.js} +1 -1
  95. package/dist/{vue-ui-screenshot-k4Or7u-C.cjs → vue-ui-screenshot-DD0WkpyV.cjs} +1 -1
  96. package/dist/{vue-ui-skeleton-CjYyI3Lv.js → vue-ui-skeleton-Cu-FCvsL.js} +2 -2
  97. package/dist/{vue-ui-skeleton-DYdGA7uQ.cjs → vue-ui-skeleton-Gizw7vdX.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-ByuyPzc9.cjs → vue-ui-smiley-L7yruIOu.cjs} +1 -1
  99. package/dist/{vue-ui-smiley-UjJLCUmA.js → vue-ui-smiley-NkuQEkp8.js} +2 -2
  100. package/dist/{vue-ui-spark-trend-D0PCBdx2.cjs → vue-ui-spark-trend-DcBzFhgb.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-BLRiuWa6.js → vue-ui-spark-trend-MaSpDNrO.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-lF45jZmU.js → vue-ui-sparkbar-B7THOIRm.js} +3 -3
  103. package/dist/{vue-ui-sparkbar-TZC1RhBk.cjs → vue-ui-sparkbar-Dok2sQZ3.cjs} +1 -1
  104. package/dist/{vue-ui-sparkgauge-BBDYAjXD.cjs → vue-ui-sparkgauge-C4Edaz_0.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-BV0puE5M.js → vue-ui-sparkgauge-CJNO8fex.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-vCVdP_Vp.cjs → vue-ui-sparkhistogram-CDuYk_7N.cjs} +1 -1
  107. package/dist/{vue-ui-sparkhistogram-0M-yChB2.js → vue-ui-sparkhistogram-DRsRAvI7.js} +4 -4
  108. package/dist/{vue-ui-sparkline-Cxmg-Mpb.js → vue-ui-sparkline-CfsK5XqX.js} +3 -3
  109. package/dist/{vue-ui-sparkline-mn0nDWC2.cjs → vue-ui-sparkline-KOF_6Pig.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-CKCZgV0u.cjs → vue-ui-sparkstackbar-Bd4BF7Ij.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-Dw9Bhm6u.js → vue-ui-sparkstackbar-BzvGezvJ.js} +3 -3
  112. package/dist/{vue-ui-stackbar-P-SgetqL.js → vue-ui-stackbar-0rdD887I.js} +10 -10
  113. package/dist/{vue-ui-stackbar-DH5EbkWA.cjs → vue-ui-stackbar-DXvxtOmc.cjs} +1 -1
  114. package/dist/{vue-ui-strip-plot-B4L64D2e.js → vue-ui-strip-plot-CynA1j2D.js} +9 -9
  115. package/dist/{vue-ui-strip-plot-DD1KLWvq.cjs → vue-ui-strip-plot-DRTrhZ9F.cjs} +1 -1
  116. package/dist/{vue-ui-table-B8VYN1DQ.cjs → vue-ui-table-DtaMAj7u.cjs} +1 -1
  117. package/dist/{vue-ui-table-heatmap-CvTl-kYk.js → vue-ui-table-heatmap-BDZuT9Qz.js} +4 -4
  118. package/dist/{vue-ui-table-heatmap-CTq6J5BC.cjs → vue-ui-table-heatmap-BO7xu77L.cjs} +1 -1
  119. package/dist/{vue-ui-table-DKlWL1sg.js → vue-ui-table-sVGjMZTH.js} +1 -1
  120. package/dist/{vue-ui-table-sparkline-BOmWrdlg.js → vue-ui-table-sparkline-BYv7kseR.js} +5 -5
  121. package/dist/{vue-ui-table-sparkline-BXem0A7t.cjs → vue-ui-table-sparkline-DSztHLaA.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-BsuH7l6d.js → vue-ui-thermometer-1CmzRurR.js} +5 -5
  123. package/dist/{vue-ui-thermometer-BDnoT676.cjs → vue-ui-thermometer-DDL90Qop.cjs} +1 -1
  124. package/dist/{vue-ui-timer-FXG91zBm.cjs → vue-ui-timer-CqmIqHeg.cjs} +1 -1
  125. package/dist/{vue-ui-timer-CqLYv7at.js → vue-ui-timer-DLf6i56p.js} +4 -4
  126. package/dist/{vue-ui-tiremarks-CT7yMfna.cjs → vue-ui-tiremarks-BxfUFX-N.cjs} +1 -1
  127. package/dist/{vue-ui-tiremarks-B2jU97U6.js → vue-ui-tiremarks-r7bGmMg-.js} +5 -5
  128. package/dist/{vue-ui-treemap-rOLqWnMD.cjs → vue-ui-treemap-Bs4erg0I.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-DSdNtVRs.js → vue-ui-treemap-Da1vOiTg.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-_ZuU0A54.js → vue-ui-vertical-bar-ByBJTeg-.js} +9 -9
  131. package/dist/{vue-ui-vertical-bar-DJBOce-a.cjs → vue-ui-vertical-bar-Cd4AmrnX.cjs} +1 -1
  132. package/dist/{vue-ui-waffle-BzKAYW6F.cjs → vue-ui-waffle-BEP6xNLO.cjs} +1 -1
  133. package/dist/{vue-ui-waffle-CKp48kdM.js → vue-ui-waffle-CHtCkZjz.js} +9 -9
  134. package/dist/{vue-ui-wheel-6FFJt53W.cjs → vue-ui-wheel-BBKNe16o.cjs} +1 -1
  135. package/dist/{vue-ui-wheel-DPjB5xcl.js → vue-ui-wheel-icxa1L4v.js} +5 -5
  136. package/dist/{vue-ui-word-cloud-VybUTXFv.cjs → vue-ui-word-cloud-CZnELuH6.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-BY_qs7bW.js → vue-ui-word-cloud-DZOxxmkR.js} +7 -7
  138. package/dist/vue-ui-xy-DNbVDgjT.cjs +3 -0
  139. package/dist/{vue-ui-xy-canvas-BjPLlJyo.cjs → vue-ui-xy-canvas-BvaDluOT.cjs} +1 -1
  140. package/dist/{vue-ui-xy-canvas-B2mkEuiI.js → vue-ui-xy-canvas-ChKN_Cn-.js} +10 -10
  141. package/dist/{vue-ui-xy-BgBvVtwZ.js → vue-ui-xy-vIwvvGNZ.js} +465 -442
  142. package/package.json +1 -1
  143. package/dist/index-COMTToJY.cjs +0 -4
  144. package/dist/vue-ui-xy-CVxPe82S.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-DJwc68Re.cjs"),O=require("./index-COMTToJY.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.pdf({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-y541YeYg.cjs"),O=require("./index-Clt49H-j.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.pdf({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
@@ -1,7 +1,7 @@
1
1
  import { useCssVars as J, computed as _, ref as r, watch as K, openBlock as w, createElementBlock as y, createElementVNode as g, normalizeStyle as z, createCommentVNode as I, Fragment as D, renderList as Q, normalizeClass as Z, renderSlot as ee, pushScopeId as te, popScopeId as oe, createStaticVNode as ae } from "vue";
2
2
  import { p as le } from "./pdf-97UbtKC2.js";
3
- import { u as ue } from "./useNestedProp-CK_S9Ya9.js";
4
- import { u as ne } from "./index-CQyrBpOX.js";
3
+ import { u as ue } from "./useNestedProp-BsIUgLPI.js";
4
+ import { u as ne } from "./index-CLohkSjv.js";
5
5
  import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const ie = (M) => (te("data-v-57895b3a"), M = M(), oe(), M), re = {
7
7
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-DJwc68Re.cjs"),L=require("./index-COMTToJY.cjs"),f={key:0},m=["d","fill"],k=["d","fill"],h=["d","fill"],v=["d","fill"],C=["d","fill"],N=["d","fill"],b=["d","fill"],B={key:1},E=["cx","cy","fill"],q={__name:"Digit",props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:"#e1e5e8"},color:{type:String,default:"#000000"},x:{type:Number,default:0},y:{type:Number,default:0}},setup(e){const u=e,$=t.ref({0:"1111110",1:"0110000",2:"1101101",3:"1111001",4:"0110011",5:"1011011",6:"1011111",7:"1110000",8:"1111111",9:"1111011","-":"0000001",X:"0000000"}),l=t.computed(()=>[void 0,null].includes(u.quanta)?$.value.X:$.value[u.quanta]);return(a,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[[void 0,null,"."].includes(e.quanta)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("g",f,[t.createElementVNode("path",{d:`M ${e.x} ${e.y} L ${e.x+2} ${e.y-2} L ${e.x+24} ${e.y-2} L ${e.x+26} ${e.y} L ${e.x+24} ${e.y+2} L ${e.x+2} ${e.y+2}Z`,fill:l.value[0]==1?e.color:e.backgroundColor,stroke:"none"},null,8,m),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+26} L ${e.x+26} ${e.y+4} L ${e.x+28} ${e.y+2} L ${e.x+30} ${e.y+4} L ${e.x+30} ${e.y+26} L ${e.x+28} ${e.y+28} L ${e.x+26} ${e.y+26}`,fill:l.value[1]==1?e.color:e.backgroundColor,stroke:"none"},null,8,k),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+56} L ${e.x+26} ${e.y+34} L ${e.x+28} ${e.y+32} L ${e.x+30} ${e.y+34} L ${e.x+30} ${e.y+56} L ${e.x+28} ${e.y+58} L ${e.x+26} ${e.y+56}`,fill:l.value[2]==1?e.color:e.backgroundColor,stroke:"none"},null,8,h),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+58} L ${e.x} ${e.y+60} L ${e.x+2} ${e.y+62} L ${e.x+24} ${e.y+62} L ${e.x+26} ${e.y+60} L ${e.x+24} ${e.y+58} L ${e.x+2} ${e.y+58}`,fill:l.value[3]==1?e.color:e.backgroundColor,stroke:"none"},null,8,v),t.createElementVNode("path",{d:`M ${e.x} ${e.y+34} L ${e.x-2} ${e.y+32} L ${e.x-4} ${e.y+34} L ${e.x-4} ${e.y+56} L ${e.x-2} ${e.y+58} L ${e.x} ${e.y+56} L ${e.x} ${e.y+34}`,fill:l.value[4]==1?e.color:e.backgroundColor,stroke:"none"},null,8,C),t.createElementVNode("path",{d:`M ${e.x-2} ${e.y+2} L ${e.x} ${e.y+4} L ${e.x} ${e.y+26} L ${e.x-2} ${e.y+28} L ${e.x-4} ${e.y+26} L ${e.x-4} ${e.y+4} L ${e.x-2} ${e.y+2}`,fill:l.value[5]==1?e.color:e.backgroundColor,stroke:"none"},null,8,N),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+28} L ${e.x} ${e.y+30} L ${e.x+2} ${e.y+32} L ${e.x+24} ${e.y+32} L ${e.x+26} ${e.y+30} L ${e.x+24} ${e.y+28} L ${e.x+2} ${e.y+28}`,fill:l.value[6]==1?e.color:e.backgroundColor,stroke:"none"},null,8,b)])),e.quanta=="."?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("circle",{cx:e.x-8,cy:e.y+60,r:3,fill:e.color},null,8,E)])):t.createCommentVNode("",!0)],64))}},M=["xmlns","viewBox"],V={__name:"vue-ui-digits",props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){const u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:t.unref(L.XMLNS),viewBox:`0 0 ${x.value} 80`,style:t.normalizeStyle(`background:${l.value.backgroundColor};${l.value.height?`height:${l.value.height};`:""}${l.value.width?`width:${l.value.width}`:""}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,n=>(t.openBlock(),t.createBlock(q,{x:n.x,y:n.y,quanta:n.quanta,color:l.value.digits.color,backgroundColor:l.value.digits.skeletonColor},null,8,["x","y","quanta","color","backgroundColor"]))),256))],12,M))}};exports.default=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-y541YeYg.cjs"),L=require("./index-Clt49H-j.cjs"),f={key:0},m=["d","fill"],k=["d","fill"],h=["d","fill"],v=["d","fill"],C=["d","fill"],N=["d","fill"],b=["d","fill"],B={key:1},E=["cx","cy","fill"],q={__name:"Digit",props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:"#e1e5e8"},color:{type:String,default:"#000000"},x:{type:Number,default:0},y:{type:Number,default:0}},setup(e){const u=e,$=t.ref({0:"1111110",1:"0110000",2:"1101101",3:"1111001",4:"0110011",5:"1011011",6:"1011111",7:"1110000",8:"1111111",9:"1111011","-":"0000001",X:"0000000"}),l=t.computed(()=>[void 0,null].includes(u.quanta)?$.value.X:$.value[u.quanta]);return(a,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[[void 0,null,"."].includes(e.quanta)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("g",f,[t.createElementVNode("path",{d:`M ${e.x} ${e.y} L ${e.x+2} ${e.y-2} L ${e.x+24} ${e.y-2} L ${e.x+26} ${e.y} L ${e.x+24} ${e.y+2} L ${e.x+2} ${e.y+2}Z`,fill:l.value[0]==1?e.color:e.backgroundColor,stroke:"none"},null,8,m),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+26} L ${e.x+26} ${e.y+4} L ${e.x+28} ${e.y+2} L ${e.x+30} ${e.y+4} L ${e.x+30} ${e.y+26} L ${e.x+28} ${e.y+28} L ${e.x+26} ${e.y+26}`,fill:l.value[1]==1?e.color:e.backgroundColor,stroke:"none"},null,8,k),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+56} L ${e.x+26} ${e.y+34} L ${e.x+28} ${e.y+32} L ${e.x+30} ${e.y+34} L ${e.x+30} ${e.y+56} L ${e.x+28} ${e.y+58} L ${e.x+26} ${e.y+56}`,fill:l.value[2]==1?e.color:e.backgroundColor,stroke:"none"},null,8,h),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+58} L ${e.x} ${e.y+60} L ${e.x+2} ${e.y+62} L ${e.x+24} ${e.y+62} L ${e.x+26} ${e.y+60} L ${e.x+24} ${e.y+58} L ${e.x+2} ${e.y+58}`,fill:l.value[3]==1?e.color:e.backgroundColor,stroke:"none"},null,8,v),t.createElementVNode("path",{d:`M ${e.x} ${e.y+34} L ${e.x-2} ${e.y+32} L ${e.x-4} ${e.y+34} L ${e.x-4} ${e.y+56} L ${e.x-2} ${e.y+58} L ${e.x} ${e.y+56} L ${e.x} ${e.y+34}`,fill:l.value[4]==1?e.color:e.backgroundColor,stroke:"none"},null,8,C),t.createElementVNode("path",{d:`M ${e.x-2} ${e.y+2} L ${e.x} ${e.y+4} L ${e.x} ${e.y+26} L ${e.x-2} ${e.y+28} L ${e.x-4} ${e.y+26} L ${e.x-4} ${e.y+4} L ${e.x-2} ${e.y+2}`,fill:l.value[5]==1?e.color:e.backgroundColor,stroke:"none"},null,8,N),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+28} L ${e.x} ${e.y+30} L ${e.x+2} ${e.y+32} L ${e.x+24} ${e.y+32} L ${e.x+26} ${e.y+30} L ${e.x+24} ${e.y+28} L ${e.x+2} ${e.y+28}`,fill:l.value[6]==1?e.color:e.backgroundColor,stroke:"none"},null,8,b)])),e.quanta=="."?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("circle",{cx:e.x-8,cy:e.y+60,r:3,fill:e.color},null,8,E)])):t.createCommentVNode("",!0)],64))}},M=["xmlns","viewBox"],V={__name:"vue-ui-digits",props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){const u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:t.unref(L.XMLNS),viewBox:`0 0 ${x.value} 80`,style:t.normalizeStyle(`background:${l.value.backgroundColor};${l.value.height?`height:${l.value.height};`:""}${l.value.width?`width:${l.value.width}`:""}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,n=>(t.openBlock(),t.createBlock(q,{x:n.x,y:n.y,quanta:n.quanta,color:l.value.digits.color,backgroundColor:l.value.digits.skeletonColor},null,8,["x","y","quanta","color","backgroundColor"]))),256))],12,M))}};exports.default=V;
@@ -1,6 +1,6 @@
1
1
  import { ref as k, computed as d, openBlock as $, createElementBlock as i, Fragment as o, createElementVNode as l, createCommentVNode as m, unref as v, normalizeStyle as C, renderList as b, createBlock as N } from "vue";
2
- import { u as q } from "./useNestedProp-CK_S9Ya9.js";
3
- import { u as M, X as S } from "./index-CQyrBpOX.js";
2
+ import { u as q } from "./useNestedProp-BsIUgLPI.js";
3
+ import { u as M, X as S } from "./index-CLohkSjv.js";
4
4
  const w = { key: 0 }, B = ["d", "fill"], F = ["d", "fill"], X = ["d", "fill"], E = ["d", "fill"], I = ["d", "fill"], O = ["d", "fill"], A = ["d", "fill"], D = { key: 1 }, G = ["cx", "cy", "fill"], V = {
5
5
  __name: "Digit",
6
6
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-COMTToJY.cjs"),re=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-BngFmPpq.cjs"),ue=require("./usePrinter-THxtdQMP.cjs"),be=require("./DataTable-D7JJfjpO.cjs"),ge=require("./Tooltip-ztxY4WiA.cjs"),ke=require("./Legend-BDgAlEzL.cjs"),we=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),Ce=require("./vue-ui-accordion-BDkYau8u.cjs"),ne=require("./useNestedProp-DJwc68Re.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=B=>(e.pushScopeId("data-v-66476e18"),B=B(),e.popScopeId(),B),Be=["id"],Se=["xmlns","viewBox"],$e=["id"],Le=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Ve=["id"],Te=["id"],ze=_e(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Oe=["id"],Fe=["flood-color"],De=["d","stroke","filter"],Pe=["cx","cy","r","fill","filter"],Me=["stroke","d"],Xe=["d","fill","stroke","stroke-width","filter"],Ae=["cx","cy","r","fill","stroke"],Ie=["cx","cy","r","fill"],qe=["d","fill","onMouseenter","onClick"],Re=["cx","cy","r","fill"],Ge=["x","y","fill","font-size"],Ye=["x","y","fill","font-size"],He=["x","y","fill","font-size"],Ue=["x","y","fill","font-size"],je=["filter"],We={key:0},Je=["x","y"],Ke={key:1},Qe=["cx","cy","fill","filter","onClick"],Ze=["text-anchor","x","y","fill","font-size","onClick"],et=["text-anchor","x","y","fill","font-size","onClick"],tt={key:2},lt=["x","y","width"],at={key:3,class:"vue-data-ui-watermark"},ot=["onClick"],rt={key:0,style:{"font-variant-numeric":"tabular-nums"}},ut={key:1},nt=["innerHTML"],st={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:se,emit:X}){const m=B,{vue_ui_donut:ce}=o.useConfig(),S=e.computed({get(){return!!m.dataset&&m.dataset.length},set(a){return a}}),$=e.ref(null),A=e.ref(null),I=e.ref(null),V=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(m.dataset)?o.error({componentName:"VueUiDonut",type:"dataset"}):m.dataset.forEach((a,r)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{S.value=!1,o.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive){const a=re.throttle(()=>{const{width:r,height:l}=re.useResponsive({chart:$.value,title:t.value.style.chart.title.text?A.value:null,legend:t.value.style.chart.legend.show?I.value:null});s.value.width=r,s.value.height=l});V.value=new ResizeObserver(a),V.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});const f=e.ref(o.createUid()),ie=e.ref(null),O=e.ref(!1),F=e.ref(""),b=e.ref(null),q=e.ref(0),t=e.computed(()=>{const a=ne.useNestedProp({userConfig:m.config,defaultConfig:ce});return a.theme?{...ne.useNestedProp({userConfig:o.themes.vue_ui_donut[a.theme]||m.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}),{isPrinting:R,isImaging:G,generatePdf:Y,generateImage:H}=ue.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),U=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:512}),L=e.computed(()=>{const a=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*a;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),k=e.computed(()=>m.dataset.map((a,r)=>({name:a.name,color:o.convertColorToHex(a.color)||U.value[r]||o.palette[r]||o.palette[r%o.palette.length],value:a.values.reduce((l,u)=>l+u,0),absoluteValues:a.values,comment:a.comment||""}))),h=e.ref(k.value);e.watch(()=>k.value,a=>h.value=a);function ve(){return k.value.map(a=>({name:a.name,color:a.color,value:a.value}))}const y=e.ref([]),j=e.ref(null),W=e.ref(null),w=e.ref(!1);function J(a){const r=k.value.find((n,i)=>i===a);let u=h.value.find((n,i)=>i===a).value;if(y.value.includes(a)){let i=function(){u>n?(cancelAnimationFrame(j.value),h.value=h.value.map((c,M)=>a===M?{...c,value:n}:c),w.value=!1):(w.value=!0,u+=n*.025,h.value=h.value.map((c,M)=>a===M?{...c,value:u}:c),j.value=requestAnimationFrame(i))};y.value=y.value.filter(c=>c!==a);const n=r.value;i()}else if(y.value.length<k.value.length-1){let n=function(){u<.1?(cancelAnimationFrame(W.value),y.value.push(a),h.value=h.value.map((i,c)=>a===c?{...i,value:0}:i),w.value=!1):(w.value=!0,u/=1.1,h.value=h.value.map((i,c)=>a===c?{...i,value:u}:i),W.value=requestAnimationFrame(n))};n()}X("selectLegend",x.value.map(n=>({name:n.name,color:n.color,value:n.value})))}const x=e.computed(()=>(h.value.forEach((a,r)=>{if([null,void 0].includes(a.values))return{...a,values:[]}}),h.value.map((a,r)=>({...a,seriesIndex:r})).filter((a,r)=>!y.value.includes(r)))),K=e.computed(()=>m.dataset.map((a,r)=>({name:a.name,color:o.convertColorToHex(a.color)||U.value[r]||o.palette[r]||o.palette[r%o.palette.length],value:(a.values||[]).reduce((l,u)=>l+u,0),shape:"circle"})).map((a,r)=>({...a,proportion:a.value/m.dataset.map(l=>(l.values||[]).reduce((u,n)=>u+n,0)).reduce((l,u)=>l+u,0),opacity:y.value.includes(r)?.5:1,segregate:()=>J(r),isSegregated:y.value.includes(r)}))),de=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":""})),p=e.computed(()=>{const a=Math.min(s.value.width/3,s.value.height/3);return a<55?55:a}),C=e.computed(()=>o.makeDonut({series:x.value},s.value.width/2,s.value.height/2,p.value,p.value,1.99999,2,1,360,105.25,L.value));function _(a){return a.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function Q(a,r){const l=a.value/he(r);return isNaN(l)?0:o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,o.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:a})}function he(a){return[...a].map(r=>r.value).reduce((r,l)=>r+l,0)}const d=e.computed(()=>x.value.map(a=>a.value).reduce((a,r)=>a+r,0)),Z=e.computed(()=>d.value/x.value.length),D=e.ref(null),N=e.ref(!1);function fe({datapoint:a,relativeIndex:r,seriesIndex:l,show:u=!1}){D.value={datapoint:a,seriesIndex:l,config:t.value,series:k.value},O.value=u,b.value=r;let n="";const i=t.value.style.chart.tooltip.customFormat;if(N.value=!1,o.isFunction(i))try{const c=i({seriesIndex:l,datapoint:a,series:k.value,config:t.value});typeof c=="string"&&(F.value=c,N.value=!0)}catch{console.warn("Custom format cannot be applied."),N.value=!1}if(!N.value){if(n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(n+=`<b>${o.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,relativeIndex:r,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const c=o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,a.proportion*100,o.dataLabel({v:a.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:a,relativeIndex:r,seriesIndex:l});t.value.style.chart.tooltip.showValue?n+=`<span>(${c})</span></div>`:n+=`<b>${c}%</b></div>`}t.value.style.chart.comments.showInTooltip&&a.comment&&(n+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${a.color}">${a.comment}</div>`),F.value=`<div>${n}</div>`}}function P(a){return t.value.useBlurOnHover&&![null,void 0].includes(b.value)&&b.value!==a?`url(#blur_${f.value})`:""}const g=e.computed(()=>{const a=x.value.map(l=>({name:l.name,color:l.color})),r=x.value.map(l=>l.value);return{head:a,body:r}});function ee(){e.nextTick(()=>{const a=g.value.head.map((u,n)=>[[u.name],[g.value.body[n]],[isNaN(g.value.body[n]/d.value)?"-":g.value.body[n]/d.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(a),l=o.createCsvContent(r);o.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const T=e.computed(()=>{const a=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=g.value.head.map((n,i)=>{const c=o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},c,isNaN(g.value.body[i]/d.value)?"-":(g.value.body[i]/d.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),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:r,config:l}}),E=e.ref(!1);function ye(a){E.value=a,q.value+=1}const te=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function pe(a){return a.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function z(a,r){X("selectDatapoint",{datapoint:a,index:r})}function le(){v.value.showTable=!v.value.showTable}function ae(){v.value.dataLabels.show=!v.value.dataLabels.show}function oe(){v.value.showTooltip=!v.value.showTooltip}return se({getData:ve,generatePdf:Y,generateCsv:ee,generateImage:H,toggleTable:le,toggleLabels:ae,toggleTooltip:oe}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${E.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${f.value}`},[e.renderSlot(a.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(me._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:ie,key:`user_option_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(G),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,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:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,chartElement:$.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:ye,onGeneratePdf:e.unref(Y),onGenerateCsv:ee,onGenerateImage:e.unref(H),onToggleTable:le,onToggleLabels:ae,onToggleTooltip:oe},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Le),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(o.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(o.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ee)],8,$e)):e.createCommentVNode("",!0)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,Te),ze],8,Ve),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Fe)],8,Oe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(o.calcNutArrowPath)(l,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,L.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:P(u)},null,8,De)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:p.value<=0?10:p.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,Pe),d.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`${l.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:P(u)},null,8,Xe))),256))],64)):(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:p.value<=0?10:p.value,fill:t.value.style.chart.backgroundColor,stroke:e.unref(o.adaptColorToBackground)(t.value.style.chart.background)},null,8,Ae)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:2,cx:s.value.width/2,cy:s.value.height/2,r:p.value<=0?10:p.value,fill:`url(#gradient_${f.value})`},null,8,Ie)):e.createCommentVNode("",!0),d.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:l.arcSlice,fill:b.value===u?"rgba(0,0,0,0.1)":"transparent",onMouseenter:n=>fe({datapoint:l,relativeIndex:u,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=n=>{O.value=!1,b.value=null}),onClick:n=>z(l,u)},null,40,qe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:s.value.width/2,cy:s.value.height/2,r:p.value-L.value<=0?10:p.value-L.value,fill:t.value.style.chart.backgroundColor},null,8,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:d.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,Ye)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:7,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,He)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:8,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(w.value?"--":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,Z.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:Z.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Ue)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",{filter:P(u),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-120:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-60:e.unref(o.calcMarkerOffsetX)(l).x,y:e.unref(o.calcMarkerOffsetY)(l)-(te.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(b.value)||b.value===u,isSafari:te.value,isVisible:_(l)&&v.value.dataLabels.show,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor,percentage:Q(l,C.value)})),void 0,!0)])],8,Je))])):(e.openBlock(),e.createElementBlock("g",Ke,[_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(o.calcMarkerOffsetX)(l).x,cy:e.unref(o.calcMarkerOffsetY)(l)-3.5,fill:l.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(b.value)||b.value===u?"":`url(#blur_${f.value})`,onClick:n=>z(l,u)},null,8,Qe)):e.createCommentVNode("",!0),_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(o.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:n=>z(l,u)},e.toDisplayString(Q(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Ze)):e.createCommentVNode("",!0),_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:n=>z(l,u)},e.toDisplayString(l.name),13,et)):e.createCommentVNode("",!0)])),v.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",tt,[_(l)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(o.calcMarkerOffsetX)(l).x),y:e.unref(o.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,lt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,je))),256)),e.renderSlot(a.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:L.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ke.Legend,{key:0,legendSet:K.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:n=>l.segregate(),style:e.normalizeStyle(`opacity:${y.value.includes(u)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:u}))+" ",1),y.value.includes(u)?(e.openBlock(),e.createElementBlock("span",ut," ( "+e.toDisplayString(pe(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",rt," ("+e.toDisplayString(isNaN(l.value/d.value)?"-":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,w.value?l.proportion*100:l.value/d.value*100,e.unref(o.dataLabel)({v:w.value?l.proportion*100:l.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,ot)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:K.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:v.value.showTooltip&&O.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:F.value,isCustom:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(Ce.default,{key:5,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(be.DataTable,{colNames:T.value.colNames,head:T.value.head,body:T.value.body,config:T.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(o.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):l:e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},ct=xe._export_sfc(st,[["__scopeId","data-v-66476e18"]]);exports.default=ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Clt49H-j.cjs"),re=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-CUD-K-0i.cjs"),ue=require("./usePrinter-B9AbYwAC.cjs"),be=require("./DataTable-Di-7_6Aq.cjs"),ge=require("./Tooltip-CdjFc0lT.cjs"),ke=require("./Legend-DHtuLr86.cjs"),we=require("./vue-ui-skeleton-Gizw7vdX.cjs"),Ce=require("./vue-ui-accordion-Czitboqc.cjs"),ne=require("./useNestedProp-y541YeYg.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=B=>(e.pushScopeId("data-v-66476e18"),B=B(),e.popScopeId(),B),Be=["id"],Se=["xmlns","viewBox"],$e=["id"],Le=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Ve=["id"],Te=["id"],ze=_e(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Oe=["id"],Fe=["flood-color"],De=["d","stroke","filter"],Pe=["cx","cy","r","fill","filter"],Me=["stroke","d"],Xe=["d","fill","stroke","stroke-width","filter"],Ae=["cx","cy","r","fill","stroke"],Ie=["cx","cy","r","fill"],qe=["d","fill","onMouseenter","onClick"],Re=["cx","cy","r","fill"],Ge=["x","y","fill","font-size"],Ye=["x","y","fill","font-size"],He=["x","y","fill","font-size"],Ue=["x","y","fill","font-size"],je=["filter"],We={key:0},Je=["x","y"],Ke={key:1},Qe=["cx","cy","fill","filter","onClick"],Ze=["text-anchor","x","y","fill","font-size","onClick"],et=["text-anchor","x","y","fill","font-size","onClick"],tt={key:2},lt=["x","y","width"],at={key:3,class:"vue-data-ui-watermark"},ot=["onClick"],rt={key:0,style:{"font-variant-numeric":"tabular-nums"}},ut={key:1},nt=["innerHTML"],st={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:se,emit:X}){const m=B,{vue_ui_donut:ce}=o.useConfig(),S=e.computed({get(){return!!m.dataset&&m.dataset.length},set(a){return a}}),$=e.ref(null),A=e.ref(null),I=e.ref(null),V=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(m.dataset)?o.error({componentName:"VueUiDonut",type:"dataset"}):m.dataset.forEach((a,r)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{S.value=!1,o.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive){const a=re.throttle(()=>{const{width:r,height:l}=re.useResponsive({chart:$.value,title:t.value.style.chart.title.text?A.value:null,legend:t.value.style.chart.legend.show?I.value:null});s.value.width=r,s.value.height=l});V.value=new ResizeObserver(a),V.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});const f=e.ref(o.createUid()),ie=e.ref(null),O=e.ref(!1),F=e.ref(""),b=e.ref(null),q=e.ref(0),t=e.computed(()=>{const a=ne.useNestedProp({userConfig:m.config,defaultConfig:ce});return a.theme?{...ne.useNestedProp({userConfig:o.themes.vue_ui_donut[a.theme]||m.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}),{isPrinting:R,isImaging:G,generatePdf:Y,generateImage:H}=ue.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),U=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:512}),L=e.computed(()=>{const a=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*a;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),k=e.computed(()=>m.dataset.map((a,r)=>({name:a.name,color:o.convertColorToHex(a.color)||U.value[r]||o.palette[r]||o.palette[r%o.palette.length],value:a.values.reduce((l,u)=>l+u,0),absoluteValues:a.values,comment:a.comment||""}))),h=e.ref(k.value);e.watch(()=>k.value,a=>h.value=a);function ve(){return k.value.map(a=>({name:a.name,color:a.color,value:a.value}))}const y=e.ref([]),j=e.ref(null),W=e.ref(null),w=e.ref(!1);function J(a){const r=k.value.find((n,i)=>i===a);let u=h.value.find((n,i)=>i===a).value;if(y.value.includes(a)){let i=function(){u>n?(cancelAnimationFrame(j.value),h.value=h.value.map((c,M)=>a===M?{...c,value:n}:c),w.value=!1):(w.value=!0,u+=n*.025,h.value=h.value.map((c,M)=>a===M?{...c,value:u}:c),j.value=requestAnimationFrame(i))};y.value=y.value.filter(c=>c!==a);const n=r.value;i()}else if(y.value.length<k.value.length-1){let n=function(){u<.1?(cancelAnimationFrame(W.value),y.value.push(a),h.value=h.value.map((i,c)=>a===c?{...i,value:0}:i),w.value=!1):(w.value=!0,u/=1.1,h.value=h.value.map((i,c)=>a===c?{...i,value:u}:i),W.value=requestAnimationFrame(n))};n()}X("selectLegend",x.value.map(n=>({name:n.name,color:n.color,value:n.value})))}const x=e.computed(()=>(h.value.forEach((a,r)=>{if([null,void 0].includes(a.values))return{...a,values:[]}}),h.value.map((a,r)=>({...a,seriesIndex:r})).filter((a,r)=>!y.value.includes(r)))),K=e.computed(()=>m.dataset.map((a,r)=>({name:a.name,color:o.convertColorToHex(a.color)||U.value[r]||o.palette[r]||o.palette[r%o.palette.length],value:(a.values||[]).reduce((l,u)=>l+u,0),shape:"circle"})).map((a,r)=>({...a,proportion:a.value/m.dataset.map(l=>(l.values||[]).reduce((u,n)=>u+n,0)).reduce((l,u)=>l+u,0),opacity:y.value.includes(r)?.5:1,segregate:()=>J(r),isSegregated:y.value.includes(r)}))),de=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":""})),p=e.computed(()=>{const a=Math.min(s.value.width/3,s.value.height/3);return a<55?55:a}),C=e.computed(()=>o.makeDonut({series:x.value},s.value.width/2,s.value.height/2,p.value,p.value,1.99999,2,1,360,105.25,L.value));function _(a){return a.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function Q(a,r){const l=a.value/he(r);return isNaN(l)?0:o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,o.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:a})}function he(a){return[...a].map(r=>r.value).reduce((r,l)=>r+l,0)}const d=e.computed(()=>x.value.map(a=>a.value).reduce((a,r)=>a+r,0)),Z=e.computed(()=>d.value/x.value.length),D=e.ref(null),N=e.ref(!1);function fe({datapoint:a,relativeIndex:r,seriesIndex:l,show:u=!1}){D.value={datapoint:a,seriesIndex:l,config:t.value,series:k.value},O.value=u,b.value=r;let n="";const i=t.value.style.chart.tooltip.customFormat;if(N.value=!1,o.isFunction(i))try{const c=i({seriesIndex:l,datapoint:a,series:k.value,config:t.value});typeof c=="string"&&(F.value=c,N.value=!0)}catch{console.warn("Custom format cannot be applied."),N.value=!1}if(!N.value){if(n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(n+=`<b>${o.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,relativeIndex:r,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const c=o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,a.proportion*100,o.dataLabel({v:a.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:a,relativeIndex:r,seriesIndex:l});t.value.style.chart.tooltip.showValue?n+=`<span>(${c})</span></div>`:n+=`<b>${c}%</b></div>`}t.value.style.chart.comments.showInTooltip&&a.comment&&(n+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${a.color}">${a.comment}</div>`),F.value=`<div>${n}</div>`}}function P(a){return t.value.useBlurOnHover&&![null,void 0].includes(b.value)&&b.value!==a?`url(#blur_${f.value})`:""}const g=e.computed(()=>{const a=x.value.map(l=>({name:l.name,color:l.color})),r=x.value.map(l=>l.value);return{head:a,body:r}});function ee(){e.nextTick(()=>{const a=g.value.head.map((u,n)=>[[u.name],[g.value.body[n]],[isNaN(g.value.body[n]/d.value)?"-":g.value.body[n]/d.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(a),l=o.createCsvContent(r);o.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const T=e.computed(()=>{const a=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=g.value.head.map((n,i)=>{const c=o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},c,isNaN(g.value.body[i]/d.value)?"-":(g.value.body[i]/d.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),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:r,config:l}}),E=e.ref(!1);function ye(a){E.value=a,q.value+=1}const te=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function pe(a){return a.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function z(a,r){X("selectDatapoint",{datapoint:a,index:r})}function le(){v.value.showTable=!v.value.showTable}function ae(){v.value.dataLabels.show=!v.value.dataLabels.show}function oe(){v.value.showTooltip=!v.value.showTooltip}return se({getData:ve,generatePdf:Y,generateCsv:ee,generateImage:H,toggleTable:le,toggleLabels:ae,toggleTooltip:oe}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${E.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${f.value}`},[e.renderSlot(a.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(me._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:ie,key:`user_option_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(G),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,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:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,chartElement:$.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:ye,onGeneratePdf:e.unref(Y),onGenerateCsv:ee,onGenerateImage:e.unref(H),onToggleTable:le,onToggleLabels:ae,onToggleTooltip:oe},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Le),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(o.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(o.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ee)],8,$e)):e.createCommentVNode("",!0)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,Te),ze],8,Ve),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Fe)],8,Oe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(o.calcNutArrowPath)(l,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,L.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:P(u)},null,8,De)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:p.value<=0?10:p.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,Pe),d.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`${l.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:P(u)},null,8,Xe))),256))],64)):(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:p.value<=0?10:p.value,fill:t.value.style.chart.backgroundColor,stroke:e.unref(o.adaptColorToBackground)(t.value.style.chart.background)},null,8,Ae)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:2,cx:s.value.width/2,cy:s.value.height/2,r:p.value<=0?10:p.value,fill:`url(#gradient_${f.value})`},null,8,Ie)):e.createCommentVNode("",!0),d.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:l.arcSlice,fill:b.value===u?"rgba(0,0,0,0.1)":"transparent",onMouseenter:n=>fe({datapoint:l,relativeIndex:u,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=n=>{O.value=!1,b.value=null}),onClick:n=>z(l,u)},null,40,qe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:s.value.width/2,cy:s.value.height/2,r:p.value-L.value<=0?10:p.value-L.value,fill:t.value.style.chart.backgroundColor},null,8,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:d.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,Ye)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:7,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,He)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:8,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(w.value?"--":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,Z.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:Z.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Ue)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",{filter:P(u),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-120:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-60:e.unref(o.calcMarkerOffsetX)(l).x,y:e.unref(o.calcMarkerOffsetY)(l)-(te.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(b.value)||b.value===u,isSafari:te.value,isVisible:_(l)&&v.value.dataLabels.show,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor,percentage:Q(l,C.value)})),void 0,!0)])],8,Je))])):(e.openBlock(),e.createElementBlock("g",Ke,[_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(o.calcMarkerOffsetX)(l).x,cy:e.unref(o.calcMarkerOffsetY)(l)-3.5,fill:l.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(b.value)||b.value===u?"":`url(#blur_${f.value})`,onClick:n=>z(l,u)},null,8,Qe)):e.createCommentVNode("",!0),_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(o.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:n=>z(l,u)},e.toDisplayString(Q(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Ze)):e.createCommentVNode("",!0),_(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:n=>z(l,u)},e.toDisplayString(l.name),13,et)):e.createCommentVNode("",!0)])),v.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",tt,[_(l)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(o.calcMarkerOffsetX)(l).x),y:e.unref(o.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,lt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,je))),256)),e.renderSlot(a.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:L.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ke.Legend,{key:0,legendSet:K.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:n=>l.segregate(),style:e.normalizeStyle(`opacity:${y.value.includes(u)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:u}))+" ",1),y.value.includes(u)?(e.openBlock(),e.createElementBlock("span",ut," ( "+e.toDisplayString(pe(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",rt," ("+e.toDisplayString(isNaN(l.value/d.value)?"-":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,w.value?l.proportion*100:l.value/d.value*100,e.unref(o.dataLabel)({v:w.value?l.proportion*100:l.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,ot)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:K.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:v.value.showTooltip&&O.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:F.value,isCustom:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(Ce.default,{key:5,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(be.DataTable,{colNames:T.value.colNames,head:T.value.head,body:T.value.body,config:T.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(o.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):l:e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},ct=xe._export_sfc(st,[["__scopeId","data-v-66476e18"]]);exports.default=ct;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-COMTToJY.cjs"),me=require("./Title-BngFmPpq.cjs"),le=require("./usePrinter-THxtdQMP.cjs"),ge=require("./DataTable-D7JJfjpO.cjs"),fe=require("./Legend-BDgAlEzL.cjs"),ke=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),pe=require("./Slicer-BhktgQpC.cjs"),be=require("./vue-ui-accordion-BDkYau8u.cjs"),ae=require("./useNestedProp-DJwc68Re.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Le=["stop-color"],Se=["stop-color"],Ve=["stop-color"],$e={key:0},ze=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Ie=["text-anchor","font-size","fill","transform"],Oe=["x1","y1","x2","y2","stroke","stroke-width"],Me={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},at=["x","y","width","height","fill"],ot=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],rt=["onKeypress","cx","cy","r"],nt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(oe,{expose:ue,emit:M}){const B=oe,{vue_ui_donut_evolution:re}=r.useConfig(),$=e.computed(()=>!!B.dataset&&B.dataset.length),i=e.ref({start:0,end:Math.max(...B.dataset.map(a=>a.values.length))});function ne(){i.value={start:0,end:S.value},W.value+=1}e.onMounted(()=>{r.objectIsEmpty(B.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):B.dataset.length&&B.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})});const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),k=e.ref(!1),p=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const a=ae.useNestedProp({userConfig:B.config,defaultConfig:re});return a.theme?{...ae.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||B.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),z=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(B.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),B.dataset.map((a,c)=>({...a,values:a.values||[],color:r.convertColorToHex(a.color)||se.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),L=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),S=e.computed(()=>Math.max(...L.value.map(a=>a.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=L.value.map(x=>x.values[o]??null),d=v.filter(x=>[void 0,null].includes(x)).length===v.length,b=v.reduce((x,f)=>x+f,0),O=v.map(x=>x/b),w=u.value.left+g.value*o+g.value/2;a.push({index:o,percentages:O,subtotal:d||b<0?null:b,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=g.value/2*.7,b=d>n.value.width/16?n.value.width/16:d,O=h.value===o.index?n.value.width/16:b,w=a.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,x=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:x,radius:b,activeRadius:O,hoverRadius:w,donut:r.makeDonut({series:L.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[v]??0}))},o.x,x,b,b,1.99999,2,1,360,105.25,b/2),donutHover:r.makeDonut({series:L.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[v]??0}))},o.x,x,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:L.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[v]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(a){return a/E.value.max}const ie=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(a),value:a})));function Y(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function j(){k.value||(h.value=null,A.value=null)}function de(a){k.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,k.value=!0,p.value=a,[null,void 0].includes(c)||(P.value=c))}function K(){p.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>I(a.uid),isSegregated:y.value.includes(a.uid)}))),Q=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ve=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 I(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}p.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<S.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,b)=>d+b,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(a){V.value=a,R.value+=1}function ee(){z.value.showTable=!z.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{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"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),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:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":`${t.value.style.chart.backgroundColor}${e.unref(r.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(r.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Le),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(r.opacity)[30]},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ze),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Pe)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,Te)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===S.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*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,Ie)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Oe)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Me,[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,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(Y(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Xe)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[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,Ye)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(F(l.subtotal,l,s)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:o=>de(l),onMouseleave:j,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,rt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),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+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[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(Y(l,p.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(F(p.value.subtotal,p.value,a.i)),9,yt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[p.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(p.value.index)+Number(i.value.start)]),9,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),S.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe.Slicer,{key:`slicer_${W.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:S.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:ne},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:c[2]||(c[2]=({legend:l})=>I(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>I(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":e.unref(r.dataLabel)({v:l.value/Q.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:z.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(ge.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:c[3]||(c[3]=l=>z.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",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-1c475578"]]);exports.default=Ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Clt49H-j.cjs"),me=require("./Title-CUD-K-0i.cjs"),le=require("./usePrinter-B9AbYwAC.cjs"),ge=require("./DataTable-Di-7_6Aq.cjs"),fe=require("./Legend-DHtuLr86.cjs"),ke=require("./vue-ui-skeleton-Gizw7vdX.cjs"),pe=require("./Slicer-B-Doztix.cjs"),be=require("./vue-ui-accordion-Czitboqc.cjs"),ae=require("./useNestedProp-y541YeYg.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Le=["stop-color"],Se=["stop-color"],Ve=["stop-color"],$e={key:0},ze=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Ie=["text-anchor","font-size","fill","transform"],Oe=["x1","y1","x2","y2","stroke","stroke-width"],Me={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},at=["x","y","width","height","fill"],ot=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],rt=["onKeypress","cx","cy","r"],nt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(oe,{expose:ue,emit:M}){const B=oe,{vue_ui_donut_evolution:re}=r.useConfig(),$=e.computed(()=>!!B.dataset&&B.dataset.length),i=e.ref({start:0,end:Math.max(...B.dataset.map(a=>a.values.length))});function ne(){i.value={start:0,end:S.value},W.value+=1}e.onMounted(()=>{r.objectIsEmpty(B.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):B.dataset.length&&B.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})});const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),k=e.ref(!1),p=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const a=ae.useNestedProp({userConfig:B.config,defaultConfig:re});return a.theme?{...ae.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||B.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),z=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(B.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),B.dataset.map((a,c)=>({...a,values:a.values||[],color:r.convertColorToHex(a.color)||se.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),L=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),S=e.computed(()=>Math.max(...L.value.map(a=>a.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=L.value.map(x=>x.values[o]??null),d=v.filter(x=>[void 0,null].includes(x)).length===v.length,b=v.reduce((x,f)=>x+f,0),O=v.map(x=>x/b),w=u.value.left+g.value*o+g.value/2;a.push({index:o,percentages:O,subtotal:d||b<0?null:b,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=g.value/2*.7,b=d>n.value.width/16?n.value.width/16:d,O=h.value===o.index?n.value.width/16:b,w=a.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,x=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:x,radius:b,activeRadius:O,hoverRadius:w,donut:r.makeDonut({series:L.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[v]??0}))},o.x,x,b,b,1.99999,2,1,360,105.25,b/2),donutHover:r.makeDonut({series:L.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[v]??0}))},o.x,x,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:L.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[v]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(a){return a/E.value.max}const ie=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(a),value:a})));function Y(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function j(){k.value||(h.value=null,A.value=null)}function de(a){k.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,k.value=!0,p.value=a,[null,void 0].includes(c)||(P.value=c))}function K(){p.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>I(a.uid),isSegregated:y.value.includes(a.uid)}))),Q=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ve=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 I(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}p.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<S.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,b)=>d+b,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(a){V.value=a,R.value+=1}function ee(){z.value.showTable=!z.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{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"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),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:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":`${t.value.style.chart.backgroundColor}${e.unref(r.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(r.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Le),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(r.opacity)[30]},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ze),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Pe)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,Te)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===S.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*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,Ie)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Oe)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Me,[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,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(Y(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Xe)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[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,Ye)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(F(l.subtotal,l,s)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:o=>de(l),onMouseleave:j,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,rt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),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+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[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(Y(l,p.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(F(p.value.subtotal,p.value,a.i)),9,yt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[p.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(p.value.index)+Number(i.value.start)]),9,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),S.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe.Slicer,{key:`slicer_${W.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:S.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:ne},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:c[2]||(c[2]=({legend:l})=>I(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>I(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":e.unref(r.dataLabel)({v:l.value/Q.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:z.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(ge.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:c[3]||(c[3]=l=>z.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",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-1c475578"]]);exports.default=Ct;
@@ -1,13 +1,13 @@
1
1
  import { computed as x, ref as L, onMounted as Xe, openBlock as a, createElementBlock as u, normalizeClass as F, normalizeStyle as B, createVNode as Le, createCommentVNode as d, createBlock as R, unref as c, createSlots as Ge, withCtx as P, renderSlot as T, normalizeProps as ae, guardReactiveProps as ue, createElementVNode as v, Fragment as m, renderList as p, toDisplayString as b, withKeys as Be, createTextVNode as $e, nextTick as je } from "vue";
2
- import { u as Ye, o as Ke, e as j, g as qe, c as Se, t as Je, a as Qe, p as Y, b as Ze, d as oe, A as Ae, m as se, X as et, v as re, B as tt, i as ne, f as K, j as Ne, k as q, n as ze, E as Fe, q as lt, r as at } from "./index-CQyrBpOX.js";
3
- import { _ as ut } from "./Title-DJW7JJGo.js";
4
- import { u as ot, U as st } from "./usePrinter-BJn_Etby.js";
5
- import { D as rt } from "./DataTable-CcVgHrwx.js";
6
- import { L as nt } from "./Legend-BPGeRVxf.js";
7
- import it from "./vue-ui-skeleton-CjYyI3Lv.js";
8
- import { S as ct } from "./Slicer-Dr5g4_di.js";
9
- import vt from "./vue-ui-accordion-DqRnuig6.js";
10
- import { u as Pe } from "./useNestedProp-CK_S9Ya9.js";
2
+ import { u as Ye, o as Ke, e as j, g as qe, c as Se, t as Je, a as Qe, p as Y, b as Ze, d as oe, A as Ae, m as se, X as et, v as re, B as tt, i as ne, f as K, j as Ne, k as q, n as ze, E as Fe, q as lt, r as at } from "./index-CLohkSjv.js";
3
+ import { _ as ut } from "./Title-WVL1w90F.js";
4
+ import { u as ot, U as st } from "./usePrinter-CLjymPxw.js";
5
+ import { D as rt } from "./DataTable-xRoJJLCK.js";
6
+ import { L as nt } from "./Legend-DFjWlPTO.js";
7
+ import it from "./vue-ui-skeleton-Cu-FCvsL.js";
8
+ import { S as ct } from "./Slicer-CdoJYj--.js";
9
+ import vt from "./vue-ui-accordion-B6lUgTu6.js";
10
+ import { u as Pe } from "./useNestedProp-BsIUgLPI.js";
11
11
  import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const ht = ["id"], yt = ["xmlns", "viewBox"], ft = ["id"], gt = ["stop-color"], bt = ["stop-color"], xt = ["id"], mt = ["stop-color"], pt = ["stop-color"], kt = ["stop-color"], _t = { key: 0 }, Ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], wt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Lt = { key: 0 }, $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], St = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], At = ["x", "y", "font-size", "fill", "font-weight"], Nt = ["text-anchor", "font-size", "fill", "transform"], zt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ft = { key: 1 }, Pt = ["cx", "cy", "r", "fill"], Dt = { key: 0 }, Tt = { key: 0 }, Et = ["d", "stroke"], It = ["text-anchor", "x", "y", "fill"], Ot = ["cx", "cy", "r", "fill"], Vt = { key: 0 }, Ht = ["cx", "cy", "fill"], Mt = { key: 1 }, Wt = ["d", "fill", "stroke"], Rt = { key: 2 }, Ut = ["d", "fill", "stroke"], Xt = ["x", "y", "font-size", "fill"], Gt = ["x", "y", "width", "fill", "onClick"], Bt = ["x", "y", "width", "height", "onMouseenter", "onClick"], jt = {
13
13
  key: 3,
@@ -1,14 +1,14 @@
1
1
  import { computed as g, ref as d, onMounted as Me, onBeforeUnmount as Ge, watch as Ue, openBlock as s, createElementBlock as n, normalizeClass as ue, normalizeStyle as S, renderSlot as p, createVNode as se, createCommentVNode as v, createBlock as Q, unref as o, createSlots as Ee, withCtx as w, normalizeProps as W, guardReactiveProps as Y, createElementVNode as b, Fragment as V, renderList as H, toDisplayString as _, createTextVNode as Se, nextTick as je, pushScopeId as Re, popScopeId as We } from "vue";
2
- import { u as Ye, o as He, e as Te, g as Xe, c as qe, t as Je, a as Ke, p as A, b as Qe, d as Z, m as Ze, f as C, X as el, v as ll, j as tl, D as al, i as T, k as y, n as X, w as ol, q as ul, r as sl } from "./index-CQyrBpOX.js";
2
+ import { u as Ye, o as He, e as Te, g as Xe, c as qe, t as Je, a as Ke, p as A, b as Qe, d as Z, m as Ze, f as C, X as el, v as ll, j as tl, D as al, i as T, k as y, n as X, w as ol, q as ul, r as sl } from "./index-CLohkSjv.js";
3
3
  import { t as rl, u as nl } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as il } from "./Title-DJW7JJGo.js";
5
- import { u as vl, U as cl } from "./usePrinter-BJn_Etby.js";
6
- import { D as dl } from "./DataTable-CcVgHrwx.js";
7
- import { _ as hl } from "./Tooltip-pvQzx3z4.js";
8
- import { L as yl } from "./Legend-BPGeRVxf.js";
9
- import fl from "./vue-ui-skeleton-CjYyI3Lv.js";
10
- import bl from "./vue-ui-accordion-DqRnuig6.js";
11
- import { u as Fe } from "./useNestedProp-CK_S9Ya9.js";
4
+ import { _ as il } from "./Title-WVL1w90F.js";
5
+ import { u as vl, U as cl } from "./usePrinter-CLjymPxw.js";
6
+ import { D as dl } from "./DataTable-xRoJJLCK.js";
7
+ import { _ as hl } from "./Tooltip-B5_8pR7S.js";
8
+ import { L as yl } from "./Legend-DFjWlPTO.js";
9
+ import fl from "./vue-ui-skeleton-Cu-FCvsL.js";
10
+ import bl from "./vue-ui-accordion-B6lUgTu6.js";
11
+ import { u as Fe } from "./useNestedProp-BsIUgLPI.js";
12
12
  import { _ as gl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const pl = (M) => (Re("data-v-66476e18"), M = M(), We(), M), ml = ["id"], wl = ["xmlns", "viewBox"], kl = ["id"], _l = ["stop-color"], Cl = ["stop-color"], xl = ["stop-color"], $l = ["id"], Ll = ["id"], Sl = /* @__PURE__ */ pl(() => /* @__PURE__ */ b("feColorMatrix", {
14
14
  type: "saturate",
@@ -1,13 +1,13 @@
1
1
  import { computed as m, ref as g, onMounted as Q, onBeforeUnmount as pe, openBlock as o, createElementBlock as r, normalizeClass as ee, normalizeStyle as D, createVNode as te, createCommentVNode as f, createBlock as F, unref as d, createSlots as _e, withCtx as _, renderSlot as C, normalizeProps as le, guardReactiveProps as ae, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as se, nextTick as xe } from "vue";
2
- import { u as ke, c as oe, t as Ce, o as we, e as re, g as $e, A as Le, f as z, X as ne, i as E, l as ue, h as ie, q as ze, r as Xe } from "./index-CQyrBpOX.js";
2
+ import { u as ke, c as oe, t as Ce, o as we, e as re, g as $e, A as Le, f as z, X as ne, i as E, l as ue, h as ie, q as ze, r as Xe } from "./index-CLohkSjv.js";
3
3
  import { t as Ae, u as Se } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Ne } from "./Title-DJW7JJGo.js";
5
- import { u as Te, U as Pe } from "./usePrinter-BJn_Etby.js";
6
- import { D as Ge } from "./DataTable-CcVgHrwx.js";
7
- import Ie from "./vue-ui-skeleton-CjYyI3Lv.js";
8
- import { L as Me } from "./Legend-BPGeRVxf.js";
9
- import De from "./vue-ui-accordion-DqRnuig6.js";
10
- import { u as ce } from "./useNestedProp-CK_S9Ya9.js";
4
+ import { _ as Ne } from "./Title-WVL1w90F.js";
5
+ import { u as Te, U as Pe } from "./usePrinter-CLjymPxw.js";
6
+ import { D as Ge } from "./DataTable-xRoJJLCK.js";
7
+ import Ie from "./vue-ui-skeleton-Cu-FCvsL.js";
8
+ import { L as Me } from "./Legend-DFjWlPTO.js";
9
+ import De from "./vue-ui-accordion-B6lUgTu6.js";
10
+ import { u as ce } from "./useNestedProp-BsIUgLPI.js";
11
11
  import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Oe = ["id"], Ve = ["xmlns", "viewBox"], Ee = { key: 0 }, We = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], He = { key: 1 }, Re = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Be = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ue = { key: 2 }, je = ["x", "y", "font-size", "fill", "font-weight"], qe = ["x", "y", "font-size", "fill"], Ye = { key: 3 }, Ze = ["x", "y", "font-size", "fill", "font-weight"], Je = ["id"], Ke = ["stop-color"], Qe = ["stop-color"], et = ["stop-color"], tt = ["id"], lt = ["stop-color"], at = ["stop-color"], st = ["stop-color"], ot = ["id"], rt = ["stop-color"], nt = ["stop-color"], ut = ["id"], it = ["stop-color"], ct = ["stop-color"], dt = { key: 0 }, vt = ["d", "fill"], ht = { key: 1 }, yt = ["x", "y", "height", "width", "fill"], bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ft = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], gt = { key: 2 }, mt = ["x", "y", "fill", "font-size"], pt = { key: 3 }, _t = ["x", "y", "fill", "font-size"], xt = {
13
13
  key: 3,