vue-data-ui 2.3.69 → 2.3.70

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 (142) hide show
  1. package/dist/{Arrow-Bs2WRJSk.js → Arrow-Bog1nRXc.js} +1 -1
  2. package/dist/{Arrow-CDLqeekX.cjs → Arrow-D4M9K4_y.cjs} +1 -1
  3. package/dist/{BaseIcon-D93rtrSm.js → BaseIcon-D6HKiBWY.js} +1 -1
  4. package/dist/{BaseIcon-HycAYj53.cjs → BaseIcon-DlKBf9ve.cjs} +1 -1
  5. package/dist/{DataTable-DkoeHXI5.cjs → DataTable-BTNru9rE.cjs} +1 -1
  6. package/dist/{DataTable-Bwco5wF0.js → DataTable-C3P8lB6X.js} +2 -2
  7. package/dist/{Legend-Cpk8DCWi.js → Legend-Bvm45WSa.js} +1 -1
  8. package/dist/{Legend-CTlJpdAi.cjs → Legend-D_1fNWhT.cjs} +1 -1
  9. package/dist/{Shape-CbiBbFNX.cjs → Shape-BlFLyhaj.cjs} +1 -1
  10. package/dist/{Shape-Bfeh9GpX.js → Shape-o5RyMUAR.js} +1 -1
  11. package/dist/{Slicer-DpuUwHC7.js → Slicer-C9gqz7Yw.js} +2 -2
  12. package/dist/{Slicer-DA9QuPiC.cjs → Slicer-DfQWN_HX.cjs} +1 -1
  13. package/dist/{Title-B6PVw0aK.cjs → Title-96aF3-Z1.cjs} +1 -1
  14. package/dist/{Title-CzxknLI3.js → Title-s23qMfox.js} +1 -1
  15. package/dist/{Tooltip-Ci47DnuY.cjs → Tooltip-Bkzl1VQe.cjs} +1 -1
  16. package/dist/{Tooltip-DYVjAqo-.js → Tooltip-DrhztkFj.js} +1 -1
  17. package/dist/{index-b22AFna7.js → index--JGgf0j_.js} +1 -1
  18. package/dist/{index-DDwHKEGb.cjs → index-CsqP5b4f.cjs} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/{useNestedProp-6FL791Qt.js → useNestedProp-BMj7Pe83.js} +1 -1
  21. package/dist/{useNestedProp-BbpR9SM4.cjs → useNestedProp-DQ2DOe-8.cjs} +1 -1
  22. package/dist/{usePrinter-CRKoRqbE.cjs → usePrinter-CobCVhRp.cjs} +1 -1
  23. package/dist/{usePrinter-C_wOlUXy.js → usePrinter-DLzQ_BtZ.js} +1 -1
  24. package/dist/{vue-data-ui-B4ldblBa.cjs → vue-data-ui-BGmGXTCr.cjs} +1 -1
  25. package/dist/{vue-data-ui-XthQYdCU.js → vue-data-ui-BKqUj7bC.js} +57 -57
  26. package/dist/vue-data-ui.cjs +1 -1
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-ojEQSNLk.cjs → vue-ui-3d-bar-B2viWRX5.cjs} +1 -1
  29. package/dist/{vue-ui-3d-bar-DbYTVw48.js → vue-ui-3d-bar-CmnWR3OF.js} +7 -7
  30. package/dist/{vue-ui-accordion-BBDPcl3d.cjs → vue-ui-accordion-C1ybaK7v.cjs} +1 -1
  31. package/dist/{vue-ui-accordion-H9MtAuZL.js → vue-ui-accordion-CT0j1v1a.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-DQ3QiyQZ.js → vue-ui-age-pyramid-TTbeq_lD.js} +8 -8
  33. package/dist/{vue-ui-age-pyramid-M1J2GKpa.cjs → vue-ui-age-pyramid-zVLLlC3O.cjs} +1 -1
  34. package/dist/{vue-ui-annotator-D5DX94Dw.js → vue-ui-annotator-BEXLuscT.js} +1 -1
  35. package/dist/{vue-ui-annotator-m8EO_6mf.cjs → vue-ui-annotator-DQ7pecaC.cjs} +1 -1
  36. package/dist/{vue-ui-candlestick-CocQAT0K.cjs → vue-ui-candlestick-DRWZ8tzV.cjs} +1 -1
  37. package/dist/{vue-ui-candlestick-B48E6EaX.js → vue-ui-candlestick-Dabz9ByY.js} +9 -9
  38. package/dist/{vue-ui-carousel-table-BlVhpRo3.js → vue-ui-carousel-table-IfBqfJXl.js} +4 -4
  39. package/dist/{vue-ui-carousel-table-CBF5ycha.cjs → vue-ui-carousel-table-lPXwP4FD.cjs} +1 -1
  40. package/dist/{vue-ui-chestnut-BikqvSP7.js → vue-ui-chestnut-DR8FQ_iP.js} +6 -6
  41. package/dist/{vue-ui-chestnut-TU1mnoNH.cjs → vue-ui-chestnut-UyMSd4I2.cjs} +1 -1
  42. package/dist/{vue-ui-cursor-3jMf_DA8.js → vue-ui-cursor-B8BmRnMz.js} +2 -2
  43. package/dist/{vue-ui-cursor-36hWYcLz.cjs → vue-ui-cursor-CqXcK21c.cjs} +1 -1
  44. package/dist/{vue-ui-dashboard-r8hBDI5a.cjs → vue-ui-dashboard-Ca7yuK9y.cjs} +1 -1
  45. package/dist/{vue-ui-dashboard-BnmrvYTu.js → vue-ui-dashboard-D88IiJ08.js} +2 -2
  46. package/dist/{vue-ui-digits-DLWnySuv.js → vue-ui-digits-Bqvn_McM.js} +2 -2
  47. package/dist/{vue-ui-digits-Dudhgq6k.cjs → vue-ui-digits-uHan--u4.cjs} +1 -1
  48. package/dist/{vue-ui-donut-BIQqKYci.js → vue-ui-donut-CbO7lZOV.js} +9 -9
  49. package/dist/{vue-ui-donut-BSMPuZag.cjs → vue-ui-donut-CcAOPJ0r.cjs} +1 -1
  50. package/dist/{vue-ui-donut-evolution-Cpmro_CO.js → vue-ui-donut-evolution-75NW6llE.js} +9 -9
  51. package/dist/{vue-ui-donut-evolution-BEkQBKpm.cjs → vue-ui-donut-evolution-BUrGAB3_.cjs} +1 -1
  52. package/dist/{vue-ui-dumbbell-By0EEP7S.js → vue-ui-dumbbell-CdTSX6zx.js} +8 -8
  53. package/dist/{vue-ui-dumbbell-CbxwKTTZ.cjs → vue-ui-dumbbell-Dw9PaP6W.cjs} +1 -1
  54. package/dist/{vue-ui-flow-DWrZQCzR.cjs → vue-ui-flow-BZANIyo0.cjs} +1 -1
  55. package/dist/{vue-ui-flow-BIxbPfDE.js → vue-ui-flow-j4-3z4Jh.js} +7 -7
  56. package/dist/{vue-ui-galaxy-DsphaNAI.cjs → vue-ui-galaxy-BFRY_qH_.cjs} +1 -1
  57. package/dist/{vue-ui-galaxy-DIim6oZe.js → vue-ui-galaxy-Pvrqq4z8.js} +9 -9
  58. package/dist/{vue-ui-gauge-CxID7_UB.cjs → vue-ui-gauge-BP7VlzCy.cjs} +1 -1
  59. package/dist/{vue-ui-gauge-DkB4_mbS.js → vue-ui-gauge-Y2d6m8F7.js} +5 -5
  60. package/dist/{vue-ui-gizmo-C_O9g3YG.js → vue-ui-gizmo-DPS6iKC7.js} +2 -2
  61. package/dist/{vue-ui-gizmo-B4TAO8bP.cjs → vue-ui-gizmo-DtwUDdpP.cjs} +1 -1
  62. package/dist/{vue-ui-heatmap-Bs2fOp6v.js → vue-ui-heatmap-BdpzP1si.js} +8 -8
  63. package/dist/{vue-ui-heatmap-CbY84wiS.cjs → vue-ui-heatmap-zu_2wp75.cjs} +1 -1
  64. package/dist/{vue-ui-kpi-BTQ4X1Rg.js → vue-ui-kpi-D5EOkAjY.js} +3 -3
  65. package/dist/{vue-ui-kpi-DhYlfD4Q.cjs → vue-ui-kpi-irPEkSLW.cjs} +1 -1
  66. package/dist/{vue-ui-mini-loader-BnS890Lx.js → vue-ui-mini-loader-BwdapIVe.js} +2 -2
  67. package/dist/{vue-ui-mini-loader-DRzlFN5q.cjs → vue-ui-mini-loader-Dj2j41sm.cjs} +1 -1
  68. package/dist/{vue-ui-molecule-N4XGePxD.cjs → vue-ui-molecule-C6X_fMKH.cjs} +1 -1
  69. package/dist/{vue-ui-molecule-CAPwPpHO.js → vue-ui-molecule-D2UUPg-q.js} +9 -9
  70. package/dist/{vue-ui-mood-radar-CrvDHJHs.cjs → vue-ui-mood-radar-B8q5ERr1.cjs} +1 -1
  71. package/dist/{vue-ui-mood-radar-B8bsvKcJ.js → vue-ui-mood-radar-Bu-AmoHP.js} +9 -9
  72. package/dist/{vue-ui-nested-donuts-DQtQroDc.cjs → vue-ui-nested-donuts-Bk7pladW.cjs} +1 -1
  73. package/dist/{vue-ui-nested-donuts-xWRdqX_G.js → vue-ui-nested-donuts-DYsHFFGT.js} +9 -9
  74. package/dist/{vue-ui-onion-DX96edRH.cjs → vue-ui-onion-BtPeuhpF.cjs} +1 -1
  75. package/dist/{vue-ui-onion-CIp-ZmAw.js → vue-ui-onion-ro--Z0zB.js} +9 -9
  76. package/dist/{vue-ui-parallel-coordinate-plot-m3xZjFsy.js → vue-ui-parallel-coordinate-plot-C4Vyxlwp.js} +10 -10
  77. package/dist/{vue-ui-parallel-coordinate-plot-DLbub2s5.cjs → vue-ui-parallel-coordinate-plot-D9S1Kv00.cjs} +1 -1
  78. package/dist/{vue-ui-quadrant-CHYKm_gp.js → vue-ui-quadrant-BsoH0jZo.js} +10 -10
  79. package/dist/{vue-ui-quadrant-BlKcOAJ5.cjs → vue-ui-quadrant-Dvr2JM0s.cjs} +1 -1
  80. package/dist/{vue-ui-quick-chart-BuQXXXPZ.cjs → vue-ui-quick-chart-C55tphTV.cjs} +1 -1
  81. package/dist/{vue-ui-quick-chart-Bx33h_v_.js → vue-ui-quick-chart-CzF7ozoK.js} +7 -7
  82. package/dist/{vue-ui-radar-DL21Oxie.cjs → vue-ui-radar-CYIJyf1C.cjs} +1 -1
  83. package/dist/{vue-ui-radar-E5QES6yN.js → vue-ui-radar-crl43r9e.js} +10 -10
  84. package/dist/{vue-ui-rating-DMmskFOg.cjs → vue-ui-rating-CJdyLYDT.cjs} +1 -1
  85. package/dist/{vue-ui-rating-DoqRRsvo.js → vue-ui-rating-DKZTsN_i.js} +2 -2
  86. package/dist/{vue-ui-relation-circle-D0TOckKJ.js → vue-ui-relation-circle-ClR9UbUG.js} +5 -5
  87. package/dist/{vue-ui-relation-circle-DQxPcVUO.cjs → vue-ui-relation-circle-xTvwoYbf.cjs} +1 -1
  88. package/dist/{vue-ui-rings-J4xq1-8a.cjs → vue-ui-rings-BMsZFOKI.cjs} +1 -1
  89. package/dist/{vue-ui-rings-BHvZBASf.js → vue-ui-rings-BfbNfcj0.js} +9 -9
  90. package/dist/{vue-ui-scatter-D5chTu9W.cjs → vue-ui-scatter-CnjbVRdT.cjs} +1 -1
  91. package/dist/{vue-ui-scatter-BDFTTZvz.js → vue-ui-scatter-DrEDT3ts.js} +10 -10
  92. package/dist/{vue-ui-screenshot-D9FGz4Mq.js → vue-ui-screenshot-CR5PzE7H.js} +1 -1
  93. package/dist/{vue-ui-screenshot-CfG_-SQf.cjs → vue-ui-screenshot-jWM-jrvI.cjs} +1 -1
  94. package/dist/{vue-ui-skeleton-BeqLQi6X.cjs → vue-ui-skeleton-BR5OmV8V.cjs} +1 -1
  95. package/dist/{vue-ui-skeleton-c0TzbjC0.js → vue-ui-skeleton-Dgvq-LKZ.js} +2 -2
  96. package/dist/{vue-ui-smiley-CQiyYo-p.cjs → vue-ui-smiley-Bd79lUrX.cjs} +1 -1
  97. package/dist/{vue-ui-smiley-9HsQ_68t.js → vue-ui-smiley-CDviAtqz.js} +2 -2
  98. package/dist/{vue-ui-spark-trend-DtYPEtR4.js → vue-ui-spark-trend-B2F0rkq9.js} +4 -4
  99. package/dist/{vue-ui-spark-trend-SlHRQmbT.cjs → vue-ui-spark-trend-DW2lDe5y.cjs} +1 -1
  100. package/dist/{vue-ui-sparkbar-DiZ-nGpc.cjs → vue-ui-sparkbar-BkBDO4sR.cjs} +1 -1
  101. package/dist/{vue-ui-sparkbar-CrlzIgxZ.js → vue-ui-sparkbar-CKcJgAar.js} +3 -3
  102. package/dist/{vue-ui-sparkgauge-oYNntKkm.cjs → vue-ui-sparkgauge-Bb5kLYcu.cjs} +1 -1
  103. package/dist/{vue-ui-sparkgauge-BdmdpNtb.js → vue-ui-sparkgauge-DhYVUtMb.js} +3 -3
  104. package/dist/{vue-ui-sparkhistogram-GmY7s2MV.js → vue-ui-sparkhistogram-CpeUlCj5.js} +4 -4
  105. package/dist/{vue-ui-sparkhistogram-C3fHOiml.cjs → vue-ui-sparkhistogram-W1a3DiWf.cjs} +1 -1
  106. package/dist/{vue-ui-sparkline-B904fIIV.cjs → vue-ui-sparkline-BtsssjV-.cjs} +1 -1
  107. package/dist/{vue-ui-sparkline-BMkTUeZx.js → vue-ui-sparkline-CSJuC8Zx.js} +3 -3
  108. package/dist/{vue-ui-sparkstackbar-uS7i9oTT.js → vue-ui-sparkstackbar-CXpx5fpg.js} +3 -3
  109. package/dist/{vue-ui-sparkstackbar-BMvx-rKU.cjs → vue-ui-sparkstackbar-Xnsvvu3O.cjs} +1 -1
  110. package/dist/{vue-ui-stackbar-BhAHa1Dn.cjs → vue-ui-stackbar-D-zlJHc0.cjs} +1 -1
  111. package/dist/{vue-ui-stackbar-D4OAp2cH.js → vue-ui-stackbar-qlBdgGcF.js} +10 -10
  112. package/dist/{vue-ui-strip-plot-CryNz9qI.cjs → vue-ui-strip-plot-ClCytS01.cjs} +1 -1
  113. package/dist/{vue-ui-strip-plot-BCKuRBtF.js → vue-ui-strip-plot-XvcigaUj.js} +9 -9
  114. package/dist/{vue-ui-table-E36ZrFlN.js → vue-ui-table-ClarkcMT.js} +1 -1
  115. package/dist/{vue-ui-table-7C8sLROG.cjs → vue-ui-table-DThijTG7.cjs} +1 -1
  116. package/dist/{vue-ui-table-heatmap-CaXDSUa1.js → vue-ui-table-heatmap-BRJAh82a.js} +4 -4
  117. package/dist/{vue-ui-table-heatmap-DWp3QF6Q.cjs → vue-ui-table-heatmap-D2a2SQke.cjs} +1 -1
  118. package/dist/{vue-ui-table-sparkline-CMVyXbpe.js → vue-ui-table-sparkline-C-ib3Gw1.js} +5 -5
  119. package/dist/{vue-ui-table-sparkline-BdQUpJPd.cjs → vue-ui-table-sparkline-CerH_6Uy.cjs} +1 -1
  120. package/dist/{vue-ui-thermometer-Li9bmiH0.js → vue-ui-thermometer-B4XtAoUv.js} +5 -5
  121. package/dist/{vue-ui-thermometer-DkDtdSmc.cjs → vue-ui-thermometer-B55takGw.cjs} +1 -1
  122. package/dist/{vue-ui-timer-C_4lJH9K.js → vue-ui-timer-BsEp04PS.js} +4 -4
  123. package/dist/{vue-ui-timer-TsyW89JN.cjs → vue-ui-timer-C_XNLsof.cjs} +1 -1
  124. package/dist/vue-ui-tiremarks-BJaxtZte.cjs +1 -0
  125. package/dist/{vue-ui-tiremarks-Cf51w2b-.js → vue-ui-tiremarks-C9mto5xg.js} +94 -93
  126. package/dist/{vue-ui-treemap-Bos2w-op.cjs → vue-ui-treemap-Bb8nVHbc.cjs} +1 -1
  127. package/dist/{vue-ui-treemap-BcFsPd4Y.js → vue-ui-treemap-Cnub2STE.js} +9 -9
  128. package/dist/{vue-ui-vertical-bar-aKU9mtnf.cjs → vue-ui-vertical-bar-BJRXcwVc.cjs} +1 -1
  129. package/dist/{vue-ui-vertical-bar-D7X05s8-.js → vue-ui-vertical-bar-uMAW4lYM.js} +9 -9
  130. package/dist/{vue-ui-waffle-CFyFmjBl.cjs → vue-ui-waffle-CQRsRNOh.cjs} +1 -1
  131. package/dist/{vue-ui-waffle-DFtpaZsl.js → vue-ui-waffle-FODchV8Z.js} +9 -9
  132. package/dist/{vue-ui-wheel-C3nur9i_.js → vue-ui-wheel-DAHkOyha.js} +85 -84
  133. package/dist/vue-ui-wheel-eKe3KJ5v.cjs +1 -0
  134. package/dist/{vue-ui-word-cloud-DPNwIdFC.js → vue-ui-word-cloud-CjVRqfF6.js} +7 -7
  135. package/dist/{vue-ui-word-cloud-BaP5JJKa.cjs → vue-ui-word-cloud-D-805412.cjs} +1 -1
  136. package/dist/{vue-ui-xy-KNbn-bUg.cjs → vue-ui-xy-BeTe7akA.cjs} +1 -1
  137. package/dist/{vue-ui-xy-uoeb5Otk.js → vue-ui-xy-DaGih5B-.js} +12 -12
  138. package/dist/{vue-ui-xy-canvas-BaaFmIpg.cjs → vue-ui-xy-canvas-DGr5c46-.cjs} +1 -1
  139. package/dist/{vue-ui-xy-canvas-OQHq27Ks.js → vue-ui-xy-canvas-iu96oJOi.js} +10 -10
  140. package/package.json +1 -1
  141. package/dist/vue-ui-tiremarks-CCG1Ys1M.cjs +0 -1
  142. package/dist/vue-ui-wheel-BrEgOljm.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DDwHKEGb.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),be=require("./Title-B6PVw0aK.cjs"),oe=require("./usePrinter-CRKoRqbE.cjs"),ke=require("./Tooltip-Ci47DnuY.cjs"),we=require("./DataTable-DkoeHXI5.cjs"),xe=require("./Legend-CTlJpdAi.cjs"),Ce=require("./vue-ui-skeleton-BeqLQi6X.cjs"),Be=require("./vue-ui-accordion-BBDPcl3d.cjs"),re=require("./useNestedProp-BbpR9SM4.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=S=>(e.pushScopeId("data-v-876ae247"),S=S(),e.popScopeId(),S),Se=["id"],Ne=["xmlns","viewBox"],$e=["id"],Le=["stop-color"],Te=["stop-color"],Ve=["id"],Pe=ue(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ie=ue(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ee=[Pe,Ie],ze=["x","y","height","width"],Fe=["height","width"],De=["rx","x","y","height","width","stroke","stroke-width","filter"],Oe=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Ae=["x","y","height","width","filter"],Me={key:0},qe={key:1},Re={key:2},Ue={key:3},je=["onMouseover","x","y","height","width"],Ge={key:3,class:"vue-data-ui-watermark"},We=["onClick"],He={key:0},Ye={key:1},Xe=["innerHTML"],Je={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ne,emit:se}){const p=S,{vue_ui_waffle:ie}=n.useConfig(),P=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),ce=e.ref(null),F=e.ref(!1),D=e.ref(""),B=e.ref(null),q=e.ref(0),N=e.ref(null),R=e.ref(null),U=e.ref(null),t=e.computed(()=>{const l=re.useNestedProp({userConfig:p.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}),I=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,r)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:a}=ae.useResponsive({chart:N.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?U.value:null});k.value.width=r,k.value.height=a,y.value.width=r,y.value.height=a});I.value=new ResizeObserver(l),I.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const{isPrinting:j,isImaging:G,generatePdf:W,generateImage:H}=oe.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),k=e.ref({height:512,width:512}),y=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(y.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(y.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>y.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>y.value.height/t.value.style.chart.layout.grid.size);function X(l){const r=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,M)=>h+M,0),o=l.map(h=>h/a*r),u=o.map(Math.floor),i=o.map(h=>h%1);let d=r-u.reduce((h,M)=>h+M,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}const J=e.computed(()=>p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||Y.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))),c=e.ref(J.value),ve=e.computed(()=>{const l=c.value.filter((r,a)=>!v.value.includes(r.uid)).map((r,a)=>(r.values||[]).reduce((o,u)=>o+u,0));return X(l)}),de=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return X(l)}),L=e.computed(()=>(p.dataset.forEach((l,r)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:r})}),c.value.filter((l,r)=>!v.value.includes(l.uid)).map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:ve.value[r]})))),he=e.computed(()=>c.value.map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:de.value[r]})));function pe(){return he.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const ye=e.computed(()=>{let l=0;return L.value.map((r,a)=>{const o=l,u=o+r.proportion,i=[];for(let d=Math.floor(o);d<Math.floor(u);d+=1)i.push(d);return l=u,{...r,start:o,rects:i}})}),s=e.computed(()=>ye.value.flatMap((l,r)=>l.rects.map((a,o)=>({isFirst:o===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:r,absoluteStartIndex:o<3,serieId:l.uid,...l}))).map((l,r)=>({...l,isAbsoluteFirst:r%t.value.style.chart.layout.grid.size===0}))),T=e.computed(()=>{const l=[];for(let r=0;r<t.value.style.chart.layout.grid.size;r+=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?r:a,x:(t.value.style.chart.layout.grid.vertical?r:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:r)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+y.value.top});return l}),v=e.ref([]),C=e.ref(!1),K=e.ref(null),Q=e.ref(null);function Z(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 r=J.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let o=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);if(v.value.includes(l)){let i=function(){o>u?(cancelAnimationFrame(K.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),C.value=!1):(C.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),K.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=r;i()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){o<.1?(cancelAnimationFrame(Q.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),C.value=!1):(C.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),Q.value=requestAnimationFrame(u))};u()}se("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,r)=>({name:l.name,color:l.color||Y[r]||n.palette[r]||n.palette[r%n.palette.length],value:(l.values||[]).reduce((a,o)=>a+o,0),uid:l.uid,shape:"square"})).map((l,r)=>({...l,proportion:l.value/c.value.map(a=>(a.values||[]).reduce((o,u)=>o+u,0)).reduce((a,o)=>a+o,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Z(l.uid),isSegregated:v.value.includes(l.uid)}))),fe=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":""})),f=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),O=e.ref(null);function ge(l){if(v.value.length===p.dataset.length)return;const r=s.value[l];O.value={datapoint:r,seriesIndex:r.absoluteIndex,series:c.value,config:t.value},F.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:r,series:c.value,config:t.value})))D.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value});else{let o="";if(o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,o+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${r.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(o+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,r.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:r.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:r,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:r.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?o+=`<span>(${u})</span></div>`:o+=`<b>${u}%</b></div>`}D.value=o}}const g=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),r=L.value.map(a=>a.value);return{head:l,body:r}});function A(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function ee(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(r);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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,f.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],r=g.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,g.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(g.value.body[i]/f.value)?"-":n.dataLabel({v:g.value.body[i]/f.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},o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:r,config:a,colNames:o}}),V=e.ref(!1);function me(l){V.value=l,q.value+=1}function te(){m.value.showTable=!m.value.showTable}function le(){m.value.showTooltip=!m.value.showTooltip}return ne({getData:pe,generatePdf:W,generateCsv:ee,generateImage:H,toggleTable:te,toggleTooltip:le}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${b.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:R,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(be._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(G),uid:b.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:V.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:me,onGeneratePdf:e.unref(W),onGenerateCsv:ee,onGenerateImage:e.unref(H),onToggleTable:te,onToggleTooltip:le},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:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,o)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${o}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(a.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,$e))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Ee,8,Ve)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:s.value[o].color,...s.value[o]},isSelected:[null,void 0].includes(B.value)?!0:s.value[o].serieIndex===B.value})),void 0,!0)],8,ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:y.value.height-24,width:y.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Fe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(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:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,De))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(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:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${b.value}_${o})`:s.value[o].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,Oe))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[o].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[o].isAbsoluteFirst&&o%t.value.style.chart.layout.grid.size===0&&s.value[o].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:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:A(s.value[o].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 ${$.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[o].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[o].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[o].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[o].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",Re," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],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",Ue,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a})),1)):e.createCommentVNode("",!0)],4)],8,Ae)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>ge(o),onMouseleave:r[0]||(r[0]=u=>{F.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:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,je))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:U},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:0,legendSet:_.value,config:fe.value,onClickMarker:r[1]||(r[1]=({legend:a})=>Z(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>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:C.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",He," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(n.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,We)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(ke._sfc_main,{show:m.value.showTooltip&&F.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:N.value,content:D.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize"]),P.value?(e.openBlock(),e.createBlock(Be.default,{key:5,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(we.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Xe)]),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)],14,Se))}},Ke=_e._export_sfc(Je,[["__scopeId","data-v-876ae247"]]);exports.default=Ke;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CsqP5b4f.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),be=require("./Title-96aF3-Z1.cjs"),oe=require("./usePrinter-CobCVhRp.cjs"),ke=require("./Tooltip-Bkzl1VQe.cjs"),we=require("./DataTable-BTNru9rE.cjs"),xe=require("./Legend-D_1fNWhT.cjs"),Ce=require("./vue-ui-skeleton-BR5OmV8V.cjs"),Be=require("./vue-ui-accordion-C1ybaK7v.cjs"),re=require("./useNestedProp-DQ2DOe-8.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=S=>(e.pushScopeId("data-v-876ae247"),S=S(),e.popScopeId(),S),Se=["id"],Ne=["xmlns","viewBox"],$e=["id"],Le=["stop-color"],Te=["stop-color"],Ve=["id"],Pe=ue(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ie=ue(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ee=[Pe,Ie],ze=["x","y","height","width"],Fe=["height","width"],De=["rx","x","y","height","width","stroke","stroke-width","filter"],Oe=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Ae=["x","y","height","width","filter"],Me={key:0},qe={key:1},Re={key:2},Ue={key:3},je=["onMouseover","x","y","height","width"],Ge={key:3,class:"vue-data-ui-watermark"},We=["onClick"],He={key:0},Ye={key:1},Xe=["innerHTML"],Je={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ne,emit:se}){const p=S,{vue_ui_waffle:ie}=n.useConfig(),P=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),ce=e.ref(null),F=e.ref(!1),D=e.ref(""),B=e.ref(null),q=e.ref(0),N=e.ref(null),R=e.ref(null),U=e.ref(null),t=e.computed(()=>{const l=re.useNestedProp({userConfig:p.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}),I=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,r)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:a}=ae.useResponsive({chart:N.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?U.value:null});k.value.width=r,k.value.height=a,y.value.width=r,y.value.height=a});I.value=new ResizeObserver(l),I.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const{isPrinting:j,isImaging:G,generatePdf:W,generateImage:H}=oe.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),k=e.ref({height:512,width:512}),y=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(y.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(y.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>y.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>y.value.height/t.value.style.chart.layout.grid.size);function X(l){const r=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,M)=>h+M,0),o=l.map(h=>h/a*r),u=o.map(Math.floor),i=o.map(h=>h%1);let d=r-u.reduce((h,M)=>h+M,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}const J=e.computed(()=>p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||Y.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))),c=e.ref(J.value),ve=e.computed(()=>{const l=c.value.filter((r,a)=>!v.value.includes(r.uid)).map((r,a)=>(r.values||[]).reduce((o,u)=>o+u,0));return X(l)}),de=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return X(l)}),L=e.computed(()=>(p.dataset.forEach((l,r)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:r})}),c.value.filter((l,r)=>!v.value.includes(l.uid)).map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:ve.value[r]})))),he=e.computed(()=>c.value.map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:de.value[r]})));function pe(){return he.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const ye=e.computed(()=>{let l=0;return L.value.map((r,a)=>{const o=l,u=o+r.proportion,i=[];for(let d=Math.floor(o);d<Math.floor(u);d+=1)i.push(d);return l=u,{...r,start:o,rects:i}})}),s=e.computed(()=>ye.value.flatMap((l,r)=>l.rects.map((a,o)=>({isFirst:o===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:r,absoluteStartIndex:o<3,serieId:l.uid,...l}))).map((l,r)=>({...l,isAbsoluteFirst:r%t.value.style.chart.layout.grid.size===0}))),T=e.computed(()=>{const l=[];for(let r=0;r<t.value.style.chart.layout.grid.size;r+=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?r:a,x:(t.value.style.chart.layout.grid.vertical?r:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:r)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+y.value.top});return l}),v=e.ref([]),C=e.ref(!1),K=e.ref(null),Q=e.ref(null);function Z(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 r=J.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let o=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);if(v.value.includes(l)){let i=function(){o>u?(cancelAnimationFrame(K.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),C.value=!1):(C.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),K.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=r;i()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){o<.1?(cancelAnimationFrame(Q.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),C.value=!1):(C.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),Q.value=requestAnimationFrame(u))};u()}se("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,r)=>({name:l.name,color:l.color||Y[r]||n.palette[r]||n.palette[r%n.palette.length],value:(l.values||[]).reduce((a,o)=>a+o,0),uid:l.uid,shape:"square"})).map((l,r)=>({...l,proportion:l.value/c.value.map(a=>(a.values||[]).reduce((o,u)=>o+u,0)).reduce((a,o)=>a+o,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Z(l.uid),isSegregated:v.value.includes(l.uid)}))),fe=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":""})),f=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),O=e.ref(null);function ge(l){if(v.value.length===p.dataset.length)return;const r=s.value[l];O.value={datapoint:r,seriesIndex:r.absoluteIndex,series:c.value,config:t.value},F.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:r,series:c.value,config:t.value})))D.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value});else{let o="";if(o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,o+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${r.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(o+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,r.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:r.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:r,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:r.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?o+=`<span>(${u})</span></div>`:o+=`<b>${u}%</b></div>`}D.value=o}}const g=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),r=L.value.map(a=>a.value);return{head:l,body:r}});function A(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function ee(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(r);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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,f.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],r=g.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,g.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(g.value.body[i]/f.value)?"-":n.dataLabel({v:g.value.body[i]/f.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},o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:r,config:a,colNames:o}}),V=e.ref(!1);function me(l){V.value=l,q.value+=1}function te(){m.value.showTable=!m.value.showTable}function le(){m.value.showTooltip=!m.value.showTooltip}return ne({getData:pe,generatePdf:W,generateCsv:ee,generateImage:H,toggleTable:te,toggleTooltip:le}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${b.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:R,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(be._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(G),uid:b.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:V.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:me,onGeneratePdf:e.unref(W),onGenerateCsv:ee,onGenerateImage:e.unref(H),onToggleTable:te,onToggleTooltip:le},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:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,o)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${o}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(a.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,$e))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Ee,8,Ve)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:s.value[o].color,...s.value[o]},isSelected:[null,void 0].includes(B.value)?!0:s.value[o].serieIndex===B.value})),void 0,!0)],8,ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:y.value.height-24,width:y.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Fe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(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:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,De))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(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:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${b.value}_${o})`:s.value[o].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,Oe))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[o].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[o].isAbsoluteFirst&&o%t.value.style.chart.layout.grid.size===0&&s.value[o].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:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:A(s.value[o].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 ${$.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[o].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[o].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[o].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[o].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",Re," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],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",Ue,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a})),1)):e.createCommentVNode("",!0)],4)],8,Ae)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>ge(o),onMouseleave:r[0]||(r[0]=u=>{F.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:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,je))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:U},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:0,legendSet:_.value,config:fe.value,onClickMarker:r[1]||(r[1]=({legend:a})=>Z(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>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:C.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",He," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(n.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,We)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(ke._sfc_main,{show:m.value.showTooltip&&F.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:N.value,content:D.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize"]),P.value?(e.openBlock(),e.createBlock(Be.default,{key:5,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(we.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Xe)]),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)],14,Se))}},Ke=_e._export_sfc(Je,[["__scopeId","data-v-876ae247"]]);exports.default=Ke;
@@ -1,14 +1,14 @@
1
1
  import { computed as c, ref as v, onMounted as Me, onBeforeUnmount as De, openBlock as r, createElementBlock as i, normalizeClass as xe, normalizeStyle as W, createVNode as oe, createCommentVNode as p, createBlock as Q, unref as h, createSlots as Ee, withCtx as m, renderSlot as b, normalizeProps as q, guardReactiveProps as H, createElementVNode as w, Fragment as T, renderList as V, toDisplayString as S, createTextVNode as Ce, nextTick as Ge, pushScopeId as Re, popScopeId as Ue } from "vue";
2
- import { u as je, c as We, t as qe, a as He, p as B, o as Xe, e as ue, g as Ye, b as Je, d as Ke, i as M, f as x, X as Qe, v as Ze, w as et, E as tt, H as lt, x as at, y as ot, q as ut, r as st } from "./index-b22AFna7.js";
2
+ import { u as je, c as We, t as qe, a as He, p as B, o as Xe, e as ue, g as Ye, b as Je, d as Ke, i as M, f as x, X as Qe, v as Ze, w as et, E as tt, H as lt, x as at, y as ot, q as ut, r as st } from "./index--JGgf0j_.js";
3
3
  import { t as rt, u as nt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as it } from "./Title-CzxknLI3.js";
5
- import { u as ct, U as vt } from "./usePrinter-C_wOlUXy.js";
6
- import { _ as dt } from "./Tooltip-DYVjAqo-.js";
7
- import { D as ht } from "./DataTable-Bwco5wF0.js";
8
- import { L as yt } from "./Legend-Cpk8DCWi.js";
9
- import ft from "./vue-ui-skeleton-c0TzbjC0.js";
10
- import pt from "./vue-ui-accordion-H9MtAuZL.js";
11
- import { u as _e } from "./useNestedProp-6FL791Qt.js";
4
+ import { _ as it } from "./Title-s23qMfox.js";
5
+ import { u as ct, U as vt } from "./usePrinter-DLzQ_BtZ.js";
6
+ import { _ as dt } from "./Tooltip-DrhztkFj.js";
7
+ import { D as ht } from "./DataTable-C3P8lB6X.js";
8
+ import { L as yt } from "./Legend-Bvm45WSa.js";
9
+ import ft from "./vue-ui-skeleton-Dgvq-LKZ.js";
10
+ import pt from "./vue-ui-accordion-CT0j1v1a.js";
11
+ import { u as _e } from "./useNestedProp-BMj7Pe83.js";
12
12
  import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const $e = (D) => (Re("data-v-876ae247"), D = D(), Ue(), D), mt = ["id"], bt = ["xmlns", "viewBox"], wt = ["id"], kt = ["stop-color"], xt = ["stop-color"], Ct = ["id"], _t = /* @__PURE__ */ $e(() => /* @__PURE__ */ w("feGaussianBlur", {
14
14
  in: "SourceGraphic",
@@ -1,15 +1,15 @@
1
- import { computed as p, ref as s, watch as W, onMounted as q, onBeforeUnmount as J, openBlock as u, createElementBlock as v, normalizeStyle as C, createVNode as K, createCommentVNode as d, createBlock as A, unref as i, createSlots as Q, withCtx as _, renderSlot as y, normalizeProps as N, guardReactiveProps as M, normalizeClass as L, Fragment as Z, renderList as ee, toDisplayString as te } from "vue";
2
- import { u as ae, c as le, t as se, o as ne, e as oe, v as U, X as re, i as ue, f as ie } from "./index-b22AFna7.js";
3
- import { _ as ce } from "./Title-CzxknLI3.js";
4
- import { u as he, U as ve } from "./usePrinter-C_wOlUXy.js";
5
- import { t as de, u as ye } from "./useResponsive-NZB-WLRF.js";
6
- import fe from "./vue-ui-skeleton-c0TzbjC0.js";
7
- import { u as X } from "./useNestedProp-6FL791Qt.js";
1
+ import { computed as p, ref as r, watch as J, onMounted as K, onBeforeUnmount as Q, openBlock as u, createElementBlock as v, normalizeStyle as C, createVNode as Z, createCommentVNode as d, createBlock as M, unref as n, createSlots as V, withCtx as _, renderSlot as y, normalizeProps as N, guardReactiveProps as A, normalizeClass as L, Fragment as ee, renderList as te, toDisplayString as ae } from "vue";
2
+ import { u as le, c as se, t as ne, o as oe, e as re, v as U, X as ue, i as ie, s as X, f as ce } from "./index--JGgf0j_.js";
3
+ import { _ as he } from "./Title-s23qMfox.js";
4
+ import { u as ve, U as de } from "./usePrinter-DLzQ_BtZ.js";
5
+ import { t as ye, u as fe } from "./useResponsive-NZB-WLRF.js";
6
+ import me from "./vue-ui-skeleton-Dgvq-LKZ.js";
7
+ import { u as B } from "./useNestedProp-BMj7Pe83.js";
8
8
  import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], we = ["cx", "cy", "r", "stroke", "stroke-width"], be = ["x", "y", "font-size", "fill", "font-weight"], Ce = {
9
+ const pe = ["id"], ke = ["xmlns", "viewBox"], we = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], be = ["cx", "cy", "r", "stroke", "stroke-width"], Ce = ["x", "y", "font-size", "fill", "font-weight"], _e = {
10
10
  key: 3,
11
11
  class: "vue-data-ui-watermark"
12
- }, _e = {
12
+ }, xe = {
13
13
  __name: "vue-ui-wheel",
14
14
  props: {
15
15
  config: {
@@ -25,86 +25,87 @@ const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "str
25
25
  }
26
26
  }
27
27
  },
28
- setup(B, { expose: G }) {
29
- const n = B, { vue_ui_wheel: T } = ae(), k = p(() => !!n.dataset && Object.keys(n.dataset).length), w = s(le()), E = s(null), x = s(0), f = s(null), I = s(null), e = p(() => {
30
- const t = X({
31
- userConfig: n.config,
32
- defaultConfig: T
28
+ setup(G, { expose: T }) {
29
+ const h = G, { vue_ui_wheel: E } = le(), k = p(() => !!h.dataset && Object.keys(h.dataset).length), w = r(se()), j = r(null), x = r(0), f = r(null), I = r(null), e = p(() => {
30
+ const t = B({
31
+ userConfig: h.config,
32
+ defaultConfig: E
33
33
  });
34
34
  return t.theme ? {
35
- ...X({
36
- userConfig: se.vue_ui_wheel[t.theme] || n.config,
35
+ ...B({
36
+ userConfig: ne.vue_ui_wheel[t.theme] || h.config,
37
37
  defaultConfig: t
38
38
  })
39
39
  } : t;
40
- }), { isPrinting: $, isImaging: F, generatePdf: P, generateImage: z } = he({
40
+ }), { isPrinting: $, isImaging: F, generatePdf: P, generateImage: z } = ve({
41
41
  elementId: w.value,
42
42
  fileName: e.value.style.chart.title.text || "vue-ui-wheel"
43
- }), l = s({
43
+ }), l = r({
44
44
  size: 360,
45
45
  height: 360,
46
46
  width: 360
47
- }), b = s(e.value.style.chart.layout.percentage.fontSize), o = p(() => ({
47
+ }), b = r(e.value.style.chart.layout.percentage.fontSize), o = p(() => ({
48
48
  radius: Math.min(l.value.width, l.value.height) * 0.9 / 2,
49
49
  centerX: l.value.width / 2,
50
50
  centerY: l.value.height / 2
51
51
  }));
52
- function O(t, c = 1) {
52
+ function O(t, i = 1) {
53
53
  return {
54
- x: o.value.centerX + o.value.radius * Math.cos(29.85 + t * Math.PI / 180) * c,
55
- y: o.value.centerY + o.value.radius * Math.sin(29.85 + t * Math.PI / 180) * c
54
+ x: o.value.centerX + o.value.radius * Math.cos(29.85 + t * Math.PI / 180) * i,
55
+ y: o.value.centerY + o.value.radius * Math.sin(29.85 + t * Math.PI / 180) * i
56
56
  };
57
57
  }
58
- const r = s(e.value.style.chart.animation.use ? 0 : n.dataset.percentage || 0);
59
- W(() => n.dataset.percentage, () => {
60
- r.value = s(e.value.style.chart.animation.use ? 0 : n.dataset.percentage || 0), S();
61
- });
62
- const g = s(null);
63
- q(() => {
64
- if (ne(n.dataset) && oe({
58
+ const s = r(e.value.style.chart.animation.use ? 0 : h.dataset.percentage || 0);
59
+ J(() => h.dataset, (t) => {
60
+ e.value.style.chart.animation.use ? S(t.percentage) : s.value = t.percentage || 0;
61
+ }, { deep: !0 });
62
+ const m = r(null);
63
+ K(() => {
64
+ if (oe(h.dataset) && re({
65
65
  componentName: "VueUiWheel",
66
66
  type: "dataset"
67
- }), S(), e.value.responsive) {
68
- const t = de(() => {
69
- const { width: c, height: a } = ye({
67
+ }), S(h.dataset.percentage || 0), e.value.responsive) {
68
+ const t = ye(() => {
69
+ const { width: i, height: a } = fe({
70
70
  chart: f.value,
71
71
  title: e.value.style.chart.title.text ? I.value : null
72
72
  });
73
- l.value.width = c, l.value.height = a, b.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(c, a);
73
+ l.value.width = i, l.value.height = a, b.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(i, a);
74
74
  });
75
- g.value = new ResizeObserver(t), g.value.observe(f.value.parentNode);
75
+ m.value = new ResizeObserver(t), m.value.observe(f.value.parentNode);
76
76
  }
77
- }), J(() => {
78
- g.value && g.value.disconnect();
77
+ }), Q(() => {
78
+ m.value && m.value.disconnect();
79
79
  });
80
- function S() {
81
- let t = 0, c = e.value.style.chart.animation.speed, a = 5e-3 * e.value.style.chart.animation.acceleration;
82
- function h() {
83
- r.value += c + t, t += a, r.value < (n.dataset.percentage || 0) ? requestAnimationFrame(h) : r.value = n.dataset.percentage || 0;
80
+ function S(t) {
81
+ let i = e.value.style.chart.animation.speed;
82
+ const a = Math.abs(t - s.value) / (i * 120);
83
+ function c() {
84
+ s.value < t ? s.value = Math.min(s.value + a, t) : s.value > t && (s.value = Math.max(s.value - a, t)), s.value !== t && requestAnimationFrame(c);
84
85
  }
85
- e.value.style.chart.animation.use && (r.value = 0, h());
86
+ c();
86
87
  }
87
- const j = p(() => {
88
+ const D = p(() => {
88
89
  const t = [];
89
90
  for (let a = 0; a < 100; a += 1) {
90
- const h = r.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: R, y: V } = O(l.value.size / 100 * a), { x: Y, y: H } = O(l.value.size / 100 * a, 0.9);
91
+ const c = s.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: Y, y: H } = O(l.value.size / 100 * a), { x: W, y: q } = O(l.value.size / 100 * a, 0.9);
91
92
  t.push({
92
- x1: R,
93
- y1: V,
94
- x2: Y,
95
- y2: H,
96
- color: e.value.style.chart.layout.wheel.ticks.gradient.show ? U(h, a / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : h
93
+ x1: Y,
94
+ y1: H,
95
+ x2: W,
96
+ y2: q,
97
+ color: e.value.style.chart.layout.wheel.ticks.gradient.show ? U(c, a / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : c
97
98
  });
98
99
  }
99
100
  return t;
100
- }), m = s(!1);
101
- function D(t) {
102
- m.value = t, x.value += 1;
101
+ }), g = r(!1);
102
+ function R(t) {
103
+ g.value = t, x.value += 1;
103
104
  }
104
- return G({
105
+ return T({
105
106
  generatePdf: P,
106
107
  generateImage: z
107
- }), (t, c) => (u(), v("div", {
108
+ }), (t, i) => (u(), v("div", {
108
109
  class: "vue-ui-wheel",
109
110
  ref_key: "wheelChart",
110
111
  ref: f,
@@ -117,7 +118,7 @@ const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "str
117
118
  ref: I,
118
119
  style: C(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
119
120
  }, [
120
- K(ce, {
121
+ Z(he, {
121
122
  config: {
122
123
  title: {
123
124
  cy: "wheel-title",
@@ -130,26 +131,26 @@ const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "str
130
131
  }
131
132
  }, null, 8, ["config"])
132
133
  ], 4)) : d("", !0),
133
- e.value.userOptions.show && k.value ? (u(), A(ve, {
134
+ e.value.userOptions.show && k.value ? (u(), M(de, {
134
135
  ref_key: "details",
135
- ref: E,
136
+ ref: j,
136
137
  key: `user_options_${x.value}`,
137
138
  backgroundColor: e.value.style.chart.backgroundColor,
138
139
  color: e.value.style.chart.color,
139
- isPrinting: i($),
140
- isImaging: i(F),
140
+ isPrinting: n($),
141
+ isImaging: n(F),
141
142
  uid: w.value,
142
143
  hasPdf: e.value.userOptions.buttons.pdf,
143
144
  hasImg: e.value.userOptions.buttons.img,
144
145
  hasFullscreen: e.value.userOptions.buttons.fullscreen,
145
146
  hasXls: !1,
146
- isFullscreen: m.value,
147
+ isFullscreen: g.value,
147
148
  titles: { ...e.value.userOptions.buttonTitles },
148
149
  chartElement: f.value,
149
- onToggleFullscreen: D,
150
- onGeneratePdf: i(P),
151
- onGenerateImage: i(z)
152
- }, Q({ _: 2 }, [
150
+ onToggleFullscreen: R,
151
+ onGeneratePdf: n(P),
152
+ onGenerateImage: n(z)
153
+ }, V({ _: 2 }, [
153
154
  t.$slots.optionPdf ? {
154
155
  name: "optionPdf",
155
156
  fn: _(() => [
@@ -166,20 +167,20 @@ const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "str
166
167
  } : void 0,
167
168
  t.$slots.optionFullscreen ? {
168
169
  name: "optionFullscreen",
169
- fn: _(({ toggleFullscreen: a, isFullscreen: h }) => [
170
- y(t.$slots, "optionFullscreen", N(M({ toggleFullscreen: a, isFullscreen: h })), void 0, !0)
170
+ fn: _(({ toggleFullscreen: a, isFullscreen: c }) => [
171
+ y(t.$slots, "optionFullscreen", N(A({ toggleFullscreen: a, isFullscreen: c })), void 0, !0)
171
172
  ]),
172
173
  key: "2"
173
174
  } : void 0
174
175
  ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : d("", !0),
175
176
  k.value ? (u(), v("svg", {
176
177
  key: 2,
177
- xmlns: i(re),
178
- class: L({ "vue-data-ui-fullscreen--on": m.value, "vue-data-ui-fulscreen--off": !m.value }),
178
+ xmlns: n(ue),
179
+ class: L({ "vue-data-ui-fullscreen--on": g.value, "vue-data-ui-fulscreen--off": !g.value }),
179
180
  viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
180
181
  style: C(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
181
182
  }, [
182
- (u(!0), v(Z, null, ee(j.value, (a, h) => (u(), v("line", {
183
+ (u(!0), v(ee, null, te(D.value, (a, c) => (u(), v("line", {
183
184
  x1: a.x1,
184
185
  x2: a.x2,
185
186
  y1: a.y1,
@@ -187,8 +188,8 @@ const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "str
187
188
  stroke: a.color,
188
189
  "stroke-width": 5 / 360 * Math.min(l.value.width, l.value.height),
189
190
  "stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
190
- class: L({ "vue-ui-tick-animated": e.value.style.chart.animation.use && h <= r.value })
191
- }, null, 10, ke))), 256)),
191
+ class: L({ "vue-ui-tick-animated": e.value.style.chart.animation.use && c <= s.value })
192
+ }, null, 10, we))), 256)),
192
193
  e.value.style.chart.layout.innerCircle.show ? (u(), v("circle", {
193
194
  key: 0,
194
195
  cx: o.value.centerX,
@@ -197,31 +198,31 @@ const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "str
197
198
  stroke: e.value.style.chart.layout.innerCircle.stroke,
198
199
  "stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
199
200
  fill: "none"
200
- }, null, 8, we)) : d("", !0),
201
+ }, null, 8, be)) : d("", !0),
201
202
  e.value.style.chart.layout.percentage.show ? (u(), v("text", {
202
203
  key: 1,
203
204
  x: o.value.centerX,
204
205
  y: o.value.centerY + b.value / 3,
205
206
  "font-size": b.value,
206
- fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? i(U)(e.value.style.chart.layout.wheel.ticks.activeColor, r.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
207
+ fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? n(U)(e.value.style.chart.layout.wheel.ticks.activeColor, s.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
207
208
  "text-anchor": "middle",
208
209
  "font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
209
210
  style: { "font-variant-numeric": "tabluar-nums" }
210
- }, te(i(ue)(
211
+ }, ae(n(ie)(
211
212
  e.value.style.chart.layout.percentage.formatter,
212
- r.value,
213
- i(ie)({
214
- v: r.value,
213
+ n(X)(s.value),
214
+ n(ce)({
215
+ v: n(X)(s.value),
215
216
  s: "%",
216
217
  r: e.value.style.chart.layout.percentage.rounding
217
218
  })
218
- )), 9, be)) : d("", !0),
219
+ )), 9, Ce)) : d("", !0),
219
220
  y(t.$slots, "svg", { svg: l.value }, void 0, !0)
220
- ], 14, pe)) : d("", !0),
221
- t.$slots.watermark ? (u(), v("div", Ce, [
222
- y(t.$slots, "watermark", N(M({ isPrinting: i($) || i(F) })), void 0, !0)
221
+ ], 14, ke)) : d("", !0),
222
+ t.$slots.watermark ? (u(), v("div", _e, [
223
+ y(t.$slots, "watermark", N(A({ isPrinting: n($) || n(F) })), void 0, !0)
223
224
  ])) : d("", !0),
224
- k.value ? d("", !0) : (u(), A(fe, {
225
+ k.value ? d("", !0) : (u(), M(me, {
225
226
  key: 4,
226
227
  config: {
227
228
  type: "wheel",
@@ -233,9 +234,9 @@ const me = ["id"], pe = ["xmlns", "viewBox"], ke = ["x1", "x2", "y1", "y2", "str
233
234
  }
234
235
  }
235
236
  }, null, 8, ["config"]))
236
- ], 12, me));
237
+ ], 12, pe));
237
238
  }
238
- }, Ae = /* @__PURE__ */ ge(_e, [["__scopeId", "data-v-a9569c10"]]);
239
+ }, Ne = /* @__PURE__ */ ge(xe, [["__scopeId", "data-v-929bab56"]]);
239
240
  export {
240
- Ae as default
241
+ Ne as default
241
242
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CsqP5b4f.cjs"),T=require("./Title-96aF3-Z1.cjs"),P=require("./usePrinter-CobCVhRp.cjs"),B=require("./useResponsive-B3TrDDIG.cjs"),L=require("./vue-ui-skeleton-BR5OmV8V.cjs"),N=require("./useNestedProp-DQ2DOe-8.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=["id"],R=["xmlns","viewBox"],V=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],X=["cx","cy","r","stroke","stroke-width"],j=["x","y","font-size","fill","font-weight"],H={key:3,class:"vue-data-ui-watermark"},D={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:S}){const c=I,{vue_ui_wheel:z}=r.useConfig(),f=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),y=e.ref(r.createUid()),F=e.ref(null),g=e.ref(0),h=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=N.useNestedProp({userConfig:c.config,defaultConfig:z});return l.theme?{...N.useNestedProp({userConfig:r.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}),{isPrinting:k,isImaging:w,generatePdf:C,generateImage:b}=P.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),u=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function _(l,s=1){return{x:u.value.centerX+u.value.radius*Math.cos(29.85+l*Math.PI/180)*s,y:u.value.centerY+u.value.radius*Math.sin(29.85+l*Math.PI/180)*s}}const o=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?x(l.percentage):o.value=l.percentage||0},{deep:!0});const v=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(c.dataset)&&r.error({componentName:"VueUiWheel",type:"dataset"}),x(c.dataset.percentage||0),t.value.responsive){const l=B.throttle(()=>{const{width:s,height:a}=B.useResponsive({chart:h.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=s,n.value.height=a,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(s,a)});v.value=new ResizeObserver(l),v.value.observe(h.value.parentNode)}}),e.onBeforeUnmount(()=>{v.value&&v.value.disconnect()});function x(l){let s=t.value.style.chart.animation.speed;const a=Math.abs(l-o.value)/(s*120);function i(){o.value<l?o.value=Math.min(o.value+a,l):o.value>l&&(o.value=Math.max(o.value-a,l)),o.value!==l&&requestAnimationFrame(i)}i()}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const i=o.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:M,y:E}=_(n.value.size/100*a),{x:A,y:q}=_(n.value.size/100*a,.9);l.push({x1:M,y1:E,x2:A,y2:q,color:t.value.style.chart.layout.wheel.ticks.gradient.show?r.shiftHue(i,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):i})}return l}),d=e.ref(!1);function O(l){d.value=l,g.value+=1}return S({generatePdf:C,generateImage:b}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:h,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%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(T._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(P.UserOptions,{ref_key:"details",ref:F,key:`user_options_${g.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(k),isImaging:e.unref(w),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:d.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,onToggleFullscreen:O,onGeneratePdf:e.unref(C),onGenerateImage:e.unref(b)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":d.value,"vue-data-ui-fulscreen--off":!d.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.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&&i<=o.value})},null,10,V))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:u.value.centerX,cy:u.value.centerY,r:u.value.radius*.8<=0?1e-4:u.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,X)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.centerX,y:u.value.centerY+m.value/3,"font-size":m.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(r.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,o.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(r.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(r.checkNaN)(o.value),e.unref(r.dataLabel)({v:e.unref(r.checkNaN)(o.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,j)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,R)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(k)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L.default,{key:4,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,G))}},Y=U._export_sfc(D,[["__scopeId","data-v-929bab56"]]);exports.default=Y;
@@ -1,13 +1,13 @@
1
1
  import { useCssVars as we, computed as f, openBlock as i, createElementBlock as v, createVNode as q, renderSlot as m, createElementVNode as C, normalizeStyle as N, pushScopeId as xe, popScopeId as $e, ref as c, watch as te, onMounted as Se, onBeforeUnmount as Fe, createCommentVNode as F, createBlock as L, unref as p, createSlots as Ne, withCtx as h, normalizeProps as X, guardReactiveProps as j, normalizeClass as ae, Fragment as _e, renderList as Pe, toDisplayString as oe, createTextVNode as Te, nextTick as le } from "vue";
2
- import { u as ze, W as Ie, s as Ae, c as se, t as Oe, a as Me, p as E, o as We, e as ne, g as De, f as Be, X as Ee, q as Re, r as Ue } from "./index-b22AFna7.js";
3
- import { _ as Ve } from "./Title-CzxknLI3.js";
4
- import { u as Ge, U as Le } from "./usePrinter-C_wOlUXy.js";
2
+ import { u as ze, W as Ie, s as Ae, c as se, t as Oe, a as Me, p as E, o as We, e as ne, g as De, f as Be, X as Ee, q as Re, r as Ue } from "./index--JGgf0j_.js";
3
+ import { _ as Ve } from "./Title-s23qMfox.js";
4
+ import { u as Ge, U as Le } from "./usePrinter-DLzQ_BtZ.js";
5
5
  import { d as Xe, t as je, u as qe } from "./useResponsive-NZB-WLRF.js";
6
- import He from "./vue-ui-accordion-H9MtAuZL.js";
7
- import { D as Ye } from "./DataTable-Bwco5wF0.js";
8
- import Je from "./BaseIcon-D93rtrSm.js";
6
+ import He from "./vue-ui-accordion-CT0j1v1a.js";
7
+ import { D as Ye } from "./DataTable-C3P8lB6X.js";
8
+ import Je from "./BaseIcon-D6HKiBWY.js";
9
9
  import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as re } from "./useNestedProp-6FL791Qt.js";
10
+ import { u as re } from "./useNestedProp-BMj7Pe83.js";
11
11
  const Ke = (r) => (xe("data-v-3fd7d274"), r = r(), $e(), r), Qe = { "data-html2canvas-ignore": "" }, Ze = {
12
12
  key: 0,
13
13
  class: "reset-wrapper"
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DDwHKEGb.cjs"),ne=require("./Title-B6PVw0aK.cjs"),W=require("./usePrinter-CRKoRqbE.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-BBDPcl3d.cjs"),se=require("./DataTable-DkoeHXI5.cjs"),ue=require("./BaseIcon-HycAYj53.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-BbpR9SM4.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__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(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:u.checkNaN(o.value)}))),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const N=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(N.value=new ResizeObserver(X),N.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),$=e.ref({showTable:t.value.table.show});function Y(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 J(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 K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.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=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),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}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){$.value.showTable=!$.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},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:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(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:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,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:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),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)],12,ye))}},Ne=L._export_sfc(Se,[["__scopeId","data-v-4e5216cf"]]);exports.default=Ne;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CsqP5b4f.cjs"),ne=require("./Title-96aF3-Z1.cjs"),W=require("./usePrinter-CobCVhRp.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-C1ybaK7v.cjs"),se=require("./DataTable-BTNru9rE.cjs"),ue=require("./BaseIcon-DlKBf9ve.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-DQ2DOe-8.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__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(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:u.checkNaN(o.value)}))),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const N=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(N.value=new ResizeObserver(X),N.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),$=e.ref({showTable:t.value.table.show});function Y(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 J(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 K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.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=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),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}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){$.value.showTable=!$.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},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:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(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:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,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:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),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)],12,ye))}},Ne=L._export_sfc(Se,[["__scopeId","data-v-4e5216cf"]]);exports.default=Ne;