vue-data-ui 2.4.49 → 2.4.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/{Arrow-Q0cOmO5p.js → Arrow-D1z9KkQN.js} +1 -1
  2. package/dist/{Arrow-CTukks_V.cjs → Arrow-DuuEh1Nr.cjs} +1 -1
  3. package/dist/{BaseIcon-CaYP30Aq.js → BaseIcon-BHwqOTt4.js} +1 -1
  4. package/dist/{BaseIcon-2ZD3jgGz.cjs → BaseIcon-DemqZ_13.cjs} +1 -1
  5. package/dist/{DataTable-CO5C8Cmb.js → DataTable-CQ8fQnex.js} +2 -2
  6. package/dist/{DataTable-kMUhutQ4.cjs → DataTable-CovKV5Yy.cjs} +1 -1
  7. package/dist/{Legend-DPHcmrzd.cjs → Legend-Bbz-hKDf.cjs} +1 -1
  8. package/dist/{Legend-FZN9UHoI.js → Legend-Br7MWNDo.js} +1 -1
  9. package/dist/{PackageVersion-rnWHRWGI.cjs → PackageVersion-BEtuCME5.cjs} +1 -1
  10. package/dist/{PackageVersion-DYk2hOG1.js → PackageVersion-BV3fHO46.js} +1 -1
  11. package/dist/{PenAndPaper-BQl9-uX0.cjs → PenAndPaper-BIcmfBvD.cjs} +1 -1
  12. package/dist/{PenAndPaper-BfgS_5ux.js → PenAndPaper-CCOywdmm.js} +3 -3
  13. package/dist/{Shape-BqkMzXqo.js → Shape-B7Mekpyf.js} +1 -1
  14. package/dist/{Shape-BblkpCyL.cjs → Shape-BD37ZaX9.cjs} +1 -1
  15. package/dist/{Slicer-yEeqKUDF.cjs → Slicer-CWvkt-8k.cjs} +1 -1
  16. package/dist/{Slicer-DlgqsI5C.js → Slicer-ahFReg7h.js} +2 -2
  17. package/dist/{Title-5Vedk01J.cjs → Title-C2siG5N2.cjs} +1 -1
  18. package/dist/{Title-DED-PQ7X.js → Title-CIsKiWgN.js} +1 -1
  19. package/dist/{Tooltip-CHseiJu8.js → Tooltip-B1LgrF9R.js} +1 -1
  20. package/dist/{Tooltip-DjCKBAC4.cjs → Tooltip-CS4C58T7.cjs} +1 -1
  21. package/dist/{index-igxqCP2w.js → index-BtL_cLa8.js} +1 -1
  22. package/dist/{index-BHQZE19X.cjs → index-DoD-GxZR.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-CSVnZVwZ.js → useNestedProp-CEAfm1tu.js} +1 -1
  25. package/dist/{useNestedProp-CwpqC_aE.cjs → useNestedProp-D_feh7A_.cjs} +1 -1
  26. package/dist/{usePrinter-DVgxBO4o.cjs → usePrinter-B4xDG31F.cjs} +1 -1
  27. package/dist/{usePrinter-CnZYDQXB.js → usePrinter-sRt2SKr2.js} +1 -1
  28. package/dist/{vue-data-ui-BrRTkOqu.cjs → vue-data-ui-CuEYAddV.cjs} +1 -1
  29. package/dist/{vue-data-ui-B--WWkUM.js → vue-data-ui-NkhaiK6y.js} +60 -60
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-OzzLYbUl.js → vue-ui-3d-bar-BeXYzdzu.js} +9 -9
  33. package/dist/{vue-ui-3d-bar-BGVLnjCh.cjs → vue-ui-3d-bar-RduHvzwG.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-CRVWlHxs.cjs → vue-ui-accordion-CBxsUoGb.cjs} +1 -1
  35. package/dist/{vue-ui-accordion-lF7yVkiT.js → vue-ui-accordion-Cjc683tN.js} +3 -3
  36. package/dist/{vue-ui-age-pyramid-Cv0Rddsx.cjs → vue-ui-age-pyramid-DVtbyRJw.cjs} +1 -1
  37. package/dist/{vue-ui-age-pyramid-5Vj8AtW1.js → vue-ui-age-pyramid-rnt8M-Qz.js} +10 -10
  38. package/dist/{vue-ui-annotator-BmO78L3H.js → vue-ui-annotator-CFU5Zyfk.js} +1 -1
  39. package/dist/{vue-ui-annotator-D8Hx1BFF.cjs → vue-ui-annotator-Yu-mHS2N.cjs} +1 -1
  40. package/dist/{vue-ui-bullet-C0Q2Vs5p.cjs → vue-ui-bullet-Be5aYhtp.cjs} +1 -1
  41. package/dist/{vue-ui-bullet-DwFD41hN.js → vue-ui-bullet-CRbW1ON6.js} +8 -8
  42. package/dist/{vue-ui-candlestick-C7kRHFF3.cjs → vue-ui-candlestick-B6wSs-JC.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-By609gwn.js → vue-ui-candlestick-D-ERLtI1.js} +11 -11
  44. package/dist/{vue-ui-carousel-table-1_Hy8sGL.cjs → vue-ui-carousel-table-7reErH8M.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-wwMoteEN.js → vue-ui-carousel-table-I1m4HMWf.js} +4 -4
  46. package/dist/{vue-ui-chestnut-hqorA5EW.js → vue-ui-chestnut-CqJRKECX.js} +8 -8
  47. package/dist/{vue-ui-chestnut-D3LGylRp.cjs → vue-ui-chestnut-D-WzX16q.cjs} +1 -1
  48. package/dist/{vue-ui-cursor-BCg5VZUb.cjs → vue-ui-cursor-S83QIsxQ.cjs} +1 -1
  49. package/dist/{vue-ui-cursor-GSkn7N7Z.js → vue-ui-cursor-jrrdh8Lf.js} +2 -2
  50. package/dist/{vue-ui-dashboard-DIoYWyXB.js → vue-ui-dashboard-DR_Bhwa3.js} +2 -2
  51. package/dist/{vue-ui-dashboard-Bkm9bcAc.cjs → vue-ui-dashboard-DW1mIInG.cjs} +1 -1
  52. package/dist/{vue-ui-digits-niqTltAv.js → vue-ui-digits-1jZdiwHJ.js} +2 -2
  53. package/dist/{vue-ui-digits-CpBBTAI9.cjs → vue-ui-digits-s5f9eFtW.cjs} +1 -1
  54. package/dist/{vue-ui-donut-DfufBrkk.js → vue-ui-donut-BAYiPsxp.js} +11 -11
  55. package/dist/{vue-ui-donut-CQEOtlxM.cjs → vue-ui-donut-Ce1SaXNu.cjs} +1 -1
  56. package/dist/{vue-ui-donut-evolution-Dg_XJyX8.cjs → vue-ui-donut-evolution-DI8yeIa4.cjs} +1 -1
  57. package/dist/{vue-ui-donut-evolution-XQp6R0e_.js → vue-ui-donut-evolution-DsHTZ9T2.js} +11 -11
  58. package/dist/{vue-ui-dumbbell-RAkNYRoJ.cjs → vue-ui-dumbbell-CFJkwtM8.cjs} +1 -1
  59. package/dist/{vue-ui-dumbbell-DSS8sHHU.js → vue-ui-dumbbell-DcMmBxLy.js} +10 -10
  60. package/dist/{vue-ui-flow-BUmSGSmR.cjs → vue-ui-flow-B4MtorhO.cjs} +1 -1
  61. package/dist/{vue-ui-flow-BBNuPVgI.js → vue-ui-flow-BTXEmIQG.js} +9 -9
  62. package/dist/{vue-ui-funnel-BDGggRXE.js → vue-ui-funnel-BB_h0FKg.js} +8 -8
  63. package/dist/{vue-ui-funnel-B9HR0owO.cjs → vue-ui-funnel-DNL12vLQ.cjs} +1 -1
  64. package/dist/{vue-ui-galaxy-DmsMWB1a.cjs → vue-ui-galaxy-CmCZGOKz.cjs} +1 -1
  65. package/dist/{vue-ui-galaxy-6Odi2CwM.js → vue-ui-galaxy-DlBk1FUz.js} +11 -11
  66. package/dist/{vue-ui-gauge-DeYvNVnR.js → vue-ui-gauge-1SFhSMfU.js} +7 -7
  67. package/dist/{vue-ui-gauge-Dvv0v56Z.cjs → vue-ui-gauge-B7ieQMud.cjs} +1 -1
  68. package/dist/{vue-ui-gizmo-DXQt_8D0.cjs → vue-ui-gizmo-C8rLR4n5.cjs} +1 -1
  69. package/dist/{vue-ui-gizmo-BcAr2dTN.js → vue-ui-gizmo-CtX6KFN2.js} +3 -3
  70. package/dist/{vue-ui-heatmap-DZ02dS5q.cjs → vue-ui-heatmap-Bfi3KJwS.cjs} +1 -1
  71. package/dist/{vue-ui-heatmap-Btm1mK6D.js → vue-ui-heatmap-BzyvTePn.js} +10 -10
  72. package/dist/{vue-ui-history-plot-DPQWcN0P.cjs → vue-ui-history-plot-5kZ54hgy.cjs} +1 -1
  73. package/dist/{vue-ui-history-plot-OY6N31Ka.js → vue-ui-history-plot-BEoHuZ3N.js} +11 -11
  74. package/dist/{vue-ui-kpi-D5oNUDVm.js → vue-ui-kpi-BYOyJjYg.js} +3 -3
  75. package/dist/{vue-ui-kpi-CQIbWQMk.cjs → vue-ui-kpi-LO4KKRR9.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-BjqV22Co.js → vue-ui-mini-loader-ChHdx5me.js} +2 -2
  77. package/dist/{vue-ui-mini-loader-ByDKGMAp.cjs → vue-ui-mini-loader-wlUD77O6.cjs} +1 -1
  78. package/dist/{vue-ui-molecule-FsLf3YTj.js → vue-ui-molecule-Bo7XYpf-.js} +11 -11
  79. package/dist/{vue-ui-molecule-C8O_ViVy.cjs → vue-ui-molecule-D-4cRS5w.cjs} +1 -1
  80. package/dist/{vue-ui-mood-radar-4u98wGWl.cjs → vue-ui-mood-radar-C3x_LH7Q.cjs} +1 -1
  81. package/dist/{vue-ui-mood-radar-31BX-GNG.js → vue-ui-mood-radar-DXj4Ce6l.js} +11 -11
  82. package/dist/{vue-ui-nested-donuts-BMJW2oHk.js → vue-ui-nested-donuts-BBLpNVwF.js} +11 -11
  83. package/dist/{vue-ui-nested-donuts-BPc_OBoe.cjs → vue-ui-nested-donuts-DrL7-SUd.cjs} +1 -1
  84. package/dist/{vue-ui-onion-IhkIHn1A.cjs → vue-ui-onion-8Vz3lPbn.cjs} +1 -1
  85. package/dist/{vue-ui-onion-BUpGgnWA.js → vue-ui-onion-DC8VIInA.js} +11 -11
  86. package/dist/{vue-ui-parallel-coordinate-plot-9I00rQEM.js → vue-ui-parallel-coordinate-plot-Cl1wiHsK.js} +12 -12
  87. package/dist/{vue-ui-parallel-coordinate-plot-DzjggyLA.cjs → vue-ui-parallel-coordinate-plot-D6q4WQ0B.cjs} +1 -1
  88. package/dist/{vue-ui-quadrant-EZqQ-7Ev.cjs → vue-ui-quadrant-DBZS5jFQ.cjs} +1 -1
  89. package/dist/{vue-ui-quadrant-CEmoMAL7.js → vue-ui-quadrant-b5cuEH9z.js} +12 -12
  90. package/dist/{vue-ui-quick-chart-T_oeRTqY.js → vue-ui-quick-chart-CFBPYw2J.js} +9 -9
  91. package/dist/{vue-ui-quick-chart-BKUUR-A1.cjs → vue-ui-quick-chart-Cno_1mzu.cjs} +1 -1
  92. package/dist/{vue-ui-radar-QBwo6ybW.cjs → vue-ui-radar-ChcBO21S.cjs} +1 -1
  93. package/dist/{vue-ui-radar-DG_Zir8w.js → vue-ui-radar-DP8360kx.js} +12 -12
  94. package/dist/{vue-ui-rating-Juprijdi.cjs → vue-ui-rating-D7b-kfyp.cjs} +1 -1
  95. package/dist/{vue-ui-rating-gswAA28b.js → vue-ui-rating-DIthBSp_.js} +2 -2
  96. package/dist/{vue-ui-relation-circle-BWX8zrfH.cjs → vue-ui-relation-circle-C5pO0iHY.cjs} +1 -1
  97. package/dist/{vue-ui-relation-circle-DtnXrnOP.js → vue-ui-relation-circle-D2iwmChn.js} +7 -7
  98. package/dist/{vue-ui-rings-Damuv7g9.cjs → vue-ui-rings-C_NLJYs8.cjs} +1 -1
  99. package/dist/{vue-ui-rings-D3g-ORch.js → vue-ui-rings-y9Zx-DaI.js} +11 -11
  100. package/dist/{vue-ui-scatter-RUeAe7Sx.cjs → vue-ui-scatter-BNeMGDNk.cjs} +1 -1
  101. package/dist/{vue-ui-scatter-DBO-XViT.js → vue-ui-scatter-Cbu5GDc1.js} +12 -12
  102. package/dist/{vue-ui-screenshot-K0a-DVD6.js → vue-ui-screenshot-BZh_sgjP.js} +1 -1
  103. package/dist/{vue-ui-screenshot-3MDyr6v3.cjs → vue-ui-screenshot-oH-YnZBE.cjs} +1 -1
  104. package/dist/{vue-ui-skeleton-CWjNNx-k.js → vue-ui-skeleton-DjFU2X3P.js} +3 -3
  105. package/dist/{vue-ui-skeleton-DUNkS05l.cjs → vue-ui-skeleton-Nuju6X7l.cjs} +1 -1
  106. package/dist/{vue-ui-smiley-MwX1c6qK.js → vue-ui-smiley-DdnzzEYS.js} +2 -2
  107. package/dist/{vue-ui-smiley-Cbqg-N-L.cjs → vue-ui-smiley-DtQVEc4B.cjs} +1 -1
  108. package/dist/{vue-ui-spark-trend-CN5JUPhn.cjs → vue-ui-spark-trend-B36zW41F.cjs} +1 -1
  109. package/dist/{vue-ui-spark-trend-D9eWTtbE.js → vue-ui-spark-trend-CaIGk_53.js} +5 -5
  110. package/dist/{vue-ui-sparkbar-CPF7YNDd.js → vue-ui-sparkbar-DixeozKp.js} +4 -4
  111. package/dist/{vue-ui-sparkbar-IphZ8jXh.cjs → vue-ui-sparkbar-iQKGtxo8.cjs} +1 -1
  112. package/dist/{vue-ui-sparkgauge-B29V7ZTv.js → vue-ui-sparkgauge-C01VB6KP.js} +4 -4
  113. package/dist/{vue-ui-sparkgauge-BRMGqR9Z.cjs → vue-ui-sparkgauge-DEvgucF7.cjs} +1 -1
  114. package/dist/{vue-ui-sparkhistogram-rvYaVHmw.cjs → vue-ui-sparkhistogram-CTUuxOma.cjs} +1 -1
  115. package/dist/{vue-ui-sparkhistogram-BJTgOWF5.js → vue-ui-sparkhistogram-C_6lHF3O.js} +5 -5
  116. package/dist/{vue-ui-sparkline-DX79otAB.js → vue-ui-sparkline-Btm4HVgi.js} +4 -4
  117. package/dist/{vue-ui-sparkline-BI9jqI0h.cjs → vue-ui-sparkline-DrZWPGOG.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-DuollcwK.cjs → vue-ui-sparkstackbar-7pcfCNMr.cjs} +1 -1
  119. package/dist/{vue-ui-sparkstackbar-vP28A6AT.js → vue-ui-sparkstackbar-D0UGUm-1.js} +5 -5
  120. package/dist/{vue-ui-stackbar-DnJEgIaA.js → vue-ui-stackbar-BPMDmY04.js} +12 -12
  121. package/dist/{vue-ui-stackbar-BumFmZZF.cjs → vue-ui-stackbar-BwRdmPvB.cjs} +1 -1
  122. package/dist/{vue-ui-strip-plot-DqcHBwd_.js → vue-ui-strip-plot-BfWQMGXy.js} +11 -11
  123. package/dist/{vue-ui-strip-plot-DupREfRd.cjs → vue-ui-strip-plot-CLN9LikJ.cjs} +1 -1
  124. package/dist/{vue-ui-table-BMJ0I5nr.cjs → vue-ui-table-Cdo265Yt.cjs} +1 -1
  125. package/dist/{vue-ui-table-D8cgqIJl.js → vue-ui-table-D8GaLhM9.js} +1 -1
  126. package/dist/{vue-ui-table-heatmap-D4qeClXn.js → vue-ui-table-heatmap-C4DRSfsE.js} +4 -4
  127. package/dist/{vue-ui-table-heatmap-D43pTFli.cjs → vue-ui-table-heatmap-CDAf1IIk.cjs} +1 -1
  128. package/dist/vue-ui-table-sparkline-Cw7NOiYx.cjs +1 -0
  129. package/dist/{vue-ui-table-sparkline-B_Po0RuC.js → vue-ui-table-sparkline-DMHf03C9.js} +211 -200
  130. package/dist/{vue-ui-thermometer-CaV3JF3h.cjs → vue-ui-thermometer-7BORZJjd.cjs} +1 -1
  131. package/dist/{vue-ui-thermometer-C6nfW6uY.js → vue-ui-thermometer-BCVqil7E.js} +7 -7
  132. package/dist/{vue-ui-timer-CfwmMRdZ.js → vue-ui-timer-DF5HkeeS.js} +5 -5
  133. package/dist/{vue-ui-timer-ldINTqND.cjs → vue-ui-timer-gxiLCP1n.cjs} +1 -1
  134. package/dist/{vue-ui-tiremarks-BlyxL_IU.cjs → vue-ui-tiremarks-CwGnFx4f.cjs} +1 -1
  135. package/dist/{vue-ui-tiremarks-iNKMnu3P.js → vue-ui-tiremarks-lidhcJsi.js} +7 -7
  136. package/dist/{vue-ui-treemap-YdRDlSHA.cjs → vue-ui-treemap-BZ_LmiBK.cjs} +1 -1
  137. package/dist/{vue-ui-treemap-CwMnkcOi.js → vue-ui-treemap-CIZaPmbi.js} +11 -11
  138. package/dist/{vue-ui-vertical-bar-BZR4YOLh.js → vue-ui-vertical-bar-dQoTddqU.js} +11 -11
  139. package/dist/{vue-ui-vertical-bar-Bji3-X8i.cjs → vue-ui-vertical-bar-venrkqjM.cjs} +1 -1
  140. package/dist/{vue-ui-waffle-D2BccJmB.js → vue-ui-waffle-CnvWOEVU.js} +11 -11
  141. package/dist/{vue-ui-waffle-rO_LJaHR.cjs → vue-ui-waffle-oR54BbIg.cjs} +1 -1
  142. package/dist/{vue-ui-wheel-BTrpdV-C.cjs → vue-ui-wheel-BUHZEzPr.cjs} +1 -1
  143. package/dist/{vue-ui-wheel-GqWFopE1.js → vue-ui-wheel-D3itrMku.js} +7 -7
  144. package/dist/{vue-ui-word-cloud-DD-pKUen.cjs → vue-ui-word-cloud-87gwksmM.cjs} +1 -1
  145. package/dist/{vue-ui-word-cloud-DiG8DHOr.js → vue-ui-word-cloud-o3zU6r0-.js} +10 -10
  146. package/dist/{vue-ui-xy-C32KNdyx.cjs → vue-ui-xy-D56pm4L0.cjs} +1 -1
  147. package/dist/{vue-ui-xy-DicLnkBA.js → vue-ui-xy-GR4PGBDy.js} +14 -14
  148. package/dist/{vue-ui-xy-canvas-D6CYL9A8.js → vue-ui-xy-canvas-BKGOnjut.js} +11 -11
  149. package/dist/{vue-ui-xy-canvas-9e630nJX.cjs → vue-ui-xy-canvas-uikeVe72.cjs} +1 -1
  150. package/package.json +1 -1
  151. package/dist/vue-ui-table-sparkline-B7OPOium.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BHQZE19X.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Le=require("./Title-5Vedk01J.cjs"),he=require("./usePrinter-DVgxBO4o.cjs"),Pe=require("./Tooltip-DjCKBAC4.cjs"),Ve=require("./DataTable-kMUhutQ4.cjs"),Ee=require("./Legend-DPHcmrzd.cjs"),Ie=require("./vue-ui-skeleton-DUNkS05l.cjs"),ze=require("./vue-ui-accordion-CRVWlHxs.cjs"),fe=require("./useNestedProp-CwpqC_aE.cjs"),Fe=require("./PackageVersion-rnWHRWGI.cjs"),Ae=require("./PenAndPaper-BQl9-uX0.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=$=>(e.pushScopeId("data-v-6c74341a"),$=$(),e.popScopeId(),$),De=["id"],qe=["xmlns","viewBox"],Me=["id"],Re=["stop-color"],Ue=["stop-color"],je=["id"],Ge=ye(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),We=ye(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=[Ge,We],Ye=["x","y","height","width"],Xe=["height","width"],Je=["rx","x","y","height","width","stroke","stroke-width","filter"],Ke=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Qe=["x","y","height","width","filter"],Ze={key:0},et={key:1},tt={key:2},lt={key:3},at=["onMouseover","x","y","height","width"],ot={key:5,class:"vue-data-ui-watermark"},rt=["onClick"],ut={key:0},nt={key:1},st=["innerHTML"],it={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup($,{expose:ge,emit:me}){const p=$,{vue_ui_waffle:be}=n.useConfig(),V=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),ke=e.ref(null),A=e.ref(!1),O=e.ref(""),B=e.ref(null),U=e.ref(0),_=e.ref(null),j=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(0),X=e.ref(0),J=e.ref(0),t=e.computed({get:()=>K(),set:l=>l});function K(){const l=fe.useNestedProp({userConfig:p.config,defaultConfig:be});return l.theme?{...fe.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=K(),Q(),Y.value+=1,X.value+=1,J.value+=1},{deep:!0});const E=e.ref(null);function Q(){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=pe.throttle(()=>{const{width:r,height:a}=pe.useResponsive({chart:_.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?G.value:null,source:W.value,noTitle:H.value});k.value.width=r,k.value.height=a,f.value.width=r,f.value.height=a});E.value=new ResizeObserver(l),E.value.observe(_.value.parentNode)}}e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:le}=he.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),we=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=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}),f=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(f.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),C=e.computed(()=>(f.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>f.value.width/t.value.style.chart.layout.grid.size),I=e.computed(()=>f.value.height/t.value.style.chart.layout.grid.size);function oe(l){const r=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,R)=>h+R,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,R)=>h+R,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function re(){return p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||ae.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))}const ue=e.computed(()=>re()),c=e.ref(ue.value);e.watch(()=>p.dataset,l=>{c.value=re()},{deep:!0});const Ce=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 oe(l)}),xe=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return oe(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:Ce.value[r]})))),Be=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:xe.value[r]})));function _e(){return Be.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Se=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(()=>Se.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}))),P=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)*(C.value+t.value.style.chart.layout.grid.spaceBetween)+f.value.top});return l}),v=e.ref([]),x=e.ref(!1),ne=e.ref(null),se=e.ref(null);function ie(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<S.value.length-1&&S.value.length>1&&v.value.push(l);return}const r=ue.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(ne.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),ne.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=r;i()}else if(v.value.length<S.value.length-1&&S.value.length>1){let u=function(){o<.1?(cancelAnimationFrame(se.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),se.value=requestAnimationFrame(u))};u()}me("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 S=e.computed(()=>c.value.map((l,r)=>({name:l.name,color:l.color||ae[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:()=>ie(l.uid),isSegregated:v.value.includes(l.uid)}))),Ne=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":""})),y=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),D=e.ref(null);function $e(l){if(v.value.length===p.dataset.length)return;const r=s.value[l];D.value={datapoint:r,seriesIndex:r.absoluteIndex,series:c.value,config:t.value},A.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})))O.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/y.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>`}O.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 q(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function ce(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/y.value)?"-":g.value.body[u]/y.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,y.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.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]/y.value)?"-":n.dataLabel({v:g.value.body[i]/y.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}}),N=e.ref(!1);function Te(l){N.value=l,U.value+=1}function ve(){m.value.showTable=!m.value.showTable}function de(){m.value.showTooltip=!m.value.showTooltip}const F=e.ref(!1);function M(){F.value=!F.value}return ge({getData:_e,generatePdf:te,generateCsv:ce,generateImage:le,toggleTable:ve,toggleTooltip:de,toggleAnnotator:M}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${b.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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:M},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:H,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(he.UserOptions,{ref_key:"details",ref:ke,key:`user_options_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),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:N.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(te),onGenerateCsv:ce,onGenerateImage:e.unref(le),onToggleTable:ve,onToggleTooltip:de,onToggleAnnotator:M},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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Fe._sfc_main),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.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ue)],8,Me))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},He,8,je)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:C.value<=0?1e-4:C.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,Ye))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:f.value.height-24,width:f.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Xe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.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:C.value<=0?1e-4:C.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:q(s.value[o].serieIndex)},null,8,Je))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.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:C.value<=0?1e-4:C.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:q(s.value[o].serieIndex)},null,8,Ke))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[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:I.value<=0?1e-4:I.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:q(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 ${T.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",Ze,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",et,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",tt," ("+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",lt,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,Qe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>$e(o),onMouseleave:r[0]||(r[0]=u=>{A.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:I.value<=0?1e-4:I.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,at))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,qe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ie.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:G},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ee.Legend,{key:`legend_${J.value}`,legendSet:S.value,config:Ne.value,onClickMarker:r[1]||(r[1]=({legend:a})=>ie(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:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",nt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ut," ("+e.toDisplayString(isNaN(a.value/y.value)?"-":e.unref(n.dataLabel)({v:a.value/y.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,rt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:S.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:m.value.showTooltip&&A.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:_.value,content:O.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(ze.default,{key:8,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.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${X.value}`,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,st)]),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,De))}},ct=Oe._export_sfc(it,[["__scopeId","data-v-6c74341a"]]);exports.default=ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DoD-GxZR.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Le=require("./Title-C2siG5N2.cjs"),he=require("./usePrinter-B4xDG31F.cjs"),Pe=require("./Tooltip-CS4C58T7.cjs"),Ve=require("./DataTable-CovKV5Yy.cjs"),Ee=require("./Legend-Bbz-hKDf.cjs"),Ie=require("./vue-ui-skeleton-Nuju6X7l.cjs"),ze=require("./vue-ui-accordion-CBxsUoGb.cjs"),fe=require("./useNestedProp-D_feh7A_.cjs"),Fe=require("./PackageVersion-BEtuCME5.cjs"),Ae=require("./PenAndPaper-BIcmfBvD.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=$=>(e.pushScopeId("data-v-6c74341a"),$=$(),e.popScopeId(),$),De=["id"],qe=["xmlns","viewBox"],Me=["id"],Re=["stop-color"],Ue=["stop-color"],je=["id"],Ge=ye(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),We=ye(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=[Ge,We],Ye=["x","y","height","width"],Xe=["height","width"],Je=["rx","x","y","height","width","stroke","stroke-width","filter"],Ke=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Qe=["x","y","height","width","filter"],Ze={key:0},et={key:1},tt={key:2},lt={key:3},at=["onMouseover","x","y","height","width"],ot={key:5,class:"vue-data-ui-watermark"},rt=["onClick"],ut={key:0},nt={key:1},st=["innerHTML"],it={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup($,{expose:ge,emit:me}){const p=$,{vue_ui_waffle:be}=n.useConfig(),V=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),ke=e.ref(null),A=e.ref(!1),O=e.ref(""),B=e.ref(null),U=e.ref(0),_=e.ref(null),j=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(0),X=e.ref(0),J=e.ref(0),t=e.computed({get:()=>K(),set:l=>l});function K(){const l=fe.useNestedProp({userConfig:p.config,defaultConfig:be});return l.theme?{...fe.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=K(),Q(),Y.value+=1,X.value+=1,J.value+=1},{deep:!0});const E=e.ref(null);function Q(){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=pe.throttle(()=>{const{width:r,height:a}=pe.useResponsive({chart:_.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?G.value:null,source:W.value,noTitle:H.value});k.value.width=r,k.value.height=a,f.value.width=r,f.value.height=a});E.value=new ResizeObserver(l),E.value.observe(_.value.parentNode)}}e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:le}=he.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),we=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=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}),f=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(f.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),C=e.computed(()=>(f.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>f.value.width/t.value.style.chart.layout.grid.size),I=e.computed(()=>f.value.height/t.value.style.chart.layout.grid.size);function oe(l){const r=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,R)=>h+R,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,R)=>h+R,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function re(){return p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||ae.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))}const ue=e.computed(()=>re()),c=e.ref(ue.value);e.watch(()=>p.dataset,l=>{c.value=re()},{deep:!0});const Ce=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 oe(l)}),xe=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return oe(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:Ce.value[r]})))),Be=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:xe.value[r]})));function _e(){return Be.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Se=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(()=>Se.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}))),P=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)*(C.value+t.value.style.chart.layout.grid.spaceBetween)+f.value.top});return l}),v=e.ref([]),x=e.ref(!1),ne=e.ref(null),se=e.ref(null);function ie(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<S.value.length-1&&S.value.length>1&&v.value.push(l);return}const r=ue.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(ne.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),ne.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=r;i()}else if(v.value.length<S.value.length-1&&S.value.length>1){let u=function(){o<.1?(cancelAnimationFrame(se.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),se.value=requestAnimationFrame(u))};u()}me("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 S=e.computed(()=>c.value.map((l,r)=>({name:l.name,color:l.color||ae[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:()=>ie(l.uid),isSegregated:v.value.includes(l.uid)}))),Ne=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":""})),y=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),D=e.ref(null);function $e(l){if(v.value.length===p.dataset.length)return;const r=s.value[l];D.value={datapoint:r,seriesIndex:r.absoluteIndex,series:c.value,config:t.value},A.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})))O.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/y.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>`}O.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 q(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function ce(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/y.value)?"-":g.value.body[u]/y.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,y.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.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]/y.value)?"-":n.dataLabel({v:g.value.body[i]/y.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}}),N=e.ref(!1);function Te(l){N.value=l,U.value+=1}function ve(){m.value.showTable=!m.value.showTable}function de(){m.value.showTooltip=!m.value.showTooltip}const F=e.ref(!1);function M(){F.value=!F.value}return ge({getData:_e,generatePdf:te,generateCsv:ce,generateImage:le,toggleTable:ve,toggleTooltip:de,toggleAnnotator:M}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${b.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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:M},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:H,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(he.UserOptions,{ref_key:"details",ref:ke,key:`user_options_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),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:N.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(te),onGenerateCsv:ce,onGenerateImage:e.unref(le),onToggleTable:ve,onToggleTooltip:de,onToggleAnnotator:M},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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Fe._sfc_main),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.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ue)],8,Me))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},He,8,je)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:C.value<=0?1e-4:C.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,Ye))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:f.value.height-24,width:f.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Xe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.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:C.value<=0?1e-4:C.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:q(s.value[o].serieIndex)},null,8,Je))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.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:C.value<=0?1e-4:C.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:q(s.value[o].serieIndex)},null,8,Ke))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[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:I.value<=0?1e-4:I.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:q(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 ${T.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",Ze,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",et,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",tt," ("+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",lt,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,Qe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>$e(o),onMouseleave:r[0]||(r[0]=u=>{A.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:I.value<=0?1e-4:I.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,at))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,qe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ie.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:G},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ee.Legend,{key:`legend_${J.value}`,legendSet:S.value,config:Ne.value,onClickMarker:r[1]||(r[1]=({legend:a})=>ie(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:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",nt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ut," ("+e.toDisplayString(isNaN(a.value/y.value)?"-":e.unref(n.dataLabel)({v:a.value/y.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,rt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:S.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:m.value.showTooltip&&A.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:_.value,content:O.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(ze.default,{key:8,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.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${X.value}`,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,st)]),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,De))}},ct=Oe._export_sfc(it,[["__scopeId","data-v-6c74341a"]]);exports.default=ct;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BHQZE19X.cjs"),H=require("./Title-5Vedk01J.cjs"),z=require("./usePrinter-DVgxBO4o.cjs"),O=require("./useResponsive-BJ7DTGpm.cjs"),D=require("./vue-ui-skeleton-DUNkS05l.cjs"),F=require("./useNestedProp-CwpqC_aE.cjs"),Y=require("./PackageVersion-rnWHRWGI.cjs"),W=require("./PenAndPaper-BQl9-uX0.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q=["xmlns","viewBox"],Z=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ee=["cx","cy","r","stroke","stroke-width"],te=["x","y","font-size","fill","font-weight"],le={key:5,class:"vue-data-ui-watermark"},oe={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(E,{expose:M}){const i=E,{vue_ui_wheel:T}=r.useConfig(),p=e.computed(()=>!!i.dataset&&Object.keys(i.dataset).length),y=e.ref(r.createUid()),q=e.ref(null),k=e.ref(0),v=e.ref(null),w=e.ref(null),C=e.ref(null),b=e.ref(null),B=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=F.useNestedProp({userConfig:i.config,defaultConfig:T});return l.theme?{...F.useNestedProp({userConfig:r.themes.vue_ui_wheel[l.theme]||i.config,defaultConfig:l})}:l}e.watch(()=>i.config,l=>{t.value=P(),I(),B.value+=1},{deep:!0});const{isPrinting:_,isImaging:x,generatePdf:N,generateImage:S}=z.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),V=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),s=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function A(l,c=1){return{x:s.value.centerX+s.value.radius*Math.cos(29.85+l*Math.PI/180)*c,y:s.value.centerY+s.value.radius*Math.sin(29.85+l*Math.PI/180)*c}}const a=e.ref(t.value.style.chart.animation.use?0:i.dataset.percentage||0);e.watch(()=>i.dataset,l=>{t.value.style.chart.animation.use?$(l.percentage):a.value=l.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{I()});function I(){if(r.objectIsEmpty(i.dataset)&&r.error({componentName:"VueUiWheel",type:"dataset"}),$(i.dataset.percentage||0),t.value.responsive){const l=O.throttle(()=>{const{width:c,height:o}=O.useResponsive({chart:v.value,title:t.value.style.chart.title.text?w.value:null,source:C.value,noTitle:b.value});n.value.width=c,n.value.height=o,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(c,o)});d.value=new ResizeObserver(l),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function $(l){let c=t.value.style.chart.animation.speed;const o=Math.abs(l-a.value)/(c*120);function u(){a.value<l?a.value=Math.min(a.value+o,l):a.value>l&&(a.value=Math.max(a.value-o,l)),a.value!==l&&requestAnimationFrame(u)}u()}const R=e.computed(()=>{const l=[];for(let o=0;o<100;o+=1){const u=a.value>o?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:U,y:G}=A(n.value.size/100*o),{x:X,y:j}=A(n.value.size/100*o,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:U,y1:G,x2:X,y2:j,color:t.value.style.chart.layout.wheel.ticks.gradient.show?r.shiftHue(u,o/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return l}),h=e.ref(!1);function L(l){h.value=l,k.value+=1}const f=e.ref(!1);function g(){f.value=!f.value}return M({generatePdf:N,generateImage:S,toggleAnnotator:g}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(W.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:g},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:b,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:w,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(H._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(z.UserOptions,{ref_key:"details",ref:q,key:`user_options_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(x),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:L,onGeneratePdf:e.unref(N),onGenerateImage:e.unref(S),onToggleAnnotator:g},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:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Y._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":5/360*Math.min(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&&u<=a.value})},null,10,Z))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.centerX,cy:s.value.centerY,r:s.value.radius*.8<=0?1e-4:s.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ee)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.centerX,y:s.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,a.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(r.checkNaN)(a.value),e.unref(r.dataLabel)({v:e.unref(r.checkNaN)(a.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,te)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,Q)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(x)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,K))}},ne=J._export_sfc(oe,[["__scopeId","data-v-bc4a7284"]]);exports.default=ne;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DoD-GxZR.cjs"),H=require("./Title-C2siG5N2.cjs"),z=require("./usePrinter-B4xDG31F.cjs"),O=require("./useResponsive-BJ7DTGpm.cjs"),D=require("./vue-ui-skeleton-Nuju6X7l.cjs"),F=require("./useNestedProp-D_feh7A_.cjs"),Y=require("./PackageVersion-BEtuCME5.cjs"),W=require("./PenAndPaper-BIcmfBvD.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q=["xmlns","viewBox"],Z=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ee=["cx","cy","r","stroke","stroke-width"],te=["x","y","font-size","fill","font-weight"],le={key:5,class:"vue-data-ui-watermark"},oe={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(E,{expose:M}){const i=E,{vue_ui_wheel:T}=r.useConfig(),p=e.computed(()=>!!i.dataset&&Object.keys(i.dataset).length),y=e.ref(r.createUid()),q=e.ref(null),k=e.ref(0),v=e.ref(null),w=e.ref(null),C=e.ref(null),b=e.ref(null),B=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=F.useNestedProp({userConfig:i.config,defaultConfig:T});return l.theme?{...F.useNestedProp({userConfig:r.themes.vue_ui_wheel[l.theme]||i.config,defaultConfig:l})}:l}e.watch(()=>i.config,l=>{t.value=P(),I(),B.value+=1},{deep:!0});const{isPrinting:_,isImaging:x,generatePdf:N,generateImage:S}=z.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),V=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),s=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function A(l,c=1){return{x:s.value.centerX+s.value.radius*Math.cos(29.85+l*Math.PI/180)*c,y:s.value.centerY+s.value.radius*Math.sin(29.85+l*Math.PI/180)*c}}const a=e.ref(t.value.style.chart.animation.use?0:i.dataset.percentage||0);e.watch(()=>i.dataset,l=>{t.value.style.chart.animation.use?$(l.percentage):a.value=l.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{I()});function I(){if(r.objectIsEmpty(i.dataset)&&r.error({componentName:"VueUiWheel",type:"dataset"}),$(i.dataset.percentage||0),t.value.responsive){const l=O.throttle(()=>{const{width:c,height:o}=O.useResponsive({chart:v.value,title:t.value.style.chart.title.text?w.value:null,source:C.value,noTitle:b.value});n.value.width=c,n.value.height=o,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(c,o)});d.value=new ResizeObserver(l),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function $(l){let c=t.value.style.chart.animation.speed;const o=Math.abs(l-a.value)/(c*120);function u(){a.value<l?a.value=Math.min(a.value+o,l):a.value>l&&(a.value=Math.max(a.value-o,l)),a.value!==l&&requestAnimationFrame(u)}u()}const R=e.computed(()=>{const l=[];for(let o=0;o<100;o+=1){const u=a.value>o?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:U,y:G}=A(n.value.size/100*o),{x:X,y:j}=A(n.value.size/100*o,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:U,y1:G,x2:X,y2:j,color:t.value.style.chart.layout.wheel.ticks.gradient.show?r.shiftHue(u,o/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return l}),h=e.ref(!1);function L(l){h.value=l,k.value+=1}const f=e.ref(!1);function g(){f.value=!f.value}return M({generatePdf:N,generateImage:S,toggleAnnotator:g}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(W.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:g},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:b,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:w,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(H._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(z.UserOptions,{ref_key:"details",ref:q,key:`user_options_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(x),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:L,onGeneratePdf:e.unref(N),onGenerateImage:e.unref(S),onToggleAnnotator:g},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:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Y._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":5/360*Math.min(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&&u<=a.value})},null,10,Z))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.centerX,cy:s.value.centerY,r:s.value.radius*.8<=0?1e-4:s.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ee)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.centerX,y:s.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,a.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(r.checkNaN)(a.value),e.unref(r.dataLabel)({v:e.unref(r.checkNaN)(a.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,te)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,Q)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(x)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,K))}},ne=J._export_sfc(oe,[["__scopeId","data-v-bc4a7284"]]);exports.default=ne;
@@ -1,12 +1,12 @@
1
1
  import { computed as p, ref as n, watch as E, onMounted as oe, onBeforeUnmount as ne, openBlock as s, createElementBlock as c, normalizeStyle as R, createBlock as w, createCommentVNode as v, unref as r, createSlots as se, withCtx as b, renderSlot as f, normalizeProps as A, guardReactiveProps as I, normalizeClass as j, createVNode as re, Fragment as ue, renderList as ie, toDisplayString as ce } from "vue";
2
- import { u as ve, c as he, t as de, o as fe, e as ye, w as D, X as pe, i as ge, v as Y, f as me } from "./index-igxqCP2w.js";
3
- import { _ as ke } from "./Title-DED-PQ7X.js";
4
- import { u as we, U as be } from "./usePrinter-CnZYDQXB.js";
2
+ import { u as ve, c as he, t as de, o as fe, e as ye, w as D, X as pe, i as ge, v as Y, f as me } from "./index-BtL_cLa8.js";
3
+ import { _ as ke } from "./Title-CIsKiWgN.js";
4
+ import { u as we, U as be } from "./usePrinter-sRt2SKr2.js";
5
5
  import { t as Ce, u as _e } from "./useResponsive-CoxXLe23.js";
6
- import $e from "./vue-ui-skeleton-CWjNNx-k.js";
7
- import { u as H } from "./useNestedProp-CSVnZVwZ.js";
8
- import { _ as xe } from "./PackageVersion-DYk2hOG1.js";
9
- import { P as Ae } from "./PenAndPaper-BfgS_5ux.js";
6
+ import $e from "./vue-ui-skeleton-DjFU2X3P.js";
7
+ import { u as H } from "./useNestedProp-CEAfm1tu.js";
8
+ import { _ as xe } from "./PackageVersion-BV3fHO46.js";
9
+ import { P as Ae } from "./PenAndPaper-CCOywdmm.js";
10
10
  import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const Pe = ["id"], Fe = ["xmlns", "viewBox"], Oe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], ze = ["cx", "cy", "r", "stroke", "stroke-width"], Se = ["x", "y", "font-size", "fill", "font-weight"], Ne = {
12
12
  key: 5,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BHQZE19X.cjs"),ke=require("./Title-5Vedk01J.cjs"),ae=require("./usePrinter-DVgxBO4o.cjs"),G=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./vue-ui-accordion-CRVWlHxs.cjs"),xe=require("./DataTable-kMUhutQ4.cjs"),Se=require("./BaseIcon-2ZD3jgGz.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=require("./useNestedProp-CwpqC_aE.cjs"),$e=require("./PackageVersion-rnWHRWGI.cjs"),Te=require("./Tooltip-DjCKBAC4.cjs"),Ne=require("./PenAndPaper-BQl9-uX0.cjs"),Pe=c=>(e.pushScopeId("data-v-3fd7d274"),c=c(),e.popScopeId(),c),Be={"data-html2canvas-ignore":""},Fe={key:0,class:"reset-wrapper"},ze={key:1,class:"reset-wrapper"},_e={class:"mono-slicer"},Ae=Pe(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),Ve=["min","max","value"],Ee={__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(c,{emit:P}){const r=c;e.useCssVars(g=>({"90ad3208":E.value,"4f9eef70":S.value,"6e07ae3e":f.value,"2fd430a0":c.selectColor,"6b8169a4":y.value}));const E=e.computed(()=>r.inputColor),y=e.computed(()=>r.background),f=e.computed(()=>`${r.selectColor}33`),S=e.computed(()=>r.borderColor);function $(){P("reset")}const h=e.computed(()=>{const g=r.max-r.min,p=0,b=(r.value-r.min)/g*100;return{left:`${p}%`,width:`${b-p}%`,background:r.selectColor}});return(g,p)=>(e.openBlock(),e.createElementBlock("div",Be,[c.value!==c.source?(e.openBlock(),e.createElementBlock("div",Fe,[c.useResetSlot?e.renderSlot(g.$slots,"reset-action",{key:1,reset:$},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:$},[e.createVNode(Se.default,{name:"refresh",stroke:c.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ze)),e.createElementVNode("div",_e,[Ae,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(h.value)},null,4),e.createElementVNode("input",{type:"range",min:c.min,max:c.max,value:Number(c.value),onInput:p[0]||(p[0]=b=>P("update:value",Number(b.target.value)))},null,40,Ve)])]))}},Ie=re._export_sfc(Ee,[["__scopeId","data-v-3fd7d274"]]),Oe=["id"],Me=["xmlns","viewBox"],Re=["transform"],qe=["fill","font-weight","x","y","font-size","transform","onMouseover"],We={key:4,class:"vue-data-ui-watermark"},De=["innerHTML"],Ue={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(c,{expose:P}){const r=c,{vue_ui_word_cloud:E}=s.useConfig(),y=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),f=e.ref(typeof r.dataset=="string"?s.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:s.checkNaN(o.value)}))),S=e.ref(s.createUid()),$=e.ref(0),h=e.ref(null),g=e.ref(null),p=e.ref(null),b=e.ref(0),L=e.ref(0),I=e.ref(!1),t=e.computed({get:()=>j(),set:o=>o});function j(){const o=ne.useNestedProp({userConfig:r.config,defaultConfig:E});return o.theme?{...ne.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>r.config,o=>{t.value=j(),H(),b.value+=1,L.value+=1,O()},{deep:!0});const X=e.ref(null),C=e.ref(0),u=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),se=G.throttle(()=>{const{width:o,height:a}=G.useResponsive({chart:h.value,title:t.value.style.chart.title.text?g.value:null,slicer:t.value.style.chart.zoom.show&&X.value,source:p.value});u.value.width=o,u.value.height=a,e.nextTick(M)});e.watch(()=>C.value,()=>{ue()});const ue=G.debounce(()=>{M()},10);function O(){C.value=Z.value}const B=e.ref(null);e.onMounted(()=>{H(),O()});function H(){s.objectIsEmpty(r.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):f.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{y.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(B.value=new ResizeObserver(se),B.value.observe(h.value.parentNode))}e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ae.usePrinter({elementId:`wordCloud_${S.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function ie(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 ce(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 de(o,a,l){const i=[],n={x:-a/2,y:-l/2,width:a,height:l},v=0,w=0;return o.forEach(x=>{let D=!1;for(let V=0;V<Math.max(a,l)/2&&!D;V+=t.value.style.chart.words.packingWeight)for(let U=0;U<360&&!D;U+=t.value.style.chart.words.packingWeight){const le=U*Math.PI/180,fe=v+V*Math.cos(le)-x.width/2,ge=w+V*Math.sin(le)-x.height/2,m={...x,x:fe,y:ge},ye=m.x>=n.x&&m.y>=n.y&&m.x+m.width<=n.x+n.width&&m.y+m.height<=n.y+n.height,be=i.some(Ce=>ce(m,Ce));ye&&!be&&(i.push(m),D=!0)}}),i}const T=e.ref([]);e.watch(()=>r.dataset,M,{immediate:!0});const Z=e.computed(()=>Math.min(...f.value.map(o=>o.value))),ve=e.computed(()=>Math.max(...f.value.map(o=>o.value)));function M(){const o=[...f.value].filter(n=>n.value>=C.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),i=[...f.value].filter(n=>n.value>=C.value).map((n,v)=>{const w=(n.value-l)/(a-l)*(u.value.maxFontSize-u.value.minFontSize)+u.value.minFontSize,x=ie(n.name,w);return{...n,id:s.createUid(),fontSize:w,width:x.width,height:x.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[v]||t.value.customPalette[v%t.value.customPalette.length]||s.palette[v]||s.palette[v%s.palette.length]:t.value.style.chart.words.color}});T.value=de(i,u.value.width,u.value.height).sort((n,v)=>v.fontSize-n.fontSize)}const F=e.computed(()=>{const o=T.value.map(l=>({name:l.name,color:l.color})),a=T.value.map(l=>l.value);return{head:o,body:a}});function ee(){e.nextTick(()=>{const o=F.value.head.map((i,n)=>[[i.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=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const z=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,v)=>{const w=s.dataLabel({p:t.value.table.td.prefix,v:F.value.body[v],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},w]}),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}}),_=e.ref(!1);function he(o){_.value=o,$.value+=1}function pe(){return T.value}function te(){d.value.showTable=!d.value.showTable}function oe(){d.value.showTooltip=!d.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}P({getData:pe,generateCsv:ee,generatePdf:K,generateImage:Q,toggleTable:te,toggleTooltip:oe,toggleAnnotator:R});const k=e.ref(null),N=e.ref(!1),q=e.ref(""),W=e.ref(null);function me(o){if(!d.value.showTooltip)return;k.value=o.id,W.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(N.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(q.value=l,N.value=!0)}catch{console.warn("Custom format cannot be applied."),N.value=!1}if(!N.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;q.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}I.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:h,id:`wordCloud_${S.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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:h.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:g,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${b.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Y),isImaging:e.unref(J),uid:S.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:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:he,onGeneratePdf:e.unref(K),onGenerateCsv:ee,onGenerateImage:e.unref(Q),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:R},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:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode($e._sfc_main),e.createElementVNode("g",{transform:`translate(${(u.value.width<=0?10:u.value.width)/2}, ${(u.value.height<=0?10:u.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,i)=>(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:i,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":k.value&&k.value===l.id&&d.value.showTooltip,"word-not-selected":k.value&&k.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>me(l),onMouseleave:a[0]||(a[0]=n=>{k.value=null,I.value=!1}),style:e.normalizeStyle(`animation-delay:${i*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,qe))]))),256))],8,Re),e.renderSlot(o.$slots,"svg",{svg:{height:u.value.height,width:u.value.width}},void 0,!0)],10,Me)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Te._sfc_main,{show:d.value.showTooltip&&I.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:h.value,content:q.value,isCustom:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:X,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Ie,{key:0,value:C.value,"onUpdate:value":a[1]||(a[1]=l=>C.value=l),min:Z.value,max:ve.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:O},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:p,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(we.default,{key:6,hideDetails:"",config:{open:d.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(xe.DataTable,{key:`table_${L.value}`,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:a[2]||(a[2]=l=>d.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,De)]),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,Oe))}},Ge=re._export_sfc(Ue,[["__scopeId","data-v-13d267e2"]]);exports.default=Ge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DoD-GxZR.cjs"),ke=require("./Title-C2siG5N2.cjs"),ae=require("./usePrinter-B4xDG31F.cjs"),G=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./vue-ui-accordion-CBxsUoGb.cjs"),xe=require("./DataTable-CovKV5Yy.cjs"),Se=require("./BaseIcon-DemqZ_13.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=require("./useNestedProp-D_feh7A_.cjs"),$e=require("./PackageVersion-BEtuCME5.cjs"),Te=require("./Tooltip-CS4C58T7.cjs"),Ne=require("./PenAndPaper-BIcmfBvD.cjs"),Pe=c=>(e.pushScopeId("data-v-3fd7d274"),c=c(),e.popScopeId(),c),Be={"data-html2canvas-ignore":""},Fe={key:0,class:"reset-wrapper"},ze={key:1,class:"reset-wrapper"},_e={class:"mono-slicer"},Ae=Pe(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),Ve=["min","max","value"],Ee={__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(c,{emit:P}){const r=c;e.useCssVars(g=>({"90ad3208":E.value,"4f9eef70":S.value,"6e07ae3e":f.value,"2fd430a0":c.selectColor,"6b8169a4":y.value}));const E=e.computed(()=>r.inputColor),y=e.computed(()=>r.background),f=e.computed(()=>`${r.selectColor}33`),S=e.computed(()=>r.borderColor);function $(){P("reset")}const h=e.computed(()=>{const g=r.max-r.min,p=0,b=(r.value-r.min)/g*100;return{left:`${p}%`,width:`${b-p}%`,background:r.selectColor}});return(g,p)=>(e.openBlock(),e.createElementBlock("div",Be,[c.value!==c.source?(e.openBlock(),e.createElementBlock("div",Fe,[c.useResetSlot?e.renderSlot(g.$slots,"reset-action",{key:1,reset:$},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:$},[e.createVNode(Se.default,{name:"refresh",stroke:c.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ze)),e.createElementVNode("div",_e,[Ae,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(h.value)},null,4),e.createElementVNode("input",{type:"range",min:c.min,max:c.max,value:Number(c.value),onInput:p[0]||(p[0]=b=>P("update:value",Number(b.target.value)))},null,40,Ve)])]))}},Ie=re._export_sfc(Ee,[["__scopeId","data-v-3fd7d274"]]),Oe=["id"],Me=["xmlns","viewBox"],Re=["transform"],qe=["fill","font-weight","x","y","font-size","transform","onMouseover"],We={key:4,class:"vue-data-ui-watermark"},De=["innerHTML"],Ue={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(c,{expose:P}){const r=c,{vue_ui_word_cloud:E}=s.useConfig(),y=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),f=e.ref(typeof r.dataset=="string"?s.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:s.checkNaN(o.value)}))),S=e.ref(s.createUid()),$=e.ref(0),h=e.ref(null),g=e.ref(null),p=e.ref(null),b=e.ref(0),L=e.ref(0),I=e.ref(!1),t=e.computed({get:()=>j(),set:o=>o});function j(){const o=ne.useNestedProp({userConfig:r.config,defaultConfig:E});return o.theme?{...ne.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>r.config,o=>{t.value=j(),H(),b.value+=1,L.value+=1,O()},{deep:!0});const X=e.ref(null),C=e.ref(0),u=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),se=G.throttle(()=>{const{width:o,height:a}=G.useResponsive({chart:h.value,title:t.value.style.chart.title.text?g.value:null,slicer:t.value.style.chart.zoom.show&&X.value,source:p.value});u.value.width=o,u.value.height=a,e.nextTick(M)});e.watch(()=>C.value,()=>{ue()});const ue=G.debounce(()=>{M()},10);function O(){C.value=Z.value}const B=e.ref(null);e.onMounted(()=>{H(),O()});function H(){s.objectIsEmpty(r.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):f.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{y.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(B.value=new ResizeObserver(se),B.value.observe(h.value.parentNode))}e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ae.usePrinter({elementId:`wordCloud_${S.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function ie(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 ce(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 de(o,a,l){const i=[],n={x:-a/2,y:-l/2,width:a,height:l},v=0,w=0;return o.forEach(x=>{let D=!1;for(let V=0;V<Math.max(a,l)/2&&!D;V+=t.value.style.chart.words.packingWeight)for(let U=0;U<360&&!D;U+=t.value.style.chart.words.packingWeight){const le=U*Math.PI/180,fe=v+V*Math.cos(le)-x.width/2,ge=w+V*Math.sin(le)-x.height/2,m={...x,x:fe,y:ge},ye=m.x>=n.x&&m.y>=n.y&&m.x+m.width<=n.x+n.width&&m.y+m.height<=n.y+n.height,be=i.some(Ce=>ce(m,Ce));ye&&!be&&(i.push(m),D=!0)}}),i}const T=e.ref([]);e.watch(()=>r.dataset,M,{immediate:!0});const Z=e.computed(()=>Math.min(...f.value.map(o=>o.value))),ve=e.computed(()=>Math.max(...f.value.map(o=>o.value)));function M(){const o=[...f.value].filter(n=>n.value>=C.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),i=[...f.value].filter(n=>n.value>=C.value).map((n,v)=>{const w=(n.value-l)/(a-l)*(u.value.maxFontSize-u.value.minFontSize)+u.value.minFontSize,x=ie(n.name,w);return{...n,id:s.createUid(),fontSize:w,width:x.width,height:x.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[v]||t.value.customPalette[v%t.value.customPalette.length]||s.palette[v]||s.palette[v%s.palette.length]:t.value.style.chart.words.color}});T.value=de(i,u.value.width,u.value.height).sort((n,v)=>v.fontSize-n.fontSize)}const F=e.computed(()=>{const o=T.value.map(l=>({name:l.name,color:l.color})),a=T.value.map(l=>l.value);return{head:o,body:a}});function ee(){e.nextTick(()=>{const o=F.value.head.map((i,n)=>[[i.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=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const z=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,v)=>{const w=s.dataLabel({p:t.value.table.td.prefix,v:F.value.body[v],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},w]}),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}}),_=e.ref(!1);function he(o){_.value=o,$.value+=1}function pe(){return T.value}function te(){d.value.showTable=!d.value.showTable}function oe(){d.value.showTooltip=!d.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}P({getData:pe,generateCsv:ee,generatePdf:K,generateImage:Q,toggleTable:te,toggleTooltip:oe,toggleAnnotator:R});const k=e.ref(null),N=e.ref(!1),q=e.ref(""),W=e.ref(null);function me(o){if(!d.value.showTooltip)return;k.value=o.id,W.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(N.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(q.value=l,N.value=!0)}catch{console.warn("Custom format cannot be applied."),N.value=!1}if(!N.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;q.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}I.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:h,id:`wordCloud_${S.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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:h.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:g,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${b.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Y),isImaging:e.unref(J),uid:S.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:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:he,onGeneratePdf:e.unref(K),onGenerateCsv:ee,onGenerateImage:e.unref(Q),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:R},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:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode($e._sfc_main),e.createElementVNode("g",{transform:`translate(${(u.value.width<=0?10:u.value.width)/2}, ${(u.value.height<=0?10:u.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,i)=>(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:i,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":k.value&&k.value===l.id&&d.value.showTooltip,"word-not-selected":k.value&&k.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>me(l),onMouseleave:a[0]||(a[0]=n=>{k.value=null,I.value=!1}),style:e.normalizeStyle(`animation-delay:${i*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,qe))]))),256))],8,Re),e.renderSlot(o.$slots,"svg",{svg:{height:u.value.height,width:u.value.width}},void 0,!0)],10,Me)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Te._sfc_main,{show:d.value.showTooltip&&I.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:h.value,content:q.value,isCustom:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:X,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Ie,{key:0,value:C.value,"onUpdate:value":a[1]||(a[1]=l=>C.value=l),min:Z.value,max:ve.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:O},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:p,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(we.default,{key:6,hideDetails:"",config:{open:d.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(xe.DataTable,{key:`table_${L.value}`,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:a[2]||(a[2]=l=>d.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,De)]),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,Oe))}},Ge=re._export_sfc(Ue,[["__scopeId","data-v-13d267e2"]]);exports.default=Ge;
@@ -1,16 +1,16 @@
1
1
  import { useCssVars as Be, computed as p, openBlock as r, createElementBlock as h, createVNode as oe, renderSlot as d, createElementVNode as x, normalizeStyle as ae, pushScopeId as De, popScopeId as Ve, ref as n, watch as te, onMounted as Ee, onBeforeUnmount as Ue, createBlock as z, createCommentVNode as C, unref as $, createSlots as Ge, withCtx as v, normalizeProps as A, guardReactiveProps as I, normalizeClass as ge, Fragment as Le, renderList as Xe, toDisplayString as ye, createTextVNode as je, nextTick as be } from "vue";
2
- import { u as Ye, a1 as qe, v as He, c as Ce, t as Je, a as Ke, p as X, o as Qe, e as ke, g as Ze, f as et, X as tt, q as ot, r as at, x as lt } from "./index-igxqCP2w.js";
3
- import { _ as nt } from "./Title-DED-PQ7X.js";
4
- import { u as st, U as rt } from "./usePrinter-CnZYDQXB.js";
2
+ import { u as Ye, a1 as qe, v as He, c as Ce, t as Je, a as Ke, p as X, o as Qe, e as ke, g as Ze, f as et, X as tt, q as ot, r as at, x as lt } from "./index-BtL_cLa8.js";
3
+ import { _ as nt } from "./Title-CIsKiWgN.js";
4
+ import { u as st, U as rt } from "./usePrinter-sRt2SKr2.js";
5
5
  import { d as ut, t as it, u as ct } from "./useResponsive-CoxXLe23.js";
6
- import dt from "./vue-ui-accordion-lF7yVkiT.js";
7
- import { D as vt } from "./DataTable-CO5C8Cmb.js";
8
- import ht from "./BaseIcon-CaYP30Aq.js";
6
+ import dt from "./vue-ui-accordion-Cjc683tN.js";
7
+ import { D as vt } from "./DataTable-CQ8fQnex.js";
8
+ import ht from "./BaseIcon-BHwqOTt4.js";
9
9
  import { _ as $e } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as we } from "./useNestedProp-CSVnZVwZ.js";
11
- import { _ as mt } from "./PackageVersion-DYk2hOG1.js";
12
- import { _ as ft } from "./Tooltip-CHseiJu8.js";
13
- import { P as pt } from "./PenAndPaper-BfgS_5ux.js";
10
+ import { u as we } from "./useNestedProp-CEAfm1tu.js";
11
+ import { _ as mt } from "./PackageVersion-BV3fHO46.js";
12
+ import { _ as ft } from "./Tooltip-B1LgrF9R.js";
13
+ import { P as pt } from "./PenAndPaper-CCOywdmm.js";
14
14
  const gt = (c) => (De("data-v-3fd7d274"), c = c(), Ve(), c), yt = { "data-html2canvas-ignore": "" }, bt = {
15
15
  key: 0,
16
16
  class: "reset-wrapper"