vue-data-ui 2.9.5 → 2.9.7-beta.0

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 +12 -6
  2. package/dist/{Arrow-DxFFCBPM.cjs → Arrow-BU7SuiI0.cjs} +1 -1
  3. package/dist/{Arrow-CJMMd0OS.js → Arrow-IRx8mAUZ.js} +1 -1
  4. package/dist/{BaseIcon-DU8qgy6L.cjs → BaseIcon-CN6BxTf_.cjs} +1 -1
  5. package/dist/{BaseIcon-hA0_6Cl-.js → BaseIcon-NVebWEmm.js} +5 -3
  6. package/dist/{ColorPicker-C2hq5iIZ.js → ColorPicker-D6INbuzz.js} +3 -3
  7. package/dist/{ColorPicker-t6z7vah6.cjs → ColorPicker-DzF9vdB7.cjs} +1 -1
  8. package/dist/{DataTable-BPnqR1qF.cjs → DataTable-Bc-sIk3H.cjs} +1 -1
  9. package/dist/{DataTable-BbXCe5s5.js → DataTable-LLs37Na_.js} +2 -2
  10. package/dist/{Legend-BQHuBdpT.cjs → Legend-DbGQCXU-.cjs} +1 -1
  11. package/dist/{Legend-D9ki4JJ3.js → Legend-Vkc-EKNB.js} +2 -2
  12. package/dist/{PackageVersion-mZLomJm-.cjs → PackageVersion-nHr3qHGs.cjs} +1 -1
  13. package/dist/{PackageVersion-Bq98eXon.js → PackageVersion-smHUcsQE.js} +1 -1
  14. package/dist/{PenAndPaper-CvkDs-Gh.cjs → PenAndPaper-30BhAniw.cjs} +1 -1
  15. package/dist/{PenAndPaper-CUUyQzLR.js → PenAndPaper-k0VaawVj.js} +3 -3
  16. package/dist/{Shape-D6lPonNm.js → Shape-Bfm8x-8P.js} +1 -1
  17. package/dist/{Shape-BeAQjfne.cjs → Shape-PzPPg5iH.cjs} +1 -1
  18. package/dist/{Slicer-C97ZQ2j3.cjs → Slicer-BU0fj2AI.cjs} +1 -1
  19. package/dist/{Slicer-5j6e3Y_A.js → Slicer-DhTMXF53.js} +2 -2
  20. package/dist/{Title-Cjpkoa1d.cjs → Title-58EtyYdb.cjs} +1 -1
  21. package/dist/{Title-CwPVIBWP.js → Title-IOaA-ppU.js} +1 -1
  22. package/dist/{Tooltip-T-m_CEIA.js → Tooltip-D8cBDDkn.js} +1 -1
  23. package/dist/{Tooltip-DPgFOV_5.cjs → Tooltip-e9KUqiQA.cjs} +1 -1
  24. package/dist/documentation/installation.md +2 -1
  25. package/dist/{dom-to-png-CYjAAVu3.cjs → dom-to-png-CorDkTqE.cjs} +1 -1
  26. package/dist/{dom-to-png-CGtn1Am2.js → dom-to-png-DWnOZNsr.js} +1 -1
  27. package/dist/{img-Duw2r72a.cjs → img-D3Du_oTb.cjs} +1 -1
  28. package/dist/{img-s3DffGWH.js → img-DTb9GqRw.js} +1 -1
  29. package/dist/index-BqL3-yPQ.cjs +9 -0
  30. package/dist/{index-BDGf85YF.js → index-DwNTTJ28.js} +1034 -872
  31. package/dist/{pdf-CRgxb46R.cjs → pdf-BcORych6.cjs} +1 -1
  32. package/dist/{pdf-BnBP0Jg-.js → pdf-EYBy6RJJ.js} +1 -1
  33. package/dist/style.css +1 -1
  34. package/dist/types/vue-data-ui.d.cts +139 -7
  35. package/dist/types/vue-data-ui.d.ts +139 -7
  36. package/dist/{useNestedProp-D24_JklN.cjs → useNestedProp-BVy9-3EJ.cjs} +1 -1
  37. package/dist/{useNestedProp-BsN3TOQ0.js → useNestedProp-DLKXTEny.js} +1 -1
  38. package/dist/{usePrinter-CKjQQldf.js → usePrinter-CDE1F-XN.js} +3 -3
  39. package/dist/{usePrinter-Bs-Uo-8x.cjs → usePrinter-vjB2nrFW.cjs} +1 -1
  40. package/dist/{vue-data-ui-IWpvfdMh.js → vue-data-ui-Dxn5phSx.js} +64 -62
  41. package/dist/vue-data-ui-NKaL_RZ1.cjs +9 -0
  42. package/dist/vue-data-ui.cjs +1 -1
  43. package/dist/vue-data-ui.js +37 -36
  44. package/dist/{vue-ui-3d-bar-slYknMyR.cjs → vue-ui-3d-bar-C6p9aV9v.cjs} +1 -1
  45. package/dist/{vue-ui-3d-bar-DVNn8pu-.js → vue-ui-3d-bar-CHHe_J_D.js} +9 -9
  46. package/dist/{vue-ui-accordion-CYKk4uk8.js → vue-ui-accordion-BqCwiS7D.js} +3 -3
  47. package/dist/{vue-ui-accordion-BMK6-xDm.cjs → vue-ui-accordion-CELgYjnV.cjs} +1 -1
  48. package/dist/{vue-ui-age-pyramid-1zM8QRQl.js → vue-ui-age-pyramid-CeahoaHi.js} +10 -10
  49. package/dist/{vue-ui-age-pyramid-BCQsnc8c.cjs → vue-ui-age-pyramid-S8hYFKDI.cjs} +1 -1
  50. package/dist/{vue-ui-annotator-5O4hWWvi.cjs → vue-ui-annotator-BoOPk1NW.cjs} +1 -1
  51. package/dist/{vue-ui-annotator-_U6PEy_s.js → vue-ui-annotator-Dt280Dbw.js} +2 -2
  52. package/dist/{vue-ui-bullet-BAaTrfRK.cjs → vue-ui-bullet-C_ouoJoz.cjs} +1 -1
  53. package/dist/{vue-ui-bullet-DuI83w0_.js → vue-ui-bullet-DoyResGB.js} +8 -8
  54. package/dist/{vue-ui-candlestick-CoxKe0hi.cjs → vue-ui-candlestick-BSrwISIN.cjs} +1 -1
  55. package/dist/{vue-ui-candlestick-Caume8Cr.js → vue-ui-candlestick-Ckb5JZAY.js} +11 -11
  56. package/dist/{vue-ui-carousel-table-C3oLoBhV.cjs → vue-ui-carousel-table-BnfnugZ8.cjs} +1 -1
  57. package/dist/{vue-ui-carousel-table-Dpj6uzaw.js → vue-ui-carousel-table-pyTSfa3R.js} +4 -4
  58. package/dist/{vue-ui-chestnut-CRiCk9LN.cjs → vue-ui-chestnut-D2DRAw3Z.cjs} +1 -1
  59. package/dist/{vue-ui-chestnut-DC57Y0fm.js → vue-ui-chestnut-DEmzGhAV.js} +8 -8
  60. package/dist/{vue-ui-circle-pack-Dtaz0QCf.cjs → vue-ui-circle-pack-D58AOk8y.cjs} +1 -1
  61. package/dist/{vue-ui-circle-pack-Bx8ATqeJ.js → vue-ui-circle-pack-W44HsVVY.js} +9 -9
  62. package/dist/{vue-ui-cursor-Dae_RvTj.cjs → vue-ui-cursor-D1ZEe_2B.cjs} +1 -1
  63. package/dist/{vue-ui-cursor-D2_6cGWO.js → vue-ui-cursor-Dnkh_phA.js} +2 -2
  64. package/dist/{vue-ui-dashboard-Cia2p6jc.cjs → vue-ui-dashboard-BbcppsFn.cjs} +1 -1
  65. package/dist/{vue-ui-dashboard-CqEaxTGo.js → vue-ui-dashboard-mDnIJx3M.js} +62 -62
  66. package/dist/{vue-ui-digits-TcCd1Ayj.cjs → vue-ui-digits-C_za0nmt.cjs} +1 -1
  67. package/dist/{vue-ui-digits-BBh4FaLt.js → vue-ui-digits-Dr3tklAr.js} +2 -2
  68. package/dist/{vue-ui-donut-DlvFHlJB.js → vue-ui-donut-CRBp5BFP.js} +12 -12
  69. package/dist/{vue-ui-donut-CXI85ZJW.cjs → vue-ui-donut-CxCNCSyO.cjs} +1 -1
  70. package/dist/{vue-ui-donut-evolution-BXEmubwy.cjs → vue-ui-donut-evolution-D4s8zLwf.cjs} +1 -1
  71. package/dist/{vue-ui-donut-evolution-Ba4GIJg3.js → vue-ui-donut-evolution-abrnOe55.js} +11 -11
  72. package/dist/{vue-ui-dumbbell-C1y6x8kv.cjs → vue-ui-dumbbell-BDinWM7R.cjs} +1 -1
  73. package/dist/{vue-ui-dumbbell-2xYiPFix.js → vue-ui-dumbbell-Bj_SUn-j.js} +10 -10
  74. package/dist/{vue-ui-flow-BBFoxXRy.js → vue-ui-flow-CtAP5n05.js} +9 -9
  75. package/dist/{vue-ui-flow-Cn0WD8c1.cjs → vue-ui-flow-DCQVOrgy.cjs} +1 -1
  76. package/dist/{vue-ui-funnel-BW0E2--M.cjs → vue-ui-funnel-0TWVP6z9.cjs} +1 -1
  77. package/dist/{vue-ui-funnel-DzcoJC-S.js → vue-ui-funnel-DymsYFW0.js} +9 -9
  78. package/dist/{vue-ui-galaxy-D88zMUzb.js → vue-ui-galaxy-Dn-E22Sq.js} +11 -11
  79. package/dist/{vue-ui-galaxy-C7S_aK4E.cjs → vue-ui-galaxy-DoJcvc2z.cjs} +1 -1
  80. package/dist/{vue-ui-gauge-BNMnbzT6.cjs → vue-ui-gauge-BPOh-LHr.cjs} +1 -1
  81. package/dist/{vue-ui-gauge-DU5uLDka.js → vue-ui-gauge-DqbsP-05.js} +7 -7
  82. package/dist/{vue-ui-gizmo-Cgqr5OQC.js → vue-ui-gizmo-BohTVUAE.js} +3 -3
  83. package/dist/{vue-ui-gizmo-CdjyPQN0.cjs → vue-ui-gizmo-CW9LAAdu.cjs} +1 -1
  84. package/dist/{vue-ui-heatmap-DhJtkLrS.js → vue-ui-heatmap-1FWBcMxC.js} +10 -10
  85. package/dist/{vue-ui-heatmap-B26GMl3N.cjs → vue-ui-heatmap-CYCOMJEp.cjs} +1 -1
  86. package/dist/{vue-ui-history-plot-VwHC74EA.cjs → vue-ui-history-plot-BUIqHRPg.cjs} +1 -1
  87. package/dist/{vue-ui-history-plot-DBegFcxp.js → vue-ui-history-plot-CSIf1_96.js} +11 -11
  88. package/dist/{vue-ui-kpi-CfzNgybX.js → vue-ui-kpi-BrhY5fFX.js} +3 -3
  89. package/dist/{vue-ui-kpi-C1i0iWrh.cjs → vue-ui-kpi-Cf6eEcYm.cjs} +1 -1
  90. package/dist/{vue-ui-mini-loader-Djlgqhvu.cjs → vue-ui-mini-loader-CURulq-0.cjs} +1 -1
  91. package/dist/{vue-ui-mini-loader-DvYHhqWT.js → vue-ui-mini-loader-CgkVj3jx.js} +2 -2
  92. package/dist/{vue-ui-molecule-Cr6KJ5eZ.js → vue-ui-molecule-Bd-W2FcU.js} +11 -11
  93. package/dist/{vue-ui-molecule-C4Z2E7uD.cjs → vue-ui-molecule-DBlY5wdo.cjs} +1 -1
  94. package/dist/{vue-ui-mood-radar-DHTNv7wD.js → vue-ui-mood-radar-Bzl98p3C.js} +11 -11
  95. package/dist/{vue-ui-mood-radar-DhLF09v7.cjs → vue-ui-mood-radar-D9yvKEMp.cjs} +1 -1
  96. package/dist/{vue-ui-nested-donuts-vMeonmHR.cjs → vue-ui-nested-donuts-BZ5JA8Q0.cjs} +1 -1
  97. package/dist/{vue-ui-nested-donuts-Dm0rc5ct.js → vue-ui-nested-donuts-DyTI4ydr.js} +11 -11
  98. package/dist/{vue-ui-onion-boKXIe-r.cjs → vue-ui-onion-DLm1PYJW.cjs} +1 -1
  99. package/dist/{vue-ui-onion-CssSqL8q.js → vue-ui-onion-ueQgXseI.js} +11 -11
  100. package/dist/{vue-ui-parallel-coordinate-plot-DxKTqBB8.cjs → vue-ui-parallel-coordinate-plot-C2IpU_Zn.cjs} +1 -1
  101. package/dist/{vue-ui-parallel-coordinate-plot-DBzBW-Vn.js → vue-ui-parallel-coordinate-plot-CE7Apuxp.js} +12 -12
  102. package/dist/{vue-ui-quadrant-CSuEenz4.js → vue-ui-quadrant-CjLaANbC.js} +12 -12
  103. package/dist/{vue-ui-quadrant-BkaXchAn.cjs → vue-ui-quadrant-R1yAxzva.cjs} +1 -1
  104. package/dist/{vue-ui-quick-chart-DJpBpFM4.cjs → vue-ui-quick-chart-BdqHueUa.cjs} +1 -1
  105. package/dist/{vue-ui-quick-chart-BLTVHmn2.js → vue-ui-quick-chart-CVDLl6ro.js} +9 -9
  106. package/dist/{vue-ui-radar-CrxciP8t.cjs → vue-ui-radar-B6u_29cN.cjs} +1 -1
  107. package/dist/{vue-ui-radar-BKM9hhMO.js → vue-ui-radar-CoJY69Qe.js} +12 -12
  108. package/dist/{vue-ui-rating-BWMgiGmm.cjs → vue-ui-rating-inneqZuS.cjs} +1 -1
  109. package/dist/{vue-ui-rating-7uT1-yDP.js → vue-ui-rating-tqvCl4qR.js} +2 -2
  110. package/dist/{vue-ui-relation-circle-Bk2mNJDz.js → vue-ui-relation-circle-B_2RZE3S.js} +7 -7
  111. package/dist/{vue-ui-relation-circle-BFvsOsjM.cjs → vue-ui-relation-circle-D_eh1BEp.cjs} +1 -1
  112. package/dist/vue-ui-ridgeline-BN4YoLPn.cjs +1 -0
  113. package/dist/vue-ui-ridgeline-BZqkRymO.js +1040 -0
  114. package/dist/{vue-ui-rings-azmWz0Sn.js → vue-ui-rings-5cvD-A8P.js} +12 -12
  115. package/dist/{vue-ui-rings-FzLeValL.cjs → vue-ui-rings-CDBPSu7C.cjs} +1 -1
  116. package/dist/{vue-ui-scatter-CgHGWxEM.js → vue-ui-scatter-D6gIKljC.js} +12 -12
  117. package/dist/{vue-ui-scatter-D_3855LX.cjs → vue-ui-scatter-DSd4R2Yi.cjs} +1 -1
  118. package/dist/{vue-ui-skeleton-hrplR5wa.js → vue-ui-skeleton-kS_CJIiv.js} +411 -332
  119. package/dist/vue-ui-skeleton-ovmMp5bh.cjs +41 -0
  120. package/dist/{vue-ui-smiley-B02R516m.cjs → vue-ui-smiley-DJnJpvqE.cjs} +1 -1
  121. package/dist/{vue-ui-smiley-B6DAFeS1.js → vue-ui-smiley-DzoxVoms.js} +2 -2
  122. package/dist/{vue-ui-spark-trend-CVU8ZId2.cjs → vue-ui-spark-trend-CFS3QbYY.cjs} +1 -1
  123. package/dist/{vue-ui-spark-trend-Cvw68YCa.js → vue-ui-spark-trend-oIWCpuK4.js} +5 -5
  124. package/dist/{vue-ui-sparkbar-BVAmpd2c.cjs → vue-ui-sparkbar-CcF0AVSW.cjs} +1 -1
  125. package/dist/{vue-ui-sparkbar-CLtobIKI.js → vue-ui-sparkbar-zp12sOeT.js} +4 -4
  126. package/dist/{vue-ui-sparkgauge-DV7_YpFv.js → vue-ui-sparkgauge-Ch5sucF4.js} +4 -4
  127. package/dist/{vue-ui-sparkgauge-PfjN8EtA.cjs → vue-ui-sparkgauge-DTflH_xZ.cjs} +1 -1
  128. package/dist/{vue-ui-sparkhistogram-BgGs2Ge0.js → vue-ui-sparkhistogram-BkTOZLzM.js} +5 -5
  129. package/dist/{vue-ui-sparkhistogram-B3bXOOfB.cjs → vue-ui-sparkhistogram-DZt0HNIE.cjs} +1 -1
  130. package/dist/{vue-ui-sparkline-BpRBXQMZ.cjs → vue-ui-sparkline-CBSJXHQs.cjs} +1 -1
  131. package/dist/{vue-ui-sparkline-CgtP1kxm.js → vue-ui-sparkline-C_xiHNZV.js} +4 -4
  132. package/dist/{vue-ui-sparkstackbar-DNjIcyBK.js → vue-ui-sparkstackbar-C_OFfnx-.js} +5 -5
  133. package/dist/{vue-ui-sparkstackbar--pn0EIYM.cjs → vue-ui-sparkstackbar-CflXoafD.cjs} +1 -1
  134. package/dist/{vue-ui-stackbar-CqQ5RMAB.cjs → vue-ui-stackbar-Bxk0RKI0.cjs} +1 -1
  135. package/dist/{vue-ui-stackbar-CjRAckRq.js → vue-ui-stackbar-qXKMKlND.js} +13 -13
  136. package/dist/{vue-ui-strip-plot-CW_RftRT.js → vue-ui-strip-plot-C0JI5Ypz.js} +11 -11
  137. package/dist/{vue-ui-strip-plot-DxfM92am.cjs → vue-ui-strip-plot-CXQN3ICY.cjs} +1 -1
  138. package/dist/{vue-ui-table-z1l0Vin6.cjs → vue-ui-table-Cl3Li8f9.cjs} +1 -1
  139. package/dist/{vue-ui-table-D9K1kDv5.js → vue-ui-table-DyFNHVoi.js} +3 -3
  140. package/dist/{vue-ui-table-heatmap-B_iJQCJL.js → vue-ui-table-heatmap-BcCULm0Y.js} +4 -4
  141. package/dist/{vue-ui-table-heatmap-D2Ikfd7A.cjs → vue-ui-table-heatmap-DGLCYPo5.cjs} +1 -1
  142. package/dist/{vue-ui-table-sparkline-Bu-b38cW.js → vue-ui-table-sparkline-B-dNVmMr.js} +5 -5
  143. package/dist/{vue-ui-table-sparkline-CYWYfG5M.cjs → vue-ui-table-sparkline-BgkRYmur.cjs} +1 -1
  144. package/dist/{vue-ui-thermometer-CgYedLZ5.cjs → vue-ui-thermometer-BCH7KJhP.cjs} +1 -1
  145. package/dist/{vue-ui-thermometer--XuyMCZI.js → vue-ui-thermometer-Cuw5r53c.js} +7 -7
  146. package/dist/{vue-ui-timer-BiTGijvm.cjs → vue-ui-timer-CyopDf_K.cjs} +1 -1
  147. package/dist/{vue-ui-timer-GrhFEUcz.js → vue-ui-timer-DdGJsPoJ.js} +5 -5
  148. package/dist/{vue-ui-tiremarks-CHd1kBCw.js → vue-ui-tiremarks-BPxnwI8b.js} +7 -7
  149. package/dist/{vue-ui-tiremarks-LAdsMqyP.cjs → vue-ui-tiremarks-C8AqJweQ.cjs} +1 -1
  150. package/dist/{vue-ui-treemap-4BGOXoCD.cjs → vue-ui-treemap-BFu-MBkV.cjs} +1 -1
  151. package/dist/{vue-ui-treemap-CIGl0OBe.js → vue-ui-treemap-CeuVNdos.js} +12 -12
  152. package/dist/{vue-ui-vertical-bar-Btv32rCQ.js → vue-ui-vertical-bar-Ba6oWXzE.js} +12 -12
  153. package/dist/{vue-ui-vertical-bar-Bc3d2SCI.cjs → vue-ui-vertical-bar-CqE10O2F.cjs} +1 -1
  154. package/dist/{vue-ui-waffle-BfgS6Gkw.cjs → vue-ui-waffle-Dj664Zvg.cjs} +1 -1
  155. package/dist/{vue-ui-waffle-qZHJoGgD.js → vue-ui-waffle-lMRTNFla.js} +12 -12
  156. package/dist/{vue-ui-wheel-CkqHG4gC.cjs → vue-ui-wheel-BWMzvmcA.cjs} +1 -1
  157. package/dist/{vue-ui-wheel-CFf56O9Y.js → vue-ui-wheel-aaqRzfsy.js} +7 -7
  158. package/dist/{vue-ui-word-cloud-Cgtt4v0g.js → vue-ui-word-cloud-D2UL2Oye.js} +10 -10
  159. package/dist/{vue-ui-word-cloud-DU1a_f2O.cjs → vue-ui-word-cloud-Z7WvU8XI.cjs} +1 -1
  160. package/dist/{vue-ui-world-2gnEByN3.js → vue-ui-world-B61PIrw8.js} +101 -96
  161. package/dist/{vue-ui-world-w-oAd8TZ.cjs → vue-ui-world-JoZxd7Uu.cjs} +3 -3
  162. package/dist/{vue-ui-xy-Dy4M6VtE.cjs → vue-ui-xy-Bil87p79.cjs} +2 -2
  163. package/dist/{vue-ui-xy-DhTZvuRq.js → vue-ui-xy-F8eArZNJ.js} +16 -16
  164. package/dist/{vue-ui-xy-canvas-B4jIg9Zl.js → vue-ui-xy-canvas-BlQyx-BL.js} +12 -12
  165. package/dist/{vue-ui-xy-canvas-CTwc8DS0.cjs → vue-ui-xy-canvas-Qb5pkWBq.cjs} +1 -1
  166. package/package.json +1 -1
  167. package/dist/index-BS7ybKs5.cjs +0 -9
  168. package/dist/vue-data-ui-BMJWddQg.cjs +0 -9
  169. package/dist/vue-ui-skeleton-BznhCw4p.cjs +0 -41
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BS7ybKs5.cjs"),F=require("./useNestedProp-D24_JklN.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-BqL3-yPQ.cjs"),F=require("./useNestedProp-BVy9-3EJ.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,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, W as I } from "./index-BDGf85YF.js";
3
- import { u as ie } from "./useNestedProp-BsN3TOQ0.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, W as I } from "./index-DwNTTJ28.js";
3
+ import { u as ie } from "./useNestedProp-DLKXTEny.js";
4
4
  import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const ne = {
6
6
  key: 0,
@@ -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-BDGf85YF.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-DwNTTJ28.js";
3
3
  import { t as it, u as at } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as nt } from "./Title-CwPVIBWP.js";
5
- import { u as rt, U as ut } from "./usePrinter-CKjQQldf.js";
6
- import ot from "./vue-ui-skeleton-hrplR5wa.js";
7
- import { u as xe } from "./useNestedProp-BsN3TOQ0.js";
8
- import { _ as ct } from "./PackageVersion-Bq98eXon.js";
9
- import { _ as dt } from "./PenAndPaper-CUUyQzLR.js";
4
+ import { _ as nt } from "./Title-IOaA-ppU.js";
5
+ import { u as rt, U as ut } from "./usePrinter-CDE1F-XN.js";
6
+ import ot from "./vue-ui-skeleton-kS_CJIiv.js";
7
+ import { u as xe } from "./useNestedProp-DLKXTEny.js";
8
+ import { _ as ct } from "./PackageVersion-smHUcsQE.js";
9
+ import { _ as dt } from "./PenAndPaper-k0VaawVj.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-BS7ybKs5.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-Cjpkoa1d.cjs"),te=require("./usePrinter-Bs-Uo-8x.cjs"),$e=require("./vue-ui-skeleton-BznhCw4p.cjs"),le=require("./useNestedProp-D24_JklN.cjs"),_e=require("./PackageVersion-mZLomJm-.cjs"),Pe=require("./PenAndPaper-CvkDs-Gh.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-BqL3-yPQ.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-58EtyYdb.cjs"),te=require("./usePrinter-vjB2nrFW.cjs"),$e=require("./vue-ui-skeleton-ovmMp5bh.cjs"),le=require("./useNestedProp-BVy9-3EJ.cjs"),_e=require("./PackageVersion-nHr3qHGs.cjs"),Pe=require("./PenAndPaper-30BhAniw.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;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BqL3-yPQ.cjs"),We=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),be=require("./usePrinter-vjB2nrFW.cjs"),we=require("./useResponsive-DQmBAoBf.cjs"),Ce=require("./useNestedProp-BVy9-3EJ.cjs"),Ye=require("./vue-ui-accordion-CELgYjnV.cjs"),Ge=require("./BaseIcon-CN6BxTf_.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=require("./DataTable-Bc-sIk3H.cjs"),Je=require("./Legend-DbGQCXU-.cjs"),Ke=require("./PenAndPaper-30BhAniw.cjs"),Qe=require("./Shape-PzPPg5iH.cjs"),Ze=require("./vue-ui-skeleton-ovmMp5bh.cjs"),et=require("./Title-58EtyYdb.cjs"),tt=require("./vue-ui-xy-Bil87p79.cjs"),lt=["xmlns"],at={class:"modal-title"},ot={class:"modal-body"},rt={__name:"BaseDraggableDialog",props:{backgroundColor:{type:String},color:{type:String},headerBg:{type:String},headerColor:{type:String}},emits:["close"],setup(E,{expose:Q,emit:Z}){e.useCssVars(i=>({19616867:E.color}));const ee=E,p=Z,b=e.ref(!1),L=e.ref(!1),o=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 U(){b.value=!0,e.nextTick(()=>{L.value||(o.left=Math.max(0,window.innerWidth/2-o.width/2),o.top=Math.max(0,window.innerHeight/2-o.height/2),L.value=!0)})}function T(){b.value=!1,p("close")}Q({open:U,close:T});const V=e.computed(()=>({position:"fixed",left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`,padding:0,border:"none",background:ee.backgroundColor,boxShadow:"0 4px 24px rgba(0,0,0,0.15)",zIndex:9999,overflow:"visible",borderRadius:"2px"}));function w(i){return i.touches&&i.touches.length?{x:i.touches[0].clientX,y:i.touches[0].clientY}:{x:i.clientX,y:i.clientY}}function P(i){var v;(v=i.preventDefault)==null||v.call(i),o.dragging=!0;const d=w(i);o.dragOffsetX=d.x-o.left,o.dragOffsetY=d.y-o.top,document.addEventListener("mousemove",A),document.addEventListener("mouseup",$),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",$)}function A(i){var m;if(!o.dragging)return;(m=i.preventDefault)==null||m.call(i);const d=w(i);let v=d.x-o.dragOffsetX,t=d.y-o.dragOffsetY;v=Math.max(0,Math.min(v,window.innerWidth-o.width)),t=Math.max(0,Math.min(t,window.innerHeight-o.height)),o.left=v,o.top=t}function $(){o.dragging=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",$),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",$)}function O(i){var v;(v=i.preventDefault)==null||v.call(i),o.resizing=!0;const d=w(i);o.pointerStartX=d.x,o.pointerStartY=d.y,o.resizeStartW=o.width,o.resizeStartH=o.height,document.addEventListener("mousemove",y),document.addEventListener("mouseup",B),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",B)}function y(i){var m;if(!o.resizing)return;(m=i.preventDefault)==null||m.call(i);const d=w(i);let v=d.x-o.pointerStartX,t=d.y-o.pointerStartY;o.width=Math.max(240,o.resizeStartW+v),o.height=Math.max(400,o.resizeStartH+t)}function B(){o.resizing=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",B),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",B)}function Y(i){var v;(v=i.preventDefault)==null||v.call(i),o.resizing=!0;const d=w(i);o.pointerStartX=d.x,o.pointerStartY=d.y,o.resizeStartW=o.width,o.resizeStartH=o.height,o.resizeStartLeft=o.left,o.resizeStartTop=o.top,document.addEventListener("mousemove",N),document.addEventListener("mouseup",h),document.addEventListener("touchmove",N,{passive:!1}),document.addEventListener("touchend",h)}function N(i){var F;if(!o.resizing)return;(F=i.preventDefault)==null||F.call(i);const d=w(i);let v=d.x-o.pointerStartX,t=Math.min(Math.max(0,o.resizeStartLeft+v),o.resizeStartLeft+o.resizeStartW-240),m=o.resizeStartW-(t-o.resizeStartLeft),D=d.y-o.pointerStartY,G=Math.max(400,o.resizeStartH+D);o.left=t,o.width=m,o.height=G}function h(){o.resizing=!1,document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",N),document.removeEventListener("touchend",h)}return e.onUnmounted(()=>{$(),B(),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(V.value),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"modal-header",style:e.normalizeStyle({backgroundColor:E.headerBg,color:E.headerColor})},[e.createElementVNode("span",{class:"drag-handle",onMousedown:e.withModifiers(P,["stop","prevent"]),onTouchstart:e.withModifiers(P,["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,lt))],32),e.createElementVNode("span",at,[e.renderSlot(i.$slots,"title",{},void 0,!0)]),e.createElementVNode("button",{class:"close",onClick:T},[e.createVNode(Ge.default,{name:"close",stroke:E.headerColor},null,8,["stroke"])])],4),e.createElementVNode("div",ot,[e.renderSlot(i.$slots,"default",{},void 0,!0)]),e.createElementVNode("div",{class:"resize-handle",onMousedown:e.withModifiers(O,["stop","prevent"]),onTouchstart:e.withModifiers(O,["stop","prevent"])},null,32),e.createElementVNode("div",{class:"resize-handle resize-handle-left",onMousedown:e.withModifiers(Y,["stop","prevent"]),onTouchstart:e.withModifiers(Y,["stop","prevent"])},null,32)],4)):e.createCommentVNode("",!0)]))}},nt=Be._export_sfc(rt,[["__scopeId","data-v-f854cee8"]]),st=["id"],it=["xmlns","viewBox"],ut=["id"],ct=["stop-color"],dt=["stop-color"],ht=["stop-color"],vt=["stop-color"],mt={key:0},ft=["fill","d"],pt=["fill","stroke","stroke-width","d"],gt=["stroke","stroke-dasharray","stroke-width","d"],yt=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],kt=["cx","cy","stroke","stroke-width","r","fill"],xt=["x","y","font-size","font-weight","fill","text-decoration","onMouseenter","onClick"],bt={key:1},wt=["font-size","fill","font-weight","transform","text-anchor"],Ct=["x","y","width","height","onMouseenter","onClick"],Bt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],St=["cx","cy","stroke","stroke-width","r","fill"],Et=["x","y","text-anchor","font-size","fill"],At={key:5,class:"vue-data-ui-watermark"},$t=["onClick"],Nt=["innerHTML"],zt={__name:"vue-ui-ridgeline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint","selectX"],setup(E,{expose:Q,emit:Z}){const{vue_ui_ridgeline:ee}=u.useConfig(),p=E,b=e.computed({get(){return!!p.dataset&&p.dataset.length},set(a){return a}}),L=Z,o=e.ref(null),U=e.ref(null),T=e.ref(null),V=e.ref(null),w=e.ref(null),P=e.ref(null),A=e.ref(0),$=e.ref(0),O=e.ref(0),y=e.ref(u.createUid()),B=e.ref(0),Y=e.ref(0),N=e.ref(512),h=e.ref(null),i=e.ref(null),d=e.ref(null);function v(){const a=Ce.useNestedProp({userConfig:p.config,defaultConfig:ee});return a.theme?{...Ce.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:()=>v(),set:a=>a}),m=e.ref(Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight)),{userOptionsVisible:D,setUserOptionsVisibility:G,keepUserOptionState:F}=We.useUserOptionState({config:t.value}),{svgRef:te}=Ue.useChartAccessibility({config:t.value.style.chart.title});e.onMounted(le),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});function le(){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,r)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(n=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:`datapoint.${n}`,index:`${s}-${r}`})})})}),Y.value=p.dataset.length,m.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),t.value.responsive){const a=we.throttle(()=>{const{width:s,height:l}=we.useResponsive({chart:o.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?T.value:null,source:w.value,noTitle:P.value});requestAnimationFrame(()=>{N.value=s,m.value=l/p.dataset.length})});V.value=new ResizeObserver(a),V.value.observe(o.value.parentNode)}}const{isPrinting:ne,isImaging:se,generatePdf:ie,generateImage:ue}=be.usePrinter({elementId:`vue-ui-ridgeline_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-ridgeline",options:t.value.userOptions.print}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ee=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.ref({showTable:t.value.table.show});e.watch(()=>p.config,a=>{t.value=v(),D.value=!t.value.userOptions.showOnChartHover,le(),A.value+=1,O.value+=1,m.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),X.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>p.dataset,le,{deep:!0});const ae=e.computed(()=>t.value.style.chart.areas.height/t.value.style.chart.areas.rowHeight);function ce(a){S.value.includes(a)?S.value=S.value.filter(s=>s!==a):S.value.push(a),L("selectLegend",I.value)}const C=e.computed(()=>b.value?p.dataset.map((a,s)=>({...a,labelLen:Ne(a.name,t.value.style.chart.yAxis.labels.fontSize),uid:u.createUid(),datapoints:a.datapoints.map((l,r)=>{const n=l.color?u.convertColorToHex(l.color):Ee.value[r]||u.palette[r]||u.palette[r%u.palette.length],c=u.slugify(l.name);return{...l,color:n,id:c}})})):[]),de=e.computed(()=>t.value.style.chart.padding.top+m.value*p.dataset.length+m.value*ae.value),k=e.computed(()=>({fullHeight:f.value.padding.top+f.value.padding.bottom+f.value.height,top:f.value.padding.top,left:f.value.padding.left,right:f.value.width-f.value.padding.right,bottom:f.value.padding.top+f.value.height,width:f.value.width-(f.value.padding.left+f.value.padding.right)})),f=e.computed(()=>{const a=t.value.style.chart.padding;return{width:N.value,height:de.value,padding:a}}),_=e.computed(()=>{const a=Math.max(...C.value.map(c=>c.labelLen)),s=Math.max(...C.value.flatMap(c=>c.datapoints.map(x=>x.values.length))),l=f.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,r=(k.value.width-l)/s,n=[];for(let c=0;c<s;c+=1)n.push({selectorX:l+r*c,x:l+r*c-r/2,y:k.value.top,label:t.value.style.chart.xAxis.labels.values[c]||"",index:c,width:r,height:de.value});return n});function Ae(a){L("selectX",C.value.map(s=>s.datapoints.map(l=>({dp:l,selected:l.values[a.index]}))))}function $e(a,s){return a.length*s/2+s}function he(a,s,l){const r=$e(s,l);return a+r>k.value.right}function Ne(a,s,l="sans-serif"){const n=document.createElement("canvas").getContext("2d"),c=typeof s=="number"?`${s}px`:s;return n.font=`${c} ${l}`,n.measureText(a).width}const I=e.computed(()=>{m.value;const a=Math.max(...C.value.map(g=>g.labelLen)),s=Math.max(...C.value.flatMap(g=>g.datapoints.map(z=>z.values.length))),l=Math.max(...C.value.flatMap(g=>g.datapoints.flatMap(z=>z.values))),r=Math.min(...C.value.flatMap(g=>g.datapoints.flatMap(z=>z.values))),n=f.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,c=(k.value.width-n)/s,x=Math.abs(Math.min(r,0)),ye=l+x;function ke(g){return isNaN(g/ye)?0:g/ye}return C.value.map((g,z)=>{const xe=k.value.top+m.value*z,M=k.value.top+xe+m.value*ae.value*(1-ke(x));return{...g,label:{x:n-t.value.style.chart.yAxis.labels.fontSize,y:M},datapoints:g.datapoints.map(R=>{const q=R.values.map((W,Xe)=>{const Ie=isNaN(W)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(W)?0:W||0,He=n+c*Xe,Re=k.value.top+xe+m.value*ae.value*(1-ke(Ie+x)),qe=W===Math.max(...R.values);return{x:He,y:Re,value:W,isMaxPoint:qe,zero:M}}),Oe=`${u.createSmoothAreaSegments(q,M,!1,!1)}`,De=`M ${n},${M} ${u.createStraightPath(q)} ${q.at(-1).x},${M}`,Fe=`M ${n},${M} ${q.at(-1).x},${M}`;return{...R,plots:q,smoothPath:Oe,straightPath:De,zeroPath:Fe}}).filter(R=>!S.value.includes(R.id))}})}),S=e.ref([]);function ze(a){const s=new Map;return a.forEach(l=>{l.datapoints.forEach((r,n)=>{const c=u.slugify(r.name);s.has(c)||s.set(c,{id:c,name:r.name,color:r.color,shape:"circle",segregate:()=>ce(c),isSegregated:S.value.includes(c),opacity:S.value.includes(c)?.5:1})})}),Array.from(s.values())}const j=e.computed(()=>ze(C.value)),Me=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":""})),H=e.ref(!1);function Le(a){H.value=a,B.value+=1}const ve=e.ref({}),me=e.ref([]);function Ve(a){L("selectDatapoint",a),t.value.style.chart.dialog.show&&(me.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,ve.value={...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 _e(a){oe.value=a}function Te(){oe.value=null}const J=e.ref(!1);function re(){J.value=!J.value}function fe(){X.value.showTable=!X.value.showTable}const pe=e.computed(()=>({body:I.value.flatMap(l=>l.datapoints.flatMap(r=>({...r,rowName:`${l.name}: ${r.name}`}))).map(l=>[{name:l.rowName,color:l.color},...l.values])})),K=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:pe.value.body,config:s}});function ge(){e.nextTick(()=>{const a=[[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values.map(r=>[r])],...pe.value.body.map((r,n)=>[r[0].name,...r.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 Pe(){return I.value}return Q({getData:Pe,generateImage:ue,generatePdf:ie,generateCsv:ge,toggleAnnotator:re,toggleTable:fe}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ridgelineChart",ref:o,class:e.normalizeClass(`vue-ui-ridgeline ${H.value?"vue-data-ui-wrapper-fullscreen":""}`),id:`vue-ui-ridgeline_${y.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(G)(!0)),onMouseleave:s[5]||(s[5]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(te)?(e.openBlock(),e.createBlock(Ke._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:J.value,svgRef:e.unref(te),onClose:re},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"userConfig",{},void 0,!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:P,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:U,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(et._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(F)||e.unref(D))?(e.openBlock(),e.createBlock(be.UserOptions,{ref:"details",key:`user_option_${B.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(se),uid:y.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:H.value,chartElement:o.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(F)?e.unref(D)?"visible":"hidden":"visible"}),onToggleFullscreen:Le,onGeneratePdf:e.unref(ie),onGenerateCsv:ge,onGenerateImage:e.unref(ue),onToggleTable:fe,onToggleAnnotator:re},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),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:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),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:te,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":H.value,"vue-data-ui-fulscreen--off":!H.value}),viewBox:`0 0 ${f.value.width<=0?10:f.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: 100%; width: 100%;":""}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient-${l.id}-${y.value}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color,"stop-opacity":"1"},null,8,ct),e.createElementVNode("stop",{offset:"30%","stop-color":l.color,"stop-opacity":"0.7"},null,8,dt),e.createElementVNode("stop",{offset:"70%","stop-color":l.color,"stop-opacity":"0.3"},null,8,ht),e.createElementVNode("stop",{offset:"100%","stop-color":l.color,"stop-opacity":"0.1"},null,8,vt)],8,ut))),256))]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(l,r)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{variable:l,patternId:`pattern_${y.value}_${r}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(n,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{fill:t.value.style.chart.backgroundColor,stroke:"none","stroke-linecap":"round",d:t.value.style.chart.areas.smooth?n.smoothPath:n.straightPath,style:e.normalizeStyle({opacity:t.value.style.chart.areas.opacity})},null,12,ft),e.createElementVNode("path",{fill:`url(#gradient-${n.id}-${y.value})`,stroke:t.value.style.chart.areas.stroke.useSerieColor?n.color:t.value.style.chart.areas.stroke.color,"stroke-width":t.value.style.chart.areas.strokeWidth,d:t.value.style.chart.areas.smooth?n.smoothPath:n.straightPath,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,pt),e.createElementVNode("path",{stroke:t.value.style.chart.zeroLine.useSerieColor?n.color:t.value.style.chart.zeroLine.stroke,"stroke-dasharray":t.value.style.chart.zeroLine.strokeDasharray,"stroke-width":t.value.style.chart.zeroLine.strokeWidth,d:n.zeroPath,"stroke-linecap":"round"},null,8,gt),t.value.style.chart.areas.maxPoint.show&&n.plots.length>1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.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)(n.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,yt)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),n.plots.length===1?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:n.plots[0].x,cy:n.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?n.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,kt)):e.createCommentVNode("",!0)]))),256)),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===r||i.value&&l.uid===i.value.uid)?"underline":"",onMouseenter:n=>_e(r),onMouseleave:Te,onClick:n=>Ve(l)},e.toDisplayString(l.name),45,xt)]))),256)),t.value.style.chart.xAxis.labels.values.length?(e.openBlock(),e.createElementBlock("g",bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,r)=>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&&(r===0||r===_.value.length-1)||l&&h.value&&h.value.index===r||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&r%Math.floor(_.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&&(r===0||r===_.value.length-1)||l&&h.value&&h.value.index===r||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&r%Math.floor(_.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===r?1:.2:1})},e.toDisplayString(l.label),13,wt)):e.createCommentVNode("",!0)],!0)),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,r)=>(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:n=>h.value=l,onMouseleave:s[0]||(s[0]=n=>h.value=null),onClick:()=>Ae(l)},null,40,Ct))),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-m.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,Bt)):e.createCommentVNode("",!0),h.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(I.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(n,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.x,cy:n.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?r.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,St)):e.createCommentVNode("",!0),h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("text",{key:1,x:he(n.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,n.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:n.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?n.x-t.value.style.chart.selector.labels.fontSize/2:n.x+t.value.style.chart.selector.labels.fontSize/2,y:n.y+t.value.style.chart.selector.labels.fontSize/3,"text-anchor":he(n.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,n.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:n.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,n.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:n.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding}))),9,Et)):e.createCommentVNode("",!0)],64))),256))],64))),256))],64))),256)):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"svg",{svg:f.value},void 0,!0)],14,it)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",At,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ne)||e.unref(se)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ze.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:T},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Je.Legend,{key:`legend_${O.value}`,legendSet:j.value,config:Me.value,onClickMarker:s[1]||(s[1]=({legend:l})=>ce(l.id))},e.createSlots({item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${S.value.includes(l.id)?.5:1}`),onClick:r=>l.segregate()},e.toDisplayString(l.name),13,$t)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Qe._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${y.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:j.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:w,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Ye.default,{key:8,hideDetails:"",config:{open:X.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(je.DataTable,{key:`table_${$.value}`,colNames:K.value.colNames,head:K.value.head,body:K.value.body,config:K.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=>X.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Nt)]),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(nt,{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(tt.default,{key:0,config:ve.value,dataset:me.value},null,8,["config","dataset"])):e.createCommentVNode("",!0)]),_:1},8,["backgroundColor","color","headerBg","headerColor"])):e.createCommentVNode("",!0)],46,st))}},Mt=Be._export_sfc(zt,[["__scopeId","data-v-2685d149"]]);exports.default=Mt;