vue-data-ui 3.28.4 → 3.28.6

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 (197) hide show
  1. package/dist/{BaseDraggableDialog-DHgIPVmz.js → BaseDraggableDialog-9d30Yx8c.js} +1 -1
  2. package/dist/{BaseIcon-Cm-IJ179.js → BaseIcon-fYK0iID8.js} +1 -1
  3. package/dist/{BaseLegendToggle-Q3TiW9u1.js → BaseLegendToggle-aT9fOoGO.js} +1 -1
  4. package/dist/{BaseZoomControls-ByS_7fmI.js → BaseZoomControls-1OdFWrHW.js} +1 -1
  5. package/dist/ColorPicker-DEJOjcmD.js +1 -0
  6. package/dist/{DataTable-0Vv-aGHD.js → DataTable-5Ug6gMAX.js} +1 -1
  7. package/dist/{HillActions-qz6J_uK7.js → HillActions-C8am4I5c.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-Do6RcwEr.js → NonSvgPenAndPaper-CawVDtNj.js} +1 -1
  9. package/dist/{PackageVersion-DhptF5oD.js → PackageVersion-u-p5bCcj.js} +1 -1
  10. package/dist/PenAndPaper-r50tK3S4.js +1 -0
  11. package/dist/{SlicerPreview-CFFUOlQr.js → SlicerPreview-DYuyE9u9.js} +1 -1
  12. package/dist/{UserOptions-uWHV_zPB.js → UserOptions-Em_JgDXM.js} +1 -1
  13. package/dist/annotationSlots-RvQBEO9-.js +1 -0
  14. package/dist/annotationViewport-X8fvs7pz.js +1 -0
  15. package/dist/components/vue-ui-3d-bar.js +1 -1
  16. package/dist/components/vue-ui-accordion.js +1 -1
  17. package/dist/components/vue-ui-age-pyramid.js +1 -1
  18. package/dist/components/vue-ui-annotator.js +1 -1
  19. package/dist/components/vue-ui-bullet.js +1 -1
  20. package/dist/components/vue-ui-bump.js +1 -1
  21. package/dist/components/vue-ui-candlestick.js +1 -1
  22. package/dist/components/vue-ui-carousel-table.js +1 -1
  23. package/dist/components/vue-ui-chestnut.js +1 -1
  24. package/dist/components/vue-ui-chord.js +1 -1
  25. package/dist/components/vue-ui-circle-pack.js +1 -1
  26. package/dist/components/vue-ui-cursor.js +1 -1
  27. package/dist/components/vue-ui-dag.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-geo.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-graph.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-hill.js +1 -1
  42. package/dist/components/vue-ui-history-plot.js +1 -1
  43. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  44. package/dist/components/vue-ui-icon.js +1 -1
  45. package/dist/components/vue-ui-kpi.js +1 -1
  46. package/dist/components/vue-ui-label.js +1 -1
  47. package/dist/components/vue-ui-mini-loader.js +1 -1
  48. package/dist/components/vue-ui-molecule.js +1 -1
  49. package/dist/components/vue-ui-mood-radar.js +1 -1
  50. package/dist/components/vue-ui-nested-donuts.js +1 -1
  51. package/dist/components/vue-ui-onion.js +1 -1
  52. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  53. package/dist/components/vue-ui-quadrant.js +1 -1
  54. package/dist/components/vue-ui-quick-chart.js +1 -1
  55. package/dist/components/vue-ui-radar.js +1 -1
  56. package/dist/components/vue-ui-rating.js +1 -1
  57. package/dist/components/vue-ui-relation-circle.js +1 -1
  58. package/dist/components/vue-ui-ridgeline.js +1 -1
  59. package/dist/components/vue-ui-rings.js +1 -1
  60. package/dist/components/vue-ui-scatter.js +1 -1
  61. package/dist/components/vue-ui-skeleton.js +1 -1
  62. package/dist/components/vue-ui-smiley.js +1 -1
  63. package/dist/components/vue-ui-spark-trend.js +1 -1
  64. package/dist/components/vue-ui-sparkbar.js +1 -1
  65. package/dist/components/vue-ui-sparkgauge.js +1 -1
  66. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  67. package/dist/components/vue-ui-sparkline.js +1 -1
  68. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  69. package/dist/components/vue-ui-stackbar.js +1 -1
  70. package/dist/components/vue-ui-stackline.js +1 -1
  71. package/dist/components/vue-ui-strip-plot.js +1 -1
  72. package/dist/components/vue-ui-table-heatmap.js +1 -1
  73. package/dist/components/vue-ui-table-sparkline.js +1 -1
  74. package/dist/components/vue-ui-table.js +1 -1
  75. package/dist/components/vue-ui-thermometer.js +1 -1
  76. package/dist/components/vue-ui-timer.js +1 -1
  77. package/dist/components/vue-ui-tiremarks.js +1 -1
  78. package/dist/components/vue-ui-treemap.js +1 -1
  79. package/dist/components/vue-ui-vertical-bar.js +1 -1
  80. package/dist/components/vue-ui-waffle.js +1 -1
  81. package/dist/components/vue-ui-wheel.js +1 -1
  82. package/dist/components/vue-ui-word-cloud.js +1 -1
  83. package/dist/components/vue-ui-world.js +1 -1
  84. package/dist/components/vue-ui-xy-canvas.js +1 -1
  85. package/dist/components/vue-ui-xy.js +1 -1
  86. package/dist/composables.js +1 -1
  87. package/dist/package-BdTnZDoM.js +1 -0
  88. package/dist/{render-common-DwEiRIJ0.js → render-common-CTaC-_Nw.js} +1 -1
  89. package/dist/ssr/vue-ui-donut.js +1 -1
  90. package/dist/ssr/vue-ui-xy.js +1 -1
  91. package/dist/ssr.js +1 -1
  92. package/dist/style.css +1 -1
  93. package/dist/types/composables.d.ts +51 -0
  94. package/dist/types/vue-data-ui.d.ts +77 -1
  95. package/dist/types/vue-ui-xy.d.ts +3 -0
  96. package/dist/useConfig-D3ZfFSE5.js +1 -0
  97. package/dist/{useObjectBindings-C15PEyQD.js → useObjectBindings-BCi3Az41.js} +1 -1
  98. package/dist/useParentSize-DGkyQ711.js +1 -0
  99. package/dist/utils.js +1 -1
  100. package/dist/vue-data-ui-DRkivgOZ.js +1 -0
  101. package/dist/vue-data-ui.js +1 -1
  102. package/dist/{vue-ui-3d-bar-CJTKyv3A.js → vue-ui-3d-bar-BeM22sZn.js} +2 -2
  103. package/dist/{vue-ui-accordion-S3nRtTU-.js → vue-ui-accordion-D4FHxzsL.js} +1 -1
  104. package/dist/{vue-ui-age-pyramid-6uZzf1w6.js → vue-ui-age-pyramid-BpkEVmpT.js} +1 -1
  105. package/dist/{vue-ui-annotator-DCJdieNC.js → vue-ui-annotator-DuAQovkf.js} +1 -1
  106. package/dist/{vue-ui-bullet-CsJcLhmV.js → vue-ui-bullet-Cx9Noxp_.js} +2 -2
  107. package/dist/{vue-ui-bump-DXpxBWp_.js → vue-ui-bump-DIjSKk8F.js} +2 -2
  108. package/dist/vue-ui-candlestick-Cfd63wqQ.js +22 -0
  109. package/dist/{vue-ui-carousel-table-ChNykS-r.js → vue-ui-carousel-table-CDgmtbuI.js} +1 -1
  110. package/dist/vue-ui-chestnut-24bmc5Rq.js +1 -0
  111. package/dist/{vue-ui-chord-Pp0U0-zV.js → vue-ui-chord-fQZQ9hjU.js} +3 -3
  112. package/dist/vue-ui-circle-pack-C1CbpBNe.js +13 -0
  113. package/dist/{vue-ui-cursor-3-RTIIl-.js → vue-ui-cursor-9khzj4l-.js} +1 -1
  114. package/dist/vue-ui-dag-B6QkUUCe.js +9 -0
  115. package/dist/{vue-ui-dashboard-Dlwnintv.js → vue-ui-dashboard-BBaAZBSj.js} +1 -1
  116. package/dist/{vue-ui-digits-ZMK0aBxE.js → vue-ui-digits-DdrPl8eP.js} +1 -1
  117. package/dist/{vue-ui-donut-j1bv0KyD.js → vue-ui-donut-BbJFmKZh.js} +1 -1
  118. package/dist/{vue-ui-donut-CmLo1r4-.js → vue-ui-donut-H65cwWN-.js} +2 -2
  119. package/dist/vue-ui-donut-evolution-DeHbG9Rx.js +2 -0
  120. package/dist/{vue-ui-dumbbell-DigrSGwq.js → vue-ui-dumbbell-ClCVHsrR.js} +2 -2
  121. package/dist/{vue-ui-flow-D9cc9yXD.js → vue-ui-flow-DyrpRWOP.js} +2 -2
  122. package/dist/{vue-ui-funnel-U88Hs0nL.js → vue-ui-funnel-bjH_hFeX.js} +1 -1
  123. package/dist/{vue-ui-galaxy-B1Vuz8CA.js → vue-ui-galaxy-BTgZs4Le.js} +1 -1
  124. package/dist/{vue-ui-gauge-1MgZSPXt.js → vue-ui-gauge-CXZklQPg.js} +1 -1
  125. package/dist/vue-ui-geo-0_HimFX5.js +1 -0
  126. package/dist/{vue-ui-gizmo-DtsERB-E.js → vue-ui-gizmo-kebiFGRl.js} +1 -1
  127. package/dist/{vue-ui-graph-BVTPTDl5.js → vue-ui-graph-NTeJASbv.js} +2 -2
  128. package/dist/vue-ui-heatmap-aiEMlbZm.js +1 -0
  129. package/dist/{vue-ui-hill-BvrNT8KZ.js → vue-ui-hill-ZpLv0IMP.js} +1 -1
  130. package/dist/{vue-ui-history-plot-CJIILQPt.js → vue-ui-history-plot-4xG3oQtO.js} +2 -2
  131. package/dist/vue-ui-horizontal-bar-DMyL8GM6.js +4 -0
  132. package/dist/{vue-ui-kpi-DHfExr9d.js → vue-ui-kpi-D4q8R7Uq.js} +1 -1
  133. package/dist/{vue-ui-label-B_1kM28r.js → vue-ui-label-0lSeoxvv.js} +1 -1
  134. package/dist/{vue-ui-mini-loader-Bbupx66Y.js → vue-ui-mini-loader-C6vhrfx3.js} +1 -1
  135. package/dist/vue-ui-molecule-4t84pqvx.js +1 -0
  136. package/dist/{vue-ui-mood-radar-DsnT2U65.js → vue-ui-mood-radar-BGuw0U8y.js} +1 -1
  137. package/dist/{vue-ui-nested-donuts-JkpqMhuL.js → vue-ui-nested-donuts-BTTJ6KAx.js} +2 -2
  138. package/dist/{vue-ui-onion-CIA2tlff.js → vue-ui-onion-BUbI3uaY.js} +2 -2
  139. package/dist/{vue-ui-parallel-coordinate-plot-Bcr3B3NI.js → vue-ui-parallel-coordinate-plot-Bn3Y28ZQ.js} +3 -3
  140. package/dist/{vue-ui-quadrant-DKVFawhC.js → vue-ui-quadrant-CVKEUWqI.js} +2 -2
  141. package/dist/vue-ui-quick-chart-BgH0Arb4.js +17 -0
  142. package/dist/{vue-ui-radar-CdH-BFKA.js → vue-ui-radar-Bb0u6tqk.js} +1 -1
  143. package/dist/{vue-ui-rating-ChWXrWNJ.js → vue-ui-rating-7RAJA7I4.js} +1 -1
  144. package/dist/{vue-ui-relation-circle-COZpOybS.js → vue-ui-relation-circle-Csx30ROI.js} +1 -1
  145. package/dist/{vue-ui-ridgeline-MLknaTUO.js → vue-ui-ridgeline-Ce1ZrE0B.js} +2 -2
  146. package/dist/{vue-ui-rings-ARqLCM_P.js → vue-ui-rings-DgILqhz8.js} +1 -1
  147. package/dist/{vue-ui-scatter-CX2wsXdE.js → vue-ui-scatter-CX_rE0cU.js} +2 -2
  148. package/dist/{vue-ui-skeleton-wyvAru88.js → vue-ui-skeleton-C0oElPXz.js} +1 -1
  149. package/dist/{vue-ui-smiley--VTlUAdp.js → vue-ui-smiley-BdhxsPGW.js} +1 -1
  150. package/dist/{vue-ui-spark-trend-C02PmIq_.js → vue-ui-spark-trend-CRQ5JfVc.js} +1 -1
  151. package/dist/{vue-ui-sparkbar-CjD57-Xi.js → vue-ui-sparkbar-BTclK0-F.js} +1 -1
  152. package/dist/{vue-ui-sparkgauge-8Eia8T2W.js → vue-ui-sparkgauge-zNl9Xmt3.js} +1 -1
  153. package/dist/{vue-ui-sparkhistogram-C-0f7XCl.js → vue-ui-sparkhistogram-ynyE3DOc.js} +1 -1
  154. package/dist/{vue-ui-sparkline-BMMrpUPR.js → vue-ui-sparkline-CtsijvdW.js} +1 -1
  155. package/dist/{vue-ui-sparkstackbar-BmgCVCKG.js → vue-ui-sparkstackbar-RHlqUD-0.js} +1 -1
  156. package/dist/vue-ui-stackbar-Zhl3to0r.js +29 -0
  157. package/dist/vue-ui-stackline-8JRhuHTg.js +39 -0
  158. package/dist/{vue-ui-strip-plot-DVyPa3sp.js → vue-ui-strip-plot-DL7Ulgpz.js} +2 -2
  159. package/dist/{vue-ui-table-qTF_q-Qu.js → vue-ui-table-BetuN-ZS.js} +1 -1
  160. package/dist/{vue-ui-table-heatmap-DzvPQnY9.js → vue-ui-table-heatmap-IYPQ7LMg.js} +1 -1
  161. package/dist/{vue-ui-table-sparkline-B2Q-7-GQ.js → vue-ui-table-sparkline-Fdjb-U1P.js} +1 -1
  162. package/dist/vue-ui-thermometer-6kfYImU-.js +1 -0
  163. package/dist/{vue-ui-timer-DRjoRidI.js → vue-ui-timer-BKqG5HxS.js} +2 -2
  164. package/dist/{vue-ui-tiremarks-BC_YGp3T.js → vue-ui-tiremarks-D_ps9th8.js} +1 -1
  165. package/dist/vue-ui-treemap-BfOdhGl7.js +1 -0
  166. package/dist/{vue-ui-waffle-BiJshI4O.js → vue-ui-waffle-BL0zzw6B.js} +1 -1
  167. package/dist/vue-ui-wheel-v1o2eN3I.js +1 -0
  168. package/dist/vue-ui-word-cloud-HUnuPCyQ.js +4 -0
  169. package/dist/{vue-ui-world-CJgt0ESz.js → vue-ui-world-BagJihbJ.js} +2 -2
  170. package/dist/vue-ui-xy-D948j7de.js +24 -0
  171. package/dist/{vue-ui-xy-DrKVPSg7.js → vue-ui-xy-Y_rIBQj0.js} +1 -1
  172. package/dist/{vue-ui-xy-canvas-Do4P4ajB.js → vue-ui-xy-canvas-CjrbWdJJ.js} +1 -1
  173. package/package.json +1 -1
  174. package/dist/ColorPicker-Dmus34hN.js +0 -1
  175. package/dist/PenAndPaper-BGEp-TUm.js +0 -1
  176. package/dist/annotationSlots-BRR85CqJ.js +0 -1
  177. package/dist/package-CX7pZToh.js +0 -1
  178. package/dist/useConfig-6jO1fkp5.js +0 -1
  179. package/dist/useTooltipPosition-aoV8pZZ9.js +0 -1
  180. package/dist/vue-data-ui-CORn0LF6.js +0 -1
  181. package/dist/vue-ui-candlestick-Bn_RSZ0k.js +0 -22
  182. package/dist/vue-ui-chestnut-DMYQTkxM.js +0 -1
  183. package/dist/vue-ui-circle-pack-We23fOaF.js +0 -13
  184. package/dist/vue-ui-dag-5fVnwEXd.js +0 -9
  185. package/dist/vue-ui-donut-evolution-CYvo7Cww.js +0 -2
  186. package/dist/vue-ui-geo-BV8ARcaX.js +0 -1
  187. package/dist/vue-ui-heatmap-6YwaVr3F.js +0 -1
  188. package/dist/vue-ui-horizontal-bar-Dfo-kTqg.js +0 -4
  189. package/dist/vue-ui-molecule-C8e5IeHG.js +0 -1
  190. package/dist/vue-ui-quick-chart-Bk2N8Hmd.js +0 -17
  191. package/dist/vue-ui-stackbar-G_zZRAa9.js +0 -29
  192. package/dist/vue-ui-stackline-DchZoEAg.js +0 -39
  193. package/dist/vue-ui-thermometer-CxNoxslq.js +0 -1
  194. package/dist/vue-ui-treemap-CNM5ohoO.js +0 -1
  195. package/dist/vue-ui-wheel-BxR0_iNZ.js +0 -1
  196. package/dist/vue-ui-word-cloud-CZzC3R1K.js +0 -4
  197. package/dist/vue-ui-xy-B6XNUCzQ.js +0 -24
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Ft as i,Ht as a,It as o,Jt as s,Q as c,S as l,X as u,at as d,b as f,f as p,h as m,i as h,in as ee,nt as te,p as g,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./img-D4RQwASc.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./tableIntegration-CNoJ1CIY.js";import{n as ge,t as _e}from"./annotationSlots-BRR85CqJ.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as _}from"./DefGrad-DKMq1REY.js";import{t as Ce}from"./A11yDataTable-DWNlWXzs.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./vue_ui_3d_bar-DmAve5Ri.js";import{Fragment as v,computed as y,createBlock as b,createCommentVNode as x,createElementBlock as S,createElementVNode as C,createSlots as De,createTextVNode as Oe,createVNode as w,defineAsyncComponent as T,guardReactiveProps as ke,mergeProps as Ae,nextTick as je,normalizeClass as Me,normalizeProps as Ne,normalizeStyle as E,onMounted as Pe,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as Fe,toDisplayString as j,toRefs as Ie,unref as M,watch as Le,withCtx as N,withKeys as Re,withModifiers as ze}from"vue";var Be=/* @__PURE__ */ e({default:()=>sn}),Ve=[`id`],He=[`id`],Ue={"aria-live":`polite`,class:`sr-only`},We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe={key:1},Je=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ye=[`x`,`y`],Xe=[`cx`,`cy`,`stroke`,`opacity`],Ze=[`d`,`stroke`],Qe=[`d`,`stroke`],$e={key:4},et={key:0},tt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],rt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],it=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],at={key:1},ot=[`d`,`stroke`,`stroke-width`,`fill`],st=[`d`,`stroke`,`stroke-width`,`fill`],ct=[`d`,`stroke`,`stroke-width`,`fill`],lt={key:2},ut=[`aria-label`],dt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],ft=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],pt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],mt=[`d`,`onMouseenter`,`onClick`,`onMouseout`],ht=[`d`],gt=[`d`,`stroke`],_t=[`onClick`],vt=[`stroke`,`d`],yt=[`cx`,`cy`,`fill`,`stroke`],bt=[`x`,`y`,`width`,`height`],xt=[`x`,`y`,`width`,`height`],St={key:3},Ct=[`d`,`stroke`],wt=[`d`,`fill`,`stroke`],Tt={key:0},Et=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Dt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Ot={key:4},kt=[`d`,`fill`,`stroke`],At={key:5},jt={key:0},Mt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Pt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Ft=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`,`fill`],Lt=[`d`,`stroke`,`stroke-width`,`fill`],Rt=[`d`],zt={key:1},Bt=[`aria-label`],Vt=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Ht=[`onMouseenter`,`onClick`,`onMouseout`,`d`],Ut=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Wt=[`onClick`],Gt=[`stroke`,`d`],Kt=[`cx`,`cy`,`fill`,`stroke`],qt=[`x`,`y`,`width`,`height`],Jt=[`x`,`y`,`width`,`height`],Yt={key:3},Xt=[`d`,`stroke`],Zt=[`d`,`fill`,`stroke`],Qt={key:0},$t=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],en=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],tn={key:4},nn=[`d`,`fill`,`stroke`],rn={key:4,class:`vue-data-ui-watermark`},an={key:0},on={key:1},sn=/*#__PURE__*/ le({__name:`vue-ui-3d-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:le,emit:Be}){let sn=T(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),cn=T(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),ln=T(()=>import(`./DataTable-0Vv-aGHD.js`)),un=T(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),dn=T(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),fn=T(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),pn=T(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_3d_bar:mn}=t(),P=e,hn=Be,gn=y(()=>!!P.dataset&&Object.keys(P.dataset).length),F=O(u()),I=O(null),L=O(!1),_n=O(0),vn=O(0),yn=O(null),bn=O(null),xn=O(null),Sn=O(null),R=O(!1),Cn=O(null),wn=O(null),z=O(null),B=O(``),V=O(Nn()),Tn=y(()=>V.value.style),H=y(()=>V.value.style.chart),U=y(()=>V.value.userOptions);ce({config:()=>V.value,dataset:()=>P.dataset,component:`VueUi3dBar`,rules:[{test:e=>e?.series&&e.series.length>8,message:[`👀 The number of series is > 8. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e?.series&&e.series.some(e=>e?.breakdown&&e.breakdown.length>6),message:[`👀 Some donut breakdowns have > 6 data points. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" data point.`]}]});let En=y(()=>V.value.userOptions.useCursorPointer),Dn=y(()=>ee({defaultConfig:{customPalette:[`#808080`,`#ADADAD`,`#DBDBDB`],userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,color:`#6A6A6A`,bar:{color:`#ADADAD`,stroke:`#6A6A6A`},box:{stroke:`#6A6A6A`}}}},userConfig:V.value.skeletonConfig??{}})),{loading:On,FINAL_DATASET:W}=oe({...Ie(P),FINAL_CONFIG:V,prepareConfig:Nn,callback:()=>{Promise.resolve().then(async()=>{await je(),Hn()})},skeletonDataset:P.config?.skeletonDataset??{series:[{name:`_`,value:21,breakdown:[{name:`_`,value:13},{name:`_`,value:8}]},{name:`_`,value:13,breakdown:[{name:`_`,value:8},{name:`_`,value:5}]},{name:`_`,value:8,breakdown:[{name:`_`,value:5},{name:`_`,value:3}]}]},skeletonConfig:ee({defaultConfig:V.value,userConfig:Dn.value})}),{userOptionsVisible:kn,setUserOptionsVisibility:An,keepUserOptionState:jn}=we({config:V.value}),{svgRef:Mn}=Te({config:V.value.style.chart.title});function Nn(){return ue(P.config,mn,Ee)}Le(()=>P.config,e=>{On.value||(V.value=Nn()),kn.value=!V.value.userOptions.showOnChartHover,Gn(),_n.value+=1,vn.value+=1,G.value.showTable=V.value.table.show},{deep:!0});let{isPrinting:Pn,isImaging:Fn,generatePdf:In,generateImage:Ln}=be({elementId:`3d_bar_${F.value}`,fileName:H.value.title.text||`vue-ui-3d-bar`,options:V.value.userOptions.print}),Rn=y(()=>re(V.value.customPalette)),G=O({showTable:V.value.table.show});Le(V,()=>{G.value={showTable:V.value.table.show}},{immediate:!0});let K=y(()=>W.value.series&&W.value.series.length),zn=O(H.value.box.dimensions.width*(K.value?2:1)),Bn=O(H.value.box.dimensions.height),q=y(()=>({height:Bn.value,width:zn.value,absoluteWidth:zn.value,top:H.value.box.dimensions.top,bottom:H.value.box.dimensions.bottom,left:H.value.box.dimensions.left,right:H.value.box.dimensions.right,perspective:H.value.box.dimensions.perspective})),J=y(()=>{if(K.value){let e=W.value.series.map(e=>e.value||0).reduce((e,t)=>e+t,0),t=W.value.series.map((t,n)=>({...t,seriesIndex:n,id:u(),proportion:(t.value||0)/e,color:l(t.color)||Rn.value[n]||a[n]||a[n%a.length],breakdown:t.breakdown?t.breakdown.sort((e,t)=>t.value-e.value):null})).sort((e,t)=>t.value-e.value),n=[],r=0;for(let e=0;e<t.length;e+=1)n.push({...t[e],fill:qn(r,t[e].proportion,t[e].breakdown,t[e].color)}),r+=t[e].proportion;return n}return null}),Y=y(()=>{let e=q.value.width/2,t=q.value;return{right:`M${e},${t.top} ${t.width-t.right}, ${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,left:`M${e},${t.top} ${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,side:`M${e},${t.height-t.bottom} ${e},${t.top+t.perspective*2}`,topSides:`M${t.left},${t.top+t.perspective} ${e},${t.top+t.perspective*2} ${t.width-t.right},${t.top+t.perspective}`,tubeTop:`M${t.left},${t.top+t.perspective} C ${t.left},${t.top-t.perspective/3} ${t.width-t.right},${t.top-t.perspective/3} ${t.width-t.right},${t.top+t.perspective} C ${t.width-t.right},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective}`,tubeLeft:`M${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective}`,tubeRight:`M${t.width-t.right},${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective}`,tubeBottom:`M${t.width-t.right},${t.height-t.bottom-t.perspective} C ${t.width-t.right},${t.height} ${t.left},${t.height} ${t.left},${t.height-t.bottom-t.perspective}`}}),Vn=O(H.value.animation.use?0:W.value.percentage);function Hn(){let e=0,t=H.value.animation.speed,n=.005*H.value.animation.acceleration;function r(){Vn.value+=t+e,e+=n,Vn.value<W.value.percentage?requestAnimationFrame(r):Vn.value=W.value.percentage}H.value.animation.use&&(Vn.value=0,r())}Pe(()=>{Gn(),Hn()});let Un=y(()=>V.value.debug);function Wn(){Un.value&&(ae(P.dataset)?d({componentName:`VueUi3dBar`,type:`dataset`,debug:Un.value}):P.dataset.series?P.dataset.series.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:t,debug:Un.value})}),e.breakdown&&e.breakdown.forEach((e,n)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`,debug:Un.value})})})}):ie({datasetObject:P.dataset,requiredAttributes:[`percentage`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetAttribute`,property:e,debug:Un.value})}))}function Gn(){if(Wn(),V.value.responsive){let e=xe(()=>{let{width:e,height:t}=Se({chart:I.value,title:H.value.title.text?yn.value:null,source:Sn.value});requestAnimationFrame(()=>{Bn.value=t-12,zn.value=e})});bn.value&&(xn.value&&bn.value.unobserve(xn.value),bn.value.disconnect()),bn.value=new ResizeObserver(e),xn.value=I.value.parentNode,bn.value.observe(xn.value)}}let Kn=y(()=>q.value.width/4);function qn(e,t,n,r){let a=q.value.height-q.value.bottom-q.value.top-q.value.perspective*2,{width:s,height:c,bottom:l,right:u,left:d,perspective:f}=q.value,p=K.value?s/4:s/2,m=p*2+d,h=l+a*e,ee=c-h-f-a*t/2,te=ee>q.value.height/2?`top`:`bottom`,g=c*.25,ne=!!n,re=null,ie=null;return ne&&(n=n.map((e,t)=>({...e,value:e.value||0,color:i(r,t/n.length)})),re=o({series:n},s/2+s/5,te===`top`?ee-g:ee+g,s/10,s/10,1.99999,2,1,360,105.25,s/20),ie=o({series:n},s-m+s/14,c-h-f-a*t/2,s/40,s/40,1.99999,2,1,360,105.25,s/40)),{donut:re,miniDonut:ie,donutR:s/20,CENTER_X:p,sidePointer:{x:s-m,x2:s-m+s/14,xText:s-m+s/9,y:c-h-f-a*t/2,topY:c-h-f-a*t,height:a*t},apexBottom:{y:c-h,x:p},apexTop:{y:c-h-a*t,x:p},right:`M${p},${c-h} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t} ${s-m},${c-h-f}Z`,left:`M${p},${c-h} ${p},${c-h-a*t} ${d}, ${c-h-f-a*t} ${d},${c-h-f}Z`,liningTop:`M${d},${c-h-f-a*t} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t}`,liningTopShade:`M${d},${c-h-f-a*t-.5} ${p},${c-h-a*t-.5} ${s-m},${c-h-f-a*t-.5}`,top:`M${p},${c-h-a*t} ${d},${c-h-f-a*t} ${p},${c-h-f*2-a*t} ${s-m},${c-h-f-a*t} Z`,tubeTop:`M${d},${c-h-a*t-f} C ${d},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f} C ${s-m},${c-h-a*t+f/2} ${d},${c-h-a*t+f/2} ${d},${c-h-a*t-f}`,bottomTubeTop:`M ${s-m-.5},${c-h-f} C ${s-m-.5},${c-h+f/2} ${d},${c-h+f/2} ${d+.5},${c-h-f}`,tubeBody:`M
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Ft as i,Ht as a,It as o,Jt as s,Q as c,S as l,X as u,at as d,b as f,f as p,h as m,i as h,in as ee,nt as te,p as g,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./img-D4RQwASc.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./tableIntegration-CNoJ1CIY.js";import{n as ge,t as _e}from"./annotationSlots-RvQBEO9-.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as _}from"./DefGrad-DKMq1REY.js";import{t as Ce}from"./A11yDataTable-DWNlWXzs.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./vue_ui_3d_bar-DmAve5Ri.js";import{Fragment as v,computed as y,createBlock as b,createCommentVNode as x,createElementBlock as S,createElementVNode as C,createSlots as De,createTextVNode as Oe,createVNode as w,defineAsyncComponent as T,guardReactiveProps as ke,mergeProps as Ae,nextTick as je,normalizeClass as Me,normalizeProps as Ne,normalizeStyle as E,onMounted as Pe,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as Fe,toDisplayString as j,toRefs as Ie,unref as M,watch as Le,withCtx as N,withKeys as Re,withModifiers as ze}from"vue";var Be=/* @__PURE__ */ e({default:()=>sn}),Ve=[`id`],He=[`id`],Ue={"aria-live":`polite`,class:`sr-only`},We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe={key:1},Je=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ye=[`x`,`y`],Xe=[`cx`,`cy`,`stroke`,`opacity`],Ze=[`d`,`stroke`],Qe=[`d`,`stroke`],$e={key:4},et={key:0},tt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],rt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],it=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],at={key:1},ot=[`d`,`stroke`,`stroke-width`,`fill`],st=[`d`,`stroke`,`stroke-width`,`fill`],ct=[`d`,`stroke`,`stroke-width`,`fill`],lt={key:2},ut=[`aria-label`],dt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],ft=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],pt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseout`],mt=[`d`,`onMouseenter`,`onClick`,`onMouseout`],ht=[`d`],gt=[`d`,`stroke`],_t=[`onClick`],vt=[`stroke`,`d`],yt=[`cx`,`cy`,`fill`,`stroke`],bt=[`x`,`y`,`width`,`height`],xt=[`x`,`y`,`width`,`height`],St={key:3},Ct=[`d`,`stroke`],wt=[`d`,`fill`,`stroke`],Tt={key:0},Et=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Dt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],Ot={key:4},kt=[`d`,`fill`,`stroke`],At={key:5},jt={key:0},Mt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Nt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Pt=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],Ft=[`stroke-dasharray`,`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`,`fill`],Lt=[`d`,`stroke`,`stroke-width`,`fill`],Rt=[`d`],zt={key:1},Bt=[`aria-label`],Vt=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Ht=[`onMouseenter`,`onClick`,`onMouseout`,`d`],Ut=[`onMouseenter`,`onClick`,`onMouseout`,`d`,`fill`],Wt=[`onClick`],Gt=[`stroke`,`d`],Kt=[`cx`,`cy`,`fill`,`stroke`],qt=[`x`,`y`,`width`,`height`],Jt=[`x`,`y`,`width`,`height`],Yt={key:3},Xt=[`d`,`stroke`],Zt=[`d`,`fill`,`stroke`],Qt={key:0},$t=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],en=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],tn={key:4},nn=[`d`,`fill`,`stroke`],rn={key:4,class:`vue-data-ui-watermark`},an={key:0},on={key:1},sn=/*#__PURE__*/ le({__name:`vue-ui-3d-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:le,emit:Be}){let sn=T(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),cn=T(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),ln=T(()=>import(`./DataTable-5Ug6gMAX.js`)),un=T(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),dn=T(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),fn=T(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),pn=T(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_3d_bar:mn}=t(),P=e,hn=Be,gn=y(()=>!!P.dataset&&Object.keys(P.dataset).length),F=O(u()),I=O(null),L=O(!1),_n=O(0),vn=O(0),yn=O(null),bn=O(null),xn=O(null),Sn=O(null),R=O(!1),Cn=O(null),wn=O(null),z=O(null),B=O(``),V=O(Nn()),Tn=y(()=>V.value.style),H=y(()=>V.value.style.chart),U=y(()=>V.value.userOptions);ce({config:()=>V.value,dataset:()=>P.dataset,component:`VueUi3dBar`,rules:[{test:e=>e?.series&&e.series.length>8,message:[`👀 The number of series is > 8. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e?.series&&e.series.some(e=>e?.breakdown&&e.breakdown.length>6),message:[`👀 Some donut breakdowns have > 6 data points. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" data point.`]}]});let En=y(()=>V.value.userOptions.useCursorPointer),Dn=y(()=>ee({defaultConfig:{customPalette:[`#808080`,`#ADADAD`,`#DBDBDB`],userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,color:`#6A6A6A`,bar:{color:`#ADADAD`,stroke:`#6A6A6A`},box:{stroke:`#6A6A6A`}}}},userConfig:V.value.skeletonConfig??{}})),{loading:On,FINAL_DATASET:W}=oe({...Ie(P),FINAL_CONFIG:V,prepareConfig:Nn,callback:()=>{Promise.resolve().then(async()=>{await je(),Hn()})},skeletonDataset:P.config?.skeletonDataset??{series:[{name:`_`,value:21,breakdown:[{name:`_`,value:13},{name:`_`,value:8}]},{name:`_`,value:13,breakdown:[{name:`_`,value:8},{name:`_`,value:5}]},{name:`_`,value:8,breakdown:[{name:`_`,value:5},{name:`_`,value:3}]}]},skeletonConfig:ee({defaultConfig:V.value,userConfig:Dn.value})}),{userOptionsVisible:kn,setUserOptionsVisibility:An,keepUserOptionState:jn}=we({config:V.value}),{svgRef:Mn}=Te({config:V.value.style.chart.title});function Nn(){return ue(P.config,mn,Ee)}Le(()=>P.config,e=>{On.value||(V.value=Nn()),kn.value=!V.value.userOptions.showOnChartHover,Gn(),_n.value+=1,vn.value+=1,G.value.showTable=V.value.table.show},{deep:!0});let{isPrinting:Pn,isImaging:Fn,generatePdf:In,generateImage:Ln}=be({elementId:`3d_bar_${F.value}`,fileName:H.value.title.text||`vue-ui-3d-bar`,options:V.value.userOptions.print}),Rn=y(()=>re(V.value.customPalette)),G=O({showTable:V.value.table.show});Le(V,()=>{G.value={showTable:V.value.table.show}},{immediate:!0});let K=y(()=>W.value.series&&W.value.series.length),zn=O(H.value.box.dimensions.width*(K.value?2:1)),Bn=O(H.value.box.dimensions.height),q=y(()=>({height:Bn.value,width:zn.value,absoluteWidth:zn.value,top:H.value.box.dimensions.top,bottom:H.value.box.dimensions.bottom,left:H.value.box.dimensions.left,right:H.value.box.dimensions.right,perspective:H.value.box.dimensions.perspective})),J=y(()=>{if(K.value){let e=W.value.series.map(e=>e.value||0).reduce((e,t)=>e+t,0),t=W.value.series.map((t,n)=>({...t,seriesIndex:n,id:u(),proportion:(t.value||0)/e,color:l(t.color)||Rn.value[n]||a[n]||a[n%a.length],breakdown:t.breakdown?t.breakdown.sort((e,t)=>t.value-e.value):null})).sort((e,t)=>t.value-e.value),n=[],r=0;for(let e=0;e<t.length;e+=1)n.push({...t[e],fill:qn(r,t[e].proportion,t[e].breakdown,t[e].color)}),r+=t[e].proportion;return n}return null}),Y=y(()=>{let e=q.value.width/2,t=q.value;return{right:`M${e},${t.top} ${t.width-t.right}, ${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,left:`M${e},${t.top} ${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective} ${e},${t.height-t.bottom}`,side:`M${e},${t.height-t.bottom} ${e},${t.top+t.perspective*2}`,topSides:`M${t.left},${t.top+t.perspective} ${e},${t.top+t.perspective*2} ${t.width-t.right},${t.top+t.perspective}`,tubeTop:`M${t.left},${t.top+t.perspective} C ${t.left},${t.top-t.perspective/3} ${t.width-t.right},${t.top-t.perspective/3} ${t.width-t.right},${t.top+t.perspective} C ${t.width-t.right},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective*2.3} ${t.left},${t.top+t.perspective}`,tubeLeft:`M${t.left},${t.top+t.perspective} ${t.left},${t.height-t.bottom-t.perspective}`,tubeRight:`M${t.width-t.right},${t.top+t.perspective} ${t.width-t.right},${t.height-t.bottom-t.perspective}`,tubeBottom:`M${t.width-t.right},${t.height-t.bottom-t.perspective} C ${t.width-t.right},${t.height} ${t.left},${t.height} ${t.left},${t.height-t.bottom-t.perspective}`}}),Vn=O(H.value.animation.use?0:W.value.percentage);function Hn(){let e=0,t=H.value.animation.speed,n=.005*H.value.animation.acceleration;function r(){Vn.value+=t+e,e+=n,Vn.value<W.value.percentage?requestAnimationFrame(r):Vn.value=W.value.percentage}H.value.animation.use&&(Vn.value=0,r())}Pe(()=>{Gn(),Hn()});let Un=y(()=>V.value.debug);function Wn(){Un.value&&(ae(P.dataset)?d({componentName:`VueUi3dBar`,type:`dataset`,debug:Un.value}):P.dataset.series?P.dataset.series.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:t,debug:Un.value})}),e.breakdown&&e.breakdown.forEach((e,n)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`,debug:Un.value})})})}):ie({datasetObject:P.dataset,requiredAttributes:[`percentage`]}).forEach(e=>{d({componentName:`VueUi3dBar`,type:`datasetAttribute`,property:e,debug:Un.value})}))}function Gn(){if(Wn(),V.value.responsive){let e=xe(()=>{let{width:e,height:t}=Se({chart:I.value,title:H.value.title.text?yn.value:null,source:Sn.value});requestAnimationFrame(()=>{Bn.value=t-12,zn.value=e})});bn.value&&(xn.value&&bn.value.unobserve(xn.value),bn.value.disconnect()),bn.value=new ResizeObserver(e),xn.value=I.value.parentNode,bn.value.observe(xn.value)}}let Kn=y(()=>q.value.width/4);function qn(e,t,n,r){let a=q.value.height-q.value.bottom-q.value.top-q.value.perspective*2,{width:s,height:c,bottom:l,right:u,left:d,perspective:f}=q.value,p=K.value?s/4:s/2,m=p*2+d,h=l+a*e,ee=c-h-f-a*t/2,te=ee>q.value.height/2?`top`:`bottom`,g=c*.25,ne=!!n,re=null,ie=null;return ne&&(n=n.map((e,t)=>({...e,value:e.value||0,color:i(r,t/n.length)})),re=o({series:n},s/2+s/5,te===`top`?ee-g:ee+g,s/10,s/10,1.99999,2,1,360,105.25,s/20),ie=o({series:n},s-m+s/14,c-h-f-a*t/2,s/40,s/40,1.99999,2,1,360,105.25,s/40)),{donut:re,miniDonut:ie,donutR:s/20,CENTER_X:p,sidePointer:{x:s-m,x2:s-m+s/14,xText:s-m+s/9,y:c-h-f-a*t/2,topY:c-h-f-a*t,height:a*t},apexBottom:{y:c-h,x:p},apexTop:{y:c-h-a*t,x:p},right:`M${p},${c-h} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t} ${s-m},${c-h-f}Z`,left:`M${p},${c-h} ${p},${c-h-a*t} ${d}, ${c-h-f-a*t} ${d},${c-h-f}Z`,liningTop:`M${d},${c-h-f-a*t} ${p},${c-h-a*t} ${s-m},${c-h-f-a*t}`,liningTopShade:`M${d},${c-h-f-a*t-.5} ${p},${c-h-a*t-.5} ${s-m},${c-h-f-a*t-.5}`,top:`M${p},${c-h-a*t} ${d},${c-h-f-a*t} ${p},${c-h-f*2-a*t} ${s-m},${c-h-f-a*t} Z`,tubeTop:`M${d},${c-h-a*t-f} C ${d},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f*2.5} ${s-m},${c-h-a*t-f} C ${s-m},${c-h-a*t+f/2} ${d},${c-h-a*t+f/2} ${d},${c-h-a*t-f}`,bottomTubeTop:`M ${s-m-.5},${c-h-f} C ${s-m-.5},${c-h+f/2} ${d},${c-h+f/2} ${d+.5},${c-h-f}`,tubeBody:`M
2
2
  ${d},${c-h-a*t-f}
3
3
  C ${d},${c-h-a*t+f/2}
4
4
  ${s-m},${c-h-a*t+f/2}
@@ -16,4 +16,4 @@ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO
16
16
  C
17
17
  ${n-l},${r}
18
18
  ${o},${r}
19
- ${o},${r-u-s}Z`}}),X=O(null);function Z(e,t=!1){V.value.events.datapointEnter&&!t&&V.value.events.datapointEnter({datapoint:e,seriesIndex:e.seriesIndex}),V.value.events.datapointClick&&t&&V.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),hn(`selectDatapoint`,e);let n=J.value?.findIndex(t=>t.id===e.id)??null;n!==null&&n!==-1&&(z.value=n,B.value=gr(e)),t||(X.value=e.id),t&&L.value&&(L.value=!1),t&&!L.value&&(L.value=!0)}function Q(e){V.value.events.datapointLeave&&V.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex}),!L.value&&(X.value=null,z.value=null,B.value=``)}function Yn(e,t,n=!1){let r=W.value.series.map(e=>e.value||0).reduce((e,t)=>e+t,0),i=isNaN(e.value/r)?0:e.value/r*100,a=isNaN(e.value/Xn(t))?0:e.value/Xn(t)*100;return n?a:i.toFixed(0)+`%`}function Xn(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Zn=O(!1);function Qn(e){Zn.value=e}function $n(){return K.value?J.value:W.value.percentage}let er=y(()=>K.value?{head:J.value.flatMap(e=>e.breakdown&&e.breakdown.length?[{name:e.name,color:e.color},...e.breakdown.map((t,n)=>({name:t.name,color:i(e.color,n/e.breakdown.length)}))]:{name:e.name,color:e.color}),body:J.value.flatMap(e=>e.breakdown&&e.breakdown.length?[e.value,...e.breakdown.map(e=>e.value)]:e.value)}:null);function tr(e=null){K.value?je(()=>{let t=J.value.map(e=>e.value).reduce((e,t)=>e+t,0),n=er.value.head.map((e,n)=>[[e.name],[er.value.body[n]],[isNaN(er.value.body[n]/t)?`-`:er.value.body[n]/t*100]]),i=[[H.value.title.text],[H.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(n),a=r(i);e?e(a):te({csvContent:a,title:H.value.title.text||`vue-ui-3d-bar`})}):console.warn(`VueUi3dBar : CSV download is only available in stack mode (providing dataset.series instead of dataset.percentage)`)}let $=y(()=>{if(!K.value||!Array.isArray(J.value)||!J.value.length)return{colNames:[],head:[],body:[],a11yBody:[],config:{th:{backgroundColor:V.value.table.th.backgroundColor,color:V.value.table.th.color,outline:V.value.table.th.outline},td:{backgroundColor:V.value.table.td.backgroundColor,color:V.value.table.td.color,outline:V.value.table.td.outline},breakpoint:V.value.table.responsiveBreakpoint,shape:V.value.style.shape===`tube`?`circle`:`square`}};let e=J.value.reduce((e,t)=>e+t.value,0),t=[`__SUM__`,n({p:H.value.legend.prefix,v:e,s:H.value.legend.suffix,r:V.value.table.td.roundingValue}),`100%`],r=er.value.head.map((t,r)=>{let i=er.value.body[r];return[{color:t.color,name:t.name},n({p:H.value.legend.prefix,v:i,s:H.value.legend.suffix,r:V.value.table.td.roundingValue}),isNaN(i/e)?`-`:n({v:i/e*100,s:`%`,r:V.value.table.td.roundingPercentage})]}),i=r.map(e=>e.map((e,t)=>t===0?e.name:e));return{colNames:[V.value.table.columnNames.series,V.value.table.columnNames.value,V.value.table.columnNames.percentage],head:t,body:r,a11yBody:i,config:{th:{backgroundColor:V.value.table.th.backgroundColor,color:V.value.table.th.color,outline:V.value.table.th.outline},td:{backgroundColor:V.value.table.td.backgroundColor,color:V.value.table.td.color,outline:V.value.table.td.outline},breakpoint:V.value.table.responsiveBreakpoint,shape:V.value.style.shape===`tube`?`circle`:`square`}}});function nr(){G.value.showTable=!G.value.showTable}let rr=O(!1);function ir(){rr.value=!rr.value}async function ar({scale:e=2}={}){if(!I.value)return;let{width:t,height:n}=I.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await de({domElement:I.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:H.value.title.text,width:t,height:n,aspectRatio:r}}let or=y(()=>he({config:V,style:H,mutableConfig:G,dialog:pn,accordion:cn,isFullscreen:Zn,parent:I,maxWidth:800}));Le(()=>G.value.showTable,e=>me(e,V,Cn));function sr(){G.value.showTable=!1,wn.value&&wn.value.setTableIconState(!1)}let cr=y(()=>V.value.style.chart.backgroundColor),lr=y(()=>V.value.style.chart.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=pe({svg:Mn,title:lr,legend:null,legendItems:null,backgroundColor:cr,getSvgCallback:()=>V.value.userOptions.callbacks.svg,generateImage:Ln});async function mr(){hn(`copyAlt`,{config:V.value,dataset:W.value}),V.value.userOptions.callbacks.altCopy?await Promise.resolve(V.value.userOptions.callbacks.altCopy({config:V.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function hr(){z.value=null,B.value=``,L.value=!1,X.value=null}function gr(e){if(!e)return``;let t=n({p:H.value.legend.prefix,v:e.value,s:H.value.legend.suffix,r:H.value.legend.roundingValue}),r=n({v:e.proportion*100,s:`%`,r:H.value.legend.roundingPercentage});return`${e.name}: ${t}, ${r}`}function _r(e){if(!K.value||!J.value?.length)return;let t=J.value[e];t&&(z.value=e,X.value=t.id,B.value=gr(t))}function vr(){R.value=!0,K.value&&J.value?.length&&z.value===null&&_r(0)}function yr(){R.value=!1,L.value||(z.value=null,X.value=null,B.value=``)}function br(e){if(!K.value||!J.value?.length||!Mn.value||document.activeElement!==Mn.value)return;let t=[`ArrowLeft`,`ArrowDown`].includes(e.key),n=[`ArrowRight`,`ArrowUp`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){hr();return}if(r){if(z.value===null)return;let e=J.value[z.value];if(!e)return;Z(e,!0),B.value=`${gr(e)} selected`;return}let a=z.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1)),_r(a)}let xr=y(()=>({headers:$.value?.colNames??[],rows:$.value?.a11yBody??[]}));return le({getImage:ar,generateCsv:tr,generatePdf:In,generateImage:Ln,generateSvg:fr,getData:$n,toggleTable:nr,toggleAnnotator:ir,toggleFullscreen:Qn,copyAlt:mr}),(e,t)=>(D(),S(`div`,{ref_key:`bar3dChart`,ref:I,class:Me(`vue-data-ui-component vue-ui-3d-bar`),style:E(`font-family:${Tn.value.fontFamily};width:100%; text-align:center;background:${H.value.backgroundColor}`),id:`3d_bar_${F.value}`,onMouseenter:t[8]||=()=>M(An)(!0),onMouseleave:t[9]||=()=>M(An)(!1)},[C(`div`,{id:`chart-instructions-${F.value}`,class:`sr-only`},[C(`p`,null,j(V.value.a11y.translations.keyboardNavigation),1)],8,He),C(`div`,Ue,j(B.value),1),xr.value?.rows?.length?(D(),b(Ce,{key:0,uid:F.value,head:xr.value.headers,body:xr.value.rows,notice:V.value.a11y.translations.tableAvailable,caption:V.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):x(``,!0),U.value.buttons.annotator?(D(),b(M(un),{key:1,svgRef:M(Mn),backgroundColor:H.value.backgroundColor,color:H.value.color,active:rr.value,isCursorPointer:En.value,palette:U.value.annotatorPalette,onClose:ir},De({_:2},[k(M(_e),t=>({name:t,fn:N(n=>[A(e.$slots,t,Ne(ke(M(ge)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):x(``,!0),H.value.title.text?(D(),S(`div`,{key:2,ref_key:`chartTitle`,ref:yn,style:`width:100%;background:transparent`},[(D(),b(fe,{key:`title_${_n.value}`,config:{title:{cy:`3dBar-div-title`,...H.value.title},subtitle:{cy:`3dBar-div-subtitle`,...H.value.title.subtitle}}},null,8,[`config`]))],512)):x(``,!0),U.value.show&&gn.value&&(M(jn)||M(kn))?(D(),b(M(dn),{key:3,ref_key:`userOptionsRef`,ref:wn,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:M(Pn),isImaging:M(Fn),uid:F.value,hasPdf:U.value.buttons.pdf,hasTable:!!K.value&&U.value.buttons.table,hasXls:!!K.value&&U.value.buttons.csv,hasImg:U.value.buttons.img,hasSvg:U.value.buttons.svg,hasFullscreen:U.value.buttons.fullscreen,hasAltCopy:U.value.buttons.altCopy,titles:{...U.value.buttonTitles},chartElement:I.value,position:U.value.position,hasAnnotator:U.value.buttons.annotator,isAnnotation:rr.value,callbacks:U.value.callbacks,printScale:U.value.print.scale,tableDialog:V.value.table.useDialog,isCursorPointer:En.value,onToggleFullscreen:Qn,onGeneratePdf:M(In),onGenerateCsv:tr,onGenerateImage:M(pr),onGenerateSvg:M(fr),onToggleTable:nr,onToggleAnnotator:ir,onCopyAlt:mr,style:E({visibility:M(jn)?M(kn)?`visible`:`hidden`:`visible`})},De({_:2},[k(M(ve)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:N(n=>[A(e.$slots,t,Ne(ke(M(ye)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasTable`,`hasXls`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):x(``,!0),C(`div`,We,[(D(),S(`svg`,{ref_key:`svgRef`,ref:Mn,xmlns:M(ne),class:Me({"vue-data-ui-fullscreen--on":Zn.value,"vue-data-ui-fulscreen--off":!Zn.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.height}`,style:E(`max-width:100%; overflow: visible; background:transparent;color:${H.value.color}`),tabindex:`0`,"aria-describedby":`chart-instructions-${F.value}`,onFocus:vr,onBlur:yr,onKeydown:br},[w(M(fn)),A(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:M(Pn)||M(Fn)||M(ur),isPrintingSvg:M(dr)}},void 0,!0),e.$slots[`chart-background`]?(D(),S(`foreignObject`,{key:0,x:0,y:0,width:q.value.absoluteWidth,height:q.value.height,style:{pointerEvents:`none`}},[A(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):x(``,!0),C(`defs`,null,[w(_,{t:`radial`,id:`gradient_top${F.value}`,stops:[[`0%`,M(s)(H.value.backgroundColor,0),1],[`100%`,H.value.bar.color,1]]},null,8,[`id`,`stops`]),w(_,{t:`radial`,id:`gradient_tube_top${F.value}`,stops:[[`0%`,M(s)(M(i)(H.value.bar.color,.5),80),1],[`100%`,M(s)(M(c)(H.value.bar.color,.1),80),1]]},null,8,[`id`,`stops`]),w(_,{t:`radial`,id:`gradient_left${F.value}`,stops:[[`0%`,M(s)(H.value.backgroundColor,0),1],[`100%`,M(s)(H.value.bar.color,20),1]]},null,8,[`id`,`stops`]),w(_,{t:`radial`,id:`gradient_right${F.value}`,stops:[[`0%`,M(s)(H.value.backgroundColor,0),1],[`100%`,M(s)(H.value.bar.color,20),1]]},null,8,[`id`,`stops`]),w(_,{t:`linear`,id:`gradient_tube_body${F.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,H.value.bar.color,1],[`10%`,M(s)(M(c)(H.value.bar.color,.7),100),1],[`25%`,M(s)(M(c)(H.value.bar.color,.5),100),1],[`75%`,M(s)(H.value.bar.color,80),1],[`100%`,M(s)(M(i)(H.value.bar.color,.7),100),1]]},null,8,[`id`,`stops`])]),K.value?(D(),S(`defs`,qe,[(D(!0),S(v,null,k(J.value,e=>(D(),b(_,{t:`radial`,id:`grad_top_${e.id}`,key:`grad_top_${e.id}`,stops:[[`0%`,M(s)(M(i)(e.color,.5),80),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(D(!0),S(v,null,k(J.value,e=>(D(),b(_,{t:`linear`,id:`grad_left_${e.id}`,key:`grad_left_${e.id}`,stops:[[`0%`,M(s)(e.color,80),1],[`100%`,M(s)(M(c)(e.color,.5),100),1]]},null,8,[`id`,`stops`]))),128)),(D(!0),S(v,null,k(J.value,e=>(D(),b(_,{t:`linear`,id:`grad_right_${e.id}`,key:`grad_right_${e.id}`,stops:[[`2%`,M(s)(M(i)(e.color,.5),100),1],[`100%`,M(s)(e.color,80),1]]},null,8,[`id`,`stops`]))),128)),w(_,{t:`linear`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,id:`vertical_line_${F.value}`,stops:[[`0%`,`#FFFFFF`,1],[`100%`,`#FFFFFF33`,1]]},null,8,[`id`])])):x(``,!0),H.value.dataLabel.show&&![null,void 0].includes(M(W).percentage)&&[null,void 0].includes(M(W).series)?(D(),S(`text`,{key:2,x:q.value.width/2,y:q.value.top-H.value.dataLabel.fontSize/2,"font-size":H.value.dataLabel.fontSize,"font-weight":H.value.dataLabel.bold?`bold`:`normal`,fill:H.value.dataLabel.color,"text-anchor":`middle`},j(M(n)({v:Vn.value,s:`%`,r:H.value.dataLabel.rounding})),9,Je)):x(``,!0),L.value?(D(),S(`g`,{key:3,role:`button`,tabindex:`0`,"aria-label":`Clear selection`,onClick:t[0]||=e=>{L.value=!1,X.value=null},onKeydown:[t[1]||=Re(ze(e=>{L.value=!1,X.value=null},[`prevent`]),[`enter`]),t[2]||=Re(ze(e=>{L.value=!1,X.value=null},[`prevent`]),[`space`])],onFocus:t[3]||=e=>R.value=!0,onBlur:t[4]||=e=>R.value=!1,onMouseenter:t[5]||=e=>R.value=!0,onMouseleave:t[6]||=e=>R.value=!1,class:`svg-btn`,"data-dom-to-png-ignore":``,style:E({cursor:En.value?`pointer`:`default`,outline:`none`})},[t[10]||=C(`title`,null,`Clear selection`,-1),C(`rect`,{x:Kn.value-12,y:q.value.top-24,width:24,height:24,fill:`transparent`,"pointer-events":`all`},null,8,Ye),C(`circle`,{cx:Kn.value,cy:q.value.top-12,r:`10`,fill:`none`,stroke:H.value.color,"stroke-width":`2`,"vector-effect":`non-scaling-stroke`,opacity:R.value?.5:0},null,8,Xe),C(`path`,{d:`M${Kn.value-6},${q.value.top-18} ${Kn.value+6},${q.value.top-6}`,stroke:H.value.color,"stroke-linecap":`round`,"stroke-width":`2`,"vector-effect":`non-scaling-stroke`},null,8,Ze),C(`path`,{d:`M${Kn.value+6},${q.value.top-18} ${Kn.value-6},${q.value.top-6}`,stroke:H.value.color,"stroke-linecap":`round`,"stroke-width":`2`,"vector-effect":`non-scaling-stroke`},null,8,Qe)],36)):x(``,!0),!Tn.value.shape||Tn.value.shape===`bar`?(D(),S(`g`,$e,[K.value?x(``,!0):(D(),S(`g`,et,[C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.right,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,tt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.left,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,nt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.side,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,rt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.topSides,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,it)])),K.value?x(``,!0):(D(),S(`g`,at,[C(`path`,{d:Jn.value.right,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_right${F.value})`},null,8,ot),C(`path`,{d:Jn.value.left,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_left${F.value})`},null,8,st),C(`path`,{d:Jn.value.top,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_top${F.value})`},null,8,ct)])),K.value?(D(),S(`g`,lt,[(D(!0),S(v,null,k(J.value,(e,t)=>(D(),S(`g`,{style:E(`opacity:${X.value?X.value===e.id?1:.3:1}`),class:`vue-ui-3d-bar-stack`,role:`img`,"aria-label":gr(e)},[C(`path`,{d:e.fill.right,fill:`url(#grad_right_${e.id})`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,dt),C(`path`,{d:e.fill.left,fill:`url(#grad_left_${e.id})`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,ft),C(`path`,{d:e.fill.top,fill:`url(#grad_top_${e.id})`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,pt),C(`path`,{d:e.fill.liningTop,stroke:`#FFFFFF`,"stroke-width":`0.5`,"stroke-linecap":`round`,fill:`none`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,mt),C(`path`,{d:`M ${e.fill.apexTop.x},${e.fill.apexTop.y} ${e.fill.apexBottom.x},${e.fill.apexBottom.y}`,stroke:`#FFFFFF`,"stroke-width":`0.5`,"stroke-linecap":`round`},null,8,ht)],12,ut))),256)),(D(!0),S(v,null,k(J.value,(e,t)=>(D(),S(`g`,null,[t===J.value.length-1?x(``,!0):(D(),S(`path`,{key:0,d:e.fill.liningTopShade,stroke:H.value.bar.shadeColor,"stroke-width":`0.5`,"stroke-linecap":`round`,fill:`none`,style:{"pointer-events":`none`}},null,8,gt))]))),256)),(D(!0),S(v,null,k(J.value,(t,r)=>(D(),S(`g`,{style:E(`opacity:${X.value?+(X.value===t.id):+(t.proportion*100>H.value.legend.hideUnderPercentage)}`),onClick:e=>hn(`selectDatapoint`,t)},[C(`path`,{stroke:H.value.color,"stroke-dasharray":`1`,"stroke-width":`0.5`,"stroke-linecap":`round`,d:`M${t.fill.sidePointer.x},${t.fill.sidePointer.y} ${t.fill.sidePointer.x2},${t.fill.sidePointer.y}`},null,8,vt),!t.fill.miniDonut||X.value?(D(),S(`circle`,{key:0,cx:t.fill.sidePointer.x2,cy:t.fill.sidePointer.y,r:2,fill:t.color,stroke:H.value.backgroundColor},null,8,yt)):x(``,!0),M(On)?(D(),S(`rect`,{key:1,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize/2,width:q.value.width/3,height:H.value.legend.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,bt)):x(``,!0),M(On)?x(``,!0):(D(),S(`foreignObject`,{key:2,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize,width:q.value.absoluteWidth/3,height:H.value.legend.fontSize*2,style:{overflow:`visible`,position:`relative`}},[H.value.legend.showDefault?(D(),S(`div`,{key:0,style:E(`height: 100%; width: 100%; display: flex; flex-direction: row; flex-wrap: wrap; align-items:center;justify-content: flex-start; font-size:${H.value.legend.fontSize}px; text-align:left; line-height: ${H.value.legend.fontSize}px; color:${H.value.legend.color}; font-weight:${H.value.legend.bold?`bold`:`normal`}`)},j(M(h)(H.value.dataLabel.formatter,t.value,`${t.name}: ${M(n)({v:t.proportion*100,s:`%`,r:H.value.legend.roundingPercentage})} (${M(n)({p:H.value.legend.prefix,v:t.value,s:H.value.legend.suffix,r:H.value.legend.roundingValue})})`,{datapoint:t,seriesIndex:r,type:`barDatapoint`})),5)):x(``,!0),A(e.$slots,`legend`,Ae({ref_for:!0},{datapoint:t,config:V.value,dataset:J.value}),void 0,!0)],8,xt)),t.fill.donut&&X.value===t.id?(D(),S(`g`,St,[(D(!0),S(v,null,k(t.fill.donut,(e,n)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`path`,{key:0,d:M(m)(e,{x:e.cx,y:e.cy},0,8,!1,!0,10),stroke:e.color,class:`vue-ui-donut-arc-path`,"stroke-width":`0.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Ct)):x(``,!0)]))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":1},null,8,wt))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,r)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`g`,Tt,[C(`text`,{"text-anchor":M(p)(e,!0,0).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12),fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(M(h)(H.value.dataLabel.formatter,e.value,`${Yn(e,t.fill.donut)} (${M(n)({p:V.value.style.chart.legend.prefix,v:e.value,s:V.value.style.chart.legend.suffix,r:V.value.style.chart.legend.roundingValue})})`,{datapoint:e,seriesIndex:r,type:`donutDatapoint`})),9,Et),C(`text`,{"text-anchor":M(p)(e).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12)+H.value.legend.fontSize/1.5,fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(e.name),9,Dt)])):x(``,!0)]))),256))])):x(``,!0),t.fill.miniDonut&&!X.value?(D(),S(`g`,Ot,[(D(!0),S(v,null,k(t.fill.miniDonut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":.5},null,8,kt))),256))])):x(``,!0)],12,_t))),256))])):x(``,!0)])):x(``,!0),Tn.value.shape===`tube`?(D(),S(`g`,At,[K.value?x(``,!0):(D(),S(`g`,jt,[C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeTop,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Mt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeLeft,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Nt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeRight,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Pt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeBottom,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Ft),C(`path`,{d:Jn.value.tubeTop,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_top${F.value})`},null,8,It),C(`path`,{d:Jn.value.tubeBody,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_body${F.value})`},null,8,Lt),C(`path`,{d:Jn.value.tubeTop,stroke:`#FFFFFF`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Rt)])),K.value?(D(),S(`g`,zt,[(D(!0),S(v,null,k(J.value,(e,t)=>(D(),S(`g`,{style:E(`opacity:${X.value?X.value===e.id?1:.3:1}`),class:`vue-ui-3d-bar-stack`,role:`img`,"aria-label":gr(e)},[C(`defs`,null,[w(_,{t:`radial`,id:`gradient_tube_top_${e.id}`,fx:`10%`,cy:`55%`,stops:[[`0%`,M(s)(M(i)(e.color,.5),80),1],[`100%`,M(s)(M(c)(e.color,.1),80),1]]},null,8,[`id`,`stops`]),w(_,{t:`linear`,id:`gradient_tube_body_${e.id}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`10%`,M(s)(M(c)(e.color,.7),100),1],[`25%`,M(s)(M(c)(e.color,.5),100),1],[`75%`,M(s)(e.color,80),1],[`100%`,M(s)(M(i)(e.color,.7),100),1]]},null,8,[`id`,`stops`])]),C(`path`,{onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e),d:e.fill.tubeBody,stroke:`#FFFFFF`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_body_${e.id})`},null,40,Vt),t>0?(D(),S(`path`,{key:0,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e),d:e.fill.bottomTubeTop,stroke:`#000000`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,40,Ht)):x(``,!0),C(`path`,{onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e),d:e.fill.tubeTop,stroke:`#FFFFFF`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_top_${e.id})`},null,40,Ut)],12,Bt))),256)),(D(!0),S(v,null,k(J.value,(t,r)=>(D(),S(`g`,{style:E(`opacity:${X.value?+(X.value===t.id):+(t.proportion*100>H.value.legend.hideUnderPercentage)}`),onClick:e=>hn(`selectDatapoint`,t)},[C(`path`,{stroke:H.value.color,"stroke-dasharray":`1`,"stroke-width":`0.5`,"stroke-linecap":`round`,d:`M${t.fill.sidePointer.x},${t.fill.sidePointer.y} ${t.fill.sidePointer.x2},${t.fill.sidePointer.y}`},null,8,Gt),!t.fill.miniDonut||X.value?(D(),S(`circle`,{key:0,cx:t.fill.sidePointer.x2,cy:t.fill.sidePointer.y,r:2,fill:t.color,stroke:H.value.backgroundColor},null,8,Kt)):x(``,!0),M(On)?(D(),S(`rect`,{key:1,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize/2,width:q.value.width/3,height:H.value.legend.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,qt)):x(``,!0),M(On)?x(``,!0):(D(),S(`foreignObject`,{key:2,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize,width:q.value.absoluteWidth/3,height:H.value.legend.fontSize*2,style:{overflow:`visible`,position:`relative`}},[H.value.legend.showDefault?(D(),S(`div`,{key:0,style:E(`height: 100%; width: 100%; display: flex; flex-direction: row; flex-wrap: wrap; align-items:center;justify-content: flex-start; font-size:${H.value.legend.fontSize}px; text-align:left; line-height: ${H.value.legend.fontSize}px; color:${H.value.legend.color};font-weight:${H.value.legend.bold?`bold`:`normal`}`)},j(M(h)(H.value.dataLabel.formatter,t.value,`${t.name}: ${M(n)({v:t.proportion*100,s:`%`,r:H.value.legend.roundingPercentage})} (${M(n)({p:H.value.legend.prefix,v:t.value,s:H.value.legend.suffix,r:H.value.legend.roundingValue})})`,{datapoint:t,seriesIndex:r,type:`barDatapoint`})),5)):x(``,!0),A(e.$slots,`legend`,Ae({ref_for:!0},{datapoint:t,config:V.value,dataset:J.value}),void 0,!0)],8,Jt)),t.fill.donut&&X.value===t.id?(D(),S(`g`,Yt,[(D(!0),S(v,null,k(t.fill.donut,(e,n)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`path`,{key:0,d:M(m)(e,{x:e.cx,y:e.cy},0,8,!1,!0,10),stroke:e.color,class:`vue-ui-donut-arc-path`,"stroke-width":`0.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Xt)):x(``,!0)]))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":1},null,8,Zt))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,r)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`g`,Qt,[C(`text`,{"text-anchor":M(p)(e,!0,0).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12),fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(M(h)(H.value.dataLabel.formatter,e.value,`${Yn(e,t.fill.donut)} (${M(n)({p:V.value.style.chart.legend.prefix,v:e.value,s:V.value.style.chart.legend.suffix,r:V.value.style.chart.legend.roundingValue})})`,{datapoint:e,seriesIndex:r,type:`donutDatapoint`})),9,$t),C(`text`,{"text-anchor":M(p)(e).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12)+H.value.legend.fontSize/1.5,fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(e.name),9,en)])):x(``,!0)]))),256))])):x(``,!0),t.fill.miniDonut&&!X.value?(D(),S(`g`,tn,[(D(!0),S(v,null,k(t.fill.miniDonut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":.5},null,8,nn))),256))])):x(``,!0)],12,Wt))),256))])):x(``,!0)])):x(``,!0),A(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:M(Pn)||M(Fn)||M(ur),isPrintingSvg:M(dr)}},void 0,!0)],46,Ge))]),e.$slots.watermark?(D(),S(`div`,rn,[A(e.$slots,`watermark`,Ne(ke({isPrinting:M(Pn)||M(Fn)||M(dr)||M(ur)})),void 0,!0)])):x(``,!0),e.$slots.source?(D(),S(`div`,{key:5,ref_key:`source`,ref:Sn,dir:`auto`},[A(e.$slots,`source`,{},void 0,!0)],512)):x(``,!0),gn.value&&K.value&&U.value.buttons.table?(D(),b(Fe(or.value.component),Ae({key:6},or.value.props,{ref_key:`tableUnit`,ref:Cn,onClose:sr}),De({content:N(()=>[(D(),b(M(ln),{key:`table_${vn.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:V.value.table.useDialog?``:or.value.title,withCloseButton:!V.value.table.useDialog,isCursorPointer:En.value,onClose:sr},{th:N(({th:e})=>[e===`__SUM__`?(D(),S(`div`,an,[w(M(sn),{name:`sigma`,stroke:$.value.config.th.color,size:16},null,8,[`stroke`])])):(D(),S(`div`,on,j(e),1))]),td:N(({td:e})=>[Oe(j(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[V.value.table.useDialog?{name:`title`,fn:N(()=>[Oe(j(or.value.title),1)]),key:`0`}:void 0,V.value.table.useDialog?{name:`actions`,fn:N(()=>[C(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[7]||=e=>tr(U.value.callbacks.csv)},[w(M(sn),{name:`fileCsv`,stroke:or.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):x(``,!0),A(e.$slots,`skeleton`,{},()=>[M(On)?(D(),b(se,{key:0})):x(``,!0)],!0)],44,Ve))}},[[`__scopeId`,`data-v-547ac588`]]);export{Be as n,sn as t};
19
+ ${o},${r-u-s}Z`}}),X=O(null);function Z(e,t=!1){V.value.events.datapointEnter&&!t&&V.value.events.datapointEnter({datapoint:e,seriesIndex:e.seriesIndex}),V.value.events.datapointClick&&t&&V.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),hn(`selectDatapoint`,e);let n=J.value?.findIndex(t=>t.id===e.id)??null;n!==null&&n!==-1&&(z.value=n,B.value=gr(e)),t||(X.value=e.id),t&&L.value&&(L.value=!1),t&&!L.value&&(L.value=!0)}function Q(e){V.value.events.datapointLeave&&V.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex}),!L.value&&(X.value=null,z.value=null,B.value=``)}function Yn(e,t,n=!1){let r=W.value.series.map(e=>e.value||0).reduce((e,t)=>e+t,0),i=isNaN(e.value/r)?0:e.value/r*100,a=isNaN(e.value/Xn(t))?0:e.value/Xn(t)*100;return n?a:i.toFixed(0)+`%`}function Xn(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Zn=O(!1);function Qn(e){Zn.value=e}function $n(){return K.value?J.value:W.value.percentage}let er=y(()=>K.value?{head:J.value.flatMap(e=>e.breakdown&&e.breakdown.length?[{name:e.name,color:e.color},...e.breakdown.map((t,n)=>({name:t.name,color:i(e.color,n/e.breakdown.length)}))]:{name:e.name,color:e.color}),body:J.value.flatMap(e=>e.breakdown&&e.breakdown.length?[e.value,...e.breakdown.map(e=>e.value)]:e.value)}:null);function tr(e=null){K.value?je(()=>{let t=J.value.map(e=>e.value).reduce((e,t)=>e+t,0),n=er.value.head.map((e,n)=>[[e.name],[er.value.body[n]],[isNaN(er.value.body[n]/t)?`-`:er.value.body[n]/t*100]]),i=[[H.value.title.text],[H.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(n),a=r(i);e?e(a):te({csvContent:a,title:H.value.title.text||`vue-ui-3d-bar`})}):console.warn(`VueUi3dBar : CSV download is only available in stack mode (providing dataset.series instead of dataset.percentage)`)}let $=y(()=>{if(!K.value||!Array.isArray(J.value)||!J.value.length)return{colNames:[],head:[],body:[],a11yBody:[],config:{th:{backgroundColor:V.value.table.th.backgroundColor,color:V.value.table.th.color,outline:V.value.table.th.outline},td:{backgroundColor:V.value.table.td.backgroundColor,color:V.value.table.td.color,outline:V.value.table.td.outline},breakpoint:V.value.table.responsiveBreakpoint,shape:V.value.style.shape===`tube`?`circle`:`square`}};let e=J.value.reduce((e,t)=>e+t.value,0),t=[`__SUM__`,n({p:H.value.legend.prefix,v:e,s:H.value.legend.suffix,r:V.value.table.td.roundingValue}),`100%`],r=er.value.head.map((t,r)=>{let i=er.value.body[r];return[{color:t.color,name:t.name},n({p:H.value.legend.prefix,v:i,s:H.value.legend.suffix,r:V.value.table.td.roundingValue}),isNaN(i/e)?`-`:n({v:i/e*100,s:`%`,r:V.value.table.td.roundingPercentage})]}),i=r.map(e=>e.map((e,t)=>t===0?e.name:e));return{colNames:[V.value.table.columnNames.series,V.value.table.columnNames.value,V.value.table.columnNames.percentage],head:t,body:r,a11yBody:i,config:{th:{backgroundColor:V.value.table.th.backgroundColor,color:V.value.table.th.color,outline:V.value.table.th.outline},td:{backgroundColor:V.value.table.td.backgroundColor,color:V.value.table.td.color,outline:V.value.table.td.outline},breakpoint:V.value.table.responsiveBreakpoint,shape:V.value.style.shape===`tube`?`circle`:`square`}}});function nr(){G.value.showTable=!G.value.showTable}let rr=O(!1);function ir(){rr.value=!rr.value}async function ar({scale:e=2}={}){if(!I.value)return;let{width:t,height:n}=I.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await de({domElement:I.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:H.value.title.text,width:t,height:n,aspectRatio:r}}let or=y(()=>he({config:V,style:H,mutableConfig:G,dialog:pn,accordion:cn,isFullscreen:Zn,parent:I,maxWidth:800}));Le(()=>G.value.showTable,e=>me(e,V,Cn));function sr(){G.value.showTable=!1,wn.value&&wn.value.setTableIconState(!1)}let cr=y(()=>V.value.style.chart.backgroundColor),lr=y(()=>V.value.style.chart.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=pe({svg:Mn,title:lr,legend:null,legendItems:null,backgroundColor:cr,getSvgCallback:()=>V.value.userOptions.callbacks.svg,generateImage:Ln});async function mr(){hn(`copyAlt`,{config:V.value,dataset:W.value}),V.value.userOptions.callbacks.altCopy?await Promise.resolve(V.value.userOptions.callbacks.altCopy({config:V.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function hr(){z.value=null,B.value=``,L.value=!1,X.value=null}function gr(e){if(!e)return``;let t=n({p:H.value.legend.prefix,v:e.value,s:H.value.legend.suffix,r:H.value.legend.roundingValue}),r=n({v:e.proportion*100,s:`%`,r:H.value.legend.roundingPercentage});return`${e.name}: ${t}, ${r}`}function _r(e){if(!K.value||!J.value?.length)return;let t=J.value[e];t&&(z.value=e,X.value=t.id,B.value=gr(t))}function vr(){R.value=!0,K.value&&J.value?.length&&z.value===null&&_r(0)}function yr(){R.value=!1,L.value||(z.value=null,X.value=null,B.value=``)}function br(e){if(!K.value||!J.value?.length||!Mn.value||document.activeElement!==Mn.value)return;let t=[`ArrowLeft`,`ArrowDown`].includes(e.key),n=[`ArrowRight`,`ArrowUp`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){hr();return}if(r){if(z.value===null)return;let e=J.value[z.value];if(!e)return;Z(e,!0),B.value=`${gr(e)} selected`;return}let a=z.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1)),_r(a)}let xr=y(()=>({headers:$.value?.colNames??[],rows:$.value?.a11yBody??[]}));return le({getImage:ar,generateCsv:tr,generatePdf:In,generateImage:Ln,generateSvg:fr,getData:$n,toggleTable:nr,toggleAnnotator:ir,toggleFullscreen:Qn,copyAlt:mr}),(e,t)=>(D(),S(`div`,{ref_key:`bar3dChart`,ref:I,class:Me(`vue-data-ui-component vue-ui-3d-bar`),style:E(`font-family:${Tn.value.fontFamily};width:100%; text-align:center;background:${H.value.backgroundColor}`),id:`3d_bar_${F.value}`,onMouseenter:t[8]||=()=>M(An)(!0),onMouseleave:t[9]||=()=>M(An)(!1)},[C(`div`,{id:`chart-instructions-${F.value}`,class:`sr-only`},[C(`p`,null,j(V.value.a11y.translations.keyboardNavigation),1)],8,He),C(`div`,Ue,j(B.value),1),xr.value?.rows?.length?(D(),b(Ce,{key:0,uid:F.value,head:xr.value.headers,body:xr.value.rows,notice:V.value.a11y.translations.tableAvailable,caption:V.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):x(``,!0),U.value.buttons.annotator?(D(),b(M(un),{key:1,showGroupActions:U.value.annotator?.showGroupActions??!0,svgRef:M(Mn),backgroundColor:H.value.backgroundColor,color:H.value.color,active:rr.value,isCursorPointer:En.value,palette:U.value.annotatorPalette,onClose:ir},De({_:2},[k(M(_e),t=>({name:t,fn:N(n=>[A(e.$slots,t,Ne(ke(M(ge)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):x(``,!0),H.value.title.text?(D(),S(`div`,{key:2,ref_key:`chartTitle`,ref:yn,style:`width:100%;background:transparent`},[(D(),b(fe,{key:`title_${_n.value}`,config:{title:{cy:`3dBar-div-title`,...H.value.title},subtitle:{cy:`3dBar-div-subtitle`,...H.value.title.subtitle}}},null,8,[`config`]))],512)):x(``,!0),U.value.show&&gn.value&&(M(jn)||M(kn))?(D(),b(M(dn),{key:3,ref_key:`userOptionsRef`,ref:wn,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:M(Pn),isImaging:M(Fn),uid:F.value,hasPdf:U.value.buttons.pdf,hasTable:!!K.value&&U.value.buttons.table,hasXls:!!K.value&&U.value.buttons.csv,hasImg:U.value.buttons.img,hasSvg:U.value.buttons.svg,hasFullscreen:U.value.buttons.fullscreen,hasAltCopy:U.value.buttons.altCopy,titles:{...U.value.buttonTitles},chartElement:I.value,position:U.value.position,hasAnnotator:U.value.buttons.annotator,isAnnotation:rr.value,callbacks:U.value.callbacks,printScale:U.value.print.scale,tableDialog:V.value.table.useDialog,isCursorPointer:En.value,onToggleFullscreen:Qn,onGeneratePdf:M(In),onGenerateCsv:tr,onGenerateImage:M(pr),onGenerateSvg:M(fr),onToggleTable:nr,onToggleAnnotator:ir,onCopyAlt:mr,style:E({visibility:M(jn)?M(kn)?`visible`:`hidden`:`visible`})},De({_:2},[k(M(ve)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:N(n=>[A(e.$slots,t,Ne(ke(M(ye)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasTable`,`hasXls`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):x(``,!0),C(`div`,We,[(D(),S(`svg`,{ref_key:`svgRef`,ref:Mn,xmlns:M(ne),class:Me({"vue-data-ui-fullscreen--on":Zn.value,"vue-data-ui-fulscreen--off":!Zn.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.height}`,style:E(`max-width:100%; overflow: visible; background:transparent;color:${H.value.color}`),tabindex:`0`,"aria-describedby":`chart-instructions-${F.value}`,onFocus:vr,onBlur:yr,onKeydown:br},[w(M(fn)),A(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:M(Pn)||M(Fn)||M(ur),isPrintingSvg:M(dr)}},void 0,!0),e.$slots[`chart-background`]?(D(),S(`foreignObject`,{key:0,x:0,y:0,width:q.value.absoluteWidth,height:q.value.height,style:{pointerEvents:`none`}},[A(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):x(``,!0),C(`defs`,null,[w(_,{t:`radial`,id:`gradient_top${F.value}`,stops:[[`0%`,M(s)(H.value.backgroundColor,0),1],[`100%`,H.value.bar.color,1]]},null,8,[`id`,`stops`]),w(_,{t:`radial`,id:`gradient_tube_top${F.value}`,stops:[[`0%`,M(s)(M(i)(H.value.bar.color,.5),80),1],[`100%`,M(s)(M(c)(H.value.bar.color,.1),80),1]]},null,8,[`id`,`stops`]),w(_,{t:`radial`,id:`gradient_left${F.value}`,stops:[[`0%`,M(s)(H.value.backgroundColor,0),1],[`100%`,M(s)(H.value.bar.color,20),1]]},null,8,[`id`,`stops`]),w(_,{t:`radial`,id:`gradient_right${F.value}`,stops:[[`0%`,M(s)(H.value.backgroundColor,0),1],[`100%`,M(s)(H.value.bar.color,20),1]]},null,8,[`id`,`stops`]),w(_,{t:`linear`,id:`gradient_tube_body${F.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,H.value.bar.color,1],[`10%`,M(s)(M(c)(H.value.bar.color,.7),100),1],[`25%`,M(s)(M(c)(H.value.bar.color,.5),100),1],[`75%`,M(s)(H.value.bar.color,80),1],[`100%`,M(s)(M(i)(H.value.bar.color,.7),100),1]]},null,8,[`id`,`stops`])]),K.value?(D(),S(`defs`,qe,[(D(!0),S(v,null,k(J.value,e=>(D(),b(_,{t:`radial`,id:`grad_top_${e.id}`,key:`grad_top_${e.id}`,stops:[[`0%`,M(s)(M(i)(e.color,.5),80),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(D(!0),S(v,null,k(J.value,e=>(D(),b(_,{t:`linear`,id:`grad_left_${e.id}`,key:`grad_left_${e.id}`,stops:[[`0%`,M(s)(e.color,80),1],[`100%`,M(s)(M(c)(e.color,.5),100),1]]},null,8,[`id`,`stops`]))),128)),(D(!0),S(v,null,k(J.value,e=>(D(),b(_,{t:`linear`,id:`grad_right_${e.id}`,key:`grad_right_${e.id}`,stops:[[`2%`,M(s)(M(i)(e.color,.5),100),1],[`100%`,M(s)(e.color,80),1]]},null,8,[`id`,`stops`]))),128)),w(_,{t:`linear`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,id:`vertical_line_${F.value}`,stops:[[`0%`,`#FFFFFF`,1],[`100%`,`#FFFFFF33`,1]]},null,8,[`id`])])):x(``,!0),H.value.dataLabel.show&&![null,void 0].includes(M(W).percentage)&&[null,void 0].includes(M(W).series)?(D(),S(`text`,{key:2,x:q.value.width/2,y:q.value.top-H.value.dataLabel.fontSize/2,"font-size":H.value.dataLabel.fontSize,"font-weight":H.value.dataLabel.bold?`bold`:`normal`,fill:H.value.dataLabel.color,"text-anchor":`middle`},j(M(n)({v:Vn.value,s:`%`,r:H.value.dataLabel.rounding})),9,Je)):x(``,!0),L.value?(D(),S(`g`,{key:3,role:`button`,tabindex:`0`,"aria-label":`Clear selection`,onClick:t[0]||=e=>{L.value=!1,X.value=null},onKeydown:[t[1]||=Re(ze(e=>{L.value=!1,X.value=null},[`prevent`]),[`enter`]),t[2]||=Re(ze(e=>{L.value=!1,X.value=null},[`prevent`]),[`space`])],onFocus:t[3]||=e=>R.value=!0,onBlur:t[4]||=e=>R.value=!1,onMouseenter:t[5]||=e=>R.value=!0,onMouseleave:t[6]||=e=>R.value=!1,class:`svg-btn`,"data-dom-to-png-ignore":``,style:E({cursor:En.value?`pointer`:`default`,outline:`none`})},[t[10]||=C(`title`,null,`Clear selection`,-1),C(`rect`,{x:Kn.value-12,y:q.value.top-24,width:24,height:24,fill:`transparent`,"pointer-events":`all`},null,8,Ye),C(`circle`,{cx:Kn.value,cy:q.value.top-12,r:`10`,fill:`none`,stroke:H.value.color,"stroke-width":`2`,"vector-effect":`non-scaling-stroke`,opacity:R.value?.5:0},null,8,Xe),C(`path`,{d:`M${Kn.value-6},${q.value.top-18} ${Kn.value+6},${q.value.top-6}`,stroke:H.value.color,"stroke-linecap":`round`,"stroke-width":`2`,"vector-effect":`non-scaling-stroke`},null,8,Ze),C(`path`,{d:`M${Kn.value+6},${q.value.top-18} ${Kn.value-6},${q.value.top-6}`,stroke:H.value.color,"stroke-linecap":`round`,"stroke-width":`2`,"vector-effect":`non-scaling-stroke`},null,8,Qe)],36)):x(``,!0),!Tn.value.shape||Tn.value.shape===`bar`?(D(),S(`g`,$e,[K.value?x(``,!0):(D(),S(`g`,et,[C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.right,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,tt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.left,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,nt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.side,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,rt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.topSides,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,it)])),K.value?x(``,!0):(D(),S(`g`,at,[C(`path`,{d:Jn.value.right,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_right${F.value})`},null,8,ot),C(`path`,{d:Jn.value.left,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_left${F.value})`},null,8,st),C(`path`,{d:Jn.value.top,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_top${F.value})`},null,8,ct)])),K.value?(D(),S(`g`,lt,[(D(!0),S(v,null,k(J.value,(e,t)=>(D(),S(`g`,{style:E(`opacity:${X.value?X.value===e.id?1:.3:1}`),class:`vue-ui-3d-bar-stack`,role:`img`,"aria-label":gr(e)},[C(`path`,{d:e.fill.right,fill:`url(#grad_right_${e.id})`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,dt),C(`path`,{d:e.fill.left,fill:`url(#grad_left_${e.id})`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,ft),C(`path`,{d:e.fill.top,fill:`url(#grad_top_${e.id})`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,pt),C(`path`,{d:e.fill.liningTop,stroke:`#FFFFFF`,"stroke-width":`0.5`,"stroke-linecap":`round`,fill:`none`,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e)},null,40,mt),C(`path`,{d:`M ${e.fill.apexTop.x},${e.fill.apexTop.y} ${e.fill.apexBottom.x},${e.fill.apexBottom.y}`,stroke:`#FFFFFF`,"stroke-width":`0.5`,"stroke-linecap":`round`},null,8,ht)],12,ut))),256)),(D(!0),S(v,null,k(J.value,(e,t)=>(D(),S(`g`,null,[t===J.value.length-1?x(``,!0):(D(),S(`path`,{key:0,d:e.fill.liningTopShade,stroke:H.value.bar.shadeColor,"stroke-width":`0.5`,"stroke-linecap":`round`,fill:`none`,style:{"pointer-events":`none`}},null,8,gt))]))),256)),(D(!0),S(v,null,k(J.value,(t,r)=>(D(),S(`g`,{style:E(`opacity:${X.value?+(X.value===t.id):+(t.proportion*100>H.value.legend.hideUnderPercentage)}`),onClick:e=>hn(`selectDatapoint`,t)},[C(`path`,{stroke:H.value.color,"stroke-dasharray":`1`,"stroke-width":`0.5`,"stroke-linecap":`round`,d:`M${t.fill.sidePointer.x},${t.fill.sidePointer.y} ${t.fill.sidePointer.x2},${t.fill.sidePointer.y}`},null,8,vt),!t.fill.miniDonut||X.value?(D(),S(`circle`,{key:0,cx:t.fill.sidePointer.x2,cy:t.fill.sidePointer.y,r:2,fill:t.color,stroke:H.value.backgroundColor},null,8,yt)):x(``,!0),M(On)?(D(),S(`rect`,{key:1,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize/2,width:q.value.width/3,height:H.value.legend.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,bt)):x(``,!0),M(On)?x(``,!0):(D(),S(`foreignObject`,{key:2,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize,width:q.value.absoluteWidth/3,height:H.value.legend.fontSize*2,style:{overflow:`visible`,position:`relative`}},[H.value.legend.showDefault?(D(),S(`div`,{key:0,style:E(`height: 100%; width: 100%; display: flex; flex-direction: row; flex-wrap: wrap; align-items:center;justify-content: flex-start; font-size:${H.value.legend.fontSize}px; text-align:left; line-height: ${H.value.legend.fontSize}px; color:${H.value.legend.color}; font-weight:${H.value.legend.bold?`bold`:`normal`}`)},j(M(h)(H.value.dataLabel.formatter,t.value,`${t.name}: ${M(n)({v:t.proportion*100,s:`%`,r:H.value.legend.roundingPercentage})} (${M(n)({p:H.value.legend.prefix,v:t.value,s:H.value.legend.suffix,r:H.value.legend.roundingValue})})`,{datapoint:t,seriesIndex:r,type:`barDatapoint`})),5)):x(``,!0),A(e.$slots,`legend`,Ae({ref_for:!0},{datapoint:t,config:V.value,dataset:J.value}),void 0,!0)],8,xt)),t.fill.donut&&X.value===t.id?(D(),S(`g`,St,[(D(!0),S(v,null,k(t.fill.donut,(e,n)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`path`,{key:0,d:M(m)(e,{x:e.cx,y:e.cy},0,8,!1,!0,10),stroke:e.color,class:`vue-ui-donut-arc-path`,"stroke-width":`0.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Ct)):x(``,!0)]))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":1},null,8,wt))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,r)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`g`,Tt,[C(`text`,{"text-anchor":M(p)(e,!0,0).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12),fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(M(h)(H.value.dataLabel.formatter,e.value,`${Yn(e,t.fill.donut)} (${M(n)({p:V.value.style.chart.legend.prefix,v:e.value,s:V.value.style.chart.legend.suffix,r:V.value.style.chart.legend.roundingValue})})`,{datapoint:e,seriesIndex:r,type:`donutDatapoint`})),9,Et),C(`text`,{"text-anchor":M(p)(e).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12)+H.value.legend.fontSize/1.5,fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(e.name),9,Dt)])):x(``,!0)]))),256))])):x(``,!0),t.fill.miniDonut&&!X.value?(D(),S(`g`,Ot,[(D(!0),S(v,null,k(t.fill.miniDonut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":.5},null,8,kt))),256))])):x(``,!0)],12,_t))),256))])):x(``,!0)])):x(``,!0),Tn.value.shape===`tube`?(D(),S(`g`,At,[K.value?x(``,!0):(D(),S(`g`,jt,[C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeTop,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Mt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeLeft,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Nt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeRight,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Pt),C(`path`,{"stroke-dasharray":H.value.box.strokeDasharray,d:Y.value.tubeBottom,stroke:H.value.box.stroke,"stroke-width":H.value.box.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Ft),C(`path`,{d:Jn.value.tubeTop,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_top${F.value})`},null,8,It),C(`path`,{d:Jn.value.tubeBody,stroke:H.value.bar.stroke,"stroke-width":H.value.bar.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_body${F.value})`},null,8,Lt),C(`path`,{d:Jn.value.tubeTop,stroke:`#FFFFFF`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,8,Rt)])),K.value?(D(),S(`g`,zt,[(D(!0),S(v,null,k(J.value,(e,t)=>(D(),S(`g`,{style:E(`opacity:${X.value?X.value===e.id?1:.3:1}`),class:`vue-ui-3d-bar-stack`,role:`img`,"aria-label":gr(e)},[C(`defs`,null,[w(_,{t:`radial`,id:`gradient_tube_top_${e.id}`,fx:`10%`,cy:`55%`,stops:[[`0%`,M(s)(M(i)(e.color,.5),80),1],[`100%`,M(s)(M(c)(e.color,.1),80),1]]},null,8,[`id`,`stops`]),w(_,{t:`linear`,id:`gradient_tube_body_${e.id}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`10%`,M(s)(M(c)(e.color,.7),100),1],[`25%`,M(s)(M(c)(e.color,.5),100),1],[`75%`,M(s)(e.color,80),1],[`100%`,M(s)(M(i)(e.color,.7),100),1]]},null,8,[`id`,`stops`])]),C(`path`,{onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e),d:e.fill.tubeBody,stroke:`#FFFFFF`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_body_${e.id})`},null,40,Vt),t>0?(D(),S(`path`,{key:0,onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e),d:e.fill.bottomTubeTop,stroke:`#000000`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`},null,40,Ht)):x(``,!0),C(`path`,{onMouseenter:t=>Z(e),onClick:t=>Z(e,!0),onMouseout:t=>Q(e),d:e.fill.tubeTop,stroke:`#FFFFFF`,"stroke-width":.5,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`url(#gradient_tube_top_${e.id})`},null,40,Ut)],12,Bt))),256)),(D(!0),S(v,null,k(J.value,(t,r)=>(D(),S(`g`,{style:E(`opacity:${X.value?+(X.value===t.id):+(t.proportion*100>H.value.legend.hideUnderPercentage)}`),onClick:e=>hn(`selectDatapoint`,t)},[C(`path`,{stroke:H.value.color,"stroke-dasharray":`1`,"stroke-width":`0.5`,"stroke-linecap":`round`,d:`M${t.fill.sidePointer.x},${t.fill.sidePointer.y} ${t.fill.sidePointer.x2},${t.fill.sidePointer.y}`},null,8,Gt),!t.fill.miniDonut||X.value?(D(),S(`circle`,{key:0,cx:t.fill.sidePointer.x2,cy:t.fill.sidePointer.y,r:2,fill:t.color,stroke:H.value.backgroundColor},null,8,Kt)):x(``,!0),M(On)?(D(),S(`rect`,{key:1,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize/2,width:q.value.width/3,height:H.value.legend.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,qt)):x(``,!0),M(On)?x(``,!0):(D(),S(`foreignObject`,{key:2,x:t.fill.sidePointer.xText,y:t.fill.sidePointer.y-H.value.legend.fontSize,width:q.value.absoluteWidth/3,height:H.value.legend.fontSize*2,style:{overflow:`visible`,position:`relative`}},[H.value.legend.showDefault?(D(),S(`div`,{key:0,style:E(`height: 100%; width: 100%; display: flex; flex-direction: row; flex-wrap: wrap; align-items:center;justify-content: flex-start; font-size:${H.value.legend.fontSize}px; text-align:left; line-height: ${H.value.legend.fontSize}px; color:${H.value.legend.color};font-weight:${H.value.legend.bold?`bold`:`normal`}`)},j(M(h)(H.value.dataLabel.formatter,t.value,`${t.name}: ${M(n)({v:t.proportion*100,s:`%`,r:H.value.legend.roundingPercentage})} (${M(n)({p:H.value.legend.prefix,v:t.value,s:H.value.legend.suffix,r:H.value.legend.roundingValue})})`,{datapoint:t,seriesIndex:r,type:`barDatapoint`})),5)):x(``,!0),A(e.$slots,`legend`,Ae({ref_for:!0},{datapoint:t,config:V.value,dataset:J.value}),void 0,!0)],8,Jt)),t.fill.donut&&X.value===t.id?(D(),S(`g`,Yt,[(D(!0),S(v,null,k(t.fill.donut,(e,n)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`path`,{key:0,d:M(m)(e,{x:e.cx,y:e.cy},0,8,!1,!0,10),stroke:e.color,class:`vue-ui-donut-arc-path`,"stroke-width":`0.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Xt)):x(``,!0)]))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":1},null,8,Zt))),256)),(D(!0),S(v,null,k(t.fill.donut,(e,r)=>(D(),S(`g`,null,[Yn(e,t.fill.donut,!0)>6?(D(),S(`g`,Qt,[C(`text`,{"text-anchor":M(p)(e,!0,0).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12),fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(M(h)(H.value.dataLabel.formatter,e.value,`${Yn(e,t.fill.donut)} (${M(n)({p:V.value.style.chart.legend.prefix,v:e.value,s:V.value.style.chart.legend.suffix,r:V.value.style.chart.legend.roundingValue})})`,{datapoint:e,seriesIndex:r,type:`donutDatapoint`})),9,$t),C(`text`,{"text-anchor":M(p)(e).anchor,x:M(p)(e,!0,2).x,y:M(g)(e,12,12)+H.value.legend.fontSize/1.5,fill:H.value.legend.color,"font-size":H.value.legend.fontSize/1.5,"font-weight":H.value.legend.bold?`bold`:`normal`},j(e.name),9,en)])):x(``,!0)]))),256))])):x(``,!0),t.fill.miniDonut&&!X.value?(D(),S(`g`,tn,[(D(!0),S(v,null,k(t.fill.miniDonut,(e,t)=>(D(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`${e.color}`,stroke:H.value.backgroundColor,"stroke-width":.5},null,8,nn))),256))])):x(``,!0)],12,Wt))),256))])):x(``,!0)])):x(``,!0),A(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:M(Pn)||M(Fn)||M(ur),isPrintingSvg:M(dr)}},void 0,!0)],46,Ge))]),e.$slots.watermark?(D(),S(`div`,rn,[A(e.$slots,`watermark`,Ne(ke({isPrinting:M(Pn)||M(Fn)||M(dr)||M(ur)})),void 0,!0)])):x(``,!0),e.$slots.source?(D(),S(`div`,{key:5,ref_key:`source`,ref:Sn,dir:`auto`},[A(e.$slots,`source`,{},void 0,!0)],512)):x(``,!0),gn.value&&K.value&&U.value.buttons.table?(D(),b(Fe(or.value.component),Ae({key:6},or.value.props,{ref_key:`tableUnit`,ref:Cn,onClose:sr}),De({content:N(()=>[(D(),b(M(ln),{key:`table_${vn.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:V.value.table.useDialog?``:or.value.title,withCloseButton:!V.value.table.useDialog,isCursorPointer:En.value,onClose:sr},{th:N(({th:e})=>[e===`__SUM__`?(D(),S(`div`,an,[w(M(sn),{name:`sigma`,stroke:$.value.config.th.color,size:16},null,8,[`stroke`])])):(D(),S(`div`,on,j(e),1))]),td:N(({td:e})=>[Oe(j(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[V.value.table.useDialog?{name:`title`,fn:N(()=>[Oe(j(or.value.title),1)]),key:`0`}:void 0,V.value.table.useDialog?{name:`actions`,fn:N(()=>[C(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[7]||=e=>tr(U.value.callbacks.csv)},[w(M(sn),{name:`fileCsv`,stroke:or.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):x(``,!0),A(e.$slots,`skeleton`,{},()=>[M(On)?(D(),b(se,{key:0})):x(``,!0)],!0)],44,Ve))}},[[`__scopeId`,`data-v-a94462fe`]]);export{Be as n,sn as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{X as n}from"./lib-rPeBMZrn.js";import{t as r}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as i}from"./useNestedProp-DnGoh-XS.js";import{t as a}from"./BaseIcon-Cm-IJ179.js";import{computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,guardReactiveProps as d,normalizeClass as f,normalizeProps as p,normalizeStyle as m,onMounted as h,openBlock as g,ref as _,renderSlot as v,useCssVars as y,watch as b}from"vue";var x=/* @__PURE__ */ e({default:()=>T}),S={class:`vue-data-ui-component`},C=[`id`],w={key:0,class:`vue-ui-accordion-arrow`},T=/*#__PURE__*/ r({__name:`vue-ui-accordion`,props:{config:{type:Object,default(){return{}}},hideDetails:{type:Boolean,default:!1}},emits:[`toggle`],setup(e,{emit:r}){y(e=>({fc620ee6:P.value}));let{vue_ui_accordion:x}=t(),T=e,E=r,D=o(()=>i({userConfig:T.config,defaultConfig:x})),O=o(()=>D.value.useCursorPointer),k=_(D.value.open),A=_(n()),j=_(null),M=_(0);h(()=>{j.value.open=D.value.open}),b(()=>D.value.open,e=>{j.value.open=e});function N(){(M.value>0||!D.value.open)&&(k.value=!k.value),M.value+=1,E(`toggle`)}let P=o(()=>`${D.value.maxHeight}px`);return(t,n)=>(g(),l(`div`,S,[u(`details`,{id:`details_${A.value}`,ref_key:`details`,ref:j,onToggle:N},[u(`summary`,{class:f({"vue-ui-accordion-headless":e.hideDetails}),style:m({cursor:O.value?`pointer`:`default`})},[u(`div`,{class:`vue-ui-accordion-head`,style:m(`background:${D.value.head.backgroundColor};padding:${D.value.head.padding}; ${e.hideDetails?`height: 0px !important; padding: 0 !important;`:``}`)},[e.hideDetails?c(``,!0):(g(),l(`div`,w,[D.value.head.useArrowSlot?v(t.$slots,`arrow`,p(d({backgroundColor:D.value.head.backgroundColor,color:D.value.head.color,iconColor:D.value.head.iconColor,isOpen:k.value})),void 0,!0,0):(g(),s(a,{key:1,name:D.value.head.icon,stroke:D.value.head.iconColor,size:D.value.head.iconSize},null,8,[`name`,`stroke`,`size`]))])),v(t.$slots,`title`,p(d({color:D.value.head.color,isOpen:k.value})),void 0,!0)],4)],6)],40,C),u(`div`,{class:`vue-ui-accordion-content`,style:m(`background:${D.value.body.backgroundColor};color:${D.value.body.color}`)},[v(t.$slots,`content`,p(d({backgroundColor:D.value.body.backgroundColor,color:D.value.body.color,isOpen:k.value})),void 0,!0)],4)]))}},[[`__scopeId`,`data-v-2782a9e6`]]);export{x as n,T as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{X as n}from"./lib-rPeBMZrn.js";import{t as r}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as i}from"./useNestedProp-DnGoh-XS.js";import{t as a}from"./BaseIcon-fYK0iID8.js";import{computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,guardReactiveProps as d,normalizeClass as f,normalizeProps as p,normalizeStyle as m,onMounted as h,openBlock as g,ref as _,renderSlot as v,useCssVars as y,watch as b}from"vue";var x=/* @__PURE__ */ e({default:()=>T}),S={class:`vue-data-ui-component`},C=[`id`],w={key:0,class:`vue-ui-accordion-arrow`},T=/*#__PURE__*/ r({__name:`vue-ui-accordion`,props:{config:{type:Object,default(){return{}}},hideDetails:{type:Boolean,default:!1}},emits:[`toggle`],setup(e,{emit:r}){y(e=>({fc620ee6:P.value}));let{vue_ui_accordion:x}=t(),T=e,E=r,D=o(()=>i({userConfig:T.config,defaultConfig:x})),O=o(()=>D.value.useCursorPointer),k=_(D.value.open),A=_(n()),j=_(null),M=_(0);h(()=>{j.value.open=D.value.open}),b(()=>D.value.open,e=>{j.value.open=e});function N(){(M.value>0||!D.value.open)&&(k.value=!k.value),M.value+=1,E(`toggle`)}let P=o(()=>`${D.value.maxHeight}px`);return(t,n)=>(g(),l(`div`,S,[u(`details`,{id:`details_${A.value}`,ref_key:`details`,ref:j,onToggle:N},[u(`summary`,{class:f({"vue-ui-accordion-headless":e.hideDetails}),style:m({cursor:O.value?`pointer`:`default`})},[u(`div`,{class:`vue-ui-accordion-head`,style:m(`background:${D.value.head.backgroundColor};padding:${D.value.head.padding}; ${e.hideDetails?`height: 0px !important; padding: 0 !important;`:``}`)},[e.hideDetails?c(``,!0):(g(),l(`div`,w,[D.value.head.useArrowSlot?v(t.$slots,`arrow`,p(d({backgroundColor:D.value.head.backgroundColor,color:D.value.head.color,iconColor:D.value.head.iconColor,isOpen:k.value})),void 0,!0,0):(g(),s(a,{key:1,name:D.value.head.icon,stroke:D.value.head.iconColor,size:D.value.head.iconSize},null,8,[`name`,`stroke`,`size`]))])),v(t.$slots,`title`,p(d({color:D.value.head.color,isOpen:k.value})),void 0,!0)],4)],6)],40,C),u(`div`,{class:`vue-ui-accordion-content`,style:m(`background:${D.value.body.backgroundColor};color:${D.value.body.color}`)},[v(t.$slots,`content`,p(d({backgroundColor:D.value.body.backgroundColor,color:D.value.body.color,isOpen:k.value})),void 0,!0)],4)]))}},[[`__scopeId`,`data-v-2782a9e6`]]);export{x as n,T as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Dt as i,Jt as a,X as o,Yt as ee,at as te,b as s,et as ne,i as c,in as re,nt as ie,pt as ae,t as oe,tn as se,zt as ce}from"./lib-rPeBMZrn.js";import{n as le,t as ue}from"./BaseScanner-8NdoBs7B.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./img-D4RQwASc.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,t as xe}from"./annotationSlots-BRR85CqJ.js";import{n as Se,t as Ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{t as Te}from"./useSvgLabelLayout-42Kats14.js";import{t as Ee}from"./useTimeLabelCollider-BTybMUFi.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as Oe}from"./DefGrad-DKMq1REY.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Me}from"./vue_ui_age_pyramid-CL0Ef8Ov.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ne,createTextVNode as Pe,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Fe,nextTick as Ie,normalizeClass as Le,normalizeProps as v,normalizeStyle as Re,onBeforeUnmount as ze,onMounted as Be,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as C,toRefs as Ue,unref as w,watch as T,withCtx as E}from"vue";var We=/* @__PURE__ */ e({default:()=>yt}),Ge=[`id`],Ke=[`id`],qe={style:{position:`relative`}},Je=[`xmlns`,`viewBox`,`aria-describedby`],Ye=[`x`,`y`,`width`,`height`],Xe=[`x`,`y`,`width`,`height`,`fill`,`rx`],Ze=[`x`,`y`,`width`,`height`,`fill`,`rx`],Qe=[`x`,`y`,`width`,`height`,`fill`,`rx`],$e=[`x`,`y`,`width`,`height`,`fill`,`rx`],et=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],tt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],nt={key:0},rt=[`x`,`y`,`fill`,`font-size`,`font-weight`],it=[`x`,`y`,`fill`,`font-size`,`font-weight`],at={key:1},ot=[`x`,`y`,`font-size`,`fill`,`font-weight`],st={key:2},ct={key:0},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],mt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],ht=[`x`,`y`,`font-size`,`fill`,`font-weight`],gt=[`x`,`y`,`width`,`height`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],_t={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vt={key:5,class:`vue-data-ui-watermark`},yt=/*#__PURE__*/ pe({__name:`vue-ui-age-pyramid`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:We}){let yt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),bt=g(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),xt=g(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),St=g(()=>import(`./DataTable-0Vv-aGHD.js`)),Ct=g(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),wt=g(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Tt=g(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),Et=g(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_age_pyramid:Dt}=t(),D=e,Ot=We,kt=u(()=>!!D.dataset&&D.dataset.length),O=b(o()),k=b(!1),At=b(``),A=b(null),jt=b(0),j=b(null),Mt=b(null),Nt=b(null),Pt=b(null),Ft=b(0),It=b(0),Lt=b(null),Rt=b(null),zt=b(null),M=b(null),Bt=b({x:0,y:0}),N=b(`pointer`),Vt=b(!1),P=b(Yt()),F=u(()=>P.value.style),I=u(()=>P.value.style.layout.dataLabels),L=u(()=>P.value.style.layout.bars),R=u(()=>P.value.style.layout.bars.labels);de({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiAgePyramid`,rules:[fe.emptyArray,{test:e=>e.length>130,message:[`👀 Dataset has > 130 points. Consider:`,``,`▶️ Grouping small values into aggregated categories.`,``,`▶️ Using VueUiStackline to display data in a more compact way.`]}]});let z=u(()=>P.value.userOptions.useCursorPointer),Ht=u(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},translations:{male:``,female:``},style:{backgroundColor:`#99999930`,layout:{bars:{left:{color:`#CACACA`},right:{color:`#999999`}},dataLabels:{xAxis:{fontSize:0,scale:1e3,translation:``},yAxis:{show:!1}},grid:{stroke:`#6A6A6A`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:Ut,FINAL_DATASET:Wt,manualLoading:Gt}=le({...Ue(D),FINAL_CONFIG:P,prepareConfig:Yt,skeletonDataset:D.config?.skeletonDataset??[[`_`,9,2,2],[`_`,8,3,3],[`_`,7,5,5],[`_`,6,8,8],[`_`,5,13,13],[`_`,4,21,21],[`_`,3,34,34],[`_`,2,55,55],[`_`,1,89,89],[`_`,0,144,144]],skeletonConfig:re({defaultConfig:P.value,userConfig:Ht.value})}),{userOptionsVisible:Kt,setUserOptionsVisibility:qt,keepUserOptionState:Jt}=Ae({config:P.value}),{svgRef:B}=je({config:P.value.style.title});function Yt(){return me(D.config,Dt,Me)}function Xt(e){let t=ne(e);return t?.style?.chart&&delete t.style.tooltip,JSON.stringify(t)}let Zt=Xt(D.config);T(()=>D.config,(e,t)=>{let n=Xt(e),r=n!==Zt;Zt=n;let i=Yt();r?(Ut.value||(P.value=i),Kt.value=!P.value.userOptions.showOnChartHover,tn(),Ft.value+=1,It.value+=1,U.value.showTable=P.value.table.show,U.value.showTooltip=P.value.style.tooltip.show):(P.value.style.tooltip=i.style.tooltip,U.value.showTooltip=P.value.style.tooltip.show)},{deep:!0}),T(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(Gt.value=!1)},{deep:!0});let V=He(null),H=He(null),Qt=b(!1),$t=0;Be(()=>{tn()});let en=u(()=>P.value.debug);function tn(){ce(D.dataset)&&(te({componentName:`VueUiAgePyramid`,type:`dataset`,debug:en.value}),Gt.value=!0),ce(D.dataset)||(Gt.value=P.value.loading),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:j.value,title:F.value.title.text?Mt.value:null,source:Nt.value,noTitle:Pt.value});cancelAnimationFrame($t),$t=requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,Qt.value=!0})}),H.value=j.value.parentNode,V.value.observe(H.value))}ze(()=>{cancelAnimationFrame($t),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:nn,isImaging:rn,generatePdf:an,generateImage:on}=we({elementId:`vue-ui-age-pyramid_${O.value}`,fileName:F.value.title.text||`vue-ui-age-pyramid`,options:P.value.userOptions.print}),sn=u(()=>P.value.userOptions.show&&!F.value.title.text),U=b({showTable:P.value.table.show,showTooltip:F.value.tooltip.show});T(P,()=>{U.value={showTable:P.value.table.show,showTooltip:F.value.tooltip.show}},{immediate:!0});let W=b({height:F.value.height,width:F.value.width}),cn=u(()=>W.value.width),ln=u(()=>W.value.height),{metrics:un,ready:dn,settling:fn,update:pn}=Te({svgRef:B,canMeasure:()=>!P.value.responsive||Qt.value,initialMetrics:{bottom:0},measure:e=>({bottom:e(Lt.value).height})}),mn=u(()=>un.value.bottom),G=u(()=>{let e=W.value.width-F.value.layout.padding.right-F.value.layout.padding.left,t=F.value.layout.padding.left,n=W.value.width-F.value.layout.padding.right;return{top:F.value.layout.padding.top+I.value.sideTitles.fontSize+I.value.sideTitles.offsetY+12,left:t,right:n,bottom:W.value.height-F.value.layout.padding.bottom-mn.value,width:e,height:W.value.height-F.value.layout.padding.top-F.value.layout.padding.bottom-mn.value-I.value.sideTitles.fontSize-I.value.sideTitles.offsetY-12,centerX:F.value.layout.padding.left+e/2,leftChart:{width:e/2-F.value.layout.centerSlit.width,right:t+e/2-F.value.layout.centerSlit.width},rightChart:{width:e/2-F.value.layout.centerSlit.width,left:t+e/2+F.value.layout.centerSlit.width}}}),hn=u(()=>Wt.value.map(e=>I.value.yAxis.display===`age`?e[1]:e[0])),K=u(()=>{let e=gn(q.value/5),t=[],n=[];for(let r=0;r<=5;r+=1){let i=e*r,a=e*(r-5);t.push({value:i,x:G.value.left+G.value.width/2+F.value.layout.centerSlit.width+i/q.value*G.value.leftChart.width}),n.push({value:Math.abs(a),x:G.value.left+G.value.width/2+a/q.value*G.value.leftChart.width-F.value.layout.centerSlit.width})}return{right:t,left:n}});function gn(e){if(e===0)return 0;let t=10**Math.floor(Math.log10(Math.abs(e))),n;return n=Math.round(e/t)*t,n}let q=u(()=>Math.max(...Wt.value.flatMap(e=>e.slice(-2).map(e=>s(e))))),J=u(()=>Wt.value.length),_n=u(()=>Wt.value.map(e=>({segment:e[0],age:e[1],left:{value:e[2],proportionToMax:e[2]/q.value},right:{value:e[3],proportionToMax:e[3]/q.value}}))),Y=u(()=>_n.value.map((e,t)=>{let n=G.value.top+G.value.height/J.value*t,r=G.value.height/J.value-L.value.gap;return{segment:e.segment,age:e.age,left:{...e.left,y:n,color:L.value.left.color,x:G.value.leftChart.right-e.left.proportionToMax*G.value.leftChart.width,width:s(e.left.proportionToMax*G.value.leftChart.width),height:r},right:{...e.right,y:n,color:L.value.right.color,x:G.value.rightChart.left,width:s(e.right.proportionToMax*G.value.rightChart.width),height:r}}})),vn=b(null);function yn(e){let[t,n,r,i]=e;return{segment:t,index:n,left:r,right:i}}function bn(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:yn(t),seriesIndex:e})}function xn(e,t){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:yn(t),seriesIndex:e}),(N.value!==`keyboard`||M.value!==e)&&(A.value=null,k.value=!1)}function Sn(e){if(!B.value)return;let t=Y.value[e];if(!t)return;let n=se(G.value.left+G.value.width/2,t.left.y+t.left.height/2,B.value);n&&(Bt.value=n)}function Cn(e,t,r=`pointer`){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:yn(t),seriesIndex:e}),A.value=e,M.value=e,N.value=r,vn.value={datapoint:t,seriesIndex:e,series:Y.value,config:P.value};let a=F.value.tooltip.customFormat;if(i(a)&&ae(()=>a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value})))At.value=a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value});else{let r=``,i=Y.value[e];r+=`<div><b>${i.segment}</b></div>`,r+=`<div>${P.value.translations.age}: ${c(I.value.yAxis.formatter,s(i.age),n({v:s(i.age)}),{datapoint:t,seriesIndex:e})}</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}">`,r+=`<div style="display:flex; flex-direction:row;gap:12px">`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:L.value.left.color}"/></svg><div>${P.value.translations.female}</div><div><b>${c(I.value.xAxis.formatter,s(i.left.value),n({v:s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:L.value.right.color}"/></svg><div>${P.value.translations.male}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value),n({v:s(i.right.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}"><div>${P.value.translations.total}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value)+s(i.left.value),n({v:s(i.right.value)+s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,At.value=`<div>${r}</div>`}k.value=!0,r===`keyboard`&&Ie(()=>{Sn(e)})}function wn(e=null){Ie(()=>{let t=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total],n=D.dataset.map(e=>[e[0],e[1],e[2],e[3],e[2]??0+e[3]??0]),i=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),a=r(i);e?e(a):ie({csvContent:a,title:F.value.title.text||`vue-ui-heatmap`})})}let X=u(()=>{let e=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total];return{head:e,body:D.dataset.map(e=>[e[0],e[1],e[2]==null?``:e[2].toLocaleString(),e[3]==null?``:e[3].toLocaleString(),(e[2]??0+e[3]??0).toLocaleString()]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Z=b(!1);function Tn(e){Z.value=e,jt.value+=1}function En(){U.value.showTable=!U.value.showTable}function Dn(){U.value.showTooltip=!U.value.showTooltip}let Q=b(!1);function On(){Q.value=!Q.value}async function kn({scale:e=2}={}){if(!j.value)return;let{width:t,height:n}=j.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await he({domElement:j.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:F.value.title.text,width:t,height:n,aspectRatio:r}}let An=b([]),jn=b({start:0,end:Y.value.length});Ee({timeLabelsEls:Lt,timeLabels:An,slicer:jn,configRef:P,rotationPath:[`style`,`layout`,`dataLabels`,`xAxis`,`rotation`],autoRotatePath:[`style`,`layout`,`dataLabels`,`xAxis`,`autoRotate`,`enable`],isAutoSize:!1,width:cn,height:ln,targetClass:`.vue-ui-age-pyramid-x-axis-label`,rotation:F.value.layout.dataLabels.xAxis.autoRotate.angle});let $=u(()=>ye({config:P,style:F,mutableConfig:U,dialog:Et,accordion:xt,isFullscreen:Z,parent:j,maxWidth:800,isCursorPointer:z}));T(()=>U.value.showTable,e=>ve(e,P,Rt));function Mn(){U.value.showTable=!1,zt.value&&zt.value.setTableIconState(!1)}let Nn=u(()=>P.value.style.backgroundColor),Pn=u(()=>P.value.style.title),{isCallbackImaging:Fn,isCallbackSvg:In,generateSvg:Ln,onGenerateImage:Rn}=_e({svg:B,title:Pn,legend:null,legendItems:null,backgroundColor:Nn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:on});async function zn(){Ot(`copyAlt`,{config:P.value,dataset:Y.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Bn(){Vt.value=!0}function Vn(){A.value=null,M.value=null,N.value=`pointer`,k.value=!1,Vt.value=!1}function Hn(e){if(!B.value||Q.value||document.activeElement!==B.value||!Y.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){A.value=null,M.value=null,N.value=`pointer`,k.value=!1;return}if(r){if(M.value===null)return;let e=D.dataset[M.value];if(!e)return;bn(M.value,e);return}let a=M.value,o=A.value,ee=a!==null&&a>=0&&a<Y.value.length,te=o!==null&&o>=0&&o<Y.value.length;ee?t?a=a-1<0?Y.value.length-1:a-1:n&&(a=a+1>Y.value.length-1?0:a+1):te?(a=n?o+1:o-1,a>=Y.value.length&&(a=0),a<0&&(a=Y.value.length-1)):a=n?0:Y.value.length-1;let s=D.dataset[a];s&&Cn(a,s,`keyboard`)}return pe({getImage:kn,generatePdf:an,generateCsv:wn,generateImage:on,generateSvg:Ln,toggleTable:En,toggleTooltip:Dn,toggleAnnotator:On,toggleFullscreen:Tn,copyAlt:zn}),T(()=>[W.value,I.value,Lt.value,D.dataset,Qt.value,P.value.style.fontFamily],pn,{flush:`post`,deep:!0}),(t,r)=>(y(),p(`div`,{class:Le(`vue-data-ui-component vue-ui-age-pyramid ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`agePyramid`,ref:j,id:`vue-ui-age-pyramid_${O.value}`,style:Re(`font-family:${F.value.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),onMouseenter:r[1]||=()=>w(qt)(!0),onMouseleave:r[2]||=()=>w(qt)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,C(P.value.a11y.translations.keyboardNavigation),1)],8,Ke),X.value?.body?.length?(y(),d(ke,{key:0,uid:O.value,head:X.value.head,body:X.value.body,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(y(),d(w(Ct),{key:1,svgRef:w(B),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Q.value,isCursorPointer:z.value,palette:P.value.userOptions.annotatorPalette,onClose:On},Ne({_:2},[x(w(xe),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(be)(e,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),sn.value?(y(),p(`div`,{key:2,ref_key:`noTitle`,ref:Pt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),F.value.title.text?(y(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Mt,style:`width:100%;background:transparent`},[(y(),d(ge,{key:`title_${Ft.value}`,config:{title:{cy:`pyramid-div-title`,...F.value.title},subtitle:{cy:`pyramid-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),P.value.userOptions.show&&kt.value&&(w(Jt)||w(Kt))?(y(),d(w(wt),{ref_key:`userOptionsRef`,ref:zt,key:`user_options_${jt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(rn),isPrinting:w(nn),uid:O.value,hasTooltip:P.value.userOptions.buttons.tooltip&&F.value.tooltip.show,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Z.value,isTooltip:U.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},chartElement:j.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Q.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:z.value,onToggleFullscreen:Tn,onGeneratePdf:w(an),onGenerateCsv:wn,onGenerateImage:w(Rn),onGenerateSvg:w(Ln),onToggleTable:En,onToggleTooltip:Dn,onToggleAnnotator:On,onCopyAlt:zn,style:Re({visibility:w(Jt)?w(Kt)?`visible`:`hidden`:`visible`})},Ne({_:2},[x(w(Se)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(Ce)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,qe,[(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(oe),class:Le({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:Re(`max-width:100%;overflow:visible;background:transparent;color:${F.value.color};visibility:${w(dn)?`visible`:`hidden`}`),tabindex:`0`,"aria-describedby":`chart-instructions-${O.value}`,onFocus:Bn,onBlur:Vn,onKeydown:Hn},[h(w(Tt)),S(t.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0),t.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:G.value.left,y:G.value.top,width:Math.max(.1,G.value.width),height:Math.max(.1,G.value.height),style:{pointerEvents:`none`}},[S(t.$slots,`chart-background`,{},void 0,!0)],8,Ye)):f(``,!0),m(`defs`,null,[h(Oe,{t:`linear`,id:`age_pyramid_left_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,L.value.left.color,1],[`100%`,w(a)(w(ee)(L.value.left.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1]]},null,8,[`id`,`stops`]),h(Oe,{t:`linear`,id:`age_pyramid_right_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,w(a)(w(ee)(L.value.right.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1],[`100%`,L.value.right.color,1]]},null,8,[`id`,`stops`])]),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:e.left.x,y:e.left.y,width:w(s)(e.left.width<=0?1e-4:e.left.width),height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Xe),m(`rect`,{x:e.left.x,y:e.left.y,width:e.left.width<=0?1e-4:e.left.width,height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:e.left.color,rx:L.value.borderRadius},null,8,Ze),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Qe),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:e.right.color,rx:L.value.borderRadius},null,8,$e)]))),256)),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[R.value.show?(y(),p(l,{key:0},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.left.x+Math.max(1e-4,e.left.width)-R.value.offsetX-6,y:e.left.y+Math.max(1e-4,e.left.height/2)+L.value.gap/2,"text-anchor":`end`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.left.value,w(n)({v:e.left.value}),{datapoint:e.left,seriesIndex:t})),9,et)):f(``,!0)],64)):f(``,!0),R.value.show?(y(),p(l,{key:1},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.right.x+R.value.offsetX+6,y:e.right.y+Math.max(1e-4,e.right.height/2)+L.value.gap/2,"text-anchor":`start`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.right.value,w(n)({v:e.right.value}),{datapoint:e.right,seriesIndex:t})),9,tt)):f(``,!0)],64)):f(``,!0)]))),256)),m(`g`,null,[I.value.sideTitles.show?(y(),p(`g`,nt,[m(`text`,{x:G.value.left,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.left.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`start`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.female),9,rt),m(`text`,{x:G.value.right,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.right.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`end`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.male),9,it)])):f(``,!0),I.value.yAxis.show?(y(),p(`g`,at,[(y(!0),p(l,null,x(hn.value,(e,t)=>(y(),p(l,null,[t%I.value.yAxis.showEvery===0&&(!R.value.show||R.value.showOnHover&&A.value===t||A.value===null)||(R.value.show||R.value.showOnHover)&&A.value===t?(y(),p(`text`,{key:0,x:G.value.centerX,y:G.value.top+G.value.height/J.value/2+G.value.height/J.value*t,"dominant-baseline":`middle`,"text-anchor":`middle`,"font-size":I.value.yAxis.fontSize,fill:I.value.yAxis.color,"font-weight":I.value.yAxis.bold?`bold`:`normal`},C(w(c)(I.value.yAxis.formatter,e,w(n)({v:e}),{datapoint:e,seriesIndex:t})),9,ot)):f(``,!0)],64))),256))])):f(``,!0),I.value.xAxis.show?(y(),p(`g`,st,[F.value.layout.grid.show?(y(),p(`g`,ct,[m(`line`,{x1:K.value.right[0].x,x2:K.value.right.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,lt),m(`line`,{x1:K.value.left[0].x,x2:K.value.left.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ut)])):f(``,!0),(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,dt)):f(``,!0)]))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ft)):f(``,!0)]))),256)),m(`g`,{ref_key:`xAxisLabels`,ref:Lt},[(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,pt))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,mt))),256))],512),m(`text`,{x:G.value.right,y:W.value.height,"text-anchor":`end`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"font-weight":I.value.xAxis.bold?`bold`:`normal`},C(I.value.xAxis.translation),9,ht)])):f(``,!0)]),(y(!0),p(l,null,x(e.dataset,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:G.value.left,y:G.value.top+G.value.height/J.value*t-L.value.gap/2,width:G.value.width<=0?1e-4:G.value.width,height:G.value.height/J.value<=0?1e-4:G.value.height/J.value,fill:A.value!==null&&A.value===t?w(a)(F.value.highlighter.color,F.value.highlighter.opacity):`transparent`,onMouseover:n=>Cn(t,e,`pointer`),onMouseleave:n=>xn(t,e),onClick:n=>bn(t,e)},null,40,gt)]))),256)),S(t.$slots,`svg`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0)],46,Je)),t.$slots.hint?(y(),p(`div`,_t,[S(t.$slots,`hint`,v(_({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Vt.value})),void 0,!0)])):f(``,!0)]),t.$slots.watermark?(y(),p(`div`,vt,[S(t.$slots,`watermark`,v(_({isPrinting:w(nn)||w(rn)||w(Fn)||w(In)})),void 0,!0)])):f(``,!0),S(t.$slots,`legend`,{legend:Y.value},void 0,!0),t.$slots.source?(y(),p(`div`,{key:6,ref_key:`source`,ref:Nt,dir:`auto`},[S(t.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(w(yt),{teleportTo:F.value.tooltip.teleportTo,show:U.value.showTooltip&&k.value,backgroundColor:F.value.tooltip.backgroundColor,color:F.value.tooltip.color,borderRadius:F.value.tooltip.borderRadius,borderColor:F.value.tooltip.borderColor,borderWidth:F.value.tooltip.borderWidth,fontSize:F.value.tooltip.fontSize,backgroundOpacity:F.value.tooltip.backgroundOpacity,position:F.value.tooltip.position,offsetX:F.value.tooltip.offsetX,offsetY:F.value.tooltip.offsetY,parent:j.value,content:At.value,isFullscreen:Z.value,isCustom:F.value.tooltip.customFormat&&typeof F.value.tooltip.customFormat==`function`,smooth:F.value.tooltip.smooth,backdropFilter:F.value.tooltip.backdropFilter,smoothForce:F.value.tooltip.smoothForce,smoothSnapThreshold:F.value.tooltip.smoothSnapThreshold,isA11yMode:N.value===`keyboard`,a11yPosition:Bt.value},{"tooltip-before":E(()=>[S(t.$slots,`tooltip-before`,v(_({...vn.value})),void 0,!0)]),tooltip:E(()=>[S(t.$slots,`tooltip`,v(_({...vn.value})),void 0,!0)]),"tooltip-after":E(()=>[S(t.$slots,`tooltip-after`,v(_({...vn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),kt.value&&P.value.userOptions.buttons.table?(y(),d(Ve($.value.component),Fe({key:7},$.value.props,{ref_key:`tableUnit`,ref:Rt,onClose:Mn}),Ne({content:E(()=>[(y(),d(w(St),{key:`table_${It.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:P.value.table.useDialog?``:$.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:z.value,onClose:Mn},{th:E(({th:e})=>[Pe(C(e),1)]),td:E(({td:e})=>[Pe(C(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:E(()=>[Pe(C($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:E(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:r[0]||=e=>wn(P.value.userOptions.callbacks.csv),style:Re({cursor:z.value?`pointer`:`default`})},[h(w(bt),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),S(t.$slots,`skeleton`,{},()=>[w(Ut)?(y(),d(ue,{key:0})):f(``,!0)],!0)],46,Ge))}},[[`__scopeId`,`data-v-e4eda545`]]);export{We as n,yt as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,D as r,Dt as i,Jt as a,X as o,Yt as ee,at as te,b as s,et as ne,i as c,in as re,nt as ie,pt as ae,t as oe,tn as se,zt as ce}from"./lib-rPeBMZrn.js";import{n as le,t as ue}from"./BaseScanner-8NdoBs7B.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./img-D4RQwASc.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,t as xe}from"./annotationSlots-RvQBEO9-.js";import{n as Se,t as Ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{t as Te}from"./useSvgLabelLayout-42Kats14.js";import{t as Ee}from"./useTimeLabelCollider-BTybMUFi.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as Oe}from"./DefGrad-DKMq1REY.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Me}from"./vue_ui_age_pyramid-CL0Ef8Ov.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ne,createTextVNode as Pe,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Fe,nextTick as Ie,normalizeClass as Le,normalizeProps as v,normalizeStyle as Re,onBeforeUnmount as ze,onMounted as Be,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as C,toRefs as Ue,unref as w,watch as T,withCtx as E}from"vue";var We=/* @__PURE__ */ e({default:()=>yt}),Ge=[`id`],Ke=[`id`],qe={style:{position:`relative`}},Je=[`xmlns`,`viewBox`,`aria-describedby`],Ye=[`x`,`y`,`width`,`height`],Xe=[`x`,`y`,`width`,`height`,`fill`,`rx`],Ze=[`x`,`y`,`width`,`height`,`fill`,`rx`],Qe=[`x`,`y`,`width`,`height`,`fill`,`rx`],$e=[`x`,`y`,`width`,`height`,`fill`,`rx`],et=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],tt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`stroke`],nt={key:0},rt=[`x`,`y`,`fill`,`font-size`,`font-weight`],it=[`x`,`y`,`fill`,`font-size`,`font-weight`],at={key:1},ot=[`x`,`y`,`font-size`,`fill`,`font-weight`],st={key:2},ct={key:0},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],mt=[`font-size`,`fill`,`text-anchor`,`font-weight`,`transform`],ht=[`x`,`y`,`font-size`,`fill`,`font-weight`],gt=[`x`,`y`,`width`,`height`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],_t={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vt={key:5,class:`vue-data-ui-watermark`},yt=/*#__PURE__*/ pe({__name:`vue-ui-age-pyramid`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:We}){let yt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),bt=g(()=>import(`./BaseIcon-fYK0iID8.js`).then(e=>e.n)),xt=g(()=>import(`./vue-ui-accordion-D4FHxzsL.js`).then(e=>e.n)),St=g(()=>import(`./DataTable-5Ug6gMAX.js`)),Ct=g(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),wt=g(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),Tt=g(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),Et=g(()=>import(`./BaseDraggableDialog-9d30Yx8c.js`).then(e=>e.n)),{vue_ui_age_pyramid:Dt}=t(),D=e,Ot=We,kt=u(()=>!!D.dataset&&D.dataset.length),O=b(o()),k=b(!1),At=b(``),A=b(null),jt=b(0),j=b(null),Mt=b(null),Nt=b(null),Pt=b(null),Ft=b(0),It=b(0),Lt=b(null),Rt=b(null),zt=b(null),M=b(null),Bt=b({x:0,y:0}),N=b(`pointer`),Vt=b(!1),P=b(Yt()),F=u(()=>P.value.style),I=u(()=>P.value.style.layout.dataLabels),L=u(()=>P.value.style.layout.bars),R=u(()=>P.value.style.layout.bars.labels);de({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiAgePyramid`,rules:[fe.emptyArray,{test:e=>e.length>130,message:[`👀 Dataset has > 130 points. Consider:`,``,`▶️ Grouping small values into aggregated categories.`,``,`▶️ Using VueUiStackline to display data in a more compact way.`]}]});let z=u(()=>P.value.userOptions.useCursorPointer),Ht=u(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},translations:{male:``,female:``},style:{backgroundColor:`#99999930`,layout:{bars:{left:{color:`#CACACA`},right:{color:`#999999`}},dataLabels:{xAxis:{fontSize:0,scale:1e3,translation:``},yAxis:{show:!1}},grid:{stroke:`#6A6A6A`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:Ut,FINAL_DATASET:Wt,manualLoading:Gt}=le({...Ue(D),FINAL_CONFIG:P,prepareConfig:Yt,skeletonDataset:D.config?.skeletonDataset??[[`_`,9,2,2],[`_`,8,3,3],[`_`,7,5,5],[`_`,6,8,8],[`_`,5,13,13],[`_`,4,21,21],[`_`,3,34,34],[`_`,2,55,55],[`_`,1,89,89],[`_`,0,144,144]],skeletonConfig:re({defaultConfig:P.value,userConfig:Ht.value})}),{userOptionsVisible:Kt,setUserOptionsVisibility:qt,keepUserOptionState:Jt}=Ae({config:P.value}),{svgRef:B}=je({config:P.value.style.title});function Yt(){return me(D.config,Dt,Me)}function Xt(e){let t=ne(e);return t?.style?.chart&&delete t.style.tooltip,JSON.stringify(t)}let Zt=Xt(D.config);T(()=>D.config,(e,t)=>{let n=Xt(e),r=n!==Zt;Zt=n;let i=Yt();r?(Ut.value||(P.value=i),Kt.value=!P.value.userOptions.showOnChartHover,tn(),Ft.value+=1,It.value+=1,U.value.showTable=P.value.table.show,U.value.showTooltip=P.value.style.tooltip.show):(P.value.style.tooltip=i.style.tooltip,U.value.showTooltip=P.value.style.tooltip.show)},{deep:!0}),T(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(Gt.value=!1)},{deep:!0});let V=He(null),H=He(null),Qt=b(!1),$t=0;Be(()=>{tn()});let en=u(()=>P.value.debug);function tn(){ce(D.dataset)&&(te({componentName:`VueUiAgePyramid`,type:`dataset`,debug:en.value}),Gt.value=!0),ce(D.dataset)||(Gt.value=P.value.loading),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:j.value,title:F.value.title.text?Mt.value:null,source:Nt.value,noTitle:Pt.value});cancelAnimationFrame($t),$t=requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,Qt.value=!0})}),H.value=j.value.parentNode,V.value.observe(H.value))}ze(()=>{cancelAnimationFrame($t),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:nn,isImaging:rn,generatePdf:an,generateImage:on}=we({elementId:`vue-ui-age-pyramid_${O.value}`,fileName:F.value.title.text||`vue-ui-age-pyramid`,options:P.value.userOptions.print}),sn=u(()=>P.value.userOptions.show&&!F.value.title.text),U=b({showTable:P.value.table.show,showTooltip:F.value.tooltip.show});T(P,()=>{U.value={showTable:P.value.table.show,showTooltip:F.value.tooltip.show}},{immediate:!0});let W=b({height:F.value.height,width:F.value.width}),cn=u(()=>W.value.width),ln=u(()=>W.value.height),{metrics:un,ready:dn,settling:fn,update:pn}=Te({svgRef:B,canMeasure:()=>!P.value.responsive||Qt.value,initialMetrics:{bottom:0},measure:e=>({bottom:e(Lt.value).height})}),mn=u(()=>un.value.bottom),G=u(()=>{let e=W.value.width-F.value.layout.padding.right-F.value.layout.padding.left,t=F.value.layout.padding.left,n=W.value.width-F.value.layout.padding.right;return{top:F.value.layout.padding.top+I.value.sideTitles.fontSize+I.value.sideTitles.offsetY+12,left:t,right:n,bottom:W.value.height-F.value.layout.padding.bottom-mn.value,width:e,height:W.value.height-F.value.layout.padding.top-F.value.layout.padding.bottom-mn.value-I.value.sideTitles.fontSize-I.value.sideTitles.offsetY-12,centerX:F.value.layout.padding.left+e/2,leftChart:{width:e/2-F.value.layout.centerSlit.width,right:t+e/2-F.value.layout.centerSlit.width},rightChart:{width:e/2-F.value.layout.centerSlit.width,left:t+e/2+F.value.layout.centerSlit.width}}}),hn=u(()=>Wt.value.map(e=>I.value.yAxis.display===`age`?e[1]:e[0])),K=u(()=>{let e=gn(q.value/5),t=[],n=[];for(let r=0;r<=5;r+=1){let i=e*r,a=e*(r-5);t.push({value:i,x:G.value.left+G.value.width/2+F.value.layout.centerSlit.width+i/q.value*G.value.leftChart.width}),n.push({value:Math.abs(a),x:G.value.left+G.value.width/2+a/q.value*G.value.leftChart.width-F.value.layout.centerSlit.width})}return{right:t,left:n}});function gn(e){if(e===0)return 0;let t=10**Math.floor(Math.log10(Math.abs(e))),n;return n=Math.round(e/t)*t,n}let q=u(()=>Math.max(...Wt.value.flatMap(e=>e.slice(-2).map(e=>s(e))))),J=u(()=>Wt.value.length),_n=u(()=>Wt.value.map(e=>({segment:e[0],age:e[1],left:{value:e[2],proportionToMax:e[2]/q.value},right:{value:e[3],proportionToMax:e[3]/q.value}}))),Y=u(()=>_n.value.map((e,t)=>{let n=G.value.top+G.value.height/J.value*t,r=G.value.height/J.value-L.value.gap;return{segment:e.segment,age:e.age,left:{...e.left,y:n,color:L.value.left.color,x:G.value.leftChart.right-e.left.proportionToMax*G.value.leftChart.width,width:s(e.left.proportionToMax*G.value.leftChart.width),height:r},right:{...e.right,y:n,color:L.value.right.color,x:G.value.rightChart.left,width:s(e.right.proportionToMax*G.value.rightChart.width),height:r}}})),vn=b(null);function yn(e){let[t,n,r,i]=e;return{segment:t,index:n,left:r,right:i}}function bn(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:yn(t),seriesIndex:e})}function xn(e,t){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:yn(t),seriesIndex:e}),(N.value!==`keyboard`||M.value!==e)&&(A.value=null,k.value=!1)}function Sn(e){if(!B.value)return;let t=Y.value[e];if(!t)return;let n=se(G.value.left+G.value.width/2,t.left.y+t.left.height/2,B.value);n&&(Bt.value=n)}function Cn(e,t,r=`pointer`){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:yn(t),seriesIndex:e}),A.value=e,M.value=e,N.value=r,vn.value={datapoint:t,seriesIndex:e,series:Y.value,config:P.value};let a=F.value.tooltip.customFormat;if(i(a)&&ae(()=>a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value})))At.value=a({seriesIndex:e,datapoint:{segment:t[0],index:t[1],left:t[2],right:t[3]},series:Y.value,config:P.value});else{let r=``,i=Y.value[e];r+=`<div><b>${i.segment}</b></div>`,r+=`<div>${P.value.translations.age}: ${c(I.value.yAxis.formatter,s(i.age),n({v:s(i.age)}),{datapoint:t,seriesIndex:e})}</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}">`,r+=`<div style="display:flex; flex-direction:row;gap:12px">`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:L.value.left.color}"/></svg><div>${P.value.translations.female}</div><div><b>${c(I.value.xAxis.formatter,s(i.left.value),n({v:s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:L.value.right.color}"/></svg><div>${P.value.translations.male}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value),n({v:s(i.right.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}"><div>${P.value.translations.total}</div><div><b>${c(I.value.xAxis.formatter,s(i.right.value)+s(i.left.value),n({v:s(i.right.value)+s(i.left.value)}),{datapoint:t,seriesIndex:e})}</b></div></div>`,r+=`</div>`,At.value=`<div>${r}</div>`}k.value=!0,r===`keyboard`&&Ie(()=>{Sn(e)})}function wn(e=null){Ie(()=>{let t=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total],n=D.dataset.map(e=>[e[0],e[1],e[2],e[3],e[2]??0+e[3]??0]),i=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),a=r(i);e?e(a):ie({csvContent:a,title:F.value.title.text||`vue-ui-heatmap`})})}let X=u(()=>{let e=[P.value.translations.year,P.value.translations.age,P.value.translations.female,P.value.translations.male,P.value.translations.total];return{head:e,body:D.dataset.map(e=>[e[0],e[1],e[2]==null?``:e[2].toLocaleString(),e[3]==null?``:e[3].toLocaleString(),(e[2]??0+e[3]??0).toLocaleString()]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Z=b(!1);function Tn(e){Z.value=e,jt.value+=1}function En(){U.value.showTable=!U.value.showTable}function Dn(){U.value.showTooltip=!U.value.showTooltip}let Q=b(!1);function On(){Q.value=!Q.value}async function kn({scale:e=2}={}){if(!j.value)return;let{width:t,height:n}=j.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await he({domElement:j.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:F.value.title.text,width:t,height:n,aspectRatio:r}}let An=b([]),jn=b({start:0,end:Y.value.length});Ee({timeLabelsEls:Lt,timeLabels:An,slicer:jn,configRef:P,rotationPath:[`style`,`layout`,`dataLabels`,`xAxis`,`rotation`],autoRotatePath:[`style`,`layout`,`dataLabels`,`xAxis`,`autoRotate`,`enable`],isAutoSize:!1,width:cn,height:ln,targetClass:`.vue-ui-age-pyramid-x-axis-label`,rotation:F.value.layout.dataLabels.xAxis.autoRotate.angle});let $=u(()=>ye({config:P,style:F,mutableConfig:U,dialog:Et,accordion:xt,isFullscreen:Z,parent:j,maxWidth:800,isCursorPointer:z}));T(()=>U.value.showTable,e=>ve(e,P,Rt));function Mn(){U.value.showTable=!1,zt.value&&zt.value.setTableIconState(!1)}let Nn=u(()=>P.value.style.backgroundColor),Pn=u(()=>P.value.style.title),{isCallbackImaging:Fn,isCallbackSvg:In,generateSvg:Ln,onGenerateImage:Rn}=_e({svg:B,title:Pn,legend:null,legendItems:null,backgroundColor:Nn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:on});async function zn(){Ot(`copyAlt`,{config:P.value,dataset:Y.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Bn(){Vt.value=!0}function Vn(){A.value=null,M.value=null,N.value=`pointer`,k.value=!1,Vt.value=!1}function Hn(e){if(!B.value||Q.value||document.activeElement!==B.value||!Y.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){A.value=null,M.value=null,N.value=`pointer`,k.value=!1;return}if(r){if(M.value===null)return;let e=D.dataset[M.value];if(!e)return;bn(M.value,e);return}let a=M.value,o=A.value,ee=a!==null&&a>=0&&a<Y.value.length,te=o!==null&&o>=0&&o<Y.value.length;ee?t?a=a-1<0?Y.value.length-1:a-1:n&&(a=a+1>Y.value.length-1?0:a+1):te?(a=n?o+1:o-1,a>=Y.value.length&&(a=0),a<0&&(a=Y.value.length-1)):a=n?0:Y.value.length-1;let s=D.dataset[a];s&&Cn(a,s,`keyboard`)}return pe({getImage:kn,generatePdf:an,generateCsv:wn,generateImage:on,generateSvg:Ln,toggleTable:En,toggleTooltip:Dn,toggleAnnotator:On,toggleFullscreen:Tn,copyAlt:zn}),T(()=>[W.value,I.value,Lt.value,D.dataset,Qt.value,P.value.style.fontFamily],pn,{flush:`post`,deep:!0}),(t,r)=>(y(),p(`div`,{class:Le(`vue-data-ui-component vue-ui-age-pyramid ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`agePyramid`,ref:j,id:`vue-ui-age-pyramid_${O.value}`,style:Re(`font-family:${F.value.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),onMouseenter:r[1]||=()=>w(qt)(!0),onMouseleave:r[2]||=()=>w(qt)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,C(P.value.a11y.translations.keyboardNavigation),1)],8,Ke),X.value?.body?.length?(y(),d(ke,{key:0,uid:O.value,head:X.value.head,body:X.value.body,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(y(),d(w(Ct),{key:1,showGroupActions:P.value.userOptions.annotator?.showGroupActions??!0,svgRef:w(B),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Q.value,isCursorPointer:z.value,palette:P.value.userOptions.annotatorPalette,onClose:On},Ne({_:2},[x(w(xe),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(be)(e,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),sn.value?(y(),p(`div`,{key:2,ref_key:`noTitle`,ref:Pt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),F.value.title.text?(y(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Mt,style:`width:100%;background:transparent`},[(y(),d(ge,{key:`title_${Ft.value}`,config:{title:{cy:`pyramid-div-title`,...F.value.title},subtitle:{cy:`pyramid-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),P.value.userOptions.show&&kt.value&&(w(Jt)||w(Kt))?(y(),d(w(wt),{ref_key:`userOptionsRef`,ref:zt,key:`user_options_${jt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(rn),isPrinting:w(nn),uid:O.value,hasTooltip:P.value.userOptions.buttons.tooltip&&F.value.tooltip.show,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Z.value,isTooltip:U.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},chartElement:j.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Q.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:z.value,onToggleFullscreen:Tn,onGeneratePdf:w(an),onGenerateCsv:wn,onGenerateImage:w(Rn),onGenerateSvg:w(Ln),onToggleTable:En,onToggleTooltip:Dn,onToggleAnnotator:On,onCopyAlt:zn,style:Re({visibility:w(Jt)?w(Kt)?`visible`:`hidden`:`visible`})},Ne({_:2},[x(w(Se)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:E(n=>[S(t.$slots,e,v(_(w(Ce)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,qe,[(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(oe),class:Le({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:Re(`max-width:100%;overflow:visible;background:transparent;color:${F.value.color};visibility:${w(dn)?`visible`:`hidden`}`),tabindex:`0`,"aria-describedby":`chart-instructions-${O.value}`,onFocus:Bn,onBlur:Vn,onKeydown:Hn},[h(w(Tt)),S(t.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0),t.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:G.value.left,y:G.value.top,width:Math.max(.1,G.value.width),height:Math.max(.1,G.value.height),style:{pointerEvents:`none`}},[S(t.$slots,`chart-background`,{},void 0,!0)],8,Ye)):f(``,!0),m(`defs`,null,[h(Oe,{t:`linear`,id:`age_pyramid_left_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,L.value.left.color,1],[`100%`,w(a)(w(ee)(L.value.left.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1]]},null,8,[`id`,`stops`]),h(Oe,{t:`linear`,id:`age_pyramid_right_${O.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,w(a)(w(ee)(L.value.right.color,L.value.gradient.shiftHue),100-L.value.gradient.intensity),1],[`100%`,L.value.right.color,1]]},null,8,[`id`,`stops`])]),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:e.left.x,y:e.left.y,width:w(s)(e.left.width<=0?1e-4:e.left.width),height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Xe),m(`rect`,{x:e.left.x,y:e.left.y,width:e.left.width<=0?1e-4:e.left.width,height:e.left.height<=0?1e-4:e.left.height,fill:L.value.gradient.show?`url(#age_pyramid_left_${O.value})`:e.left.color,rx:L.value.borderRadius},null,8,Ze),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.underlayer,rx:L.value.borderRadius},null,8,Qe),m(`rect`,{x:e.right.x,y:e.right.y,width:e.right.width<=0?1e-4:e.right.width,height:e.right.height<=0?1e-4:e.right.height,fill:L.value.gradient.show?`url(#age_pyramid_right_${O.value})`:e.right.color,rx:L.value.borderRadius},null,8,$e)]))),256)),(y(!0),p(l,null,x(Y.value,(e,t)=>(y(),p(`g`,null,[R.value.show?(y(),p(l,{key:0},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.left.x+Math.max(1e-4,e.left.width)-R.value.offsetX-6,y:e.left.y+Math.max(1e-4,e.left.height/2)+L.value.gap/2,"text-anchor":`end`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.left.value,w(n)({v:e.left.value}),{datapoint:e.left,seriesIndex:t})),9,et)):f(``,!0)],64)):f(``,!0),R.value.show?(y(),p(l,{key:1},[!R.value.showOnHover||R.value.showOnHover&&A.value===t?(y(),p(`text`,{key:0,x:e.right.x+R.value.offsetX+6,y:e.right.y+Math.max(1e-4,e.right.height/2)+L.value.gap/2,"text-anchor":`start`,"dominant-baseline":`middle`,"font-size":R.value.fontSize,"font-weight":R.value.bold?`bold`:`normal`,fill:R.value.color,stroke:F.value.backgroundColor,"paint-order":`stroke fill`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`},C(w(c)(R.value.formatter,e.right.value,w(n)({v:e.right.value}),{datapoint:e.right,seriesIndex:t})),9,tt)):f(``,!0)],64)):f(``,!0)]))),256)),m(`g`,null,[I.value.sideTitles.show?(y(),p(`g`,nt,[m(`text`,{x:G.value.left,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.left.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`start`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.female),9,rt),m(`text`,{x:G.value.right,y:I.value.sideTitles.fontSize,fill:I.value.sideTitles.useSideColor?L.value.right.color:I.value.sideTitles.color,"font-size":I.value.sideTitles.fontSize,"text-anchor":`end`,"font-weight":I.value.sideTitles.bold?`bold`:`normal`},C(P.value.translations.male),9,it)])):f(``,!0),I.value.yAxis.show?(y(),p(`g`,at,[(y(!0),p(l,null,x(hn.value,(e,t)=>(y(),p(l,null,[t%I.value.yAxis.showEvery===0&&(!R.value.show||R.value.showOnHover&&A.value===t||A.value===null)||(R.value.show||R.value.showOnHover)&&A.value===t?(y(),p(`text`,{key:0,x:G.value.centerX,y:G.value.top+G.value.height/J.value/2+G.value.height/J.value*t,"dominant-baseline":`middle`,"text-anchor":`middle`,"font-size":I.value.yAxis.fontSize,fill:I.value.yAxis.color,"font-weight":I.value.yAxis.bold?`bold`:`normal`},C(w(c)(I.value.yAxis.formatter,e,w(n)({v:e}),{datapoint:e,seriesIndex:t})),9,ot)):f(``,!0)],64))),256))])):f(``,!0),I.value.xAxis.show?(y(),p(`g`,st,[F.value.layout.grid.show?(y(),p(`g`,ct,[m(`line`,{x1:K.value.right[0].x,x2:K.value.right.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,lt),m(`line`,{x1:K.value.left[0].x,x2:K.value.left.at(-1).x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ut)])):f(``,!0),(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,dt)):f(``,!0)]))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`g`,null,[F.value.layout.grid.show?(y(),p(`line`,{key:0,x1:e.x,x2:e.x,y1:G.value.bottom+I.value.xAxis.fontSize/2,y2:G.value.bottom+I.value.xAxis.fontSize/2+4,stroke:F.value.layout.grid.stroke,"stroke-width":F.value.layout.grid.strokeWidth,"stroke-linecap":`round`},null,8,ft)):f(``,!0)]))),256)),m(`g`,{ref_key:`xAxisLabels`,ref:Lt},[(y(!0),p(l,null,x(K.value.right,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,pt))),256)),(y(!0),p(l,null,x(K.value.left,(e,t)=>(y(),p(`text`,{class:`vue-ui-age-pyramid-x-axis-label`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"text-anchor":I.value.xAxis.rotation>0?`start`:I.value.xAxis.rotation<0?`end`:`middle`,"font-weight":I.value.xAxis.bold?`bold`:`normal`,transform:`translate(${e.x}, ${G.value.bottom+I.value.xAxis.fontSize*2}) rotate(${I.value.xAxis.rotation})`},C(w(c)(I.value.xAxis.formatter,e.value/I.value.xAxis.scale,w(n)({v:e.value/F.value.layout.dataLabels.xAxis.scale}),{datapoint:e,seriesIndex:t})),9,mt))),256))],512),m(`text`,{x:G.value.right,y:W.value.height,"text-anchor":`end`,"font-size":I.value.xAxis.fontSize,fill:I.value.xAxis.color,"font-weight":I.value.xAxis.bold?`bold`:`normal`},C(I.value.xAxis.translation),9,ht)])):f(``,!0)]),(y(!0),p(l,null,x(e.dataset,(e,t)=>(y(),p(`g`,null,[m(`rect`,{x:G.value.left,y:G.value.top+G.value.height/J.value*t-L.value.gap/2,width:G.value.width<=0?1e-4:G.value.width,height:G.value.height/J.value<=0?1e-4:G.value.height/J.value,fill:A.value!==null&&A.value===t?w(a)(F.value.highlighter.color,F.value.highlighter.opacity):`transparent`,onMouseover:n=>Cn(t,e,`pointer`),onMouseleave:n=>xn(t,e),onClick:n=>bn(t,e)},null,40,gt)]))),256)),S(t.$slots,`svg`,{svg:{...W.value,drawingArea:G.value,isPrintingImg:w(nn)||w(rn)||w(Fn),isPrintingSvg:w(In)}},void 0,!0)],46,Je)),t.$slots.hint?(y(),p(`div`,_t,[S(t.$slots,`hint`,v(_({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Vt.value})),void 0,!0)])):f(``,!0)]),t.$slots.watermark?(y(),p(`div`,vt,[S(t.$slots,`watermark`,v(_({isPrinting:w(nn)||w(rn)||w(Fn)||w(In)})),void 0,!0)])):f(``,!0),S(t.$slots,`legend`,{legend:Y.value},void 0,!0),t.$slots.source?(y(),p(`div`,{key:6,ref_key:`source`,ref:Nt,dir:`auto`},[S(t.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(w(yt),{teleportTo:F.value.tooltip.teleportTo,show:U.value.showTooltip&&k.value,backgroundColor:F.value.tooltip.backgroundColor,color:F.value.tooltip.color,borderRadius:F.value.tooltip.borderRadius,borderColor:F.value.tooltip.borderColor,borderWidth:F.value.tooltip.borderWidth,fontSize:F.value.tooltip.fontSize,backgroundOpacity:F.value.tooltip.backgroundOpacity,position:F.value.tooltip.position,offsetX:F.value.tooltip.offsetX,offsetY:F.value.tooltip.offsetY,parent:j.value,content:At.value,isFullscreen:Z.value,isCustom:F.value.tooltip.customFormat&&typeof F.value.tooltip.customFormat==`function`,smooth:F.value.tooltip.smooth,backdropFilter:F.value.tooltip.backdropFilter,smoothForce:F.value.tooltip.smoothForce,smoothSnapThreshold:F.value.tooltip.smoothSnapThreshold,isA11yMode:N.value===`keyboard`,a11yPosition:Bt.value},{"tooltip-before":E(()=>[S(t.$slots,`tooltip-before`,v(_({...vn.value})),void 0,!0)]),tooltip:E(()=>[S(t.$slots,`tooltip`,v(_({...vn.value})),void 0,!0)]),"tooltip-after":E(()=>[S(t.$slots,`tooltip-after`,v(_({...vn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),kt.value&&P.value.userOptions.buttons.table?(y(),d(Ve($.value.component),Fe({key:7},$.value.props,{ref_key:`tableUnit`,ref:Rt,onClose:Mn}),Ne({content:E(()=>[(y(),d(w(St),{key:`table_${It.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:P.value.table.useDialog?``:$.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:z.value,onClose:Mn},{th:E(({th:e})=>[Pe(C(e),1)]),td:E(({td:e})=>[Pe(C(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:E(()=>[Pe(C($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:E(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:r[0]||=e=>wn(P.value.userOptions.callbacks.csv),style:Re({cursor:z.value?`pointer`:`default`})},[h(w(bt),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),S(t.$slots,`skeleton`,{},()=>[w(Ut)?(y(),d(ue,{key:0})):f(``,!0)],!0)],46,Ge))}},[[`__scopeId`,`data-v-888d4aa4`]]);export{We as n,yt as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{C as n,Vt as r,X as i,in as a}from"./lib-rPeBMZrn.js";import{n as o,t as s}from"./useHints-C-TwxM0Y.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as l}from"./dom-to-png-D56-Zgv4.js";import{t as u}from"./BaseIcon-Cm-IJ179.js";import{t as ee}from"./usePrinter-DVf3YcG5.js";import{t as te}from"./vue-ui-accordion-S3nRtTU-.js";import{t as ne}from"./ColorPicker-Dmus34hN.js";import{Fragment as re,Teleport as ie,computed as ae,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createTextVNode as h,createVNode as oe,guardReactiveProps as se,nextTick as ce,normalizeClass as g,normalizeProps as le,normalizeStyle as _,onBeforeUnmount as ue,onMounted as de,openBlock as v,ref as y,renderList as fe,renderSlot as b,toDisplayString as x,unref as pe,vModelCheckbox as me,vModelText as he,watch as ge,withCtx as S,withDirectives as _e,withModifiers as ve}from"vue";function ye(e){let t=t=>e.isMacLike.value?t.metaKey:t.ctrlKey,n=e=>{let t=e;if(!t)return!1;let n=(t.tagName||``).toLowerCase();return t.isContentEditable||n===`input`||n===`textarea`||n===`select`},r=t=>!!(!e.isSummaryOpen.value||n(t.target)||e.isWriting.value),i=()=>{e.isDeleteMode.value=!1,e.isMoveMode.value=!1,e.isResizeMode.value=!1,e.isSelectMode.value=!1,e.isDrawMode.value=!1,e.isTextMode.value=!1,e.activeShape.value=void 0,e.showCaret.value=!1},a=t=>{switch(i(),t){case`m`:e.isMoveMode.value=!0;break;case`r`:e.isResizeMode.value=!0;break;case`d`:e.isDeleteMode.value=!0;break;case`g`:e.isSelectMode.value=!0,e.setShapeTo(`group`),e.activeShape.value=`group`;break;case`t`:e.isTextMode.value=!0,e.isWriting.value=!1,e.showCaret.value=!1}},o=t=>{switch(t){case`c`:e.setShapeTo(`circle`);break;case`s`:e.setShapeTo(`rect`);break;case`a`:e.setShapeTo(`arrow`);break;case`l`:e.setShapeTo(`line`)}},s=(t,n)=>{let r=e.lastSelectedShape.value;if(!r)return;let i=(e,t)=>{typeof r[e]==`number`&&(r[e]+=t)};switch(r.type){case`rect`:case`circle`:case`text`:i(`x`,t),i(`y`,n);break;case`arrow`:i(`x`,t),i(`y`,n),i(`endX`,t),i(`endY`,n)}},c=()=>{let t=e.lastSelectedShape.value;t&&(e.shapes.value=e.shapes.value.filter(e=>e.id!==t.id),e.lastSelectedShape.value=void 0)},l=!1,u=null,ee=()=>{l||(l=!0,e.history?.value?.begin?.(`nudge`))},te=()=>{l&&(clearTimeout(u),u=setTimeout(()=>{l=!1,e.history?.value?.end?.()},160))},ne=()=>{clearTimeout(u),l&&e.history?.value?.end?.(),l=!1},re=n=>{if(t(n)&&!n.shiftKey&&n.key.toLowerCase()===`z`){if(r(n))return;n.preventDefault(),e.undoLastShape?.();return}if(t(n)&&n.shiftKey&&n.key.toLowerCase()===`z`||t(n)&&n.key.toLowerCase()===`y`){if(r(n))return;n.preventDefault(),typeof e.redoLastShape==`function`?e.redoLastShape():e.history?.value?.redo?.();return}if(r(n))return;let l=n.key.toLowerCase();if(l===`escape`)n.preventDefault(),i();else if(l===`delete`||l===`backspace`)n.preventDefault(),c();else if([`m`,`r`,`d`,`g`,`t`].includes(l))n.preventDefault(),a(l);else if([`c`,`a`,`l`,`s`].includes(l))n.preventDefault(),o(l);else if(n.key===`ArrowUp`||n.key===`ArrowDown`||n.key===`ArrowLeft`||n.key===`ArrowRight`){n.preventDefault(),ee();let e=n.shiftKey?10:1;n.key===`ArrowUp`&&s(0,-e),n.key===`ArrowDown`&&s(0,e),n.key===`ArrowLeft`&&s(-e,0),n.key===`ArrowRight`&&s(e,0),te()}},ie=e=>{e.key.startsWith(`Arrow`)&&te()};return window.addEventListener(`keydown`,re),window.addEventListener(`keyup`,ie),function(){window.removeEventListener(`keydown`,re),window.removeEventListener(`keyup`,ie),ne()}}var be={class:`teleport-tooltip__inner`},C=/*#__PURE__*/ c({__name:`TeleportedTooltip`,props:{show:{type:Boolean,default:!1},x:{type:Number,required:!0},y:{type:Number,required:!0},placement:{type:String,default:`top`},styleObject:{type:Object,default(){return{}}},delay:{type:Number,default:0},delayIn:{type:Number,default:300},delayOut:{type:Number,default:0}},setup(e){let t=e,n=ae(()=>t.delayIn??t.delay),r=ae(()=>t.delayOut??t.delay),i=y(!1),a=null,o=null;function s(){a&&=(clearTimeout(a),null),o&&=(clearTimeout(o),null)}function c(){s();let e=Math.max(0,n.value||0);e===0?i.value=!0:a=setTimeout(()=>{i.value=!0,a=null},e)}function l(){s();let e=Math.max(0,r.value||0);e===0?i.value=!1:o=setTimeout(()=>{i.value=!1,o=null},e)}ge(()=>t.show,e=>{e?c():l()},{immediate:!0}),de(()=>{t.show&&c()}),ue(()=>{s()});let u=ae(()=>({position:`fixed`,zIndex:2147483647,top:`${t.y}px`,left:`${t.x}px`,transform:t.placement===`bottom`?`translate(-50%, 8px)`:`translate(-50%, -100%)`,pointerEvents:`none`,...t.styleObject}));return(t,n)=>(v(),d(ie,{to:`body`},[i.value?(v(),p(`div`,{key:0,class:g([`teleport-tooltip`,e.placement]),style:_(u.value),role:`tooltip`,"aria-hidden":`false`},[m(`div`,be,[b(t.$slots,`default`,{},void 0,!0)])],6)):f(``,!0)]))}},[[`__scopeId`,`data-v-c292996f`]]),xe=/* @__PURE__ */ e({default:()=>Dt}),Se={class:`vue-data-ui-component vue-ui-annotator`},Ce={"data-dom-to-png-ignore":``},we=[`id`],Te=[`id`],Ee={class:`tool-selection`},De=[`disabled`],Oe=[`disabled`],ke=[`disabled`],Ae=[`disabled`],je=[`disabled`],Me=[`disabled`],Ne=[`disabled`],Pe=[`disabled`],Fe=[`disabled`],Ie={class:`tool-selection`,style:{"margin-top":`6px`}},Le={viewBox:`0 0 12 12`,style:{width:`100%`}},Re=[`fill`],ze={key:0},Be={class:`tool-input`},Ve=[`checked`],He={viewBox:`0 0 12 12`,style:{width:`100%`}},Ue=[`fill`],We={key:1},Ge={class:`tool-input`},Ke=[`checked`],qe={viewBox:`0 0 24 24`,style:{width:`100%`}},Je=[`stroke`],Ye={key:2},Xe={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`}},Ze={class:`tool-input`},Qe={key:3},$e={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`}},et={class:`tool-input`},tt=[`checked`],nt={key:4},rt={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`}},it={class:`tool-input`},at={key:5},ot={key:6},st=[`disabled`],ct={key:7},lt=[`disabled`],ut={key:8},dt={key:9},ft={key:10},pt={key:11},mt={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`},class:`tooltip`},ht={style:{display:`flex`,"flex-direction":`column`,"align-items":`start`,"justify-content":`center`}},gt={class:`tool-input`,style:{"font-variant-numeric":`tabular-nums`}},_t=[`id`],vt=[`viewBox`,`width`,`height`],yt=[`width`,`height`,`pointer-events`],bt=[`innerHTML`,`onClick`,`onDblclick`],xt=[`x1`,`x2`,`y1`,`y2`,`stroke`],St=[`height`,`viewBox`,`width`],Ct=[`cx`,`cy`],wt=`annotations`,Tt=`‎`,Et=450,Dt=/*#__PURE__*/ c({__name:`vue-ui-annotator`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},emits:[`toggleOpenState`,`saveAnnotations`],setup(e,{emit:c}){let be=e,xe=c,Dt=y(!1),Ot=y(!1);de(()=>Dt.value=!0);let kt=y(i()),{isImaging:At,generateImage:jt}=ee({elementId:kt.value,fileName:wt}),w=y(void 0),Mt=y(1),T=y({start:{x:0,y:0},end:{x:0,y:0}}),E=y(void 0),Nt=y(void 0),Pt=y(!1),Ft=y(!1),It=y(!1),D=y(!1),Lt=y(!1),Rt=y(!0),O=y(!1),zt=y(!1),Bt=y(!1),k=y(!1),Vt=y(!1),A=y(!1),j=y(!1),M=y(!1);ge(M,async e=>{Ot.value=!1,e?(await ce(),Ot.value=!0):(F.value=void 0,E.value=void 0,Nt.value=void 0,Wt.value=[],j.value=!1)});let N=y(!1),Ht=y(!1),P=y(!1),F=y(be.dataset?.lastSelectedShape??void 0),I=y({x:0,y:0}),Ut=y(!0),Wt=y([]),L=y(be.dataset?.shapes||[]);y([]);let Gt=y(Math.round(Math.random())*1e5),Kt=y(1e3),qt=y(1e3),R=y({arrow:{color:`grey`,filled:!0},circle:{color:`grey`,filled:!1,radius:3,strokeWidth:2},rect:{color:`grey`,filled:!1,strokeWidth:2,height:12,width:12}}),z=y(!1),Jt=y(1),Yt=y(void 0),Xt=y(1),Zt=y(1),B=y(`start`),Qt=y(20),$t=y(100),en=r,tn=y(null),nn=y(null),V=y(null),rn=y(null),an=y(null),on=y(!1),sn=y({row:0,col:0}),H=y(null),U=y(!1),W=y(null),G=y({x:0,y:0}),cn=y(null),ln=y([]),un=y(!1),dn=y(null),fn=y({undo:0,redo:0}),pn=y(null);y(null),y(null);let mn=y(null),K=ae(()=>{let e=t().vue_ui_annotator;if(!Object.keys(be.config||{}).length)return e;let r=a({defaultConfig:e,userConfig:be.config});return n(r)}),hn=y(K.value.style.paletteColor),q=ae(()=>K.value.style.buttons),J=ae(()=>K.value.style);o({config:()=>K.value,dataset:()=>[],component:`VueUiAnnotator`,rules:[s.noHint]});let Y=ae(()=>K.value.useCursorPointer),X=ae(()=>{let e=J.value.tooltips;return{backgroundColor:e.backgroundColor,color:e.color,border:e.border,borderRadius:`${e.borderRadius}px`,boxShadow:e.boxShadow}}),gn=ae(()=>L.value.filter(e=>e.type!==`group`||Array.isArray(e.source)&&e.source.length>0).length>1),_n=ae(()=>en[$t.value>98?98:$t.value]),vn=ae(()=>{switch(!0){case D.value:return`default`;case k.value:return`move`;case N.value:return`text`;case A.value:return`move`;default:return``}}),yn=ae(()=>L.value),bn=y(null);function xn(e){return e?!!(F.value&&F.value.id===e.id):!1}function Sn(e=``){let t=String(e).trim().split(/\s+/).map(Number).filter(Number.isFinite),n=[];for(let e=0;e+1<t.length;e+=2)n.push({x:t[e],y:t[e+1]});return n}function Cn(e=[]){return e.map(({x:e,y:t})=>`${e} ${t}`).join(` `)}function wn(e=``){let t=Sn(e);if(!t.length)return null;let n=t.map(e=>e.x),r=t.map(e=>e.y),i=Math.min(...n),a=Math.max(...n),o=Math.min(...r),s=Math.max(...r);return{minX:i,minY:o,maxX:a,maxY:s,width:Math.max(1,a-i),height:Math.max(1,s-o)}}function Tn(e){if(!e||!M.value||!A.value||!F.value||F.value.id!==e.id)return``;let t=J.value.color||`grey`,n=J.value.backgroundColor||`rgba(255,255,255,0.95)`,r=({handle:r,x:i,y:a,cursor:o=`nwse-resize`})=>`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{C as n,Vt as r,X as i,in as a}from"./lib-rPeBMZrn.js";import{n as o,t as s}from"./useHints-C-TwxM0Y.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as l}from"./dom-to-png-D56-Zgv4.js";import{t as u}from"./BaseIcon-fYK0iID8.js";import{t as ee}from"./usePrinter-DVf3YcG5.js";import{t as te}from"./vue-ui-accordion-D4FHxzsL.js";import{t as ne}from"./ColorPicker-DEJOjcmD.js";import{Fragment as re,Teleport as ie,computed as ae,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createTextVNode as h,createVNode as oe,guardReactiveProps as se,nextTick as ce,normalizeClass as g,normalizeProps as le,normalizeStyle as _,onBeforeUnmount as ue,onMounted as de,openBlock as v,ref as y,renderList as fe,renderSlot as b,toDisplayString as x,unref as pe,vModelCheckbox as me,vModelText as he,watch as ge,withCtx as S,withDirectives as _e,withModifiers as ve}from"vue";function ye(e){let t=t=>e.isMacLike.value?t.metaKey:t.ctrlKey,n=e=>{let t=e;if(!t)return!1;let n=(t.tagName||``).toLowerCase();return t.isContentEditable||n===`input`||n===`textarea`||n===`select`},r=t=>!!(!e.isSummaryOpen.value||n(t.target)||e.isWriting.value),i=()=>{e.isDeleteMode.value=!1,e.isMoveMode.value=!1,e.isResizeMode.value=!1,e.isSelectMode.value=!1,e.isDrawMode.value=!1,e.isTextMode.value=!1,e.activeShape.value=void 0,e.showCaret.value=!1},a=t=>{switch(i(),t){case`m`:e.isMoveMode.value=!0;break;case`r`:e.isResizeMode.value=!0;break;case`d`:e.isDeleteMode.value=!0;break;case`g`:e.isSelectMode.value=!0,e.setShapeTo(`group`),e.activeShape.value=`group`;break;case`t`:e.isTextMode.value=!0,e.isWriting.value=!1,e.showCaret.value=!1}},o=t=>{switch(t){case`c`:e.setShapeTo(`circle`);break;case`s`:e.setShapeTo(`rect`);break;case`a`:e.setShapeTo(`arrow`);break;case`l`:e.setShapeTo(`line`)}},s=(t,n)=>{let r=e.lastSelectedShape.value;if(!r)return;let i=(e,t)=>{typeof r[e]==`number`&&(r[e]+=t)};switch(r.type){case`rect`:case`circle`:case`text`:i(`x`,t),i(`y`,n);break;case`arrow`:i(`x`,t),i(`y`,n),i(`endX`,t),i(`endY`,n)}},c=()=>{let t=e.lastSelectedShape.value;t&&(e.shapes.value=e.shapes.value.filter(e=>e.id!==t.id),e.lastSelectedShape.value=void 0)},l=!1,u=null,ee=()=>{l||(l=!0,e.history?.value?.begin?.(`nudge`))},te=()=>{l&&(clearTimeout(u),u=setTimeout(()=>{l=!1,e.history?.value?.end?.()},160))},ne=()=>{clearTimeout(u),l&&e.history?.value?.end?.(),l=!1},re=n=>{if(t(n)&&!n.shiftKey&&n.key.toLowerCase()===`z`){if(r(n))return;n.preventDefault(),e.undoLastShape?.();return}if(t(n)&&n.shiftKey&&n.key.toLowerCase()===`z`||t(n)&&n.key.toLowerCase()===`y`){if(r(n))return;n.preventDefault(),typeof e.redoLastShape==`function`?e.redoLastShape():e.history?.value?.redo?.();return}if(r(n))return;let l=n.key.toLowerCase();if(l===`escape`)n.preventDefault(),i();else if(l===`delete`||l===`backspace`)n.preventDefault(),c();else if([`m`,`r`,`d`,`g`,`t`].includes(l))n.preventDefault(),a(l);else if([`c`,`a`,`l`,`s`].includes(l))n.preventDefault(),o(l);else if(n.key===`ArrowUp`||n.key===`ArrowDown`||n.key===`ArrowLeft`||n.key===`ArrowRight`){n.preventDefault(),ee();let e=n.shiftKey?10:1;n.key===`ArrowUp`&&s(0,-e),n.key===`ArrowDown`&&s(0,e),n.key===`ArrowLeft`&&s(-e,0),n.key===`ArrowRight`&&s(e,0),te()}},ie=e=>{e.key.startsWith(`Arrow`)&&te()};return window.addEventListener(`keydown`,re),window.addEventListener(`keyup`,ie),function(){window.removeEventListener(`keydown`,re),window.removeEventListener(`keyup`,ie),ne()}}var be={class:`teleport-tooltip__inner`},C=/*#__PURE__*/ c({__name:`TeleportedTooltip`,props:{show:{type:Boolean,default:!1},x:{type:Number,required:!0},y:{type:Number,required:!0},placement:{type:String,default:`top`},styleObject:{type:Object,default(){return{}}},delay:{type:Number,default:0},delayIn:{type:Number,default:300},delayOut:{type:Number,default:0}},setup(e){let t=e,n=ae(()=>t.delayIn??t.delay),r=ae(()=>t.delayOut??t.delay),i=y(!1),a=null,o=null;function s(){a&&=(clearTimeout(a),null),o&&=(clearTimeout(o),null)}function c(){s();let e=Math.max(0,n.value||0);e===0?i.value=!0:a=setTimeout(()=>{i.value=!0,a=null},e)}function l(){s();let e=Math.max(0,r.value||0);e===0?i.value=!1:o=setTimeout(()=>{i.value=!1,o=null},e)}ge(()=>t.show,e=>{e?c():l()},{immediate:!0}),de(()=>{t.show&&c()}),ue(()=>{s()});let u=ae(()=>({position:`fixed`,zIndex:2147483647,top:`${t.y}px`,left:`${t.x}px`,transform:t.placement===`bottom`?`translate(-50%, 8px)`:`translate(-50%, -100%)`,pointerEvents:`none`,...t.styleObject}));return(t,n)=>(v(),d(ie,{to:`body`},[i.value?(v(),p(`div`,{key:0,class:g([`teleport-tooltip`,e.placement]),style:_(u.value),role:`tooltip`,"aria-hidden":`false`},[m(`div`,be,[b(t.$slots,`default`,{},void 0,!0)])],6)):f(``,!0)]))}},[[`__scopeId`,`data-v-c292996f`]]),xe=/* @__PURE__ */ e({default:()=>Dt}),Se={class:`vue-data-ui-component vue-ui-annotator`},Ce={"data-dom-to-png-ignore":``},we=[`id`],Te=[`id`],Ee={class:`tool-selection`},De=[`disabled`],Oe=[`disabled`],ke=[`disabled`],Ae=[`disabled`],je=[`disabled`],Me=[`disabled`],Ne=[`disabled`],Pe=[`disabled`],Fe=[`disabled`],Ie={class:`tool-selection`,style:{"margin-top":`6px`}},Le={viewBox:`0 0 12 12`,style:{width:`100%`}},Re=[`fill`],ze={key:0},Be={class:`tool-input`},Ve=[`checked`],He={viewBox:`0 0 12 12`,style:{width:`100%`}},Ue=[`fill`],We={key:1},Ge={class:`tool-input`},Ke=[`checked`],qe={viewBox:`0 0 24 24`,style:{width:`100%`}},Je=[`stroke`],Ye={key:2},Xe={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`}},Ze={class:`tool-input`},Qe={key:3},$e={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`}},et={class:`tool-input`},tt=[`checked`],nt={key:4},rt={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`}},it={class:`tool-input`},at={key:5},ot={key:6},st=[`disabled`],ct={key:7},lt=[`disabled`],ut={key:8},dt={key:9},ft={key:10},pt={key:11},mt={style:{display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`center`},class:`tooltip`},ht={style:{display:`flex`,"flex-direction":`column`,"align-items":`start`,"justify-content":`center`}},gt={class:`tool-input`,style:{"font-variant-numeric":`tabular-nums`}},_t=[`id`],vt=[`viewBox`,`width`,`height`],yt=[`width`,`height`,`pointer-events`],bt=[`innerHTML`,`onClick`,`onDblclick`],xt=[`x1`,`x2`,`y1`,`y2`,`stroke`],St=[`height`,`viewBox`,`width`],Ct=[`cx`,`cy`],wt=`annotations`,Tt=`‎`,Et=450,Dt=/*#__PURE__*/ c({__name:`vue-ui-annotator`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},emits:[`toggleOpenState`,`saveAnnotations`],setup(e,{emit:c}){let be=e,xe=c,Dt=y(!1),Ot=y(!1);de(()=>Dt.value=!0);let kt=y(i()),{isImaging:At,generateImage:jt}=ee({elementId:kt.value,fileName:wt}),w=y(void 0),Mt=y(1),T=y({start:{x:0,y:0},end:{x:0,y:0}}),E=y(void 0),Nt=y(void 0),Pt=y(!1),Ft=y(!1),It=y(!1),D=y(!1),Lt=y(!1),Rt=y(!0),O=y(!1),zt=y(!1),Bt=y(!1),k=y(!1),Vt=y(!1),A=y(!1),j=y(!1),M=y(!1);ge(M,async e=>{Ot.value=!1,e?(await ce(),Ot.value=!0):(F.value=void 0,E.value=void 0,Nt.value=void 0,Wt.value=[],j.value=!1)});let N=y(!1),Ht=y(!1),P=y(!1),F=y(be.dataset?.lastSelectedShape??void 0),I=y({x:0,y:0}),Ut=y(!0),Wt=y([]),L=y(be.dataset?.shapes||[]);y([]);let Gt=y(Math.round(Math.random())*1e5),Kt=y(1e3),qt=y(1e3),R=y({arrow:{color:`grey`,filled:!0},circle:{color:`grey`,filled:!1,radius:3,strokeWidth:2},rect:{color:`grey`,filled:!1,strokeWidth:2,height:12,width:12}}),z=y(!1),Jt=y(1),Yt=y(void 0),Xt=y(1),Zt=y(1),B=y(`start`),Qt=y(20),$t=y(100),en=r,tn=y(null),nn=y(null),V=y(null),rn=y(null),an=y(null),on=y(!1),sn=y({row:0,col:0}),H=y(null),U=y(!1),W=y(null),G=y({x:0,y:0}),cn=y(null),ln=y([]),un=y(!1),dn=y(null),fn=y({undo:0,redo:0}),pn=y(null);y(null),y(null);let mn=y(null),K=ae(()=>{let e=t().vue_ui_annotator;if(!Object.keys(be.config||{}).length)return e;let r=a({defaultConfig:e,userConfig:be.config});return n(r)}),hn=y(K.value.style.paletteColor),q=ae(()=>K.value.style.buttons),J=ae(()=>K.value.style);o({config:()=>K.value,dataset:()=>[],component:`VueUiAnnotator`,rules:[s.noHint]});let Y=ae(()=>K.value.useCursorPointer),X=ae(()=>{let e=J.value.tooltips;return{backgroundColor:e.backgroundColor,color:e.color,border:e.border,borderRadius:`${e.borderRadius}px`,boxShadow:e.boxShadow}}),gn=ae(()=>L.value.filter(e=>e.type!==`group`||Array.isArray(e.source)&&e.source.length>0).length>1),_n=ae(()=>en[$t.value>98?98:$t.value]),vn=ae(()=>{switch(!0){case D.value:return`default`;case k.value:return`move`;case N.value:return`text`;case A.value:return`move`;default:return``}}),yn=ae(()=>L.value),bn=y(null);function xn(e){return e?!!(F.value&&F.value.id===e.id):!1}function Sn(e=``){let t=String(e).trim().split(/\s+/).map(Number).filter(Number.isFinite),n=[];for(let e=0;e+1<t.length;e+=2)n.push({x:t[e],y:t[e+1]});return n}function Cn(e=[]){return e.map(({x:e,y:t})=>`${e} ${t}`).join(` `)}function wn(e=``){let t=Sn(e);if(!t.length)return null;let n=t.map(e=>e.x),r=t.map(e=>e.y),i=Math.min(...n),a=Math.max(...n),o=Math.min(...r),s=Math.max(...r);return{minX:i,minY:o,maxX:a,maxY:s,width:Math.max(1,a-i),height:Math.max(1,s-o)}}function Tn(e){if(!e||!M.value||!A.value||!F.value||F.value.id!==e.id)return``;let t=J.value.color||`grey`,n=J.value.backgroundColor||`rgba(255,255,255,0.95)`,r=({handle:r,x:i,y:a,cursor:o=`nwse-resize`})=>`
2
2
  <circle
3
3
  data-dom-to-png-ignore
4
4
  id="${e.id}"
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ft as r,S as i,X as a,_ as ee,at as te,i as o,in as ne,t as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./chartImage-DPGnEuYM.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./annotationSlots-BRR85CqJ.js";import{n as ge,t as _e}from"./userOptionsSlots-DYuo-E5m.js";import{t as ve}from"./usePrinter-DVf3YcG5.js";import{c as ye}from"./canvas-lib-22VpOI4_.js";import{t as be}from"./useResponsive-CENUxfEL.js";import{t as xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Se}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ce}from"./Legend-DM0ClX3D.js";import{t as we}from"./vue_ui_bullet-CwVYkpjd.js";import{Fragment as s,Teleport as Te,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ee,createVNode as De,defineAsyncComponent as p,guardReactiveProps as m,normalizeClass as Oe,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as ke,onMounted as Ae,openBlock as _,ref as v,renderList as y,renderSlot as b,toDisplayString as x,toRefs as je,unref as S,watch as Me,withCtx as C}from"vue";var Ne=/* @__PURE__ */ e({default:()=>w}),Pe=[`id`],Fe={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Ie=[`id`],Le=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Re=[`id`],ze=[`id`],Be=[`width`,`height`],Ve={key:1},He=[`x`,`y`,`height`,`width`,`fill`,`stroke`],Ue=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],We=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`],Ge=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ke=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],qe={key:3},Je=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ye={key:4},Xe=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ze={key:4,class:`vue-data-ui-watermark`},Qe=[`id`],$e={key:0,class:`vue-ui-bullet-legend-item`,dir:`auto`},et={style:{"margin-right":`2px`}},w=/*#__PURE__*/ le({__name:`vue-ui-bullet`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:le,emit:Ne}){let w=p(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),tt=p(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),nt=p(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),{vue_ui_bullet:rt}=t(),T=e,it=Ne,E=v(null),at=v(null),ot=v(0),st=v(null),ct=v(null),lt=v(0),D=v(null),O=v(null),ut=v(!1),k=c({get:()=>B.value.hasOwnProperty(`value`),set:e=>e}),A=v(R()),j=c(()=>A.value.debug),M=c(()=>A.value.style.chart.target),N=c(()=>A.value.style.chart.segments),P=c(()=>A.value.style.chart),F=c(()=>A.value.userOptions),I=c(()=>B.value.segments?Array.isArray(B.value.segments)?B.value.segments.length?!0:(j.value&&console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{$ as n,Ft as r,S as i,X as a,_ as ee,at as te,i as o,in as ne,t as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./chartImage-DPGnEuYM.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{n as me,t as he}from"./annotationSlots-RvQBEO9-.js";import{n as ge,t as _e}from"./userOptionsSlots-DYuo-E5m.js";import{t as ve}from"./usePrinter-DVf3YcG5.js";import{c as ye}from"./canvas-lib-22VpOI4_.js";import{t as be}from"./useResponsive-CENUxfEL.js";import{t as xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Se}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ce}from"./Legend-DM0ClX3D.js";import{t as we}from"./vue_ui_bullet-CwVYkpjd.js";import{Fragment as s,Teleport as Te,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ee,createVNode as De,defineAsyncComponent as p,guardReactiveProps as m,normalizeClass as Oe,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as ke,onMounted as Ae,openBlock as _,ref as v,renderList as y,renderSlot as b,toDisplayString as x,toRefs as je,unref as S,watch as Me,withCtx as C}from"vue";var Ne=/* @__PURE__ */ e({default:()=>w}),Pe=[`id`],Fe={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Ie=[`id`],Le=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Re=[`id`],ze=[`id`],Be=[`width`,`height`],Ve={key:1},He=[`x`,`y`,`height`,`width`,`fill`,`stroke`],Ue=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],We=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`],Ge=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ke=[`x`,`y`,`height`,`width`,`rx`,`fill`,`stroke`,`stroke-width`],qe={key:3},Je=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ye={key:4},Xe=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ze={key:4,class:`vue-data-ui-watermark`},Qe=[`id`],$e={key:0,class:`vue-ui-bullet-legend-item`,dir:`auto`},et={style:{"margin-right":`2px`}},w=/*#__PURE__*/ le({__name:`vue-ui-bullet`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:le,emit:Ne}){let w=p(()=>import(`./PackageVersion-u-p5bCcj.js`).then(e=>e.t)),tt=p(()=>import(`./PenAndPaper-r50tK3S4.js`).then(e=>e.t)),nt=p(()=>import(`./UserOptions-Em_JgDXM.js`).then(e=>e.n)),{vue_ui_bullet:rt}=t(),T=e,it=Ne,E=v(null),at=v(null),ot=v(0),st=v(null),ct=v(null),lt=v(0),D=v(null),O=v(null),ut=v(!1),k=c({get:()=>B.value.hasOwnProperty(`value`),set:e=>e}),A=v(R()),j=c(()=>A.value.debug),M=c(()=>A.value.style.chart.target),N=c(()=>A.value.style.chart.segments),P=c(()=>A.value.style.chart),F=c(()=>A.value.userOptions),I=c(()=>B.value.segments?Array.isArray(B.value.segments)?B.value.segments.length?!0:(j.value&&console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
2
2
 
3
3
  segments: [
4
4
  {
@@ -31,4 +31,4 @@ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO
31
31
  },
32
32
  {...}
33
33
  ]
34
- `),k.value=!1,!1)),dt=c(()=>{let{top:e,right:t,bottom:n,left:r}=P.value.padding;return{top:e,right:t,bottom:n,left:r}});function ft(){if(ae(B.value)?(te({componentName:`VueUiBullet`,type:`dataset`,debug:j.value}),V.value=!0):I.value?B.value.segments.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`from`,`to`]}).forEach(e=>{k.value=!1,te({componentName:`VueUiBullet segment`,type:`datasetSerieAttribute`,property:e,index:t,debug:j.value})})}):(k.value=!1,V.value=!0),ae(B.value)||(V.value=A.value.loading),A.value.responsive){let e=ye(()=>{let{width:e,height:t}=be({chart:E.value,title:P.value.title.text?at.value:null,legend:P.value.legend.show?st.value:null,source:ct.value,padding:dt.value}),n=(P.value.legend.show?24:0)||12;requestAnimationFrame(()=>{W.value.width=e,W.value.height=t-n})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(e),O.value=E.value.parentNode,D.value.observe(O.value)}P.value.animation.show&&!z.value&&St(B.value.value||0)}Ae(()=>{ut.value=!0,ft()});let L=v(a());function R(){return ue(T.config,rt,we)}ce({config:()=>A.value,dataset:()=>T.dataset,component:`VueUiBullet`,rules:[{test:e=>e?.segments&&e?.segments.length>8,message:[`👀 The number of target segments is > 8, which can make the chart hard to read and a large legend. Consider:`,``,`▶️ Using broader segments.`]}]});let pt=c(()=>A.value.userOptions.useCursorPointer),mt=c(()=>ne({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,segments:{dataLabels:{show:!1},ticks:{stroke:`#8A8A8A`}},valueBar:{label:{show:!1}}}}},userConfig:A.value.skeletonConfig??{}})),{loading:z,FINAL_DATASET:B,manualLoading:V}=oe({...je(T),FINAL_CONFIG:A,prepareConfig:R,skeletonDataset:T.config?.skeletonDataset??{value:100,target:100,segments:[{name:``,from:0,to:33,color:`#AAAAAA`},{name:``,from:33,to:66,color:`#BABABA`},{name:``,from:66,to:100,color:`#CACACA`}]},skeletonConfig:ne({defaultConfig:A.value,userConfig:mt.value})}),{userOptionsVisible:H,setUserOptionsVisibility:ht,keepUserOptionState:gt}=xe({config:A.value}),{svgRef:U}=Se({config:P.value.title}),W=v({width:P.value.width,height:P.value.height}),_t=c(()=>W.value.width),vt=c(()=>W.value.height);Me(()=>T.config,e=>{z.value||(A.value=R()),H.value=!A.value.userOptions.showOnChartHover,W.value.width=P.value.width,W.value.height=P.value.height,ft(),ot.value+=1},{deep:!0});let G=c(()=>{let e=vt.value,t=_t.value,n=P.value.padding.left,r=t-P.value.padding.right,i=P.value.padding.top,a=e-P.value.padding.bottom;return{height:Math.max(.001,e),width:Math.max(.001,t),left:n,right:r,top:i,bottom:a,chartWidth:Math.max(.001,r-n),chartHeight:Math.max(.001,a-i)}}),yt=c(()=>{if(!I.value)return[];let e=[];for(let t=0;t<B.value.segments.length;t+=1)e.push(r(N.value.baseColor,t/B.value.segments.length));return e}),K=c(()=>I.value?{min:Math.min(...B.value.segments.map(e=>e.from)),max:Math.max(...B.value.segments.map(e=>e.to))}:{min:0,max:1}),q=v(bt());Me(()=>B.value,e=>{e.hasOwnProperty(`value`)&&(V.value=!1),P.value.animation.show&&!z.value?St(e.value||0):q.value=e.value||0},{deep:!0});function bt(){return P.value.animation.show&&!z.value?K.value.min:B.value.value||0}let xt=v(null);function St(e){let t=Math.abs(e-q.value)/P.value.animation.animationFrames;function n(){q.value<e?q.value=Math.min(q.value+t,e):q.value>e&&(q.value=Math.max(q.value-t,e)),q.value!==e&&(xt.value=requestAnimationFrame(n))}n()}ke(()=>{cancelAnimationFrame(xt.value)});let J=c(()=>{if(!I.value)return[];let e=ee(K.value.min,K.value.max,N.value.ticks.divisions),t=e.min>=0?0:Math.abs(e.min);return{scale:e,target:{x:G.value.left+(B.value.target+t)/(e.max+t)*G.value.chartWidth-M.value.width/2},value:{width:(q.value+t)/(e.max+t)*G.value.chartWidth},ticks:e.ticks.map(n=>({value:n,y:G.value.bottom+N.value.dataLabels.fontSize+3+N.value.dataLabels.offsetY,x:G.value.left+(n+t)/(e.max+t)*G.value.chartWidth})),chunks:B.value.segments.map((n,r)=>({...n,color:n.color?i(n.color):yt.value[r],x:G.value.left+G.value.chartWidth*((n.from+t)/(e.max+t)),y:G.value.top,height:G.value.chartHeight,width:G.value.chartWidth*(Math.abs(n.to-n.from)/(e.max+t))}))}}),Y=c(()=>!J.value||!J.value.chunks||!J.value.chunks.length?[]:J.value.chunks.map(e=>{let t=`${o(N.value.dataLabels.formatter,e.from,n({p:N.value.dataLabels.prefix,v:e.from,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))} — ${o(N.value.dataLabels.formatter,e.to,n({p:N.value.dataLabels.prefix,v:e.to,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))}`;return{...e,shape:`square`,value:t,display:`${e.name}: ${t}`}})),Ct=c(()=>({cy:`bullet-div-legend`,backgroundColor:`transparent`,color:P.value.legend.color,fontSize:P.value.legend.fontSize,paddingBottom:6,fontWeight:P.value.legend.bold?`bold`:``})),{isPrinting:X,isImaging:Z,generatePdf:wt,generateImage:Tt}=ve({elementId:`bullet_${L.value}`,fileName:P.value.title.text||`vue-ui-bullet`,options:A.value.userOptions.print}),Et=c(()=>A.value.userOptions.show&&!P.value.title.text),Q=v(!1);function Dt(e){Q.value=e,lt.value+=1}function Ot(){return J.value}let $=v(!1);function kt(){$.value=!$.value}let At=de(E,()=>P.value.title.text),jt=c(()=>Y.value.map(e=>({...e,name:e.display}))),Mt=c(()=>P.value.backgroundColor),Nt=c(()=>P.value.legend),Pt=c(()=>P.value.title),{isCallbackImaging:Ft,isCallbackSvg:It,generateSvg:Lt,onGenerateImage:Rt}=pe({svg:U,title:Pt,legend:Nt,legendItems:jt,backgroundColor:Mt,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Tt});async function zt(){it(`copyAlt`,{config:A.value,dataset:B.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return le({getData:Ot,getImage:At,generatePdf:wt,generateImage:Tt,generateSvg:Lt,toggleAnnotator:kt,toggleFullscreen:Dt,copyAlt:zt}),(e,t)=>(_(),d(`div`,{ref_key:`bulletChart`,ref:E,class:Oe(`vue-data-ui-component vue-ui-bullet ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:g(`font-family:${A.value.style.fontFamily};width:100%;background:${P.value.backgroundColor};${A.value.responsive?`height:100%`:``}`),id:`bullet_${L.value}`,onMouseenter:t[0]||=()=>S(ht)(!0),onMouseleave:t[1]||=()=>S(ht)(!1)},[F.value.buttons.annotator?(_(),l(S(tt),{key:0,svgRef:S(U),backgroundColor:P.value.backgroundColor,color:P.value.color,active:$.value,isCursorPointer:pt.value,palette:F.value.annotatorPalette,onClose:kt},Ee({_:2},[y(S(he),t=>({name:t,fn:C(n=>[b(e.$slots,t,h(m(S(me)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),Et.value?(_(),d(`div`,Fe,null,512)):u(``,!0),P.value.title.text?(_(),d(`div`,{key:2,ref_key:`chartTitle`,ref:at,style:`width:100%;background:transparent;`},[(_(),l(fe,{lineHeight:`1.3rem`,key:`title_${ot.value}`,config:{title:{cy:`bullet-div-title`,...P.value.title},subtitle:{cy:`bullet-div-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),f(`div`,{id:`legend-top-${L.value}`},null,8,Ie),F.value.show&&k.value&&(S(gt)||S(H))?(_(),l(S(nt),{key:3,ref:`details`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:S(X),isImaging:S(Z),uid:L.value,hasTooltip:!1,hasPdf:F.value.buttons.pdf,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:F.value.buttons.fullscreen,hasAltCopy:F.value.buttons.altCopy,isFullscreen:Q.value,chartElement:E.value,position:F.value.position,titles:{...F.value.buttonTitles},hasAnnotator:F.value.buttons.annotator,isAnnotation:$.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,isCursorPointer:pt.value,onToggleFullscreen:Dt,onGeneratePdf:S(wt),onGenerateImage:S(Rt),onGenerateSvg:S(Lt),onToggleAnnotator:kt,onCopyAlt:zt,style:g({visibility:S(gt)?S(H)?`visible`:`hidden`:`visible`})},Ee({_:2},[y(S(ge)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,h(m(S(_e)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`chartElement`,`position`,`titles`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),(_(),d(`svg`,{ref_key:`svgRef`,ref:U,xmlns:S(re),class:Oe({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,"vue-ui-bullet-svg":!0}),viewBox:`0 0 ${G.value.width} ${G.value.height}`,style:g(`width: 100%; overflow: visible; background:transparent;color:${P.value.color}`),"aria-labelledby":`bullet-svg-title-${L.value}`,"aria-describedby":`bullet-svg-desc-${L.value}`},[De(S(w)),b(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:S(X)||S(Z)||S(Ft),isPrintingSvg:S(It)}},void 0,!0),f(`title`,{id:`bullet-svg-title-${L.value}`},x(P.value.title.text||`Bullet chart`),9,Re),f(`desc`,{id:`bullet-svg-desc-${L.value}`},` Value: `+x(q.value)+`, Target: `+x(J.value.target?.value),9,ze),e.$slots[`chart-background`]?(_(),d(`foreignObject`,{key:0,x:0,y:0,width:G.value.width,height:G.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,Be)):u(``,!0),I.value?(_(),d(`g`,Ve,[(_(!0),d(s,null,y(J.value.chunks,e=>(_(),d(`rect`,{x:e.x,y:e.y,height:e.height,width:e.width,fill:e.color,"stroke-width":1,stroke:P.value.backgroundColor,style:{transition:`x 0.3s ease-in-out, width 0.3s ease-in-out`}},null,8,He))),256)),!M.value.onTop&&M.value.show?(_(),d(`rect`,{key:0,x:J.value.target.x,y:G.value.top+(G.value.chartHeight-G.value.chartHeight*M.value.heightRatio)/2,height:G.value.chartHeight*M.value.heightRatio,width:M.value.width,rx:M.value.rounded?M.value.width/2:0,fill:M.value.color,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,Ue)):u(``,!0),f(`rect`,{x:G.value.left,y:G.value.top+(G.value.chartHeight-G.value.chartHeight*P.value.valueBar.heightRatio)/2,height:G.value.chartHeight*P.value.valueBar.heightRatio,width:J.value.value.width,fill:P.value.valueBar.color,stroke:P.value.valueBar.stroke,"stroke-width":P.value.valueBar.strokeWidth},null,8,We),P.value.valueBar.label.show?(_(),d(`text`,{key:1,x:G.value.left+J.value.value.width,y:G.value.top-6+P.value.valueBar.label.offsetY,"font-size":P.value.valueBar.label.fontSize,"font-weight":P.value.valueBar.label.bold?`bold`:`normal`,fill:P.value.valueBar.label.color,"text-anchor":`middle`},x(S(o)(N.value.dataLabels.formatter,q.value,S(n)({p:N.value.dataLabels.prefix,v:q.value,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))),9,Ge)):u(``,!0),M.value.onTop&&M.value.show?(_(),d(`rect`,{key:2,x:J.value.target.x,y:G.value.top+(G.value.chartHeight-G.value.chartHeight*M.value.heightRatio)/2,height:G.value.chartHeight*M.value.heightRatio,width:M.value.width,rx:M.value.rounded?M.value.width/2:0,fill:M.value.color,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,style:{transition:`x 0.3s ease-in-out`}},null,8,Ke)):u(``,!0),N.value.dataLabels.show?(_(),d(`g`,qe,[(_(!0),d(s,null,y(J.value.ticks,e=>(_(),d(`text`,{x:e.x,y:e.y,"text-anchor":`middle`,fill:N.value.dataLabels.color,"font-size":N.value.dataLabels.fontSize+`px`,"font-weight":N.value.dataLabels.bold?`bold`:`normal`},x(S(o)(N.value.dataLabels.formatter,e.value,S(n)({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))),9,Je))),256))])):u(``,!0),N.value.dataLabels.show&&N.value.ticks.show?(_(),d(`g`,Ye,[(_(!0),d(s,null,y(J.value.ticks,e=>(_(),d(`line`,{x1:e.x,x2:e.x,y1:G.value.bottom,y2:G.value.bottom+3,stroke:N.value.ticks.stroke,"stroke-width":1,"stroke-linecap":`round`},null,8,Xe))),256))])):u(``,!0)])):u(``,!0),b(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:S(X)||S(Z)||S(Ft),isPrintingSvg:S(It)}},void 0,!0)],14,Le)),e.$slots.watermark?(_(),d(`div`,Ze,[b(e.$slots,`watermark`,h(m({isPrinting:S(X)||S(Z)||S(Ft)||S(It)})),void 0,!0)])):u(``,!0),f(`div`,{id:`legend-bottom-${L.value}`},null,8,Qe),ut.value&&(P.value.legend.show||e.$slots.legend)?(_(),l(Te,{key:5,to:P.value.legend.position===`top`?`#legend-top-${L.value}`:`#legend-bottom-${L.value}`},[f(`div`,{ref_key:`chartLegend`,ref:st},[b(e.$slots,`legend`,{legend:Y.value},()=>[P.value.legend.show?(_(),l(Ce,{key:0,clickable:!1,legendSet:Y.value,config:Ct.value},{item:C(({legend:e})=>[S(z)?u(``,!0):(_(),d(`div`,$e,[f(`span`,et,x(e.name)+`:`,1),f(`span`,null,x(e.value),1)]))]),_:1},8,[`legendSet`,`config`])):u(``,!0)],!0)],512)],8,[`to`])):u(``,!0),e.$slots.source?(_(),d(`div`,{key:6,ref_key:`source`,ref:ct,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),b(e.$slots,`skeleton`,{},()=>[S(z)?(_(),l(se,{key:0})):u(``,!0)],!0)],46,Pe))}},[[`__scopeId`,`data-v-06e83b80`]]);export{Ne as n,w as t};
34
+ `),k.value=!1,!1)),dt=c(()=>{let{top:e,right:t,bottom:n,left:r}=P.value.padding;return{top:e,right:t,bottom:n,left:r}});function ft(){if(ae(B.value)?(te({componentName:`VueUiBullet`,type:`dataset`,debug:j.value}),V.value=!0):I.value?B.value.segments.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`from`,`to`]}).forEach(e=>{k.value=!1,te({componentName:`VueUiBullet segment`,type:`datasetSerieAttribute`,property:e,index:t,debug:j.value})})}):(k.value=!1,V.value=!0),ae(B.value)||(V.value=A.value.loading),A.value.responsive){let e=ye(()=>{let{width:e,height:t}=be({chart:E.value,title:P.value.title.text?at.value:null,legend:P.value.legend.show?st.value:null,source:ct.value,padding:dt.value}),n=(P.value.legend.show?24:0)||12;requestAnimationFrame(()=>{W.value.width=e,W.value.height=t-n})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(e),O.value=E.value.parentNode,D.value.observe(O.value)}P.value.animation.show&&!z.value&&St(B.value.value||0)}Ae(()=>{ut.value=!0,ft()});let L=v(a());function R(){return ue(T.config,rt,we)}ce({config:()=>A.value,dataset:()=>T.dataset,component:`VueUiBullet`,rules:[{test:e=>e?.segments&&e?.segments.length>8,message:[`👀 The number of target segments is > 8, which can make the chart hard to read and a large legend. Consider:`,``,`▶️ Using broader segments.`]}]});let pt=c(()=>A.value.userOptions.useCursorPointer),mt=c(()=>ne({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,segments:{dataLabels:{show:!1},ticks:{stroke:`#8A8A8A`}},valueBar:{label:{show:!1}}}}},userConfig:A.value.skeletonConfig??{}})),{loading:z,FINAL_DATASET:B,manualLoading:V}=oe({...je(T),FINAL_CONFIG:A,prepareConfig:R,skeletonDataset:T.config?.skeletonDataset??{value:100,target:100,segments:[{name:``,from:0,to:33,color:`#AAAAAA`},{name:``,from:33,to:66,color:`#BABABA`},{name:``,from:66,to:100,color:`#CACACA`}]},skeletonConfig:ne({defaultConfig:A.value,userConfig:mt.value})}),{userOptionsVisible:H,setUserOptionsVisibility:ht,keepUserOptionState:gt}=xe({config:A.value}),{svgRef:U}=Se({config:P.value.title}),W=v({width:P.value.width,height:P.value.height}),_t=c(()=>W.value.width),vt=c(()=>W.value.height);Me(()=>T.config,e=>{z.value||(A.value=R()),H.value=!A.value.userOptions.showOnChartHover,W.value.width=P.value.width,W.value.height=P.value.height,ft(),ot.value+=1},{deep:!0});let G=c(()=>{let e=vt.value,t=_t.value,n=P.value.padding.left,r=t-P.value.padding.right,i=P.value.padding.top,a=e-P.value.padding.bottom;return{height:Math.max(.001,e),width:Math.max(.001,t),left:n,right:r,top:i,bottom:a,chartWidth:Math.max(.001,r-n),chartHeight:Math.max(.001,a-i)}}),yt=c(()=>{if(!I.value)return[];let e=[];for(let t=0;t<B.value.segments.length;t+=1)e.push(r(N.value.baseColor,t/B.value.segments.length));return e}),K=c(()=>I.value?{min:Math.min(...B.value.segments.map(e=>e.from)),max:Math.max(...B.value.segments.map(e=>e.to))}:{min:0,max:1}),q=v(bt());Me(()=>B.value,e=>{e.hasOwnProperty(`value`)&&(V.value=!1),P.value.animation.show&&!z.value?St(e.value||0):q.value=e.value||0},{deep:!0});function bt(){return P.value.animation.show&&!z.value?K.value.min:B.value.value||0}let xt=v(null);function St(e){let t=Math.abs(e-q.value)/P.value.animation.animationFrames;function n(){q.value<e?q.value=Math.min(q.value+t,e):q.value>e&&(q.value=Math.max(q.value-t,e)),q.value!==e&&(xt.value=requestAnimationFrame(n))}n()}ke(()=>{cancelAnimationFrame(xt.value)});let J=c(()=>{if(!I.value)return[];let e=ee(K.value.min,K.value.max,N.value.ticks.divisions),t=e.min>=0?0:Math.abs(e.min);return{scale:e,target:{x:G.value.left+(B.value.target+t)/(e.max+t)*G.value.chartWidth-M.value.width/2},value:{width:(q.value+t)/(e.max+t)*G.value.chartWidth},ticks:e.ticks.map(n=>({value:n,y:G.value.bottom+N.value.dataLabels.fontSize+3+N.value.dataLabels.offsetY,x:G.value.left+(n+t)/(e.max+t)*G.value.chartWidth})),chunks:B.value.segments.map((n,r)=>({...n,color:n.color?i(n.color):yt.value[r],x:G.value.left+G.value.chartWidth*((n.from+t)/(e.max+t)),y:G.value.top,height:G.value.chartHeight,width:G.value.chartWidth*(Math.abs(n.to-n.from)/(e.max+t))}))}}),Y=c(()=>!J.value||!J.value.chunks||!J.value.chunks.length?[]:J.value.chunks.map(e=>{let t=`${o(N.value.dataLabels.formatter,e.from,n({p:N.value.dataLabels.prefix,v:e.from,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))} — ${o(N.value.dataLabels.formatter,e.to,n({p:N.value.dataLabels.prefix,v:e.to,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))}`;return{...e,shape:`square`,value:t,display:`${e.name}: ${t}`}})),Ct=c(()=>({cy:`bullet-div-legend`,backgroundColor:`transparent`,color:P.value.legend.color,fontSize:P.value.legend.fontSize,paddingBottom:6,fontWeight:P.value.legend.bold?`bold`:``})),{isPrinting:X,isImaging:Z,generatePdf:wt,generateImage:Tt}=ve({elementId:`bullet_${L.value}`,fileName:P.value.title.text||`vue-ui-bullet`,options:A.value.userOptions.print}),Et=c(()=>A.value.userOptions.show&&!P.value.title.text),Q=v(!1);function Dt(e){Q.value=e,lt.value+=1}function Ot(){return J.value}let $=v(!1);function kt(){$.value=!$.value}let At=de(E,()=>P.value.title.text),jt=c(()=>Y.value.map(e=>({...e,name:e.display}))),Mt=c(()=>P.value.backgroundColor),Nt=c(()=>P.value.legend),Pt=c(()=>P.value.title),{isCallbackImaging:Ft,isCallbackSvg:It,generateSvg:Lt,onGenerateImage:Rt}=pe({svg:U,title:Pt,legend:Nt,legendItems:jt,backgroundColor:Mt,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Tt});async function zt(){it(`copyAlt`,{config:A.value,dataset:B.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return le({getData:Ot,getImage:At,generatePdf:wt,generateImage:Tt,generateSvg:Lt,toggleAnnotator:kt,toggleFullscreen:Dt,copyAlt:zt}),(e,t)=>(_(),d(`div`,{ref_key:`bulletChart`,ref:E,class:Oe(`vue-data-ui-component vue-ui-bullet ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:g(`font-family:${A.value.style.fontFamily};width:100%;background:${P.value.backgroundColor};${A.value.responsive?`height:100%`:``}`),id:`bullet_${L.value}`,onMouseenter:t[0]||=()=>S(ht)(!0),onMouseleave:t[1]||=()=>S(ht)(!1)},[F.value.buttons.annotator?(_(),l(S(tt),{key:0,showGroupActions:F.value.annotator?.showGroupActions??!0,svgRef:S(U),backgroundColor:P.value.backgroundColor,color:P.value.color,active:$.value,isCursorPointer:pt.value,palette:F.value.annotatorPalette,onClose:kt},Ee({_:2},[y(S(he),t=>({name:t,fn:C(n=>[b(e.$slots,t,h(m(S(me)(t,n))),void 0,!0)])}))]),1032,[`showGroupActions`,`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),Et.value?(_(),d(`div`,Fe,null,512)):u(``,!0),P.value.title.text?(_(),d(`div`,{key:2,ref_key:`chartTitle`,ref:at,style:`width:100%;background:transparent;`},[(_(),l(fe,{lineHeight:`1.3rem`,key:`title_${ot.value}`,config:{title:{cy:`bullet-div-title`,...P.value.title},subtitle:{cy:`bullet-div-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),f(`div`,{id:`legend-top-${L.value}`},null,8,Ie),F.value.show&&k.value&&(S(gt)||S(H))?(_(),l(S(nt),{key:3,ref:`details`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:S(X),isImaging:S(Z),uid:L.value,hasTooltip:!1,hasPdf:F.value.buttons.pdf,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:F.value.buttons.fullscreen,hasAltCopy:F.value.buttons.altCopy,isFullscreen:Q.value,chartElement:E.value,position:F.value.position,titles:{...F.value.buttonTitles},hasAnnotator:F.value.buttons.annotator,isAnnotation:$.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,isCursorPointer:pt.value,onToggleFullscreen:Dt,onGeneratePdf:S(wt),onGenerateImage:S(Rt),onGenerateSvg:S(Lt),onToggleAnnotator:kt,onCopyAlt:zt,style:g({visibility:S(gt)?S(H)?`visible`:`hidden`:`visible`})},Ee({_:2},[y(S(ge)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,h(m(S(_e)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`chartElement`,`position`,`titles`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),(_(),d(`svg`,{ref_key:`svgRef`,ref:U,xmlns:S(re),class:Oe({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,"vue-ui-bullet-svg":!0}),viewBox:`0 0 ${G.value.width} ${G.value.height}`,style:g(`width: 100%; overflow: visible; background:transparent;color:${P.value.color}`),"aria-labelledby":`bullet-svg-title-${L.value}`,"aria-describedby":`bullet-svg-desc-${L.value}`},[De(S(w)),b(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:S(X)||S(Z)||S(Ft),isPrintingSvg:S(It)}},void 0,!0),f(`title`,{id:`bullet-svg-title-${L.value}`},x(P.value.title.text||`Bullet chart`),9,Re),f(`desc`,{id:`bullet-svg-desc-${L.value}`},` Value: `+x(q.value)+`, Target: `+x(J.value.target?.value),9,ze),e.$slots[`chart-background`]?(_(),d(`foreignObject`,{key:0,x:0,y:0,width:G.value.width,height:G.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,Be)):u(``,!0),I.value?(_(),d(`g`,Ve,[(_(!0),d(s,null,y(J.value.chunks,e=>(_(),d(`rect`,{x:e.x,y:e.y,height:e.height,width:e.width,fill:e.color,"stroke-width":1,stroke:P.value.backgroundColor,style:{transition:`x 0.3s ease-in-out, width 0.3s ease-in-out`}},null,8,He))),256)),!M.value.onTop&&M.value.show?(_(),d(`rect`,{key:0,x:J.value.target.x,y:G.value.top+(G.value.chartHeight-G.value.chartHeight*M.value.heightRatio)/2,height:G.value.chartHeight*M.value.heightRatio,width:M.value.width,rx:M.value.rounded?M.value.width/2:0,fill:M.value.color,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,Ue)):u(``,!0),f(`rect`,{x:G.value.left,y:G.value.top+(G.value.chartHeight-G.value.chartHeight*P.value.valueBar.heightRatio)/2,height:G.value.chartHeight*P.value.valueBar.heightRatio,width:J.value.value.width,fill:P.value.valueBar.color,stroke:P.value.valueBar.stroke,"stroke-width":P.value.valueBar.strokeWidth},null,8,We),P.value.valueBar.label.show?(_(),d(`text`,{key:1,x:G.value.left+J.value.value.width,y:G.value.top-6+P.value.valueBar.label.offsetY,"font-size":P.value.valueBar.label.fontSize,"font-weight":P.value.valueBar.label.bold?`bold`:`normal`,fill:P.value.valueBar.label.color,"text-anchor":`middle`},x(S(o)(N.value.dataLabels.formatter,q.value,S(n)({p:N.value.dataLabels.prefix,v:q.value,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))),9,Ge)):u(``,!0),M.value.onTop&&M.value.show?(_(),d(`rect`,{key:2,x:J.value.target.x,y:G.value.top+(G.value.chartHeight-G.value.chartHeight*M.value.heightRatio)/2,height:G.value.chartHeight*M.value.heightRatio,width:M.value.width,rx:M.value.rounded?M.value.width/2:0,fill:M.value.color,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,style:{transition:`x 0.3s ease-in-out`}},null,8,Ke)):u(``,!0),N.value.dataLabels.show?(_(),d(`g`,qe,[(_(!0),d(s,null,y(J.value.ticks,e=>(_(),d(`text`,{x:e.x,y:e.y,"text-anchor":`middle`,fill:N.value.dataLabels.color,"font-size":N.value.dataLabels.fontSize+`px`,"font-weight":N.value.dataLabels.bold?`bold`:`normal`},x(S(o)(N.value.dataLabels.formatter,e.value,S(n)({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:N.value.dataLabels.rounding}))),9,Je))),256))])):u(``,!0),N.value.dataLabels.show&&N.value.ticks.show?(_(),d(`g`,Ye,[(_(!0),d(s,null,y(J.value.ticks,e=>(_(),d(`line`,{x1:e.x,x2:e.x,y1:G.value.bottom,y2:G.value.bottom+3,stroke:N.value.ticks.stroke,"stroke-width":1,"stroke-linecap":`round`},null,8,Xe))),256))])):u(``,!0)])):u(``,!0),b(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:S(X)||S(Z)||S(Ft),isPrintingSvg:S(It)}},void 0,!0)],14,Le)),e.$slots.watermark?(_(),d(`div`,Ze,[b(e.$slots,`watermark`,h(m({isPrinting:S(X)||S(Z)||S(Ft)||S(It)})),void 0,!0)])):u(``,!0),f(`div`,{id:`legend-bottom-${L.value}`},null,8,Qe),ut.value&&(P.value.legend.show||e.$slots.legend)?(_(),l(Te,{key:5,to:P.value.legend.position===`top`?`#legend-top-${L.value}`:`#legend-bottom-${L.value}`},[f(`div`,{ref_key:`chartLegend`,ref:st},[b(e.$slots,`legend`,{legend:Y.value},()=>[P.value.legend.show?(_(),l(Ce,{key:0,clickable:!1,legendSet:Y.value,config:Ct.value},{item:C(({legend:e})=>[S(z)?u(``,!0):(_(),d(`div`,$e,[f(`span`,et,x(e.name)+`:`,1),f(`span`,null,x(e.value),1)]))]),_:1},8,[`legendSet`,`config`])):u(``,!0)],!0)],512)],8,[`to`])):u(``,!0),e.$slots.source?(_(),d(`div`,{key:6,ref_key:`source`,ref:ct,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),b(e.$slots,`skeleton`,{},()=>[S(z)?(_(),l(se,{key:0})):u(``,!0)],!0)],46,Pe))}},[[`__scopeId`,`data-v-5f0c1b8a`]]);export{Ne as n,w as t};