vue-data-ui 2.4.57 → 2.4.59

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 (202) hide show
  1. package/README.md +82 -51
  2. package/dist/{Arrow-BhwhLRcU.cjs → Arrow-Dudbi6k5.cjs} +1 -1
  3. package/dist/{Arrow-DelnKkT1.js → Arrow-DzS4HIXj.js} +1 -1
  4. package/dist/{BaseIcon-9gdEHMWK.js → BaseIcon-BbU81zOd.js} +1 -1
  5. package/dist/{BaseIcon-DujPvdJ_.cjs → BaseIcon-DD3GLrhS.cjs} +1 -1
  6. package/dist/{DataTable-BUflha5V.cjs → DataTable-BHCbVv8x.cjs} +1 -1
  7. package/dist/{DataTable-DgbrnD__.js → DataTable-CFUKU8PU.js} +2 -2
  8. package/dist/{Legend-V3K-4ipN.cjs → Legend-BYngLoV6.cjs} +1 -1
  9. package/dist/{Legend-HooNAKB_.js → Legend-f52bnttJ.js} +1 -1
  10. package/dist/{PackageVersion-S3SzpuwC.js → PackageVersion-C_FFs0BP.js} +1 -1
  11. package/dist/{PackageVersion-dQYEsTLp.cjs → PackageVersion-nr7f_VNw.cjs} +1 -1
  12. package/dist/{PenAndPaper-1h87IVla.cjs → PenAndPaper-C9v0NXEg.cjs} +1 -1
  13. package/dist/{PenAndPaper-v846FwcH.js → PenAndPaper-Dx24BtRW.js} +3 -3
  14. package/dist/{Shape-D7aacHaz.js → Shape-Ct2x6qZx.js} +1 -1
  15. package/dist/{Shape-DV5sH0dX.cjs → Shape-Dkt-vkTl.cjs} +1 -1
  16. package/dist/{Slicer-BRxR5OYL.cjs → Slicer-C0cvEMOy.cjs} +1 -1
  17. package/dist/{Slicer-BXCORSCz.js → Slicer-Duke9qno.js} +2 -2
  18. package/dist/{Title-B-EsW0Q2.cjs → Title-CpfNWbUc.cjs} +1 -1
  19. package/dist/{Title-DLjHHdyq.js → Title-zZtEcB9F.js} +1 -1
  20. package/dist/{Tooltip-BDaa-67h.js → Tooltip-DDJ2Wvjy.js} +1 -1
  21. package/dist/{Tooltip-B7gYRLGN.cjs → Tooltip-DZuVxmLc.cjs} +1 -1
  22. package/dist/documentation/installation.md +48 -48
  23. package/dist/{index-CI-N9klv.js → index-B9RAElpI.js} +2 -2
  24. package/dist/index-DaDv7p0W.cjs +9 -0
  25. package/dist/style.css +1 -1
  26. package/dist/{useNestedProp-D-zaZbSR.cjs → useNestedProp-DkpuL8Iv.cjs} +1 -1
  27. package/dist/{useNestedProp-D1eJ0dvv.js → useNestedProp-DuruL3Nt.js} +1 -1
  28. package/dist/{usePrinter-H2UFIe6n.cjs → usePrinter-BIHu0O5X.cjs} +1 -1
  29. package/dist/{usePrinter-CXc8xCKk.js → usePrinter-CwTAwqtF.js} +1 -1
  30. package/dist/{vue-data-ui-CvfX2D1d.cjs → vue-data-ui-BXCJgMfu.cjs} +1 -1
  31. package/dist/{vue-data-ui-DuXblXhF.js → vue-data-ui-yknmkfFy.js} +60 -60
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/{vue-ui-3d-bar-fvTVGk8O.js → vue-ui-3d-bar-BkbLoUhP.js} +170 -158
  35. package/dist/vue-ui-3d-bar-CHnh8ZH_.cjs +19 -0
  36. package/dist/{vue-ui-accordion-paZXh-GD.cjs → vue-ui-accordion-6Clt339w.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-CYLks1fW.js → vue-ui-accordion-rNA598L6.js} +3 -3
  38. package/dist/{vue-ui-age-pyramid-Ch3nY1Dx.js → vue-ui-age-pyramid-C3o5HfRK.js} +176 -164
  39. package/dist/vue-ui-age-pyramid-CKDDaRj_.cjs +1 -0
  40. package/dist/{vue-ui-annotator-BXbLcJ1L.cjs → vue-ui-annotator-BLilhXfT.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-DGupSF-o.js → vue-ui-annotator-huMOA-QF.js} +1 -1
  42. package/dist/{vue-ui-bullet-BSRXabBe.js → vue-ui-bullet-DxYdog9c.js} +155 -143
  43. package/dist/vue-ui-bullet-yTpejKsw.cjs +34 -0
  44. package/dist/{vue-ui-candlestick-Dww4XHwQ.js → vue-ui-candlestick-3lCgRxr0.js} +96 -84
  45. package/dist/vue-ui-candlestick-CmD40PpS.cjs +2 -0
  46. package/dist/vue-ui-carousel-table-BU8oAq6b.cjs +1 -0
  47. package/dist/{vue-ui-carousel-table-BZs-sxxu.js → vue-ui-carousel-table-D3JIrHMF.js} +97 -95
  48. package/dist/vue-ui-chestnut-BWRUxwWm.cjs +6 -0
  49. package/dist/{vue-ui-chestnut-CnupXXAM.js → vue-ui-chestnut-cWFqbqSU.js} +160 -148
  50. package/dist/{vue-ui-cursor-oqfOA98Q.js → vue-ui-cursor-DjWkFQEI.js} +2 -2
  51. package/dist/{vue-ui-cursor-smlBNiGG.cjs → vue-ui-cursor-DzJmB5h9.cjs} +1 -1
  52. package/dist/{vue-ui-dashboard-BNu7yNYm.js → vue-ui-dashboard-1dycrMNM.js} +2 -2
  53. package/dist/{vue-ui-dashboard-Dw_90R29.cjs → vue-ui-dashboard-BOjdgUEm.cjs} +1 -1
  54. package/dist/{vue-ui-digits-_8FbgFrI.cjs → vue-ui-digits-B8TVsqsB.cjs} +1 -1
  55. package/dist/{vue-ui-digits-qztPrOEN.js → vue-ui-digits-C4NWhIjg.js} +2 -2
  56. package/dist/vue-ui-donut-BPz8gXi5.cjs +1 -0
  57. package/dist/{vue-ui-donut-CK9dINFS.js → vue-ui-donut-CXBxDUoh.js} +291 -279
  58. package/dist/{vue-ui-donut-evolution-DpDpYw3f.js → vue-ui-donut-evolution-BgD7rCFk.js} +285 -273
  59. package/dist/vue-ui-donut-evolution-h3ZgYI48.cjs +1 -0
  60. package/dist/vue-ui-dumbbell-BCyFd1Lf.cjs +9 -0
  61. package/dist/{vue-ui-dumbbell-Dx1I89N9.js → vue-ui-dumbbell-DMp-Waih.js} +159 -147
  62. package/dist/{vue-ui-flow-DJNqydD1.js → vue-ui-flow-D-XBMcpC.js} +162 -150
  63. package/dist/vue-ui-flow-DB3_5wEr.cjs +1 -0
  64. package/dist/vue-ui-funnel-DJVmn_pN.cjs +1 -0
  65. package/dist/{vue-ui-funnel-mP8ftcS5.js → vue-ui-funnel-Dxb6o97C.js} +229 -215
  66. package/dist/{vue-ui-galaxy-3cOLS6lh.js → vue-ui-galaxy-C2eHqbLw.js} +148 -136
  67. package/dist/vue-ui-galaxy-CIBBO623.cjs +1 -0
  68. package/dist/{vue-ui-gauge-CN_zo833.js → vue-ui-gauge-B9M8ICMX.js} +199 -185
  69. package/dist/vue-ui-gauge-C_JArbcd.cjs +1 -0
  70. package/dist/vue-ui-gizmo-ETKRu3P5.cjs +1 -0
  71. package/dist/{vue-ui-gizmo-akkNcCWf.js → vue-ui-gizmo-OGIvFCA4.js} +45 -43
  72. package/dist/{vue-ui-heatmap-B3ClLioV.js → vue-ui-heatmap-C2BobYAF.js} +138 -126
  73. package/dist/vue-ui-heatmap-mPZepJ4V.cjs +1 -0
  74. package/dist/{vue-ui-history-plot-C-EqVFW-.js → vue-ui-history-plot-BtBDW5ha.js} +127 -115
  75. package/dist/vue-ui-history-plot-DgEFbRv3.cjs +1 -0
  76. package/dist/{vue-ui-kpi-C-axCKZx.js → vue-ui-kpi-BCwmp6i5.js} +36 -33
  77. package/dist/vue-ui-kpi-DZGoUp6y.cjs +1 -0
  78. package/dist/{vue-ui-mini-loader-Cal5W_q6.cjs → vue-ui-mini-loader-B_I1k10C.cjs} +1 -1
  79. package/dist/{vue-ui-mini-loader-CsZ1zxJz.js → vue-ui-mini-loader-DWQfo-Ey.js} +2 -2
  80. package/dist/{vue-ui-molecule-BvNh7REY.js → vue-ui-molecule-CpWWvLlc.js} +212 -200
  81. package/dist/vue-ui-molecule-CqHsa4N7.cjs +1 -0
  82. package/dist/{vue-ui-mood-radar-C7v4dBNw.js → vue-ui-mood-radar-B4-AQAyE.js} +123 -111
  83. package/dist/vue-ui-mood-radar-Dx6ICJkv.cjs +1 -0
  84. package/dist/{vue-ui-nested-donuts-C08kpvMd.js → vue-ui-nested-donuts-C-afzEvx.js} +156 -144
  85. package/dist/vue-ui-nested-donuts-C8LG5ony.cjs +17 -0
  86. package/dist/vue-ui-onion-KC_zqQyz.cjs +5 -0
  87. package/dist/{vue-ui-onion-CTLBemDj.js → vue-ui-onion-wBz5dln6.js} +125 -113
  88. package/dist/vue-ui-parallel-coordinate-plot-BK1sUOyd.cjs +8 -0
  89. package/dist/{vue-ui-parallel-coordinate-plot-H1FdP6AE.js → vue-ui-parallel-coordinate-plot-BoiKoaod.js} +159 -147
  90. package/dist/vue-ui-quadrant-BJ3gSVgF.cjs +1 -0
  91. package/dist/{vue-ui-quadrant-Dd-LDy4T.js → vue-ui-quadrant-DY6yUyOl.js} +211 -199
  92. package/dist/{vue-ui-quick-chart-BeNivWrg.js → vue-ui-quick-chart-DBH9CgBI.js} +576 -540
  93. package/dist/vue-ui-quick-chart-OHwPApk1.cjs +15 -0
  94. package/dist/{vue-ui-radar-D9U_vOad.js → vue-ui-radar-DYnmlHtt.js} +183 -171
  95. package/dist/vue-ui-radar-nhy4Pqtc.cjs +1 -0
  96. package/dist/{vue-ui-rating-B7AlAqCY.js → vue-ui-rating-3LUgui--.js} +102 -98
  97. package/dist/vue-ui-rating-wl5jkxb5.cjs +1 -0
  98. package/dist/vue-ui-relation-circle-CGkAsJl8.cjs +1 -0
  99. package/dist/{vue-ui-relation-circle-CT23BNcW.js → vue-ui-relation-circle-Da09K_Ce.js} +129 -117
  100. package/dist/{vue-ui-rings-BZ7FYYxr.js → vue-ui-rings-BuVPBXNc.js} +150 -138
  101. package/dist/vue-ui-rings-DZfhibc4.cjs +2 -0
  102. package/dist/{vue-ui-scatter-DMr8OrC3.js → vue-ui-scatter-Bee79rib.js} +320 -308
  103. package/dist/vue-ui-scatter-ChYAlXb_.cjs +1 -0
  104. package/dist/{vue-ui-screenshot-BFV1qEsF.cjs → vue-ui-screenshot-Blz4fiO2.cjs} +1 -1
  105. package/dist/{vue-ui-screenshot-DHiX35pR.js → vue-ui-screenshot-CCnAaGB3.js} +1 -1
  106. package/dist/{vue-ui-skeleton-BIWgLDDf.cjs → vue-ui-skeleton-B24XJJ2p.cjs} +1 -1
  107. package/dist/{vue-ui-skeleton-owIhXtQF.js → vue-ui-skeleton-DVYD_VSe.js} +3 -3
  108. package/dist/vue-ui-smiley-CXOuAdIj.cjs +2 -0
  109. package/dist/{vue-ui-smiley-CCOQ6zjo.js → vue-ui-smiley-CdrTI5Rh.js} +208 -206
  110. package/dist/vue-ui-spark-trend-B08HYMm5.cjs +1 -0
  111. package/dist/{vue-ui-spark-trend-B56DI3Mc.js → vue-ui-spark-trend-Pd3JNy4G.js} +124 -112
  112. package/dist/{vue-ui-sparkbar-CMkozDkx.js → vue-ui-sparkbar-CTDWiUid.js} +100 -96
  113. package/dist/vue-ui-sparkbar-Dq1hwL7i.cjs +1 -0
  114. package/dist/{vue-ui-sparkgauge-De06LRPj.js → vue-ui-sparkgauge-g0C7wuIH.js} +60 -48
  115. package/dist/vue-ui-sparkgauge-il4rmDdv.cjs +1 -0
  116. package/dist/vue-ui-sparkhistogram-CoRPiLpB.cjs +1 -0
  117. package/dist/{vue-ui-sparkhistogram-CBDd7jIn.js → vue-ui-sparkhistogram-Dk8IYZGB.js} +116 -104
  118. package/dist/vue-ui-sparkline-B_1J2ft2.cjs +1 -0
  119. package/dist/{vue-ui-sparkline-BJejWvTN.js → vue-ui-sparkline-Ca1ai-Mq.js} +124 -112
  120. package/dist/{vue-ui-sparkstackbar-DlnmPom2.js → vue-ui-sparkstackbar-CRGrf5y2.js} +85 -81
  121. package/dist/vue-ui-sparkstackbar-tkiKbZHo.cjs +1 -0
  122. package/dist/{vue-ui-stackbar-19XdLQXB.js → vue-ui-stackbar-QaavE5-F.js} +219 -207
  123. package/dist/vue-ui-stackbar-zk1K5gP3.cjs +6 -0
  124. package/dist/vue-ui-strip-plot-8Ksp5AzD.cjs +1 -0
  125. package/dist/{vue-ui-strip-plot-Bly8GoNP.js → vue-ui-strip-plot-gm_lr5A9.js} +113 -101
  126. package/dist/{vue-ui-table-BisPh85-.cjs → vue-ui-table-CPLd7hXM.cjs} +1 -1
  127. package/dist/{vue-ui-table-BUF6Pyfp.js → vue-ui-table-ceYZ6Wzd.js} +1 -1
  128. package/dist/vue-ui-table-heatmap-CSsYOFf7.cjs +1 -0
  129. package/dist/{vue-ui-table-heatmap-By-MmFiq.js → vue-ui-table-heatmap-CWQIOR58.js} +82 -78
  130. package/dist/{vue-ui-table-sparkline-DG70UNkU.js → vue-ui-table-sparkline-BHkqm0Sf.js} +78 -74
  131. package/dist/vue-ui-table-sparkline-hyL_92AC.cjs +1 -0
  132. package/dist/vue-ui-thermometer-CKiohIHn.cjs +1 -0
  133. package/dist/{vue-ui-thermometer-Vr2IP_p0.js → vue-ui-thermometer-Dvk3S7jR.js} +132 -120
  134. package/dist/vue-ui-timer-BUuk2p4C.cjs +64 -0
  135. package/dist/{vue-ui-timer-CD7gFOjN.js → vue-ui-timer-D0tGj6hK.js} +94 -82
  136. package/dist/{vue-ui-tiremarks-44pO3jx1.js → vue-ui-tiremarks-C2G0Sem6.js} +104 -94
  137. package/dist/vue-ui-tiremarks-Csng3xWI.cjs +1 -0
  138. package/dist/{vue-ui-treemap-CyOUM3-P.js → vue-ui-treemap-3iutCx61.js} +336 -332
  139. package/dist/vue-ui-treemap-CJjATl47.cjs +1 -0
  140. package/dist/{vue-ui-vertical-bar-wngOp0Zc.js → vue-ui-vertical-bar-DZz_tUTV.js} +188 -176
  141. package/dist/vue-ui-vertical-bar-DtuEIajX.cjs +4 -0
  142. package/dist/vue-ui-waffle-B-Uf38ml.cjs +1 -0
  143. package/dist/{vue-ui-waffle-CuN7i0ci.js → vue-ui-waffle-Cr4FGNwb.js} +140 -136
  144. package/dist/vue-ui-wheel-Bijmdum9.cjs +1 -0
  145. package/dist/{vue-ui-wheel-B_gLugLx.js → vue-ui-wheel-Da4DH062.js} +100 -88
  146. package/dist/{vue-ui-word-cloud-DKHGS0my.js → vue-ui-word-cloud-C3o4JBD2.js} +132 -120
  147. package/dist/vue-ui-word-cloud-Cjyh1I0J.cjs +1 -0
  148. package/dist/{vue-ui-xy-BK9R8MrJ.js → vue-ui-xy-BX_3ddck.js} +139 -127
  149. package/dist/{vue-ui-xy-canvas-DaT4HoWD.js → vue-ui-xy-canvas-DqzVCtbZ.js} +231 -227
  150. package/dist/{vue-ui-xy-canvas-gDaRsnBI.cjs → vue-ui-xy-canvas-ObtOgMlV.cjs} +2 -2
  151. package/dist/vue-ui-xy-gClSSwyU.cjs +3 -0
  152. package/package.json +1 -1
  153. package/dist/index-o6tXRhOr.cjs +0 -9
  154. package/dist/vue-ui-3d-bar-zKUnnMOY.cjs +0 -19
  155. package/dist/vue-ui-age-pyramid-Bg8Bexac.cjs +0 -1
  156. package/dist/vue-ui-bullet-DqM9h81O.cjs +0 -34
  157. package/dist/vue-ui-candlestick-C0PkovyK.cjs +0 -2
  158. package/dist/vue-ui-carousel-table-DbXCpYUm.cjs +0 -1
  159. package/dist/vue-ui-chestnut-Be4Lagdr.cjs +0 -6
  160. package/dist/vue-ui-donut-B7orj3vV.cjs +0 -1
  161. package/dist/vue-ui-donut-evolution-BmTzjKlH.cjs +0 -1
  162. package/dist/vue-ui-dumbbell-5yfcA-Of.cjs +0 -9
  163. package/dist/vue-ui-flow-Bar7LG9t.cjs +0 -1
  164. package/dist/vue-ui-funnel-lxHehCUr.cjs +0 -1
  165. package/dist/vue-ui-galaxy-B8zbGikp.cjs +0 -1
  166. package/dist/vue-ui-gauge-Bz1nzveF.cjs +0 -1
  167. package/dist/vue-ui-gizmo-C9XQ-7Sj.cjs +0 -1
  168. package/dist/vue-ui-heatmap-BW6dmp8j.cjs +0 -1
  169. package/dist/vue-ui-history-plot-Mp0zDeR-.cjs +0 -1
  170. package/dist/vue-ui-kpi-D8hh3p8f.cjs +0 -1
  171. package/dist/vue-ui-molecule-RkdIX-iW.cjs +0 -1
  172. package/dist/vue-ui-mood-radar-DLpDoq0G.cjs +0 -1
  173. package/dist/vue-ui-nested-donuts-BO249_PV.cjs +0 -17
  174. package/dist/vue-ui-onion-BjNQgHPX.cjs +0 -5
  175. package/dist/vue-ui-parallel-coordinate-plot-CoeVi-98.cjs +0 -8
  176. package/dist/vue-ui-quadrant-D701bdNz.cjs +0 -1
  177. package/dist/vue-ui-quick-chart-CRNEkxoM.cjs +0 -15
  178. package/dist/vue-ui-radar-3W9NRklj.cjs +0 -1
  179. package/dist/vue-ui-rating-DeuaL_cU.cjs +0 -1
  180. package/dist/vue-ui-relation-circle-B8JtK-JM.cjs +0 -1
  181. package/dist/vue-ui-rings-CZCTLghE.cjs +0 -2
  182. package/dist/vue-ui-scatter-DlA0xU5U.cjs +0 -1
  183. package/dist/vue-ui-smiley-BISneB7t.cjs +0 -2
  184. package/dist/vue-ui-spark-trend-lMzod-5S.cjs +0 -1
  185. package/dist/vue-ui-sparkbar-DcdDLl8l.cjs +0 -1
  186. package/dist/vue-ui-sparkgauge-BhwNRzrD.cjs +0 -1
  187. package/dist/vue-ui-sparkhistogram-D00ahrgs.cjs +0 -1
  188. package/dist/vue-ui-sparkline-CY92qVz0.cjs +0 -1
  189. package/dist/vue-ui-sparkstackbar-BjKL_6dq.cjs +0 -1
  190. package/dist/vue-ui-stackbar-T4VBFpDo.cjs +0 -6
  191. package/dist/vue-ui-strip-plot-CtjbMamo.cjs +0 -1
  192. package/dist/vue-ui-table-heatmap-CPn-jC0n.cjs +0 -1
  193. package/dist/vue-ui-table-sparkline-CIDuWZZs.cjs +0 -1
  194. package/dist/vue-ui-thermometer-CMvk1D7J.cjs +0 -1
  195. package/dist/vue-ui-timer-CUHgN89f.cjs +0 -64
  196. package/dist/vue-ui-tiremarks-w_gxHFeB.cjs +0 -1
  197. package/dist/vue-ui-treemap-CFhTEaxa.cjs +0 -1
  198. package/dist/vue-ui-vertical-bar-C51RKLB8.cjs +0 -4
  199. package/dist/vue-ui-waffle-CXZc4t27.cjs +0 -1
  200. package/dist/vue-ui-wheel-u9Vc7ZTZ.cjs +0 -1
  201. package/dist/vue-ui-word-cloud-tSXyXvd6.cjs +0 -1
  202. package/dist/vue-ui-xy-bX3g4COC.cjs +0 -3
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DaDv7p0W.cjs"),ne=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-CpfNWbUc.cjs"),ue=require("./usePrinter-BIHu0O5X.cjs"),Be=require("./Tooltip-DZuVxmLc.cjs"),Pe=require("./vue-ui-sparkbar-Dq1hwL7i.cjs"),_e=require("./Legend-BYngLoV6.cjs"),$e=require("./DataTable-BHCbVv8x.cjs"),xe=require("./vue-ui-skeleton-B24XJJ2p.cjs"),Ne=require("./vue-ui-accordion-6Clt339w.cjs"),se=require("./useNestedProp-DkpuL8Iv.cjs"),Te=require("./PackageVersion-nr7f_VNw.cjs"),Se=require("./PenAndPaper-C9v0NXEg.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ae=["xmlns","viewBox"],Fe=["width","height"],Le=["id"],ze=["stop-color"],Ie=["stop-color"],Re={key:1},qe=["x1","y1","x2","y2","stroke","stroke-width"],Me={key:0},Ue=["d","stroke","stroke-width"],De=["d","stroke","stroke-width"],Ge={key:2},We=["x","y","text-anchor","font-size","fill","onMouseenter"],He=["points","stroke","stroke-width"],je=["points","stroke","stroke-width","fill"],Xe={key:3},Ye=["cx","cy","fill","r","stroke"],Je={key:5,class:"vue-data-ui-watermark"},Ke=["onClick"],Qe={key:0,style:{"max-width":"200px",margin:"0 auto"}},Ze={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const d=ie,{vue_ui_radar:ve}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),m=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:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ee.useUserOptionState({config:t.value});function H(){const o=se.useNestedProp({userConfig:d.config,defaultConfig:ve});return o.theme?{...se.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=H(),T.value=!t.value.showOnChartHover,j(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function j(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ne.throttle(()=>{const{width:a,height:l}=ne.useResponsive({chart:m.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});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(m.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:X,isImaging:Y,generatePdf:J,generateImage:K}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),he=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ge=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,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}}})),s=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function Z(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),de("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function fe(){return k.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)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(s.value.width,s.value.height)/3),oe=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:S.value,sides:te.value,rotation:0})),me=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(()=>oe.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ye({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||ee.value)}));return{...o,...p.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ye({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||ee.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>Z(l),isSegregated:i.value.includes(l)}))}),ke=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:""},...k.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((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/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 be(o,a){V.value=[],_.value=a,x.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.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:p.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.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 u=0;u<o.values.length;u+=1)i.value.includes(u)||V.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ae(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,tt)=>[c.name,c.target,...c.values.flatMap(F=>[F,isNaN(F/c.target)?"":F/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function Ce(o){b.value=o,L.value+=1}function le(){h.value.showTable=!h.value.showTable}function re(){h.value.showTooltip=!h.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ce({getData:fe,generatePdf:J,generateCsv:ae,generateImage:K,toggleTable:le,toggleTooltip:re,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:m,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(Se.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),he.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(we._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&&C.value&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(X),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:b.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(J),onGenerateCsv:ae,onGenerateImage:e.unref(K),onToggleTable:le,onToggleTooltip:re,onToggleAnnotator:A,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}: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:"5"}: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:"6"}: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),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:s.value.width<=0?10:s.value.width,height:s.value.height<=0?10:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Fe)):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,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ie)],8,Le))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.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,qe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:te.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,Ue))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:oe.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,De),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ge,[(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:u=>be(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,_.value=null})},e.toDisplayString(l.name),41,We))),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,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.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":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,He)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.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":y.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",Xe,[(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,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.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":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,Ye))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),C.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(_e.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ke.value,onClickMarker:a[1]||(a[1]=({i:l})=>Z(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>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,Ke)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.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(Be._sfc_main,{show:h.value.showTooltip&&x.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:m.value,content:N.value,isFullscreen:b.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",Qe,[e.createVNode(Pe.default,{dataset:V.value,config:ge.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),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"]),C.value?(e.openBlock(),e.createBlock(Ne.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($e.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=>h.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,Oe))}},et=Ve._export_sfc(Ze,[["__scopeId","data-v-af16c964"]]);exports.default=et;
@@ -1,12 +1,12 @@
1
- import { ref as h, computed as x, watch as U, onMounted as K, openBlock as a, createElementBlock as i, normalizeStyle as o, createElementVNode as r, toDisplayString as g, createCommentVNode as d, unref as s, Fragment as T, renderList as H, withKeys as P } from "vue";
2
- import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-CI-N9klv.js";
3
- import { u as Z } from "./useNestedProp-D1eJ0dvv.js";
4
- import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const et = {
1
+ import { ref as h, useSlots as T, onMounted as R, computed as x, watch as H, openBlock as a, createElementBlock as o, normalizeStyle as i, createElementVNode as r, toDisplayString as g, createCommentVNode as y, unref as s, Fragment as P, renderList as W, withKeys as q } from "vue";
2
+ import { u as J, c as Q, o as Z, e as tt, i as $, f as b, X as k, w as F, V as X } from "./index-B9RAElpI.js";
3
+ import { u as et } from "./useNestedProp-DuruL3Nt.js";
4
+ import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const at = {
6
6
  key: 0,
7
7
  class: "vue-ui-rating-title",
8
8
  style: { width: "100%" }
9
- }, lt = ["src", "height", "width"], at = ["xmlns", "height", "width"], it = ["id"], ot = ["stop-color"], st = ["stop-color"], nt = ["points", "fill", "stroke", "stroke-width"], rt = ["src", "alt", "height", "width", "id"], ut = ["xmlns", "viewBox", "height", "id"], vt = ["id"], yt = ["stop-color"], dt = ["stop-color"], pt = ["points", "fill", "stroke"], gt = ["xmlns", "height"], ct = ["onClick", "onMouseenter", "onKeyup"], ft = ["onMouseenter"], mt = {
9
+ }, ot = ["src", "height", "width"], it = ["xmlns", "height", "width"], st = ["id"], nt = ["stop-color"], rt = ["stop-color"], ut = ["points", "fill", "stroke", "stroke-width"], vt = ["src", "alt", "height", "width", "id"], dt = ["xmlns", "viewBox", "height", "id"], yt = ["id"], pt = ["stop-color"], gt = ["stop-color"], ct = ["points", "fill", "stroke"], ft = ["xmlns", "height"], mt = ["onClick", "onMouseenter", "onKeyup"], ht = ["onMouseenter"], xt = {
10
10
  __name: "vue-ui-rating",
11
11
  props: {
12
12
  config: {
@@ -23,45 +23,49 @@ const et = {
23
23
  }
24
24
  },
25
25
  emits: ["rate"],
26
- setup(X, { expose: j, emit: B }) {
27
- const u = X, { vue_ui_rating: I } = W(), m = h(q()), z = h(!1), y = h(void 0), b = h([]), t = x({
26
+ setup(j, { expose: B, emit: I }) {
27
+ const u = j, { vue_ui_rating: Y } = J(), m = h(Q()), z = h(!1), d = h(void 0), _ = h([]), G = T();
28
+ R(() => {
29
+ G["chart-background"] && console.warn("VueUiRating does not support the #chart-background slot.");
30
+ });
31
+ const t = x({
28
32
  get: () => C(),
29
33
  set: (l) => l
30
34
  });
31
35
  function C() {
32
- return Z({
36
+ return et({
33
37
  userConfig: u.config,
34
- defaultConfig: I
38
+ defaultConfig: Y
35
39
  });
36
40
  }
37
- U(() => u.config, (l) => {
41
+ H(() => u.config, (l) => {
38
42
  t.value = C(), M();
39
43
  }, { deep: !0 });
40
- const Y = x(() => typeof u.dataset.rating == "object" && !Array.isArray(u.dataset.rating) ? L(u.dataset.rating) : u.dataset.rating), G = x(() => typeof u.dataset.rating == "object" && !Array.isArray(u.dataset.rating)), v = h(Y.value), S = x(() => t.value.type === "image"), c = x(() => t.value.readonly);
41
- function L(l) {
44
+ const L = x(() => typeof u.dataset.rating == "object" && !Array.isArray(u.dataset.rating) ? U(u.dataset.rating) : u.dataset.rating), O = x(() => typeof u.dataset.rating == "object" && !Array.isArray(u.dataset.rating)), v = h(L.value), S = x(() => t.value.type === "image"), c = x(() => t.value.readonly);
45
+ function U(l) {
42
46
  let n = 0, e = 0;
43
47
  for (const p in l) {
44
- const E = parseInt(p), A = l[p];
45
- n += E * A, e += A;
48
+ const K = parseInt(p), A = l[p];
49
+ n += K * A, e += A;
46
50
  }
47
51
  if (e === 0)
48
52
  return 0;
49
53
  const f = n / e;
50
54
  return Math.min(t.value.to, Math.max(t.value.from, f));
51
55
  }
52
- K(() => {
56
+ R(() => {
53
57
  M();
54
58
  });
55
59
  function M() {
56
- J(u.dataset) && Q({
60
+ Z(u.dataset) && tt({
57
61
  componentName: "VueUiRating",
58
62
  type: "dataset"
59
- }), b.value = [];
63
+ }), _.value = [];
60
64
  for (let l = t.value.from; l <= t.value.to; l += 1)
61
- b.value.push(l);
65
+ _.value.push(l);
62
66
  }
63
67
  function w(l, n = !1) {
64
- return l > y.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_${m.value})` : t.value.style.star.activeColor;
68
+ return l > d.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_${m.value})` : t.value.style.star.activeColor;
65
69
  }
66
70
  function N(l, n = !1) {
67
71
  const e = v.value - l, f = n ? 1 : 100;
@@ -75,74 +79,74 @@ const et = {
75
79
  }
76
80
  }
77
81
  function V(l) {
78
- c.value || (v.value = l, B("rate", l));
82
+ c.value || (v.value = l, I("rate", l));
79
83
  }
80
- function O() {
84
+ function D() {
81
85
  return v.value;
82
86
  }
83
- function D(l = !0) {
87
+ function E(l = !0) {
84
88
  c.value = l;
85
89
  }
86
- return j({
87
- getData: O,
88
- toggleReadonly: D
89
- }), (l, n) => (a(), i("div", {
90
- style: o(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),
90
+ return B({
91
+ getData: D,
92
+ toggleReadonly: E
93
+ }), (l, n) => (a(), o("div", {
94
+ style: i(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),
91
95
  class: "vue-ui-rating",
92
96
  onMouseover: n[2] || (n[2] = (e) => z.value = !0),
93
97
  onMouseleave: n[3] || (n[3] = (e) => {
94
- z.value = !1, y.value = void 0;
98
+ z.value = !1, d.value = void 0;
95
99
  })
96
100
  }, [
97
- t.value.style.title.text ? (a(), i("div", et, [
101
+ t.value.style.title.text ? (a(), o("div", at, [
98
102
  r("div", {
99
- style: o(`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`)
103
+ style: i(`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`)
100
104
  }, g(t.value.style.title.text), 5),
101
- t.value.style.title.subtitle.text ? (a(), i("div", {
105
+ t.value.style.title.subtitle.text ? (a(), o("div", {
102
106
  key: 0,
103
- style: o(`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"}`)
104
- }, g(t.value.style.title.subtitle.text), 5)) : d("", !0)
105
- ])) : d("", !0),
106
- t.value.style.rating.show && t.value.style.rating.position === "top" ? (a(), i("div", {
107
+ style: i(`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"}`)
108
+ }, g(t.value.style.title.subtitle.text), 5)) : y("", !0)
109
+ ])) : y("", !0),
110
+ t.value.style.rating.show && t.value.style.rating.position === "top" ? (a(), o("div", {
107
111
  key: 1,
108
- style: o(`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`)
112
+ style: i(`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`)
109
113
  }, g(s($)(
110
114
  t.value.style.rating.formatter,
111
115
  v.value,
112
- s(_)({
116
+ s(b)({
113
117
  v: v.value,
114
118
  r: t.value.style.rating.roundingValue
115
119
  }),
116
120
  t.value
117
- )), 5)) : d("", !0),
121
+ )), 5)) : y("", !0),
118
122
  r("div", {
119
123
  class: "vue-ui-rating-wrapper",
120
- style: o(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)
124
+ style: i(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)
121
125
  }, [
122
- t.value.style.rating.show && t.value.style.rating.position === "left" ? (a(), i("div", {
126
+ t.value.style.rating.show && t.value.style.rating.position === "left" ? (a(), o("div", {
123
127
  key: 0,
124
- style: o(`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`)
128
+ style: i(`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`)
125
129
  }, g(s($)(
126
130
  t.value.style.rating.formatter,
127
131
  v.value,
128
- s(_)({
132
+ s(b)({
129
133
  v: v.value,
130
134
  r: t.value.style.rating.roundingValue
131
135
  }),
132
136
  t.value
133
- )), 5)) : d("", !0),
134
- (a(!0), i(T, null, H(b.value, (e, f) => (a(), i("div", {
137
+ )), 5)) : y("", !0),
138
+ (a(!0), o(P, null, W(_.value, (e, f) => (a(), o("div", {
135
139
  class: "vue-ui-rating-unit-container",
136
- style: o(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)
140
+ style: i(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)
137
141
  }, [
138
- S.value ? (a(), i("img", {
142
+ S.value ? (a(), o("img", {
139
143
  key: 0,
140
144
  src: t.value.style.image.src,
141
145
  height: t.value.style.itemSize,
142
146
  width: t.value.style.itemSize,
143
147
  class: "vue-ui-rating-unit",
144
- style: o(`position:absolute;top:0;left:0;opacity:${isNaN(y.value) ? t.value.style.image.inactiveOpacity : w(e, !0)}`)
145
- }, null, 12, lt)) : (a(), i("svg", {
148
+ style: i(`position:absolute;top:0;left:0;opacity:${isNaN(d.value) ? t.value.style.image.inactiveOpacity : w(e, !0)}`)
149
+ }, null, 12, ot)) : (a(), o("svg", {
146
150
  key: 1,
147
151
  xmlns: s(k),
148
152
  viewBox: "0 0 100 100",
@@ -161,28 +165,28 @@ const et = {
161
165
  }, [
162
166
  r("stop", {
163
167
  offset: "0%",
164
- "stop-color": `${s(R)(t.value.style.star.activeColor, 0.05)}`
165
- }, null, 8, ot),
168
+ "stop-color": `${s(F)(t.value.style.star.activeColor, 0.05)}`
169
+ }, null, 8, nt),
166
170
  r("stop", {
167
171
  offset: "100%",
168
172
  "stop-color": t.value.style.star.activeColor
169
- }, null, 8, st)
170
- ], 8, it)
173
+ }, null, 8, rt)
174
+ ], 8, st)
171
175
  ]),
172
176
  r("polygon", {
173
- points: s(F)({
177
+ points: s(X)({
174
178
  plot: { x: 50, y: 50 },
175
179
  radius: 30,
176
180
  apexes: t.value.style.star.apexes
177
181
  }),
178
- fill: isNaN(y.value) ? t.value.style.star.inactiveColor : w(e),
179
- stroke: t.value.style.star.borderColor ? t.value.style.star.borderColor : y.value ? w(e) : t.value.style.star.inactiveColor,
182
+ fill: isNaN(d.value) ? t.value.style.star.inactiveColor : w(e),
183
+ stroke: t.value.style.star.borderColor ? t.value.style.star.borderColor : d.value ? w(e) : t.value.style.star.inactiveColor,
180
184
  "stroke-width": t.value.style.star.borderWidth,
181
185
  "stroke-linecap": "round",
182
186
  "stroke-linejoin": "round"
183
- }, null, 8, nt)
184
- ], 8, at)),
185
- S.value ? (a(), i("img", {
187
+ }, null, 8, ut)
188
+ ], 8, it)),
189
+ S.value ? (a(), o("img", {
186
190
  key: 2,
187
191
  src: t.value.style.image.src,
188
192
  alt: `${t.value.style.image.alt} ${e}`,
@@ -190,8 +194,8 @@ const et = {
190
194
  width: t.value.style.itemSize,
191
195
  id: `active_${m.value}_${e}`,
192
196
  class: "vue-ui-rating-unit",
193
- style: o(`position:absolute;top:0;left:0;clip:rect(0px,${N(f, !0) * t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)
194
- }, null, 12, rt)) : (a(), i("svg", {
197
+ style: i(`position:absolute;top:0;left:0;clip:rect(0px,${N(f, !0) * t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)
198
+ }, null, 12, vt)) : (a(), o("svg", {
195
199
  key: 3,
196
200
  xmlns: s(k),
197
201
  viewBox: `0 0 ${N(f)} 100`,
@@ -211,32 +215,32 @@ const et = {
211
215
  }, [
212
216
  r("stop", {
213
217
  offset: "0%",
214
- "stop-color": `${s(R)(t.value.style.star.activeColor, 0.05)}`
215
- }, null, 8, yt),
218
+ "stop-color": `${s(F)(t.value.style.star.activeColor, 0.05)}`
219
+ }, null, 8, pt),
216
220
  r("stop", {
217
221
  offset: "100%",
218
222
  "stop-color": t.value.style.star.activeColor
219
- }, null, 8, dt)
220
- ], 8, vt)
223
+ }, null, 8, gt)
224
+ ], 8, yt)
221
225
  ]),
222
226
  r("polygon", {
223
- points: s(F)({
227
+ points: s(X)({
224
228
  plot: { x: 50, y: 50 },
225
229
  radius: 30,
226
230
  apexes: t.value.style.star.apexes
227
231
  }),
228
232
  fill: t.value.style.star.useGradient ? `url(#star_gradient_over_${m.value})` : t.value.style.star.activeColor,
229
233
  stroke: t.value.style.star.activeColor
230
- }, null, 8, pt)
231
- ], 8, ut)),
232
- (a(), i("svg", {
234
+ }, null, 8, ct)
235
+ ], 8, dt)),
236
+ (a(), o("svg", {
233
237
  xmlns: s(k),
234
238
  viewBox: "0 0 100 100",
235
239
  height: t.value.style.itemSize,
236
240
  class: "vue-ui-rating-unit",
237
- style: o(`position:absolute;top:0;left:0;${c.value ? "" : "cursor:pointer"}`)
241
+ style: i(`position:absolute;top:0;left:0;${c.value ? "" : "cursor:pointer"}`)
238
242
  }, [
239
- c.value ? d("", !0) : (a(), i("rect", {
243
+ c.value ? y("", !0) : (a(), o("rect", {
240
244
  key: 0,
241
245
  class: "vue-ui-rating-mouse-trap",
242
246
  x: 0,
@@ -245,12 +249,12 @@ const et = {
245
249
  height: 100,
246
250
  fill: "transparent",
247
251
  onClick: (p) => V(e),
248
- onMouseenter: (p) => y.value = e,
249
- onMouseleave: n[0] || (n[0] = (p) => y.value = void 0),
252
+ onMouseenter: (p) => d.value = e,
253
+ onMouseleave: n[0] || (n[0] = (p) => d.value = void 0),
250
254
  tabindex: "0",
251
- onKeyup: P((p) => V(e), ["enter"])
252
- }, null, 40, ct)),
253
- c.value ? (a(), i("rect", {
255
+ onKeyup: q((p) => V(e), ["enter"])
256
+ }, null, 40, mt)),
257
+ c.value ? (a(), o("rect", {
254
258
  key: 1,
255
259
  class: "vue-ui-rating-mouse-trap",
256
260
  x: 0,
@@ -258,66 +262,66 @@ const et = {
258
262
  width: 100,
259
263
  height: 100,
260
264
  fill: "transparent",
261
- onMouseenter: (p) => y.value = e,
262
- onMouseleave: n[1] || (n[1] = (p) => y.value = void 0)
263
- }, null, 40, ft)) : d("", !0)
264
- ], 12, gt)),
265
- t.value.style.tooltip.show && G.value && c.value ? (a(), i("div", {
265
+ onMouseenter: (p) => d.value = e,
266
+ onMouseleave: n[1] || (n[1] = (p) => d.value = void 0)
267
+ }, null, 40, ht)) : y("", !0)
268
+ ], 12, ft)),
269
+ t.value.style.tooltip.show && O.value && c.value ? (a(), o("div", {
266
270
  key: 4,
267
271
  class: "vue-ui-rating-tooltip",
268
- style: o(`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:${y.value === e ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
272
+ style: i(`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:${d.value === e ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
269
273
  }, [
270
274
  r("div", {
271
- style: o(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
275
+ style: i(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
272
276
  }, [
273
277
  r("span", {
274
- style: o(`font-size:${t.value.style.tooltip.fontSize}px`)
278
+ style: i(`font-size:${t.value.style.tooltip.fontSize}px`)
275
279
  }, g(e) + ":", 5),
276
280
  r("span", {
277
- style: o(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
281
+ style: i(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
278
282
  }, g(s($)(
279
283
  t.value.style.tooltip.formatter,
280
284
  u.dataset.rating[e],
281
- s(_)({
285
+ s(b)({
282
286
  v: u.dataset.rating[e],
283
287
  r: t.value.style.tooltip.roundingValue
284
288
  }),
285
289
  t.value
286
290
  )), 5),
287
291
  r("div", {
288
- style: o(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
292
+ style: i(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
289
293
  }, " ▼ ", 4)
290
294
  ], 4)
291
- ], 4)) : d("", !0)
295
+ ], 4)) : y("", !0)
292
296
  ], 4))), 256)),
293
- t.value.style.rating.show && t.value.style.rating.position === "right" ? (a(), i("div", {
297
+ t.value.style.rating.show && t.value.style.rating.position === "right" ? (a(), o("div", {
294
298
  key: 1,
295
- style: o(`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`)
299
+ style: i(`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`)
296
300
  }, g(s($)(
297
301
  t.value.style.rating.formatter,
298
302
  v.value,
299
- s(_)({
303
+ s(b)({
300
304
  v: v.value,
301
305
  r: t.value.style.rating.roundingValue
302
306
  }),
303
307
  t.value
304
- )), 5)) : d("", !0)
308
+ )), 5)) : y("", !0)
305
309
  ], 4),
306
- t.value.style.rating.show && t.value.style.rating.position === "bottom" ? (a(), i("div", {
310
+ t.value.style.rating.show && t.value.style.rating.position === "bottom" ? (a(), o("div", {
307
311
  key: 2,
308
- style: o(`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`)
312
+ style: i(`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`)
309
313
  }, g(s($)(
310
314
  t.value.style.rating.formatter,
311
315
  v.value,
312
- s(_)({
316
+ s(b)({
313
317
  v: v.value,
314
318
  r: t.value.style.rating.roundingValue
315
319
  }),
316
320
  t.value
317
- )), 5)) : d("", !0)
321
+ )), 5)) : y("", !0)
318
322
  ], 36));
319
323
  }
320
- }, bt = /* @__PURE__ */ tt(mt, [["__scopeId", "data-v-d90e158f"]]);
324
+ }, kt = /* @__PURE__ */ lt(xt, [["__scopeId", "data-v-9e1d13d5"]]);
321
325
  export {
322
- bt as default
326
+ kt as default
323
327
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DaDv7p0W.cjs"),M=require("./useNestedProp-DkpuL8Iv.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["src","height","width"],X=["xmlns","height","width"],j=["id"],F=["stop-color"],I=["stop-color"],O=["points","fill","stroke","stroke-width"],Y=["src","alt","height","width","id"],G=["xmlns","viewBox","height","id"],U=["id"],q=["stop-color"],H=["stop-color"],K=["points","fill","stroke"],P=["xmlns","height"],T=["onClick","onMouseenter","onKeyup"],W=["onMouseenter"],J={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:S,emit:_}){const i=k,{vue_ui_rating:w}=o.useConfig(),d=e.ref(o.createUid()),g=e.ref(!1),s=e.ref(void 0),y=e.ref([]),z=e.useSlots();e.onMounted(()=>{z["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const t=e.computed({get:()=>f(),set:a=>a});function f(){return M.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,a=>{t.value=f(),h()},{deep:!0});const B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?C(i.dataset.rating):i.dataset.rating),N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(B.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function C(a){let n=0,l=0;for(const u in a){const L=parseInt(u),$=a[u];n+=L*$,l+=$}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){o.objectIsEmpty(i.dataset)&&o.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let a=t.value.from;a<=t.value.to;a+=1)y.value.push(a)}function p(a,n=!1){return a>s.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_${d.value})`:t.value.style.star.activeColor}function x(a,n=!1){const l=r.value-a,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function b(a){c.value||(r.value=a,_("rate",a))}function E(){return r.value}function V(a=!0){c.value=a}return S({getData:E,toggleReadonly:V}),(a,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[2]||(n[2]=l=>g.value=!0),onMouseleave:n[3]||(n[3]=l=>{g.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",A,[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(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.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(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(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`)},[m.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(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,R)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.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_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,I)],8,j)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,O)],8,X)),m.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_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,Y)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.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_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,H)],8,U)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,K)],8,G)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.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:u=>b(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>b(l),["enter"])},null,40,T)),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:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,W)):e.createCommentVNode("",!0)],12,P)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,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:${s.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(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(o.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(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.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(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Q=D._export_sfc(J,[["__scopeId","data-v-9e1d13d5"]]);exports.default=Q;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DaDv7p0W.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-CpfNWbUc.cjs"),ee=require("./usePrinter-BIHu0O5X.cjs"),Be=require("./vue-ui-skeleton-B24XJJ2p.cjs"),te=require("./useNestedProp-DkpuL8Iv.cjs"),$e=require("./PackageVersion-nr7f_VNw.cjs"),Pe=require("./PenAndPaper-C9v0NXEg.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["width","height"],Ee=["cx","cy","r","stroke","stroke-width"],Ae={key:1},Ne=["stroke","d","stroke-width"],Ie={style:{"pointer-events":"none"}},Ve=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Fe={key:2},Te=["stroke","stroke-width","x1","x2","y1","y2"],Re={style:{"pointer-events":"none"}},je=["cx","cy","fill","r","stroke"],qe=["x","y","fill","font-size"],De=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Ue=["cx","cy","fill","stroke","onClick","r"],Ge={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"4beec998":ue.value,15467313:ie.value,e556a096:ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(o.createUid()),E=e.ref(0),x=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:P,setUserOptionsVisibility:M,keepUserOptionState:F}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.showOnChartHover,Y(),V.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),se=e.ref(0),_=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),G=e.ref(r.value.style.plot.radius),W=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}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:x.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});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=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(x.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(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 H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,be)=>xe+be,0),S=m.value*Math.cos(l)+a.value.width/2,we=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:we,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{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:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={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*s.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*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(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 K(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 ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(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 ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.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/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:x,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(M)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(M)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:x.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.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(Ce._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(F)||e.unref(P))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),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:x.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}: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,xmlns:e.unref(o.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,Se)):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,Ee),ae.value?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(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,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key: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,Ve)):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(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(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,Te))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Re,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key: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,je)):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(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,qe)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(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};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,De))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(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=>Q(l),r:G.value},null,12,Ue))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||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(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},Ye=Le._export_sfc(We,[["__scopeId","data-v-d95c92fd"]]);exports.default=Ye;