vue-data-ui 2.10.6 → 2.10.8

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 (169) hide show
  1. package/README.md +2 -2
  2. package/dist/{Arrow-Cl3tB80E.cjs → Arrow-NnfTvwbg.cjs} +1 -1
  3. package/dist/{Arrow-rRiIHng2.js → Arrow-aCcBx0NS.js} +1 -1
  4. package/dist/{BaseIcon-COlnFbOq.js → BaseIcon-DTt4YbQE.js} +1 -1
  5. package/dist/{BaseIcon-CiINppo2.cjs → BaseIcon-DmfPEj6j.cjs} +1 -1
  6. package/dist/{ColorPicker-UNzkvlGG.js → ColorPicker-DrovFYIL.js} +3 -3
  7. package/dist/{ColorPicker-9QCAgrqp.cjs → ColorPicker-DsEujcIN.cjs} +1 -1
  8. package/dist/{DataTable-CXbN2mJi.js → DataTable-CX-Ynkp4.js} +2 -2
  9. package/dist/{DataTable-DOiZOQ3J.cjs → DataTable-zSU-0X__.cjs} +1 -1
  10. package/dist/{Legend-BU9C5fBQ.js → Legend-BTvPguV6.js} +2 -2
  11. package/dist/{Legend-CFqKBI0j.cjs → Legend-DFQ4iWI3.cjs} +1 -1
  12. package/dist/{PackageVersion-0Lu6RIig.js → PackageVersion-CkUbRQrt.js} +1 -1
  13. package/dist/{PackageVersion-BMNt7NsQ.cjs → PackageVersion-DxR-fKLM.cjs} +1 -1
  14. package/dist/{PenAndPaper-D4Uu-GqW.js → PenAndPaper-Br3OdauM.js} +3 -3
  15. package/dist/{PenAndPaper-BUwLP3Wx.cjs → PenAndPaper-CG9o3ymS.cjs} +1 -1
  16. package/dist/{Shape-2NRWULE_.cjs → Shape-D9l3WJGO.cjs} +1 -1
  17. package/dist/{Shape-BavMx2aa.js → Shape-Y1FgLdPz.js} +1 -1
  18. package/dist/{Slicer-Ct8BAk8F.cjs → Slicer-B7FJCuCB.cjs} +1 -1
  19. package/dist/{Slicer-B_qJHvNR.js → Slicer-C2GR76As.js} +2 -2
  20. package/dist/{Title-BkfQdTEX.cjs → Title-CEZO2hzQ.cjs} +1 -1
  21. package/dist/{Title-DrVDm1wy.js → Title-tlFeM12I.js} +1 -1
  22. package/dist/{Tooltip-BFT6mZ5a.js → Tooltip-BCtHh3BT.js} +1 -1
  23. package/dist/{Tooltip-BK88meti.cjs → Tooltip-BZa-QzER.cjs} +1 -1
  24. package/dist/documentation/installation.md +1 -1
  25. package/dist/{dom-to-png-0WSGIcUV.js → dom-to-png-CjxHTZgX.js} +1 -1
  26. package/dist/{dom-to-png-CyVwBzNm.cjs → dom-to-png-fAhFmKHV.cjs} +1 -1
  27. package/dist/{img-DqK-SXIP.cjs → img-Ds_hWTTu.cjs} +1 -1
  28. package/dist/{img-BT-UmGcu.js → img-w_iFTYRY.js} +1 -1
  29. package/dist/{index-hMo72hAq.js → index-Co5UfCMK.js} +275 -257
  30. package/dist/index-Dy2-pNb6.cjs +9 -0
  31. package/dist/{pdf-G7o-GM_m.js → pdf-BfkOvZWw.js} +1 -1
  32. package/dist/{pdf-DY3kwqSx.cjs → pdf-CCdcXY_7.cjs} +1 -1
  33. package/dist/style.css +1 -1
  34. package/dist/types/vue-data-ui.d.cts +54 -0
  35. package/dist/types/vue-data-ui.d.ts +54 -0
  36. package/dist/{useNestedProp-DhEaBTgF.js → useNestedProp-C22WP03t.js} +1 -1
  37. package/dist/{useNestedProp-DcWhlk8h.cjs → useNestedProp-DQ8Jt3-Y.cjs} +1 -1
  38. package/dist/{usePrinter-B4ojFS2B.cjs → usePrinter-BQEYwy4a.cjs} +1 -1
  39. package/dist/{usePrinter-D2z-bUtX.js → usePrinter-D_wgo-7k.js} +3 -3
  40. package/dist/{vue-data-ui-BTkU5knB.js → vue-data-ui-C18HDIa2.js} +62 -62
  41. package/dist/{vue-data-ui-BR4hs3ky.cjs → vue-data-ui-zmg06AF1.cjs} +1 -1
  42. package/dist/vue-data-ui.cjs +1 -1
  43. package/dist/vue-data-ui.js +1 -1
  44. package/dist/{vue-ui-3d-bar-Cx2zND3j.cjs → vue-ui-3d-bar-C_gJuhTV.cjs} +1 -1
  45. package/dist/{vue-ui-3d-bar-DD3_LLbq.js → vue-ui-3d-bar-SB6p5amV.js} +9 -9
  46. package/dist/{vue-ui-accordion-CHMdpjnX.js → vue-ui-accordion-CfB_jW1X.js} +3 -3
  47. package/dist/{vue-ui-accordion-DUGBjyB1.cjs → vue-ui-accordion-dVGUWjXH.cjs} +1 -1
  48. package/dist/{vue-ui-age-pyramid-WpMKbqUM.cjs → vue-ui-age-pyramid-DZ_ajGY_.cjs} +1 -1
  49. package/dist/{vue-ui-age-pyramid-CUS2cIAl.js → vue-ui-age-pyramid-G8ggvkGU.js} +10 -10
  50. package/dist/{vue-ui-annotator-B5VYzARK.cjs → vue-ui-annotator-BkZat_7T.cjs} +1 -1
  51. package/dist/{vue-ui-annotator-Ckyjvy1h.js → vue-ui-annotator-DeoWv4A3.js} +2 -2
  52. package/dist/{vue-ui-bullet-i97qMAx7.js → vue-ui-bullet-CvjS0_Pz.js} +8 -8
  53. package/dist/{vue-ui-bullet-Clccjys0.cjs → vue-ui-bullet-D9jaszdm.cjs} +1 -1
  54. package/dist/{vue-ui-candlestick-B35fn-Jo.cjs → vue-ui-candlestick-gnsNiFI3.cjs} +1 -1
  55. package/dist/{vue-ui-candlestick-Dmu21ktX.js → vue-ui-candlestick-xBYW3oOn.js} +11 -11
  56. package/dist/{vue-ui-carousel-table-cvW3wpY7.js → vue-ui-carousel-table-BKQIWhzt.js} +4 -4
  57. package/dist/{vue-ui-carousel-table-23ggTo5D.cjs → vue-ui-carousel-table-DNW8HJNv.cjs} +1 -1
  58. package/dist/{vue-ui-chestnut-CZpShJyS.js → vue-ui-chestnut-C5RprHfl.js} +8 -8
  59. package/dist/{vue-ui-chestnut-CkuDV8dp.cjs → vue-ui-chestnut-D9UKh8la.cjs} +1 -1
  60. package/dist/{vue-ui-circle-pack-B6d9PjE2.js → vue-ui-circle-pack-Cx4gGG1K.js} +9 -9
  61. package/dist/{vue-ui-circle-pack-C2IQV5_6.cjs → vue-ui-circle-pack-OTXbeD89.cjs} +1 -1
  62. package/dist/{vue-ui-cursor-CZBmEqOC.cjs → vue-ui-cursor-BuEDX1kV.cjs} +1 -1
  63. package/dist/{vue-ui-cursor-CG4bTWjj.js → vue-ui-cursor-Cdvi-0lD.js} +2 -2
  64. package/dist/{vue-ui-dashboard-D-95GOHa.cjs → vue-ui-dashboard-BAPaHtqr.cjs} +1 -1
  65. package/dist/{vue-ui-dashboard-DqM_deY-.js → vue-ui-dashboard-BLHl6FJI.js} +62 -62
  66. package/dist/{vue-ui-digits-CKpey7p1.js → vue-ui-digits-CCAt8_aJ.js} +2 -2
  67. package/dist/{vue-ui-digits-Cdauuy8X.cjs → vue-ui-digits-YV4qxb86.cjs} +1 -1
  68. package/dist/{vue-ui-donut-j519aqqU.cjs → vue-ui-donut-BvjPFjpd.cjs} +1 -1
  69. package/dist/{vue-ui-donut-Dp2Yy4fh.js → vue-ui-donut-CNZIha3Z.js} +12 -12
  70. package/dist/{vue-ui-donut-evolution-ClL_5jhm.js → vue-ui-donut-evolution-DNhwy9qU.js} +11 -11
  71. package/dist/{vue-ui-donut-evolution-Cg1VnagT.cjs → vue-ui-donut-evolution-Dxx5Psl4.cjs} +1 -1
  72. package/dist/{vue-ui-dumbbell-C8tOQUbs.js → vue-ui-dumbbell-BmRkAtBK.js} +10 -10
  73. package/dist/{vue-ui-dumbbell-CNJ9en-A.cjs → vue-ui-dumbbell-MGMSs7vG.cjs} +1 -1
  74. package/dist/vue-ui-flow-B3t_sNr4.cjs +3 -0
  75. package/dist/vue-ui-flow-CxhJwDZa.js +767 -0
  76. package/dist/{vue-ui-funnel-CfxmaNEA.js → vue-ui-funnel-CJHKcUDg.js} +9 -9
  77. package/dist/{vue-ui-funnel-DbVCaDxm.cjs → vue-ui-funnel-twMmn36_.cjs} +1 -1
  78. package/dist/{vue-ui-galaxy-zBDItFVz.cjs → vue-ui-galaxy-BjBTNZ6j.cjs} +1 -1
  79. package/dist/{vue-ui-galaxy-dm_p5xAR.js → vue-ui-galaxy-CDonLoXv.js} +11 -11
  80. package/dist/{vue-ui-gauge-DwwvbGca.js → vue-ui-gauge-C7L0uVvx.js} +7 -7
  81. package/dist/{vue-ui-gauge-Dr-7ojj9.cjs → vue-ui-gauge-DXadxMZn.cjs} +1 -1
  82. package/dist/{vue-ui-gizmo-Cq0SpTfm.js → vue-ui-gizmo-C9JuTLL-.js} +3 -3
  83. package/dist/{vue-ui-gizmo-CB5NfNit.cjs → vue-ui-gizmo-u7ypeW6n.cjs} +1 -1
  84. package/dist/{vue-ui-heatmap-DtRSx7DO.cjs → vue-ui-heatmap-Cjckqsrg.cjs} +1 -1
  85. package/dist/{vue-ui-heatmap-DNSOppoO.js → vue-ui-heatmap-DaAgigHH.js} +10 -10
  86. package/dist/{vue-ui-history-plot-r9eLYJCe.js → vue-ui-history-plot-KoGpnC64.js} +11 -11
  87. package/dist/{vue-ui-history-plot-BvC3L9g3.cjs → vue-ui-history-plot-YLMX8PqM.cjs} +1 -1
  88. package/dist/{vue-ui-kpi-BBpxo07S.js → vue-ui-kpi-DNUDGlWM.js} +3 -3
  89. package/dist/{vue-ui-kpi-raHWFHjI.cjs → vue-ui-kpi-GZlFX5zg.cjs} +1 -1
  90. package/dist/{vue-ui-mini-loader-CGtQXPzk.js → vue-ui-mini-loader-9YvdM0_A.js} +2 -2
  91. package/dist/{vue-ui-mini-loader-STx0NSvX.cjs → vue-ui-mini-loader-D1HhmCbC.cjs} +1 -1
  92. package/dist/{vue-ui-molecule-EYSvyl-h.js → vue-ui-molecule-B71fJREj.js} +11 -11
  93. package/dist/{vue-ui-molecule-B4WJo2V5.cjs → vue-ui-molecule-DDsKb9re.cjs} +1 -1
  94. package/dist/{vue-ui-mood-radar-CfHUyyMY.cjs → vue-ui-mood-radar-BO4yaBxo.cjs} +1 -1
  95. package/dist/{vue-ui-mood-radar-Crk-XB3O.js → vue-ui-mood-radar-DH4RYmdT.js} +11 -11
  96. package/dist/{vue-ui-nested-donuts-DRJZT5Bv.cjs → vue-ui-nested-donuts-BlxuqLPb.cjs} +2 -2
  97. package/dist/{vue-ui-nested-donuts-Rm4P3uEP.js → vue-ui-nested-donuts-bOXvQ01U.js} +12 -12
  98. package/dist/{vue-ui-onion-Bgvs96ms.cjs → vue-ui-onion-BugH4ThJ.cjs} +1 -1
  99. package/dist/{vue-ui-onion-Dzl_kjlE.js → vue-ui-onion-D7VhEicc.js} +11 -11
  100. package/dist/{vue-ui-parallel-coordinate-plot-98c0XRsu.js → vue-ui-parallel-coordinate-plot-Bc5Yr0Yr.js} +12 -12
  101. package/dist/{vue-ui-parallel-coordinate-plot-YuLiWTox.cjs → vue-ui-parallel-coordinate-plot-DjTMM1Zt.cjs} +1 -1
  102. package/dist/{vue-ui-quadrant-CiqJKJu1.cjs → vue-ui-quadrant-Dni5Lkhg.cjs} +1 -1
  103. package/dist/{vue-ui-quadrant-Dd1ryxBx.js → vue-ui-quadrant-PrjG5beo.js} +12 -12
  104. package/dist/{vue-ui-quick-chart-CTsvK-CY.js → vue-ui-quick-chart-C46V8Ffa.js} +9 -9
  105. package/dist/{vue-ui-quick-chart-DMceIo39.cjs → vue-ui-quick-chart-LuGKbIvU.cjs} +1 -1
  106. package/dist/{vue-ui-radar-CHYpedpk.js → vue-ui-radar-05pd47HM.js} +12 -12
  107. package/dist/{vue-ui-radar-Dp8-SmYd.cjs → vue-ui-radar-j2Vgot8p.cjs} +1 -1
  108. package/dist/{vue-ui-rating-DSsm92zG.js → vue-ui-rating-Bl_q3TYs.js} +2 -2
  109. package/dist/{vue-ui-rating-uVphq_sK.cjs → vue-ui-rating-ClxiMhPq.cjs} +1 -1
  110. package/dist/{vue-ui-relation-circle-BPVBRieo.js → vue-ui-relation-circle-Bu5eYbEg.js} +7 -7
  111. package/dist/{vue-ui-relation-circle-46wKUZTv.cjs → vue-ui-relation-circle-BuoQTWw_.cjs} +1 -1
  112. package/dist/{vue-ui-ridgeline-B6GA2tXb.js → vue-ui-ridgeline-D4ot7MF8.js} +12 -12
  113. package/dist/{vue-ui-ridgeline-OULIMr6I.cjs → vue-ui-ridgeline-ESRn_Q1y.cjs} +1 -1
  114. package/dist/{vue-ui-rings-HVHIYYrh.cjs → vue-ui-rings-D7o_vleu.cjs} +1 -1
  115. package/dist/{vue-ui-rings-Cl-607b8.js → vue-ui-rings-Dyl5VV9I.js} +12 -12
  116. package/dist/{vue-ui-scatter-BZ4DPyoL.cjs → vue-ui-scatter-B31kZz0w.cjs} +1 -1
  117. package/dist/{vue-ui-scatter-ClYbim5F.js → vue-ui-scatter-njuULIsD.js} +12 -12
  118. package/dist/{vue-ui-skeleton-C3t9bL6f.js → vue-ui-skeleton-BSlYUHZA.js} +3 -3
  119. package/dist/{vue-ui-skeleton-C954hFY-.cjs → vue-ui-skeleton-Db7PiDqL.cjs} +1 -1
  120. package/dist/{vue-ui-smiley-DsKnKBFv.js → vue-ui-smiley-BmNRkSub.js} +2 -2
  121. package/dist/{vue-ui-smiley-BBGCa2S0.cjs → vue-ui-smiley-CfdbRWq6.cjs} +1 -1
  122. package/dist/{vue-ui-spark-trend-Da-HE7x2.js → vue-ui-spark-trend-B0Xvu1YP.js} +5 -5
  123. package/dist/{vue-ui-spark-trend-CBa0FhIy.cjs → vue-ui-spark-trend-CwtYlUEX.cjs} +1 -1
  124. package/dist/{vue-ui-sparkbar-CUul3e3U.cjs → vue-ui-sparkbar-Xy7idkhv.cjs} +1 -1
  125. package/dist/{vue-ui-sparkbar-DgQxbUeJ.js → vue-ui-sparkbar-e2-8wHQH.js} +4 -4
  126. package/dist/{vue-ui-sparkgauge-BKA5GnGO.js → vue-ui-sparkgauge-_cMBBl3V.js} +4 -4
  127. package/dist/{vue-ui-sparkgauge-DYPVqz6I.cjs → vue-ui-sparkgauge-vjcDqzGe.cjs} +1 -1
  128. package/dist/{vue-ui-sparkhistogram-CNN9tXh1.cjs → vue-ui-sparkhistogram-BpD6XxfA.cjs} +1 -1
  129. package/dist/{vue-ui-sparkhistogram-CdZy4SfH.js → vue-ui-sparkhistogram-DUyGQgqZ.js} +5 -5
  130. package/dist/{vue-ui-sparkline-DCNNoruu.js → vue-ui-sparkline-D1wfG3Yw.js} +4 -4
  131. package/dist/{vue-ui-sparkline-BCP4gyTp.cjs → vue-ui-sparkline-cPPxz94c.cjs} +1 -1
  132. package/dist/{vue-ui-sparkstackbar-BAXGFcPk.js → vue-ui-sparkstackbar-BCTx016Z.js} +5 -5
  133. package/dist/{vue-ui-sparkstackbar-sgehFSit.cjs → vue-ui-sparkstackbar-iRVpx_xT.cjs} +1 -1
  134. package/dist/{vue-ui-stackbar-Cto9A9WG.js → vue-ui-stackbar--QKW68d6.js} +13 -13
  135. package/dist/{vue-ui-stackbar-87l909wS.cjs → vue-ui-stackbar-DCotybpB.cjs} +1 -1
  136. package/dist/{vue-ui-strip-plot-C0F8_S_g.js → vue-ui-strip-plot-BhLBOV7s.js} +11 -11
  137. package/dist/{vue-ui-strip-plot-Deegqmms.cjs → vue-ui-strip-plot-CdceC4jP.cjs} +1 -1
  138. package/dist/{vue-ui-table-BUxFdYM7.cjs → vue-ui-table-Cd9UeZXy.cjs} +1 -1
  139. package/dist/{vue-ui-table-1vUkkwSp.js → vue-ui-table-DjDENKmJ.js} +3 -3
  140. package/dist/{vue-ui-table-heatmap-PPGfjMxh.js → vue-ui-table-heatmap-CZdiE-l3.js} +4 -4
  141. package/dist/{vue-ui-table-heatmap-uDH3owRO.cjs → vue-ui-table-heatmap-gbdWhEG_.cjs} +1 -1
  142. package/dist/{vue-ui-table-sparkline-CPSlJVB1.cjs → vue-ui-table-sparkline-BFQ4DQRu.cjs} +1 -1
  143. package/dist/{vue-ui-table-sparkline-D9LEgrxj.js → vue-ui-table-sparkline-zGotm14D.js} +5 -5
  144. package/dist/{vue-ui-thermometer-D8P88pea.cjs → vue-ui-thermometer-CRhrvWm0.cjs} +1 -1
  145. package/dist/{vue-ui-thermometer-BxngpuEZ.js → vue-ui-thermometer-DA3KgSw1.js} +7 -7
  146. package/dist/{vue-ui-timer-B_dh6otW.cjs → vue-ui-timer-DnXYrfrB.cjs} +1 -1
  147. package/dist/{vue-ui-timer-C3dxY--Q.js → vue-ui-timer-ult9htF3.js} +5 -5
  148. package/dist/{vue-ui-tiremarks-_oZ6wL6K.js → vue-ui-tiremarks-CRXtVmEM.js} +7 -7
  149. package/dist/{vue-ui-tiremarks-mISKtpmD.cjs → vue-ui-tiremarks-Dht-uT9E.cjs} +1 -1
  150. package/dist/{vue-ui-treemap-D5Dcd84h.js → vue-ui-treemap-Ck5tHVnE.js} +12 -12
  151. package/dist/{vue-ui-treemap-CZZXcX0f.cjs → vue-ui-treemap-pbhS4FfC.cjs} +1 -1
  152. package/dist/{vue-ui-vertical-bar-C-KAVKXj.cjs → vue-ui-vertical-bar-BZjsolLB.cjs} +1 -1
  153. package/dist/{vue-ui-vertical-bar-CtWXk6co.js → vue-ui-vertical-bar-egz76l34.js} +12 -12
  154. package/dist/{vue-ui-waffle-C9qyTIzz.cjs → vue-ui-waffle-C7za7d0u.cjs} +1 -1
  155. package/dist/{vue-ui-waffle-BD2GnRkO.js → vue-ui-waffle-CrMkCjJJ.js} +12 -12
  156. package/dist/{vue-ui-wheel-CKfr_7kH.cjs → vue-ui-wheel-DIgPyNrB.cjs} +1 -1
  157. package/dist/{vue-ui-wheel-HydW49fo.js → vue-ui-wheel-DzMpr4xY.js} +7 -7
  158. package/dist/{vue-ui-word-cloud-C4ISeFpy.cjs → vue-ui-word-cloud-CNqAz548.cjs} +1 -1
  159. package/dist/{vue-ui-word-cloud-C9Pbi6ey.js → vue-ui-word-cloud-TS3az-LK.js} +10 -10
  160. package/dist/{vue-ui-world-D-AsGwlW.js → vue-ui-world-D3X01xYB.js} +11 -11
  161. package/dist/{vue-ui-world-BlAD3UPb.cjs → vue-ui-world-DMdqTY5G.cjs} +1 -1
  162. package/dist/{vue-ui-xy-CS-xjZVI.cjs → vue-ui-xy-CF87Afh2.cjs} +2 -2
  163. package/dist/{vue-ui-xy-canvas-Dd7IFwSK.cjs → vue-ui-xy-canvas-2IL8lPL4.cjs} +1 -1
  164. package/dist/{vue-ui-xy-canvas-DtKI-IQA.js → vue-ui-xy-canvas-BHeV-3t9.js} +12 -12
  165. package/dist/{vue-ui-xy-CMw6P4C0.js → vue-ui-xy-tIBPr8r8.js} +16 -16
  166. package/package.json +1 -1
  167. package/dist/index-Cai0fWP7.cjs +0 -9
  168. package/dist/vue-ui-flow-BYypzs-j.cjs +0 -1
  169. package/dist/vue-ui-flow-Ouw_lvpb.js +0 -550
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cai0fWP7.cjs"),se=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-BkfQdTEX.cjs"),ue=require("./usePrinter-B4ojFS2B.cjs"),_e=require("./Tooltip-BK88meti.cjs"),$e=require("./vue-ui-sparkbar-CUul3e3U.cjs"),Te=require("./Legend-CFqKBI0j.cjs"),Ne=require("./DataTable-DOiZOQ3J.cjs"),xe=require("./vue-ui-skeleton-C954hFY-.cjs"),Se=require("./vue-ui-accordion-DUGBjyB1.cjs"),ie=require("./useNestedProp-DcWhlk8h.cjs"),Ee=require("./PackageVersion-BMNt7NsQ.cjs"),Ve=require("./PenAndPaper-BUwLP3Wx.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],ze=["xmlns","viewBox"],Ie=["width","height"],Re=["id"],qe=["stop-color"],Me=["stop-color"],Ue={key:1},De=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:0},We=["d","stroke","stroke-width"],He=["d","stroke","stroke-width"],je={key:2},Xe=["x","y","text-anchor","font-size","fill","onMouseenter"],Ye=["points","stroke","stroke-width"],Je=["points","stroke","stroke-width","fill"],Ke={key:3},Qe=["cx","cy","fill","r","stroke"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt={key:0,style:{"max-width":"200px",margin:"0 auto"}},ot={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ce,{expose:de,emit:ve}){const{vue_ui_radar:pe}=n.useConfig(),d=ce,b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),he=e.ref(null),T=e.ref(!1),N=e.ref(""),L=e.ref(0),C=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>j(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:G,keepUserOptionState:W}=Oe.useUserOptionState({config:t.value}),{svgRef:H}=Fe.useChartAccessibility({config:t.value.style.chart.title});function j(){const o=ie.useNestedProp({userConfig:d.config,defaultConfig:pe});return o.theme?{...ie.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=j(),x.value=!t.value.userOptions.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1,p.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tootlip.show},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=se.throttle(()=>{const{width:a,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});requestAnimationFrame(()=>{u.value.width=a,u.value.height=l})});B.value=new ResizeObserver(o),B.value.observe(C.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),fe=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=ve,i=e.ref([]),w=e.ref(null),m=e.ref(!1);function ee(o){m.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{m.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{m.value=!1},500)),me("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ye(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),h=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),te=e.computed(()=>Math.max(...h.value.flatMap(o=>o.values))),oe=e.computed(()=>h.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),ae=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:oe.value,rotation:0})),ke=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>ae.value.coordinates.map((o,a)=>{const l=h.value[a].values.map(r=>be({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(h.value[a].target||te.value)}));return{...o,...h.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function be({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const y=e.computed(()=>{const o=h.value.map((a,l)=>a.values.map(r=>r/(a.target||te.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/h.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>ee(l),isSegregated:i.value.includes(l)}))}),Ce=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function we(o,a){V.value=[],_.value=a,T.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function le(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,lt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const k=e.ref(!1);function Be(o){k.value=o,L.value+=1}function re(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return de({getData:ye,generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:re,toggleTooltip:ne,toggleAnnotator:F}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:C,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve._sfc_main,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(W)||e.unref(x))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ee._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Me)],8,Re))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,De))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:oe.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:ae.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,He),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>we(l,r),onMouseleave:a[0]||(a[0]=s=>{T.value=!1,_.value=null})},e.toDisplayString(l.name),41,Xe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Ye)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===c&&t.value.useCssAnimation})},null,10,Qe))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${D.value}`,legendSet:y.value,config:Ce.value,onClickMarker:a[1]||(a[1]=({i:l})=>ee(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(_e._sfc_main,{show:p.value.showTooltip&&T.value,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,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:N.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode($e.default,{dataset:V.value,config:fe.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.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(Ne.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},at=Ae._export_sfc(ot,[["__scopeId","data-v-b6116edd"]]);exports.default=at;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Dy2-pNb6.cjs"),se=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-CEZO2hzQ.cjs"),ue=require("./usePrinter-BQEYwy4a.cjs"),_e=require("./Tooltip-BZa-QzER.cjs"),$e=require("./vue-ui-sparkbar-Xy7idkhv.cjs"),Te=require("./Legend-DFQ4iWI3.cjs"),Ne=require("./DataTable-zSU-0X__.cjs"),xe=require("./vue-ui-skeleton-Db7PiDqL.cjs"),Se=require("./vue-ui-accordion-dVGUWjXH.cjs"),ie=require("./useNestedProp-DQ8Jt3-Y.cjs"),Ee=require("./PackageVersion-DxR-fKLM.cjs"),Ve=require("./PenAndPaper-CG9o3ymS.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],ze=["xmlns","viewBox"],Ie=["width","height"],Re=["id"],qe=["stop-color"],Me=["stop-color"],Ue={key:1},De=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:0},We=["d","stroke","stroke-width"],He=["d","stroke","stroke-width"],je={key:2},Xe=["x","y","text-anchor","font-size","fill","onMouseenter"],Ye=["points","stroke","stroke-width"],Je=["points","stroke","stroke-width","fill"],Ke={key:3},Qe=["cx","cy","fill","r","stroke"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt={key:0,style:{"max-width":"200px",margin:"0 auto"}},ot={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ce,{expose:de,emit:ve}){const{vue_ui_radar:pe}=n.useConfig(),d=ce,b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),he=e.ref(null),T=e.ref(!1),N=e.ref(""),L=e.ref(0),C=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>j(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:G,keepUserOptionState:W}=Oe.useUserOptionState({config:t.value}),{svgRef:H}=Fe.useChartAccessibility({config:t.value.style.chart.title});function j(){const o=ie.useNestedProp({userConfig:d.config,defaultConfig:pe});return o.theme?{...ie.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=j(),x.value=!t.value.userOptions.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1,p.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tootlip.show},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=se.throttle(()=>{const{width:a,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});requestAnimationFrame(()=>{u.value.width=a,u.value.height=l})});B.value=new ResizeObserver(o),B.value.observe(C.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),fe=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=ve,i=e.ref([]),w=e.ref(null),m=e.ref(!1);function ee(o){m.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{m.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{m.value=!1},500)),me("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ye(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),h=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),te=e.computed(()=>Math.max(...h.value.flatMap(o=>o.values))),oe=e.computed(()=>h.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),ae=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:oe.value,rotation:0})),ke=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>ae.value.coordinates.map((o,a)=>{const l=h.value[a].values.map(r=>be({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(h.value[a].target||te.value)}));return{...o,...h.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function be({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const y=e.computed(()=>{const o=h.value.map((a,l)=>a.values.map(r=>r/(a.target||te.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/h.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>ee(l),isSegregated:i.value.includes(l)}))}),Ce=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function we(o,a){V.value=[],_.value=a,T.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function le(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,lt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const k=e.ref(!1);function Be(o){k.value=o,L.value+=1}function re(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return de({getData:ye,generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:re,toggleTooltip:ne,toggleAnnotator:F}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:C,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve._sfc_main,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(W)||e.unref(x))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ee._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Me)],8,Re))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,De))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:oe.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:ae.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,He),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>we(l,r),onMouseleave:a[0]||(a[0]=s=>{T.value=!1,_.value=null})},e.toDisplayString(l.name),41,Xe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Ye)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===c&&t.value.useCssAnimation})},null,10,Qe))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${D.value}`,legendSet:y.value,config:Ce.value,onClickMarker:a[1]||(a[1]=({i:l})=>ee(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(_e._sfc_main,{show:p.value.showTooltip&&T.value,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,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:N.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode($e.default,{dataset:V.value,config:fe.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.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(Ne.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},at=Ae._export_sfc(ot,[["__scopeId","data-v-b6116edd"]]);exports.default=at;
@@ -1,6 +1,6 @@
1
1
  import { ref as $, useSlots as J, onMounted as R, computed as x, watch as Q, createElementBlock as o, openBlock as a, normalizeStyle as s, createCommentVNode as p, createElementVNode as r, toDisplayString as f, unref as n, Fragment as B, renderList as Z, renderSlot as j, mergeProps as O, withKeys as ee } from "vue";
2
- import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, Y } from "./index-hMo72hAq.js";
3
- import { u as ie } from "./useNestedProp-DhEaBTgF.js";
2
+ import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, Y } from "./index-Co5UfCMK.js";
3
+ import { u as ie } from "./useNestedProp-C22WP03t.js";
4
4
  import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const ne = {
6
6
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cai0fWP7.cjs"),F=require("./useNestedProp-DcWhlk8h.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Dy2-pNb6.cjs"),F=require("./useNestedProp-DQ8Jt3-Y.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
@@ -1,12 +1,12 @@
1
1
  import { useCssVars as Ve, computed as y, ref as o, watch as We, onMounted as De, onBeforeUnmount as Xe, createElementBlock as a, openBlock as i, unref as r, normalizeStyle as C, createBlock as F, createCommentVNode as v, createSlots as Ye, withCtx as z, renderSlot as h, normalizeProps as B, guardReactiveProps as R, normalizeClass as D, createVNode as qe, createElementVNode as He, Fragment as P, renderList as L, mergeProps as me, toDisplayString as E } from "vue";
2
- import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-hMo72hAq.js";
2
+ import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-Co5UfCMK.js";
3
3
  import { t as it, u as at } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as nt } from "./Title-DrVDm1wy.js";
5
- import { u as rt, U as ut } from "./usePrinter-D2z-bUtX.js";
6
- import ot from "./vue-ui-skeleton-C3t9bL6f.js";
7
- import { u as xe } from "./useNestedProp-DhEaBTgF.js";
8
- import { _ as ct } from "./PackageVersion-0Lu6RIig.js";
9
- import { _ as dt } from "./PenAndPaper-D4Uu-GqW.js";
4
+ import { _ as nt } from "./Title-tlFeM12I.js";
5
+ import { u as rt, U as ut } from "./usePrinter-D_wgo-7k.js";
6
+ import ot from "./vue-ui-skeleton-BSlYUHZA.js";
7
+ import { u as xe } from "./useNestedProp-C22WP03t.js";
8
+ import { _ as ct } from "./PackageVersion-CkUbRQrt.js";
9
+ import { _ as dt } from "./PenAndPaper-Br3OdauM.js";
10
10
  import { u as vt } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { u as ft } from "./useChartAccessibility-BWojgys7.js";
12
12
  import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cai0fWP7.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-BkfQdTEX.cjs"),te=require("./usePrinter-B4ojFS2B.cjs"),$e=require("./vue-ui-skeleton-C954hFY-.cjs"),le=require("./useNestedProp-DcWhlk8h.cjs"),_e=require("./PackageVersion-BMNt7NsQ.cjs"),Pe=require("./PenAndPaper-BUwLP3Wx.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:_,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),_.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,o=0;P.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(_))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(_e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Dy2-pNb6.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-CEZO2hzQ.cjs"),te=require("./usePrinter-BQEYwy4a.cjs"),$e=require("./vue-ui-skeleton-Db7PiDqL.cjs"),le=require("./useNestedProp-DQ8Jt3-Y.cjs"),_e=require("./PackageVersion-DxR-fKLM.cjs"),Pe=require("./PenAndPaper-CG9o3ymS.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:_,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),_.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,o=0;P.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(_))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(_e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
@@ -1,20 +1,20 @@
1
1
  import { useCssVars as Ct, ref as h, reactive as At, computed as k, onUnmounted as _t, createBlock as P, openBlock as r, Teleport as St, createElementBlock as u, createCommentVNode as y, withModifiers as U, normalizeStyle as O, createElementVNode as c, unref as g, renderSlot as x, createVNode as Ze, nextTick as et, onMounted as Mt, onBeforeUnmount as zt, watch as Ue, normalizeClass as ce, createSlots as Ve, withCtx as $, normalizeProps as de, guardReactiveProps as he, Fragment as b, renderList as T, mergeProps as Ge, toDisplayString as J, createTextVNode as je } from "vue";
2
- import { X as tt, u as Lt, c as Ae, o as Tt, e as _e, g as qe, b as Ot, d as Pt, p as ve, al as Je, a8 as Et, S as Ke, T as Dt, U as Nt, G as It, i as fe, f as ge, t as Xt, a as Ft, q as Ht, r as Rt, am as Bt } from "./index-hMo72hAq.js";
2
+ import { X as tt, u as Lt, c as Ae, o as Tt, e as _e, g as qe, b as Ot, d as Pt, p as ve, al as Je, a8 as Et, S as Ke, T as Dt, U as Nt, G as It, i as fe, f as ge, t as Xt, a as Ft, q as Ht, r as Rt, am as Bt } from "./index-Co5UfCMK.js";
3
3
  import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
4
4
  import { u as Yt } from "./useChartAccessibility-BWojgys7.js";
5
- import { u as Ut, U as Vt } from "./usePrinter-D2z-bUtX.js";
5
+ import { u as Ut, U as Vt } from "./usePrinter-D_wgo-7k.js";
6
6
  import { t as Gt, u as jt } from "./useResponsive-Cw4oZ8sQ.js";
7
- import { u as Qe } from "./useNestedProp-DhEaBTgF.js";
8
- import qt from "./vue-ui-accordion-CHMdpjnX.js";
9
- import Jt from "./BaseIcon-COlnFbOq.js";
7
+ import { u as Qe } from "./useNestedProp-C22WP03t.js";
8
+ import qt from "./vue-ui-accordion-CfB_jW1X.js";
9
+ import Jt from "./BaseIcon-DTt4YbQE.js";
10
10
  import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { D as Kt } from "./DataTable-CXbN2mJi.js";
12
- import { L as Qt } from "./Legend-BU9C5fBQ.js";
13
- import { _ as Zt } from "./PenAndPaper-D4Uu-GqW.js";
14
- import { _ as ea } from "./Shape-BavMx2aa.js";
15
- import ta from "./vue-ui-skeleton-C3t9bL6f.js";
16
- import { _ as aa } from "./Title-DrVDm1wy.js";
17
- import la from "./vue-ui-xy-CMw6P4C0.js";
11
+ import { D as Kt } from "./DataTable-CX-Ynkp4.js";
12
+ import { L as Qt } from "./Legend-BTvPguV6.js";
13
+ import { _ as Zt } from "./PenAndPaper-Br3OdauM.js";
14
+ import { _ as ea } from "./Shape-Y1FgLdPz.js";
15
+ import ta from "./vue-ui-skeleton-BSlYUHZA.js";
16
+ import { _ as aa } from "./Title-tlFeM12I.js";
17
+ import la from "./vue-ui-xy-tIBPr8r8.js";
18
18
  const oa = ["xmlns"], sa = { class: "modal-title" }, na = { class: "modal-body" }, ra = {
19
19
  __name: "BaseDraggableDialog",
20
20
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Cai0fWP7.cjs"),je=require("./useUserOptionState-BgepsfED.cjs"),Je=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./usePrinter-B4ojFS2B.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),Se=require("./useNestedProp-DcWhlk8h.cjs"),Ke=require("./vue-ui-accordion-DUGBjyB1.cjs"),Qe=require("./BaseIcon-CiINppo2.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ze=require("./DataTable-DOiZOQ3J.cjs"),et=require("./Legend-CFqKBI0j.cjs"),tt=require("./PenAndPaper-BUwLP3Wx.cjs"),lt=require("./Shape-2NRWULE_.cjs"),at=require("./vue-ui-skeleton-C954hFY-.cjs"),ot=require("./Title-BkfQdTEX.cjs"),rt=require("./vue-ui-xy-CS-xjZVI.cjs"),nt=["xmlns"],st={class:"modal-title"},it={class:"modal-body"},ut={__name:"BaseDraggableDialog",props:{backgroundColor:{type:String},color:{type:String},headerBg:{type:String},headerColor:{type:String}},emits:["close"],setup($,{expose:K,emit:Q}){e.useCssVars(i=>({b93256ca:$.color}));const Z=$,p=Q,b=e.ref(!1),V=e.ref(!1),r=e.reactive({left:window.innerWidth/2-200,top:window.innerHeight/2-120,width:400,height:400,dragging:!1,resizing:!1,dragOffsetX:0,dragOffsetY:0,pointerStartX:0,pointerStartY:0,resizeStartW:0,resizeStartH:0});function Y(){b.value=!0,e.nextTick(()=>{V.value||(r.left=Math.max(0,window.innerWidth/2-r.width/2),r.top=Math.max(0,window.innerHeight/2-r.height/2),V.value=!0)})}function O(){b.value=!1,p("close")}K({open:Y,close:O});const P=e.computed(()=>({position:"fixed",left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,padding:0,border:"none",background:Z.backgroundColor,boxShadow:"0 4px 24px rgba(0,0,0,0.15)",zIndex:9999,overflow:"visible",borderRadius:"2px"}));function C(i){return i.touches&&i.touches.length?{x:i.touches[0].clientX,y:i.touches[0].clientY}:{x:i.clientX,y:i.clientY}}function F(i){var v;(v=i.preventDefault)==null||v.call(i),r.dragging=!0;const d=C(i);r.dragOffsetX=d.x-r.left,r.dragOffsetY=d.y-r.top,document.addEventListener("mousemove",A),document.addEventListener("mouseup",N),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",N)}function A(i){var t;if(!r.dragging)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.dragOffsetX,w=d.y-r.dragOffsetY;v=Math.max(0,Math.min(v,window.innerWidth-r.width)),w=Math.max(0,Math.min(w,window.innerHeight-r.height)),r.left=v,r.top=w}function N(){r.dragging=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",N),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",N)}function I(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,document.addEventListener("mousemove",f),document.addEventListener("mouseup",E),document.addEventListener("touchmove",f,{passive:!1}),document.addEventListener("touchend",E)}function f(i){var t;if(!r.resizing)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=d.y-r.pointerStartY;r.width=Math.max(240,r.resizeStartW+v),r.height=Math.max(400,r.resizeStartH+w)}function E(){r.resizing=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",f),document.removeEventListener("touchend",E)}function G(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,r.resizeStartLeft=r.left,r.resizeStartTop=r.top,document.addEventListener("mousemove",z),document.addEventListener("mouseup",h),document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",h)}function z(i){var R;if(!r.resizing)return;(R=i.preventDefault)==null||R.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=Math.min(Math.max(0,r.resizeStartLeft+v),r.resizeStartLeft+r.resizeStartW-240),t=r.resizeStartW-(w-r.resizeStartLeft),y=d.y-r.pointerStartY,X=Math.max(400,r.resizeStartH+y);r.left=w,r.width=t,r.height=X}function h(){r.resizing=!1,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",z),document.removeEventListener("touchend",h)}return e.onUnmounted(()=>{N(),E(),h()}),(i,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal vue-ui-draggable-dialog",style:e.normalizeStyle(P.value),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"modal-header",style:e.normalizeStyle({backgroundColor:$.headerBg,color:$.headerColor})},[e.createElementVNode("span",{class:"drag-handle",onMousedown:e.withModifiers(F,["stop","prevent"]),onTouchstart:e.withModifiers(F,["stop","prevent"])},[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(u.XMLNS),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},d[1]||(d[1]=[e.createElementVNode("path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]),8,nt))],32),e.createElementVNode("span",st,[e.renderSlot(i.$slots,"title",{},void 0,!0)]),e.createElementVNode("button",{class:"close",onClick:O},[e.createVNode(Qe.default,{name:"close",stroke:$.headerColor},null,8,["stroke"])])],4),e.createElementVNode("div",it,[e.renderSlot(i.$slots,"default",{},void 0,!0)]),e.createElementVNode("div",{class:"resize-handle",onMousedown:e.withModifiers(I,["stop","prevent"]),onTouchstart:e.withModifiers(I,["stop","prevent"])},null,32),e.createElementVNode("div",{class:"resize-handle resize-handle-left",onMousedown:e.withModifiers(G,["stop","prevent"]),onTouchstart:e.withModifiers(G,["stop","prevent"])},null,32)],4)):e.createCommentVNode("",!0)]))}},ct=$e._export_sfc(ut,[["__scopeId","data-v-1344ad9f"]]),dt=["id"],ht=["xmlns","viewBox"],vt=["id"],mt=["stop-color"],ft=["stop-color"],pt=["stop-color"],gt=["stop-color"],yt=["id"],kt=["stop-color"],xt=["stop-color"],bt=["stop-color"],wt=["stop-color"],Ct={key:0},Bt=["fill","d"],Et=["stroke","stroke-width","d"],St=["fill","d"],$t=["stroke","stroke-dasharray","stroke-width","d"],At=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],Nt=["cx","cy","stroke","stroke-width","r","fill"],zt=["x","y","font-size","font-weight","fill","text-decoration","onMouseenter","onClick"],Lt={key:0},Mt=["font-size","fill","font-weight","transform","text-anchor"],_t=["x","y","width","height","onMouseenter","onClick"],Vt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Pt=["cx","cy","stroke","stroke-width","r","fill"],Tt=["x","y","text-anchor","font-size","fill"],Dt={key:5,class:"vue-data-ui-watermark"},Ot=["onClick"],Ft=["innerHTML"],It={__name:"vue-ui-ridgeline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint","selectX"],setup($,{expose:K,emit:Q}){const{vue_ui_ridgeline:Z}=u.useConfig(),p=$,b=e.computed({get(){return!!p.dataset&&p.dataset.length},set(a){return a}}),V=Q,r=e.ref(null),Y=e.ref(null),O=e.ref(null),P=e.ref(null),C=e.ref(null),F=e.ref(null),A=e.ref(0),N=e.ref(0),I=e.ref(0),f=e.ref(u.createUid()),E=e.ref(0),G=e.ref(0),z=e.ref(512),h=e.ref(null),i=e.ref(null),d=e.ref(null),v=e.ref(0);function w(){const a=Se.useNestedProp({userConfig:p.config,defaultConfig:Z});return a.theme?{...Se.useNestedProp({userConfig:u.themes.vue_ui_ridgeline[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}const t=e.computed({get:()=>w(),set:a=>a}),y=e.ref(Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight)),{userOptionsVisible:X,setUserOptionsVisibility:R,keepUserOptionState:ne}=je.useUserOptionState({config:t.value}),{svgRef:ee}=Je.useChartAccessibility({config:t.value.style.chart.title});e.onMounted(te),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function te(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiRidgeline",type:"dataset"}):p.dataset.forEach((a,s)=>{u.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","datapoints"]}).forEach(l=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:l,index:s})}),a.datapoints.length&&a.datapoints.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:`datapoint.${o}`,index:`${s}-${n}`})})})}),G.value=p.dataset.length,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),t.value.responsive){const a=Ee.throttle(()=>{const{width:s,height:l}=Ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?Y.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:C.value,noTitle:F.value,padding:t.value.style.chart.padding});requestAnimationFrame(()=>{z.value=s,y.value=l/p.dataset.length,v.value=l})});P.value=new ResizeObserver(a),P.value.observe(r.value.parentNode)}}const{isPrinting:se,isImaging:ie,generatePdf:ue,generateImage:ce}=Be.usePrinter({elementId:`vue-ui-ridgeline_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-ridgeline",options:t.value.userOptions.print}),Ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=e.ref({showTable:t.value.table.show});e.watch(()=>p.config,a=>{t.value=w(),X.value=!t.value.userOptions.showOnChartHover,te(),A.value+=1,I.value+=1,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),H.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>p.dataset,te,{deep:!0});const le=e.computed(()=>t.value.style.chart.areas.height/t.value.style.chart.areas.rowHeight);function de(a){S.value.includes(a)?S.value=S.value.filter(s=>s!==a):S.value.push(a),V("selectLegend",D.value)}const B=e.computed(()=>b.value?p.dataset.map((a,s)=>({...a,labelLen:Me(a.name,t.value.style.chart.yAxis.labels.fontSize),uid:u.createUid(),datapoints:a.datapoints.map((l,n)=>{const o=l.color?u.convertColorToHex(l.color):Ne.value[n]||u.palette[n]||u.palette[n%u.palette.length],c=u.slugify(l.name);return{...l,color:o,id:c}})})):[]),he=e.computed(()=>t.value.style.chart.padding.top+y.value*p.dataset.length+y.value*le.value),k=e.computed(()=>({fullHeight:m.value.padding.top+m.value.padding.bottom+m.value.height,top:m.value.padding.top,left:m.value.padding.left,right:m.value.width-m.value.padding.right,bottom:m.value.padding.top+m.value.height,width:m.value.width-(m.value.padding.left+m.value.padding.right)})),m=e.computed(()=>{const a=t.value.style.chart.padding;return{width:z.value,height:he.value,padding:a}}),T=e.computed(()=>{const a=Math.max(...B.value.map(c=>c.labelLen)),s=Math.max(...B.value.flatMap(c=>c.datapoints.map(x=>x.values.length))),l=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,n=(k.value.width-l)/s,o=[];for(let c=0;c<s;c+=1)o.push({selectorX:l+n*c,x:l+n*c-n/2,y:k.value.top,label:t.value.style.chart.xAxis.labels.values[c]||"",index:c,width:n,height:he.value});return o});function ze(a){V("selectX",B.value.map(s=>s.datapoints.map(l=>({dp:l,selected:l.values[a.index]}))))}function Le(a,s){return a.length*s/2+s}function ve(a,s,l){const n=Le(s,l);return a+n>k.value.right}function Me(a,s,l="sans-serif"){const o=document.createElement("canvas").getContext("2d"),c=typeof s=="number"?`${s}px`:s;return o.font=`${c} ${l}`,o.measureText(a).width}const D=e.computed(()=>{y.value;const a=Math.max(...B.value.map(g=>g.labelLen)),s=Math.max(...B.value.flatMap(g=>g.datapoints.map(L=>L.values.length))),l=Math.max(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),n=Math.min(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),o=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,c=(k.value.width-o)/s,x=Math.abs(Math.min(n,0)),ke=l+x;function xe(g){return isNaN(g/ke)?0:g/ke}return B.value.map((g,L)=>{const be=k.value.top+y.value*L,M=k.value.top+be+y.value*le.value*(1-xe(x));return{...g,label:{x:o-t.value.style.chart.yAxis.labels.fontSize,y:M},datapoints:g.datapoints.map(W=>{const _=W.values.map((U,qe)=>{const We=isNaN(U)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(U)?0:U||0,Ue=o+c*qe,Ye=k.value.top+be+y.value*le.value*(1-xe(We+x)),Ge=U===Math.max(...W.values);return{x:Ue,y:Ye,value:U,isMaxPoint:Ge,zero:M}}),Ie=`${u.createSmoothAreaSegments(_,M,!1,!1)}`,Xe=`M ${o},${M} ${u.createStraightPath(_)} ${_.at(-1).x},${M}`,Re=`M ${o},${M} ${_.at(-1).x},${M}`,we=`M ${u.createSmoothPath(_)}`,Ce=`M ${u.createStraightPath(_)}`,He=u.getPathLengthFromCoordinates(t.value.style.chart.areas.smooth?we:Ce);return{...W,uid:u.createUid(),plots:_,smoothPath:Ie,straightPath:Xe,zeroPath:Re,pathLength:He,smoothPathRidge:we,straightPathRidge:Ce}}).filter(W=>!S.value.includes(W.id))}})}),S=e.ref([]);function _e(a){const s=new Map;return a.forEach(l=>{l.datapoints.forEach((n,o)=>{const c=u.slugify(n.name);s.has(c)||s.set(c,{id:c,name:n.name,color:n.color,shape:"circle",segregate:()=>de(c),isSegregated:S.value.includes(c),opacity:S.value.includes(c)?.5:1})})}),Array.from(s.values())}const ae=e.computed(()=>_e(B.value)),Ve=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),q=e.ref(!1);function Pe(a){q.value=a,E.value+=1}const me=e.ref({}),fe=e.ref([]);function Te(a){V("selectDatapoint",a),t.value.style.chart.dialog.show&&(fe.value=a.datapoints.map(s=>({name:s.name,color:s.color,type:"line",useArea:!0,smooth:t.value.style.chart.areas.smooth,series:s.values})),i.value=a,me.value=u.deepEmptyObjectToNull({...t.value.style.chart.dialog.xyChart,responsive:!0,chart:{...t.value.style.chart.dialog.xyChart.chart,grid:{...t.value.style.chart.dialog.xyChart.chart.grid,labels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels,xAxisLabels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels.xAxisLabels,values:t.value.style.chart.xAxis.labels.values}}},tooltip:{...t.value.style.chart.dialog.xyChart.chart.tooltip,showTimeLabel:t.value.style.chart.xAxis.labels.values.length>0}}}),d.value&&d.value.open())}const oe=e.ref(null);function De(a){oe.value=a}function Oe(){oe.value=null}const j=e.ref(!1);function re(){j.value=!j.value}function pe(){H.value.showTable=!H.value.showTable}const ge=e.computed(()=>({body:D.value.flatMap(l=>l.datapoints.flatMap(n=>({...n,rowName:`${l.name}: ${n.name}`}))).map(l=>[{name:l.rowName,color:l.color},...l.values])})),J=e.computed(()=>{const a=[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values],s={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.style.chart.xAxis.labels.values],head:a,body:ge.value.body,config:s}});function ye(){e.nextTick(()=>{const a=[[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values.map(n=>[n])],...ge.value.body.map((n,o)=>[n[0].name,...n.slice(1)])],s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text]].concat(a),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-ridgeline"})})}function Fe(){return D.value}return K({getData:Fe,generateImage:ce,generatePdf:ue,generateCsv:ye,toggleAnnotator:re,toggleTable:pe}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ridgelineChart",ref:r,class:e.normalizeClass(`vue-ui-ridgeline ${q.value?"vue-data-ui-wrapper-fullscreen":""}`),id:`vue-ui-ridgeline_${f.value}`,style:e.normalizeStyle({fontFamily:t.value.style.fontFamily,width:"100%",textAlign:"center",background:t.value.style.chart.backgroundColor,height:t.value.responsive?"100%":void 0}),onMouseenter:s[4]||(s[4]=()=>e.unref(R)(!0)),onMouseleave:s[5]||(s[5]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(ee)?(e.openBlock(),e.createBlock(tt._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:j.value,svgRef:e.unref(ee),onClose:re},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"userConfig",{},void 0,!0),Ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,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:Y,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ot._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"ridgeline-div-title",...t.value.style.chart.title},subtitle:{cy:"ridgeline-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(ne)||e.unref(X))?(e.openBlock(),e.createBlock(Be.UserOptions,{ref:"details",key:`user_option_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(se),isImaging:e.unref(ie),uid:f.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:q.value,chartElement:r.value,position:t.value.userOptions.position,isTooltip:!1,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:j.value,style:e.normalizeStyle({visibility:e.unref(ne)?e.unref(X)?"visible":"hidden":"visible"}),onToggleFullscreen:Pe,onGeneratePdf:e.unref(ue),onGenerateCsv:ye,onGenerateImage:e.unref(ce),onToggleTable:pe,onToggleAnnotator:re},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","style","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":q.value,"vue-data-ui-fulscreen--off":!q.value}),viewBox:`0 0 ${m.value.width<=0?10:m.value.width} ${k.value.fullHeight<=0?10:k.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};${t.value.responsive?`height: ${v.value}px; width: 100%;`:""}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(l,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient-${l.id}-${f.value}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color,"stop-opacity":"1"},null,8,mt),e.createElementVNode("stop",{offset:"30%","stop-color":l.color,"stop-opacity":"0.7"},null,8,ft),e.createElementVNode("stop",{offset:"70%","stop-color":l.color,"stop-opacity":"0.3"},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":l.color,"stop-opacity":"0.1"},null,8,gt)],8,vt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`grad${o.id}`,id:`gradient-single-${f.value}-${o.uid}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color,"stop-opacity":"1"},null,8,kt),e.createElementVNode("stop",{offset:"30%","stop-color":o.color,"stop-opacity":"0.7"},null,8,xt),e.createElementVNode("stop",{offset:"70%","stop-color":o.color,"stop-opacity":"0.3"},null,8,bt),e.createElementVNode("stop",{offset:"100%","stop-color":o.color,"stop-opacity":"0.1"},null,8,wt)],8,yt))),128))],64))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",{key:`ds-${n}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("g",{key:o.id},[a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Ct,[e.createElementVNode("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{datapointIndex:n,seriesIndex:c,patternId:`pattern_${f.value}_${o.uid}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("path",{fill:a.$slots.pattern?`url(#pattern_${f.value}_${o.uid})`:t.value.style.chart.backgroundColor,stroke:"none","stroke-linecap":"round",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,style:e.normalizeStyle({opacity:t.value.style.chart.areas.opacity})},null,12,Bt),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.areas.stroke.useSerieColor?o.color:t.value.style.chart.areas.stroke.color,"stroke-width":t.value.style.chart.areas.strokeWidth,d:t.value.style.chart.areas.smooth?o.smoothPathRidge:o.straightPathRidge,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,Et),e.createElementVNode("path",{fill:t.value.style.chart.areas.useGradient?t.value.style.chart.areas.useCommonColor?`url(#gradient-${o.id}-${f.value})`:`url(#gradient-single-${f.value}-${o.uid})`:o.color,stroke:"none",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,St),t.value.style.chart.zeroLine.show?(e.openBlock(),e.createElementBlock("path",{key:1,stroke:t.value.style.chart.zeroLine.useSerieColor?o.color:t.value.style.chart.zeroLine.stroke,"stroke-dasharray":t.value.style.chart.zeroLine.strokeDasharray,"stroke-width":t.value.style.chart.zeroLine.strokeWidth,d:o.zeroPath,"stroke-linecap":"round"},null,8,$t)):e.createCommentVNode("",!0),t.value.style.chart.areas.maxPoint.show&&o.plots.length>1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(o.plots,x=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.isMaxPoint?(e.openBlock(),e.createElementBlock("line",{key:0,x1:x.x,y1:x.y,x2:x.x,y2:x.zero,stroke:t.value.style.chart.areas.maxPoint.adaptStrokeToBackground?e.unref(u.adaptColorToBackground)(o.color):t.value.style.chart.areas.maxPoint.stroke,"stroke-width":t.value.style.chart.areas.maxPoint.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.chart.areas.maxPoint.strokeDasharray},null,8,At)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),o.plots.length===1?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:o.plots[0].x,cy:o.plots[0].y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?o.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Nt)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("text",{x:l.label.x,y:l.label.y,"text-anchor":"end","font-size":t.value.style.chart.yAxis.labels.fontSize,"font-weight":t.value.style.chart.yAxis.labels.bold?"bold":"normal",fill:t.value.style.chart.yAxis.labels.color,style:e.normalizeStyle({cursor:t.value.style.chart.dialog.show?"pointer":"default"}),"text-decoration":t.value.style.chart.dialog.show&&(oe.value===n||i.value&&l.uid===i.value.uid)?"underline":"",onMouseenter:o=>De(n),onMouseleave:Oe,onClick:o=>Te(l)},e.toDisplayString(l.name),45,zt)]))),128)),t.value.style.chart.xAxis.labels.values.length?(e.openBlock(),e.createElementBlock("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>e.renderSlot(a.$slots,"time-label",e.mergeProps({ref_for:!0},{show:l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0,fontSize:t.value.style.chart.xAxis.labels.fontSize,content:l.label,textAnchor:t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",fill:t.value.style.chart.xAxis.labels.color,transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,x:l.selectorX,y:k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}),()=>[l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0?(e.openBlock(),e.createElementBlock("text",{key:0,"font-size":t.value.style.chart.xAxis.labels.fontSize,fill:t.value.style.chart.xAxis.labels.color,"font-weight":t.value.style.chart.xAxis.labels.bold?"bold":"normal",transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,"text-anchor":t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",style:e.normalizeStyle({opacity:h.value?h.value.index===n?1:.2:1})},e.toDisplayString(l.label),13,Mt)):e.createCommentVNode("",!0)],!0)),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,width:l.width<0?.1:l.width,height:l.height<0?.1:l.height,fill:"transparent",onMouseenter:o=>h.value=l,onMouseleave:s[0]||(s[0]=o=>h.value=null),onClick:()=>ze(l)},null,40,_t))),256)),t.value.style.chart.selector.show&&h.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:h.value.selectorX,x2:h.value.selectorX,y1:h.value.y,y2:h.value.y+h.value.height-y.value/2,stroke:t.value.style.chart.selector.stroke,"stroke-width":t.value.style.chart.selector.strokeWidth,"stroke-dasharray":t.value.style.chart.selector.strokeDasharray,"stroke-linecap":"round",style:{pointerEvents:"none"}},null,8,Vt)):e.createCommentVNode("",!0),h.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.plots,(o,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?n.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Pt)):e.createCommentVNode("",!0),h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("text",{key:1,x:ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?o.x-t.value.style.chart.selector.labels.fontSize/2:o.x+t.value.style.chart.selector.labels.fontSize/2,y:o.y+t.value.style.chart.selector.labels.fontSize/3,"text-anchor":ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?"end":"start","font-size":t.value.style.chart.selector.labels.fontSize,fill:t.value.style.chart.selector.labels.color,style:{pointerEvents:"none"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding}))),9,Tt)):e.createCommentVNode("",!0)],64))),256))],64))),256))],64))),256)):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"svg",{svg:m.value},void 0,!0)],14,ht)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(se)||e.unref(ie)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(at.default,{key:6,config:{type:"ridgeline",style:{backgroundColor:t.value.style.chart.backgroundColor,ridgeline:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(et.Legend,{key:`legend_${I.value}`,legendSet:ae.value,config:Ve.value,onClickMarker:s[1]||(s[1]=({legend:l})=>de(l.id))},e.createSlots({item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${S.value.includes(l.id)?.5:1}`),onClick:n=>l.segregate()},e.toDisplayString(l.name),13,Ot)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:n})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${n})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Ke.default,{key:8,hideDetails:"",config:{open:H.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ze.DataTable,{key:`table_${N.value}`,colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` :${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>H.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Ft)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,l,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:l,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.table.td.roundingValue}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0),t.value.style.chart.dialog.show?(e.openBlock(),e.createBlock(ct,{key:9,ref_key:"dialog",ref:d,onClose:s[3]||(s[3]=l=>i.value=null),backgroundColor:t.value.style.chart.dialog.backgroundColor,color:t.value.style.chart.dialog.color,headerBg:t.value.style.chart.dialog.header.backgroundColor,headerColor:t.value.style.chart.dialog.header.color},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.name),1)]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(rt.default,{key:0,config:me.value,dataset:fe.value},null,8,["config","dataset"])):e.createCommentVNode("",!0)]),_:1},8,["backgroundColor","color","headerBg","headerColor"])):e.createCommentVNode("",!0)],46,dt))}},Xt=$e._export_sfc(It,[["__scopeId","data-v-9c3affc2"]]);exports.default=Xt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Dy2-pNb6.cjs"),je=require("./useUserOptionState-BgepsfED.cjs"),Je=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./usePrinter-BQEYwy4a.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),Se=require("./useNestedProp-DQ8Jt3-Y.cjs"),Ke=require("./vue-ui-accordion-dVGUWjXH.cjs"),Qe=require("./BaseIcon-DmfPEj6j.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ze=require("./DataTable-zSU-0X__.cjs"),et=require("./Legend-DFQ4iWI3.cjs"),tt=require("./PenAndPaper-CG9o3ymS.cjs"),lt=require("./Shape-D9l3WJGO.cjs"),at=require("./vue-ui-skeleton-Db7PiDqL.cjs"),ot=require("./Title-CEZO2hzQ.cjs"),rt=require("./vue-ui-xy-CF87Afh2.cjs"),nt=["xmlns"],st={class:"modal-title"},it={class:"modal-body"},ut={__name:"BaseDraggableDialog",props:{backgroundColor:{type:String},color:{type:String},headerBg:{type:String},headerColor:{type:String}},emits:["close"],setup($,{expose:K,emit:Q}){e.useCssVars(i=>({b93256ca:$.color}));const Z=$,p=Q,b=e.ref(!1),V=e.ref(!1),r=e.reactive({left:window.innerWidth/2-200,top:window.innerHeight/2-120,width:400,height:400,dragging:!1,resizing:!1,dragOffsetX:0,dragOffsetY:0,pointerStartX:0,pointerStartY:0,resizeStartW:0,resizeStartH:0});function Y(){b.value=!0,e.nextTick(()=>{V.value||(r.left=Math.max(0,window.innerWidth/2-r.width/2),r.top=Math.max(0,window.innerHeight/2-r.height/2),V.value=!0)})}function O(){b.value=!1,p("close")}K({open:Y,close:O});const P=e.computed(()=>({position:"fixed",left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,padding:0,border:"none",background:Z.backgroundColor,boxShadow:"0 4px 24px rgba(0,0,0,0.15)",zIndex:9999,overflow:"visible",borderRadius:"2px"}));function C(i){return i.touches&&i.touches.length?{x:i.touches[0].clientX,y:i.touches[0].clientY}:{x:i.clientX,y:i.clientY}}function F(i){var v;(v=i.preventDefault)==null||v.call(i),r.dragging=!0;const d=C(i);r.dragOffsetX=d.x-r.left,r.dragOffsetY=d.y-r.top,document.addEventListener("mousemove",A),document.addEventListener("mouseup",N),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",N)}function A(i){var t;if(!r.dragging)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.dragOffsetX,w=d.y-r.dragOffsetY;v=Math.max(0,Math.min(v,window.innerWidth-r.width)),w=Math.max(0,Math.min(w,window.innerHeight-r.height)),r.left=v,r.top=w}function N(){r.dragging=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",N),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",N)}function I(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,document.addEventListener("mousemove",f),document.addEventListener("mouseup",E),document.addEventListener("touchmove",f,{passive:!1}),document.addEventListener("touchend",E)}function f(i){var t;if(!r.resizing)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=d.y-r.pointerStartY;r.width=Math.max(240,r.resizeStartW+v),r.height=Math.max(400,r.resizeStartH+w)}function E(){r.resizing=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",f),document.removeEventListener("touchend",E)}function G(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,r.resizeStartLeft=r.left,r.resizeStartTop=r.top,document.addEventListener("mousemove",z),document.addEventListener("mouseup",h),document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",h)}function z(i){var R;if(!r.resizing)return;(R=i.preventDefault)==null||R.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=Math.min(Math.max(0,r.resizeStartLeft+v),r.resizeStartLeft+r.resizeStartW-240),t=r.resizeStartW-(w-r.resizeStartLeft),y=d.y-r.pointerStartY,X=Math.max(400,r.resizeStartH+y);r.left=w,r.width=t,r.height=X}function h(){r.resizing=!1,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",z),document.removeEventListener("touchend",h)}return e.onUnmounted(()=>{N(),E(),h()}),(i,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal vue-ui-draggable-dialog",style:e.normalizeStyle(P.value),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"modal-header",style:e.normalizeStyle({backgroundColor:$.headerBg,color:$.headerColor})},[e.createElementVNode("span",{class:"drag-handle",onMousedown:e.withModifiers(F,["stop","prevent"]),onTouchstart:e.withModifiers(F,["stop","prevent"])},[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(u.XMLNS),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},d[1]||(d[1]=[e.createElementVNode("path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]),8,nt))],32),e.createElementVNode("span",st,[e.renderSlot(i.$slots,"title",{},void 0,!0)]),e.createElementVNode("button",{class:"close",onClick:O},[e.createVNode(Qe.default,{name:"close",stroke:$.headerColor},null,8,["stroke"])])],4),e.createElementVNode("div",it,[e.renderSlot(i.$slots,"default",{},void 0,!0)]),e.createElementVNode("div",{class:"resize-handle",onMousedown:e.withModifiers(I,["stop","prevent"]),onTouchstart:e.withModifiers(I,["stop","prevent"])},null,32),e.createElementVNode("div",{class:"resize-handle resize-handle-left",onMousedown:e.withModifiers(G,["stop","prevent"]),onTouchstart:e.withModifiers(G,["stop","prevent"])},null,32)],4)):e.createCommentVNode("",!0)]))}},ct=$e._export_sfc(ut,[["__scopeId","data-v-1344ad9f"]]),dt=["id"],ht=["xmlns","viewBox"],vt=["id"],mt=["stop-color"],ft=["stop-color"],pt=["stop-color"],gt=["stop-color"],yt=["id"],kt=["stop-color"],xt=["stop-color"],bt=["stop-color"],wt=["stop-color"],Ct={key:0},Bt=["fill","d"],Et=["stroke","stroke-width","d"],St=["fill","d"],$t=["stroke","stroke-dasharray","stroke-width","d"],At=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],Nt=["cx","cy","stroke","stroke-width","r","fill"],zt=["x","y","font-size","font-weight","fill","text-decoration","onMouseenter","onClick"],Lt={key:0},Mt=["font-size","fill","font-weight","transform","text-anchor"],_t=["x","y","width","height","onMouseenter","onClick"],Vt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Pt=["cx","cy","stroke","stroke-width","r","fill"],Tt=["x","y","text-anchor","font-size","fill"],Dt={key:5,class:"vue-data-ui-watermark"},Ot=["onClick"],Ft=["innerHTML"],It={__name:"vue-ui-ridgeline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint","selectX"],setup($,{expose:K,emit:Q}){const{vue_ui_ridgeline:Z}=u.useConfig(),p=$,b=e.computed({get(){return!!p.dataset&&p.dataset.length},set(a){return a}}),V=Q,r=e.ref(null),Y=e.ref(null),O=e.ref(null),P=e.ref(null),C=e.ref(null),F=e.ref(null),A=e.ref(0),N=e.ref(0),I=e.ref(0),f=e.ref(u.createUid()),E=e.ref(0),G=e.ref(0),z=e.ref(512),h=e.ref(null),i=e.ref(null),d=e.ref(null),v=e.ref(0);function w(){const a=Se.useNestedProp({userConfig:p.config,defaultConfig:Z});return a.theme?{...Se.useNestedProp({userConfig:u.themes.vue_ui_ridgeline[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}const t=e.computed({get:()=>w(),set:a=>a}),y=e.ref(Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight)),{userOptionsVisible:X,setUserOptionsVisibility:R,keepUserOptionState:ne}=je.useUserOptionState({config:t.value}),{svgRef:ee}=Je.useChartAccessibility({config:t.value.style.chart.title});e.onMounted(te),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function te(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiRidgeline",type:"dataset"}):p.dataset.forEach((a,s)=>{u.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","datapoints"]}).forEach(l=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:l,index:s})}),a.datapoints.length&&a.datapoints.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:`datapoint.${o}`,index:`${s}-${n}`})})})}),G.value=p.dataset.length,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),t.value.responsive){const a=Ee.throttle(()=>{const{width:s,height:l}=Ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?Y.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:C.value,noTitle:F.value,padding:t.value.style.chart.padding});requestAnimationFrame(()=>{z.value=s,y.value=l/p.dataset.length,v.value=l})});P.value=new ResizeObserver(a),P.value.observe(r.value.parentNode)}}const{isPrinting:se,isImaging:ie,generatePdf:ue,generateImage:ce}=Be.usePrinter({elementId:`vue-ui-ridgeline_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-ridgeline",options:t.value.userOptions.print}),Ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=e.ref({showTable:t.value.table.show});e.watch(()=>p.config,a=>{t.value=w(),X.value=!t.value.userOptions.showOnChartHover,te(),A.value+=1,I.value+=1,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),H.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>p.dataset,te,{deep:!0});const le=e.computed(()=>t.value.style.chart.areas.height/t.value.style.chart.areas.rowHeight);function de(a){S.value.includes(a)?S.value=S.value.filter(s=>s!==a):S.value.push(a),V("selectLegend",D.value)}const B=e.computed(()=>b.value?p.dataset.map((a,s)=>({...a,labelLen:Me(a.name,t.value.style.chart.yAxis.labels.fontSize),uid:u.createUid(),datapoints:a.datapoints.map((l,n)=>{const o=l.color?u.convertColorToHex(l.color):Ne.value[n]||u.palette[n]||u.palette[n%u.palette.length],c=u.slugify(l.name);return{...l,color:o,id:c}})})):[]),he=e.computed(()=>t.value.style.chart.padding.top+y.value*p.dataset.length+y.value*le.value),k=e.computed(()=>({fullHeight:m.value.padding.top+m.value.padding.bottom+m.value.height,top:m.value.padding.top,left:m.value.padding.left,right:m.value.width-m.value.padding.right,bottom:m.value.padding.top+m.value.height,width:m.value.width-(m.value.padding.left+m.value.padding.right)})),m=e.computed(()=>{const a=t.value.style.chart.padding;return{width:z.value,height:he.value,padding:a}}),T=e.computed(()=>{const a=Math.max(...B.value.map(c=>c.labelLen)),s=Math.max(...B.value.flatMap(c=>c.datapoints.map(x=>x.values.length))),l=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,n=(k.value.width-l)/s,o=[];for(let c=0;c<s;c+=1)o.push({selectorX:l+n*c,x:l+n*c-n/2,y:k.value.top,label:t.value.style.chart.xAxis.labels.values[c]||"",index:c,width:n,height:he.value});return o});function ze(a){V("selectX",B.value.map(s=>s.datapoints.map(l=>({dp:l,selected:l.values[a.index]}))))}function Le(a,s){return a.length*s/2+s}function ve(a,s,l){const n=Le(s,l);return a+n>k.value.right}function Me(a,s,l="sans-serif"){const o=document.createElement("canvas").getContext("2d"),c=typeof s=="number"?`${s}px`:s;return o.font=`${c} ${l}`,o.measureText(a).width}const D=e.computed(()=>{y.value;const a=Math.max(...B.value.map(g=>g.labelLen)),s=Math.max(...B.value.flatMap(g=>g.datapoints.map(L=>L.values.length))),l=Math.max(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),n=Math.min(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),o=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,c=(k.value.width-o)/s,x=Math.abs(Math.min(n,0)),ke=l+x;function xe(g){return isNaN(g/ke)?0:g/ke}return B.value.map((g,L)=>{const be=k.value.top+y.value*L,M=k.value.top+be+y.value*le.value*(1-xe(x));return{...g,label:{x:o-t.value.style.chart.yAxis.labels.fontSize,y:M},datapoints:g.datapoints.map(W=>{const _=W.values.map((U,qe)=>{const We=isNaN(U)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(U)?0:U||0,Ue=o+c*qe,Ye=k.value.top+be+y.value*le.value*(1-xe(We+x)),Ge=U===Math.max(...W.values);return{x:Ue,y:Ye,value:U,isMaxPoint:Ge,zero:M}}),Ie=`${u.createSmoothAreaSegments(_,M,!1,!1)}`,Xe=`M ${o},${M} ${u.createStraightPath(_)} ${_.at(-1).x},${M}`,Re=`M ${o},${M} ${_.at(-1).x},${M}`,we=`M ${u.createSmoothPath(_)}`,Ce=`M ${u.createStraightPath(_)}`,He=u.getPathLengthFromCoordinates(t.value.style.chart.areas.smooth?we:Ce);return{...W,uid:u.createUid(),plots:_,smoothPath:Ie,straightPath:Xe,zeroPath:Re,pathLength:He,smoothPathRidge:we,straightPathRidge:Ce}}).filter(W=>!S.value.includes(W.id))}})}),S=e.ref([]);function _e(a){const s=new Map;return a.forEach(l=>{l.datapoints.forEach((n,o)=>{const c=u.slugify(n.name);s.has(c)||s.set(c,{id:c,name:n.name,color:n.color,shape:"circle",segregate:()=>de(c),isSegregated:S.value.includes(c),opacity:S.value.includes(c)?.5:1})})}),Array.from(s.values())}const ae=e.computed(()=>_e(B.value)),Ve=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),q=e.ref(!1);function Pe(a){q.value=a,E.value+=1}const me=e.ref({}),fe=e.ref([]);function Te(a){V("selectDatapoint",a),t.value.style.chart.dialog.show&&(fe.value=a.datapoints.map(s=>({name:s.name,color:s.color,type:"line",useArea:!0,smooth:t.value.style.chart.areas.smooth,series:s.values})),i.value=a,me.value=u.deepEmptyObjectToNull({...t.value.style.chart.dialog.xyChart,responsive:!0,chart:{...t.value.style.chart.dialog.xyChart.chart,grid:{...t.value.style.chart.dialog.xyChart.chart.grid,labels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels,xAxisLabels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels.xAxisLabels,values:t.value.style.chart.xAxis.labels.values}}},tooltip:{...t.value.style.chart.dialog.xyChart.chart.tooltip,showTimeLabel:t.value.style.chart.xAxis.labels.values.length>0}}}),d.value&&d.value.open())}const oe=e.ref(null);function De(a){oe.value=a}function Oe(){oe.value=null}const j=e.ref(!1);function re(){j.value=!j.value}function pe(){H.value.showTable=!H.value.showTable}const ge=e.computed(()=>({body:D.value.flatMap(l=>l.datapoints.flatMap(n=>({...n,rowName:`${l.name}: ${n.name}`}))).map(l=>[{name:l.rowName,color:l.color},...l.values])})),J=e.computed(()=>{const a=[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values],s={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.style.chart.xAxis.labels.values],head:a,body:ge.value.body,config:s}});function ye(){e.nextTick(()=>{const a=[[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values.map(n=>[n])],...ge.value.body.map((n,o)=>[n[0].name,...n.slice(1)])],s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text]].concat(a),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-ridgeline"})})}function Fe(){return D.value}return K({getData:Fe,generateImage:ce,generatePdf:ue,generateCsv:ye,toggleAnnotator:re,toggleTable:pe}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ridgelineChart",ref:r,class:e.normalizeClass(`vue-ui-ridgeline ${q.value?"vue-data-ui-wrapper-fullscreen":""}`),id:`vue-ui-ridgeline_${f.value}`,style:e.normalizeStyle({fontFamily:t.value.style.fontFamily,width:"100%",textAlign:"center",background:t.value.style.chart.backgroundColor,height:t.value.responsive?"100%":void 0}),onMouseenter:s[4]||(s[4]=()=>e.unref(R)(!0)),onMouseleave:s[5]||(s[5]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(ee)?(e.openBlock(),e.createBlock(tt._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:j.value,svgRef:e.unref(ee),onClose:re},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"userConfig",{},void 0,!0),Ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,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:Y,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ot._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"ridgeline-div-title",...t.value.style.chart.title},subtitle:{cy:"ridgeline-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(ne)||e.unref(X))?(e.openBlock(),e.createBlock(Be.UserOptions,{ref:"details",key:`user_option_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(se),isImaging:e.unref(ie),uid:f.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:q.value,chartElement:r.value,position:t.value.userOptions.position,isTooltip:!1,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:j.value,style:e.normalizeStyle({visibility:e.unref(ne)?e.unref(X)?"visible":"hidden":"visible"}),onToggleFullscreen:Pe,onGeneratePdf:e.unref(ue),onGenerateCsv:ye,onGenerateImage:e.unref(ce),onToggleTable:pe,onToggleAnnotator:re},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","style","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":q.value,"vue-data-ui-fulscreen--off":!q.value}),viewBox:`0 0 ${m.value.width<=0?10:m.value.width} ${k.value.fullHeight<=0?10:k.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};${t.value.responsive?`height: ${v.value}px; width: 100%;`:""}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(l,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient-${l.id}-${f.value}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color,"stop-opacity":"1"},null,8,mt),e.createElementVNode("stop",{offset:"30%","stop-color":l.color,"stop-opacity":"0.7"},null,8,ft),e.createElementVNode("stop",{offset:"70%","stop-color":l.color,"stop-opacity":"0.3"},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":l.color,"stop-opacity":"0.1"},null,8,gt)],8,vt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`grad${o.id}`,id:`gradient-single-${f.value}-${o.uid}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color,"stop-opacity":"1"},null,8,kt),e.createElementVNode("stop",{offset:"30%","stop-color":o.color,"stop-opacity":"0.7"},null,8,xt),e.createElementVNode("stop",{offset:"70%","stop-color":o.color,"stop-opacity":"0.3"},null,8,bt),e.createElementVNode("stop",{offset:"100%","stop-color":o.color,"stop-opacity":"0.1"},null,8,wt)],8,yt))),128))],64))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",{key:`ds-${n}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("g",{key:o.id},[a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Ct,[e.createElementVNode("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{datapointIndex:n,seriesIndex:c,patternId:`pattern_${f.value}_${o.uid}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("path",{fill:a.$slots.pattern?`url(#pattern_${f.value}_${o.uid})`:t.value.style.chart.backgroundColor,stroke:"none","stroke-linecap":"round",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,style:e.normalizeStyle({opacity:t.value.style.chart.areas.opacity})},null,12,Bt),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.areas.stroke.useSerieColor?o.color:t.value.style.chart.areas.stroke.color,"stroke-width":t.value.style.chart.areas.strokeWidth,d:t.value.style.chart.areas.smooth?o.smoothPathRidge:o.straightPathRidge,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,Et),e.createElementVNode("path",{fill:t.value.style.chart.areas.useGradient?t.value.style.chart.areas.useCommonColor?`url(#gradient-${o.id}-${f.value})`:`url(#gradient-single-${f.value}-${o.uid})`:o.color,stroke:"none",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,St),t.value.style.chart.zeroLine.show?(e.openBlock(),e.createElementBlock("path",{key:1,stroke:t.value.style.chart.zeroLine.useSerieColor?o.color:t.value.style.chart.zeroLine.stroke,"stroke-dasharray":t.value.style.chart.zeroLine.strokeDasharray,"stroke-width":t.value.style.chart.zeroLine.strokeWidth,d:o.zeroPath,"stroke-linecap":"round"},null,8,$t)):e.createCommentVNode("",!0),t.value.style.chart.areas.maxPoint.show&&o.plots.length>1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(o.plots,x=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.isMaxPoint?(e.openBlock(),e.createElementBlock("line",{key:0,x1:x.x,y1:x.y,x2:x.x,y2:x.zero,stroke:t.value.style.chart.areas.maxPoint.adaptStrokeToBackground?e.unref(u.adaptColorToBackground)(o.color):t.value.style.chart.areas.maxPoint.stroke,"stroke-width":t.value.style.chart.areas.maxPoint.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.chart.areas.maxPoint.strokeDasharray},null,8,At)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),o.plots.length===1?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:o.plots[0].x,cy:o.plots[0].y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?o.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Nt)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("text",{x:l.label.x,y:l.label.y,"text-anchor":"end","font-size":t.value.style.chart.yAxis.labels.fontSize,"font-weight":t.value.style.chart.yAxis.labels.bold?"bold":"normal",fill:t.value.style.chart.yAxis.labels.color,style:e.normalizeStyle({cursor:t.value.style.chart.dialog.show?"pointer":"default"}),"text-decoration":t.value.style.chart.dialog.show&&(oe.value===n||i.value&&l.uid===i.value.uid)?"underline":"",onMouseenter:o=>De(n),onMouseleave:Oe,onClick:o=>Te(l)},e.toDisplayString(l.name),45,zt)]))),128)),t.value.style.chart.xAxis.labels.values.length?(e.openBlock(),e.createElementBlock("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>e.renderSlot(a.$slots,"time-label",e.mergeProps({ref_for:!0},{show:l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0,fontSize:t.value.style.chart.xAxis.labels.fontSize,content:l.label,textAnchor:t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",fill:t.value.style.chart.xAxis.labels.color,transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,x:l.selectorX,y:k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}),()=>[l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0?(e.openBlock(),e.createElementBlock("text",{key:0,"font-size":t.value.style.chart.xAxis.labels.fontSize,fill:t.value.style.chart.xAxis.labels.color,"font-weight":t.value.style.chart.xAxis.labels.bold?"bold":"normal",transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,"text-anchor":t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",style:e.normalizeStyle({opacity:h.value?h.value.index===n?1:.2:1})},e.toDisplayString(l.label),13,Mt)):e.createCommentVNode("",!0)],!0)),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,width:l.width<0?.1:l.width,height:l.height<0?.1:l.height,fill:"transparent",onMouseenter:o=>h.value=l,onMouseleave:s[0]||(s[0]=o=>h.value=null),onClick:()=>ze(l)},null,40,_t))),256)),t.value.style.chart.selector.show&&h.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:h.value.selectorX,x2:h.value.selectorX,y1:h.value.y,y2:h.value.y+h.value.height-y.value/2,stroke:t.value.style.chart.selector.stroke,"stroke-width":t.value.style.chart.selector.strokeWidth,"stroke-dasharray":t.value.style.chart.selector.strokeDasharray,"stroke-linecap":"round",style:{pointerEvents:"none"}},null,8,Vt)):e.createCommentVNode("",!0),h.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.plots,(o,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?n.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Pt)):e.createCommentVNode("",!0),h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("text",{key:1,x:ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?o.x-t.value.style.chart.selector.labels.fontSize/2:o.x+t.value.style.chart.selector.labels.fontSize/2,y:o.y+t.value.style.chart.selector.labels.fontSize/3,"text-anchor":ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?"end":"start","font-size":t.value.style.chart.selector.labels.fontSize,fill:t.value.style.chart.selector.labels.color,style:{pointerEvents:"none"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding}))),9,Tt)):e.createCommentVNode("",!0)],64))),256))],64))),256))],64))),256)):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"svg",{svg:m.value},void 0,!0)],14,ht)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(se)||e.unref(ie)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(at.default,{key:6,config:{type:"ridgeline",style:{backgroundColor:t.value.style.chart.backgroundColor,ridgeline:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(et.Legend,{key:`legend_${I.value}`,legendSet:ae.value,config:Ve.value,onClickMarker:s[1]||(s[1]=({legend:l})=>de(l.id))},e.createSlots({item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${S.value.includes(l.id)?.5:1}`),onClick:n=>l.segregate()},e.toDisplayString(l.name),13,Ot)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:n})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${n})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Ke.default,{key:8,hideDetails:"",config:{open:H.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ze.DataTable,{key:`table_${N.value}`,colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` :${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>H.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Ft)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,l,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:l,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.table.td.roundingValue}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0),t.value.style.chart.dialog.show?(e.openBlock(),e.createBlock(ct,{key:9,ref_key:"dialog",ref:d,onClose:s[3]||(s[3]=l=>i.value=null),backgroundColor:t.value.style.chart.dialog.backgroundColor,color:t.value.style.chart.dialog.color,headerBg:t.value.style.chart.dialog.header.backgroundColor,headerColor:t.value.style.chart.dialog.header.color},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.name),1)]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(rt.default,{key:0,config:me.value,dataset:fe.value},null,8,["config","dataset"])):e.createCommentVNode("",!0)]),_:1},8,["backgroundColor","color","headerBg","headerColor"])):e.createCommentVNode("",!0)],46,dt))}},Xt=$e._export_sfc(It,[["__scopeId","data-v-9c3affc2"]]);exports.default=Xt;