vue-data-ui 2.5.2 → 2.5.4

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 (153) hide show
  1. package/dist/{Arrow-B6TKrox1.cjs → Arrow-CugMOJh3.cjs} +1 -1
  2. package/dist/{Arrow-DWRIfIAk.js → Arrow-F-M9c-Vx.js} +1 -1
  3. package/dist/{BaseIcon-BdnE2DAH.cjs → BaseIcon-CSbujQk3.cjs} +1 -1
  4. package/dist/{BaseIcon-QBIdDtsh.js → BaseIcon-DTEOvybQ.js} +1 -1
  5. package/dist/{DataTable-BaW_PF1t.js → DataTable-B3ZldeJU.js} +2 -2
  6. package/dist/{DataTable-D8Jrpq-B.cjs → DataTable-BxaOAPGG.cjs} +1 -1
  7. package/dist/{Legend-D_1LwKfa.cjs → Legend-BFdRFUZD.cjs} +1 -1
  8. package/dist/{Legend-Qe36RQO1.js → Legend-DuOUM8rR.js} +2 -2
  9. package/dist/{PackageVersion-DBbbI7TU.js → PackageVersion-BJurjgIS.js} +1 -1
  10. package/dist/{PackageVersion-CLMnI-8e.cjs → PackageVersion-DK_OFHd7.cjs} +1 -1
  11. package/dist/{PenAndPaper-DxTPtHU5.cjs → PenAndPaper-CDwDlhXM.cjs} +1 -1
  12. package/dist/{PenAndPaper-tV-SbWUa.js → PenAndPaper-D6oZdwvp.js} +3 -3
  13. package/dist/{Shape-BDcnW_8x.js → Shape-CHIgmdeu.js} +1 -1
  14. package/dist/{Shape-lPTNUyoX.cjs → Shape-DQlHou1s.cjs} +1 -1
  15. package/dist/{Slicer-UxISG-yc.cjs → Slicer-Cu27QOdn.cjs} +1 -1
  16. package/dist/{Slicer-BnomLNhl.js → Slicer-HlD3UeXI.js} +2 -2
  17. package/dist/{Title-C6GY7-tb.cjs → Title-Cnr0E9IA.cjs} +1 -1
  18. package/dist/{Title-hfEOmPlv.js → Title-r4pZn0TU.js} +1 -1
  19. package/dist/{Tooltip-CVzhBGn7.cjs → Tooltip-BK34ShAt.cjs} +1 -1
  20. package/dist/{Tooltip-DvcJ9uFx.js → Tooltip-BRDNF1M6.js} +1 -1
  21. package/dist/{index-8TfPi9lB.cjs → index-D4Ci0bak.cjs} +1 -1
  22. package/dist/{index-OhfEeW2N.js → index-m6iVGCIc.js} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-Cwjz-hIm.js → useNestedProp-BO65z1Rt.js} +1 -1
  25. package/dist/{useNestedProp-BKRkMJ0r.cjs → useNestedProp-B_G2vdgc.cjs} +1 -1
  26. package/dist/{usePrinter-stvkbwgz.js → usePrinter-D6-AMOJS.js} +1 -1
  27. package/dist/{usePrinter-CzqlwBQp.cjs → usePrinter-ZADvMzaH.cjs} +1 -1
  28. package/dist/{vue-data-ui-BtU5J1kO.js → vue-data-ui-B2BpJIsK.js} +61 -61
  29. package/dist/{vue-data-ui-BU2uVZ8u.cjs → vue-data-ui-JHXT_i8D.cjs} +1 -1
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-Bf1P0qgr.js → vue-ui-3d-bar-BerWlwad.js} +9 -9
  33. package/dist/{vue-ui-3d-bar-Dyo1Q2wP.cjs → vue-ui-3d-bar-DhtyZWBp.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-CDyaHBeZ.cjs → vue-ui-accordion-BTL7UkJz.cjs} +1 -1
  35. package/dist/{vue-ui-accordion-BH0OU8sD.js → vue-ui-accordion-CXNwNRM_.js} +3 -3
  36. package/dist/{vue-ui-age-pyramid-pVg5s_Ov.cjs → vue-ui-age-pyramid-CvDUqBY8.cjs} +1 -1
  37. package/dist/{vue-ui-age-pyramid-D_geE4yV.js → vue-ui-age-pyramid-DysOw6YD.js} +10 -10
  38. package/dist/{vue-ui-annotator-B7SCNeQW.js → vue-ui-annotator-CUxow_1G.js} +1 -1
  39. package/dist/{vue-ui-annotator-C801utZu.cjs → vue-ui-annotator-LNW5c818.cjs} +1 -1
  40. package/dist/{vue-ui-bullet-BkhafZhy.js → vue-ui-bullet-BZJJiw9i.js} +8 -8
  41. package/dist/{vue-ui-bullet-BHEWqnfi.cjs → vue-ui-bullet-mrfn6v28.cjs} +1 -1
  42. package/dist/{vue-ui-candlestick-p--HKs4y.js → vue-ui-candlestick-C1RqJrCY.js} +11 -11
  43. package/dist/{vue-ui-candlestick-DO_gKBjH.cjs → vue-ui-candlestick-DDhpAe9Y.cjs} +1 -1
  44. package/dist/{vue-ui-carousel-table-CFkTzNWc.cjs → vue-ui-carousel-table--uUg5El4.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-085oPZYs.js → vue-ui-carousel-table-lMOZQ6R8.js} +4 -4
  46. package/dist/{vue-ui-chestnut-nwV10tRK.cjs → vue-ui-chestnut-B3-VR9yB.cjs} +1 -1
  47. package/dist/{vue-ui-chestnut-DwwohH1I.js → vue-ui-chestnut-C4fwPxl1.js} +8 -8
  48. package/dist/vue-ui-circle-pack-CXrc78U1.cjs +1 -0
  49. package/dist/{vue-ui-circle-pack-CEbJgElX.js → vue-ui-circle-pack-r05Ynz-5.js} +13 -13
  50. package/dist/{vue-ui-cursor-DoI4WKkL.js → vue-ui-cursor-DPWtuCQX.js} +2 -2
  51. package/dist/{vue-ui-cursor-Dy-h9HRU.cjs → vue-ui-cursor-r8i851v-.cjs} +1 -1
  52. package/dist/{vue-ui-dashboard-S_-VrC-e.js → vue-ui-dashboard-CRll2osF.js} +2 -2
  53. package/dist/{vue-ui-dashboard-D4D8EpSH.cjs → vue-ui-dashboard-Tla8OwYU.cjs} +1 -1
  54. package/dist/{vue-ui-digits-DVrKHvAx.js → vue-ui-digits-BUXM9Hw1.js} +2 -2
  55. package/dist/{vue-ui-digits-woeBxaRE.cjs → vue-ui-digits-ztSsVVIv.cjs} +1 -1
  56. package/dist/{vue-ui-donut-BQpTsxFs.cjs → vue-ui-donut-DrQ7UQkp.cjs} +1 -1
  57. package/dist/{vue-ui-donut-DLSPHatR.js → vue-ui-donut-RXhsvvxk.js} +12 -12
  58. package/dist/{vue-ui-donut-evolution-BNz1stCl.cjs → vue-ui-donut-evolution-DbjPrIu3.cjs} +1 -1
  59. package/dist/{vue-ui-donut-evolution-CUISQ53T.js → vue-ui-donut-evolution-XOwENyp5.js} +11 -11
  60. package/dist/{vue-ui-dumbbell-BANsx_dg.js → vue-ui-dumbbell-Dqs_9bOT.js} +10 -10
  61. package/dist/{vue-ui-dumbbell-BEbI6awt.cjs → vue-ui-dumbbell-xu5_5shw.cjs} +1 -1
  62. package/dist/{vue-ui-flow-DkLbGRW4.js → vue-ui-flow-C0pzB2gR.js} +9 -9
  63. package/dist/{vue-ui-flow-_0zTxd16.cjs → vue-ui-flow-RtY6EVZx.cjs} +1 -1
  64. package/dist/{vue-ui-funnel-D6i4ABc6.js → vue-ui-funnel-DVLoFHCF.js} +9 -9
  65. package/dist/{vue-ui-funnel-BiHd3sXy.cjs → vue-ui-funnel-oQ0cxx-J.cjs} +1 -1
  66. package/dist/{vue-ui-galaxy-LHVVEbkR.cjs → vue-ui-galaxy-CXCt3KcT.cjs} +1 -1
  67. package/dist/{vue-ui-galaxy-C5_aW-lx.js → vue-ui-galaxy-CtQY-Svd.js} +11 -11
  68. package/dist/{vue-ui-gauge-CQWnEC8a.js → vue-ui-gauge-CODVyI5P.js} +7 -7
  69. package/dist/{vue-ui-gauge-CuG7d3WL.cjs → vue-ui-gauge-Cf1FL8oo.cjs} +1 -1
  70. package/dist/{vue-ui-gizmo-B8da3ua8.js → vue-ui-gizmo-CBcGGjIi.js} +3 -3
  71. package/dist/{vue-ui-gizmo-DT4GUmYv.cjs → vue-ui-gizmo-CqwDBebT.cjs} +1 -1
  72. package/dist/{vue-ui-heatmap-pcdqGLRS.js → vue-ui-heatmap-BUtkysVs.js} +10 -10
  73. package/dist/{vue-ui-heatmap-BRSvLW0z.cjs → vue-ui-heatmap-qEmYPZbd.cjs} +1 -1
  74. package/dist/{vue-ui-history-plot-B2DaZsY0.js → vue-ui-history-plot-NimiFXGH.js} +11 -11
  75. package/dist/{vue-ui-history-plot-BVu0hQ59.cjs → vue-ui-history-plot-SNqQH6w1.cjs} +1 -1
  76. package/dist/{vue-ui-kpi-DLVZ4U8H.cjs → vue-ui-kpi-KcjC8oHU.cjs} +1 -1
  77. package/dist/{vue-ui-kpi-D7j0srlP.js → vue-ui-kpi-PpcxcfOy.js} +3 -3
  78. package/dist/{vue-ui-mini-loader-RBVygXcT.cjs → vue-ui-mini-loader-BVDaghpN.cjs} +1 -1
  79. package/dist/{vue-ui-mini-loader-D7VHDTGz.js → vue-ui-mini-loader-Db4Z47H8.js} +2 -2
  80. package/dist/{vue-ui-molecule-C_uhs2U_.js → vue-ui-molecule-BN9Rk5mt.js} +11 -11
  81. package/dist/{vue-ui-molecule-CbZJ0z9y.cjs → vue-ui-molecule-DWK9F255.cjs} +1 -1
  82. package/dist/{vue-ui-mood-radar-CU0CfAfQ.js → vue-ui-mood-radar-COYf5-82.js} +11 -11
  83. package/dist/{vue-ui-mood-radar-C-dVtA4T.cjs → vue-ui-mood-radar-DUZ0CTv2.cjs} +1 -1
  84. package/dist/{vue-ui-nested-donuts-Dn138dxB.cjs → vue-ui-nested-donuts-ChC_mKQK.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-D8LwVfr9.js → vue-ui-nested-donuts-x_mGivS2.js} +11 -11
  86. package/dist/{vue-ui-onion-4Kme64Fh.cjs → vue-ui-onion-B3AxBNNO.cjs} +1 -1
  87. package/dist/{vue-ui-onion-BfGt1Swk.js → vue-ui-onion-PN4EpGz4.js} +11 -11
  88. package/dist/{vue-ui-parallel-coordinate-plot-CzmGTTtd.cjs → vue-ui-parallel-coordinate-plot-BbybW_NU.cjs} +1 -1
  89. package/dist/{vue-ui-parallel-coordinate-plot-I0JYDTzv.js → vue-ui-parallel-coordinate-plot-D7fONKY5.js} +12 -12
  90. package/dist/{vue-ui-quadrant-DUJK0sJm.cjs → vue-ui-quadrant-4OfBh6aQ.cjs} +1 -1
  91. package/dist/{vue-ui-quadrant-BkM4J8Zo.js → vue-ui-quadrant-ounvlinz.js} +12 -12
  92. package/dist/{vue-ui-quick-chart-DOIEo_Ek.js → vue-ui-quick-chart-BKKI1C5i.js} +9 -9
  93. package/dist/{vue-ui-quick-chart-BOOd6VGK.cjs → vue-ui-quick-chart-gGmNTDNG.cjs} +1 -1
  94. package/dist/{vue-ui-radar-KqvUF0yd.cjs → vue-ui-radar-BK52aCAG.cjs} +1 -1
  95. package/dist/{vue-ui-radar-DCuyQ8TQ.js → vue-ui-radar-DQN-x_Z1.js} +12 -12
  96. package/dist/{vue-ui-rating-IQbpjp9W.js → vue-ui-rating-8M-dNrfY.js} +2 -2
  97. package/dist/{vue-ui-rating-Cf9IXhte.cjs → vue-ui-rating-DWnvRkfx.cjs} +1 -1
  98. package/dist/{vue-ui-relation-circle-D6oDkLxu.js → vue-ui-relation-circle-BsZnvw15.js} +7 -7
  99. package/dist/{vue-ui-relation-circle-Ch4R9uAU.cjs → vue-ui-relation-circle-C86zfgYR.cjs} +1 -1
  100. package/dist/{vue-ui-rings-DIIMJ6Ki.js → vue-ui-rings-CRsDNe-o.js} +12 -12
  101. package/dist/{vue-ui-rings-DUZubsW3.cjs → vue-ui-rings-SgNgftWB.cjs} +1 -1
  102. package/dist/{vue-ui-scatter-eKhsBZM7.cjs → vue-ui-scatter-CdJie66o.cjs} +1 -1
  103. package/dist/{vue-ui-scatter-DlB5PjIz.js → vue-ui-scatter-Du2PvA0r.js} +12 -12
  104. package/dist/{vue-ui-screenshot-BvDI2Y8t.cjs → vue-ui-screenshot-BbfcpPbP.cjs} +1 -1
  105. package/dist/{vue-ui-screenshot-cTGWG_q0.js → vue-ui-screenshot-D-6uk7cV.js} +1 -1
  106. package/dist/{vue-ui-skeleton-ilN9FTO6.cjs → vue-ui-skeleton-8d9YBsC-.cjs} +1 -1
  107. package/dist/{vue-ui-skeleton-CZBWPZpy.js → vue-ui-skeleton-aZahITpG.js} +3 -3
  108. package/dist/{vue-ui-smiley-DfgDQnG8.cjs → vue-ui-smiley-LcAq4yk7.cjs} +1 -1
  109. package/dist/{vue-ui-smiley-DvDya3We.js → vue-ui-smiley-YmY60NmL.js} +2 -2
  110. package/dist/{vue-ui-spark-trend-ChVtimzF.cjs → vue-ui-spark-trend-C2bAfpqt.cjs} +1 -1
  111. package/dist/{vue-ui-spark-trend-8QHcYdgb.js → vue-ui-spark-trend-CBrcmNWo.js} +5 -5
  112. package/dist/{vue-ui-sparkbar-_FtDdeUa.js → vue-ui-sparkbar-C3I3hvjY.js} +4 -4
  113. package/dist/{vue-ui-sparkbar-B6n8KYPy.cjs → vue-ui-sparkbar-u5E5wVAO.cjs} +1 -1
  114. package/dist/{vue-ui-sparkgauge-B_j3XcZO.js → vue-ui-sparkgauge-B5Ll6mpc.js} +4 -4
  115. package/dist/{vue-ui-sparkgauge-5XOcWXho.cjs → vue-ui-sparkgauge-C4PmCxtR.cjs} +1 -1
  116. package/dist/{vue-ui-sparkhistogram-C9p3d3J9.js → vue-ui-sparkhistogram-BFYpwxZ9.js} +5 -5
  117. package/dist/{vue-ui-sparkhistogram-DmwtHHUR.cjs → vue-ui-sparkhistogram-BP4jEXtC.cjs} +1 -1
  118. package/dist/{vue-ui-sparkline-C4Vopkk9.js → vue-ui-sparkline-BUypnQdu.js} +4 -4
  119. package/dist/{vue-ui-sparkline-_vAuMTEe.cjs → vue-ui-sparkline-CANH6-4C.cjs} +1 -1
  120. package/dist/{vue-ui-sparkstackbar-CBRJEeRr.js → vue-ui-sparkstackbar-D3mseF6j.js} +5 -5
  121. package/dist/{vue-ui-sparkstackbar-3N5wyfEu.cjs → vue-ui-sparkstackbar-DaDGaG4d.cjs} +1 -1
  122. package/dist/{vue-ui-stackbar-BzbafUmP.js → vue-ui-stackbar-Kc2MRgBp.js} +13 -13
  123. package/dist/{vue-ui-stackbar-CrTAjJpl.cjs → vue-ui-stackbar-dpca1jL7.cjs} +1 -1
  124. package/dist/{vue-ui-strip-plot-T0bYake6.cjs → vue-ui-strip-plot-DqoZugSf.cjs} +1 -1
  125. package/dist/{vue-ui-strip-plot-BnGNBKdY.js → vue-ui-strip-plot-DtIV3O-C.js} +11 -11
  126. package/dist/{vue-ui-table-DBC5CyhX.js → vue-ui-table-C-mRIujK.js} +1 -1
  127. package/dist/{vue-ui-table-Csf-GIDz.cjs → vue-ui-table-C9Int_9C.cjs} +1 -1
  128. package/dist/{vue-ui-table-heatmap-zoNwnmLR.js → vue-ui-table-heatmap-BDOxml31.js} +4 -4
  129. package/dist/{vue-ui-table-heatmap-CvAJBKKA.cjs → vue-ui-table-heatmap-D-6wmiUN.cjs} +1 -1
  130. package/dist/{vue-ui-table-sparkline-zwvphD8h.cjs → vue-ui-table-sparkline-Bp6mwwJD.cjs} +1 -1
  131. package/dist/{vue-ui-table-sparkline-C6bJM-f0.js → vue-ui-table-sparkline-CaV2U4UR.js} +5 -5
  132. package/dist/{vue-ui-thermometer-BIYcENnb.js → vue-ui-thermometer-BREunTaH.js} +7 -7
  133. package/dist/{vue-ui-thermometer-DUxXfiGM.cjs → vue-ui-thermometer-CONg_NWo.cjs} +1 -1
  134. package/dist/{vue-ui-timer-MLu40_bj.js → vue-ui-timer-DnfFciAy.js} +5 -5
  135. package/dist/{vue-ui-timer-CcLN8TnA.cjs → vue-ui-timer-jgelBK9i.cjs} +1 -1
  136. package/dist/{vue-ui-tiremarks-MFmGeu6B.js → vue-ui-tiremarks-C4NEY43E.js} +7 -7
  137. package/dist/{vue-ui-tiremarks-C9CecS3O.cjs → vue-ui-tiremarks-CQ6nfZIP.cjs} +1 -1
  138. package/dist/{vue-ui-treemap-DyG27xaQ.cjs → vue-ui-treemap-E4dKMckc.cjs} +1 -1
  139. package/dist/{vue-ui-treemap-ftHRUAk5.js → vue-ui-treemap-uSbVj2ef.js} +11 -11
  140. package/dist/{vue-ui-vertical-bar-DguUw97r.cjs → vue-ui-vertical-bar-CQtesFbI.cjs} +1 -1
  141. package/dist/{vue-ui-vertical-bar-L0xygeZE.js → vue-ui-vertical-bar-XdEIKWO8.js} +12 -12
  142. package/dist/{vue-ui-waffle-B-QYt7UZ.cjs → vue-ui-waffle-32Arb3qH.cjs} +1 -1
  143. package/dist/{vue-ui-waffle-CIB4Siw3.js → vue-ui-waffle-BYxe-miL.js} +12 -12
  144. package/dist/{vue-ui-wheel-CRPNNms-.js → vue-ui-wheel-B-ScVQsN.js} +7 -7
  145. package/dist/{vue-ui-wheel-DywU63kY.cjs → vue-ui-wheel-rna7vOjr.cjs} +1 -1
  146. package/dist/{vue-ui-word-cloud-CyrBFbga.js → vue-ui-word-cloud-COpBIMWk.js} +10 -10
  147. package/dist/{vue-ui-word-cloud-Cuw5VBTB.cjs → vue-ui-word-cloud-Fu1DVDXc.cjs} +1 -1
  148. package/dist/{vue-ui-xy-BU8znJsu.cjs → vue-ui-xy-BkynGdon.cjs} +1 -1
  149. package/dist/{vue-ui-xy-db3m5Vm0.js → vue-ui-xy-Bw5Vrmit.js} +14 -14
  150. package/dist/{vue-ui-xy-canvas-FQFE06yk.cjs → vue-ui-xy-canvas-22M2lGoy.cjs} +1 -1
  151. package/dist/{vue-ui-xy-canvas-CoVdHIGi.js → vue-ui-xy-canvas-DCrcrdCe.js} +11 -11
  152. package/package.json +1 -1
  153. package/dist/vue-ui-circle-pack-Ckz1noNv.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-8TfPi9lB.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ce=require("./Title-C6GY7-tb.cjs"),Q=require("./usePrinter-CzqlwBQp.cjs"),de=require("./DataTable-D8Jrpq-B.cjs"),ve=require("./vue-ui-skeleton-ilN9FTO6.cjs"),he=require("./Legend-D_1LwKfa.cjs"),ye=require("./vue-ui-accordion-CDyaHBeZ.cjs"),ee=require("./useNestedProp-BKRkMJ0r.cjs"),fe=require("./PackageVersion-CLMnI-8e.cjs"),me=require("./PenAndPaper-DxTPtHU5.cjs"),be=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],ke=["xmlns","viewBox"],xe=["x","y","width","height"],_e={key:1},Ce=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],we={key:2},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ee={key:3},$e=["x","y","font-size","fill","font-weight"],Le=["x","y","font-size","fill"],Se={key:4},Ve=["x","y","font-size","fill","font-weight"],ze=["id"],Ae=["stop-color"],Pe=["stop-color"],Te=["stop-color"],Xe=["id"],De=["stop-color"],Oe=["stop-color"],Fe=["stop-color"],Me=["id"],Ge=["stop-color"],Ie=["stop-color"],qe=["id"],He=["stop-color"],Ue=["stop-color"],Re={key:0},We=["d","fill"],je={key:1},Ye=["x","y","height","width","fill"],Ze=["cx","cy","r","fill","stroke","stroke-width"],Je=["cx","cy","r","fill","stroke","stroke-width"],Ke={key:2},Qe=["x","y","fill","font-size"],et={key:3},tt=["x","y","fill","font-size"],lt={key:5,class:"vue-data-ui-watermark"},at=["xmlns","height","width"],ot=["fill"],rt=["innerHTML"],st={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(te,{expose:le,emit:ut}){const y=te,{vue_ui_dumbbell:ae}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),V=e.ref(0),p=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),D=e.ref(0),O=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=be.useUserOptionState({config:t.value});function G(){const a=ee.useNestedProp({userConfig:y.config,defaultConfig:ae});return a.theme?{...ee.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,I(),X.value+=1,D.value+=1,O.value+=1,c.value=t.value.style.chart.rowHeight,k.value=t.value.style.chart.width,g.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>y.dataset,a=>{j()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{I()});function I(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=K.throttle(()=>{const{width:n,height:l}=K.useResponsive({chart:p.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{k.value=n,c.value=l/y.dataset.length,v.value=C()})});_.value=new ResizeObserver(a),_.value.observe(p.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:q,isImaging:H,generatePdf:U,generateImage:R}=Q.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),oe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),g=e.ref({showTable:t.value.table.show}),f=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...f.value.flatMap(a=>[a.start,a.end])),min:Math.min(...f.value.flatMap(a=>[a.start,a.end]))})),i=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),c=e.ref(t.value.style.chart.rowHeight),k=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=c.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+k.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=i.value.ticks.length*(k.value/i.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:k.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return f.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*c.value+c.value/2,endVal:a.start}})}const v=e.ref([]),W=e.ref(null),re=e.computed(()=>f.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{j()});function j(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=f.value.map(r=>r.end-r.start);a>=re.value?(cancelAnimationFrame(W.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,N=o.value.left+(r.endVal+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,S=h+(N-h)/2;return{...r,startX:h,endX:N,centerX:S,y:o.value.top+u*c.value+c.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),W.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const Y=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),se=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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),m=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=m.value.head.map((u,h)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ie=s.dataLabel({v:100*(m.value.body[h].end/m.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},N,S,ie]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function Z(){e.nextTick(()=>{const a=m.value.head.map((r,u)=>[[r.name],[m.value.body[u].start],[m.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const x=e.ref(!1);function ne(a){x.value=a,V.value+=1}function ue(){return v.value}function J(){g.value.showTable=!g.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return le({getData:ue,generatePdf:U,generateCsv:Z,generateImage:R,toggleTable:J,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(H),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(U),onGenerateCsv:Z,onGenerateImage:e.unref(R),onToggleTable:J,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}: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:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:o.value.left,y:o.value.top,width:o.value.width,height:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(i.value.ticks.length-1),x2:o.value.left+r*o.value.width/(i.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,Ce))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*c.value,y2:o.value.top+r*c.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Be))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Ne)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*c.value+(t.value.style.chart.labels.yAxisLabels.showProgression?c.value/3:c.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,$e))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*c.value+c.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,Le))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(i.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:r})),9,Ve))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Te)],8,ze),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,De),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Fe)],8,Xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,Me),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ue)],8,qe)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D4Ci0bak.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ce=require("./Title-Cnr0E9IA.cjs"),Q=require("./usePrinter-ZADvMzaH.cjs"),de=require("./DataTable-BxaOAPGG.cjs"),ve=require("./vue-ui-skeleton-8d9YBsC-.cjs"),he=require("./Legend-BFdRFUZD.cjs"),ye=require("./vue-ui-accordion-BTL7UkJz.cjs"),ee=require("./useNestedProp-B_G2vdgc.cjs"),fe=require("./PackageVersion-DK_OFHd7.cjs"),me=require("./PenAndPaper-CDwDlhXM.cjs"),be=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],ke=["xmlns","viewBox"],xe=["x","y","width","height"],_e={key:1},Ce=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],we={key:2},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ee={key:3},$e=["x","y","font-size","fill","font-weight"],Le=["x","y","font-size","fill"],Se={key:4},Ve=["x","y","font-size","fill","font-weight"],ze=["id"],Ae=["stop-color"],Pe=["stop-color"],Te=["stop-color"],Xe=["id"],De=["stop-color"],Oe=["stop-color"],Fe=["stop-color"],Me=["id"],Ge=["stop-color"],Ie=["stop-color"],qe=["id"],He=["stop-color"],Ue=["stop-color"],Re={key:0},We=["d","fill"],je={key:1},Ye=["x","y","height","width","fill"],Ze=["cx","cy","r","fill","stroke","stroke-width"],Je=["cx","cy","r","fill","stroke","stroke-width"],Ke={key:2},Qe=["x","y","fill","font-size"],et={key:3},tt=["x","y","fill","font-size"],lt={key:5,class:"vue-data-ui-watermark"},at=["xmlns","height","width"],ot=["fill"],rt=["innerHTML"],st={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(te,{expose:le,emit:ut}){const y=te,{vue_ui_dumbbell:ae}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),V=e.ref(0),p=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),D=e.ref(0),O=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=be.useUserOptionState({config:t.value});function G(){const a=ee.useNestedProp({userConfig:y.config,defaultConfig:ae});return a.theme?{...ee.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,I(),X.value+=1,D.value+=1,O.value+=1,c.value=t.value.style.chart.rowHeight,k.value=t.value.style.chart.width,g.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>y.dataset,a=>{j()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{I()});function I(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=K.throttle(()=>{const{width:n,height:l}=K.useResponsive({chart:p.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{k.value=n,c.value=l/y.dataset.length,v.value=C()})});_.value=new ResizeObserver(a),_.value.observe(p.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:q,isImaging:H,generatePdf:U,generateImage:R}=Q.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),oe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),g=e.ref({showTable:t.value.table.show}),f=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...f.value.flatMap(a=>[a.start,a.end])),min:Math.min(...f.value.flatMap(a=>[a.start,a.end]))})),i=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),c=e.ref(t.value.style.chart.rowHeight),k=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=c.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+k.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=i.value.ticks.length*(k.value/i.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:k.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return f.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*c.value+c.value/2,endVal:a.start}})}const v=e.ref([]),W=e.ref(null),re=e.computed(()=>f.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{j()});function j(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=f.value.map(r=>r.end-r.start);a>=re.value?(cancelAnimationFrame(W.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,N=o.value.left+(r.endVal+Math.abs(i.value.min))/(i.value.max+Math.abs(i.value.min))*o.value.widthPlotReference,S=h+(N-h)/2;return{...r,startX:h,endX:N,centerX:S,y:o.value.top+u*c.value+c.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),W.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const Y=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),se=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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),m=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=m.value.head.map((u,h)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ie=s.dataLabel({v:100*(m.value.body[h].end/m.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},N,S,ie]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function Z(){e.nextTick(()=>{const a=m.value.head.map((r,u)=>[[r.name],[m.value.body[u].start],[m.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const x=e.ref(!1);function ne(a){x.value=a,V.value+=1}function ue(){return v.value}function J(){g.value.showTable=!g.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return le({getData:ue,generatePdf:U,generateCsv:Z,generateImage:R,toggleTable:J,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(H),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(U),onGenerateCsv:Z,onGenerateImage:e.unref(R),onToggleTable:J,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}: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:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:o.value.left,y:o.value.top,width:o.value.width,height:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(i.value.ticks.length-1),x2:o.value.left+r*o.value.width/(i.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,Ce))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*c.value,y2:o.value.top+r*c.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Be))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Ne)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*c.value+(t.value.style.chart.labels.yAxisLabels.showProgression?c.value/3:c.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,$e))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*c.value+c.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,Le))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(i.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:r})),9,Ve))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Te)],8,ze),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,De),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Fe)],8,Xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,Me),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ue)],8,qe)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("path",{d:`M
2
2
  ${l.startX},${l.y+t.value.style.chart.plots.radius/2}
3
3
  C ${l.centerX},${l.y} ${l.centerX},${l.y}
4
4
  ${l.endX},${l.y+t.value.style.chart.plots.radius/2}
@@ -1,13 +1,13 @@
1
1
  import { computed as p, onMounted as ze, ref as b, watch as Ye, openBlock as u, createElementBlock as c, normalizeClass as me, normalizeStyle as x, unref as i, createBlock as F, createCommentVNode as k, createSlots as De, withCtx as w, renderSlot as m, normalizeProps as W, guardReactiveProps as q, createVNode as ye, createElementVNode as M, Fragment as I, renderList as L, toDisplayString as R, createTextVNode as Ge, nextTick as Ue } from "vue";
2
- import { u as Ve, o as Be, e as je, c as be, t as Xe, a as We, p as Z, b as qe, v as h, f as ke, X as Re, G as we, L as Ze, i as Je, q as Ke, r as Qe } from "./index-OhfEeW2N.js";
3
- import { _ as et } from "./Title-hfEOmPlv.js";
4
- import { u as tt, U as ot } from "./usePrinter-stvkbwgz.js";
5
- import { D as lt } from "./DataTable-BaW_PF1t.js";
6
- import at from "./vue-ui-accordion-BH0OU8sD.js";
7
- import nt from "./vue-ui-skeleton-CZBWPZpy.js";
8
- import { u as Ce } from "./useNestedProp-Cwjz-hIm.js";
9
- import { _ as st } from "./PackageVersion-DBbbI7TU.js";
10
- import { P as rt } from "./PenAndPaper-tV-SbWUa.js";
2
+ import { u as Ve, o as Be, e as je, c as be, t as Xe, a as We, p as Z, b as qe, v as h, f as ke, X as Re, G as we, L as Ze, i as Je, q as Ke, r as Qe } from "./index-m6iVGCIc.js";
3
+ import { _ as et } from "./Title-r4pZn0TU.js";
4
+ import { u as tt, U as ot } from "./usePrinter-D6-AMOJS.js";
5
+ import { D as lt } from "./DataTable-B3ZldeJU.js";
6
+ import at from "./vue-ui-accordion-CXNwNRM_.js";
7
+ import nt from "./vue-ui-skeleton-aZahITpG.js";
8
+ import { u as Ce } from "./useNestedProp-BO65z1Rt.js";
9
+ import { _ as st } from "./PackageVersion-BJurjgIS.js";
10
+ import { P as rt } from "./PenAndPaper-D6oZdwvp.js";
11
11
  import { u as ut } from "./useUserOptionState-BIvW1Kz7.js";
12
12
  import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const ct = ["id"], dt = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-8TfPi9lB.cjs"),ke=require("./Title-C6GY7-tb.cjs"),te=require("./usePrinter-CzqlwBQp.cjs"),ye=require("./DataTable-D8Jrpq-B.cjs"),be=require("./vue-ui-accordion-CDyaHBeZ.cjs"),we=require("./vue-ui-skeleton-ilN9FTO6.cjs"),oe=require("./useNestedProp-BKRkMJ0r.cjs"),Ce=require("./PackageVersion-CLMnI-8e.cjs"),Ne=require("./PenAndPaper-DxTPtHU5.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ee=["xmlns","viewBox"],Pe=["width","height"],Te=["id"],Oe=["stop-color"],Fe=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ze=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Ae={key:4,class:"vue-data-ui-watermark"},He={key:6,ref:"source",dir:"auto"},Me=["innerHTML"],qe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(le,{expose:ne}){const h=le,{vue_ui_flow:ae}=s.useConfig(),$=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{V()});function V(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),S=e.ref(null),z=e.ref(0),I=e.ref(0),y=e.ref(!1);function re(o){y.value=o,z.value+=1}const t=e.computed({get:()=>M(),set:o=>o}),{userOptionsVisible:E,setUserOptionsVisibility:A,keepUserOptionState:H}=xe.useUserOptionState({config:t.value});function M(){const o=oe.useNestedProp({userConfig:h.config,defaultConfig:ae});return o.theme?{...oe.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=M(),E.value=!t.value.userOptions.showOnChartHover,V(),I.value+=1,b.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:Y}=te.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),G=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),T=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}T.value.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ue(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ie(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function ce(o){const n={},l={};function r(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,B=m+1;r(u,m),r(i,B),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=P.value[i]||P.value[i%P.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ue(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;a[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ie(m)},i+=m+G.value})}const c=[];for(const u in n){let i=a[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const B=a[v].y+t.value.style.chart.padding.top,F=a[u],L=a[v],J=s.checkNaN(i),K=s.checkNaN(i+k/n[u].outflow*F.height),Q=s.checkNaN(B),ee=s.checkNaN(B+k/n[v].inflow*L.height),ge={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${J} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(L.x)} ${ee} L ${s.checkNaN(L.x)} ${Q} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ge),i+=K-J,a[v].y+=ee-Q})}return{nodeCoordinates:a,links:c}}const f=e.computed(()=>{const o=ce(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),de=e.computed(()=>ve(f.value.nodes));function ve(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+G.value}return Math.max(...Object.values(n))}const w=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=T.value.length*j.value;return{height:de.value+o+r,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function he(o){const n={},l={},r=new Set;return T.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const p=e.ref(null),C=e.ref(null);function fe(o){p.value=he(o.name),C.value=o.name}function pe(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function R(){e.nextTick(()=>{const o=X.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function me(){return f.value}function Z(){b.value.showTable=!b.value.showTable}const x=e.ref(!1);function O(){x.value=!x.value}return ne({getData:me,generateCsv:R,generateImage:Y,generatePdf:U,toggleTable:Z,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:S,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(H)||e.unref(E))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_option_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:R,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${w.value.width} ${w.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width,height:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Fe)],8,Te))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>fe(l),onMouseleave:n[0]||(n[0]=a=>pe()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Ie))),256)),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Ee)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ye.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},De=Be._export_sfc(qe,[["__scopeId","data-v-0aa84563"]]);exports.default=De;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D4Ci0bak.cjs"),ke=require("./Title-Cnr0E9IA.cjs"),te=require("./usePrinter-ZADvMzaH.cjs"),ye=require("./DataTable-BxaOAPGG.cjs"),be=require("./vue-ui-accordion-BTL7UkJz.cjs"),we=require("./vue-ui-skeleton-8d9YBsC-.cjs"),oe=require("./useNestedProp-B_G2vdgc.cjs"),Ce=require("./PackageVersion-DK_OFHd7.cjs"),Ne=require("./PenAndPaper-CDwDlhXM.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ee=["xmlns","viewBox"],Pe=["width","height"],Te=["id"],Oe=["stop-color"],Fe=["stop-color"],Le=["d","fill","stroke","stroke-width"],Ve=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ze=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Ae={key:4,class:"vue-data-ui-watermark"},He={key:6,ref:"source",dir:"auto"},Me=["innerHTML"],qe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(le,{expose:ne}){const h=le,{vue_ui_flow:ae}=s.useConfig(),$=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{V()});function V(){s.objectIsEmpty(h.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(s.createUid()),S=e.ref(null),z=e.ref(0),I=e.ref(0),y=e.ref(!1);function re(o){y.value=o,z.value+=1}const t=e.computed({get:()=>M(),set:o=>o}),{userOptionsVisible:E,setUserOptionsVisibility:A,keepUserOptionState:H}=xe.useUserOptionState({config:t.value});function M(){const o=oe.useNestedProp({userConfig:h.config,defaultConfig:ae});return o.theme?{...oe.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||h.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>h.config,o=>{t.value=M(),E.value=!t.value.userOptions.showOnChartHover,V(),I.value+=1,b.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:Y}=te.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),G=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),j=e.computed(()=>t.value.style.chart.links.width),T=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),W=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}T.value.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function ue(o){return o/W.value*100+t.value.style.chart.nodes.minHeight}function ie(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*W.value}function ce(o){const n={},l={};function r(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),l[i]||(l[i]=[]),l[i].includes(u)||l[i].push(u)}o.forEach(([u,i,v],k)=>{const m=n[u]?n[u].level:0,B=m+1;r(u,m),r(i,B),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:v}),n[u].outflow+=v,n[i].inflow+=v}),Object.keys(n).forEach((u,i)=>{n[u].color=P.value[i]||P.value[i%P.value.length]||s.palette[i]||s.palette[i%d.length]});for(const u in n)n[u].height=ue(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let i=0;l[u].forEach((v,k)=>{const m=n[v].height;a[v]={x:parseInt(u,10)*j.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:m,i:k,color:n[v].color,value:ie(m)},i+=m+G.value})}const c=[];for(const u in n){let i=a[u].absoluteY+t.value.style.chart.padding.top;n[u].children&&n[u].children.forEach(({target:v,value:k},m)=>{const B=a[v].y+t.value.style.chart.padding.top,F=a[u],L=a[v],J=s.checkNaN(i),K=s.checkNaN(i+k/n[u].outflow*F.height),Q=s.checkNaN(B),ee=s.checkNaN(B+k/n[v].inflow*L.height),ge={id:s.createUid(),source:u,target:v,path:`M ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${J} L ${s.checkNaN(F.x)+s.checkNaN(g.value)} ${K} L ${s.checkNaN(L.x)} ${ee} L ${s.checkNaN(L.x)} ${Q} Z`,value:k,sourceColor:n[u].color,targetColor:n[v].color};c.push(ge),i+=K-J,a[v].y+=ee-Q})}return{nodeCoordinates:a,links:c}}const f=e.computed(()=>{const o=ce(h.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),de=e.computed(()=>ve(f.value.nodes));function ve(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+G.value}return Math.max(...Object.values(n))}const w=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=T.value.length*j.value;return{height:de.value+o+r,width:n+Math.max(...f.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function he(o){const n={},l={},r=new Set;return T.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const p=e.ref(null),C=e.ref(null);function fe(o){p.value=he(o.name),C.value=o.name}function pe(){p.value=null,C.value=null}const X=e.computed(()=>f.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function R(){e.nextTick(()=>{const o=X.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=X.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function me(){return f.value}function Z(){b.value.showTable=!b.value.showTable}const x=e.ref(!1);function O(){x.value=!x.value}return ne({getData:me,generateCsv:R,generateImage:Y,generatePdf:U,toggleTable:Z,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:S,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`,onMouseenter:n[2]||(n[2]=()=>e.unref(A)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(H)||e.unref(E))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_option_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:R,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${w.value.width} ${w.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width,height:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Fe)],8,Te))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${C.value?[l.target,l.source].includes(C.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(s.checkNaN)(l.height),width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>fe(l),onMouseleave:n[0]||(n[0]=a=>pe()),style:e.normalizeStyle(`opacity:${p.value?p.value.includes(l.name)?1:.2:1}`)},null,44,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${p.value?p.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,Ie))),256)),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Ee)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ye.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>b.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},De=Be._export_sfc(qe,[["__scopeId","data-v-0aa84563"]]);exports.default=De;
@@ -1,15 +1,15 @@
1
1
  import { useCssVars as _e, computed as v, onMounted as Le, ref as c, watch as Te, openBlock as s, createElementBlock as u, normalizeClass as T, normalizeStyle as x, unref as r, createBlock as A, createCommentVNode as f, createSlots as Ae, withCtx as k, renderSlot as y, normalizeProps as H, guardReactiveProps as X, createVNode as Ne, createElementVNode as C, mergeProps as q, Fragment as M, renderList as V, toDisplayString as B, createTextVNode as Oe, nextTick as ze } from "vue";
2
- import { u as Se, o as Pe, e as fe, g as Fe, c as De, d as Ie, l as Me, i as U, f as E, X as Ve, G as Be, t as Ue, q as Ee, r as Ge, F as Y } from "./index-OhfEeW2N.js";
3
- import { u as be } from "./useNestedProp-Cwjz-hIm.js";
4
- import { u as Re, U as je } from "./usePrinter-stvkbwgz.js";
5
- import { _ as He } from "./Title-hfEOmPlv.js";
6
- import { P as Xe } from "./PenAndPaper-tV-SbWUa.js";
7
- import { D as qe } from "./DataTable-BaW_PF1t.js";
8
- import Ye from "./vue-ui-accordion-BH0OU8sD.js";
2
+ import { u as Se, o as Pe, e as fe, g as Fe, c as De, d as Ie, l as Me, i as U, f as E, X as Ve, G as Be, t as Ue, q as Ee, r as Ge, F as Y } from "./index-m6iVGCIc.js";
3
+ import { u as be } from "./useNestedProp-BO65z1Rt.js";
4
+ import { u as Re, U as je } from "./usePrinter-D6-AMOJS.js";
5
+ import { _ as He } from "./Title-r4pZn0TU.js";
6
+ import { P as Xe } from "./PenAndPaper-D6oZdwvp.js";
7
+ import { D as qe } from "./DataTable-B3ZldeJU.js";
8
+ import Ye from "./vue-ui-accordion-CXNwNRM_.js";
9
9
  import { t as We, u as Je } from "./useResponsive-CoxXLe23.js";
10
- import Ke from "./vue-ui-skeleton-CZBWPZpy.js";
10
+ import Ke from "./vue-ui-skeleton-aZahITpG.js";
11
11
  import { u as Qe } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { _ as Ze } from "./PackageVersion-DBbbI7TU.js";
12
+ import { _ as Ze } from "./PackageVersion-BJurjgIS.js";
13
13
  import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["width", "height"], st = ["id"], ot = ["stop-color"], nt = ["stop-color"], rt = ["stop-color"], ut = ["stroke", "stroke-width"], it = ["stroke", "stroke-width"], ct = ["x", "y", "font-size", "fill", "font-weight"], vt = ["points", "fill"], dt = ["stroke", "stroke-width", "rx"], ht = ["x", "y", "font-size", "fill", "font-weight"], ft = ["x", "y", "font-size", "fill", "font-weight"], bt = {
15
15
  key: 5,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-8TfPi9lB.cjs"),W=require("./useNestedProp-BKRkMJ0r.cjs"),J=require("./usePrinter-CzqlwBQp.cjs"),se=require("./Title-C6GY7-tb.cjs"),ue=require("./PenAndPaper-DxTPtHU5.cjs"),ie=require("./DataTable-D8Jrpq-B.cjs"),ce=require("./vue-ui-accordion-CDyaHBeZ.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ve=require("./vue-ui-skeleton-ilN9FTO6.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),he=require("./PackageVersion-CLMnI-8e.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],be=["width","height"],ye=["id"],ge=["stop-color"],ke=["stop-color"],Ce=["stop-color"],we=["stroke","stroke-width"],xe=["stroke","stroke-width"],Le=["x","y","font-size","fill","font-weight"],Be=["points","fill"],$e=["stroke","stroke-width","rx"],_e=["x","y","font-size","fill","font-weight"],Ne=["x","y","font-size","fill","font-weight"],Se={key:5,class:"vue-data-ui-watermark"},ze=["innerHTML"],Te={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Q,{expose:Z}){const d=Q;e.useCssVars(a=>({a7833e2c:re.value}));const{vue_ui_funnel:ee}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:g.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,m.value=G(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(g.value.parentNode)}}const g=e.ref(null),k=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),f=e.ref(!1);function F(){const a=W.useNestedProp({userConfig:d.config,defaultConfig:ee});return a.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:q}=de.useUserOptionState({config:t.value});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,C.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:R,generatePdf:U,generateImage:j}=J.usePrinter({elementId:`funnel_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),C=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{f.value=!0},h.value.length*150);function G(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const m=e.ref(G()),y=e.computed(()=>m.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),H=e.computed(()=>m.value.width*t.value.style.chart.barCircleSpacingRatio),n=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,s=m.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(m.value.width-l-H.value)*(a.value/h.value[0].value);return{...a,cx:m.value.left+l/2,cy:s+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:m.value.left+l+H.value,y:s}})),ae=e.computed(()=>{const a=n.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${n.value[0].x},${n.value[0].y+(y.value-p.value)/2} ${a.toString()} ${n.value.at(-1).x},${n.value.at(-1).y+(y.value-p.value)/2}`}),le=e.computed(()=>({x1:n.value[0].cx,y1:n.value[0].cy,x2:n.value.at(-1).cx,y2:n.value.at(-1).cy})),w=e.ref(!1);function oe(a){w.value=a,T.value+=1}const re=e.computed(()=>`${h.value.length*150}ms`),B=e.ref(!1);function N(){B.value=!B.value}function X(){C.value.showTable=!C.value.showTable}const x=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),$=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=x.value.head.map((v,c)=>{const L=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,x.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:x.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:n.value[c]}),S=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,n.value[c].proportion*100,r.dataLabel({v:n.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:n.value[c]});return[{color:v.color,name:v.name},L,S]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function Y(){e.nextTick(()=>{const a=x.value.head.map((s,v)=>[[s.name],[x.value.body[v]],[n.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function ne(){return h.value}return Z({getData:ne,generatePdf:U,generateCsv:Y,generateImage:j,toggleTable:X,toggleAnnotator:N}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:g,class:e.normalizeClass(`vue-ui-funnel ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${k.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:N},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,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:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(se._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(q)||e.unref(_))?(e.openBlock(),e.createBlock(J.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(R),uid:k.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:w.value,chartElement:g.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleAnnotator:N,onToggleFullscreen:oe,onGeneratePdf:e.unref(U),onGenerateImage:e.unref(j),onToggleTable:X,onGenerateCsv:Y,style:e.normalizeStyle({visibility:e.unref(q)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,ge),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,Ce)],8,ye)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},le.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?m.value.height:0,strokeDashoffset:t.value.useCssAnimation?m.value.height:0}}),null,16,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({cx:l,cy:s,r:v,fill:c},L)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({cx:l,cy:s,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*L}ms`}}),null,16,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Le))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:ae.value,fill:`url(#funnel_area_${k.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,Be)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({x:l,y:s,height:v,width:c,fill:L},S)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({x:l,y:s,height:v,width:c,fill:L},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*S}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(l.name),15,_e),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,Ne)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ce.default,{key:8,hideDetails:"",config:{open:C.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(ie.DataTable,{key:`table_${P.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>C.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},Ae=me._export_sfc(Te,[["__scopeId","data-v-3f74da0f"]]);exports.default=Ae;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D4Ci0bak.cjs"),W=require("./useNestedProp-B_G2vdgc.cjs"),J=require("./usePrinter-ZADvMzaH.cjs"),se=require("./Title-Cnr0E9IA.cjs"),ue=require("./PenAndPaper-CDwDlhXM.cjs"),ie=require("./DataTable-BxaOAPGG.cjs"),ce=require("./vue-ui-accordion-BTL7UkJz.cjs"),K=require("./useResponsive-BJ7DTGpm.cjs"),ve=require("./vue-ui-skeleton-8d9YBsC-.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),he=require("./PackageVersion-DK_OFHd7.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],be=["width","height"],ye=["id"],ge=["stop-color"],ke=["stop-color"],Ce=["stop-color"],we=["stroke","stroke-width"],xe=["stroke","stroke-width"],Le=["x","y","font-size","fill","font-weight"],Be=["points","fill"],$e=["stroke","stroke-width","rx"],_e=["x","y","font-size","fill","font-weight"],Ne=["x","y","font-size","fill","font-weight"],Se={key:5,class:"vue-data-ui-watermark"},ze=["innerHTML"],Te={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Q,{expose:Z}){const d=Q;e.useCssVars(a=>({a7833e2c:re.value}));const{vue_ui_funnel:ee}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:g.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,m.value=G(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(g.value.parentNode)}}const g=e.ref(null),k=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),f=e.ref(!1);function F(){const a=W.useNestedProp({userConfig:d.config,defaultConfig:ee});return a.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:q}=de.useUserOptionState({config:t.value});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,C.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:R,generatePdf:U,generateImage:j}=J.usePrinter({elementId:`funnel_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),C=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{f.value=!0},h.value.length*150);function G(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const m=e.ref(G()),y=e.computed(()=>m.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),H=e.computed(()=>m.value.width*t.value.style.chart.barCircleSpacingRatio),n=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,s=m.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(m.value.width-l-H.value)*(a.value/h.value[0].value);return{...a,cx:m.value.left+l/2,cy:s+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:m.value.left+l+H.value,y:s}})),ae=e.computed(()=>{const a=n.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${n.value[0].x},${n.value[0].y+(y.value-p.value)/2} ${a.toString()} ${n.value.at(-1).x},${n.value.at(-1).y+(y.value-p.value)/2}`}),le=e.computed(()=>({x1:n.value[0].cx,y1:n.value[0].cy,x2:n.value.at(-1).cx,y2:n.value.at(-1).cy})),w=e.ref(!1);function oe(a){w.value=a,T.value+=1}const re=e.computed(()=>`${h.value.length*150}ms`),B=e.ref(!1);function N(){B.value=!B.value}function X(){C.value.showTable=!C.value.showTable}const x=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),$=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=x.value.head.map((v,c)=>{const L=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,x.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:x.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:n.value[c]}),S=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,n.value[c].proportion*100,r.dataLabel({v:n.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:n.value[c]});return[{color:v.color,name:v.name},L,S]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function Y(){e.nextTick(()=>{const a=x.value.head.map((s,v)=>[[s.name],[x.value.body[v]],[n.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function ne(){return h.value}return Z({getData:ne,generatePdf:U,generateCsv:Y,generateImage:j,toggleTable:X,toggleAnnotator:N}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:g,class:e.normalizeClass(`vue-ui-funnel ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${k.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:N},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,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:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(se._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(q)||e.unref(_))?(e.openBlock(),e.createBlock(J.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(R),uid:k.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:w.value,chartElement:g.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleAnnotator:N,onToggleFullscreen:oe,onGeneratePdf:e.unref(U),onGenerateImage:e.unref(j),onToggleTable:X,onGenerateCsv:Y,style:e.normalizeStyle({visibility:e.unref(q)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,ge),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,Ce)],8,ye)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},le.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?m.value.height:0,strokeDashoffset:t.value.useCssAnimation?m.value.height:0}}),null,16,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({cx:l,cy:s,r:v,fill:c},L)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({cx:l,cy:s,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*L}ms`}}),null,16,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Le))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:ae.value,fill:`url(#funnel_area_${k.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,Be)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({x:l,y:s,height:v,width:c,fill:L},S)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({x:l,y:s,height:v,width:c,fill:L},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!f.value},style:{animationDelay:`${150*S}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(l.name),15,_e),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!f.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,Ne)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ce.default,{key:8,hideDetails:"",config:{open:C.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(ie.DataTable,{key:`table_${P.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[0]||(o[0]=l=>C.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},Ae=me._export_sfc(Te,[["__scopeId","data-v-3f74da0f"]]);exports.default=Ae;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-8TfPi9lB.cjs"),ue=require("./Legend-D_1LwKfa.cjs"),ie=require("./Title-C6GY7-tb.cjs"),ce=require("./Tooltip-CVzhBGn7.cjs"),de=require("./DataTable-D8Jrpq-B.cjs"),X=require("./usePrinter-CzqlwBQp.cjs"),ve=require("./vue-ui-skeleton-ilN9FTO6.cjs"),he=require("./vue-ui-accordion-CDyaHBeZ.cjs"),Y=require("./useNestedProp-BKRkMJ0r.cjs"),pe=require("./PackageVersion-CLMnI-8e.cjs"),fe=require("./PenAndPaper-DxTPtHU5.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],be={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ke={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ce=["xmlns","viewBox"],we=["width","height"],xe=["id"],$e=["stdDeviation"],Be=["d","stroke","stroke-width"],Se=["d","stroke","stroke-width"],Te=["filter"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke-width","onMouseenter","onClick"],_e={key:5,class:"vue-data-ui-watermark"},Ve=["onClick"],Ee={key:0},Le={key:1},Oe={key:8,ref:"source",dir:"auto"},Fe=["innerHTML"],Ae={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(J,{expose:K,emit:_}){const c=J,{vue_ui_galaxy:Q}=r.useConfig(),k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),C=e.ref(null),Z=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),E=e.ref(0),L=e.ref(0),O=e.ref(0),F=e.ref(0),t=e.computed({get:()=>I(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:z}=ye.useUserOptionState({config:t.value});function I(){const l=Y.useNestedProp({userConfig:c.config,defaultConfig:Q});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=I(),S.value=!t.value.userOptions.showOnChartHover,V(),L.value+=1,O.value+=1,F.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:D,isImaging:q,generatePdf:M,generateImage:U}=X.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),_("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||te.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function le(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),oe=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*oe.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ae(l){y.value=l,E.value+=1}const N=e.ref(null);function re({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ne=e.computed(()=>({cy:"galaxy-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.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const w=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const se=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},se,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function R(){u.value.showTable=!u.value.showTable}function j(){u.value.showTooltip=!u.value.showTooltip}const x=e.ref(!1);function P(){x.value=!x.value}return K({getData:le,generatePdf:M,generateCsv:H,generateImage:U,toggleTable:R,toggleTooltip:j,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(A)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(fe.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",be,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ke,[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${L.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(z)||e.unref(S))?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:Z,key:`user_option_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(q),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(M),onGenerateCsv:H,onGenerateImage:e.unref(U),onToggleTable:R,onToggleTooltip:j,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(z)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(pe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,we)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,$e)],8,xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Se)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ne)],8,Te)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>re({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>_("selectDatapoint",o)},null,40,Pe)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ue.Legend,{key:`legend_${F.value}`,legendSet:W.value,config:ne.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Le," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ee," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ce._sfc_main,{show:u.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(he.default,{key:9,hideDetails:"",config:{open:u.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(de.DataTable,{key:`table_${O.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Fe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,me))}},ze=ge._export_sfc(Ae,[["__scopeId","data-v-b397a028"]]);exports.default=ze;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D4Ci0bak.cjs"),ue=require("./Legend-BFdRFUZD.cjs"),ie=require("./Title-Cnr0E9IA.cjs"),ce=require("./Tooltip-BK34ShAt.cjs"),de=require("./DataTable-BxaOAPGG.cjs"),X=require("./usePrinter-ZADvMzaH.cjs"),ve=require("./vue-ui-skeleton-8d9YBsC-.cjs"),he=require("./vue-ui-accordion-BTL7UkJz.cjs"),Y=require("./useNestedProp-B_G2vdgc.cjs"),pe=require("./PackageVersion-DK_OFHd7.cjs"),fe=require("./PenAndPaper-CDwDlhXM.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],be={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ke={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ce=["xmlns","viewBox"],we=["width","height"],xe=["id"],$e=["stdDeviation"],Be=["d","stroke","stroke-width"],Se=["d","stroke","stroke-width"],Te=["filter"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke-width","onMouseenter","onClick"],_e={key:5,class:"vue-data-ui-watermark"},Ve=["onClick"],Ee={key:0},Le={key:1},Oe={key:8,ref:"source",dir:"auto"},Fe=["innerHTML"],Ae={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(J,{expose:K,emit:_}){const c=J,{vue_ui_galaxy:Q}=r.useConfig(),k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),C=e.ref(null),Z=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),E=e.ref(0),L=e.ref(0),O=e.ref(0),F=e.ref(0),t=e.computed({get:()=>I(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:z}=ye.useUserOptionState({config:t.value});function I(){const l=Y.useNestedProp({userConfig:c.config,defaultConfig:Q});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=I(),S.value=!t.value.userOptions.showOnChartHover,V(),L.value+=1,O.value+=1,F.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:D,isImaging:q,generatePdf:M,generateImage:U}=X.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),_("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||te.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function le(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),oe=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*oe.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ae(l){y.value=l,E.value+=1}const N=e.ref(null);function re({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ne=e.computed(()=>({cy:"galaxy-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.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const w=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const se=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},se,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function R(){u.value.showTable=!u.value.showTable}function j(){u.value.showTooltip=!u.value.showTooltip}const x=e.ref(!1);function P(){x.value=!x.value}return K({getData:le,generatePdf:M,generateCsv:H,generateImage:U,toggleTable:R,toggleTooltip:j,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(A)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(fe.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",be,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ke,[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${L.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(z)||e.unref(S))?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:Z,key:`user_option_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(q),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(M),onGenerateCsv:H,onGenerateImage:e.unref(U),onToggleTable:R,onToggleTooltip:j,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(z)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(pe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,we)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,$e)],8,xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Se)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ne)],8,Te)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>re({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>_("selectDatapoint",o)},null,40,Pe)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ue.Legend,{key:`legend_${F.value}`,legendSet:W.value,config:ne.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Le," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ee," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ce._sfc_main,{show:u.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(he.default,{key:9,hideDetails:"",config:{open:u.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(de.DataTable,{key:`table_${O.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Fe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,me))}},ze=ge._export_sfc(Ae,[["__scopeId","data-v-b397a028"]]);exports.default=ze;
@@ -1,15 +1,15 @@
1
1
  import { computed as h, onMounted as Le, ref as u, watch as Fe, openBlock as o, createElementBlock as n, normalizeClass as E, normalizeStyle as V, unref as i, createBlock as $, createCommentVNode as c, createSlots as Ie, withCtx as d, renderSlot as v, normalizeProps as S, guardReactiveProps as N, createVNode as ie, createElementVNode as T, Fragment as ce, renderList as ve, createTextVNode as de, toDisplayString as M, nextTick as Ae } from "vue";
2
- import { u as Ee, o as Ve, e as he, g as Me, c as pe, t as De, a as Be, p as D, b as Ge, d as ze, J as ye, M as Ue, f as k, X as We, i as ge, x as fe, y as He, q as Xe, r as je } from "./index-OhfEeW2N.js";
3
- import { L as Re } from "./Legend-Qe36RQO1.js";
4
- import { _ as Ye } from "./Title-hfEOmPlv.js";
5
- import { _ as qe } from "./Tooltip-DvcJ9uFx.js";
6
- import { D as Je } from "./DataTable-BaW_PF1t.js";
7
- import { u as Ke, U as Qe } from "./usePrinter-stvkbwgz.js";
8
- import Ze from "./vue-ui-skeleton-CZBWPZpy.js";
9
- import et from "./vue-ui-accordion-BH0OU8sD.js";
10
- import { u as be } from "./useNestedProp-Cwjz-hIm.js";
11
- import { _ as tt } from "./PackageVersion-DBbbI7TU.js";
12
- import { P as lt } from "./PenAndPaper-tV-SbWUa.js";
2
+ import { u as Ee, o as Ve, e as he, g as Me, c as pe, t as De, a as Be, p as D, b as Ge, d as ze, J as ye, M as Ue, f as k, X as We, i as ge, x as fe, y as He, q as Xe, r as je } from "./index-m6iVGCIc.js";
3
+ import { L as Re } from "./Legend-DuOUM8rR.js";
4
+ import { _ as Ye } from "./Title-r4pZn0TU.js";
5
+ import { _ as qe } from "./Tooltip-BRDNF1M6.js";
6
+ import { D as Je } from "./DataTable-B3ZldeJU.js";
7
+ import { u as Ke, U as Qe } from "./usePrinter-D6-AMOJS.js";
8
+ import Ze from "./vue-ui-skeleton-aZahITpG.js";
9
+ import et from "./vue-ui-accordion-CXNwNRM_.js";
10
+ import { u as be } from "./useNestedProp-BO65z1Rt.js";
11
+ import { _ as tt } from "./PackageVersion-BJurjgIS.js";
12
+ import { P as lt } from "./PenAndPaper-D6oZdwvp.js";
13
13
  import { u as at } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as ot } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const st = ["id"], rt = {
@@ -1,12 +1,12 @@
1
1
  import { computed as y, ref as f, watch as me, onMounted as Re, onBeforeUnmount as Ge, openBlock as r, createElementBlock as u, normalizeClass as pe, normalizeStyle as B, unref as i, createBlock as R, createCommentVNode as c, withCtx as X, toDisplayString as O, createSlots as Ee, renderSlot as w, normalizeProps as G, guardReactiveProps as E, createVNode as Ue, createElementVNode as p, Fragment as g, renderList as S, mergeProps as U } from "vue";
2
- import { u as We, c as je, t as Te, a as Le, p as ge, b as De, o as ke, d as Be, e as W, g as be, m as V, I as z, N as Ve, X as qe, s as q, k as He, i as H, f as Z, F as J } from "./index-OhfEeW2N.js";
2
+ import { u as We, c as je, t as Te, a as Le, p as ge, b as De, o as ke, d as Be, e as W, g as be, m as V, I as z, N as Ve, X as qe, s as q, k as He, i as H, f as Z, F as J } from "./index-m6iVGCIc.js";
3
3
  import { t as Ze, u as Je } from "./useResponsive-CoxXLe23.js";
4
- import { u as Ke, U as Qe } from "./usePrinter-stvkbwgz.js";
5
- import et from "./vue-ui-skeleton-CZBWPZpy.js";
6
- import { _ as tt } from "./Title-hfEOmPlv.js";
7
- import { u as _e } from "./useNestedProp-Cwjz-hIm.js";
8
- import { _ as at } from "./PackageVersion-DBbbI7TU.js";
9
- import { P as lt } from "./PenAndPaper-tV-SbWUa.js";
4
+ import { u as Ke, U as Qe } from "./usePrinter-D6-AMOJS.js";
5
+ import et from "./vue-ui-skeleton-aZahITpG.js";
6
+ import { _ as tt } from "./Title-r4pZn0TU.js";
7
+ import { u as _e } from "./useNestedProp-BO65z1Rt.js";
8
+ import { _ as at } from "./PackageVersion-BJurjgIS.js";
9
+ import { P as lt } from "./PenAndPaper-D6oZdwvp.js";
10
10
  import { u as rt } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const ot = ["id"], ut = { key: 0 }, nt = ["xmlns", "viewBox"], it = ["width", "height"], ct = ["id"], vt = ["stop-color"], ht = ["stop-color"], dt = ["stop-color"], yt = ["id"], ft = ["stdDeviation"], mt = { key: 1 }, pt = ["d", "fill", "stroke"], gt = ["d", "fill", "stroke"], kt = ["d", "fill"], bt = ["id", "d"], _t = ["fill", "font-size", "font-weight"], xt = ["href", "startOffset"], wt = ["x", "y", "text-anchor", "fill", "font-size", "font-weight"], St = ["d", "filter"], $t = ["stroke", "stroke-width"], zt = ["stroke", "stroke-width"], Ft = ["stroke", "stroke-width"], Ct = ["stroke", "stroke-width"], Ot = { key: 8 }, Mt = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Pt = ["x", "y", "font-size", "font-weight", "fill"], Nt = { key: 0 }, Xt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], It = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Yt = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], At = { key: 1 }, Rt = ["d", "fill", "stroke", "stroke-width"], Gt = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], Et = ["x", "y", "font-size", "fill"], Ut = {