vue-data-ui 2.6.4 → 2.6.5

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 (157) hide show
  1. package/dist/{Arrow-CJeP3IfV.cjs → Arrow-CyeGXbbD.cjs} +1 -1
  2. package/dist/{Arrow-BNRsG_PK.js → Arrow-DfGZcZu4.js} +1 -1
  3. package/dist/{BaseIcon-BOR1UXkg.cjs → BaseIcon-B5DvqSYe.cjs} +1 -1
  4. package/dist/{BaseIcon-DAD8bWYx.js → BaseIcon-BzuvxztF.js} +1 -1
  5. package/dist/{DataTable-Bg0b_pVK.js → DataTable-BCCBpyhr.js} +2 -2
  6. package/dist/{DataTable-C1LMti1U.cjs → DataTable-zpYtivMM.cjs} +1 -1
  7. package/dist/{Legend-CMzKRWtT.cjs → Legend-CJkkmRNE.cjs} +1 -1
  8. package/dist/{Legend-Ba6qRAqc.js → Legend-CyJrN721.js} +2 -2
  9. package/dist/{PackageVersion-2gojTmrp.cjs → PackageVersion-Dv25_ZxF.cjs} +1 -1
  10. package/dist/{PackageVersion-C5hOoj_p.js → PackageVersion-PZr4BkQ5.js} +1 -1
  11. package/dist/{PenAndPaper-BJLUyj-s.js → PenAndPaper-Cniu2YEX.js} +3 -3
  12. package/dist/{PenAndPaper-Bwxr_PKm.cjs → PenAndPaper-Cx3_Liuv.cjs} +1 -1
  13. package/dist/{Shape-BXfC7I_g.js → Shape-BXTmpde5.js} +1 -1
  14. package/dist/{Shape-DTKetM4N.cjs → Shape-GAZUIBfN.cjs} +1 -1
  15. package/dist/{Slicer-bCt9Cx4y.js → Slicer-D3tEQT9Z.js} +2 -2
  16. package/dist/{Slicer-Park25Rm.cjs → Slicer-DzKrIvL0.cjs} +1 -1
  17. package/dist/{Title-AFFkNb_h.js → Title-CXBc1TH6.js} +1 -1
  18. package/dist/{Title-vXH_7MPz.cjs → Title-DdUtciJN.cjs} +1 -1
  19. package/dist/{Tooltip-C7eukp_Y.cjs → Tooltip-BlGVq6xj.cjs} +1 -1
  20. package/dist/{Tooltip-C6qF6AOJ.js → Tooltip-C9lPh5bN.js} +1 -1
  21. package/dist/{index-y7ebFPbO.js → index-DLCyjPV0.js} +7 -7
  22. package/dist/index-DSGAenF3.cjs +9 -0
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-BzGIy5aD.cjs → useNestedProp-BdTohsDJ.cjs} +1 -1
  25. package/dist/{useNestedProp-BWzyGJZ8.js → useNestedProp-q86V3_LA.js} +1 -1
  26. package/dist/{usePrinter-DY6H-UkT.cjs → usePrinter-CPqTP09H.cjs} +1 -1
  27. package/dist/{usePrinter-xz0bcBPM.js → usePrinter-CpHZjw3G.js} +1 -1
  28. package/dist/{vue-data-ui-DI586Tl5.cjs → vue-data-ui-CR9Dof80.cjs} +1 -1
  29. package/dist/{vue-data-ui-lvrlgytd.js → vue-data-ui-CzqznXmA.js} +61 -61
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-7ciIKlHS.js → vue-ui-3d-bar-DvHdA_uo.js} +9 -9
  33. package/dist/{vue-ui-3d-bar-BZgGJ_4E.cjs → vue-ui-3d-bar-vvpkf_bv.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-DxSGI7GJ.js → vue-ui-accordion-DR2qjfsa.js} +3 -3
  35. package/dist/{vue-ui-accordion-D3UeWj9q.cjs → vue-ui-accordion-FM16tlk7.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-D8CKdfwE.js → vue-ui-age-pyramid-BoXxK9_W.js} +10 -10
  37. package/dist/{vue-ui-age-pyramid-C-3bEzow.cjs → vue-ui-age-pyramid-CMMnrI3R.cjs} +1 -1
  38. package/dist/{vue-ui-annotator-B4_flLm1.cjs → vue-ui-annotator-5tI8NuFh.cjs} +1 -1
  39. package/dist/{vue-ui-annotator-Cu9TPyUl.js → vue-ui-annotator-D4kCCpAK.js} +1 -1
  40. package/dist/{vue-ui-bullet-BEssjqEW.js → vue-ui-bullet-X3Xa_OZ6.js} +8 -8
  41. package/dist/{vue-ui-bullet-CS48Jn1m.cjs → vue-ui-bullet-nXPlud-q.cjs} +1 -1
  42. package/dist/{vue-ui-candlestick-B85sWqPO.cjs → vue-ui-candlestick-B6T0LhEG.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-DW7NHW5L.js → vue-ui-candlestick-BTW5toA5.js} +11 -11
  44. package/dist/{vue-ui-carousel-table--yu4e9Dn.cjs → vue-ui-carousel-table-Cmnwv9Y3.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-BDgIKnZ6.js → vue-ui-carousel-table-D7s_SrJR.js} +4 -4
  46. package/dist/{vue-ui-chestnut-CohERgOT.cjs → vue-ui-chestnut-D8Gq_i77.cjs} +1 -1
  47. package/dist/{vue-ui-chestnut-wiZb3STX.js → vue-ui-chestnut-DN9EZShg.js} +8 -8
  48. package/dist/{vue-ui-circle-pack-D0DnGODv.cjs → vue-ui-circle-pack-DCz3OWlu.cjs} +1 -1
  49. package/dist/{vue-ui-circle-pack-CCbFwcZq.js → vue-ui-circle-pack-ts3rurGX.js} +9 -9
  50. package/dist/{vue-ui-cursor-Br93sq6V.cjs → vue-ui-cursor-CpWkrHpR.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-DqFQ-PMZ.js → vue-ui-cursor-SW96fYT3.js} +2 -2
  52. package/dist/{vue-ui-dashboard-lSSaetgV.js → vue-ui-dashboard-BZcfgajg.js} +2 -2
  53. package/dist/{vue-ui-dashboard-BwnE3PnW.cjs → vue-ui-dashboard-Buh9xBz-.cjs} +1 -1
  54. package/dist/{vue-ui-digits-BbKoWo0v.js → vue-ui-digits-C00yOT24.js} +2 -2
  55. package/dist/{vue-ui-digits-DyMxtXim.cjs → vue-ui-digits-rB78vJRR.cjs} +1 -1
  56. package/dist/{vue-ui-donut-BPY9X0nr.js → vue-ui-donut-BkGR2Q-_.js} +13 -14
  57. package/dist/{vue-ui-donut-BFdOEkVv.cjs → vue-ui-donut-BpgK-I9o.cjs} +1 -1
  58. package/dist/{vue-ui-donut-evolution-WWwGlSFZ.js → vue-ui-donut-evolution-B7WrjiTO.js} +12 -12
  59. package/dist/{vue-ui-donut-evolution-572FJh5z.cjs → vue-ui-donut-evolution-BVJCDPQ2.cjs} +1 -1
  60. package/dist/{vue-ui-dumbbell-CTCUgGKD.cjs → vue-ui-dumbbell-DRcemHVG.cjs} +1 -1
  61. package/dist/{vue-ui-dumbbell-otpZLJRb.js → vue-ui-dumbbell-gQadUH53.js} +10 -10
  62. package/dist/{vue-ui-flow-Dr2lzUkJ.js → vue-ui-flow-CqSTZbgP.js} +9 -9
  63. package/dist/{vue-ui-flow-BcqEMc_I.cjs → vue-ui-flow-DdQsK5DR.cjs} +1 -1
  64. package/dist/{vue-ui-funnel-D3WFS9UV.cjs → vue-ui-funnel-Bq4yoTfd.cjs} +1 -1
  65. package/dist/{vue-ui-funnel-DhAgAXS7.js → vue-ui-funnel-Jr9TMTsq.js} +9 -9
  66. package/dist/{vue-ui-galaxy-Com-d71M.js → vue-ui-galaxy-BrQ10tPo.js} +11 -11
  67. package/dist/{vue-ui-galaxy-wA-JkujS.cjs → vue-ui-galaxy-ia1UNlpc.cjs} +1 -1
  68. package/dist/{vue-ui-gauge-DseS2Wjw.cjs → vue-ui-gauge-C3FbYOSi.cjs} +1 -1
  69. package/dist/{vue-ui-gauge-D5cWSaYs.js → vue-ui-gauge-DOMio6Mv.js} +8 -8
  70. package/dist/{vue-ui-gizmo-C4hyVlqo.cjs → vue-ui-gizmo-C3NimqVM.cjs} +1 -1
  71. package/dist/{vue-ui-gizmo-D7Y4R-bm.js → vue-ui-gizmo-SKS1idHb.js} +3 -3
  72. package/dist/{vue-ui-heatmap-rlqRMQeh.cjs → vue-ui-heatmap-BCau2Z3U.cjs} +1 -1
  73. package/dist/{vue-ui-heatmap-B60uAj5d.js → vue-ui-heatmap-l4vCjb6f.js} +13 -13
  74. package/dist/{vue-ui-history-plot-CmOEQx8n.js → vue-ui-history-plot-B05tJML1.js} +11 -11
  75. package/dist/{vue-ui-history-plot-CC4-ii7H.cjs → vue-ui-history-plot-DL7VjOd0.cjs} +1 -1
  76. package/dist/{vue-ui-kpi-B9SmpjuD.js → vue-ui-kpi-DF4U5E1w.js} +3 -3
  77. package/dist/{vue-ui-kpi-uxIO9tVc.cjs → vue-ui-kpi-DQJr571M.cjs} +1 -1
  78. package/dist/{vue-ui-mini-loader-Bpp9yfiB.js → vue-ui-mini-loader-BMARnOW4.js} +2 -2
  79. package/dist/{vue-ui-mini-loader-B8n-qGUz.cjs → vue-ui-mini-loader-BZkVKkqn.cjs} +1 -1
  80. package/dist/{vue-ui-molecule-D5DCX4SJ.cjs → vue-ui-molecule-B5XDGmLx.cjs} +1 -1
  81. package/dist/{vue-ui-molecule-9de6y3_R.js → vue-ui-molecule-C1ycekVJ.js} +11 -11
  82. package/dist/{vue-ui-mood-radar-uHW_8xE-.cjs → vue-ui-mood-radar-DyMCJKFb.cjs} +1 -1
  83. package/dist/{vue-ui-mood-radar-D2pdih9T.js → vue-ui-mood-radar-_Kd-Lhpm.js} +11 -11
  84. package/dist/{vue-ui-nested-donuts-BCtAAmdG.cjs → vue-ui-nested-donuts-B4Am-r6T.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-wLxqfAFm.js → vue-ui-nested-donuts-DIwRSn-O.js} +11 -11
  86. package/dist/{vue-ui-onion-Vz2j7gWm.js → vue-ui-onion-Dqb0gwGl.js} +11 -11
  87. package/dist/{vue-ui-onion-CK_xa2M4.cjs → vue-ui-onion-YeBdJrdx.cjs} +1 -1
  88. package/dist/{vue-ui-parallel-coordinate-plot-CZRX2Hss.cjs → vue-ui-parallel-coordinate-plot-CoecETlm.cjs} +1 -1
  89. package/dist/{vue-ui-parallel-coordinate-plot-BQdLDI5B.js → vue-ui-parallel-coordinate-plot-De-tYNNy.js} +12 -12
  90. package/dist/{vue-ui-quadrant-iPPHj_cd.js → vue-ui-quadrant-BQ5maxJq.js} +15 -15
  91. package/dist/{vue-ui-quadrant-CalJqNte.cjs → vue-ui-quadrant-Btzq3qNJ.cjs} +1 -1
  92. package/dist/{vue-ui-quick-chart-CFUOFUU_.cjs → vue-ui-quick-chart-5cWjffLJ.cjs} +1 -1
  93. package/dist/{vue-ui-quick-chart-CV1VBbY1.js → vue-ui-quick-chart-DF_510YT.js} +9 -9
  94. package/dist/{vue-ui-radar-DsialWJl.js → vue-ui-radar-DDHd0AYs.js} +13 -15
  95. package/dist/{vue-ui-radar-B2gn7R-V.cjs → vue-ui-radar-t22bqFiQ.cjs} +1 -1
  96. package/dist/{vue-ui-rating-4gM1AlYy.js → vue-ui-rating-Chi3OOtp.js} +2 -2
  97. package/dist/{vue-ui-rating-B3W6ZWnp.cjs → vue-ui-rating-D9kQcY2a.cjs} +1 -1
  98. package/dist/{vue-ui-relation-circle-D6ZiupHh.js → vue-ui-relation-circle-CV1xQOok.js} +7 -7
  99. package/dist/{vue-ui-relation-circle-YEAFQh-9.cjs → vue-ui-relation-circle-CWgGPxDJ.cjs} +1 -1
  100. package/dist/{vue-ui-rings-B9BPvha3.cjs → vue-ui-rings-CiLJkRwa.cjs} +2 -2
  101. package/dist/{vue-ui-rings-CbIo_ZYH.js → vue-ui-rings-D2ezwyae.js} +13 -14
  102. package/dist/{vue-ui-scatter-BqSstAAz.cjs → vue-ui-scatter-B24gGA8q.cjs} +1 -1
  103. package/dist/{vue-ui-scatter-CQ-Vdmeu.js → vue-ui-scatter-BxbUYPk1.js} +13 -13
  104. package/dist/{vue-ui-screenshot-0RZZXp_S.cjs → vue-ui-screenshot-Bc7Lv1i8.cjs} +1 -1
  105. package/dist/{vue-ui-screenshot-BEV-kvIS.js → vue-ui-screenshot-cxDgcXJB.js} +1 -1
  106. package/dist/{vue-ui-skeleton-DOahsJXV.js → vue-ui-skeleton-D6ojufhb.js} +3 -3
  107. package/dist/{vue-ui-skeleton-DkW8eWHI.cjs → vue-ui-skeleton-DvdPnQbR.cjs} +1 -1
  108. package/dist/{vue-ui-smiley-DY8lN1W3.js → vue-ui-smiley-9nGRDSn7.js} +2 -2
  109. package/dist/{vue-ui-smiley-B9xk5OKe.cjs → vue-ui-smiley-DEJ6S-We.cjs} +1 -1
  110. package/dist/{vue-ui-spark-trend-CGoCmXa9.cjs → vue-ui-spark-trend-BosbwgVe.cjs} +1 -1
  111. package/dist/{vue-ui-spark-trend-XDdEKIe6.js → vue-ui-spark-trend-DiNeAGXR.js} +5 -5
  112. package/dist/{vue-ui-sparkbar-QikBTVyy.cjs → vue-ui-sparkbar-DGFKrcg0.cjs} +1 -1
  113. package/dist/{vue-ui-sparkbar-CGpwWIBE.js → vue-ui-sparkbar-DNf_Majv.js} +4 -4
  114. package/dist/{vue-ui-sparkgauge-CeNuuLof.js → vue-ui-sparkgauge-D89HjxSK.js} +4 -4
  115. package/dist/{vue-ui-sparkgauge-ZDhKN9Pz.cjs → vue-ui-sparkgauge-DwK7dzdJ.cjs} +1 -1
  116. package/dist/{vue-ui-sparkhistogram-DLEumotF.js → vue-ui-sparkhistogram-CU1_P6AJ.js} +21 -21
  117. package/dist/vue-ui-sparkhistogram-DKoI6_TT.cjs +1 -0
  118. package/dist/vue-ui-sparkline-Bp7GMRrA.cjs +1 -0
  119. package/dist/{vue-ui-sparkline-b9FXu2wY.js → vue-ui-sparkline-C2McLmh5.js} +136 -140
  120. package/dist/{vue-ui-sparkstackbar-CQFec5Ni.js → vue-ui-sparkstackbar-Cu4aG9PB.js} +8 -6
  121. package/dist/vue-ui-sparkstackbar-Dayxdcr7.cjs +1 -0
  122. package/dist/{vue-ui-stackbar-B50_Zmpe.js → vue-ui-stackbar-6m5CpvNM.js} +13 -13
  123. package/dist/{vue-ui-stackbar-B24Xho-6.cjs → vue-ui-stackbar-C21xTVy9.cjs} +1 -1
  124. package/dist/{vue-ui-strip-plot-DzTWLY9k.cjs → vue-ui-strip-plot-DAo8FMup.cjs} +1 -1
  125. package/dist/{vue-ui-strip-plot-DBEKI4DJ.js → vue-ui-strip-plot-DlZ2Eez4.js} +11 -11
  126. package/dist/{vue-ui-table-DeQeB-f6.cjs → vue-ui-table-BjhcV9qB.cjs} +1 -1
  127. package/dist/{vue-ui-table-CiJBrzOj.js → vue-ui-table-U0_3I0fu.js} +1 -1
  128. package/dist/{vue-ui-table-heatmap-DQMdZaE0.cjs → vue-ui-table-heatmap-Bfqytiv5.cjs} +1 -1
  129. package/dist/{vue-ui-table-heatmap-CjnQNUKw.js → vue-ui-table-heatmap-BrGkCaOG.js} +4 -4
  130. package/dist/{vue-ui-table-sparkline-DqBjtjvu.js → vue-ui-table-sparkline-C1wNBDqO.js} +5 -5
  131. package/dist/{vue-ui-table-sparkline-Bu6vSST9.cjs → vue-ui-table-sparkline-CXlnp8E3.cjs} +1 -1
  132. package/dist/{vue-ui-thermometer-DQr-b2tS.js → vue-ui-thermometer-Bx2abW1B.js} +11 -11
  133. package/dist/vue-ui-thermometer-CBdAwYdC.cjs +1 -0
  134. package/dist/{vue-ui-timer-lsgsV998.js → vue-ui-timer-3UkgrtEj.js} +5 -5
  135. package/dist/{vue-ui-timer-B18HFp7S.cjs → vue-ui-timer-CRDQbqJ_.cjs} +1 -1
  136. package/dist/{vue-ui-tiremarks-D1A57_oK.cjs → vue-ui-tiremarks-C78mfaBr.cjs} +1 -1
  137. package/dist/{vue-ui-tiremarks-C7Dw9KnQ.js → vue-ui-tiremarks-C_xuD4De.js} +7 -7
  138. package/dist/{vue-ui-treemap-qSvP_IHI.js → vue-ui-treemap-BjDSR72h.js} +11 -11
  139. package/dist/{vue-ui-treemap-DurUVYzG.cjs → vue-ui-treemap-CP__1pdb.cjs} +1 -1
  140. package/dist/{vue-ui-vertical-bar-C-liaL8N.cjs → vue-ui-vertical-bar-DTB8r4LH.cjs} +2 -2
  141. package/dist/{vue-ui-vertical-bar-D9eDAZF3.js → vue-ui-vertical-bar-DUhOoSNl.js} +15 -16
  142. package/dist/{vue-ui-waffle-CaGazi4R.cjs → vue-ui-waffle-CrVyCF7k.cjs} +1 -1
  143. package/dist/{vue-ui-waffle-CFzcClhK.js → vue-ui-waffle-Dpox5n5s.js} +13 -13
  144. package/dist/{vue-ui-wheel-CIHLvNK5.cjs → vue-ui-wheel-DV2zgr4d.cjs} +1 -1
  145. package/dist/{vue-ui-wheel-tsJlAaV1.js → vue-ui-wheel-ykD8OULJ.js} +7 -7
  146. package/dist/{vue-ui-word-cloud-BxEfdctG.cjs → vue-ui-word-cloud-DBkAo2uX.cjs} +1 -1
  147. package/dist/{vue-ui-word-cloud-CelTdM-N.js → vue-ui-word-cloud-u5S86-Ft.js} +10 -10
  148. package/dist/{vue-ui-xy-CaEGEO6l.js → vue-ui-xy-0nBQDwL2.js} +15 -16
  149. package/dist/{vue-ui-xy-canvas-DBWb4s2q.js → vue-ui-xy-canvas-DI7LiD4U.js} +11 -11
  150. package/dist/{vue-ui-xy-canvas-CrU_aS7K.cjs → vue-ui-xy-canvas-yQlThVu7.cjs} +1 -1
  151. package/dist/{vue-ui-xy-BMTIOJmU.cjs → vue-ui-xy-mEVVQr_U.cjs} +2 -2
  152. package/package.json +1 -1
  153. package/dist/index-Cww7pocd.cjs +0 -9
  154. package/dist/vue-ui-sparkhistogram-BN2N7qor.cjs +0 -1
  155. package/dist/vue-ui-sparkline-BmaYIS-1.cjs +0 -1
  156. package/dist/vue-ui-sparkstackbar-hxwlugf0.cjs +0 -1
  157. package/dist/vue-ui-thermometer-DCv2Gvg0.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cww7pocd.cjs"),fe=require("./useResponsive-YQYQrAZ_.cjs"),Ie=require("./Title-vXH_7MPz.cjs"),ye=require("./usePrinter-DY6H-UkT.cjs"),Fe=require("./Tooltip-C7eukp_Y.cjs"),ze=require("./DataTable-C1LMti1U.cjs"),Oe=require("./Legend-CMzKRWtT.cjs"),Ae=require("./vue-ui-skeleton-DkW8eWHI.cjs"),De=require("./vue-ui-accordion-D3UeWj9q.cjs"),me=require("./useNestedProp-BzGIy5aD.cjs"),qe=require("./PackageVersion-2gojTmrp.cjs"),Me=require("./PenAndPaper-Bwxr_PKm.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./Shape-DTKetM4N.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ge=["id"],We=["xmlns","viewBox"],He=["id"],Ye=["stop-color"],Xe=["stop-color"],Je=["id"],Ke=["x","y","height","width"],Qe=["height","width"],Ze={key:0},et=["rx","x","y","height","width","stroke","stroke-width","filter"],tt=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],lt={key:1},at=["rx","x","y","height","width","fill","filter"],ot=["x","y","height","width","filter"],rt={key:0},ut={key:1},nt={key:2},st={key:3},it=["onMouseover","x","y","height","width"],ct={key:5,class:"vue-data-ui-watermark"},vt=["onClick"],dt={key:0},pt={key:1},ht=["innerHTML"],ft={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ge,{expose:be,emit:ke}){const{vue_ui_waffle:we}=n.useConfig(),p=ge,Ce=e.useSlots(),V=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),xe=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),_=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ee(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Re.useUserOptionState({config:t.value});function ee(){const l=me.useNestedProp({userConfig:p.config,defaultConfig:we});return l.theme?{...me.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=ee(),D.value=!t.value.userOptions.showOnChartHover,te(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const P=e.ref(null);function te(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=fe.throttle(()=>{const{width:o,height:a}=fe.useResponsive({chart:_.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,m.value.width=o,m.value.height=a})});P.value=new ResizeObserver(l),P.value.observe(_.value.parentNode)}}e.onMounted(()=>{te()}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:re}=ye.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),m=e.ref({top:0,left:0,height:512,width:512}),g=e.computed(()=>(m.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(m.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>m.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>m.value.height/t.value.style.chart.layout.grid.size);function ne(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),u=r.map(Math.floor),i=r.map(h=>h%1);let d=o-u.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function se(){return p.dataset.map((l,o)=>({...l,color:n.convertColorToHex(l.color)||ue.value[o]||n.palette[o]||n.palette[o%n.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>se()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=se()},{deep:!0});const _e=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return ne(l)}),Se=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return ne(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:_e.value[o]})))),$e=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Se.value[o]})));function Ne(){return $e.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Te=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,u=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(u);d+=1)i.push(d);return l=u,{...o,start:r,rects:i}})}),s=e.computed(()=>Te.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),S=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(g.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+m.value.top});return l}),v=e.ref([]),x=e.ref(!1),ie=e.ref(null),ce=e.ref(null);function ve(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<$.value.length-1&&$.value.length>1&&v.value.push(l);return}const o=q.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0),a=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>u?(cancelAnimationFrame(ie.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,r+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ie.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=o;i()}else if(v.value.length<$.value.length-1&&$.value.length>1){let u=function(){r<a/100?(cancelAnimationFrame(ce.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ce.value=requestAnimationFrame(u))};u()}Pe("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const $=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||n.palette[o]||n.palette[o%n.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>ve(l.uid),isSegregated:v.value.includes(l.uid)}))),Le=e.computed(()=>({cy:"waffle-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":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Ve(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${Ce.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${u})</span></div>`:r+=`<b>${u}%</b></div>`}A.value=r}}const Pe=ke,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function de(){e.nextTick(()=>{const l=w.value.head.map((r,u)=>[[r.name],[w.value.body[u]],[isNaN(w.value.body[u]/k.value)?"-":w.value.body[u]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(o);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":n.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={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},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),N=e.ref(!1);function Ee(l){N.value=l,j.value+=1}function pe(){y.value.showTable=!y.value.showTable}function he(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return be({getData:Ne,generatePdf:oe,generateCsv:de,generateImage:re,toggleTable:pe,toggleTooltip:he,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ie._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:xe,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,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:N.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ee,onGeneratePdf:e.unref(oe),onGenerateCsv:de,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(qe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Xe)],8,He))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Je)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ke))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:m.value.height-24,width:m.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Qe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,tt))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,at))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",rt,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",ut,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",nt," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,ot)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>Ve(r),onMouseleave:o[0]||(o[0]=u=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,it))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,We)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${K.value}`,legendSet:$.value,config:Le.value,onClickMarker:o[1]||(o[1]=({legend:a})=>ve(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.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.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(n.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,vt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(Ue._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Fe._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:_.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(De.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ze.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,ht)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ge))}},yt=je._export_sfc(ft,[["__scopeId","data-v-5a674907"]]);exports.default=yt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DSGAenF3.cjs"),fe=require("./useResponsive-YQYQrAZ_.cjs"),Ie=require("./Title-DdUtciJN.cjs"),ye=require("./usePrinter-CPqTP09H.cjs"),Fe=require("./Tooltip-BlGVq6xj.cjs"),ze=require("./DataTable-zpYtivMM.cjs"),Oe=require("./Legend-CJkkmRNE.cjs"),Ae=require("./vue-ui-skeleton-DvdPnQbR.cjs"),De=require("./vue-ui-accordion-FM16tlk7.cjs"),me=require("./useNestedProp-BdTohsDJ.cjs"),qe=require("./PackageVersion-Dv25_ZxF.cjs"),Me=require("./PenAndPaper-Cx3_Liuv.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./Shape-GAZUIBfN.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ge=["id"],We=["xmlns","viewBox"],He=["id"],Ye=["stop-color"],Xe=["stop-color"],Je=["id"],Ke=["x","y","height","width"],Qe=["height","width"],Ze={key:0},et=["rx","x","y","height","width","stroke","stroke-width","filter"],tt=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],lt={key:1},at=["rx","x","y","height","width","fill","filter"],ot=["x","y","height","width","filter"],rt={key:0},ut={key:1},nt={key:2},st={key:3},it=["onMouseover","x","y","height","width"],ct={key:5,class:"vue-data-ui-watermark"},vt=["onClick"],dt={key:0},pt={key:1},ht=["innerHTML"],ft={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ge,{expose:be,emit:ke}){const{vue_ui_waffle:we}=n.useConfig(),p=ge,Ce=e.useSlots(),V=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),xe=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),_=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ee(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Re.useUserOptionState({config:t.value});function ee(){const l=me.useNestedProp({userConfig:p.config,defaultConfig:we});return l.theme?{...me.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=ee(),D.value=!t.value.userOptions.showOnChartHover,te(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const P=e.ref(null);function te(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=fe.throttle(()=>{const{width:o,height:a}=fe.useResponsive({chart:_.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,m.value.width=o,m.value.height=a})});P.value=new ResizeObserver(l),P.value.observe(_.value.parentNode)}}e.onMounted(()=>{te()}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:re}=ye.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),m=e.ref({top:0,left:0,height:512,width:512}),g=e.computed(()=>(m.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(m.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>m.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>m.value.height/t.value.style.chart.layout.grid.size);function ne(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),u=r.map(Math.floor),i=r.map(h=>h%1);let d=o-u.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function se(){return p.dataset.map((l,o)=>({...l,color:n.convertColorToHex(l.color)||ue.value[o]||n.palette[o]||n.palette[o%n.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>se()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=se()},{deep:!0});const _e=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return ne(l)}),Se=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return ne(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:_e.value[o]})))),$e=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Se.value[o]})));function Ne(){return $e.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Te=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,u=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(u);d+=1)i.push(d);return l=u,{...o,start:r,rects:i}})}),s=e.computed(()=>Te.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),S=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(g.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+m.value.top});return l}),v=e.ref([]),x=e.ref(!1),ie=e.ref(null),ce=e.ref(null);function ve(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<$.value.length-1&&$.value.length>1&&v.value.push(l);return}const o=q.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0),a=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>u?(cancelAnimationFrame(ie.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,r+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ie.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=o;i()}else if(v.value.length<$.value.length-1&&$.value.length>1){let u=function(){r<a/100?(cancelAnimationFrame(ce.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ce.value=requestAnimationFrame(u))};u()}Pe("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const $=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||n.palette[o]||n.palette[o%n.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>ve(l.uid),isSegregated:v.value.includes(l.uid)}))),Le=e.computed(()=>({cy:"waffle-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":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Ve(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${Ce.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${u})</span></div>`:r+=`<b>${u}%</b></div>`}A.value=r}}const Pe=ke,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function de(){e.nextTick(()=>{const l=w.value.head.map((r,u)=>[[r.name],[w.value.body[u]],[isNaN(w.value.body[u]/k.value)?"-":w.value.body[u]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(o);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":n.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={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},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),N=e.ref(!1);function Ee(l){N.value=l,j.value+=1}function pe(){y.value.showTable=!y.value.showTable}function he(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return be({getData:Ne,generatePdf:oe,generateCsv:de,generateImage:re,toggleTable:pe,toggleTooltip:he,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ie._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:xe,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,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:N.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ee,onGeneratePdf:e.unref(oe),onGenerateCsv:de,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(qe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Xe)],8,He))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Je)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ke))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:m.value.height-24,width:m.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Qe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,tt))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,at))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",rt,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",ut,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",nt," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,ot)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>Ve(r),onMouseleave:o[0]||(o[0]=u=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,it))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,We)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${K.value}`,legendSet:$.value,config:Le.value,onClickMarker:o[1]||(o[1]=({legend:a})=>ve(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.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.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(n.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,vt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(Ue._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Fe._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:_.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(De.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ze.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,ht)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ge))}},yt=je._export_sfc(ft,[["__scopeId","data-v-34f2265b"]]);exports.default=yt;
@@ -1,18 +1,18 @@
1
1
  import { useSlots as lt, computed as d, ref as v, watch as ze, onMounted as at, onBeforeUnmount as ot, createElementBlock as s, openBlock as r, unref as c, normalizeStyle as W, normalizeClass as Ne, createBlock as N, createCommentVNode as y, createElementVNode as x, createVNode as se, createSlots as Be, withCtx as m, renderSlot as g, normalizeProps as q, guardReactiveProps as H, Fragment as $, renderList as L, mergeProps as Ve, toDisplayString as A, createTextVNode as Me, nextTick as ut } from "vue";
2
- import { u as rt, c as st, t as nt, p as B, a as it, o as vt, e as ne, g as ct, b as dt, i as R, f as _, X as ht, s as pt, w as yt, G as ft, L as gt, d as mt, q as bt, r as wt, x as kt, y as xt } from "./index-y7ebFPbO.js";
2
+ import { u as rt, c as st, t as nt, p as B, a as it, o as vt, e as ne, g as ct, b as dt, i as R, f as _, X as ht, s as pt, w as yt, G as ft, L as gt, d as mt, q as bt, r as wt, x as kt, y as xt } from "./index-DLCyjPV0.js";
3
3
  import { t as Ct, u as $t } from "./useResponsive-BWapHhVH.js";
4
- import { _ as _t } from "./Title-AFFkNb_h.js";
5
- import { u as Tt, U as It } from "./usePrinter-xz0bcBPM.js";
6
- import { _ as St } from "./Tooltip-C6qF6AOJ.js";
7
- import { D as Pt } from "./DataTable-Bg0b_pVK.js";
8
- import { L as Ot } from "./Legend-Ba6qRAqc.js";
9
- import Lt from "./vue-ui-skeleton-DOahsJXV.js";
10
- import At from "./vue-ui-accordion-DxSGI7GJ.js";
11
- import { u as De } from "./useNestedProp-BWzyGJZ8.js";
12
- import { _ as Ft } from "./PackageVersion-C5hOoj_p.js";
13
- import { P as zt } from "./PenAndPaper-BJLUyj-s.js";
4
+ import { _ as _t } from "./Title-CXBc1TH6.js";
5
+ import { u as Tt, U as It } from "./usePrinter-CpHZjw3G.js";
6
+ import { _ as St } from "./Tooltip-C9lPh5bN.js";
7
+ import { D as Pt } from "./DataTable-BCCBpyhr.js";
8
+ import { L as Ot } from "./Legend-CyJrN721.js";
9
+ import Lt from "./vue-ui-skeleton-D6ojufhb.js";
10
+ import At from "./vue-ui-accordion-DR2qjfsa.js";
11
+ import { u as De } from "./useNestedProp-q86V3_LA.js";
12
+ import { _ as Ft } from "./PackageVersion-PZr4BkQ5.js";
13
+ import { P as zt } from "./PenAndPaper-Cniu2YEX.js";
14
14
  import { u as Nt } from "./useUserOptionState-BIvW1Kz7.js";
15
- import { _ as Bt } from "./Shape-BXfC7I_g.js";
15
+ import { _ as Bt } from "./Shape-BXTmpde5.js";
16
16
  import { _ as Vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Mt = ["id"], Dt = ["xmlns", "viewBox"], Ut = ["id"], Gt = ["stop-color"], Rt = ["stop-color"], jt = ["id"], Et = ["x", "y", "height", "width"], Wt = ["height", "width"], qt = { key: 0 }, Ht = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Xt = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Yt = { key: 1 }, Jt = ["rx", "x", "y", "height", "width", "fill", "filter"], Kt = ["x", "y", "height", "width", "filter"], Qt = { key: 0 }, Zt = { key: 1 }, el = { key: 2 }, tl = { key: 3 }, ll = ["onMouseover", "x", "y", "height", "width"], al = {
18
18
  key: 5,
@@ -834,7 +834,7 @@ const Mt = ["id"], Dt = ["xmlns", "viewBox"], Ut = ["id"], Gt = ["stop-color"],
834
834
  }, 8, ["config"])) : y("", !0)
835
835
  ], 46, Mt));
836
836
  }
837
- }, _l = /* @__PURE__ */ Vt(nl, [["__scopeId", "data-v-5a674907"]]);
837
+ }, _l = /* @__PURE__ */ Vt(nl, [["__scopeId", "data-v-34f2265b"]]);
838
838
  export {
839
839
  _l as default
840
840
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cww7pocd.cjs"),W=require("./Title-vXH_7MPz.cjs"),E=require("./usePrinter-DY6H-UkT.cjs"),M=require("./useResponsive-YQYQrAZ_.cjs"),J=require("./vue-ui-skeleton-DkW8eWHI.cjs"),q=require("./useNestedProp-BzGIy5aD.cjs"),K=require("./PackageVersion-2gojTmrp.cjs"),Q=require("./PenAndPaper-Bwxr_PKm.cjs"),Z=require("./useUserOptionState-BgepsfED.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],ne=["xmlns","viewBox"],oe=["width","height"],le=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ae=["cx","cy","r","stroke","stroke-width"],re=["x","y","font-size","fill","font-weight"],se={key:5,class:"vue-data-ui-watermark"},ue={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(T,{expose:V}){const{vue_ui_wheel:U}=s.useConfig(),c=T,p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),y=e.ref(s.createUid()),R=e.ref(null),w=e.ref(0),v=e.ref(null),C=e.ref(null),b=e.ref(null),B=e.ref(null),P=e.ref(0),t=e.computed({get:()=>O(),set:n=>n}),{userOptionsVisible:m,setUserOptionsVisibility:S,keepUserOptionState:N}=Z.useUserOptionState({config:t.value});function O(){const n=q.useNestedProp({userConfig:c.config,defaultConfig:U});return n.theme?{...q.useNestedProp({userConfig:s.themes.vue_ui_wheel[n.theme]||c.config,defaultConfig:n})}:n}e.watch(()=>c.config,n=>{t.value=O(),m.value=!t.value.userOptions.showOnChartHover,z(),P.value+=1},{deep:!0});const{isPrinting:_,isImaging:x,generatePdf:A,generateImage:$}=E.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),L=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),l=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),i=e.computed(()=>({radius:Math.min(l.value.width,l.value.height)*.9/2,centerX:l.value.width/2,centerY:l.value.height/2}));function I(n,r=1){return{x:i.value.centerX+i.value.radius*Math.cos(29.85+n*Math.PI/180)*r,y:i.value.centerY+i.value.radius*Math.sin(29.85+n*Math.PI/180)*r}}const a=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,n=>{t.value.style.chart.animation.use?F(n.percentage):a.value=n.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{z()});function z(){if(s.objectIsEmpty(c.dataset)&&s.error({componentName:"VueUiWheel",type:"dataset"}),F(c.dataset.percentage||0),t.value.responsive){const n=M.throttle(()=>{const{width:r,height:o}=M.useResponsive({chart:v.value,title:t.value.style.chart.title.text?C.value:null,source:b.value,noTitle:B.value});requestAnimationFrame(()=>{l.value.width=r,l.value.height=o,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(r,o)})});d.value=new ResizeObserver(n),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function F(n){let r=t.value.style.chart.animation.speed;const o=Math.abs(n-a.value)/(r*120);function u(){a.value<n?a.value=Math.min(a.value+o,n):a.value>n&&(a.value=Math.max(a.value-o,n)),a.value!==n&&requestAnimationFrame(u)}u()}const j=e.computed(()=>{const n=[];for(let o=0;o<100;o+=1){const u=a.value>o?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:H,y:X}=I(l.value.size/100*o),{x:D,y:Y}=I(l.value.size/100*o,t.value.style.chart.layout.wheel.ticks.sizeRatio);n.push({x1:H,y1:X,x2:D,y2:Y,color:t.value.style.chart.layout.wheel.ticks.gradient.show?s.shiftHue(u,o/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return n}),h=e.ref(!1);function G(n){h.value=n,w.value+=1}const f=e.ref(!1);function k(){f.value=!f.value}return V({generatePdf:A,generateImage:$,toggleAnnotator:k}),(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:r[0]||(r[0]=()=>e.unref(S)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(S)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Q.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:k},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:B,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:C,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(W._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value&&(e.unref(N)||e.unref(m))?(e.openBlock(),e.createBlock(E.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(x),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:G,onGeneratePdf:e.unref(A),onGenerateImage:e.unref($),onToggleAnnotator:k,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(m)?"visible":"hidden":"visible"})},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(K._sfc_main),n.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width<=0?10:l.value.width,height:l.value.height<=0?10:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(n.$slots,"chart-background",{},void 0,!0)],8,oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":5/360*Math.min(l.value.width,l.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u<=a.value})},null,10,le))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:i.value.centerX,cy:i.value.centerY,r:i.value.radius*.8<=0?1e-4:i.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:i.value.centerX,y:i.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(s.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,a.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(s.checkNaN)(a.value),e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"svg",{svg:l.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(x)})),void 0,!0)])):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,te))}},ie=ee._export_sfc(ue,[["__scopeId","data-v-a4a1eb50"]]);exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DSGAenF3.cjs"),W=require("./Title-DdUtciJN.cjs"),E=require("./usePrinter-CPqTP09H.cjs"),M=require("./useResponsive-YQYQrAZ_.cjs"),J=require("./vue-ui-skeleton-DvdPnQbR.cjs"),q=require("./useNestedProp-BdTohsDJ.cjs"),K=require("./PackageVersion-Dv25_ZxF.cjs"),Q=require("./PenAndPaper-Cx3_Liuv.cjs"),Z=require("./useUserOptionState-BgepsfED.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],ne=["xmlns","viewBox"],oe=["width","height"],le=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ae=["cx","cy","r","stroke","stroke-width"],re=["x","y","font-size","fill","font-weight"],se={key:5,class:"vue-data-ui-watermark"},ue={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(T,{expose:V}){const{vue_ui_wheel:U}=s.useConfig(),c=T,p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),y=e.ref(s.createUid()),R=e.ref(null),w=e.ref(0),v=e.ref(null),C=e.ref(null),b=e.ref(null),B=e.ref(null),P=e.ref(0),t=e.computed({get:()=>O(),set:n=>n}),{userOptionsVisible:m,setUserOptionsVisibility:S,keepUserOptionState:N}=Z.useUserOptionState({config:t.value});function O(){const n=q.useNestedProp({userConfig:c.config,defaultConfig:U});return n.theme?{...q.useNestedProp({userConfig:s.themes.vue_ui_wheel[n.theme]||c.config,defaultConfig:n})}:n}e.watch(()=>c.config,n=>{t.value=O(),m.value=!t.value.userOptions.showOnChartHover,z(),P.value+=1},{deep:!0});const{isPrinting:_,isImaging:x,generatePdf:A,generateImage:$}=E.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),L=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),l=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),i=e.computed(()=>({radius:Math.min(l.value.width,l.value.height)*.9/2,centerX:l.value.width/2,centerY:l.value.height/2}));function I(n,r=1){return{x:i.value.centerX+i.value.radius*Math.cos(29.85+n*Math.PI/180)*r,y:i.value.centerY+i.value.radius*Math.sin(29.85+n*Math.PI/180)*r}}const a=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,n=>{t.value.style.chart.animation.use?F(n.percentage):a.value=n.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{z()});function z(){if(s.objectIsEmpty(c.dataset)&&s.error({componentName:"VueUiWheel",type:"dataset"}),F(c.dataset.percentage||0),t.value.responsive){const n=M.throttle(()=>{const{width:r,height:o}=M.useResponsive({chart:v.value,title:t.value.style.chart.title.text?C.value:null,source:b.value,noTitle:B.value});requestAnimationFrame(()=>{l.value.width=r,l.value.height=o,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(r,o)})});d.value=new ResizeObserver(n),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function F(n){let r=t.value.style.chart.animation.speed;const o=Math.abs(n-a.value)/(r*120);function u(){a.value<n?a.value=Math.min(a.value+o,n):a.value>n&&(a.value=Math.max(a.value-o,n)),a.value!==n&&requestAnimationFrame(u)}u()}const j=e.computed(()=>{const n=[];for(let o=0;o<100;o+=1){const u=a.value>o?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:H,y:X}=I(l.value.size/100*o),{x:D,y:Y}=I(l.value.size/100*o,t.value.style.chart.layout.wheel.ticks.sizeRatio);n.push({x1:H,y1:X,x2:D,y2:Y,color:t.value.style.chart.layout.wheel.ticks.gradient.show?s.shiftHue(u,o/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return n}),h=e.ref(!1);function G(n){h.value=n,w.value+=1}const f=e.ref(!1);function k(){f.value=!f.value}return V({generatePdf:A,generateImage:$,toggleAnnotator:k}),(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:r[0]||(r[0]=()=>e.unref(S)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(S)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Q.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:k},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:B,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:C,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(W._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value&&(e.unref(N)||e.unref(m))?(e.openBlock(),e.createBlock(E.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(x),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:G,onGeneratePdf:e.unref(A),onGenerateImage:e.unref($),onToggleAnnotator:k,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(m)?"visible":"hidden":"visible"})},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(K._sfc_main),n.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width<=0?10:l.value.width,height:l.value.height<=0?10:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(n.$slots,"chart-background",{},void 0,!0)],8,oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":5/360*Math.min(l.value.width,l.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u<=a.value})},null,10,le))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:i.value.centerX,cy:i.value.centerY,r:i.value.radius*.8<=0?1e-4:i.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:i.value.centerX,y:i.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(s.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,a.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(s.checkNaN)(a.value),e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"svg",{svg:l.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(x)})),void 0,!0)])):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,te))}},ie=ee._export_sfc(ue,[["__scopeId","data-v-a4a1eb50"]]);exports.default=ie;
@@ -1,12 +1,12 @@
1
1
  import { computed as p, ref as r, watch as H, onMounted as re, onBeforeUnmount as ue, createElementBlock as c, openBlock as n, unref as o, normalizeStyle as x, createBlock as w, createCommentVNode as v, createSlots as ie, withCtx as b, renderSlot as f, normalizeProps as I, guardReactiveProps as P, normalizeClass as Y, createVNode as ce, Fragment as ve, renderList as he, toDisplayString as de } from "vue";
2
- import { u as fe, c as ye, a as pe, o as ge, e as me, w as W, X as ke, i as we, v as q, f as be } from "./index-y7ebFPbO.js";
3
- import { _ as Ce } from "./Title-AFFkNb_h.js";
4
- import { u as _e, U as Oe } from "./usePrinter-xz0bcBPM.js";
2
+ import { u as fe, c as ye, a as pe, o as ge, e as me, w as W, X as ke, i as we, v as q, f as be } from "./index-DLCyjPV0.js";
3
+ import { _ as Ce } from "./Title-CXBc1TH6.js";
4
+ import { u as _e, U as Oe } from "./usePrinter-CpHZjw3G.js";
5
5
  import { t as $e, u as Ae } from "./useResponsive-BWapHhVH.js";
6
- import xe from "./vue-ui-skeleton-DOahsJXV.js";
7
- import { u as V } from "./useNestedProp-BWzyGJZ8.js";
8
- import { _ as Ie } from "./PackageVersion-C5hOoj_p.js";
9
- import { P as Pe } from "./PenAndPaper-BJLUyj-s.js";
6
+ import xe from "./vue-ui-skeleton-D6ojufhb.js";
7
+ import { u as V } from "./useNestedProp-q86V3_LA.js";
8
+ import { _ as Ie } from "./PackageVersion-PZr4BkQ5.js";
9
+ import { P as Pe } from "./PenAndPaper-Cniu2YEX.js";
10
10
  import { u as Fe } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as Se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["width", "height"], Te = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], Ue = ["cx", "cy", "r", "stroke", "stroke-width"], Le = ["x", "y", "font-size", "fill", "font-weight"], Xe = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cww7pocd.cjs"),Se=require("./Title-vXH_7MPz.cjs"),ue=require("./usePrinter-DY6H-UkT.cjs"),H=require("./useResponsive-YQYQrAZ_.cjs"),$e=require("./vue-ui-accordion-D3UeWj9q.cjs"),Te=require("./DataTable-C1LMti1U.cjs"),Ne=require("./BaseIcon-BOR1UXkg.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-BzGIy5aD.cjs"),Pe=require("./PackageVersion-2gojTmrp.cjs"),Be=require("./Tooltip-C7eukp_Y.cjs"),Fe=require("./PenAndPaper-Bwxr_PKm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ve={key:1,class:"reset-wrapper"},Ee={class:"mono-slicer"},Me=["min","max","value"],_e={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(d,{emit:M}){e.useCssVars(b=>({"782b8172":c.value,"102109e6":$.value,"642212d7":y.value,"1f5369d4":d.selectColor,"22b98ab8":k.value}));const v=d,c=e.computed(()=>v.inputColor),k=e.computed(()=>v.background),y=e.computed(()=>`${v.selectColor}33`),$=e.computed(()=>v.borderColor),T=M;function p(){T("reset")}const B=e.computed(()=>{const b=v.max-v.min,m=0,C=(v.value-v.min)/b*100;return{left:`${m}%`,width:`${C-m}%`,background:v.selectColor}});return(b,m)=>(e.openBlock(),e.createElementBlock("div",Oe,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Ae,[d.useResetSlot?e.renderSlot(b.$slots,"reset-action",{key:1,reset:p},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:p},[e.createVNode(Ne.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ve)),e.createElementVNode("div",Ee,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(B.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=C=>T("update:value",Number(C.target.value)))},null,40,Me)])]))}},Ie=ce._export_sfc(_e,[["__scopeId","data-v-b4e6aee9"]]),Re=["id"],qe=["xmlns","viewBox"],Ue=["width","height"],We=["transform"],De=["fill","font-weight","x","y","font-size","transform","onMouseover"],Ge={key:4,class:"vue-data-ui-watermark"},Le=["innerHTML"],je={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:M}){const{vue_ui_word_cloud:v}=s.useConfig(),c=d,k=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),y=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))),$=e.ref(s.createUid()),T=e.ref(0),p=e.ref(null),B=e.ref(null),b=e.ref(null),m=e.ref(0),C=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:c.config,defaultConfig:v});return o.theme?{...ie.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>c.config,o=>{t.value=J(),I.value=!t.value.userOptions.showOnChartHover,Q(),m.value+=1,C.value+=1,R(),i.value.showTable=t.value.table.show,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const K=e.ref(null),w=e.ref(0),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),de=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:p.value,title:t.value.style.chart.title.text?B.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:b.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(U)})});e.watch(()=>w.value,()=>{ve()});const ve=H.debounce(()=>{U()},10);function R(){w.value=q.value}const F=e.ref(null);e.onMounted(()=>{Q(),R()});function Q(){s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):y.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{k.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(F.value=new ResizeObserver(de),F.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{F.value&&F.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),i=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function he(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function me(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function pe(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,f=0;return o.forEach(S=>{let L=!1;for(let E=0;E<Math.max(a,l)/2&&!L;E+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const se=j*Math.PI/180,be=h+E*Math.cos(se)-S.width/2,ke=f+E*Math.sin(se)-S.height/2,g={...S,x:be,y:ke},Ce=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,we=u.some(xe=>me(g,xe));Ce&&!we&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>c.dataset,U,{immediate:!0});const q=e.computed(()=>Math.round(Math.min(...y.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...y.value.map(o=>o.value))));function U(){const o=[...y.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...y.value].filter(n=>n.value>=w.value).map((n,h)=>{let f=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;f=isNaN(f)?r.value.minFontSize:f;const S=he(n.name,f);return{...n,id:s.createUid(),fontSize:f,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=pe(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const z=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=z.value.head.map((u,n)=>[[u.name],[z.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const O=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=z.value.head.map((n,h)=>{const f=s.dataLabel({p:t.value.table.td.prefix,v:z.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},f]}),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],head:o,body:a,config:l}}),A=e.ref(!1);function fe(o){A.value=o,T.value+=1}function ge(){return N.value}function ne(){i.value.showTable=!i.value.showTable}function re(){i.value.showTooltip=!i.value.showTooltip}const V=e.ref(!1);function W(){V.value=!V.value}M({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:W});const x=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function ye(o){if(!i.value.showTooltip)return;x.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;D.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:W},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${m.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(Y)||e.unref(I))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:i.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":x.value&&x.value===l.id&&i.value.showTooltip,"word-not-selected":x.value&&x.value!==l.id&&i.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{x.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,De))]))),256))],8,We),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,qe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:i.value.showTooltip&&_.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:p.value,content:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&q.value<le.value?(e.openBlock(),e.createBlock(Ie,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:q.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:R},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:i.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Te.DataTable,{key:`table_${C.value}`,colNames:O.value.colNames,head:O.value.head,body:O.value.body,config:O.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>i.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Le)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Re))}},He=ce._export_sfc(je,[["__scopeId","data-v-083c217b"]]);exports.default=He;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DSGAenF3.cjs"),Se=require("./Title-DdUtciJN.cjs"),ue=require("./usePrinter-CPqTP09H.cjs"),H=require("./useResponsive-YQYQrAZ_.cjs"),$e=require("./vue-ui-accordion-FM16tlk7.cjs"),Te=require("./DataTable-zpYtivMM.cjs"),Ne=require("./BaseIcon-B5DvqSYe.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-BdTohsDJ.cjs"),Pe=require("./PackageVersion-Dv25_ZxF.cjs"),Be=require("./Tooltip-BlGVq6xj.cjs"),Fe=require("./PenAndPaper-Cx3_Liuv.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ve={key:1,class:"reset-wrapper"},Ee={class:"mono-slicer"},Me=["min","max","value"],_e={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(d,{emit:M}){e.useCssVars(b=>({"782b8172":c.value,"102109e6":$.value,"642212d7":y.value,"1f5369d4":d.selectColor,"22b98ab8":k.value}));const v=d,c=e.computed(()=>v.inputColor),k=e.computed(()=>v.background),y=e.computed(()=>`${v.selectColor}33`),$=e.computed(()=>v.borderColor),T=M;function p(){T("reset")}const B=e.computed(()=>{const b=v.max-v.min,m=0,C=(v.value-v.min)/b*100;return{left:`${m}%`,width:`${C-m}%`,background:v.selectColor}});return(b,m)=>(e.openBlock(),e.createElementBlock("div",Oe,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Ae,[d.useResetSlot?e.renderSlot(b.$slots,"reset-action",{key:1,reset:p},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:p},[e.createVNode(Ne.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ve)),e.createElementVNode("div",Ee,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(B.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=C=>T("update:value",Number(C.target.value)))},null,40,Me)])]))}},Ie=ce._export_sfc(_e,[["__scopeId","data-v-b4e6aee9"]]),Re=["id"],qe=["xmlns","viewBox"],Ue=["width","height"],We=["transform"],De=["fill","font-weight","x","y","font-size","transform","onMouseover"],Ge={key:4,class:"vue-data-ui-watermark"},Le=["innerHTML"],je={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:M}){const{vue_ui_word_cloud:v}=s.useConfig(),c=d,k=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),y=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))),$=e.ref(s.createUid()),T=e.ref(0),p=e.ref(null),B=e.ref(null),b=e.ref(null),m=e.ref(0),C=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:c.config,defaultConfig:v});return o.theme?{...ie.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>c.config,o=>{t.value=J(),I.value=!t.value.userOptions.showOnChartHover,Q(),m.value+=1,C.value+=1,R(),i.value.showTable=t.value.table.show,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const K=e.ref(null),w=e.ref(0),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),de=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:p.value,title:t.value.style.chart.title.text?B.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:b.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(U)})});e.watch(()=>w.value,()=>{ve()});const ve=H.debounce(()=>{U()},10);function R(){w.value=q.value}const F=e.ref(null);e.onMounted(()=>{Q(),R()});function Q(){s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):y.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{k.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(F.value=new ResizeObserver(de),F.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{F.value&&F.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),i=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function he(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function me(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function pe(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,f=0;return o.forEach(S=>{let L=!1;for(let E=0;E<Math.max(a,l)/2&&!L;E+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const se=j*Math.PI/180,be=h+E*Math.cos(se)-S.width/2,ke=f+E*Math.sin(se)-S.height/2,g={...S,x:be,y:ke},Ce=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,we=u.some(xe=>me(g,xe));Ce&&!we&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>c.dataset,U,{immediate:!0});const q=e.computed(()=>Math.round(Math.min(...y.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...y.value.map(o=>o.value))));function U(){const o=[...y.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...y.value].filter(n=>n.value>=w.value).map((n,h)=>{let f=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;f=isNaN(f)?r.value.minFontSize:f;const S=he(n.name,f);return{...n,id:s.createUid(),fontSize:f,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=pe(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const z=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=z.value.head.map((u,n)=>[[u.name],[z.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const O=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=z.value.head.map((n,h)=>{const f=s.dataLabel({p:t.value.table.td.prefix,v:z.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},f]}),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],head:o,body:a,config:l}}),A=e.ref(!1);function fe(o){A.value=o,T.value+=1}function ge(){return N.value}function ne(){i.value.showTable=!i.value.showTable}function re(){i.value.showTooltip=!i.value.showTooltip}const V=e.ref(!1);function W(){V.value=!V.value}M({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:W});const x=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function ye(o){if(!i.value.showTooltip)return;x.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;D.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:W},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${m.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(Y)||e.unref(I))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:i.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":x.value&&x.value===l.id&&i.value.showTooltip,"word-not-selected":x.value&&x.value!==l.id&&i.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{x.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,De))]))),256))],8,We),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,qe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:i.value.showTooltip&&_.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:p.value,content:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&q.value<le.value?(e.openBlock(),e.createBlock(Ie,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:q.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:R},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:i.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Te.DataTable,{key:`table_${C.value}`,colNames:O.value.colNames,head:O.value.head,body:O.value.body,config:O.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>i.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Le)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Re))}},He=ce._export_sfc(je,[["__scopeId","data-v-083c217b"]]);exports.default=He;
@@ -1,16 +1,16 @@
1
1
  import { useCssVars as De, computed as y, createElementBlock as v, openBlock as r, createElementVNode as S, renderSlot as i, createVNode as ne, normalizeStyle as q, ref as n, watch as se, onMounted as Ee, onBeforeUnmount as Ge, unref as d, createBlock as A, createCommentVNode as w, createSlots as Le, withCtx as m, normalizeProps as M, guardReactiveProps as _, normalizeClass as ke, Fragment as Xe, renderList as je, toDisplayString as we, createTextVNode as qe, nextTick as $e } from "vue";
2
- import { u as He, a4 as Ye, v as Je, c as xe, t as Ke, p as j, a as Qe, o as Ze, e as Te, g as et, f as tt, X as ot, q as at, r as lt, x as st } from "./index-y7ebFPbO.js";
3
- import { _ as nt } from "./Title-AFFkNb_h.js";
4
- import { u as rt, U as ut } from "./usePrinter-xz0bcBPM.js";
2
+ import { u as He, a4 as Ye, v as Je, c as xe, t as Ke, p as j, a as Qe, o as Ze, e as Te, g as et, f as tt, X as ot, q as at, r as lt, x as st } from "./index-DLCyjPV0.js";
3
+ import { _ as nt } from "./Title-CXBc1TH6.js";
4
+ import { u as rt, U as ut } from "./usePrinter-CpHZjw3G.js";
5
5
  import { d as it, t as ct, u as dt } from "./useResponsive-BWapHhVH.js";
6
- import vt from "./vue-ui-accordion-DxSGI7GJ.js";
7
- import { D as ht } from "./DataTable-Bg0b_pVK.js";
8
- import mt from "./BaseIcon-DAD8bWYx.js";
6
+ import vt from "./vue-ui-accordion-DR2qjfsa.js";
7
+ import { D as ht } from "./DataTable-BCCBpyhr.js";
8
+ import mt from "./BaseIcon-BzuvxztF.js";
9
9
  import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as Se } from "./useNestedProp-BWzyGJZ8.js";
11
- import { _ as ft } from "./PackageVersion-C5hOoj_p.js";
12
- import { _ as pt } from "./Tooltip-C6qF6AOJ.js";
13
- import { P as gt } from "./PenAndPaper-BJLUyj-s.js";
10
+ import { u as Se } from "./useNestedProp-q86V3_LA.js";
11
+ import { _ as ft } from "./PackageVersion-PZr4BkQ5.js";
12
+ import { _ as pt } from "./Tooltip-C9lPh5bN.js";
13
+ import { P as gt } from "./PenAndPaper-Cniu2YEX.js";
14
14
  import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  const bt = { "data-html2canvas-ignore": "" }, Ct = {
16
16
  key: 0,
@@ -1,17 +1,17 @@
1
- import { P as D, W as q, A as j, F as $, w as ee, s as te, o as re, _ as ie, a5 as ae, x as le, C as se, y as ne, a3 as he, e as oe, r as ce, f as X, a6 as de, R as ue, S as ge, q as fe, b as Ie, z as me, d as Ne, a7 as xe, v as be, a8 as Fe, a1 as _e, a9 as Ae, i as ye, G as Ce, L as Le, u as Se, c as K, p as ke, B as we, a as Oe, t as Ge } from "./index-y7ebFPbO.js";
2
- import { D as ve } from "./DataTable-Bg0b_pVK.js";
3
- import { _ as ze } from "./Title-AFFkNb_h.js";
4
- import { u as Me, _ as pe } from "./Tooltip-C6qF6AOJ.js";
5
- import { U as Te } from "./usePrinter-xz0bcBPM.js";
6
- import { _ as Pe } from "./Shape-BXfC7I_g.js";
7
- import Ve from "./BaseIcon-DAD8bWYx.js";
8
- import Re from "./vue-ui-table-sparkline-DqBjtjvu.js";
9
- import De from "./vue-ui-skeleton-DOahsJXV.js";
10
- import { S as He } from "./Slicer-bCt9Cx4y.js";
11
- import Be from "./vue-ui-accordion-DxSGI7GJ.js";
12
- import { u as U } from "./useNestedProp-BWzyGJZ8.js";
13
- import { _ as We } from "./PackageVersion-C5hOoj_p.js";
14
- import { P as Ee } from "./PenAndPaper-BJLUyj-s.js";
1
+ import { P as D, W as q, A as j, F as $, w as ee, s as te, o as re, _ as ie, a5 as ae, x as le, C as se, y as ne, a3 as he, e as oe, r as ce, f as X, a6 as de, R as ue, S as ge, q as fe, b as Ie, z as me, d as Ne, a7 as xe, v as be, a8 as Fe, a1 as _e, a9 as Ae, i as ye, G as Ce, L as Le, u as Se, c as K, p as ke, B as we, a as Oe, t as Ge } from "./index-DLCyjPV0.js";
2
+ import { D as ve } from "./DataTable-BCCBpyhr.js";
3
+ import { _ as ze } from "./Title-CXBc1TH6.js";
4
+ import { u as Me, _ as pe } from "./Tooltip-C9lPh5bN.js";
5
+ import { U as Te } from "./usePrinter-CpHZjw3G.js";
6
+ import { _ as Pe } from "./Shape-BXTmpde5.js";
7
+ import Ve from "./BaseIcon-BzuvxztF.js";
8
+ import Re from "./vue-ui-table-sparkline-C1wNBDqO.js";
9
+ import De from "./vue-ui-skeleton-D6ojufhb.js";
10
+ import { S as He } from "./Slicer-D3tEQT9Z.js";
11
+ import Be from "./vue-ui-accordion-DR2qjfsa.js";
12
+ import { u as U } from "./useNestedProp-q86V3_LA.js";
13
+ import { _ as We } from "./PackageVersion-PZr4BkQ5.js";
14
+ import { P as Ee } from "./PenAndPaper-Cniu2YEX.js";
15
15
  import { resolveComponent as R, createElementBlock as s, openBlock as a, normalizeStyle as w, normalizeClass as B, createBlock as H, createCommentVNode as c, createVNode as Y, createSlots as Ye, withCtx as P, renderSlot as S, normalizeProps as W, guardReactiveProps as E, createElementVNode as g, createTextVNode as Z, Fragment as u, renderList as m, toDisplayString as k, mergeProps as J, withDirectives as qe, vModelCheckbox as Xe } from "vue";
16
16
  import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Ze = K(), Je = {
@@ -2210,7 +2210,6 @@ function ti(r, l, o, d, t, e) {
2210
2210
  g("g", null, [
2211
2211
  (a(!0), s(u, null, m(e.maxSeries, (i, h) => (a(), s("rect", {
2212
2212
  key: `tooltip_trap_${h}`,
2213
- "data-cy-trap": "",
2214
2213
  x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * h,
2215
2214
  y: e.drawingArea.top,
2216
2215
  height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
@@ -2469,7 +2468,7 @@ function ti(r, l, o, d, t, e) {
2469
2468
  }, 8, ["config"])) : c("", !0)
2470
2469
  ], 46, Ke);
2471
2470
  }
2472
- const xi = /* @__PURE__ */ Ue(Je, [["render", ti], ["__scopeId", "data-v-25439b06"]]);
2471
+ const xi = /* @__PURE__ */ Ue(Je, [["render", ti], ["__scopeId", "data-v-b464dbc0"]]);
2473
2472
  export {
2474
2473
  xi as default
2475
2474
  };
@@ -1,16 +1,16 @@
1
1
  import { ref as i, computed as x, useSlots as Ea, onMounted as la, watch as E, nextTick as ye, onBeforeUnmount as Aa, createElementBlock as te, openBlock as w, unref as z, normalizeClass as Da, normalizeStyle as V, createCommentVNode as Y, createBlock as A, createElementVNode as oe, createSlots as Ha, withCtx as m, renderSlot as L, normalizeProps as Z, guardReactiveProps as G, createVNode as Na, toDisplayString as ta, createTextVNode as Ya } from "vue";
2
- import { u as _a, c as Ua, t as Wa, p as _, a as Xa, C as fe, b as Ba, D as ze, i as j, f as q, d as oa, _ as Va, J as Za, a9 as Ga, o as ja, e as qa, x as ra, q as Ja, r as Ka, y as Qa, s as re, l as el } from "./index-y7ebFPbO.js";
2
+ import { u as _a, c as Ua, t as Wa, p as _, a as Xa, C as fe, b as Ba, D as ze, i as j, f as q, d as oa, _ as Va, J as Za, a9 as Ga, o as ja, e as qa, x as ra, q as Ja, r as Ka, y as Qa, s as re, l as el } from "./index-DLCyjPV0.js";
3
3
  import { d as al, t as ll, u as tl, c as ol, a as ua, l as b, r as Se, b as R, p as sa } from "./useResponsive-BWapHhVH.js";
4
- import { _ as rl } from "./Tooltip-C6qF6AOJ.js";
5
- import { L as ul } from "./Legend-Ba6qRAqc.js";
6
- import { _ as sl } from "./Title-AFFkNb_h.js";
7
- import { S as nl } from "./Slicer-bCt9Cx4y.js";
8
- import { u as il, U as vl } from "./usePrinter-xz0bcBPM.js";
9
- import cl from "./vue-ui-accordion-DxSGI7GJ.js";
10
- import { D as dl } from "./DataTable-Bg0b_pVK.js";
11
- import hl from "./vue-ui-skeleton-DOahsJXV.js";
12
- import { u as na } from "./useNestedProp-BWzyGJZ8.js";
13
- import { P as yl } from "./PenAndPaper-BJLUyj-s.js";
4
+ import { _ as rl } from "./Tooltip-C9lPh5bN.js";
5
+ import { L as ul } from "./Legend-CyJrN721.js";
6
+ import { _ as sl } from "./Title-CXBc1TH6.js";
7
+ import { S as nl } from "./Slicer-D3tEQT9Z.js";
8
+ import { u as il, U as vl } from "./usePrinter-CpHZjw3G.js";
9
+ import cl from "./vue-ui-accordion-DR2qjfsa.js";
10
+ import { D as dl } from "./DataTable-BCCBpyhr.js";
11
+ import hl from "./vue-ui-skeleton-D6ojufhb.js";
12
+ import { u as na } from "./useNestedProp-q86V3_LA.js";
13
+ import { P as yl } from "./PenAndPaper-Cniu2YEX.js";
14
14
  import { u as fl } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as gl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const pl = ["id"], ml = ["onClick"], bl = {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),n=require("./index-Cww7pocd.cjs"),c=require("./useResponsive-YQYQrAZ_.cjs"),it=require("./Tooltip-C7eukp_Y.cjs"),ct=require("./Legend-CMzKRWtT.cjs"),vt=require("./Title-vXH_7MPz.cjs"),dt=require("./Slicer-Park25Rm.cjs"),Ne=require("./usePrinter-DY6H-UkT.cjs"),ht=require("./vue-ui-accordion-D3UeWj9q.cjs"),ft=require("./DataTable-C1LMti1U.cjs"),yt=require("./vue-ui-skeleton-DkW8eWHI.cjs"),De=require("./useNestedProp-BzGIy5aD.cjs"),gt=require("./PenAndPaper-Bwxr_PKm.cjs"),pt=require("./useUserOptionState-BgepsfED.cjs"),mt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),bt=["id"],xt=["onClick"],Lt={key:2,class:"vue-data-ui-watermark"},kt=["innerHTML"],Ct={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ue,{expose:Be,emit:Fe}){const{vue_ui_xy_canvas:Ae}=n.useConfig(),m=ue,J=l.ref(n.createUid()),B=l.ref(null),S=l.ref(null),F=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),U=l.ref(!1),h=l.ref(null),_=l.ref(""),ne=l.ref(null),C=l.ref([]),R=l.ref(1),I=l.ref(!0),E=l.ref(!0),K=l.ref(null),se=l.ref(0),ie=l.ref(0),q=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),he=l.ref(null),Q=l.ref(0),ee=l.ref(0),te=l.ref(0),z=l.ref(null),le=l.computed(()=>!!m.dataset&&m.dataset.length),He=Fe,Ve=l.useSlots();l.onMounted(()=>{Ve["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>ge(),set:e=>e}),{userOptionsVisible:ae,setUserOptionsVisibility:fe,keepUserOptionState:ye}=pt.useUserOptionState({config:t.value});function ge(){const e=De.useNestedProp({userConfig:m.config,defaultConfig:Ae});let o={};return e.theme?o={...De.useNestedProp({userConfig:n.themes.vue_ui_xy_canvas[e.theme]||m.config,defaultConfig:e}),customPalette:n.themePalettes[e.theme]||n.palette}:o=e,m.config&&n.hasDeepProperty(m.config,"style.chart.scale.min")?o.style.chart.scale.min=m.config.style.chart.scale.min:o.style.chart.scale.min=null,m.config&&n.hasDeepProperty(m.config,"style.chart.scale.max")?o.style.chart.scale.max=m.config.style.chart.scale.max:o.style.chart.scale.max=null,m.config&&n.hasDeepProperty(m.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=m.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,m.config&&n.hasDeepProperty(m.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=m.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>m.config,e=>{t.value=ge(),ae.value=!t.value.userOptions.showOnChartHover,oe(),Q.value+=1,ee.value+=1,te.value+=1,s.value.showTable=t.value.table.show,s.value.showDataLabels=t.value.style.chart.dataLabels.show,s.value.stacked=t.value.style.chart.stacked,s.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>m.dataset,()=>{oe(),Q.value+=1,ee.value+=1,te.value+=1},{deep:!0});const pe=l.ref(t.value.style.chart.aspectRatio),{isPrinting:me,isImaging:be,generatePdf:xe,generateImage:Le}=Ne.usePrinter({elementId:`xy_canvas_${J.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ye(e){q.value=e,ie.value+=1}const ke=l.computed(()=>n.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>N.value?Math.max(...N.value.filter((e,o)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function Ce(e,o){return e/o}function Ue({hasAutoScale:e,series:o,min:r,max:v,scale:f,yOffset:L,individualHeight:d,stackIndex:p=null}){return o.map((P,k)=>{const M=f.min<0?Math.abs(f.min):0,O=Ce(P+M,M+f.max);let V,Y;e&&(V=f.min,Y=Ce(P-V,f.max-V));let $=0;return p===null?$=a.value.bottom-a.value.height*(e?Y:O):$=a.value.bottom-L-d*(e?Y:O),{x:a.value.left+a.value.slot*k+a.value.slot/2,y:$,value:P}})}const b=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...N.value.filter((d,p)=>!C.value.includes(d.absoluteIndex)).flatMap(d=>d.series.slice(u.value.start,u.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...N.value.filter((d,p)=>!C.value.includes(d.absoluteIndex)).flatMap(d=>d.series.slice(u.value.start,u.value.end))),r=n.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),v=r.min<0?Math.abs(r.min):0,f=a.value.bottom-a.value.height*(v/(r.max+v)),L=r.ticks.map(d=>({y:a.value.bottom-a.value.height*((d+v)/(r.max+v)),x:a.value.left-8,value:d}));return{absoluteMin:v,max:o,min:e,scale:r,yLabels:L,zero:f}}),_e=l.computed(()=>y.value.map(e=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),n=require("./index-DSGAenF3.cjs"),c=require("./useResponsive-YQYQrAZ_.cjs"),it=require("./Tooltip-BlGVq6xj.cjs"),ct=require("./Legend-CJkkmRNE.cjs"),vt=require("./Title-DdUtciJN.cjs"),dt=require("./Slicer-DzKrIvL0.cjs"),Ne=require("./usePrinter-CPqTP09H.cjs"),ht=require("./vue-ui-accordion-FM16tlk7.cjs"),ft=require("./DataTable-zpYtivMM.cjs"),yt=require("./vue-ui-skeleton-DvdPnQbR.cjs"),De=require("./useNestedProp-BdTohsDJ.cjs"),gt=require("./PenAndPaper-Cx3_Liuv.cjs"),pt=require("./useUserOptionState-BgepsfED.cjs"),mt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),bt=["id"],xt=["onClick"],Lt={key:2,class:"vue-data-ui-watermark"},kt=["innerHTML"],Ct={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ue,{expose:Be,emit:Fe}){const{vue_ui_xy_canvas:Ae}=n.useConfig(),m=ue,J=l.ref(n.createUid()),B=l.ref(null),S=l.ref(null),F=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),U=l.ref(!1),h=l.ref(null),_=l.ref(""),ne=l.ref(null),C=l.ref([]),R=l.ref(1),I=l.ref(!0),E=l.ref(!0),K=l.ref(null),se=l.ref(0),ie=l.ref(0),q=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),he=l.ref(null),Q=l.ref(0),ee=l.ref(0),te=l.ref(0),z=l.ref(null),le=l.computed(()=>!!m.dataset&&m.dataset.length),He=Fe,Ve=l.useSlots();l.onMounted(()=>{Ve["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>ge(),set:e=>e}),{userOptionsVisible:ae,setUserOptionsVisibility:fe,keepUserOptionState:ye}=pt.useUserOptionState({config:t.value});function ge(){const e=De.useNestedProp({userConfig:m.config,defaultConfig:Ae});let o={};return e.theme?o={...De.useNestedProp({userConfig:n.themes.vue_ui_xy_canvas[e.theme]||m.config,defaultConfig:e}),customPalette:n.themePalettes[e.theme]||n.palette}:o=e,m.config&&n.hasDeepProperty(m.config,"style.chart.scale.min")?o.style.chart.scale.min=m.config.style.chart.scale.min:o.style.chart.scale.min=null,m.config&&n.hasDeepProperty(m.config,"style.chart.scale.max")?o.style.chart.scale.max=m.config.style.chart.scale.max:o.style.chart.scale.max=null,m.config&&n.hasDeepProperty(m.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=m.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,m.config&&n.hasDeepProperty(m.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=m.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>m.config,e=>{t.value=ge(),ae.value=!t.value.userOptions.showOnChartHover,oe(),Q.value+=1,ee.value+=1,te.value+=1,s.value.showTable=t.value.table.show,s.value.showDataLabels=t.value.style.chart.dataLabels.show,s.value.stacked=t.value.style.chart.stacked,s.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>m.dataset,()=>{oe(),Q.value+=1,ee.value+=1,te.value+=1},{deep:!0});const pe=l.ref(t.value.style.chart.aspectRatio),{isPrinting:me,isImaging:be,generatePdf:xe,generateImage:Le}=Ne.usePrinter({elementId:`xy_canvas_${J.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ye(e){q.value=e,ie.value+=1}const ke=l.computed(()=>n.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>N.value?Math.max(...N.value.filter((e,o)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function Ce(e,o){return e/o}function Ue({hasAutoScale:e,series:o,min:r,max:v,scale:f,yOffset:L,individualHeight:d,stackIndex:p=null}){return o.map((P,k)=>{const M=f.min<0?Math.abs(f.min):0,O=Ce(P+M,M+f.max);let V,Y;e&&(V=f.min,Y=Ce(P-V,f.max-V));let $=0;return p===null?$=a.value.bottom-a.value.height*(e?Y:O):$=a.value.bottom-L-d*(e?Y:O),{x:a.value.left+a.value.slot*k+a.value.slot/2,y:$,value:P}})}const b=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...N.value.filter((d,p)=>!C.value.includes(d.absoluteIndex)).flatMap(d=>d.series.slice(u.value.start,u.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...N.value.filter((d,p)=>!C.value.includes(d.absoluteIndex)).flatMap(d=>d.series.slice(u.value.start,u.value.end))),r=n.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),v=r.min<0?Math.abs(r.min):0,f=a.value.bottom-a.value.height*(v/(r.max+v)),L=r.ticks.map(d=>({y:a.value.bottom-a.value.height*((d+v)/(r.max+v)),x:a.value.left-8,value:d}));return{absoluteMin:v,max:o,min:e,scale:r,yLabels:L,zero:f}}),_e=l.computed(()=>y.value.map(e=>`
2
2
  <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
3
  <svg viewBox="0 0 10 10" height="12" width="12">
4
4
  <circle cx="5" cy="5" r="5" fill="${e.color}"/>